📄 v2_018.m
字号:
% v2_018.m
%
% This is a script file to solve a sdof system
% given the mass, damping and stiffness terms
% in dimensionless units when the damping is varied.
% The output includes poles, residues (modal coefficients) and
% frequency domain plots of the frequency response functions.
%
% SDOF System, Partial Fraction Parameter Estimation
% Figures for UC-SDRL-CN-20-263-662, Chapter 2
%**********************************************************************
% Author: Randall J. Allemang
% Date: 18-Apr-94
% Structural Dynamics Research Lab
% University of Cincinnati
% Cincinnati, Ohio 45221-0072
% TEL: 513-556-2725
% FAX: 513-556-3390
% E-MAIL: randy.allemang@uc.edu
%*********************************************************************
%
clg
clear
plt=input('Store plots to file (Yes=1): (0)');if isempty(plt),plt=0;end;
pi=3.14159;
mass=input('Mass value: (10)');if isempty(mass),mass=10;end
stiff=input('Stiffness value: (1600)');if isempty(stiff),stiff=1600;end
damp=input('Damping value: (2)');if isempty(damp),damp=2;end
f=linspace(0,30,600);
a=[mass,damp,stiff];
b=[0,0,1];
[r,p,k]=residue(b,a);
residu= r(1);
lambda=p(1);
residu, lambda
xf=residu./(j.*f-lambda) + residu'./(j.*f-lambda');
xfmax=0.0;
for i=1:600;
xfmax=max([xfmax,abs(xf(i))]);
end;
plot(f,real(xf),imag(lambda),0.0,'o')
% v=axis;
% x=[imag(lambda),imag(lambda)];
% y=[v(3),v(4)];
% plot(f,real(xf),x,y)
xlabel('Frequency (Rad/Sec)'),ylabel('Real'),grid
if plt==1,print -f1 -deps v2_018a,end;
pause
plot(f,imag(xf))
v=axis;
plot(f,imag(xf),imag(lambda),v(3),'o',imag(lambda),0.0,'o')
xlabel('Frequency (Rad/Sec)'),ylabel('Imaginary'),grid
if plt==1,print -f1 -deps v2_018b,end;
pause
plot(f,abs(xf))
v=axis;
plot(f,abs(xf),imag(lambda),v(4),'o',imag(lambda),0.0,'o')
xlabel('Frequency (Rad/Sec)'),ylabel('Magnitude'),grid
if plt==1,print -f1 -deps v2_018c,end;
pause
scale=360.0/(2.0*pi);
plot(f,scale.*angle(xf),imag(lambda),-90.0,'o')
% v=axis;
% x=[imag(lambda),imag(lambda)];
% y=[v(3),v(4)];
% plot(f,scale.*angle(xf),x,y)
xlabel('Frequency (Rad/Sec)'),ylabel('Phase (Deg)'),grid
if plt==1,print -f1 -deps v2_018d,end;
pause
clg
plot(f(240:270),abs(xf(240:270)))
v=axis;
x=[imag(lambda),imag(lambda)];
y=[v(3),v(4)];
xx=[v(1),v(2)];
yy=[0.707*xfmax,0.707*xfmax];
plot(f,abs(xf),x,y,xx,yy)
xlabel('Frequency (Rad/Sec)'),ylabel('Magnitude'),grid
if plt==1,print -f1 -deps v2_018e,end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -