hw2 - for i =1:4 var = tr(i); % Calculated Values wn =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
7/8/08 10:57 PM E:\MAE 171A\hw2.m 1 of 2 % Adams Nelson Yang Peng % 903-507-266 % Problem 3.24 clear all % Calculated Values a = 67.1; k = 113.34; % Numerator Coefficients b0 = 100*k; % Denominator Coefficients a2 = 1; a1 = 25+a; a0 = 25*a+100*k; % Numerator and Denominator Num = [b0]; Den = [a2 a1 a0]; % Calculations system = tf(Num, Den); time = 0:0.001:0.12; 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('y(t)'); title('Design Verification of Step Response'); grid on pause % Problem 3.31 % Variable tr = [0.8 1.0 1.2 1.5];
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the 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.

Page1 / 2

hw2 - for i =1:4 var = tr(i); % Calculated Values wn =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online