Can we change the Constraints in MPC ?

Hello,
I'm using the Online feature of mpc block .i.e varying the MV constraints with simulation time.
Is it posible to change the inequality of the constraints in mpc block in matlab/simulink?
For example:
If ECR values (V) is 0 and scale factor is 1, then
default constraint is : u_min <= u <= u_max
and I would like to change to : u_min < u < u_max

Answers (1)

If you wish to define the bounds on the manipulated variable, u, such that , can you accept the following workaround?
umin = -1; % lower bound
umax = 1; % upper bound
delta = 0.0001; % user-defined, ideally should be eps(1) for double precision
MV = struct(Min = umin+delta, Max = umax-delta)
MV = struct with fields:
Min: -0.9999 Max: 0.9999

4 Comments

Thanks for your answer.
This would work in my case by adding a Bias block, but I was looking for some other alternative option.
Because if I use delta in my case, then i have to iterate it to get optimum value according to the model and add other block like switches to make it work.
If ECR values (V) is 0 and scale factor is 1, then
default constraint is : u_min <= u <= u_max
and I would like to change to : u_min < u < u_max
Strict constraints ( >, < ) cannot be imposed in any kind of optimization.
Consider the simple example
min: x
0 < x < 1
I think you are able to see the problem.
Thanks for your answer.
I understood the problem with this example
I'm not familiar with the specifics of your MPC implementation. When you mentioned performing iterations on the delta to get an optimum value according to the system model and adding other blocks like switches to make it work, this sounds more like an optimization problem rather than a generic MPC problem.

Sign in to comment.

Asked:

on 2 Jul 2024

Commented:

on 3 Jul 2024

Community Treasure Hunt

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

Start Hunting!