controller state estimation -凯发k8网页登录

main content

controller state estimation

controller state variables

as the controller operates, it uses its current state, xc, as the basis for predictions. by definition, the state vector is the following:

xct(k)=[xpt(k)xidt(k)xodt(k)xnt(k)].

here,

  • xc is the controller state, comprising nxp nxid nxod nxn state variables.

  • xp is the plant model state vector, of length nxp.

  • xid is the input disturbance model state vector, of length nxid.

  • xod is the output disturbance model state vector, of length nxod.

  • xn is the measurement noise model state vector, of length nxn.

thus, the variables comprising xc represent the models appearing in the following diagram of the mpc system.

some of the state vectors may be empty. if not, they appear in the sequence defined within each model.

by default, the controller updates its state automatically using the latest plant measurements. see state estimation for details. alternatively, the custom state estimation feature allows you to update the controller state using an external procedure, and then supply these values to the controller. see custom state estimation for details.

state observer

combination of the models shown in the diagram yields the state observer:

xc(k 1)=axc(k) buo(k)y(k)=cxc(k) duo(k).

mpc controller uses the state observer in the following ways:

  • to estimate values of unmeasured states needed as the basis for predictions (see state estimation).

  • to predict how the controller’s proposed manipulated variable (mv) adjustments will affect future plant output values (see output variable prediction).

the observer’s input signals are the dimensionless plant manipulated and measured disturbance inputs, and the white noise inputs to the disturbance and noise models:

uot(k)=[ut(k)vt(k)widt(k)wodt(k)wnt(k)].

the observer’s outputs are the ny dimensionless plant outputs.

in terms of the parameters defining the four models shown in the diagram, the observer’s parameters are:

a=[apbpdcid000aid0000aod0000an],b=[bpubpvbpddid0000bid00000bod00000bn]c=[cpdpdcidcod[cn0]],d=[0dpvdpddiddod[dn0]].,

here, the plant and output disturbance models are resequenced so that the measured outputs precede the unmeasured outputs.

state estimation

in general, the controller states are unmeasured and must be estimated. by default, the controller uses a steady-state kalman filter that derives from the state observer.

at the beginning of the kth control interval, the controller state is estimated with the following steps:

  1. obtain the following data:

    • xc(k|k–1) — controller state estimate from previous control interval, k–1

    • uact(k–1) — manipulated variable (mv) actually used in the plant from k–1 to k (assumed constant)

    • uopt(k–1) — optimal mv recommended by mpc and assumed to be used in the plant from k–1 to k

    • v(k) — current measured disturbances

    • ym(k) — current measured plant outputs

    • bu, bv — columns of observer parameter b corresponding to u(k) and v(k) inputs

    • cm — rows of observer parameter c corresponding to measured plant outputs

    • dmv — rows and columns of observer parameter d corresponding to measured plant outputs and measured disturbance inputs

    • l, m — constant kalman gain matrices

    plant input and output signals are scaled to be dimensionless prior to use in calculations.

  2. revise xc(k|k–1) when uact(k–1) and uopt(k–1) are different.

    xcrev(k|k1)=xc(k|k1) bu[uact(k1)uopt(k1)]

  3. compute the innovation.

    e(k)=ym(k)[cmxcrev(k|k1) dmvv(k)]

  4. update the controller state estimate to account for the latest measurements.

    xc(k|k)=xcrev(k|k1) me(k)

    then, the software uses the current state estimate xc(k|k) to solve the quadratic program at interval k. the solution is uopt(k), the mpc-recommended manipulated-variable value to be used between control intervals k and k 1.

    finally, the software prepares for the next control interval assuming that the unknown inputs, wid(k), wod(k), and wn(k) assume their mean value (zero) between times k and k 1. the software predicts the impact of the known inputs and the innovation as follows:

    xc(k 1|k)=axcrev(k|k1) buuopt(k) bvv(k) le(k)

built-in steady-state kalman gains calculation

model predictive control toolbox™ software uses the command to calculate kalman estimator gains l and m. the following assumptions apply:

  • state observer parameters a, b, c, d are time-invariant.

  • controller states, xc, are detectable. (if not, or if the observer is numerically close to undetectability, the kalman gain calculation fails, generating an error message.)

  • stochastic inputs wid(k), wod(k), and wn(k) are independent white noise, each with zero mean and identity covariance.

  • additional white noise wu(k) and wv(k) with the same characteristics adds to the dimensionless u(k) and v(k) inputs respectively. this improves estimator performance in certain cases, such as when the plant model is open-loop unstable.

without loss of generality, set the u(k) and v(k) inputs to zero. the effect of the stochastic inputs on the controller states and measured plant outputs is:

xc(k 1)=axc(k) bw(k)ym(k)=cmxc(k) dmw(k).

here,

wt(k)=[wut(k)wvt(k)widt(k)wodt(k)wnt(k)].

inputs to the kalman command are the state observer parameters a, cm, and the following covariance matrices:

q=e{bwwtbt}=bbtr=e{dmwwtdmt}=dmdmtn= e{bwwtdmt}=bdmt.

here, e{...} denotes the expectation.

output variable prediction

model predictive control requires prediction of noise-free future plant outputs used in optimization. this is a key application of the state observer (see state observer).

in control interval k, the required data are as follows:

  • p — prediction horizon (number of control intervals, which is greater than or equal to 1)

  • xc(k|k) — controller state estimates (see state estimation)

  • v(k) — current measured disturbance inputs (mds)

  • v(k i|k) — projected future mds, where i=1:p–1. if you are not using md previewing, then v(k i|k) = v(k).

  • a, bu, bv, c, dv — state observer constants, where bu, bv, and dv denote columns of the b and d matrices corresponding to inputs u and v. du is a zero matrix because of no direct feedthrough

predictions assume that unknown white noise inputs are zero (their expectation). also, the predicted plant outputs are to be noise-free. thus, all terms involving the measurement noise states disappear from the state observer equations. this is equivalent to zeroing the last nxn elements of xc(k|k).

given the above data and simplifications, for the first step the state observer predicts:

xc(k 1|k)=axc(k|k) buu(k|k) bvv(k).

continuing for successive steps, i = 2:p, the state observer predicts:

xc(k i|k)=axc(k i1|k) buu(k i1|k) bvv(k i1|k).

at any step, i = 1:p, the predicted noise-free plant outputs are:

y(k i|k)=cxc(k i|k) dvv(k i|k).

all of these equations employ dimensionless plant input and output variables. see . the equations also assume zero offsets. inclusion of nonzero offsets is straightforward.

for faster computations, the mpc controller uses an alternative form of the above equations in which constant terms are computed and stored during controller initialization. see .

see also

functions

  • | | |

objects

blocks

related examples

more about

网站地图