Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function F = tracklsq(pid)
- s = tf('s');
- plant = (1 / (1+2.5*s))*(1/(s*0.0008+0.06));%PLANT FUNCTION
- Kp = pid(1);
- Ki = pid(2);
- cont = (Kp + Ki/s);
- %step(feedback(plant*cont,1));
- dt = 0.01;
- t = 0:dt:1;
- e = 1 - step(feedback(plant*cont,1),t);%ITEA
- F = sum(t'.*abs(e)*dt);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement