Algorithm Search⌘K

Problemadvanced

Closed-loop identification

Also called identification in closed loop.

Identify a plant from data taken while a feedback controller runs, where the input is correlated with the noise.

Time
O(N d^2 + d^3) worst
Where
N = the number of samples; d = the number of parameters

Closed-loop identification is the problem of building a model of a plant from data recorded while a feedback controller is running. The controller computes the input uu from the measured output yy, so uu is correlated with the disturbances that act on yy. Many methods that are consistent in open loop then fail: correlation and spectral analysis, output error fits and instrumental variables with past inputs as instruments can all converge to a wrong plant, and with no external excitation the data may not determine the plant at all. The problem is common because many plants cannot be run without their controllers for safety or economic reasons. The known answers are conditions under which a method is consistent. The direct prediction error method is consistent when the model set contains both the true plant and the true noise model and the data are informative. The indirect methods use a known controller or a measured reference signal instead.

In plain words

You want to learn how a machine responds to its input, but a controller is already holding it steady. Whenever a disturbance pushes the output up, the controller pushes the input down. In the record, the input and the disturbance move together, so it is hard to tell how much of the output came from the input and how much from the disturbance. In the worst case the record would look the same for many different machines. Two things help. You can add a small known test signal to the setpoint, which moves the input for reasons that have nothing to do with the disturbance. And you can use a method that models the disturbance as well, so that its effect is not blamed on the input.

Definition

Time is discrete, k=1,…,Nk = 1, \ldots, N, with sampling period hh and shift operator qq. The data come from the loop

y(k)=G0(q) u(k)+H0(q) e(k),u(k)=r(k)−K(q) y(k),y(k) = G_0(q)\, u(k) + H_0(q)\, e(k), \qquad u(k) = r(k) - K(q)\, y(k),

where ee is white noise, rr is an external signal independent of ee (a setpoint change or an added test signal), and the controller KK is linear. The loop must be well posed, which holds if G0KG_0 K has a delay, and internally BIBO stable. With the sensitivity function S0=1/(1+G0K)S_0 = 1/(1 + G_0 K),

y=S0G0 r+S0H0 e,u=S0 r−KS0H0 e.y = S_0 G_0\, r + S_0 H_0\, e, \qquad u = S_0\, r - K S_0 H_0\, e.

The second equation shows the difficulty: unless K=0K = 0, uu depends on ee.

The question. Given {y(k),u(k)}\{y(k), u(k)\}, and possibly rr or KK, and a model set {G(q,θ),H(q,θ)}\{G(q, \theta), H(q, \theta)\}, return an estimate θ^N\hat\theta_N such that G(q,θ^N)G(q, \hat\theta_N) converges to G0G_0, or, when G0G_0 is not in the model set, to an approximation with a known frequency weighting. The noise model HH may or may not be of interest.

Informative data. The closed-loop data are informative for the model set if two models that give the same limit prediction errors on them have the same GG and HH (Ljung 1999, Section 13.4). A persistently exciting uu is not enough, because uu may be a filter of yy.

Variants

  • Known or unknown controller. The indirect methods need KK exactly. The direct method does not use it.
  • Measured or absent reference. With r=0r = 0 the only excitation is the noise, and the data are informative only for some controllers. With a measured rr, the joint input-output and two-stage methods become available.
  • Linear or nonlinear, fixed or time-varying feedback. A time-varying or nonlinear controller, or switching between two linear controllers, can make the data informative even with r=0r = 0.
  • Consistency of GG only. In some uses only the plant matters; then methods that do not need a correct noise model are preferred.
  • Recursive closed-loop identification. The self-tuning regulator and other adaptive controllers identify the plant online while their own feedback acts on it.

Examples

  1. No external signal (theorem). For y(k)+a y(k−1)=b u(k−1)+e(k)y(k) + a\, y(k-1) = b\, u(k-1) + e(k) and u(k)=−c y(k)u(k) = -c\, y(k), the output obeys y(k)+(a+bc) y(k−1)=e(k)y(k) + (a + bc)\, y(k-1) = e(k), and the ARX predictor y^(k)=−a^ y(k−1)+b^ u(k−1)=−(a^+b^c) y(k−1)\hat y(k) = -\hat a\, y(k-1) + \hat b\, u(k-1) = -(\hat a + \hat b c)\, y(k-1) depends only on a^+b^c\hat a + \hat b c. Every pair on the line a^+b^c=a+bc\hat a + \hat b c = a + bc fits equally well. For a=−0.8a = -0.8, b=1b = 1 and c=0.5c = 0.5 the data give only a+bc=−0.3a + bc = -0.3, the negative of the closed-loop pole 0.30.3, and the least squares normal matrix is singular because u(k−1)=−0.5 y(k−1)u(k-1) = -0.5\, y(k-1).
  2. An added reference (measurement). In the same loop with u(k)=r(k)−0.5 y(k)u(k) = r(k) - 0.5\, y(k), a white ±1\pm 1 signal rr, unit noise and N=20000N = 20000, direct least squares on (y,u)(y, u) gave (a^,b^)=(−0.7989,0.9886)(\hat a, \hat b) = (-0.7989, 0.9886). The true system is ARX, so the model set contains both G0G_0 and H0H_0, and the direct method is consistent. Identifying the closed loop from rr to yy gave y(k)−0.3046 y(k−1)=0.9886 r(k−1)y(k) - 0.3046\, y(k-1) = 0.9886\, r(k-1), and solving b^=0.9886\hat b = 0.9886, a^=−0.3046−0.5 b^=−0.7989\hat a = -0.3046 - 0.5\, \hat b = -0.7989 gave the same numbers: for an ARX model with a known proportional controller, the indirect estimate equals the direct one, because the two regressor vectors are related by a fixed invertible matrix.
  3. A wrong noise model (measurement). On the same data, an output error fit bq−1/(1+fq−1)b q^{-1}/(1 + f q^{-1}) by the direct method gave b^=0.4978\hat b = 0.4978 and f^=−0.5532\hat f = -0.5532, far from the true b=1b = 1 and f=−0.8f = -0.8. In open loop the same fit would be consistent; in closed loop the noise model H=1H = 1 is wrong, and the correlation between uu and ee biases GG.

Known algorithms

  • Direct method. Apply the prediction error method to (y,u)(y, u) as if the loop were open. Cost O(Nd2+d3)O(N d^2 + d^3) per Gauss-Newton step.
  • Indirect method. Identify the closed-loop map from rr to yy in open loop, then solve for GG with the known KK: for u=K(r−y)u = K(r - y) the closed loop is T=GK/(1+GK)T = G K/(1 + G K), so G=T/(K(1−T))G = T / \big(K (1 - T)\big).
  • Joint input-output method. Identify the maps from rr to yy and from rr to uu, both open-loop problems, and take G=Gyr/GurG = G_{yr}/G_{ur}. The controller need not be known.
  • Two-stage and projection methods. First estimate the part of uu caused by rr, the noise-free input S0rS_0 r, and then fit an output error model from that signal to yy.
  • Instrumental variables with the reference as instrument. Instruments built from past values of rr are uncorrelated with ee and correlated with the regressor. In example 2 with the instruments r(k−1)r(k-1) and r(k−2)r(k-2) the estimate was (−0.8014,0.9885)(-0.8014, 0.9885).

Bounds

As in open loop, there is no exact complexity; each method costs about what its open-loop version costs in the real RAM, O(Nd2+d3)O(N d^2 + d^3) for one linear solve or one Gauss-Newton step. What is known are conditions for consistency and expressions for the variance.

  • Consistency of the direct method (theorem). If the model set contains G0G_0 and H0H_0, the data are informative and the loop has a delay, the direct prediction error estimate is consistent for GG and HH (Forssell and Ljung 1999; Ljung 1999, Section 13.4). It is also efficient, with the open-loop covariance formula.
  • Bias of the direct method (theorem). If the noise model is wrong, the limit of GG is biased by a term proportional to the correlation between uu and ee in the loop. The bias is small when the noise is small compared with the part of uu caused by rr, or when the noise model is close to the truth (Forssell and Ljung 1999).
  • Consistency of the indirect and joint methods (theorem). These methods are consistent for GG when the closed-loop maps from rr are estimated consistently, which holds with any fixed noise model because rr is independent of ee. The indirect method needs the controller exactly.
  • Variance (theorem). For high model orders nn, the variance of the estimated frequency response is about nNΦv(ω)/Φur(ω)\frac{n}{N} \Phi_v(\omega) / \Phi_u^r(\omega), where Φv\Phi_v is the disturbance spectrum and Φur=∣S0∣2Φr\Phi_u^r = \lvert S_0 \rvert^2 \Phi_r is the part of the input spectrum caused by rr (Forssell and Ljung 1999). In open loop the whole input spectrum takes the place of Φur\Phi_u^r; feedback spends part of the input on rejecting noise, and in this high-order expression that part does not reduce the variance.
  • Informativeness without rr (theorem). With r=0r = 0 and a fixed linear controller, the data are informative only if the controller is complex enough compared with the model orders; a simple proportional controller is not, as example 1 shows (Gustavsson, Ljung and Söderström 1977).

Reductions

  • Indirect to open loop. Since rr is independent of ee, the map from rr to yy is an open-loop identification problem, and the plant follows from it by algebra with the known KK.
  • Joint input-output to two open-loop problems. The maps from rr to yy and from rr to uu are two open-loop problems with the same input.
  • Direct to open loop with a full noise model. With a correct noise model the direct method uses exactly the open-loop prediction error criterion; only the conditions for informative data change.

Applications

  • Re-identifying a plant in the process industry without opening the loop, for retuning or for model predictive control.
  • Identification for control: iterating between identification and controller design, so that the model is accurate where the closed loop needs it.
  • Adaptive control and the self-tuning regulator, where identification always runs in closed loop.
  • Plants that are unstable without feedback, such as some flight dynamics and magnetic levitation, where open-loop experiments are impossible.

References

  1. Lennart Ljung, System Identification: Theory for the User, second edition, Prentice Hall, 1999, Chapter 13, Section 13.4 (identification in closed loop: identifiability, informative experiments and the direct, indirect and joint input-output approaches)
  2. Urban Forssell and Lennart Ljung, Closed-loop identification revisited, Automatica 35(7), 1215-1241, 1999, the classification into direct, indirect and joint input-output methods, and their bias and variance
  3. Ivar Gustavsson, Lennart Ljung and Torsten Söderström, Identification of processes in closed loop: identifiability and accuracy aspects, Automatica 13(1), 59-75, 1977, the identifiability of systems under feedback, with and without an external signal
  4. Torsten Söderström and Petre Stoica, System Identification, Prentice Hall, 1989, the chapter on identification of systems operating in closed loop

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a known algorithm
  • a contract.yaml