From: Arkadiy Turevskiy on
Using POD controller for this plant does not make sense - it has a zero at the origin, which will cancel the integrator pole and will prevent you from getting zero stead-state error. Therefore, applying Zigler-Nichols here does not make sense. What you need to do is use PID plus an integrator. Then effectively, you are getting rid of this zero at the origin, and PID tuning results start to make sense, as you indicated.

So there is no error in your MATLAB code.
HTH.
Arkadiy

"Susan " <susanreneemueller(a)gmail.com> wrote in message <hph3qg$ol9$1(a)fred.mathworks.com>...
> Please if anyone has any ideas it would help. I'm really stuck on this.
>
> The closed loop of Plant with no "S" in the numerator (PID control in feedforward and unity feedback):
> 1.4 s^2 + 98.97 s + 4.371
> ------------------------------------------------------
> 0.005597 s^4 + 4.416 s^3 + 3.759 s^2 + 101.2 s + 4.371
>
> The closed loop of Plant with "S" in the numerator (PID control in feedforward and unity feedback):
>
> 1.4 s^3 + 98.97 s^2 + 4.371 s
> ---------------------------------------------
> 0.005597 s^4 + 5.816 s^3 + 101.3 s^2 + 6.58 s
From: Susan on
Thank you this makes sense. I added an integrator to my root locus and I see that it cancels out the zero. Thank you. So is the following line of code the correct way to specify PID control?

Control_Kp_Ki_Kd=tf([Kd Kp Ki],[1 0]);

Is this correct for Ki
Control_Ki=tf([Ki],[1 0]);
From: Arkadiy Turevskiy on
Sure. You can also do this:

>>s=tf('s'); % define s
>> P=1/(0.005597*s^3 + 4.416*s^2 + 2.359*s + 2.209); % specify plant

If you have R2009b or R2010a you can use our new PID tuning method, called Robust response time:
>>sisotool(P);

then select Automated Tuning tab -> PID Tuning -> Robust response time.
Use sliders for bandwidth and phase margin to design as needed. Once design, export compensator to workspace. I did this and got the following design:

>> tf(C)

Transfer function from input "Input" to output "Output":
218.3 s^2 + 2317 s + 1899
-------------------------
s

If you needed to recreate it from command line you could do it like this:
>> C=218.3*s+2317+1899/s

Transfer function:
218.3 s^2 + 2317 s + 1899
-------------------------
s

Now:
>>cl=feedback(K*P,1); % form closed loop
>>ltiview(cl); % open ltiview to check design - look at step, bode, etc.

Arkadiy


"Susan " <susanreneemueller(a)gmail.com> wrote in message <hpij1q$ce3$1(a)fred.mathworks.com>...
> Thank you this makes sense. I added an integrator to my root locus and I see that it cancels out the zero. Thank you. So is the following line of code the correct way to specify PID control?
>
> Control_Kp_Ki_Kd=tf([Kd Kp Ki],[1 0]);
>
> Is this correct for Ki
> Control_Ki=tf([Ki],[1 0]);
From: Susan on
I added an additional integrator and my Kd behaves like it should, but Kp does not. increasing Kp damps the system more. I'm using a PID&I controller with a step input. Does anyone know why this is and how to fix it?