MPC#
Solves a condensed QP every clock step (A, B, Q, R, N, u bounds from a JSON file).
mpc · control · no feedthrough: a feedback loop may pass through it
MPCfn
y
u
ref
status
x0
iterations
solve_time
file
max_time0
max_iter4000
The model is a JSON file on the block:
{ "A": [[1]], "B": [[1]], "Q": [[1]], "R": [[0.1]], "N": 20, "u_min": [-1], "u_max": [1] }
It is condensed into one QP over the horizon N and solved by the optimization toolkit every step.
Inputs#
Port |
Type |
Unit |
Components |
|---|---|---|---|
|
numbers |
— |
— |
|
numbers |
— |
— |
|
numbers |
— |
— |
Outputs#
Port |
Type |
Unit |
Components |
|---|---|---|---|
|
numbers |
— |
— |
|
text |
— |
— |
|
signal |
— |
— |
|
signal |
— |
— |
Parameters#
Param |
Type |
Default |
Options or unit |
|---|---|---|---|
|
file |
— |
— |
|
number |
|
— |
|
number |
|
— |