Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. s = tf('s')
  2. C =@(Kp,Ti) (Kp + Kp/(Ti*s))
  3. G = tf([6],[48 44 12 1])
  4.  
  5. Kp = [0.3 0.5 0.7];
  6. Ti = [20 20 20];
  7.  
  8. figure
  9. ax = axes;
  10. hold(ax,'on');
  11.  
  12.  
  13. for i = 1:length(Kp)
  14. H = feedback(C(Kp(i),Ti(i))*G,1,-1)
  15. step(H)
  16. end
  17.  
  18. gLegend = arrayfun(@(Kp,Ti) sprintf('Kp = %i, Ti = %i',Kp,Ti),Kp,Ti,'UniformOutput',false)
  19. legend(ax,gLegend)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement