mansura mohamed siddeeq_2010_mb10-06
TRANSCRIPT
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
1/51
Ringing Poles in Model Predictive Control
Prepared by:
Mohamed Siddeeq Mansura
Department of Electrical Engineering
University of Cape Town
Prepared for:
Prof. Martin Braae
Department of Electrical Engineering
University of Cape Town
October 2010
Submitted to the Department of Electrical Engineering at the University of Cape Town in partial fulfilment
of the academic requirements for a Bachelor of Science degree in Mechatronics
General Predictive Control, Non-Integral Dead-Time
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
2/51
i
Declaration
1. I know that plagiarism is wrong. Plagiarism is to use another's work and pretend that it is one's own.2. I have used the IEEE convention for citation and referencing. Each contribution to, and quotation in, this
thesis report from the work(s) of other people has been attributed, and has been cited and referenced.
3. This thesis report is my own work.4. I have not allowed, and will not allow, anyone to copy my work with the intention of passing it off as
their own work or part thereof
Name: Mohamed Siddeeq Mansura
Signature: Date: 19 October 2010
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
3/51
ii
Acknowledgements
I would like to express thanks and gratitude to the following for their help throughout the duration of my
thesis
Prof. Martin Braae for allowing me to do this thesis under his supervision.
Mr Moholo Tseou
Masters student, Chris Cecchini
My parents for their love and support.
All my friends for their encouragement and support, it has been much appreciated.
Allah (SWT)
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
4/51
iii
Abstract
This thesis evaluates the role of Model Predictive Control (MPC) in controlling non-integral dead
time processes. Specifically it looks at the movement of poles and zeros in the z-plane when
applying a method in MPC known as General Predictive Control (GPC).
It is shown that when this method is applied to a non-integral dead time system, pole-zero
cancellation occurs; also that when the value of lambda (the penalty constant of the GPC model) is
varied the pole-zero cancellation is eliminated. It is also shown that in some cases for certain values
of lambda this cancellation causes instability and ringing within the control system.
A range of values for lambda which give stability to the system for different values of theta is then
given.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
5/51
iv
Table of Contents
Ringing Poles in Model Predictive Control ........................................................................................................ 1
Prepared by: .................................................................................................................................................................. 1
Department of Electrical Engineering ..................................................................................................................... 1
Prepared for: ................................................................................................................................................................. 1
General Predictive Control, Non-Integral Dead Time ........................................................................................ 1
Declaration ..................................................................................................................................................................... i
Acknowledgements .................................................................................................................................................... ii
Abstract ......................................................................................................................................................................... iii
Table of Contents ....................................................................................................................................................... iv
List of Figures .............................................................................................................................................................. vi
1. Introduction ......................................................................................................................................................... 1
1.1 Background to the study .......................................................................................................................................... 1
1.2 Objectives of this study ..................... ...................... ..................... ...................... ...................... ..................... ............ 1
1.2.1 Problems to be investigated ......................................................................................................................... 1
1.2.2 Purpose of the study ........................................................................................................................................ 1
1.3 Scope and Limitations ............................................................................................................................................... 1
1.4 Plan of development .................................................................................................................................................. 1
2. Background and Literature Review ............................................................................................................ 2
2.1 Dead time processes and the z-transform .................... ...................... ...................... ...................... .................. 2
2.1.1 Dead Time ............................................................................................................................................................. 2
2.1.2 z-Transform........................................................................................................................................................... 2
2.1.3 Modified z-Transform ....................................................................................................................................... 3
2.2 Model Predictive Control ......................................................................................................................................... 3
2.2.1 Generalized Predictive Control....................................................................................................................... 4
2.3 Effect of dead time on GPC .......................................................................Error! Bookmark not defined.
3. Methodology ........................................................................................................................................................ 6
3.1 z-Transform ................................................................................................................................................................... 6
3.2 General Predictive Control (GPC) Algorithm ................... ...................... ...................... ..................... ............... 7
3.3 Check for Pole-Zero cancellation .................... ...................... ...................... ...................... ..................... ............... 8
3.4 Closed Loop Function ................................................................................................................................................ 9
3.5 Simulation ...................................................................................................................................................................... 9
4. Results .................................................................................................................................................................. 10
4.1 First Order System................................................................................................................................................... 10
4.2 Advanced First Order (N=1) ................................................................................................................................ 13
4.3 Second Order System ............................................................................................................................................. 16
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
6/51
v
4.4 Second Order System with Pole ......................................................................................................................... 18
5. Conclusions ........................................................................................................................................................ 21
6. Recommendations ........................................................................................................................................... 22
7. List of References ............................................................................................................................................. 23
8. Appendices ......................................................................................................................................................... 24
8.1 Appendix A.................................................................................................................................................................. 24
8.1.1 A.1. First Order System N=0 ...................................................................................................................... 24
8.1.2 A.2. First order system with dead time of N=1 ................... ...................... ...................... ................... 29
8.1.3 A.3. Second order system with no pole .................... ...................... ...................... ..................... ............ 34
8.1.4 A.3.Second Order System with pole at ..................... ...................... ..................... ...................... ..... 38
8.2 Appendix B - MATLAB CODE ............................................................................................................................ 40
8.2.1 B.1. First Order System ................................................................................................................................ 40
8.2.2 B.2. Advanced First Order N=1 ................................................................................................................. 41
8.2.3 B.3. Second Order System with no pole ................... ...................... ...................... ..................... ............ 42
8.2.4 B3. Second Order System with no pole .................... ...................... ...................... ..................... ............ 43
9. EBE Faculty: Assessment of Ethics in Research Projects ................................................................... 44
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
7/51
vi
List of Figures
List of Illustrations
Figure 4-1: Pole-Zero mapping for different values of theta ........................................................................................... 10
Figure 4-2: Pole-Zero mapping with with varying lambda ......................................................................... 11
Figure 4-3: Pole-Zero map and Step Response with and .................................................. 12
Figure 4-4: Pole-Zero map for and varying.................................................................................................. 12
Figure 4-5: Pole-Zero map for Advanced First Order and varying theta ....................................................... 14
Figure 4-6: Ringing Poles ......................................................................................................................................................... 15
Figure 4-7: Pole-Zero map of second order system ..................... ...................... ...................... ...................... ............... 17
Figure 4-8: Pole-Zero map for second order with open loop pole ...................... ...................... ..................... ......... 19
List of Tables
Table 4-1: Theta-Lambda values which stabilise the closed loop ................................................................................. 13
Table 4-2: First Order System (N=1) ..................... ...................... ...................... ...................... ..................... ...................... . 16
Table 4-3: Theta values with corresponding lambda constraints ......................................... ...................... ........... 18
Table 4-4: Values of theta and lambda that stabilise the system ..................... ...................... ..................... ............ 20
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
8/51
1
1. Introduction1.1 Background to the studyModel Predictive Control (MPC) is a powerful tool in the control toolbox, and is used extensively in the
chemical industry. Over the years there have been a great many enquiries into General Predictive Control
(GPC), as to its advantages and disadvantages as used in industry. This investigation deals with one of it s
disadvantages, namely, how GPC model deals with a plant with non-integral dead time. Previous studies
have shown that when dealing with non-integral dead time, GPC tends to position a pole on the open loop
zero of the system.[1]
1.2 Objectives of this study1.2.1 Problems to be investigated
Investigate the effect the non-integral dead time on the position of the open loop zero of the discrete
transfer function
To see if, when using GPC, this zero is cancelled with a closed loop pole
To check for which values of lambda this happens and what value of lambda is needed to stabilise
the system.
1.2.2 Purpose of the studyThe purpose of this thesis is to try and shed some light on what happens to the poles and zeros of a
system with non integral dead time that is controlled by GPC.
1.3 Scope and LimitationsThis thesis specifically covers the investigation of lambda, the penalty constant of the cost function, and also
the non-integral part of the dead time and how these constants interact with one another. Due to time
constraints only simulation was done, and no actual experiments were carried out.
1.4 Plan of developmentThe investigation will start with a simple first order plant model. The value of the dead time as well as the
value of lambda will then be varied and by using pole-zero maps as well as simulation a correlation between
the variables would hope to be found with regards to the stability of the system. This will then be done for
higher order systems to see whether there is a general relationship between the two variables.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
9/51
2
2. Background and Literature Review2.1 Dead time processes and the z-transform2.1.1 Dead TimeA process exhibiting dead time is a process such that, every action in the input of the process will only affect
the output after a certain time delay. This type of phenomena is in general bad for control systems, and can
make them very difficult to control accurately.
The effect of dead time is difficult to control using standard controllers for the following reasons:
The effect of disturbances is only felt after a considerable lapse in time
The control action applied to the system is based on actual errors and tries to correct a situation thathappened some time before
The effect of the control action takes some time to be felt in the control variable
[2]
The dead time in the time domain is shown as . This corresponds to in the Laplace domain and
thus any equations with given in the form
will have a dead time corresponding to . With and where is a polynomial in s having
real coefficients, and of the form where the order of numerator is equal to or lower than that of the
numerator, if this were not the case the system would then be non causal.
2.1.2 z-Transform
The z-transform is the method used to study discrete time signals. It is the equivalent of the Laplace
transform for continuous signals.
The z-transform of a continuous function is defined by[3]
This definition of the z-transform is rarely used in practice as there are comprehensive z-transform tables
which have been drawn up for a wide range of functions. We can see form the definition that the accuracy of
the signal obtained from the z-transform is greatly dependant on (sampling time). Intuitively, it would then
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
10/51
3
make sense that the greater the sampling time, the better the z-transform and thus this would lead to better
performance. This however, is not quite true. Other factors such as, the Nyquist sampling criteria and the
dead time in the system would have to be taken into account.
The Nyquist sampling criteria is the minimum sampling criteria needed to avoid aliasing of the signal. To
fulfil this criteria there are a number of ways of sampling the sampled, such as the Zero Order Hold (ZOH)
and the First Order Hold (FOH). Both these methods help against problems associated with aliasing of the
signals. The ZOH will be used for the calculations that form part of this thesis.
When taking the z transform of a function with dead time, it is important to check whether or not the dead
time is a factor of sampling time. If the dead time is in fact a factor of the sampling time then the z-
transform cam simply be taken, if not, the modified z-transform would have to be used.[4]
2.1.3 Modified z-Transform
The modified z-transform uses a fictitious delay in the sampling time that allows us to take the z-transform
of the process; it is defined by [3]
As with the z-transform, the modified z-transform definition is rarely used, as there is a comprehensive list of
modified z-transform tables for a wide variety of functions.
2.2 Model Predictive ControlModel Predictive Control (MPC) is not a specific control strategy; it is a range of control methods whichmake use of a model of a process to obtain the control signal by minimising the cost/objective function.
MPC makes use of a few main ideas, these are
A prediction model to predict the process output at future time instances
A calculation of the control sequence which minimises the cost function
Receding horizon strategy[5]
The different strategies that form part of MPC only differ from each other in the way the model is set up with
the idea stated above.
The strategy that this thesis uses is Generalizes Predictive Control (GPC).
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
11/51
4
2.2.1 Generalized Predictive ControlThe basic idea of GPC is to calculate a sequence of future control signals in such a way that it minimizes a
multistage cost function defined over a prediction horizon.[5].
There are a number of ways of formulating the GPC model, such as those using Diophantine equations,Transfer Functions and State Space Models.[6] In each of these the controller is obtained by minimising the
cost function which is given by
In this function and represent the penalty constants used to constrain the cost function. and
represent the control and prediction horizons respectively, and represent the error (given by )
and the incremental input.
When the cost function is minimised it yields the following controller, K. [7]
In the controller, is the identity matrix, is the penalty constant used to penalise the control action and isthe matrix formed using the prediction model. The way in which G is formed is different depending on
which of the methods one uses to formulate the GPC model. The size of these matrixes is determined by the
denominator and numerator (transfer function method) or by the prediction horizon and the control horizon
( and ) of the system as chosen by the designer.
When using Diophantine equations, this matrix can be formed directly from the differential equations, the
rows of the matrix are given by
Where and come from the coefficients of the differential equations of the process.[5].
Another model that can be used to find the matrix is the transfer function model. In this case G is simply
the product of the Hankel/Toeplitz[8] prediction matrixes which is taken from the prediction model. The
prediction model is given by
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
12/51
5
In this model the input, and output, are divided into past and future components. and are the
predicted values of the respective outputs and inputs while and correspond to the past values of the
inputs and outputs. Using the future components of the prediction model the matrix is then given by
From the controller K the incremental control action is formed and is given by
Here is the reference trajectory and is the free response of the system.[1]
This control action is then applied to the system to produce the closed loop system. The closed loop system
is now a function of lambda, thus depending on the value of lambda (penalty on the incremental input) the
system would behave differently as will be seen later.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
13/51
6
3. MethodologyThe method employed in this thesis will be shown by using a first order system. The same method will then
be applied to the systems of higher order. The first order system is taken due to its simplicity and it will be a
good indication as to what to expect with regards to higher order systems when the same GPC algorithm is
applied.
3.1 z-TransformThe system g(s) is taken as a polynomial in s multiplied by the dead time as discussed earlier. The first order
system, g(s), is given by
Where
Tau () is the dead time and is broken up into two components, as shown above. The first term of the dead
time term ( ) is the term that shows the exact delay, given as a factor of sampling time, while the second
term is the term which shows the non-integral part of this dead time.
For simplicity we will let A and T equal to 1, and take the case where the multiple of the dead time is equal
to zero (N=0).
The system then becomes:
This system is a stable system with a pole at , and a settling time to within of its final value in
4sec.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
14/51
7
The z-transform of the system is taken, with zero order hold (ZOH) and with the sampling time equal 1
( . Due to the non-integral dead time, the modified z-transform is then needed (as will be the case of
all the systems to follow). The result is of this is shown below.
3.2 General Predictive Control (GPC) AlgorithmThe GPC algorithm is now applied to the model. As discussed earlier, there are a number of ways of doing
this. The method used here will be the transfer function method.
The first step in doing this is to obtain the CARIMA (Controlled Auto-Regressive Integrated Moving
Average) model of the system and convert to negative powers of z
We now cross multiply and take the inverse z-transform of the system to convert the system into difference
equations. The prediction model of the system is then taken, looking one step into the future. For this, boththe prediction horizon (Ny) and control horizon (Nu) will equal to one. The reason for this choice of
prediction and control horizons is firstly, choosing them as higher values would not impact on the area in
GPC being investigated, and secondly, this choice of values greatly simplifies the calculations involved.
The prediction model is given by
)
This is written in the form needed, to obtain the prediction matrixes
In the above equation the arrows above y and u are used to show whether the elements of the matrix refer to
past or future values. The forward arrow indicates looking into the future, while the backwards arrow refers
to the past inputs and outputs. The coefficients of these matrices are the Hankel/Toeplitz [8] matrices
discussed earlier and are in this case given as
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
15/51
8
= C2
) = C1
From here we now form our controller
Where and are the penalty matrixes. For our purposes (the identity matrix) and Also,
here
The controller then becomes
The control action is given by
Where K corresponds to the first row of the matrix K (in this case K is a constant), is the reference
trajectory and is the free response of the system and is given by
Substituting, the control action is given by
3.3 Check for Pole-Zero cancellationNow what is needed is to check if there is in fact pole zero cancellation. To do this we need to check that the
pole in the open loop function is the same as the zero for the closed loop function.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
16/51
9
The pole of the open loop is given by
The closed loop characteristic equation is given by
If lambda is then set to zero, K reduces to and closed loop function becomes
This shows without a doubt that is a pole of the closed loop system, this corresponds to the
open loop zero.
3.4 Closed Loop FunctionFrom the prediction model the closed loop function is formed and is given by
For the closed loop function we now have to test for stability with varying values of theta (the non integral
dead time term) and lambda (the penalty constant of the cost function). This was done with the help of
MATLAB.
3.5 SimulationAll simulations will be done using MATLAB
. In MATLAB
the closed loop function poles and zeros are
plotted for varying values of theta and lambda. This would give an indication of whether or not the system
was likely to be stable or unstable, and with or without ringing. It would also give indication as to what the
settling time is or after how long it was expected that the ringing or instability would occur. From these plots
the values of theta and lambda can then be determined for the system such that it is always stable.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
17/51
10
4. Results4.1 First Order SystemThe first order system has been explained in detail in the methodology, consequently all that will be done
here is to plot the MATLAB
graphs and simulate them in order to find the corresponding values of lambda
and theta for ringing and instability as well as to see whether they correlate in any way. The full derivation of
the GPC model for this system and the ones to follow can be found in appendix A, while the MATLAB
codes used to plot the pole-zero maps and step responses can be found in appendix B.
The first thing noted about this first order system, is the movement of the open loop zero as the non-integral
dead-time is varied from zero to a factor of sampling time. As this happens we find that the zero moves off to
infinity. Figure 4-1 shows the pole-zero map of the closed loop transfer function for different values of theta
with lambda equal to zero. The points on the graph where the rectangular boxes appear are of particular
importance. These are the places at which the pole-zero cancellation for the different values of theta occur. It
can be seen from here, that the closed loop zero follows the open loop pole to infinity as the dead-time comes
closer to the sampling time.
Figure 4-1: Pole-Zero mapping for different values of theta
Starting from the left with to the poles for different values of theta is plotted. It is clear thatfor the lower values of theta, with the pole lying inside the unit circle, the system will be stable, but as soon
as the pole leaves the unit circle, the pole-zero cancellation will most likely cause instability in the system.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
18/51
11
The next step is to vary the value of the penalty constraint, lambda, in these uncertain regions of theta and to
see what effect this has on the poles of the system. (It can be seen clearly from the closed loop equation that
zero is not dependant on the value of lambda.)
In Figure 4-2 the pole-zero map for different values of lambda is shown. As can be seen when lambda
increases from to the pole moves to inside the unit circle. For all values of lambda which
position the pole outside the unit circle, the system is expected to be unstable. Due to the fact that the pole is
so close to the unit circle, the system may seem stable, but eventually becomes unstable after a relatively
long period of time. Also because the pole is positioned on the left hand side of the z-plane ringing is
expected in the output. This is shown in the figures that follow.
Figure 4-2: Pole-Zero mapping with with varying lambda
Figure 4-3 shows the step response of the system with and . Due to the pole being so
close to the unit circle it is seen in the step response that there is ringing and that it takes a substantial amount
of time before the amplitude of the ringing increases significantly. For most control systems however, even if
the ringing amplitude did not increase, this amount of ringing would be unsatisfactory. In order to stop the
ringing all together, the value of lambda would have to increase significantly, however, once lambda is
increased beyond a certain point the system then becomes unstable.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
19/51
12
Figure 4-3: Pole-Zero map and Step Response with and
Figure 4-4: Pole-Zero map for and varying
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
20/51
13
As lambda increases the poles move through the z-plane, eventually, once lambda is greater than 0.7 the
poles again move outside of the unit circle, as can be seen in Figure 4-4. Thus, it can be shown that for
the system will only be stable for .
This same method can then be applied for different values of theta, giving the same basic result. For a given
value of theta there will be a range of values of lambda for which the system will be stable, a few are shown
in the Table 1 on the next page. The results shown are estimates which are dependant on pole positions, also
some of the values of lambda shown do eventually stabilise but suffer from severe ringing, which most likely
would make them unusable in normal control systems.
Theta Lambda
0.10.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Table 4-1: Theta-Lambda values which stabilise the closed loop
4.2 Advanced First Order (N=1)This system is the same as the previous one but differs in that it has a standing dead time of between one and
two sampling periods. The is given by
This time the non integral term is changing from to . This places an extra pole in the open loop
transfer function. The same method of GPC is followed as before. The key point to note while applying the
GPC algorithm is that the controller (K) has its first column as a zero column. This is expected as nothing
has happened in the first time instance, so there is nothing to control.
What is found after working through this system is that the exact same control law results as before, but it is
applied one step in the future. This corresponds to the time delay of the system.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
21/51
14
The controller is thus given by
of which only the first row is used in the control action to compute the control law. From this we then checkthe characteristic function of the closed loop to see if there is in fact pole zero cancellation.
Setting lambda equal to zero we find that there is in fact a common factor in this equation and that it is equal
to that of the open pole position. Thus pole-zero cancellation does occur. The closed loop transfer function is
then given by
As expected there is an extra zero positioned at the origin. Now simulations are run as before to see the effect
of varying the value of lambda and theta, also to see whether or not the extra zero at the origin has any affect
on the system as well as to see how they differ from the results achieved in the simple first order case.
Figure 4-5: Pole-Zero map for Advanced First Order and varying theta
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
22/51
15
Figure 5 shows the Pole-Zero map for lambda equal to zero and different values of theta. The map is
identical to the one plotted before. Theta is varied here from to . Once again it is seen that the
closed loop zero follows the open loop pole to infinity as theta varies.
The results of this system were almost identical to that of the system before. It was however interesting to
note that for a given theta, any small change in lambda will cause the system to start ringing. This ringing
will either become unstable or stable depending on the position of the pole. This small change in magnitude
of lambda is of the nano-unit degree i.e. would be enough to cause this ringing in the system.
An example of this is shown in the figure 4-6. Here the step response is plotted for
respectively.
Figure 4-6: Ringing Poles
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
23/51
16
The table for stability of the system for theta and corresponding lambda is now drawn.
Theta Lambda
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Table 4-2: First Order System (N=1)
4.3 Second Order SystemA second order system is now taken and the same procedure is applied as with the first order. The second
order system has the following form
For this system the following values will be set:
The reason for alpha and beta being as they are is that it gives us a system with ringing. This is part of the
phenomenon being investigated. From here the system becomes
The z-transform of the system is now taken as before after which the GPC algorithm is applied to obtain the
controller
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
24/51
17
It is noted to be the same form as the one for the first order system. Here is a constant and alpha and beta
are as defined above. Also , .
The closed loop transfer function is given by
Here are all constants. The full derivation and value of these constants is shown in the appendix.
It can be seen from the closed loop function that there once again pole-zero cancellation when the value of
lambda is set as zero. The pole-zero map for the varying theta while setting lambda as zero is now plotted to
give an indication of how the poles and zeros react to a change in the dead time of the system.
Figure 4-7: Pole-Zero map of second order system
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
25/51
18
Figure 4-7 shows this pole-zero map. It is plotted for to . The pole zero cancellation is
exactly as is expected, and as before, by varying the value of theta from 0 to 1 the pole of the open loop
along with the zero of the closed loop runs from within the unit circle to infinity.
The table shows how lambda can vary for corresponding values of theta. However, it should be pointed outthat the maximum value for each of these values of lambda is in fact infinity. The reason for the upper
bounds in some of the cases is due to the settling time. The upper bounds placed on lambda would in fact
give settling times of under 200 seconds. Also in the majority of cases in this table ringing is likely to occur.
Theta Lambda
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Table 4-3: Theta values with corresponding lambda constraints
4.4 Second Order System with PoleThe exact system as before is taken, but this time a zero is added to see what effect this will have on the
system. The system is given by
When this system is discretized using the z-transform with ZOH it is seen that the form is exactly that of the
system without the pole, but varying by few constants. Thus the controller is once again given by
And the closed loop transfer is given function by
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
26/51
19
The pole-zero map for varying theta when lambda is set as zero is shown in Figure 4-8. This is the
same as before, with the open loop zero being followed by the closed loop pole to infinity as theta runs
from zero to one. It is also seen that pole-zero cancellation does also occur
Figure 4-8: Pole-Zero map for second order with open loop pole
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
27/51
20
The table for the values of lambda which stabilise the system for different values of theta is shown below.
This system is seen to be stable for almost all values of lambda, although with the majority of cases ringing
will occur.
Theta Lambda
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Table 4-4: Values of theta and lambda that stabilise the system
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
28/51
21
5. ConclusionsFrom the results above it can be seen that the GPC algorithm is well suited to dealing with the non-
integral dead time which forms part of certain control systems. However, it should be noted that care
should be taken when varying the penalty constraint, lambda, which forms part of the cost function in
the GPC algorithm. As the non-integral part of the dead time, theta, increases and comes closer to being
a factor of sampling time, it is found that small changes in lambda will have a big impact on the system
stability.
Values of theta that allow the open loop pole to lie within the unit circle of the z-plane react to very
small values of lambda. If lambda is increased to just above zero, (nano-units), then ringing can be
expected in the system output. If the same value of lambda is applied to a system with theta highenough such that the zero lies outside the unit circle, the system will then be unstable. For these values
of theta higher values of lambda are needed for stability.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
29/51
22
6. RecommendationsThe problem associated with non-integral dead time and ringing in control systems using the GPC
algorithm can be substantially overcome by setting the penalty constant, lambda, of the GPC model to
the correct value. Lambda has a great influence on the closed loop poles of the system and can thus
offer great stability in the system.
In order to investigate this matter further, attention should be applied to the input and output
disturbance attenuation of these control systems with the non-integral dead-time.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
30/51
23
7. List of References[1] D.W.Clarke., "General Predicitve Control-Part 1. The Basic Algorithm." Automatica, 1987, pp. pp
137-148.
[2] E.F.Camacho, J.E>Normey-Rico and., Control of Dead-time Processes. 2007.
[3] E.I.Jury., Theory and Application of the z-Transform method. New York : Robert E. Kruiger
Publishing Co., Inc., 1973.
[4] M.Braae., Control Engineering - 2. s.l. : M.Braae, 2004.
[5] E.F.Camacho., "Model Predictive Control." [book auth.] E.F.Camacho and C.Bordans. Model
Predictive Control. 2007, pp. 47-60.
[6] J.A.Rossiter., Model Base Predictive Control: A Practical Approach. s.l. : CRC Press, 2003. pp. 53-64.[7] M.Tseou., "EEE4093F - Model Predictive Control (MPC)." s.l. : Electrical Engineering Department
Control and Instrumentation UCT, 2010.
[8] Ying Xu, Bin Liu and Kang-ling Fang., "Generalized Predictive Control based on Toeplitz equation."
2008.
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
31/51
24
8. Appendices8.1 Appendix A8.1.1 A.1. First Order System N=0First Order System, non-integral dead time
For
In negative powers of z
CARIMA model
Poles are then given by
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
32/51
25
Put in the form
Where C1 = and C2 =
This gives
A= and B =
)
)
Formulating the prediction model with the prediction horizon set at 1, we get
)
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
33/51
26
So we have
= C1) = C2
The controller K is given by, where Q and R are penalty matrixes, for our purposes Q=1 and
and .
If the prediction horizon were bigger all values would become matrixes
From the controller, K, the control action is given by
Where K corresponds to the first row of the matrix K (in this case K is a constant), is the reference
trajectory and is the free response of the system and is given by
Substituting, we get
This is now our closed loop function, whose characteristic equation is given by
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
34/51
27
Where S and R are taking from the control action equation put in the form
And A and B are as shown above, and with =
So
Substituting into the closed loop characteristic equation
Here is where we see something interesting, if we let lambda () equal zero, K then reduces to
Thus
as a closed loop pole.
Here it is seen that comes out as a closed loop pole, this is exactly the same position as the
open loop zero, and thus tends to cancel this zero, causing a potentially internally unstable system.
To complete the closed loop transfer function:
Now
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
35/51
28
And
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
36/51
29
8.1.2 A.2. First order system with dead time of N=1
Where and N=1
As shown earlier this comes down to
In negative powers of z
Put in the form
Where and
From here
and
CARIMA model
Poles are then given by
Where C1 = and C2 =
From the CARIMA model we form the prediction model
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
37/51
30
We now have the Hankel/Toeplitz matrices
and
The controller is given by
The controller is given by the first row of the matrix
Thus
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
38/51
31
With
Therefore
Now with
We put this in the form below to produce the elements of the equation of the closed loop function
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
39/51
32
And thus the closed loop characteristic function is given by
From here it is not at first obvious, but with some quick manipulation it can be seen that when
There is a common factor in the characteristic function; this common factor is at the exact position of the open loop
zero.
This factor now clearly common in , and is in the same position as the open loop zero. The difference between
this, the process with N=1, and the process discussed earlier, N=0, is that an extra zero is placed at the origin. Need
to check what kind of effect this will have on the response of the system.
The closed loop function is given by
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
40/51
33
--------------------------------------------------------------------
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
41/51
34
8.1.3 A.3. Second order system with no pole
Here alpha and beta are chosen such that they give rise to ringing zeros for the system.
Tau ( ) is chosen with N=0 and theta lying in between zero and the sampling time.
Thus we have
And
Using the modified Z-transform where , and and ,
becomes
Grouping terms
Let
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
42/51
35
In the form
Form the prediction model, must first convert to CARIMA
Predicting one step into the future
From here
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
43/51
36
Controller
Substituting, we get
This is now our closed loop function, whose characteristic equation is given by
Where S and R are taking from the control action equation put in the form
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
44/51
37
From here it can be seen that putting lambda = 0, R & B are then identical, i.e. the closed loop pole lies
directly on the open loop zero.
Which when made equal to zero is identical to B
Full closed loop transfer function
--------------------------------------------------------------------------------
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
45/51
38
8.1.4 A.3.Second Order System with pole at
In this case, taking
And it follows that only the constants change, but the rest of the systems stays the same as the above
calculation. The new system proceeds as follows
The value of phi now becomes, where
Also the whole z-transform is multiplied by this amount
The constant of 0.5 is absorbed into the numerator.
Constants now change slightly to
The prediction model is then
And the Hankel/Toeplitz matrices are given by
The controller is then
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
46/51
39
In the characteristic function the values of A and R are double, thus we have
Once again with lambda equal to zero, the common factor exists!
Final closed loop equation is given by
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
47/51
40
8.2 Appendix B - MATLAB CODE8.2.1 B.1. First Order System%% First Order System
clear
clc
tic
%% Constants
i = 1;HP=[];H2P=[];QZ=[];
z = tf('z');
%% for loop for different lambda and theta values
for lambda = 0:0.5:7.5
theta = 0.;
A1 = 1+exp(-1); A2 = exp(-1);
C1(i) = exp(theta-1)-exp(-1);
C2(i) = 1- exp(theta-1);
K(i) = (C2(i)/(C2(i)^2+lambda));
%% open loop is function
% Q = (z*C2 +C1)/(z*(z-exp(-1)));
% pzmap(Q)
% hold on
% subplot(2,1,1)% step(Q)
%% Open Loop Transfer Function
H(i) = (K(i)*z^2*(z.*C2(i)+C1(i)))/(K(i)*(z-1)*(z-A2)*(z+K(i).*C1(i))+(z*A1-
A2)*(z.*C2(i)+C1(i)));
subplot(2,1,1)
pzmap(H(i))
hold on
subplot(2,1,2)
step(H(i))
hold on
% HZ(i,:) = pole(H(i));
% HZ3 = HZ(i,3)
% HP(i,:) = pole(H);
% H2P(i,:) = pole(H2);
% QZ(i) = zero(Q);
end
toc
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
48/51
41
8.2.2 B.2. Advanced First Order N=1%% First Order System with N=1clearclci=1; z = tf('z');
%% for loop for different lambda and theta values
for theta =0.9%:0.1:0.9lambda = 02;C1(i) = exp(theta-1)-exp(-1);C2(i) = 1- exp(theta-1);K1 = (C2(i)/(C2(i)^2+lambda));
%% open loop is function
% g = (z*C2(i)+C1(i))/((z^2)*(z-exp(-1)));% pzmap(g)% hold on
% subplot(2,1,1)% step(g)
%% open loop is function
f(i)= (K1*z^2*(z*C1(i)+ z^2*C2(i)))/((z^2+K1*(C1(i)+(exp(-1)+1)*C2(i))*z...+K1*(exp(-1)+1)*C1(i))*(z-exp(-1))*(z-1)+(K1*((exp(-1)+1)^2-exp(1))*z ...-K1*exp(-1)*(exp(-1)+1))*(C1(i)+ z*C2(i)));
subplot(2,1,2)pzmap(f(i))hold on
pole(f(i))subplot(2,1,1)step(f(i))hold on
end
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
49/51
42
8.2.3 B.3. Second Order System with no pole%% Second Order System with no pole
clear
clc
%% Constants
z = tf('z'); s = tf('s');
alpha = 0.5; beta = sqrt(0.75);
phi2 = atan((alpha+beta^2-0.5*alpha)/0.5*beta);
sq = sec(phi2);%theta = 0.5
i=1;p=[];
%% Continous Function
% gp = ((s+0.5)/((s+0.5)^2+0.75))*exp(-s*(theta));
% gjp=c2d(gp,1,'zoh')
% step(gjp)
%% for loop for different lambda and theta values
for lambda = 0.025%.000:10:200
theta = 0.7;
m = 1-theta;
C0(i) = 0.5*(1-exp(-m/2)*sq*cos((m*beta)+phi2));
C1(i) = -0.5*(2*exp(-0.5)*cos(beta)-exp(-m/2)*sq*(exp(-0.5)*cos((beta*(1-m))-
phi2)+cos((beta*m)+phi2)));
C2(i) = -0.5*(-exp(-1)+exp(-m/2)*exp(-0.5)*sq*cos((beta*(1-m))-phi2));
C3(i) = -2*exp(-alpha)*cos(beta);K = (C0(i)/(C0(i)^2+lambda));
%% Open Loop Transfer Function
% gh = (z^2*C0(i)+z*C1(i)+C2(i))/(z*(z^2+z*C3(i)+exp(-1)))
% pzmap(gh)
% hold on
% subplot(2,1,1)
% step(gh)
%% Closed Loop Transfer Fucntion
f(i) = ((K*(z^2*C0(i)+z*C1(i)+C2(i))*z^3)/...
((z^3+z^2*(C3(i)-1)+z*(exp(-1)-C3(i))-exp(-1))*(z^2+K*C1(i)*z+K*C2(i))- ...
((K*(C3(i)-1)*z^2)+(K*(exp(-1)-C3(i))*z)-exp(-
1))*(z^2*C0(i)+z*C1(i)+C2(i))));
subplot(2,1,1)
step(f(i))
subplot(2,1,2)
pzmap(f(i))
hold on
end
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
50/51
43
8.2.4 B3. Second Order System with no pole%% Second Order System with Pole
clear
clc
%% Constants
z = tf('z'); s = tf('s');
alpha = 0.5; beta = sqrt(0.75);
phi1 = atan(-alpha/beta);
sq = sec(phi1);
i=1;
%% Continous Function
% g = (1/((s+0.5)^2+0.75))*exp(-s*(theta));
% gj=c2d(g,1,'zoh')
% step(gj)
%% for loop for different lambda and theta values
for lambda =10
theta = 0.3;
m = 1-theta;
C0(i) = (1-exp(-m/2)*sq*cos((m*beta)+phi1));
C1(i) = -(2*exp(-0.5)*cos(beta)-exp(-m/2)*sq*(exp(-0.5)*cos((beta*(1-m))-
phi1)+cos((beta*m)+phi1)));
C2(i) = -(-exp(-1)+exp(-m/2)*exp(-0.5)*sq*cos((beta*(1-m))-phi1));
C3(i) = -2*exp(-alpha)*cos(beta);K = (C0(i)/(C0(i)^2+lambda));
%% Open Loop Transfer Function
% gh = (z^2*C0(i)+z*C1(i)+C2(i))/(z*(z^2+z*C3(i)+exp(-1)))
% pzmap(gh)
% hold on
% end
% step(gh)
%% Closed Loop Transfer Fucntion
f = ((K*(z^2*C0+z*C1+C2)*z^3)/...
((z^3+z^2*(C3-1)+z*(exp(-1)-C3)-exp(-1))*(z^2+K*C1*z+K*C2)- ...
((K*(C3-1)*z^2)+(K*(exp(-1)-C3)*z)-exp(-1))*(z^2*C0+z*C1+C2)));
subplot(2,1,1)
step(f)
subplot(2,1,2)
pzmap(f)
hold on
end
-
7/31/2019 Mansura Mohamed Siddeeq_2010_MB10-06
51/51
9. EBE Faculty: Assessment of Ethics inResearch Projects
Any person planning to undertake research in the Faculty of Engineering and the Built Environment at the University of Cape
Town is required to complete this form before collecting or analysing data. When completed it should be submitted to the
supervisor (where applicable) and from there to the Head of Department. If any of the questions below have been answered
YES, and the applicant is NOT a fourth year student, the Head should forward this form for approval by the Faculty EIR
committee: submit to Ms Zulpha Geyer ([email protected]; Chem Eng Building, Ph 021 650 4791).Students must
include a copy of the completed form with the thesis when it is submitted for examination.
Name of Principal
Researcher/Student: Mohamed Siddeeq Mansura Department: ELECTRICAL ENGINEERING
If a Student: YES Degree:
BSc Eng
Meachatronics Supervisor: Prof Martin Braae
If a Research Contract indicate source of
funding/sponsorship: N/A
Research Project
Title:
Overview of ethics issues in your research project:
Question 1: Is there a possibility that your research could cause harm to a third party (i.e. a person
not involved in your project)?YES NO
Question 2: Is your research making use of human subjects as sources of data?
If your answer is YES, please complete Addendum 2.YES NO
Question 3: Does your research involve the participation of or provision of services to communities?
If your answer is YES, please complete Addendum 3.YES NO
Question 4: If your research is sponsored, is there any potential for conflicts of interest?
If your answer is YES, please complete Addendum 4.YES NO
If you have answered YES to any of the above questions, please append a copy of your research proposal, as well as any
interview schedules or questionnaires (Addendum 1) and please complete further addenda as appropriate.
I hereby undertake to carry out my research in such a way thatthere is no apparent legal objection to the nature or the method of research; and
the research will not compromise staff or students or the other responsibilities of the University;
the stated objective will be achieved, and the findings will have a high degree of validity;
limitations and alternative interpretations will be considered;
the findings could be subject to peer review and publicly available; and
I will comply with the conventions of copyright and avoid any practice that would constitute plagiarism.
Signed by:
Full name and signature Date
Principal Researcher/Student:
Mohamed Siddeeq Mansura
19 October 2010
This application is approved by:
Supervisor (if applicable):
Prof Martin Braae
19 October 2010
HOD (or delegated nominee):
Final authority for all assessments with NO to all
questions and for all undergraduate research. Janine Buxey
19 October 2010
Chair : Faculty EIR Committee
For applicants other than undergraduate students
who have answered YES to any of the above
mailto:[email protected]:[email protected]:[email protected]:[email protected]