works - if (Pm > 40 &&...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Kp0 = 1; Kd0 = 1; Ki0 = 1; dk = 5; Kmax = 1000; a = 1; a Kp = Kp0; K while (Kp < Kmax) Kd = Kd0; while (Kd < Kmax) Ki = Ki0; while (Ki < Kmax) [pid, Pm, Wp, y, theta] = main_3 (Kp, Kd, Ki); p = max(real(pole(theta)));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if (Pm &gt; 40 &amp;&amp; abs(max(y)) &lt; 0.25 &amp;&amp; p &lt; -1e-5) work(a, :) = pid; a = a + 1; end Ki = dk + Ki; end Kd = Kd * dk; end Kp = Kp * dk; end e...
View Full Document

Ask a homework question - tutors are online