ASEN 5022 - Spring 2005Dynamics of Aerospace StructuresLecture 03:Solution of 1 and 2-DOF Vibrating ModelsGoverning equation: m ¨x + c˙x + kx = f (t)˙p = m ¨x = f (t) − kx − (c/m) p˙x = (1/m) p⇓˙x˙p =01/m−k −c/mxp +0f (t) ⇓Canonical equation:˙x = Ax +Bu(t)Output equation: y = Cx +DuSolution of the canonical equation:x = eAtx(0) +t0eA(t−τ)Bu(τ ) dτeAtx(0)-term: response due to the initial condi-tions.t0eA(t−τ)Bu(τ ) dτ -term: response due to the ex-ternal (applied) forcing function.Discrete approximation:x(kT) = eAkTx(0) +kT0eA(kT−τ)Bu(τ ) dτx(kT + T) = eA(kT+T)x(0)+kT+T0eA(kT+T−τ)Bu(τ ) dτDiscrete approximation-cont’dx(kT + T) = eAT[eAkTx(0)]+kT0eA(kT+T−τ)Bu(τ ) dτ+kT+TkTeA(kT+T−τ)Bu(τ ) dτDiscrete approximation -cont’dx(kT + T) = eAT[eAkTx(0)]+ eAT[kT0eA(kT−τ)Bu(τ ) dτ ]+kT+TkTeA(kT+T−τ)Bu(τ ) dτx(kT + T) = eATx(kT)+kT+TkTeA(kT+T−τ)Bu(τ ) dτDiscrete approximation -cont’dkT+TkTeA(kT+T−τ)Bu(τ ) dτ(via change of variable: σ = kT + T − τ)≈0TeAσBu(kT)(−dσ), with u(τ ) ≈ u(kT)=T0eAσBu(kT)(dσ)= A−1(eAT− I) Bu(kT) = Γ u(kT)where Γ = A−1(eAT− I) BDiscrete approximation -concludedx(kT + T) = eATx(kT) + Γ u(kT)⇓x(k + 1) = Φ x(k) + Γ u(k)Γ = A−1(eAT− I) BUseful Matlab routines:sys= ss(a,b,c,d): Specify a state space model.H =tf (num, den): Convert a state space model to thecorresponding transfer function.[y,t,x]=step(sys): obtain step response.[y,t,x]=lsim(sys,u,t,x0): obtain response due to arbitraryinput u.[H] =freqresp(sys,w): compute frequency response overa grid of frequencies.[Hresh]=reshape(H, size(w)): make H the same size asw.[y,t,x]=impulse(sys,t): obtain impulse response.[y,t,x]=initial(sys,xo): free response due to initial con-dition.% vibex.m% Program to compute 1DOF computations% January 16, 2004 (KCP)clear% Define some useful numbers:Hz2rps=2*pi; rps2Hz=1/2/pi; % Conversions to/from Hz and rad/s% Natural frequency of 1 Hzomega_n=1*Hz2rps;T_n = 2*pi/omega_n; % period of the response% critical damping ratiozeta= 0.05; %5 percent% state space modela=[0 1; -omega_n^2 -2*zeta*omega_n];b=[0; omega_n^2]; % a force is appled, equivalent to unit static displacementc=[1 0; 0 1]; % both momentum and displacement are available% specify state space model for this problemsys = ss (a,b,c,0);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Time response computation%%%%%%%%%%%%%%%%%%%%%%%%%%%%% obtain the response, y1 =displ; y2=mementum% step(sys); % simplest step response computation%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for specified computations;%% the total time of simulationTfinal = 6*T_n; % 6 periods%specify the output time points:dt = (1/40)*(T_n); %40 samples per period%time intervalt = 0:dt:Tfinal;%obtain response[y,t,x]=step(sys,t);%plot the responsefigure(2);plot(t’, y(:,1)’, ’k’);xlabel(’Time(sec)’);ylabel(’Displacement’);title(’Step Response computed by specifying the time step’);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end of response computation%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% frequency response calculation%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Pick a range of frequencies to look at from 1 Hz to 10 Hzwf= logspace(-1,1,200)*Hz2rps;% Find the frequency response% generte transfer functionTransF = tf(sys);H=freqresp(TransF,wf); % This ends up being a 3 dimensional array!Hreshape=reshape(H(1,:,:),size(wf)); % this makes it the same size as wf% Plot the amplitude as a function of frequency in Hzfigure(3)loglog(wf*rps2Hz,abs(Hreshape));grid on;xlabel(’Frequency (Hz)’)ylabel(’Amplitude’)title(’Frequency response of1DOF damped system’);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end the frequency response%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%harmonic response of 1dofsystem%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Pick a range of times to look at the time responset=0:0.005:5; % for 5 period of T_n% sinusoidal forcing functionu=sin(Hz2rps*2*t); % omega_forcing = 2 Hertz![ys,ts]=lsim(sys,u,t);figure(4)plot(ts,ys(:,1)’),gridxlabel(’Time (sec)’)ylabel(’Displacement’)title(’Time response due to harmonic excitation’);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%0 1 2 3 4 5 600.20.40.60.811.21.41.61.82Time(sec)DisplacementStep Response computed by specifying the time step0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-0.8-0.6-0.4-0.200.20.40.60.81Time (sec)DisplacementTime response due to harmonic excitation10-110010110-210-1100101Frequency (Hz)AmplitudeFrequency response of1DOF damped
View Full Document