声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2076|回复: 0

[编程技巧] matlab符号计算求解两自由度振子传递函数.doc

[复制链接]
发表于 2008-8-6 19:51 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
syms m1
m2

c
k1
k2
Y
w
F
den
num
M =[ m1 0; 0 m2]
C =[ c -c ; -c c]
K = [ k1,-k1;-k1,k1+k2]
U0 = -w^2*M + i*w*C +K
%拉普拉斯变换
然后把s 换为jw
U = inv(U0)*F
U = inv(U0)*F
detU=det(U)
numden(det(U))
[num,den]=numden(det(U))
% den = -den
collect(den,w)
U1 = U/F
det(U1)
temp_num1=[0;k2*Y]
%Cramer 法则,解代数方程一样
num1= [temp_num1,U1(:,2)]
%det(num1)/det(U1)
det(num1)/det(U0)
%缺少一个比例常数
num1=[temp_num1,U0(:,2)]
det(num1)/det(U0)
%这个才是对的了
%因为U1已经求过逆了

% because the U1 has been the inverse of the 2dof
% so you can you use the
F =[0;k2*Y]
U1*F
%另一种方法
就是矩阵的
求逆和乘法而已, 可以这样子求解啦

% the inv(U1)*F is just the numerator not the denominator
%其中非常值得注意的是,我们的这种谐波激励求解方法也默认结果是谐波
%,所以其中
最后的解


虚部的 ,因为假定激励是sin 不是cos
%否则应该取实部
2dof.GIF

回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-2 08:46 , Processed in 0.058397 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表