What's a sensible method to control a process in order to minimise error and oscillation?
More information: Univ Of Michigan: Introduction to PID Design, Control_theory, Transfer_Functions, Bode Nyquist, Multivariable_Systems , FeedforwardControl (download)
PID Control
PID is a control mechanism with feedback loop that calculates an error based on the difference between a measured process variable and a desired setpoint.
We can easily identify the parts of a system by using an example: adjusting hot and cold water supply to fill a container with water at desired temperature.
PV --> Process variable = sensed temperature
SP --> Setpoint = desired temperature
CV --> Control variable = valve position
e --> Error = setpoint minus meas plant output
The Proportional component alone will maintain a steady state error because as the system approaches the set-point the error signal gets smaller and smaller. The control = Kp * error signal. Eventually the error will be small enough that Kp * error won't be enough to force it all the way to zero.
The Integral component eradicates steady state error by accumulating the error over time and therefore even the tiniest error will eventually accumulate to something large enough to force the controller to correct for it.
The Derivative component is usually employed to decrease Overshoot and Settling Time. It acts like a brake or damper to the control effort. P and I are trying to drive one way, and D is trying to counteract that. Derivative has its largest effect when the process is changing rapidly in one direction. The P and I terms are saying, 'Keep going.’ The derivative catches it and says, 'You’re going too fast. You need to slow down'.
The important results on which to evaluate the tuning are:
Rise time: usually any process cannot be too sluggish
Overshoot: some processes cannot overshoot at all, others can a small percentage
Settling time: usually any process aims to avoid oscillation (undershoot as well as overshoot)
Steady-state error: any process requires to achieve target rather than narrowly missing it
Broadly speaking, each term has the following effect:
Care notes on Derivative tuning
Derivative gives benefits primarily in processes that tend to overshoot and are very slow; hence in 90% of fast processes, only PI is used. Derivative is looking at fast, short-term changes in the process variable, so it often acts on noise. So the main drawback derivative action is excessive wear on equipment (valves for example). One solution is using a filter on the process variable to reduce noise. But this can introduce its own problems. The design needs to coordinate the amount of derivative action with the amount of filtering.
Tuning Methods
There are various tuning methods:
The Ziegler–Nichols tuning method is a heuristic (not optimal but practical) method of tuning a PID controller. It is performed by setting the I (integral) and D (derivative) gains to zero. The "P" (proportional) gain, is then increased (from zero) until it reaches the ultimate gain K_{u}, at which the output of the control loop has stable and consistent oscillations. K_{u} and the oscillation period T_{u} are used to set the P, I, and D gains depending on the type of controller used:
The Ziegler-Nichols tuning produces the traditional curve where the process variable oscillates briefly but settles onto the line with each cycle reducing amplitude by 75%. For applications that require the fastest possible response, it is a good method.
More information: PID Simple Tuning Methods
Notes on Proportional control
This is a proportional system with a plant G(s), gain K, input R(s) and output Y(s). The system has no disturbance modeled and has unit feedback, but using this we can show how the proportional controller (even in this simplified, ideal state) inherently produces an offset at the output.
Let's express our output Y(s) in terms of everything else.
Y(s) = G(s) * K * (X(s) - Y(s))
Doing a few manipulations, you can get this:
Y(s) = X(s) * [G(s)*K/(1+G(s)*K)]
What this means is Y(s) is always proportional to the input signal X(s) multiplied by the system G(s)*K/(1+G(s)*K), which means there is always a biased output (unless K or G(s) go to infinity).
The Forward path is represented by G, the Feedback path is represented by H.
output = transfer function * input
Model Predictive Control (MPC) aka Predictive Feedback Control: an alternative to PID
Model predictive controllers rely on dynamic models of the process, most often linear empirical models obtained by system identification. The main advantage of MPC is the fact that it allows the current timeslot to be optimized, while keeping future timeslots in account. This is achieved by optimizing a finite time-horizon, but only implementing the current timeslot and then optimizing again, repeatedly, thus differing from LQR. Also MPC has the ability to anticipate future events and can take control actions accordingly. PID controllers do not have this predictive ability.
Click on image to download academic paper
Further presentations: MPC - ETH Zurich , MPC - Trento University
Simple Controller Examples
There are various examples of control systems in industry. Here below are some interesting ones:
A very early form of control system was the Watt Centrifugal "Flyball" Governor, whereby as the speed increased and the masses moved outwards, this would then regulate a linkage to a throttle valve on the steam, to keep the speed within control.
America's Cup Hydrofoils
Rising above the water’s surface not only reduces drag, but might help to reduce structural risks and make handling at speed easier. Traditionally, for trimarands tripping up at speed and keeping the boat in one piece when it touches back down have been the main concerns.
When designing a system, one needs to be careful with the trade-offs: tilting a foil at a large angle of attack may create lift, but there will often be a large amount of drag too. To generate sufficient lift to raise an entire boat can mean introducing a lot of drag. Just because you’re flying doesn’t mean you’re suddenly more efficient or faster.