Advertisement
Guest User

Untitled

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