2

As I know, the Generalized Predictive Control(GPC) is older than Model Predictive Control(MPC).

But what is the real difference between them? I know that GPC contains some kind of system identification, which make GPC as an adaptive controller. But what if MPC has system identification too? Would that make MPC into a GPC then?

This question is from a practical point of view: What is best? MPC with Recursive Least Square or GPC?

Is GPC obsolete?

Arashium
  • 2,569
euraad
  • 3,052
  • 4
  • 35
  • 79

2 Answers2

3

GPC is essentially finite-horizon unconstrained adaptive discrete-time LQ for a particular system model. As constraint-handling is the main reason MPC has become so successful, it is not that interesting today in an MPC context.

Yes, one could consider it obsolete.

Johan Löfberg
  • 9,737
  • 1
  • 16
  • 15
  • So the QP solver is the key behind MPC, which MPC is more successfully than GPC? – euraad Jul 02 '18 at 08:23
  • Is it possible to combine RLS with MPC in the siso case ? – euraad Jul 02 '18 at 08:25
  • Not necessarily QP, but solving optimization problems to compute the inputs on-line, is the core idea in what we now call MPC. You can do almost what ever in that framework and still call it MPC, such as using a recursive algorithm to estimate the system etc. – Johan Löfberg Jul 02 '18 at 09:03
  • Ok. Then I know that MPC with RLS works fine. Then GPC must be obsolete. – euraad Jul 02 '18 at 09:17
  • Depends on what you mean with works fine. It is perfectly ok to combine them and still call it MPC, but there is basically no theory concerning stability etc, so whether it will work well is a completely different issue. – Johan Löfberg Jul 02 '18 at 09:25
  • Ok. I Thougth modern MPC was combined with Recursive system identification. My goal is to use a predictive controller who has recursive system identification. – euraad Jul 02 '18 at 09:37
  • Sure, it is combined sometimes. Just saying that there is no established theory to guarantee anything. But then again, there is no theory for GPC stability either, or basically anything beyond vanilla MPC with stabilizing constraints, which you typically don't use in practice anyway – Johan Löfberg Jul 02 '18 at 09:47
  • Good. Sounds perfect for me. I working with autotuned PID's but a got interested in adaptive controllers and now I seeking what's works and what can be done. Notice that I don't work at NASA. More like normal industry who needs new technology(20 years old = new in the industry). – euraad Jul 02 '18 at 10:00
  • Hi! Why is GPC obsolete? Can I implement MPC in 8-bit Arduino or 32-bit Arduino for fast servo systems? – euraad Jul 06 '18 at 11:07
  • GPC is obsolete in a modern MPC context, as it doesn't include constraint handling, which is the core of what we today call MPC. – Johan Löfberg Jul 08 '18 at 18:08
  • You can implement MPC in what ever processor you want, but it will of course be much harder, and you will have to work a lot harder to get it to perform (if possible at all in terms of computations, which of course depends on your coding skills vs computational performance vs required sample-rate) – Johan Löfberg Jul 08 '18 at 18:12
  • Let's assume that I have a raspberry PI with MPC to control a tank of water? It would be suprising if no one haven't try to implement a MPC into a Raspberry Pi for a local brewery. – euraad Jul 09 '18 at 00:18
  • Yes, most likely done. After all, as long as you can program a matrix-vector multiplication, you can do MPC. – Johan Löfberg Jul 09 '18 at 06:17
  • Why not use saturation on input instead of constraints? – euraad Jul 09 '18 at 12:08
  • Because that can lead to very bad and sub-optimal behavior – Johan Löfberg Jul 09 '18 at 14:02
  • Bad? According to the book "Adaptive Control" by Karl Johan Åström, saturation on inputs is a practical solution. – euraad Jul 09 '18 at 19:07
  • Yes, practically an obvious first start since it has to be done regardless of what you do, but control has evolved and there are many situations where that isn't sufficient and won't get you anywhere. – Johan Löfberg Jul 10 '18 at 05:08
  • Can you give some examples when saturation won't be a solution? According to "Adaptive Control", saturation fits the standard industrial problems such as heating liquids with a relay and hydraulical or electrical servo systems. – euraad Jul 10 '18 at 09:55
  • A very simple example is a step on a double-integrator with aggressive tuning. Saturated LQ will perform poorly. The controller drives the system too fast, and then when it is supposed to stop quickly, there is too much inertia in the system so it cannot brake as aggressively as required, and it will overshoot. – Johan Löfberg Jul 10 '18 at 10:06
  • Sounds not right to me. If you got saturation on input or constrainted limits bounds on the input, the behaviour would be the same. – euraad Jul 10 '18 at 11:30
  • Then simply test it. Why try to guess when it takes a couple of minutes to code and simulate and see that this happens. Or think from everyday experience: You have a strategy (unconstrained LQ) which optimally will run with very high voltage to accelerate a heavy wheel and then in the last second run very large negative voltage to reverse to end up in correct position.... – Johan Löfberg Jul 10 '18 at 12:09
  • ...Now you're in the situation that you have accelerated the wheel to a high velocity, and the optimal input is to apply -500 volts for 0.1 seconds to brake down to 0 velocity to land at correct position, but your battery can only supply -12 volts, and you will of course overshoot massively. If you had taken constraints into account, you would have known that -12 volts max brake power means you have to start braking much earlier. – Johan Löfberg Jul 10 '18 at 12:09
  • So constraints will give more softer behaviour? Even if it's lower bounds and upper bounds constraints? But what if we have recursive system identification and prediction. It will results a very soft behaviour? – euraad Jul 10 '18 at 14:26
  • No, not necessarily. On the contrary actually, a linear controller will always give a smooth input (as the input is a linear combination of the states which evolve exponentially), while a general optimal control signal can be of bang-bang character etc – Johan Löfberg Jul 10 '18 at 15:14
  • But why is saturation so popular at PLC's and such industrial computers? – euraad Jul 10 '18 at 15:40
  • It's odd to say that it is popular as it simply is a must in all practical situations. If you have a 12 volt motor, it does not make any sense to request more than 12 volts. – Johan Löfberg Jul 10 '18 at 16:29
  • It's not odd, it's very common in basic industrial control engineering. I have lot's of books of it. They don't say that it the optimal solution, but it is a practical solution who works. – euraad Jul 10 '18 at 20:31
  • I'm not saying that it is odd to saturate the input, I'm saying that it is a must since all systems are saturated in practice, hence weird to call it popular strategy. It's like saying it is popular to go to the bathroom. – Johan Löfberg Jul 10 '18 at 21:00
  • I notice that I have a question for that https://math.stackexchange.com/questions/2842808/saturation-limit-compared-to-constrained-limit – euraad Jul 11 '18 at 01:23
3

Exact definitions of either may vary, but generally, Model Predictive Control can handle constraints, i.e. constraints on the input signal, output signal or states. However, this requires a lot of computational power to calculate the solution to the control problem given the constraints, and the problem might even not be feasible, and one need to choose what to do in that case. GPC does not handle constraints, and is a much easier computational problem to solve. In GPC the model representation is on internal form, as opposed to state space form, which makes it possible to rather easily make an indirect adaptive controller, i.e. one where the system is identified recursively, and the controller is updated with the new system parameters, but in general GPC can also run without adaptation. Note that GPC and LQR are very similar, but GPC relies on predictions, where LQR is based on that all future control inputs also are optimal.

RS

R.S.
  • 88
  • But how do you define "lot of computational power"? Windows 95 ? – euraad Jul 02 '18 at 08:24
  • Well, it depends on the problem you need to solve and how fast you need to solve it. In general you can say that solving the constrained problem requires more calculations than solving the unconstrained problem, often orders of magnitude more. So, if you have a complicated system that needs to be controlled fast, then you do not have the time to solve the constrained problem in time, even on very fast computers. – R.S. Jul 02 '18 at 08:32
  • So if I have a robotic arm and a PLC, then I need to use GPC instead of MPC? – euraad Jul 02 '18 at 08:38
  • Depends on your requirements, in many cases it is preferred to be able to handle constraints though, hence the popularity of MPC. Common practice is to use cascaded controllers, with MPC at a higher level, and other simpler control forms at the lower level, fx. PID's. Then it should be possible to cast the problem for MPC. – R.S. Jul 02 '18 at 08:44
  • Can I combine MPC with Recursive Least Sqares? – euraad Jul 02 '18 at 08:51
  • Yes, you can do it, but it might not work due to lack of persistent excitation. Also other problems with stability may be introduced. – R.S. Jul 02 '18 at 09:16
  • Mabey I should use GPC then if I want prediction and recursive system identification? – euraad Jul 02 '18 at 09:38
  • Similar problems arise for GPC. It all depends on your system structure, sensors, disturbances, tuning and so on, it is impossible to tell what will work and which performance/robustness you will get without a thorough analysis of the system. – R.S. Jul 02 '18 at 09:57
  • When should I use GPC over MPC? – euraad Jul 02 '18 at 10:09
  • When you do not have constraints that needs to be satisfied, you have little computational power and you need to an internal model representation. However, you might still even be better off with an LQR, PID or other control structure though. – R.S. Jul 02 '18 at 10:13
  • Can't i not use saturation? – euraad Jul 02 '18 at 10:20
  • You can, on the input, but then your controller is not optimal anymore. If you need constraints on the output or internal states, this is not possible at all with GPC. With MPC, the optimization problem is solved to be optimal, under the constraints. – R.S. Jul 02 '18 at 10:23
  • Is there a problem if the controller is not optimal? I mean, would it destroy the controller? – euraad Jul 02 '18 at 10:45