Advertisement
Guest User

Untitled

a guest
Jul 14th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.57 KB | None | 0 0
  1. clear all
  2. close all
  3. s=tf('s');
  4.  
  5. F1=100/(s-1);% tipo 0
  6. F2=1/(s^2+110*s+1000); %tipo 0
  7.  
  8. Kf1=dcgain(F1);
  9. Kf2=dcgain(F2);
  10.  
  11. %Kc=qualunque valore > 0
  12.  
  13. Kc= 300;
  14.  
  15. G1=Kc*F1*F2/s;
  16.  
  17. wb=3/0.3;
  18. wcd=wb*0.63;
  19.  
  20. Mr=20*log10((1+0.4)/0.9);
  21. mp=60-5*Mr;
  22.  
  23. [m1,f1]=bode(G1,wcd);
  24. md=4;
  25. xd=1;
  26. taud=xd/wcd;
  27. Rd=((s*taud+1)/(s*taud/md+1))^3;
  28. G2=G1*Rd;
  29.  
  30. [m2,f2]=bode(G2,wcd);
  31. mi=m2;
  32. % bode((1+s/mi)/(1+s));
  33. xi=35;
  34. taui=xi/wcd;
  35. Ri=((s*taui/mi+1)/(s*taui+1));
  36. G3=G2*Ri;
  37. margin(G3);
  38.  
  39. C=Kc*Rd*Ri/s;
  40.  
  41. W=feedback(G3,1);
  42. figure,bode(W);
  43. figure,step(W);
  44.  
  45. %discretizzazione;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement