June 30, 2015 Compiled on January 31, 2024 at 2:32am
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 () from the plant transfer function and
(rise time and settling time).
Consider the following mechanical system
is the mass of the car, is the damping coefficient and is the spring constant. To illustrate,
assuming standard SI units:
The first step is to derive the mathematical model for the system. This means finding a
differential equation that relates the output (the displacment ) to the input, which is the
applied force .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
Applying Netwon laws gives
or Taking Laplace transform and assuming zero initial conditions gives The transfer
function is defined as the ratio of the output to the input in the Laplace domain. Here the
input is , which is the external force, and the output is which is the displacement. Taking
the Laplace transform of the above differential equation gives the transfer function Using
block diagram the transfer function is illustrated as
The PID controller is now added. The transfer function of the PID controller itself is The
controller is added to the system and the loop is closed. The following diagram represents
the updated system with the controller in place
Let be the open loop transfer function Hence the closed loop transfer function is Therefore
The closed loop transfer function (1) shows there are three poles.
Putting one pole at a distance of away from the imaginary axis, while the remaining two
poles are the dominant poles results in the following diagram
The denominator of equation (1) can be rewritten as
Equating coefficients gives
Solving for PID parameters results in
These are the PID parameters as a function of and .
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
The settling time
The rise time
Using the following for criterion
And the rise time is given by
But , hence From (3) and (4) are solved for
Solving numerically gives
Hence the solution is and Substituting the values for and in (2), and the values given for
and , gives the PID parameters