You are on page 1of 1

g1 ( x1 , x2 ) y (

g
g1
) x 1, x 0 (x1 ) ( 1 ) x1 1, x2 0 (x2 )
x2
x1 1 2

y (1) x 1, x 0 (x1 ) (1) x 1, x 0 (x2 )


1

y x1 1x2

Q2ConsiderHomeworkProblemSet2,Question2.Plottheresponseofenginespeedifareferenceof2
anddisturbanceof1areactingsimultaneouslyonthesystem(useprincipleofsuperposition).
ProvideMATLABcodeandplots.
Soln.

t=0:0.05:2;
num_C_R=10^6;
den_C_R=[2 300.1 22815 201140 10^6];
sys_C_R=tf(num_C_R, den_C_R);
resp_C_R=step(sys_C_R,t);
num_C_D=[1 150 11400 10^5];
den_C_D=[2 300.1 22815 201140 10^6];
sys_C_D=tf(num_C_D, den_C_D);
resp_C_D=step(sys_C_D,t);
Total_resp=2*resp_C_R-resp_C_D;
figure(1)
plot(t,Total_resp)
xlabel('Time, t [sec]')
ylabel('Response')
title('Engine response to step reference of magnitude 2 and step
disturbance of magnitude -1')
Engine response to step reference of magnitude 2 and step disturbance of magnitude -1
2.5

Response

1.5

0.5

0
0

0.2

0.4

0.6

0.8
1
1.2
Time, t [sec]

1.4

1.6

1.8

You might also like