How can i set the discrete control set in nonlinear mpc

5 次查看(过去 30 天)
i design the MPC controller.
but i have a problem
my admissible MVs are only [ 1 2 3 4 ]
but I don't know how can i set the admissible MV.
In linear mpc, i can do it by setting the command MPCobj.MV.Type = integer,
but i don't know how to do it in nonlinear mpc

回答(1 个)

Aditya
Aditya 2024-1-17
In Nonlinear Model Predictive Control (NMPC), dealing with integer or discrete inputs (manipulated variables, MVs) is more complex than in linear MPC because the optimization problem is non-convex and typically requires specialized solvers or heuristics to handle discrete variables.
Most NMPC solvers work with continuous control inputs and do not natively support integer constraints. However, there are a few approaches you could take to handle discrete MVs in an NMPC framework:
1. Custom Optimization Solver : Use a solver that supports mixed-integer nonlinear programming (MINLP). This type of solver can handle both continuous and discrete variables. You would define your MVs as integer variables within the solver's framework and set the admissible values directly.
2. Control Input Mapping: Map the continuous control inputs to the nearest admissible MV value. This is a heuristic approach where the NMPC generates continuous control inputs, and after each optimization step, you round or map these continuous values to the nearest allowed discrete value from your set [1, 2, 3, 4]. This approach may not guarantee optimality or feasibility.
3. Penalty Method: Add a penalty term to the cost function that penalizes the control inputs for being away from the admissible set [1, 2, 3, 4]. The penalty term could be designed in such a way that it creates "wells" in the cost function around the admissible values. This method relies on the optimization algorithm to "prefer" integer values due to the penalty but does not strictly enforce them.
Unfortunately, there isn't a standard command like `MPCobj.MV.Type = integer` in nonlinear MPC frameworks because the problem becomes significantly more complex with integer constraints. You'll need to choose an approach based on your specific requirements, the capabilities of your NMPC solver, and the computational resources you have available.
If you're using a specific software or NMPC library, you should consult the documentation or community forums for that tool to see if it has built-in support for integer or discrete MVs, or if there are recommended best practices for handling such constraints.

类别

Help CenterFile Exchange 中查找有关 Refinement 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by