In Chapter 1 to Chapter 4, we discussed PID control systems with explicit functions of proportional control, integral control, and derivative control. Because integral control embeds a marginally stable mode in the controller structure, which could cause the problem of integrator windup when the control signal reaches its saturation limits, the PID control system implementation requires modification to overcome this problem. Similar implementation problems to a worse degree are faced by the resonant controllers.
This chapter examines the PID controller design and resonant controller design from a different angle to the previous chapters. It introduces the integral mode and resonant modes through disturbance estimation. By doing so, the design becomes simpler, and more importantly, the implementations of the PID and resonant controllers flow naturally from the designs with anti-windup mechanisms. This development is particularly significant for resonant controllers because simplicity in the implementation with anti-windup mechanisms is paramount for practical applications.
This section introduces the idea of disturbance estimation that leads to an equivalent PI control system. The mathematical model used in this section is a first order model. For systems with higher order transfer functions, approximation is required.
We assume that there is a constant input disturbance , which is unknown. So the differential equation used to describe a first order system is given by
where and
are model coefficients, and
and
are the input and output variables. Figure 5.1 illustrates the mathematical model to be used for the estimator based PI controller design.
Because of the assumption that is a constant, we have
Figure 5.1 Block diagram of the system for a disturbance observer-based PI controller.
We would like to specify two desired closed-loop poles and
where
. In the proposed design, the choice of
influences predominantly the proportional gain
and
predominantly the integral gain
.
The choice of is straightforward. Firstly, we define:
Then (5.1) becomes
Together with proportional control
we obtain the closed-loop system:
Equating the actual closed-loop pole to the desired closed-loop pole
, we find the proportional gain
as
We know that proportional control will lead to a closed-loop system with steady-state error for a constant reference signal or a disturbance signal. For overcoming the steady-state error, we need integral action incorporated into the control system. Here, we will estimate the steady-state error and then compensate it in the control signal. For this purpose, we extract the disturbance information from (5.1) leading to
One might attempt to directly calculate the unknown disturbance using (5.7) and compensate for it in the control signal. However, it can be easily verified that such an approach fails to produce the control signal required because of uncertainties in the model parameters and other imperfections in practical applications. We will estimate the disturbance signal
with compensation on the error.
Let denote the estimated disturbance signal. The error, between what is given and what is to be estimated, is described by,
With the gain weighted on the error
, together with the assumption
, we construct the estimation
as
This is the so-called observer-equation. We will choose the gain such that the error
converges to zero.
Note that
then, the parameter is chosen such that
. This then leads to
Hence,
For any given initial condition and
, the estimation error
as
. The convergence rate is dependent on the parameter
. The larger
is, the faster the error will converge to zero.
Now, to calculate the control signal with compensation on the steady-state error, the unknown disturbance in (5.3) is replaced by the estimated
from (5.9), leading to the control signal calculated as
To verify indeed that the closed-loop poles for the control system are and
, substituting (5.12) into (5.1) gives
where . Together with (5.11), the closed-loop system equation is written as
Because is an upper triangular matrix, the closed-loop poles (or eigenvalues) are simply calculated as the solution of the characteristic equation:
where is the identity matrix with dimensions
, equal to
and
.
Because the estimation equation 5.9 contains the derivative of the output signal , direct discretization requires information of
at sampling time
, which is not available to us.
Let us define a variable as
Then, substituting this variable into the estimation equation 5.9 yields
If the reference signal , then both (5.15) and (5.16) are modified by replacing
with
. Furthermore, if the control signal
reaches its saturation limit, this saturation information is updated in the estimation of the disturbance
via (5.16). Figure 5.2 illustrates the block diagram of the control system using disturbance observer. For discretizaton, at sampling time
, the derivative
is approximated using the first order approximation as
Then, it follows that
The calculation procedure for control signal is summarized as follows. Choose initial condition for at the beginning of the closed-loop operation. This could be selected to be zero if no other information is available. With the reference signal
and output signal
available at sampling time
, the control signal
is calculated recursively. The control signal is limited between
and
.
Figure 5.2 Block diagram of the control system using a disturbance observer.
In order to calculate the equivalent PI controller, the Laplace transform of is expressed as
where , and the Laplace transform
is
The Laplace transform of the control signal becomes
which is
Thus, the equivalent PI controller is revealed as
The PI controller parameters are
where and
. We can verify that the closed-loop poles are at
and
, which was the design specification.
Figure 5.3 Transfer function realization of the estimator based PI controller and is the saturation limiter.
Defining the coefficients and
and the saturation limiter
, Figure 5.3 shows the transfer function realization of the PI controller with anti-windup mechanism, which calculates the control signal
based on the reference signal
and the output signal
.
The embedded PI controller via estimation will be used in the simulation studies with the Simulink environment.
It is apparent that much larger control amplitude is required when is used for the estimator based PI controller design. In practice, this much larger control amplitude may not be realizable due to the physical limitations of the actuators. An interesting question arises as how the closed-loop response speed will change if the control signal amplitude is limited. The following example illustrates the comparative studies.
Figure 5.5 Comparison of closed-loop control performance using an estimator based PI controller with different values (Example 5.2). (a) Control signal. (b) Output. Key: line (1)
; line (2)
; and line (3) the limits of the control signal.
Figure 5.6 Comparison of closed-loop control performance between the PI controller in velocity form and the disturbance observer-based PI controller (Example 5.3). (a) Control signal. (b) Output. Key: line (1) the PI controller in velocity form; line (2) the disturbance observer-based PI controller.
The above two examples indicate that with the estimator based PI control system, the closed-loop performance limitation is limited by the model uncertainties due to unmodeled dynamics in the system. The performance limitation is reflected by the value of . The control signal limits can be incorporated into the implementation of the control system with a naturally occurred anti-windup mechanism.
From Section 5.2.2 it is clear that there is an equivalent PI controller with parameters and
to this estimation based PI controller. The implementation of a PI controller using the velocity form was discussed with anti-windup mechanisms in Section 4.6. Naturally we wonder if these two implementations would lead to different outcomes. The following example compares the outcomes of these two PI controller with anti-windup mechanisms.
To design a PID controller using the estimation based approach, we consider a second order transfer function:
where and
are the Laplace transforms of the input and output signals. We assume that
. By assuming zero initial conditions, the corresponding differential equation is expressed as
In matrix form, it is expressed as
We will first design a proportional plus derivative controller. For this purpose, the feedback control signal is
Substituting (5.25) into (5.24) leads to the closed-loop equation:
The closed-loop characteristic polynomial is then calculated as
This is clearly a second order polynomial. We can specify a damping coefficient and choose the parameter
as the closed-loop performance parameter. Alternatively, we could also choose two desired closed-loop poles as
and
where
and
. In any case, to determine the proportional and the derivative controller gain, the actual closed-loop characteristic polynomial is made equal to the desired one, leading to
The solution of this polynomial equation gives the proportional control gain:
and the derivative control gain:
Since it is necessary to use a filter for the derivative action because of measurement noise, a quick way to calculate a first order filter time constant is to find the corresponding gain , which is
based on (5.25). With this parameter, the derivative filter constant is
where is often selected. The filtered derivative output signal is expressed as
For many applications, it is preferable to design the PD controller together with derivative filter to avoid the extra errors introduced from the approximation. A PD controller with filter design is discussed in detail in Section 3.4.1 with the filter constant calculated through the desired closed-loop performance specification.
To add integral action to the PD controller, we assume that there is a constant input disturbance so we have
. The differential equation model (5.24) is modified to become:
Similar to the PI controller design via estimation, we will write the unknown disturbance term as
Together with the assumption that , the estimation of
is constructed as
We choose and determine the estimator's gain
using
Because Equation 5.31 has double derivative and derivative of output signal , it is not suitable for computational purposes. To this end, we define a new variable
and rewrite Equation 5.31 as function of :
Assuming that the reference signal is at the sampling time
and the output signal and its derivative are measured as
,
, with the sampling interval
, with saturation limits
and
, the control signal is calculated using the following steps.
Note that in the implementation of the PID controller, the derivative control is on the output only, avoiding producing a spike on the control signal when the reference signal signal makes a step change. When a filter is used for the derivative signal
, the signal
is replaced by
, which is illustrated in Tutorial 5.2.
To find the equivalence of the proposed estimation based PID controller to the PID controller expressed in transfer function form, we examine the Laplace transform of the estimation equation 5.31, which is,
where . Solving for
gives
Note that the Laplace transform of the control signal is expressed as
By substituting (5.34) into (5.35), the Laplace transform of the control signal is found as
With the negative feedback, the equivalent controller transfer function is obtained as
Now, it can be verified that the closed-loop polynomial is indeed
where and
are the numerator and denominator of the transfer function model as given by (5.23). Additionally, it can be verified that the controller transfer function can be written in an equivalent form to a PID controller:
where the parameters ,
, and
are calculated as
Figure 5.7 shows the transfer function realization of the disturbance observer-based PID controller where is the saturation limiter.
There are several comments related. Firstly, the relationship presented in (5.38) shows that there are three desired closed-loop poles for the PID controller designed. The pair of complex poles located at with
or 1 is used to determine the parameters
and
, and the pole located at
is used to determine the parameter
. Secondly, the PID controller can be implemented using the estimation of the input disturbance, providing a stable implementation for the integrator. Thirdly, the controller transfer function shown in (5.39) can readily be used for frequency response analysis so that the gain margin, phase margin, and delay margin can be calculated for the controller designed.
Figure 5.7 Transfer function realization of the disturbance observer-based PID controller.
This section presents the MATLAB tutorial for the implementation of disturbance observer-based PID controller. This implementation will contain the anti-windup mechanism when the control signal reaches its maximum or minimum values. The embedded PID controller via estimation will be used in the simulation studies within the Simulink environment.
This section will investigate resonant controller design and implementation with anti-windup mechanism using the disturbance estimation approach.
Assume that a dynamic system is described by the differential equation:
where and
are the coefficients;
and
are the input and output signals;
is the input disturbance signal. In particular, we assume that
is a sinusoidal signal with known frequency
, but unknown amplitude
and phase angle
, which is expressed as
The resonant control law is expressed as
where is an estimate of the unknown disturbance
.
By choosing the desired closed-loop pole at and
, the proportional feedback control gain
is calculated as
Now, the next question is how to compute the estimated input sinusoidal disturbance signal . The derivative of this disturbance signal is
and its second derivative is
Now, we choose and
. With these choices, the following differential equations are used to describe the sinusoidal disturbance signal:
In order to estimate the disturbance signal , from (5.44), we obtain
which is the output equation for the estimation. Thus, the estimated variables and
are constructed as
where and
are the estimator gains chosen for the design.
The next question is how to choose and
such that the errors between the estimated and true disturbance signals are ensured to converge to zero as
. For this purpose, we define
and
. It can be verified as an exercise that we have the following error system:
where we have used the following relationship:
Clearly, we can choose the parameters and
such that the poles (or eigenvalues) of the error system are on the left half of the complex plane, which ensures its stability. The characteristic polynomial for the error system is calculated as
Now, we choose a desired characteristic polynomial for performance specification as . Then, to make the characteristic polynomial for the error system equal to the desired characteristic polynomial, the coefficients
and
are found as,
In the applications, the damping parameter is chosen to be 0.707 and the parameter
is adjusted for how fast we would like to see the errors converge to zero.
The calculation of the estimated input disturbance using (5.46) requires the derivative of the output signal , which is not desirable in the implementation. To overcome the problem, we define a pair of new variables:
Then, from (5.46), the following two equations are obtained:
The control law presented above is a combination of proportional feedback and a disturbance observer. This section will present how this control law can be implemented in a discrete time environment with anti-windup mechanism.
The derivatives in the observer equations 5.49 and (5.50) are first discretized with a sampling interval leading to their approximations at the sampling time
:
The following algorithm summarizes the computational procedure for the implementation of the resonant controller with anti-windup mechanism.
Assume that the control signal is limited to
and
, that is
Choosing the initial conditions for and
, the control signal is calculated iteratively according to the following steps, where
is the reference signal at sampling time
.
To find the Laplace transfer function of the resonant controller designed using disturbance estimation, we note that the Laplace transform of the control signal has the following expression:
where is the Laplace transform of the estimated sinusoidal disturbance. It can be verified that the Laplace transform of (5.46) gives
Calculating the matrix inversion and multiplication gives
To find the Laplace transform of the control signal, we will substitute (5.53) into (5.51) and move the term containing from the left-hand side to the right-hand side of the equation, which gives the expression of the control signal
where and
.
From (5.54), we find the Laplace transfer function of the resonant controller as
This controller has a pair of complex poles at .
Figure 5.9 Transfer function realization of a resonant controller with saturation limits.
To verify if the closed-loop poles are indeed at the locations of and
(
or 0.707), we calculate the closed-loop characteristic polynomial as
where ,
, and
. The closed-loop characteristic polynomial (5.56) leads to the conclusion that the closed-loop poles are at the locations as we specified.
Figure 5.9 shows the transfer function realization of the resonant controller with anti-windup mechanism.
This section presents the MATLAB tutorial for implementation of the disturbance observer-based resonant controller together with the anti-windup mechanism when the control signal reaches its maximum or minimum values. The embedded resonant controller via estimation will be used in the simulation studies within the Simulink environment.
The following example is to illustrate the disturbance observer-based resonant controller design.
It is clear that these two approaches in selecting the parameters and
produced quite different controller parameters although the responses to the reference signal are similar. The question arises as how these two resonant controllers will behave in the presence of periodic disturbances. Clearly, if the disturbance has exactly the same frequency
, then both resonant controllers will achieve the same disturbance rejection at the steady-state operation from the sensitivity analysis in Section 2.5. However, when the actual disturbance frequency is different from
, there is a difference in the control system performance. The next example will compare the closed-loop performance of the two resonant controllers for the purpose of disturbance rejection.
The next example is to illustrate the effectiveness of the anti-windup mechanism contained in the resonant controller.
In many applications, the resonant controller containing a single frequency introduced in Section 5.4 may not be adequate to track the reference signal or reject the disturbance signal that contains multiple frequencies. The framework we used in the single frequency case can be extended to multiple frequencies.
We consider the following first order differential equation as in Section 5.4
where and
are the coefficients;
and
are the input and output signals;
is the input disturbance signal. Different from the resonant controller design, we assume that
is a combination of a sinusoidal signal with a constant. For this purpose,
is expressed as
where and
is an unknown constant. The feedback control law is determined as
where is an estimate of the unknown disturbance
.
With the desired closed-loop pole specified at and
, the proportional feedback control gain
is given as
Now, we will extend the estimation algorithm presented in Section 5.4 to include the estimation of an unknown constant. Let us choose and
and
. Note that
as
is a constant. The following differential equations will be used to describe the unknown disturbance
with the additional state
:
In order to estimate the disturbance signal , from (5.58), we obtain
which is the output equation for the estimation. Thus, the estimated variables ,
,
are expressed as
where ,
and
are the estimator gains chosen for the design.
As in Section 5.4, we will choose the parameters ,
and
such that the poles of the error system are on the left half of the complex plane to ensure the convergence of the estimation errors. Here, the characteristic polynomial for the error system is computed as
where ,
for simplicity in the computation.
There is an analytical expression for the determinant given by (5.61), which leads to analytical solutions for the parameters ,
, and
. We firstly partition the
matrix into a block matrix as
where
With this partition, the determinant of the block matrix becomes
Note that is exactly the same as the determinant described in the estimation of the sinusoidal signal in Section 5.4, which is
and the second determinant is
The characteristic polynomial for the closed-loop error system becomes
With the choice of desired characteristic polynomial for the performance specification that consists of a pair of complex poles and a real pole having the following form: , we find the the coefficients
,
, and
as
The actual gains used in the estimation are then scaled to yield: for
.
Defining ,
, and
, it can be verified that the implementation equation for the estimated disturbance becomes
where is the system matrix defined as
has eigenvalues as the solutions of the characteristic equation:
Hence, the implementation of the estimator using (5.64) is a stable realization.
From the estimated and
, we obtain
and .
If the system's disturbance or reference signal has more than one pair of periodic components, the disturbance estimator needs to be designed so to include those components.
We assume that the system is described by the differential equation 5.58. As before, is the input disturbance signal and it is a combination of sinusoidal signals with a constant. For this purpose,
is expressed as
where ,
(
) and
is an unknown constant.
Continuing from the design in Section 5.5.1, we choose ,
,
,
, and
. With the two additional states, the following differential equation is used to describe the input disturbance
:
To estimate the disturbance signal from the dynamic system (5.58), the disturbance term is written as
The estimated variables ,
,
,
, and
are written as
where ,
,
,
, and
are the estimator gains chosen for the design.
To find the estimator gains, we will consider the pair of matrices, and
. Because of their higher dimensions, it is no longer easy to work out the analytical solutions of the estimator gains. Instead, we can use MATLAB programs for finding the estimator's gain matrix. For this purpose, we define the
and
matrices as illustrated in (5.66), and we choose five desired closed-loop poles for the error system to ensure the convergence of the estimated variables. The MATLAB program place.m is used to compute the
,
, illustrated as below:
Gamma=place(A',C',P)'
where contains the five desired closed-loop poles for the error system and gamma is the vector that contains
,
.
We have discussed the PID and resonant controller design from the angle of disturbance estimation. Using the disturbance observer-based approaches, the integral control or the resonant control is introduced through the estimation of an input disturbance with the assumption that the disturbance is a constant for the integral mode or the disturbance is a sinusoidal signal for the resonant mode. The advantages of the proposed approaches include the simplified design for the controller, and perhaps even more importantly a stable controller structure suitable for direct implementation with an anti-windup mechanism in the event of control signal saturation. The other important aspects of the chapter are summarized as follows.
For systems that have higher order dynamics, to use the design approaches proposed in this chapter, model order reduction is required.
that is equivalent to the disturbance observer-based PID controller.
which is, in essence, the inversion of the plant model together with a first order stable filter with unity steady-state gain for implementation, which is the essential component for disturbance observer-based approach (Li et al. (2014)).
which is the inversion of the plant model with first order filter that has a unity steady-state gain.
where ,
and
have the same sign, meaning a stable zero.
is satisfied. If not, reduce the parameter until it is satisfied.
Design a resonant controller that will follow a reference signal , and reject an input disturbance
, where all desired closed-loop poles for both the controller and the estimator are positioned at
.
The dynamic model for a single phase Voltage Source Inverter (VSI) coupled to a back electromotive force with an inductive-resistive filter network is expressed as
where is the output current from the inverter,
is the input variable that is the pulse width modulated (PWM) switched voltage from the VSI, and
is the back EMF voltage that is naturally a sinusoid with a nominal frequency
. The parameter
is the resistance and
is the inductance, associated with the inductive-resistive filter network.
The control signal equals to the multiplication of a modulation signal
with the inverter DC link voltage
:
In the mathematical model of a single phase Voltage Source Inverter as in McNabb et al. (2017), the physical parameters are ,
,
. The back EMF voltage is described by
and
(
).