利用matlab设计二自由度传统有阻尼动力吸振器的原点频响函数
时间: 2024-05-03 11:20:00 浏览: 202
以下是一个用MATLAB设计二自由度传统有阻尼动力吸振器的原点频响函数的示例代码。其中,系统参数已经设定,包括质量、刚度、阻尼和激振力等。
```matlab
% Define system parameters
m1 = 1; % mass of primary system
m2 = 0.5; % mass of secondary system
k1 = 1000; % stiffness of primary system
k2 = 500; % stiffness of secondary system
c1 = 10; % damping of primary system
c2 = 5; % damping of secondary system
F0 = 10; % amplitude of excitation force
w = 10; % frequency of excitation force
% Define transfer function
syms s;
A = [m1 0; 0 m2];
B = [-k1-k2 k2; k2 -k2];
C = [c1+c2 -c2; -c2 c2];
D = [0 0; 0 F0/s/m2];
H = inv(s^2*A + s*C + B)*D;
% Plot frequency response
w_range = logspace(-1,2,100);
mag = abs(eval(subs(H, s, i*w_range)));
loglog(w_range, mag);
xlabel('Frequency (rad/s)');
ylabel('Magnitude');
title('Frequency Response of Two-DOF Dynamic Vibration Absorber');
```
运行此代码,将生成一个频率响应图,显示系统在不同频率下的振动幅值。
阅读全文