Algorithm Search⌘K

Theoremintro

Variation of constants formula

Also called Lagrange formula for linear systems, convolution solution of the state equation.

The state of x' = Ax + Bu is e^(At)x(0) plus the integral of e^(A(t-s))Bu(s), the free response plus the forced response.

The variation of constants formula gives the solution of the linear state equation x˙=Ax+Bu\dot x = A x + B u in closed form: x(t)=eA(t−t0)x(t0)+∫t0teA(t−s)Bu(s) dsx(t) = e^{A(t - t_0)} x(t_0) + \int_{t_0}^{t} e^{A(t - s)} B u(s)\, ds. The first term is the free response to the initial state, and the second is the forced response to the input, a convolution of the input with eAtBe^{At} B. The formula holds for every locally integrable input, and with the state-transition matrix Φ(t,s)\Phi(t, s) in place of eA(t−s)e^{A(t - s)} it also holds for time-varying systems. Most results on linear systems start from it: the impulse response, the transfer matrix, the zero-order hold discretization and the controllability gramian.

Statement

Theorem (time-invariant). Let A∈Rn×nA \in \mathbb{R}^{n \times n}, B∈Rn×mB \in \mathbb{R}^{n \times m}, C∈Rp×nC \in \mathbb{R}^{p \times n} and D∈Rp×mD \in \mathbb{R}^{p \times m}. Let u:[t0,∞)→Rmu : [t_0, \infty) \to \mathbb{R}^m be locally integrable, for example piecewise continuous. Then for every x0∈Rnx_0 \in \mathbb{R}^n the initial value problem

x˙(t)=Ax(t)+Bu(t),x(t0)=x0\dot x(t) = A x(t) + B u(t), \qquad x(t_0) = x_0

has exactly one solution in the sense of Carathéodory (an absolutely continuous xx that satisfies the equation for almost every tt), and it is

x(t)=eA(t−t0)x0+∫t0teA(t−s)Bu(s) ds,t≥t0.x(t) = e^{A(t - t_0)} x_0 + \int_{t_0}^{t} e^{A(t - s)} B u(s)\, ds, \qquad t \ge t_0.

The output y=Cx+Duy = C x + D u is

y(t)=CeA(t−t0)x0+∫t0tCeA(t−s)Bu(s) ds+Du(t).y(t) = C e^{A(t - t_0)} x_0 + \int_{t_0}^{t} C e^{A(t - s)} B u(s)\, ds + D u(t).

If uu is continuous, xx is C1C^1 and satisfies the equation at every tt.

Theorem (time-varying). Let A(⋅)A(\cdot) and B(⋅)B(\cdot) be continuous on an interval JJ that contains t0t_0, let Φ\Phi be the state-transition matrix of x˙=A(t)x\dot x = A(t) x, and let uu be locally integrable on JJ. Then the unique solution of x˙=A(t)x+B(t)u\dot x = A(t) x + B(t) u, x(t0)=x0x(t_0) = x_0, is

x(t)=Φ(t,t0)x0+∫t0tΦ(t,s)B(s)u(s) ds,t∈J.x(t) = \Phi(t, t_0) x_0 + \int_{t_0}^{t} \Phi(t, s) B(s) u(s)\, ds, \qquad t \in J.

Discrete time. For xk+1=Axk+Bukx_{k+1} = A x_k + B u_k, xk=Akx0+∑j=0k−1Ak−1−jBujx_k = A^k x_0 + \sum_{j=0}^{k-1} A^{k-1-j} B u_j. This follows by induction on kk.

In plain words

A linear system responds to two things: where it starts and how it is pushed. Because the system is linear, these two effects simply add. The start fades or grows on its own, as the free motion of the system dictates. Each small push at an earlier moment also sets off its own free motion, which by now has run for the time since that push. The present state is the free motion from the start plus the sum of the free motions from all earlier pushes. The name comes from the method of proof: take the solution without input, and let its constants vary in time so that it also fits the input.

Proof

Time-invariant case. Recall that ddte−At=−Ae−At=−e−AtA\frac{d}{dt} e^{-At} = -A e^{-At} = -e^{-At} A, and that e−Ate^{-At} is the inverse of eAte^{At} (see matrix exponential).

Existence. Define x(t)x(t) by the formula. Write it as x(t)=eA(t−t0)c(t)x(t) = e^{A(t - t_0)} c(t) with c(t)=x0+∫t0te−A(s−t0)Bu(s) dsc(t) = x_0 + \int_{t_0}^t e^{-A(s - t_0)} B u(s)\, ds. This is the "variation of the constant" cc: without the integral, c=x0c = x_0 and xx is the free solution. Since uu is locally integrable and e−A(s−t0)e^{-A(s - t_0)} is continuous, cc is absolutely continuous, and by the Lebesgue differentiation theorem c˙(t)=e−A(t−t0)Bu(t)\dot c(t) = e^{-A(t - t_0)} B u(t) for almost every tt. The product rule gives, for almost every tt,

x˙(t)=AeA(t−t0)c(t)+eA(t−t0)e−A(t−t0)Bu(t)=Ax(t)+Bu(t),\dot x(t) = A e^{A(t - t_0)} c(t) + e^{A(t - t_0)} e^{-A(t - t_0)} B u(t) = A x(t) + B u(t),

and x(t0)=c(t0)=x0x(t_0) = c(t_0) = x_0. If uu is continuous, cc is C1C^1 by the fundamental theorem of calculus, and the equation holds at every tt.

Uniqueness. Let xx be any Carathéodory solution and put z(t)=e−A(t−t0)x(t)z(t) = e^{-A(t - t_0)} x(t). Then zz is absolutely continuous and, for almost every tt,

z˙=−Ae−A(t−t0)x+e−A(t−t0)(Ax+Bu)=e−A(t−t0)Bu(t),\dot z = -A e^{-A(t - t_0)} x + e^{-A(t - t_0)} (A x + B u) = e^{-A(t - t_0)} B u(t),

because AA commutes with e−A(t−t0)e^{-A(t - t_0)}. An absolutely continuous function is the integral of its derivative, so z(t)=x0+∫t0te−A(s−t0)Bu(s) dsz(t) = x_0 + \int_{t_0}^t e^{-A(s - t_0)} B u(s)\, ds. Multiplying by eA(t−t0)e^{A(t - t_0)} and using eA(t−t0)e−A(s−t0)=eA(t−s)e^{A(t - t_0)} e^{-A(s - t_0)} = e^{A(t - s)} gives the formula. So every solution equals it.

The output formula follows by substitution into y=Cx+Duy = C x + D u.

Time-varying case. The same two steps work with Φ(t,t0)\Phi(t, t_0) in place of eA(t−t0)e^{A(t - t_0)}. The needed facts are ∂tΦ(t,t0)=A(t)Φ(t,t0)\partial_t \Phi(t, t_0) = A(t) \Phi(t, t_0), ∂tΦ(t0,t)=−Φ(t0,t)A(t)\partial_t \Phi(t_0, t) = -\Phi(t_0, t) A(t) and Φ(t,t0)Φ(t0,s)=Φ(t,s)\Phi(t, t_0) \Phi(t_0, s) = \Phi(t, s); they are on the state-transition matrix page. With z(t)=Φ(t0,t)x(t)z(t) = \Phi(t_0, t) x(t) one gets z˙=Φ(t0,t)B(t)u(t)\dot z = \Phi(t_0, t) B(t) u(t), and the rest is the same. □\square

Consequences

  • Superposition. The free response is linear in x0x_0, and the forced response is linear in uu. The response to (x0,u)(x_0, u) is the sum of the response to (x0,0)(x_0, 0) and to (0,u)(0, u). Each is a theorem, not an approximation.
  • Impulse response and transfer matrix. With x0=0x_0 = 0 and t0=0t_0 = 0, y=g∗uy = g * u with g(t)=CeAtBg(t) = C e^{At} B for t>0t > 0, plus the direct term DuD u. So the impulse response of the state model is CeAtB+Dδ(t)C e^{At} B + D \delta(t), and the forced response is a convolution. The Laplace transform of CeAtB+DδC e^{At} B + D \delta is C(sI−A)−1B+DC (sI - A)^{-1} B + D, the transfer function matrix. The coefficients CAkBC A^{k} B of its expansion are the Markov parameters.
  • Zero-order hold. If uu is constant on [kh,(k+1)h)[kh, (k+1)h), the formula on one interval gives xk+1=eAhxk+∫0heAsds Bukx_{k+1} = e^{Ah} x_k + \int_0^h e^{As} ds\, B u_k. This is the exact discrete model of zero-order hold discretization.
  • Reachable states and the gramian. From x0=0x_0 = 0, x(T)=∫0TeA(T−s)Bu(s) dsx(T) = \int_0^T e^{A(T - s)} B u(s)\, ds. The input u(s)=BTeAT(T−s)ηu(s) = B^T e^{A^T (T - s)} \eta gives x(T)=W(T)ηx(T) = W(T) \eta with W(T)=∫0TeAτBBTeATτdτW(T) = \int_0^T e^{A\tau} B B^T e^{A^T \tau} d\tau, the controllability gramian. This is the start of the proof that (A,B)(A, B) is controllable if and only if W(T)W(T) is invertible.
  • Bounds. If AA is Hurwitz with ∥eAt∥≤ce−αt\|e^{At}\| \le c e^{-\alpha t}, then ∥x(t)∥≤ce−α(t−t0)∥x0∥+cα∥B∥sup⁡s∥u(s)∥\|x(t)\| \le c e^{-\alpha (t - t_0)} \|x_0\| + \frac{c}{\alpha} \|B\| \sup_{s} \|u(s)\|. So a bounded input gives a bounded state, and the effect of the initial state decays exponentially. This is the linear case of input-to-state stability.
  • Perturbed systems. For x˙=Ax+g(t,x)\dot x = A x + g(t, x), the formula with BuB u replaced by g(t,x(t))g(t, x(t)) turns the equation into an integral equation, x(t)=eA(t−t0)x0+∫t0teA(t−s)g(s,x(s)) dsx(t) = e^{A(t - t_0)} x_0 + \int_{t_0}^t e^{A(t - s)} g(s, x(s))\, ds. With the Grönwall inequality this gives the proof of Lyapunov's indirect method when ∥g(t,x)∥≤γ∥x∥\|g(t, x)\| \le \gamma \|x\| for small ∥x∥\|x\| and γ\gamma is small enough. It is also the starting point of exponential integrators in numerical analysis.
  • Step response. For u(t)=uˉu(t) = \bar u constant and invertible AA, x(t)=eAtx0+A−1(eAt−I)Buˉx(t) = e^{At} x_0 + A^{-1}(e^{At} - I) B \bar u. For a Hurwitz AA this tends to −A−1Buˉ-A^{-1} B \bar u, and the static gain is −CA−1B+D-C A^{-1} B + D.

Example. Take the scalar system x˙=−x+u\dot x = -x + u with x(0)=2x(0) = 2 and u(t)=1u(t) = 1. The formula gives x(t)=2e−t+∫0te−(t−s)ds=2e−t+1−e−t=1+e−tx(t) = 2 e^{-t} + \int_0^t e^{-(t - s)} ds = 2 e^{-t} + 1 - e^{-t} = 1 + e^{-t}. Check: x˙=−e−t\dot x = -e^{-t} and −x+u=−1−e−t+1=−e−t-x + u = -1 - e^{-t} + 1 = -e^{-t}. At t=1t = 1, x=1.3679x = 1.3679: the free response 2e−1=0.73582e^{-1} = 0.7358 plus the forced response 1−e−1=0.63211 - e^{-1} = 0.6321.

Tightness

  • Linearity is needed. For a nonlinear x˙=f(x)+Bu\dot x = f(x) + B u the free and forced responses do not add, and the integral form above is an equation in xx, not a formula. For x˙=−x3+u\dot x = -x^3 + u with x(0)=1x(0) = 1 and u=1u = 1, the solution stays at x=1x = 1. The free response from x(0)=1x(0) = 1 with u=0u = 0 is 1/1+2t1/\sqrt{1 + 2t}, which is 0.57740.5774 at t=1t = 1. The forced response from x(0)=0x(0) = 0 with u=1u = 1 is 0.82300.8230 at t=1t = 1 (RK4 with step 0.001). Their sum is 1.40041.4004, not 1.
  • The input must be locally integrable. For x˙=u\dot x = u with u(t)=1/tu(t) = 1/t on (0,1](0, 1] and x(0)=0x(0) = 0, the integral ∫0tds/s\int_0^t ds/s diverges, and no solution starts at t=0t = 0. The formula has no meaning there, and none is expected.
  • The time-varying formula needs Φ\Phi. Replacing Φ(t,s)\Phi(t, s) by exp⁡(∫stA(σ)dσ)\exp(\int_s^t A(\sigma) d\sigma) is wrong unless A(t)A(t) commutes with its integrals; the state-transition matrix page gives a 2×22 \times 2 counterexample.
  • Impulses. If uu contains a Dirac impulse δ(t−t0)\delta(t - t_0), the solution jumps at t0t_0 by BB times the weight. The formula still holds if the integral starts at t0−t_0^-, which is the 0- convention of the Laplace transform pages.

History

The method of variation of constants comes from celestial mechanics. Euler used the idea in his 1748 study of the mutual perturbation of Jupiter and Saturn, where the constants of a two-body orbit are allowed to change in time. Lagrange developed it in memoirs from the 1770s to 1810 into a general method for the variation of arbitrary constants, and in this way it became a standard method for linear differential equations with a forcing term. The matrix form with eAte^{At} entered control with the state-space methods of Kalman and others around 1960, and it is the basic formula of the linear system theory books by Chen and by Rugh.

References

  1. Chi-Tsong Chen, Linear System Theory and Design, third edition, Oxford University Press, 1999, Chapter 4 (solution of the time-invariant and the time-varying state equations)
  2. Wilson J. Rugh, Linear System Theory, second edition, Prentice Hall, 1996, Chapter 3, State Equation Solution (the complete solution with an input, for time-varying systems)
  3. Karl J. Åström and Richard M. Murray, Feedback Systems, An Introduction for Scientists and Engineers, second edition, Princeton University Press, 2021, the chapter on linear systems (the matrix exponential and the convolution equation)
  4. Hassan K. Khalil, Nonlinear Systems, third edition, Prentice Hall, 2002, Section 4.3, Linear Systems and Linearization (stability of x' = Ax through e^(At), and the linearization of a nonlinear system)

Where this leads

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)
WritingW4 complete
  • a review of the text: no review record reviews/8NKZ49/text.yaml