Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %part A
- %%
- %q1
- J=200;
- B=150;
- tao=0.2;
- K=1; %for simulink diagram only
- %%
- %q3
- s=tf('s')
- G_motor=55/(tao*s+1);
- G_antenna=1/(J*s^2+B*s);
- G=G_motor*G_antenna
- figure(1)
- rlocus(G);
- grid on
- %%
- %q4
- a=(0.2*s+1)/(40*s^3+230*s^2+150*s+55);
- figure(2)
- bode(a)
- grid on
- C=(6*(5.3*s+1)*(s+1)*(0.19*s+1))/(s*(1+0.01*s)*(1+0.02*s));
- GC_cl=minreal(G*C/(1+G*C));%H=1
- q5poles=pole(GC_cl)
- G_diturbance = G_antenna/(1+C*G);%H=1
- figure(3)
- bode(G_diturbance)
- grid on
- %%
- %q7+8
- stepinfo(out.simout.Data,out.simout.time,'SettlingTimeThreshold',0.05)
- %%
- % part B
- %q1
- B_max=1.1*B;
- B_min=0.9*B;
- J_max=1.1*J;
- J_min=0.9*J;
- G2=[1/(J_max*s^2+B_max*s) 1/(J_max*s^2+B_min*s) 1/(J_min*s^2+B_max*s) 1/(J_min*s^2+B_min*s)];
- for i=1:4
- G=G_motor*G2(i);
- G_diturbance2(i) = G2(i)/(1+C*G);%H=1
- figure(i+3)
- bode(G_diturbance2(i))
- grid on
- end
- %%
- %q3
- sti=stepinfo(out.simout.Data,out.simout.time,'SettlingTimeThreshold',0.05);
- if sti.RiseTime<0.3 && sti.SettlingTime<3 && sti.Overshoot<10 %find which variance the system can manage
- check='ok'
- else
- check='no'
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement