2 - Expanding the polynomial to get the PID

Once you get the polynomial from Edit Compensator in Sisotool (see 1-Sisotool), you should expand it and get the values of each gain (proportional, derivative, integral).

The following lines will do the work for you.

%---------- EXPANDING THE POLYNOMIAL ----------%
z1 = 0.62628;
z2 = 0.8686;
c = 2.157;
polynomial = c*[1 (z1+z2) z1*z2];

%---------- GETTING kd, kc, ki ----------%
kd = polynomial(3);
kc = polynomial(2)-(2*kd);
ki = polynomial(1) - kd - kc;

You are now ready to simulate your PID using Simulink.

results matching ""

    No results matching ""