home
PDF

Determination of PID controller parameters from step response specifications

Nasser M. Abbasi

June 30, 2015 page compiled on June 30, 2015 at 7:13pm
This note describes how to design a PID controller for a system defined by second order differential equation based on requirements for a step response specified by the rise time and the settling time.

The goal is to determine the three PID parameters (Ki, Kd,Kp  ) from the plant transfer function and tr,ts  (rise time and settling time).

Consider the following mechanical system

PIC

M  is the mass of the car, b  is the damping coefficient and k  is the spring constant. To illustrate, assuming standard SI units:

pict

The first step is to derive the mathematical model for the system. This means finding a differential equation that relates the output (the displacment y(t)  ) to the input, which is the applied force u(t)  .The fFriction force between the mass M and the ground is ignored in this example.

The first step is to make a free body diagram

PIC

Applying Netwon laws gives

pict

or

pict

Taking Laplace transform and assuming zero initial conditions gives

   2
M s Y (s) + bsY (s) + kY (s) = U (s)

The transfer function is defined as the ratio of the output to the input in the Laplace domain. Here the input is u (t)  , which is the external force, and the output is y(t)  which is the displacement. Taking the Laplace transform of the above differential equation gives the transfer function

         Y-(s)   ------1-------
sys(s) = U (s) = M  s2 + bs + k

Using block diagram the transfer function is illustrated as

PIC

The PID controller is now added. The transfer function of the PID controller itself is

Kp + Kds  + Ki-
             s

The controller is added to the system and the loop is closed. The following diagram represents the updated system with the controller in place

PIC

Let L(s)  be the open loop transfer function

       Kp--+-Kds-+--Kis    Kps-+-Kds2--+-Ki-
L(s) =  M  s2 + bs + k =  M  s3 + bs2 + ks

Hence the closed loop transfer function is

        --L-(s)--   ---------Kps-+--Kds2-+-Ki----------
G (s) = 1 + L (s) = M s3 + bs2 + ks + K  s + K s2 + K
                                        p     d       i

Therefore

|---------------------------------------|
|        -----1M-(Kds2-+--Kps-+-Ki-)-----|
|G (s) =  3    2(b+Kd-)    (k+Kp-)   Ki |
|        s +  s   M    + s    M    + M  |
-----------------------------------------
(1)

PIC

The closed loop transfer function (1) shows there are three poles.

Putting one pole at a distance of 5ζ ωn  away from the imaginary axis, while the remaining two poles are the dominant poles results in the following diagram

PIC

The denominator of equation (1) can be rewritten as

pict

Equating coefficients gives

pict

Solving for PID parameters results in

pict

These are the PID parameters as a function of ωn  and ζ  .

ω
 n  and ζ  are determined in order to obtain the PID parameters.

The time response specifications are now introduced in order to determine these parameters. Assuming these are the time domain requirments

1.
The settling time ts = 2 sec
2.
The rise time t = 0.1 sec
r

Using the following for 2%  criterion

      4
ts = ----
     ζωn
(3)

And the rise time is given by

     π-−-β-
tr =  ω
        d

PIC

But            (   √ ----)
β =  arctan  ωn--1−ζ2
                ζωn , hence

               ( √ ---2)
     π − arctan  --1−ζ-
     ---------------ζ-----
tr =      ω  ∘ 1 − ζ2
           n
(4)

From (3) and (4) ωn,ζ  are solved for

pict

Solving numerically gives

PIC

Hence the solution is

ζ = 0.1176

and

ωn =  17 rad/sec

Substituting the values for ωn  and ζ  in (2), and the values given for M,  b  and k  , gives the PID parameters

pict

Using Matlab, the step response is found

PIC