I have a system that requires a PI controller designed using the Ziegler-Nichols Methods. I would also like to plot the unit step response in Matlab, but I am getting extremely weird results.

This is what the system looks like: $$G(s)=\frac{32}{(s+2)^4}$$

I plotted the curve in Matlab and printed the graph out to use the FOPDT approximant graphically. I know it is probably possible to do it using Matlab, but I come from a mathematics background and would rather use graphical methods.

Finding the quantities is trivial, and this is my result: $$F(s)=\frac{2}{2.519s+1}e^{-0.441s}$$ I put my graphical parameters and tuned it in Matlab. Could have done the approximation by inspection, this however should help for greater understanding. Anyway, these are the parameters: $$K_0=2$$ $$L=0.441$$ $$t=2.5188$$

Then using Ziegler-Nichol's table for tuning, I obtained the following PI controller: $$C(s)=5.1451\left(1+\frac{1}{1.4687s}\right)=\frac{7.557 s + 5.145}{1.469s}$$

I would now like to plot the closed loop step response, which should look like an unstable underdamped system that eventually stabilises. The system should oscillate drastically, such as:

enter image description here

This is what I get instead:

enter image description here

Which is totally wrong.

Here's the (relevant) matlab code:

%Unknown Transfer function



% step(Gr)

% Approximation Taylor

K0=2; %Numerator gain factor

L=.4406; %Exponent power gain factor

t=2.5188; %Denominator gain factor





Kp=.9*t/L; %gain

% Ki=Kp/Ti;

% Kd=Td*Kp;



%Closed Loop, Real



(Feel free to edit this messy code list into something more tolerable)

I think my code is wrong somehow, I just don't understand how that result make sense.

The code is basically creating the 2 blocks, and then plotting for closed loop via the feedback command, unity feedback configuration.

Any tips and help is appreciated. Thanks.

Edit: Nichols-Ziegler Table and information enter image description here

enter image description here

  • \$\begingroup\$ Why have you gone from a 4th order TF to a Pade approximant time delay model? \$\endgroup\$ – Chu Sep 14 '18 at 8:26
  • \$\begingroup\$ Hi, I am using a first-order-plus-dead-time approximation, which to me just looks like the Taylor approximant, not Pade Approximant. I've tried Pade out and it worked nicely. Essentially I want to see what happens if I attempt to model it with a first order system and comment on it. Hope this clears up some things. Thanks! \$\endgroup\$ – Hypergeometry Sep 14 '18 at 8:33
  • \$\begingroup\$ Left out the code for plotting, I added it in. \$\endgroup\$ – Hypergeometry Sep 14 '18 at 8:35
  • \$\begingroup\$ Post those Ziegler-Nichols tables, I had never heard of Ziegler method dealing with dead time. \$\endgroup\$ – Marko Buršič Sep 14 '18 at 9:39
  • \$\begingroup\$ @MarkoBuršič Sure, I have updated the post with the table I am using. \$\endgroup\$ – Hypergeometry Sep 14 '18 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.