Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = tf('s')
- C =@(Kp,Ti) (Kp + Kp/(Ti*s))
- G = tf([6],[48 44 12 1])
- Kp = [0.3 0.5 0.7];
- Ti = [20 20 20];
- figure
- ax = axes;
- hold(ax,'on');
- for i = 1:length(Kp)
- H = feedback(C(Kp(i),Ti(i))*G,1,-1)
- step(H)
- end
- gLegend = arrayfun(@(Kp,Ti) sprintf('Kp = %i, Ti = %i',Kp,Ti),Kp,Ti,'UniformOutput',false)
- legend(ax,gLegend)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement