Advertisement
Coriic

Untitled

May 12th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.35 KB | None | 0 0
  1. function blad = optymalizuj(X0)
  2.     global overshoot_model;
  3.     a = X0(1);
  4.     T = X0(2);
  5.     kompensator = tf([a*T, 1], [T 1]);
  6.     [licz, mian] = zp2tf([], [0, -1], 10);
  7.     obiekt = tf(licz, mian);
  8.     G_zamk = feedback(kompensator*obiekt, -1);
  9.     S = stepinfo(G_zamk);
  10.     overshoot = S.Overshoot;
  11.     blad = abs(overshoot - overshoot_model);
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement