Slides by Anthony Rossiter
1
CHAPTER 5
Predictive Control with constraints 1
Introduction
Anthony Rossiter
Slides by Anthony Rossiter
2
Why are constraints important?
1. A key weakness of classical linear control strategies
is that they take no account of constraints.
2. A failure to take account of constraints can lead to
disaster as will be demonstrated in this
introduction.
3. One main reason for the success of predictive
control is the ability to deal with constraints in a
systematic fashion.
4. Hence, having shown the need, the videos in this
chapter will consider how constraints can be
incorporated into a control design.
Slides by Anthony Rossiter
3
What are constraints?
Most systems only exist within a specified domain. Attempts
to go beyond this domain result in undesirable behaviours.
• If a system is too hot, components can fail, melt, operate
imperfectly and so forth.
• If a pressure is to high, a safety value will release.
• A valve can only move between 0% and 100% open;
expecting more would imply nonsense.
• Real physical movement is restricted by walls and other
obstacles.
• Systems can only move so fast, due to limits in power,
energy, grip and so on.
• The list could go on.
Slides by Anthony Rossiter
4
Ignoring constraints is bad
A simple and obvious example is driving a car.
1. The aim is to get from A to B as fast as possible.
2. A simple solution would be to accelerate to top
speed and maintain that for the entire duration
of the journey.
However, this fails because:
3. In general cars cannot corner at top speed and
attempts to do so result in a crash.
4. This is also ignoring other practical issues such
as rules of the road, other road users, etc.
Slides by Anthony Rossiter
5
PI control
• Consider the PI control of a tank level system.
• The aim is to get the level to a specified depth, but
obviously without overflowing and without
exceeding the maximum allowable inflow.
• Assume the maximum inflow is 2, and assess the
following PI control law.
GO TO MATLAB and run
tanklevelanimation2.p
With P=2, I=0.8
See folder constraints_examples
Slides by Anthony Rossiter
6
PI control
Flow larger than
possible
Tank overflows
Slides by Anthony Rossiter
7
What is the problem?
There are two issues:
1. First the control law has exceeded the maximum
input and therefore is proposed values than
cannot be implemented. Therefore, the implied
linear relationships are no longer valid as the
input will saturate.
2. Similarly, if the tank overflows, the implied
saturation means any loop analysis (or tuning)
carried out in advance is no longer valid.
What would happened if constraints could be ENFORCED?
Slides by Anthony Rossiter
8
Integral wind up
• This is a well known problem with a poorly tuned
and coded PI compensator.
• The integral may still keep increasing, even though
the input has saturated. Typically when the integral
gain is too large.
• This means that even when the error reverses sign,
there is no change in the input signal as the integral
term has first to wind down again.
• The impact on control is self-evident; there is a loss
of control as the feedback is essentially disabled.
• Consider chap5_simexam1.m
Slides by Anthony Rossiter
9
0 1 2 3 4 5 6 7 8 9 10
0
0.5
1
1.5
Output
Input
Unsaturated Input
Input still high, even though output
too large!
Output slower to converge than if
control law recognised the saturation!
Slides by Anthony Rossiter
10
0 1 2 3 4 5 6 7 8 9 10
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Output
Unsaturated input
Input
With integral saturation
the performance is
much better!
0 1 2 3 4 5 6 7 8 9 10
0
0.5
1
1.5
Output
Input
Unsaturated Input
Slides by Anthony Rossiter
11
Non-minimum phase and unstable examples
A simple example is based on something like a
segway or inverted pendulum or perhaps a system
with a non-minimum phase characteristic.
TARGET – move to the right.
1. Moves left
2. Moves right
3. Moves left again
If arm is still moving right and with too much lean when we hit
the end stop, the arm will fall over and we cannot stop it!
If the control law does not take the position of the
end-stop into account, any strategies it proposes could
be seriously flawed.
Slides by Anthony Rossiter
12
Example of an unconstrained MPC law
in the presence of constraints
• So far the MPC designs offered in this video
series have ignored constraints.
• Let us compare the behaviour that results from
including constraints, and not including
constraints in the decision making process.
• See file video5_1_example1.m
• Dotted lines are the result when there are no
constraints.
Slides by Anthony Rossiter
13
video5_1_example1.m
0 5 10 15 20 25
0
0.2
0.4
0.6
0.8
1
1.2
1.4
ny
=10 nu
=2,  = 1
set point
input
output
input
output
Allow different
‘optimal’ values
when constraint
handling included
or excluded, the
saturated values
would be the
same if enforced!
In this case saturation control would be effective, although of
cause the optimisation is meaningless.
Slides by Anthony Rossiter
14
video5_1_example2.m
0 5 10 15 20 25
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
ny
=12 nu
=4,  = 1
set point
input
output
input
output
Slides by Anthony Rossiter
15
NEXT, ENFORCE SATURATION EVEN
WHERE NOT INCLUDED IN THE
OPTIMISATION
Slides by Anthony Rossiter
16
video5_1_example3
0 5 10 15 20 25
-1.5
-1
-0.5
0
0.5
1
ny
=12 nu
=4,  = 1
set point
input
output
input
output
Saturation control
gives poor
behaviour.
0 5 10 15 20 25
-1
-0.5
0
0.5
1
1.5
ny
=12 nu
=4,  = 1
set point
input
output
input
output
With a smaller
constraint on u(k),
saturation control
is definitely
unacceptable.
Slides by Anthony Rossiter
17
Summary
• A failure to take proper account of constraints
during a feedback design can have several
undesirable consequences.
• In the best case, one could just get suboptimal
behaviour but in the worst case one could break a
system altogether.
• Even a simple saturation policy may come badly
unstuck in some scenarios, although it can be
shown to be fine for some cases.
There is a need to integrate constraints into the
control design in a systematic fashion.
© 2014 University of Sheffield
This work is licensed under the Creative Commons Attribution 2.0 UK: England & Wales Licence. To view a copy of this licence, visit
http://creativecommons.org/licenses/by/2.0/uk/ or send a letter to: Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
It should be noted that some of the materials contained within this resource are subject to third party rights and any copyright notices must remain with these materials
in the event of reuse or repurposing.
If there are third party images within the resource please do not remove or alter any of the copyright notices or website details shown below the image.
(Please list details of the third party rights contained within this work.
If you include your institutions logo on the cover please include reference to the fact that it is a trade mark and all copyright in that image is reserved.)
Anthony Rossiter
Department of Automatic Control and
Systems Engineering
University of Sheffield
www.shef.ac.uk/acse

predictive control with constraints 5-1 - introduction.pptx

  • 1.
    Slides by AnthonyRossiter 1 CHAPTER 5 Predictive Control with constraints 1 Introduction Anthony Rossiter
  • 2.
    Slides by AnthonyRossiter 2 Why are constraints important? 1. A key weakness of classical linear control strategies is that they take no account of constraints. 2. A failure to take account of constraints can lead to disaster as will be demonstrated in this introduction. 3. One main reason for the success of predictive control is the ability to deal with constraints in a systematic fashion. 4. Hence, having shown the need, the videos in this chapter will consider how constraints can be incorporated into a control design.
  • 3.
    Slides by AnthonyRossiter 3 What are constraints? Most systems only exist within a specified domain. Attempts to go beyond this domain result in undesirable behaviours. • If a system is too hot, components can fail, melt, operate imperfectly and so forth. • If a pressure is to high, a safety value will release. • A valve can only move between 0% and 100% open; expecting more would imply nonsense. • Real physical movement is restricted by walls and other obstacles. • Systems can only move so fast, due to limits in power, energy, grip and so on. • The list could go on.
  • 4.
    Slides by AnthonyRossiter 4 Ignoring constraints is bad A simple and obvious example is driving a car. 1. The aim is to get from A to B as fast as possible. 2. A simple solution would be to accelerate to top speed and maintain that for the entire duration of the journey. However, this fails because: 3. In general cars cannot corner at top speed and attempts to do so result in a crash. 4. This is also ignoring other practical issues such as rules of the road, other road users, etc.
  • 5.
    Slides by AnthonyRossiter 5 PI control • Consider the PI control of a tank level system. • The aim is to get the level to a specified depth, but obviously without overflowing and without exceeding the maximum allowable inflow. • Assume the maximum inflow is 2, and assess the following PI control law. GO TO MATLAB and run tanklevelanimation2.p With P=2, I=0.8 See folder constraints_examples
  • 6.
    Slides by AnthonyRossiter 6 PI control Flow larger than possible Tank overflows
  • 7.
    Slides by AnthonyRossiter 7 What is the problem? There are two issues: 1. First the control law has exceeded the maximum input and therefore is proposed values than cannot be implemented. Therefore, the implied linear relationships are no longer valid as the input will saturate. 2. Similarly, if the tank overflows, the implied saturation means any loop analysis (or tuning) carried out in advance is no longer valid. What would happened if constraints could be ENFORCED?
  • 8.
    Slides by AnthonyRossiter 8 Integral wind up • This is a well known problem with a poorly tuned and coded PI compensator. • The integral may still keep increasing, even though the input has saturated. Typically when the integral gain is too large. • This means that even when the error reverses sign, there is no change in the input signal as the integral term has first to wind down again. • The impact on control is self-evident; there is a loss of control as the feedback is essentially disabled. • Consider chap5_simexam1.m
  • 9.
    Slides by AnthonyRossiter 9 0 1 2 3 4 5 6 7 8 9 10 0 0.5 1 1.5 Output Input Unsaturated Input Input still high, even though output too large! Output slower to converge than if control law recognised the saturation!
  • 10.
    Slides by AnthonyRossiter 10 0 1 2 3 4 5 6 7 8 9 10 0 0.2 0.4 0.6 0.8 1 1.2 1.4 Output Unsaturated input Input With integral saturation the performance is much better! 0 1 2 3 4 5 6 7 8 9 10 0 0.5 1 1.5 Output Input Unsaturated Input
  • 11.
    Slides by AnthonyRossiter 11 Non-minimum phase and unstable examples A simple example is based on something like a segway or inverted pendulum or perhaps a system with a non-minimum phase characteristic. TARGET – move to the right. 1. Moves left 2. Moves right 3. Moves left again If arm is still moving right and with too much lean when we hit the end stop, the arm will fall over and we cannot stop it! If the control law does not take the position of the end-stop into account, any strategies it proposes could be seriously flawed.
  • 12.
    Slides by AnthonyRossiter 12 Example of an unconstrained MPC law in the presence of constraints • So far the MPC designs offered in this video series have ignored constraints. • Let us compare the behaviour that results from including constraints, and not including constraints in the decision making process. • See file video5_1_example1.m • Dotted lines are the result when there are no constraints.
  • 13.
    Slides by AnthonyRossiter 13 video5_1_example1.m 0 5 10 15 20 25 0 0.2 0.4 0.6 0.8 1 1.2 1.4 ny =10 nu =2,  = 1 set point input output input output Allow different ‘optimal’ values when constraint handling included or excluded, the saturated values would be the same if enforced! In this case saturation control would be effective, although of cause the optimisation is meaningless.
  • 14.
    Slides by AnthonyRossiter 14 video5_1_example2.m 0 5 10 15 20 25 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 ny =12 nu =4,  = 1 set point input output input output
  • 15.
    Slides by AnthonyRossiter 15 NEXT, ENFORCE SATURATION EVEN WHERE NOT INCLUDED IN THE OPTIMISATION
  • 16.
    Slides by AnthonyRossiter 16 video5_1_example3 0 5 10 15 20 25 -1.5 -1 -0.5 0 0.5 1 ny =12 nu =4,  = 1 set point input output input output Saturation control gives poor behaviour. 0 5 10 15 20 25 -1 -0.5 0 0.5 1 1.5 ny =12 nu =4,  = 1 set point input output input output With a smaller constraint on u(k), saturation control is definitely unacceptable.
  • 17.
    Slides by AnthonyRossiter 17 Summary • A failure to take proper account of constraints during a feedback design can have several undesirable consequences. • In the best case, one could just get suboptimal behaviour but in the worst case one could break a system altogether. • Even a simple saturation policy may come badly unstuck in some scenarios, although it can be shown to be fine for some cases. There is a need to integrate constraints into the control design in a systematic fashion.
  • 18.
    © 2014 Universityof Sheffield This work is licensed under the Creative Commons Attribution 2.0 UK: England & Wales Licence. To view a copy of this licence, visit http://creativecommons.org/licenses/by/2.0/uk/ or send a letter to: Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA. It should be noted that some of the materials contained within this resource are subject to third party rights and any copyright notices must remain with these materials in the event of reuse or repurposing. If there are third party images within the resource please do not remove or alter any of the copyright notices or website details shown below the image. (Please list details of the third party rights contained within this work. If you include your institutions logo on the cover please include reference to the fact that it is a trade mark and all copyright in that image is reserved.) Anthony Rossiter Department of Automatic Control and Systems Engineering University of Sheffield www.shef.ac.uk/acse