Can you turn off/on manipulated variables at specific conditions in a MPC Controller?

Hello,
im designing an adaptive MPC Controller with two manipulated variables (MV). One of them is electric power (0-2kW) and the other one is air mass flow (0-80kg/h).
Now i need to turn off/on the second MV (air mass flow) at specific conditions. If its off, then it should be =0 and if its on, then the MPC should manipulate it within the constraints. The electric power should be manipulated the whole time.
In Simulink you can imprint the MV constraints / MV targets at specific points externally on the MPC block. For example you can say that the upper contraint should change between 0 kg/h and 80 kg/h. That works, but i feel like its not the right way.
Is there an other solution to control the MV "direct inside" the MPC, so that i can decide whether it should be manipulated or not?
Thanks

4 Comments

Just wondering, if you manually design the manipulated variables, how would you describe the mathematics of turning on/off the Air Mass Flow at specific conditions?
If you can write out the math and rules, perhaps we can find a way to call out a special constraint function for the MPC system.
I'm thinking that if you want to toggle the Air Mass Flow as you wish through customization, then you probably no longer need MPC for optimization. I'm comparing your problem to the PID Tuner. If I want to make my input ON/OFF as I wish, then I cannot use the built-in PID Tuner.
You can design the MPC using a single MV Electric Power. The 2nd MV can be turned on as a secondary actuation for backup when the performance drops.
Basically my work:
Im modeling a vehicle catalyst with a heat disk and a secondary air pump. In that case i have some inputs from the engine (exhaust temp., raw emissions, exhaust mass flow), wich are my measured disturbances (MD). Based on these, the reference (REF) and my measured outputs (MO) the adaptive MPC should manipulate the electric power of the heat disk and the air mass flow, to maintain a certain temperature level of the catalyst.
The specific condition: If the heat disk is on (electric power is manipulated) but the engine is turned off, then the air mass flow of the secondary air pump needs to be manipulated continuously. If the engine is running, then the secondary air mass flow should be =0. The electric power of the heat disk should be manipulated the whole time.
The air mass flow should not just be on/off (80 or 0kg/h). It should be manipulated continuously by the MPC or turned off like i described in the specific condition.
Thanks for the fast answer.
Thanks for your clarification, but I still don't know your system works mathematically. I think that MPC considers the input is continuous. If the engine is the state x, then you can probably do something like this:
... system that is fed into the MPC
where
is the ON/OFF switching logic is passed on the system dynamics side.
Then, your MPC can freely compute the input u without the internal constraint.
Hi,
i have a plant model, which the adaptive mpc is controlling. For the mpc i linearized my plant model and made a state space model (ss) with a script. Further the adaptive mpc needs a updater, which updates the ss model continuously. In the last step i need to discretize my updated ss model and feed it to the mpc.
Thank you for your suggestion, but what do you mean by B(x) is ON/OFF since B is the jacobian matrix B=jacobian(f,u)? f are the derivative equations (in my case the derivative of the mass temperatures) and u are the inputs (electric power, air mass flow,...).
Thanks

Sign in to comment.

 Accepted Answer

Hi, I am in a similar situations as yours.
My solution was that given the linear system:
that can be written in the from and ->
if i want to disable u1, i.e having I just pass to the Adaptive MPC the model with , thus the optimal value for u1 is
Although this is a good idea, in practice Adaptive MC keeps optimizing u1 and finding nonzero optimum, I suggest to set an hard dynamic constraint on u1= 0
I'm open to better solutions tho, setting is the most obvius approach this situation, and the fact that MPC keeps resisting logic baffles me.
EDIT:
I just tried right now, you have to set mixed input/output constraint, In my example if we want to disable
&& -> E = [1 ,0; -1, 0] F= [0;0] G=[0;0] V=[0;0].
  1. bear in mind that adaptive MPC requires E,F,G,V etc of fixed dimensions, you can't add constraints (i.e rows) during the simulation.
  2. given point 1, you might be tempted to inizialize your mpc object with constraints set to zero (E =zeros(2,2), F= [0;0] G=[0;0] V=[0;0]) to enable every Manipulated Variable. Doing so Matlab automatically deletes those empty constraints and you'll find yourself unable to add it later as online feature. Therefore, you have to initialize the constraint with every MV you plan to block already blocked (E = [1 ,0; -1, 0] ), and in your simulations ovverride it.
I hope I helped you.
Best Regards

1 Comment

Another idea is to use gain-scheduled MPC and design multiple MPC controllers with different manipulated variables as needed

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!