Lecture 7 Open-loop & closedloop experiments The Bias Formula goes closed-loop and the returns
Closed-loop vs open-loop Open-loop system disturbance Feedback-free system input output Control input independent from Plant + the disturbance process Independent external loop signals are input and disturbance Closed-loop system Not necessarily open-loop Independent external loop signals are reference and disturbance disturbance reference + input Controller Plant + output 2
Bias formula redux Prediction error formula ε θ,t = H θ (q) 1 {[G 0 (q) G θ (q)] u t +[H 0 (q) H θ (q)] e t } + e t = H 1 θ (G0 G θ ) (H 0 H θ ) u t + e e t t now apply the vector Parseval Theorem Φ εε (ω, θ) = 1 (G0 G H θ 2 θ ) (H 0 H θ ) write define Φuu Φ eu Φ ue Φ ee B(e jω, θ) = = I 0 Φ eu I Φ uu Φuu Φ eu Φ uu 0 0 λ Φ eu 2 H0 (e jω ) H θ (e jω ) Φ ue (ω) Φ uu (ω) Φ εε (ω, θ) = G 0 + B θ G θ 2 Φ uu H θ 2 + Φ uu Φ ue ( Ḡ 0 Ḡθ) Φ ee ( H 0 H + λ θ ) I Φ ue Φ uu 0 I H 0 H θ 2 λ Φ ue 2 Φ uu H θ 2 + λ 3
Closed-loop bias formula Φ εε (ω, θ) = G 0 + B θ G θ 2 Φ uu H θ 2 + H 0 H θ 2 λ Φ ue 2 Φ uu H θ 2 + λ H0 (e jω ) H θ (e jω ) Φ ue (ω) The model fit now has an extra bias term B(e jω, θ) = Φ uu (ω) This is zero in open loop It affects the quality of plant model fit if it is large It is associated with direct identification where the data are as in open loop{y t,u t,y t 1,u t 1,...,y 1,u 1 } We see a number of effects due to the correlation Surprisingly, it is no problem if we know the true noise model We do not need to know the feedback controller There are a number of alternative system identification approaches in closed loop 4
Closed-loop identification approaches 5
Closed-loop identification approaches Direct approach: fit a PE model between input and output data 5
Closed-loop identification approaches Direct approach: fit a PE model between input and output data Simple but problems with bias unless disturbance model known 5
Closed-loop identification approaches Direct approach: fit a PE model between input and output data Simple but problems with bias unless disturbance model known Indirect approach: fit a PE model between reference and output then reconstruct the open-loop plant and disturbance models 5
Closed-loop identification approaches Direct approach: fit a PE model between input and output data Simple but problems with bias unless disturbance model known Indirect approach: fit a PE model between reference and output then reconstruct the open-loop plant and disturbance models Requires exact knowledge of and linear controller 5
Closed-loop identification approaches Direct approach: fit a PE model between input and output data Simple but problems with bias unless disturbance model known Indirect approach: fit a PE model between reference and output then reconstruct the open-loop plant and disturbance models Requires exact knowledge of and linear controller Joint approach: fit a PE model between reference and (input, output) and reconstruct the plant and disturbance model 5
Closed-loop identification approaches Direct approach: fit a PE model between input and output data Simple but problems with bias unless disturbance model known Indirect approach: fit a PE model between reference and output then reconstruct the open-loop plant and disturbance models Requires exact knowledge of and linear controller Joint approach: fit a PE model between reference and (input, output) and reconstruct the plant and disturbance model Includes two-stage methods with good properties 5
Closed-loop identification approaches Direct approach: fit a PE model between input and output data Simple but problems with bias unless disturbance model known Indirect approach: fit a PE model between reference and output then reconstruct the open-loop plant and disturbance models Requires exact knowledge of and linear controller Joint approach: fit a PE model between reference and (input, output) and reconstruct the plant and disturbance model Includes two-stage methods with good properties The last two approaches rely on independence of reference and noise 5
An alternative direct bias formula Direct prediction error Closed-loop signals Filtered prediction error y t = u t = ε θ,t = H 1 θ (q)[y t G θ (q)u t ] G 0 C 1+G 0 C r t + C 1+G 0 C r t 1 1+G 0 C C 1+G 0 C ε f θ,t = L H θ (G0 G θ ) 1+G 0 C Cr t + 1+G θc 1+G 0 C ˆθ = arg min θ π π (G 0 G θ ) 1+G 0 C C 2 Φ rr + 1+G θ C 1+G 0 C 2 Φ vv L H θ 2 dω 6
Closed-loop direct identification B(e jω H0 (e jω ) H θ (e jω ) Φ ue (ω), θ) = Φ uu (ω) Φ εε (ω, θ) = G 0 + B θ G θ 2 Φ H 0 H θ 2 λ Φ ue 2 uu Φ uu H θ 2 + H θ 2 + λ We have bias in the plant model But we start to see control oriented features ˆθ = arg min θ π π (G 0 G θ ) 1+G 0 C C We match closed-loop sensitivity functions (G 0 G θ )C (1 + G 0 C)(1 + G θ C) 2 = = Φ rr + 1+G θ C 1+G 0 C G 0 C 1+G 0 C G θc 1+G θ C 1 1+G 0 C 1 1+G θ C 2 Φ vv L H θ 2 dω if we choose L = 7 H θ 1+G θ C which is known to us
Indirect methods in closed loop Since the reference and the disturbance are independent identify G cl = G 0 C 1+G 0 C from y t = G 0 C 1+G 0 C r t + 1 1+G 0 C using PEM G cl then compute Ĝ 0 = C(1 G cl ) H 0 Repeat for H cl = and 1+G 0 C Ĥ 0 = H cl 1 G cl Requires precise knowledge of and invertibility of the controller Hard to manage the distribution of modeling approximation error Sometimes this method is called tailor-made parametrization 8
Two-stage closed-loop identification Due to Paul Van den Hof and Ruud Schrama 1993 (Automatica) C Note that u t = 1+G 0 C r C t 1+G 0 C = u r t + u and that these signal components are independent Also note that G 0 C y t = 1+G 0 C r 1 t + 1+G 0 C = G 0 u r t C 1 u Stage 1: Identify the plant between reference and input 1+G 0 C Stage 2: Construct signal u r C t = and fit between and 1+G 0 C r t Ĝ 0 y t Stage 1 can be high-order for better accuracy, no bias term Input spectrum shaped by achieved sensitivity function C u r t 9
Coprime factor identification Assume we have a stable closed loop with the real plant G 0 Suppose we know another plant model G which is stabilized by Then we may write coprime factor descriptions of G and C C G = N D C = X Y where the factors are stable proper transfer function Without loss of generality we can assume Since G 0 is also stabilized by C, it can be written for some stable proper transfer function R Let s try to estimate R NX + DY =1 G 0 = N + RY D RX 10
Coprime factor identification Known G = N D C = X Y Find G 0 = N + RY D RX Hansen, Franklin and Kosut noted the following Create signals and α t = Xr t β t = Dy t Nu t = Rα t +(D RX)He t [simple algebra yields this relation] Now fit the Youla-Kucera parameter transfer function R θ and the noise model by minimizing the filtered prediction error ε f θ,t = Y (β t R θ α t ) G0 C = 1 G 0 C GC r t + 1+GC 1 1+G 0 C H 0e t Filtered reference and data signals yield independent Freedom from bias, control-relevant (α t, β t ) 11
Conclusion Identification from closed-loop data requires some care Three approaches considered Direct - ignore the closed loop and plough ahead bias issues depending on the quality of noise model control-relevance possible Indirect - identify the closed loop and solve for open loop numerically dicey, bias question gone Joint - regard the control and output signals jointly as function of the independent reference signal and disturbance bias resolved, control-relevance possible has been shown to work well in practice 12