0% found this document useful (0 votes)
55 views

Proportional-Integral-Derivative (PID) Control Method. This Type of Controller Is

This document discusses PID (proportional-integral-derivative) control, which is a widely used feedback controller. It examines the limitations of proportional-only control and how PID control improves the system by adding integral and derivative terms. PID controllers combine proportional, integral, and derivative control to provide improved stability and minimize steady-state error. The document covers implementing PID control on digital hardware and tuning PID controllers using methods like Ziegler-Nichols tuning.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Proportional-Integral-Derivative (PID) Control Method. This Type of Controller Is

This document discusses PID (proportional-integral-derivative) control, which is a widely used feedback controller. It examines the limitations of proportional-only control and how PID control improves the system by adding integral and derivative terms. PID controllers combine proportional, integral, and derivative control to provide improved stability and minimize steady-state error. The document covers implementing PID control on digital hardware and tuning PID controllers using methods like Ziegler-Nichols tuning.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

In the last lecture, we studied in some details, how proportional feedback control

In this lecture, we will examine a very popular feedback controller known as the works. The controller for such a feedback scheme uses a proportional gain element
proportional-integral-derivative (PID) control method. This type of controller is Kp to amplify the error signal e(t) and produces a drive signal w(t) as input to the
widely used in industry, does not require accurate model of the plant or process plant. This type of simple control system is found in many situations such as
being controlled and can be understood by most engineers without being a control operational amplifiers you used in the first year, or a simple temperature controller
expert. you may find at home.

However, proportional-only (P) controller has a number of limitations. In order to


produce the output y(t) to match that of the set-point (desired value) r(t) with
minimal error e(t), the gain Kp needs to be high. However having a large Kp can
make the system unstable, especially if the plant (or processor) is 2nd order or
higher.

Even if the system is not unstable and eventually settle down to the steady-state
value, the system output may exhibition large overshoot transient behaviour, similar
to what you saw with the Bulb Box system when it is driven by a step signal. Since
such a system is prone to oscillation, it may also take a long timer before it reaches
the final steady-state condition.

Finally, using P-only control may not give us the tolerance to perturbation required.

These limitations are summarised in the slide above.


The first improvement we can make is to add a derivative term to the controller. Another common improvement to the P-only control is the proportional-integral (PI)
The output of the controller is now proportional to the error e(t) (with a gain of control. Here we add another term that is dependent on the integral of the error over
Kp) and to the derivative of the error, i.e. "($)
̇ (with a gain of Kd). This is known time. The time domain description of the controller is:
as a proportional-derivative controller or PD control.
' $ = )* " $ + )> ? " @ A@
The time domain relationship of the controller is:
Again in practical electronics and programming, we implement the integral term as a
' $ = )* " $ + ), "($) ̇
summation. Integration in calculus is the same as accumulation of area under the
Remember that the Laplace Transform of (d/dt) is s. Therefore the transfer curve. Therefore in discrete domain, we simply sum the error from t = 0:
G
function (in s-domain) of the controller is:
integral term at time n = )> Δ$ C "[: − I]
-. / = )* + ), / DEF
As before, Δ$ is often “absorbed” into the Ki term.
Remember that the Laplace transform of an integral is 1/s. Therefore the s-domain
How can one implement the derivative term on digital hardware (such as a 1
representation of the PI controller (i.e. the transfer function) is:
Pyboard or a Raspberry Pi)? The derivative term is implemented as the difference -. / = )* + )>
between two successive samples: /
PI controller accumulates error to produce a constant output u(t) that is sufficient to
differential term at time n = ), (" : − " : − 1 )/Δ$ drive the plant to give the desired output value y(t). When that happens, e(t) = 0, and
yet the output y(t) = r(t) is maintained. It can be seen that this cannot be achieved with
Note that the term 1/Δ$ is often “absorbed” into the derivative gain Kd. P-only controller. For example, in order to drive a DC motor at a certain speed, we
need the input PWM duty cycle to be w(t) = pwm_value. With proportional gain we
What does the derivative term do to the behaviour of the system? The derivative need an error e(t) = pwm_value/Kp. Unless Kp is infinite, e(t) is NOT 0.
term acts as “brake” to the system. As the error is reducing (rate of error is However, with PI controller, the integral term will accumulate to pwm_value and now
negative), it reduces the drive to the plant (i.e. braking), and therefore prevents e(t) = 0 and w(t) will stay constant.
overshoot. A PI controller will work with the P term gain Kp = 0 (i.e. I-only control), but its response
to a step input would be slower. The integral action will take time to reach the desired
The derivative term can also make the system more tolerant to external value. However, PD controller WILL NOT work with D-only!
disturbances.
Finally, we can combine all three terms (P, I and D) together to make a PID In practical implementations, we can compute the three terms separately and then
controller. This has all the benefits of proportional control, integral control and add them together as shown in the block diagram here.
derivative control. Not that PID control is a generalised version of all the other form
with the appropriate gains set to some constant or 0.

The time domain formulation of a PID controller is:


K $ = )* " $ + )> ? " @ A@ + ), "($)
̇
Here is a nice video explaining the idea of PID control without mathematics. The PID control structure is therefore very general. Designing a controller for a given
example used is that of driving a car by stepping on the accelerator pedal. The plant or process requires us to determine the correct value for Kp, Ki and Kd. This
control variable is speed of the car. The actuation variable w(t) is the rate of change process is known as “tuning”.
of angle of the pedal.
Before we consider how to tune a PID controller, you should know the effect of each
You can watch this video via this link: of increasing Kp, Ki and Kd on the feedback system behaviour in terms of overshoot,
settling time and steady-state error (i.e. e(t) value after the system settle to final
https://www.youtube.com/watch?v=XfAt6hNV8XM condition).

This is shown in the table above.

We will next consider two common approaches to tuning a PID controller.


The first method was introduced by J. G. Ziegler & N. B. Nichols back in 1942. A good alternative to the Z-N tuning method is one described here. This does not
The steps are explained in the slide above. involved measuring the oscillation period, or just setting gain values based on
measured parameters.
Note that the Z-N tuning method may not provide you with the optimum
performance or best disturbance tolerance. It however does provide a guide on Instead it uses a trial-and-error approach: in turn pushing Kp, then Kd and Ki to the
how to set the different gain values for a reasonably good control system. limit until the system becomes unstable, and dial each back to half way or smaller.

Also, in this formulation, the gain terms are all expressed in terms of Ku (Kp is
factorised to outside the brackets), and the oscillation period Tu (Ti and Td are
specified in terms of Tu).
Finally, let me relate what you have learned in feedback control to the team project.
The task at hand is to balance the Segway so that it can stand upright without falling
over. The system (the plant) is inherently unstable (i.e. will NOT balance on its own).
Feedback control is necessary for the Segway to self balance.

The variable under control is NOT speed of the Segway, but its pitch angle. To do
that, we will use a PID controller.

The pitch angle is measured and is compared to the set-point, which is zero if the
Segway is upright. This error is multiplied by Kp and used as part of the PWM value
to drive the motors in the direction that corrects the error.

The derivative control is NOT achieved by differentiating the error e(t). Instead we
will use the gyroscope reading for y-axis, which measures the rate of change of the
pitch angle (i.e. L).
̇ We multiple L̇ with Kd to get the derivative term. Finally we
integrate the value p and multiply this with Ki to get the integral term. Now we add
these together to provide the drive to the motors. Remember that we need to limit
this value to +/- 100 (duty cycle cannot exceed 100, and +/- indicates direction of
motor).
To move the Segway forward or backward, all you need is to change the set-point
(target pitch angle). This is actually how it works on a real Segway.

Finally turning can be achieved by changing the ratio of the PWM values driving the
left and the right motor. Having the two wheels at different speed will make the
Segway turn.

You might also like