Discretised PID Controllers
Part of a set of study notes on Digital
Before discussing the design of digital control algorithms, let us consider discrete equivalents of analog controllers.
This includes electronic controllers, which although discrete in nature, implements control by emulating the continuous nature of analog control strategies. A typical example is the electronic PI/PID algorithm. There are a number of ways by which this common and versatile controller can be implemented in discretised form.
PI/PID Controller Design from the Time domain
Consider the ideal PID controller written in the continuous time domain form:
To discretise the controller, we need to approximate the integral and the derivative terms to forms suitable for computation by a computer. From a purely numerical point of view, we can use:
The discretised PID algorithm is therefore:
which is now in the form of a difference equation, suitable for coding in an appropriate programming language. This particular form of the PID algorithm is known as the 'positional' PID controller, because the control signal is calculated with reference to a base level, uo.
PI/PID Controller Design from the Laplace Domain
We can also formulate discrete PID controllers directly from the Laplace domain. Here, the ideal PID algorithm is written as:
Now we can apply either the backward difference or bilinear transformation methods to get an equivalent discrete PID controller.
Say we apply the backward difference method. Then,
This PID controller is different in structure to that obtained from time-domain considerations and is known as the 'velocity' PID algorithm.
As opposed to the fixed control reference used in the positional algorithm, here, the calculation of current control uses the previous control value as reference. In essence, the control is calculated as a change, hence the term 'velocity form'. Application of the Bilinear Transform will yield a similar velocity form algorithm, due to the presence of the term in the approximation. Try it !
Positional and Velocity PID Algorithms
Although the structures of the positional and velocity PID algorithms appear very different, they are in fact related. The positional algorithm as derived is:
Time shifting back one sampling interval, we obtain
Subtracting this from the original, we end up with the velocity form, i.e.
Implementation and Performance of Discrete PID Controllers
Choice of Sampling Interval
Another important aspect in sampled data control systems is the choice of sampling intervals. With electronic controllers that emulate continuous time algorithms, this choice is simple: sample as fast as possible. This is because of the approximations that are used to generate the difference equations describing the controllers. Smaller sampling intervals mean that the properties of the underlying controller design will be less distorted, hence more predictable and better performances. A good example is the discretised PID controllers. They perform best when sampling intervals are small.
However, too fast a sampling is wasteful of resources.
If the sampling interval is too long, then signal loss will occur. An extreme case is the phenomenon known as 'aliasing'.
As illustrated in the figure below, the sampled representation of a step (dotted horizontal line) and a periodic wave are identical.
Many rules-of-thumb regarding the choice for sampling times for different types of loops have been published, including the following recommendations:
These are however, merely rough guidelines.
The sampling operation must return the key dynamic characteristics of the process. From experience, a sampling interval of approximately 10% of the dominant time constant works well in practise.
The position of the poles and zeros of the discrete transfer functions depend on the sampling interval used. Although this characteristic is not of great significance in PID type algorithms, it becomes important when discrete process models are used directly in the design of digital controllers. We shall cover this in more detail when we discuss model based digital controller design.
|© Copyright M.T. Tham (1996-1998)|
|Please email errors, comments or suggestions to email@example.com.|