This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: for i =1:4 var = tr(i); % Calculated Values wn = 1.789/tr(i); tau = tr(i)/1.6; dr = 0.89; % Numerator Coefficients b1 = tau*wn*wn; b0 = wn*wn; % Denominator Coefficients a2 = 1; a1 = 2*dr*wn; a0 = wn*wn; 7/8/08 10:57 PM E:\MAE 171A\hw2.m 2 of 2 % Numerator and Denominator Num = [b1 b0]; Den = [a2 a1 a0]; % Calculations system = tf(Num, Den); time = 0:0.01:8; response = step(system, time); % Finding Mp yss = dcgain(system); Mp = (max(response)-yss)*100 % Finding Ts tss = find(abs(response-yss)/yss>0.01); ts = time(max(tss)) % Figure figure() plot(time,response) xlabel('time(s)'); ylabel('Qo/Qc'); ttl = sprintf('When Rise time in second is tr =%4.1f' ,var); title(ttl) grid on pause end...
View Full Document
This note was uploaded on 06/08/2011 for the course MAE 171A taught by Professor Idan during the Spring '09 term at UCLA.
- Spring '09