In this control engineering tutorial, we explain the zero placement approach for designing two degrees of freedom Proportional Integral Derivative (PID) controllers.
Two degrees of freedom PID controllers give us more freedom and possibilities when designing PID controllers. They can be used to improve the tracking performance while at the same time ensuring good disturbance rejection performance. The zero placement approach is an elegant method for tuning the two degrees of freedom PID controllers. We explain this approach by using the control structure given below.
We have two controllers
Roughly speaking, since we have two controllers, we have two degrees of freedom when designing controllers. The classical PID control loop is obtained by erasing the controller
Here is the problem we want to address:
Control Design Problem: For the plant model given by
(1)
Design the controllers
a) The overshoot of tracking step reference signal
b) The steady-state error of tracking step, ramp, and quadratic (acceleration) reference signals is zero.
c) The settling time of the system is smaller than
d) The designed controllers are able to completely reject the step disturbance signals
Solution by using the zero-placement approach:
STEP 1: Derive the output-disturbance and output-reference transfer signals. From the block diagram in Fig. 1., we have
(2)
Let us define
(3)
By using the last definition, we can define the following transfer functions
(4)
Consequently, we can write (2) as follows
(5)
Here, it is important to emphasize that our goal is to select the controllers
STEP 2: Select the intermediate controller structure
(6)
where
(7)
Let us for a moment assume that
(8)
Let us assume that the coefficients
(9)
where we assumed that all the zeros of
Consequently, an integrator component (1/s) in the controller
STEP 3: Use the zero placement approach to design the output-reference signal transfer function and the controller
First, it is important to observe that the terms in the denominator of the output-disturbance transfer function
On the other hand, notice that in the numerator of the transfer function
To explain the main idea od the zero placement approach, let us consider the following transfer function
(10)
Let us assume that this system is stable. Our goal is to design the polynomial in the numerator
(11)
Let us select the polynomial
(12)
Then, the error becomes
(13)
Now, let us show that this approach will produce zero tracking errors for step, ramp, and quadratic reference signals in the time domain.
- Step input:
and(14)
- Ramp input
and(15)
- Quadratic input (acceleration input)
and(16)
Let us now apply this approach to our problem. We will combine the zero placement approach with the pole placement approach. That is, we will parameterize the transfer function.
The denominator of the transfer function
(17)
We can observe that the polynomial in the denominator of
(18)
where
The desired characteristic polynomial has the following form
(19)
This polynomial can be expressed as follows
(20)
From the structure of the last polynomial, we conclude that the transfer function can be parametrized as follows
(21)
where we used the zero placement method in order to ensure that the last three terms of the numerator are equal to the last three terms of the denominator.
We will use a simple grid search in MATLAB to search for the parameters
To find these regions, we need to recall the formulas that relate the maximal overshoot and sampling time with the damping ratio and natural undamped frequency. These formulas are
(22)
(23)
where
From (22), we have
(24)
On the other hand, from (23), we have
(25)
The specification is that the overshoot is less than 25 percent. This corresponds to
(26)
However, we need to specify a lower bound on the overshoot in order to avoid slow transient responses. We choose a minimum value of overshoot of
(27)
Substituting these values in (24), we obtain the following values of
(28)
That is, the damping ratio that ensures the desired overshoot, should be in the interval
(29)
Consequently, by taking into account that
(30)
On the other hand, for the computed bounds on
(31)
The equations (30) and (31) define a disc segment in the complex plane. By using this formula
(32)
we can compute the coordinates of the segment edge points. The segment is shown in the figure below
The coordinates are
(33)
The MATLAB code for computing the bounds on
clear
ub=0.25
lb=0.04
s1=log(ub)
s2=log(lb)
zeta1=sqrt((s1^2)/(pi^2+s1^2))
zeta2=sqrt((s2^2)/(pi^2+s2^2))
theta_upper=acosd(zeta1)
theta_lower=acosd(zeta2)
ts=1.2
wupper=3.2/(zeta1*ts)
wlower=3.2/(zeta2*ts)
% wn2<=omega<=wn1
% zeta1<=zeta<=zeta2
pointA1x=wlower*cosd(theta_lower)
pointA1y=wlower*sind(theta_lower)
pointA2x=wlower*cosd(theta_upper)
pointA2y=wlower*sind(theta_upper)
pointA3x=wupper*cosd(theta_upper)
pointA3y=wupper*sind(theta_upper)
pointA4x=wupper*cosd(theta_lower)
pointA4y=wupper*sind(theta_lower)
This segment can help us to select the search region for the parameters
(34)
We select the following search region for
(35)
The search region for the
(36)
We selected the search region for gamma such that the pole corresponding to
Next, our goal is to perform a grid search in order to determine the optimal values of the parameters
clear,clc
% bounds
alpha_lower=1.4;
alpha_upper=5;
beta_lower=2.5;
beta_upper=6.2;
gamma_lower=6.2;
gamma_upper=12;
alpha=alpha_lower:0.1:alpha_upper;
beta=beta_lower:0.1:beta_upper;
gamma=gamma_lower:0.1:gamma_upper;
% bounds on the overshoot
overShootUpper=0.25;
overShootLower=0.04;
% simulation time
timeInput=0:0.01:10;
% coefficients
coefficientSelection=[];
for index_a=1:numel(alpha)
% here track the progress
(index_a/numel(alpha))*100
for index_b=1:numel(beta)
for index_c=1:numel(gamma)
num=[(2*alpha(index_a)+gamma(index_c)), (alpha(index_a)^2+beta(index_b)^2+2*alpha(index_a)*gamma(index_c)), (alpha(index_a)^2+beta(index_b)^2)*gamma(index_c)];
den=[1,(2*alpha(index_a)+gamma(index_c)), (alpha(index_a)^2+beta(index_b)^2+2*alpha(index_a)*gamma(index_c)), (alpha(index_a)^2+beta(index_b)^2)*gamma(index_c)];
W=tf(num,den);
[output,timeReturned]=step(W,timeInput);
maxOutput=max(output);
overShoot=maxOutput-1;
errorStep=output-ones(size(output));
if (overShoot<overShootUpper) & (overShoot>overShootLower)
i=length(errorStep);
while (abs(errorStep(i))<0.02)
i=i-1;
end
if (timeInput(i)<1)
coefficientSelection=[coefficientSelection;
index_a,index_b,index_c,alpha(index_a),beta(index_b),gamma(index_c),timeInput(i),overShoot];
end
end
end
end
end
% Select one model
index_a=37; index_b=21; index_c=50;
% this corresponds to
% alpha=5, beta=4.5, gamma=11.1
num=[(2*alpha(index_a)+gamma(index_c)), (alpha(index_a)^2+beta(index_b)^2+2*alpha(index_a)*gamma(index_c)), (alpha(index_a)^2+beta(index_b)^2)*gamma(index_c)];
den=[1,(2*alpha(index_a)+gamma(index_c)), (alpha(index_a)^2+beta(index_b)^2+2*alpha(index_a)*gamma(index_c)), (alpha(index_a)^2+beta(index_b)^2)*gamma(index_c)];
W=tf(num,den);
step(W)
We select the following model:
(37)
These parameters produce the step response shown below.
On the basis of the computed parameter values, we can determine the coefficients of the controller
(38)
and this characteristic polynomial should match the characteristic polynomial (20), that is repeated here for clarity:
(39)
By substituting the computed values of
(40)
By equating (38) and (40), we obtain
(41)
This is a system of 3 equations with three unknowns. From the first equation, we obtain
(42)
By substituting this computed value of
(43)
We actually do not need to solve this system of equations, since the controller
(44)
That is, the sum and product of
(45)
STEP 4: Design the controllers
We design the controller