MPCE – Precomputed Model Predictive Controller

Block SymbolLicensing group: ADVANCED
Qt SVG Document Exported by REXYGEN Studio Xext Mreg Mtree Uref HLD Uapk E MPCE

Function Description
The MPCE block is designed for predictive control in systems where the controlled system can be modeled as linear, with constraints in the form of linear inequalities and a defined quadratic optimality criterion. For such systems, the entire state space can be divided into regions using hyperplanes, with each region having a linear optimal regulator (+ offset). Such a regulator is computationally efficient and allows for a very short sampling period, thus enabling fast control. However, speed comes at the cost of greater memory capacity needed to store tables with precomputed regulators.

Warning: The actual computation of the dividing hyperplanes and regulators is not performed directly in the REXYGEN system but externally (see example).

The Xext input represents the generalized state of the system, including the entire state, desired values, and possible disturbances (either directly measured or from some estimator). Often in real situations, not the entire state is measurable, but predictive controllers operate with it. In such cases, a state estimator must be used (in the REXYGEN system, this could be simple blocks like DER, INTE, LPF, or a complex dynamic system CSSM, DSSM, or directly EKF).

The Mreg input contains the matrices of regulators, where each line corresponds to a regulator for individual regions. The format of each regulator is u = a1x1 + a2x2 + + anxn + b, and each line in the matrix is formatted as [a1,a2,,an,b].

The Mtree input includes a search tree matrix, where each line has the format [a1,a2,,an,b,low,high]. The search process starts at the first line, and based on the result of the linear combination, it either continues at the line specified in low or high. If the next line number is negative, it indicates the end region in the regulator table, and the absolute value of the number specifies the position in the table.

Note 1: Indices in the tables/matrices are numbered from 1 (i.e., the first line has index 1).

Note 2: The index into the regulator table is the region number. If the output u has dimension N (a vector of N elements), the value must be "multiplied" by N to determine the line of the regulator for the first component of the vector u.

The Uref input receives a vector, which the block fills and passes further to the output u. The vector at the input must have the correct size set.

An error occurs (output E) if the dimensions of the matrices and vectors do not match or if the index in the search tree is out of range. Details are available in the System Log.

This block does not propagate the signal quality. More information can be found in the 1.4 section.

Input

Xext

Controlled process state vector

Reference

Mreg

Controllers matrix (each line is coeficients for u = a1*x1 + a2*x2 + ... + an*xn + b)

Reference

Mtree

Search tree matrix (each line is coeficients for a1*x1 + a2*x2 + ... + an*xn + b, next_neg_index, next_pos_index)

Reference

Uref

Alocation vector for Uapk output

Reference

HLD

Hold

Bool

Output

Uapk

Controller output vector

Reference

E

Error indicator

Bool

2025 © REX Controls s.r.o., www.rexygen.com