Salta al contenuto
Note per Studenti Linearization Report

Linearization

In questa pagina 14

Why we need it

Many physical systems are naturally described by nonlinear equations, for instance a damped pendulum and a tank with a square-root outflow:

θ¨+bθ˙+gℓsin⁡θ=u,h˙=1A(q−kh).\ddot\theta + b\dot\theta + \frac{g}{\ell}\sin\theta = u, \qquad \dot h = \frac{1}{A}\left(q - k\sqrt{h}\right).

The tools developed so far (transfer functions, poles, BIBO stability) apply directly only to linear models. The idea is: close to a chosen operating point, replace the nonlinear model by its first-order approximation.

Linearization is local:

Nonlinear model Linearized model
Valid over a broad range of states and inputs, but often harder to analyze Simple to analyze, but accurate only near the selected operating point
nonlinear model --- first-order Taylor expansion around (x_e, u_e) ---> linear model

The subscript "e" always denotes an equilibrium (operating) point.

First ingredient: the operating point

Take a nonlinear first-order model

y˙=f(y,u).\dot y = f(y,u).

An equilibrium (ye,ue)(y_e,u_e) satisfies

f(ye,ue)=0.f(y_e,u_e) = 0.

If the input is kept at ueu_e and the system starts at yey_e, then y˙=0\dot y = 0 and therefore y(t)=yey(t) = y_e for all tt. Rule: before linearizing, always identify the operating point.

Second ingredient: deviation variables

Motion is described relative to the equilibrium:

δy=y−ye,δu=u−ue.\delta y = y - y_e, \qquad \delta u = u - u_e.

So y=ye+δyy = y_e + \delta y and u=ue+δuu = u_e + \delta u. Since yey_e is constant, δy˙=y˙\delta\dot y = \dot y.

Important: the linearized model relates small variations δu\delta u to small variations δy\delta y. It does not directly describe the absolute variables uu and yy.

Taylor approximation: the basic idea

For a scalar function z=f(x)z = f(x) near xex_e:

f(x)≈f(xe)+f′(xe)(x−xe).f(x) \approx f(x_e) + f'(x_e)(x - x_e).

The curve is replaced by its tangent line at xex_e; higher-order terms such as (x−xe)2(x-x_e)^2 are neglected. Linearization is just a Taylor expansion stopped after the first-order terms.

Linearizing a first-order nonlinear system

Start from y˙=f(y,u)\dot y = f(y,u). Around (ye,ue)(y_e,u_e) the first-order Taylor expansion is

f(y,u)≈f(ye,ue)+∂f∂y∣eδy+∂f∂u∣eδu.f(y,u) \approx f(y_e,u_e) + \frac{\partial f}{\partial y}\Big|_e \delta y + \frac{\partial f}{\partial u}\Big|_e \delta u .

At equilibrium f(ye,ue)=0f(y_e,u_e)=0, and δy˙=y˙\delta\dot y = \dot y, hence

δy˙=a δy+b δu,a=∂f∂y∣e,b=∂f∂u∣e.\delta\dot y = a\,\delta y + b\,\delta u, \qquad a = \frac{\partial f}{\partial y}\Big|_e, \quad b = \frac{\partial f}{\partial u}\Big|_e .

The two coefficients are the partial derivatives of ff with respect to the state and the input, evaluated at the operating point.

Example: a nonlinear first-order system

y˙=−y2+u.\dot y = -y^2 + u.

  1. Choose the equilibrium ye=1y_e = 1. The equilibrium input must satisfy 0=−1+ue0 = -1 + u_e, so ue=1u_e = 1.
  2. Derivatives: ∂f∂y=−2y\dfrac{\partial f}{\partial y} = -2y, ∂f∂u=1\dfrac{\partial f}{\partial u} = 1.
  3. At (ye,ue)=(1,1)(y_e,u_e) = (1,1):

δy˙=−2 δy+δu.\delta\dot y = -2\,\delta y + \delta u .

  1. With zero initial conditions, the transfer function from δu\delta u to δy\delta y is

ΔY(s)ΔU(s)=1s+2.\frac{\Delta Y(s)}{\Delta U(s)} = \frac{1}{s+2}.

The operating point changes the linear model

The same system y˙=−y2+u\dot y = -y^2 + u also has the equilibrium (ye,ue)=(−1,1)(y_e,u_e) = (-1,1). Now ∂f/∂y=−2y=+2\partial f/\partial y = -2y = +2, so

δy˙=+2 δy+δu.\delta\dot y = +2\,\delta y + \delta u .

With δu=0\delta u = 0 the natural response is δyn(t)=δy(0) e2t\delta y_n(t) = \delta y(0)\,e^{2t}, which grows. A nonlinear system does not have one unique linearization: the result depends on the operating point (here one equilibrium gives a stable linear model and the other an unstable one).

General nonlinear state-space model

x˙=f(x,u),y=h(x,u).\dot{\mathbf x} = \mathbf f(\mathbf x, u), \qquad y = h(\mathbf x, u).

An equilibrium (xe,ue)(\mathbf x_e,u_e) satisfies f(xe,ue)=0\mathbf f(\mathbf x_e,u_e) = \mathbf 0, and the corresponding equilibrium output is ye=h(xe,ue)y_e = h(\mathbf x_e,u_e). Deviation variables:

δx=x−xe,δu=u−ue,δy=y−ye.\delta\mathbf x = \mathbf x - \mathbf x_e, \qquad \delta u = u - u_e, \qquad \delta y = y - y_e .

The Jacobian matrices

The first-order approximation gives a linear state-space model in the deviations:

δx˙=A δx+B δu,δy=C δx+D δu,\delta\dot{\mathbf x} = A\,\delta\mathbf x + B\,\delta u, \qquad \delta y = C\,\delta\mathbf x + D\,\delta u,

with

A=∂f∂x∣e,B=∂f∂u∣e,C=∂h∂x∣e,D=∂h∂u∣e.A = \frac{\partial \mathbf f}{\partial \mathbf x}\Big|_e, \quad B = \frac{\partial \mathbf f}{\partial u}\Big|_e, \quad C = \frac{\partial h}{\partial \mathbf x}\Big|_e, \quad D = \frac{\partial h}{\partial u}\Big|_e .

For example, AA is the matrix of all partial derivatives of the components of f\mathbf f with respect to the components of x\mathbf x:

A=[∂f1∂x1⋯∂f1∂xn⋮⋱⋮∂fn∂x1⋯∂fn∂xn](xe,ue)A = \begin{bmatrix} \dfrac{\partial f_1}{\partial x_1} & \cdots & \dfrac{\partial f_1}{\partial x_n} \\ \vdots & \ddots & \vdots \\ \dfrac{\partial f_n}{\partial x_1} & \cdots & \dfrac{\partial f_n}{\partial x_n} \end{bmatrix}_{(\mathbf x_e,u_e)}

Practical rule: compute the derivatives first, then evaluate them at the operating point.

A nonlinear input-output ODE

If the model is written directly as

y(n)=ϕ(y,y˙,…,y(n−1),u),y^{(n)} = \phi\left(y, \dot y, \dots, y^{(n-1)}, u\right),

then at an equilibrium all time derivatives are zero, and the first-order approximation is

δy(n)=∂ϕ∂y∣eδy+∂ϕ∂y˙∣eδy˙+⋯+∂ϕ∂y(n−1)∣eδy(n−1)+∂ϕ∂u∣eδu.\delta y^{(n)} = \frac{\partial\phi}{\partial y}\Big|_e \delta y + \frac{\partial\phi}{\partial \dot y}\Big|_e \delta\dot y + \cdots + \frac{\partial\phi}{\partial y^{(n-1)}}\Big|_e \delta y^{(n-1)} + \frac{\partial\phi}{\partial u}\Big|_e \delta u .

The result is a linear differential equation in the deviation variables.

Example: the nonlinear pendulum

θ¨+bθ˙+gℓsin⁡θ=u.\ddot\theta + b\dot\theta + \frac{g}{\ell}\sin\theta = u.

Around the downward equilibrium

θe=0\theta_e = 0, θ˙e=0\dot\theta_e = 0, ue=0u_e = 0. Use

sin⁡(θe+δθ)≈sin⁡θe+cos⁡θe δθ=δθ.\sin(\theta_e + \delta\theta) \approx \sin\theta_e + \cos\theta_e\,\delta\theta = \delta\theta .

Therefore

δθ¨+b δθ˙+gℓ δθ=δu.\delta\ddot\theta + b\,\delta\dot\theta + \frac{g}{\ell}\,\delta\theta = \delta u .

Around the upright position

θe=π\theta_e = \pi, θ˙e=0\dot\theta_e = 0, ue=0u_e = 0. Because cos⁡π=−1\cos\pi = -1, sin⁡(π+δθ)≈−δθ\sin(\pi + \delta\theta) \approx -\delta\theta, hence

δθ¨+b δθ˙−gℓ δθ=δu.\delta\ddot\theta + b\,\delta\dot\theta - \frac{g}{\ell}\,\delta\theta = \delta u .

The characteristic polynomial of the natural response is

λ2+bλ−gℓ=0.\lambda^2 + b\lambda - \frac{g}{\ell} = 0 .

Its product of roots is −g/ℓ<0-g/\ell < 0, so the two roots have opposite signs and one mode grows: the upright equilibrium is locally unstable without feedback control. (The sign test on the coefficients is the topic of The Routh-Hurwitz CriterionThe Routh-Hurwitz criterion decides whether all roots of a characteristic polynomial lie in the open left half-plane, and counts the right-half-plane roots, by building a table (the Routh array) from the coefficients and counting sign changes in its first column.The Routh-Hurwitz Criterion →.)

Transfer function of the linearized model

Once the system is linearized, all the usual linear tools apply. With zero initial deviation,

Glin(s)=ΔY(s)ΔU(s)=C(sI−A)−1B+D.G_{\text{lin}}(s) = \frac{\Delta Y(s)}{\Delta U(s)} = C(sI - A)^{-1}B + D .

Poles and stability of the linearized model describe the local behavior near the chosen equilibrium.

How close is "close"?

There is no universal numerical radius of validity. The approximation becomes worse when

  • deviations δx\delta x or δu\delta u become large;
  • the neglected quadratic and higher-order terms become important;
  • the system moves into a region with a substantially different slope;
  • the operating point itself changes significantly.

Engineering practice: use the linear model for analysis and controller design near the operating point, then verify the result on the original nonlinear model.

Common mistakes

  1. Linearizing before checking the equilibrium condition.
  2. Forgetting to introduce deviation variables.
  3. Evaluating derivatives at the wrong point.
  4. Replacing sin⁡θ\sin\theta by θ\theta everywhere rather than only near θ=0\theta = 0.
  5. Interpreting a local linear result as a global property of the nonlinear system.

A particularly common mistake is to write the linearized equation directly in y,uy,u instead of δy,δu\delta y,\delta u.

Quick exercise (from the slides) and worked solution

y˙=y−y3+u\dot y = y - y^3 + u with ue=0u_e = 0. Questions: find all equilibria, linearize around each, and decide whether δyn(t)\delta y_n(t) decays or grows for δu=0\delta u = 0. Hint on the slide: ye−ye3=0y_e - y_e^3 = 0 and ∂f/∂y=1−3y2\partial f/\partial y = 1 - 3y^2.

Worked solution (computed here from the hint, not shown on the slide):

  • Equilibria: ye(1−ye2)=0y_e(1 - y_e^2) = 0, so ye∈{0,1,−1}y_e \in \{0, 1, -1\}.
  • Around ye=0y_e = 0: ∂f/∂y=1\partial f/\partial y = 1, so δy˙=δy+δu\delta\dot y = \delta y + \delta u; with δu=0\delta u = 0, δyn(t)=δy(0)et\delta y_n(t) = \delta y(0) e^{t} grows.
  • Around ye=±1y_e = \pm 1: ∂f/∂y=1−3=−2\partial f/\partial y = 1 - 3 = -2, so δy˙=−2 δy+δu\delta\dot y = -2\,\delta y + \delta u; δyn(t)=δy(0)e−2t\delta y_n(t) = \delta y(0) e^{-2t} decays.

Summary of the procedure

  1. Choose an equilibrium (xe,ue)(\mathbf x_e, u_e).
  2. Define the deviation variables δx\delta\mathbf x, δu\delta u, δy\delta y.
  3. Keep only the first-order Taylor terms.
  4. Compute the Jacobians A,B,C,DA,B,C,D.
  5. Analyze the resulting linear model using transfer functions, poles, and the tools already developed.

Linearization answers a local question: what does the nonlinear system look like for small perturbations around this operating point?

Versione ripasso

  • Goal: replace a nonlinear model by its first-order Taylor expansion near an operating point; tools for linear systems (transfer functions, poles) then apply locally.
  • Equilibrium: y˙=f(y,u)\dot y = f(y,u) gives f(ye,ue)=0f(y_e,u_e)=0; state-space x˙=f(x,u)\dot{\mathbf x} = \mathbf f(\mathbf x,u), y=h(x,u)y = h(\mathbf x,u) gives f(xe,ue)=0\mathbf f(\mathbf x_e,u_e) = \mathbf 0, ye=h(xe,ue)y_e = h(\mathbf x_e,u_e).
  • Deviation variables: δy=y−ye\delta y = y - y_e, δu=u−ue\delta u = u - u_e, δx=x−xe\delta\mathbf x = \mathbf x - \mathbf x_e; δy˙=y˙\delta\dot y = \dot y.
  • First order: δy˙=a δy+b δu\delta\dot y = a\,\delta y + b\,\delta u with a=∂f/∂y∣ea = \partial f/\partial y\big|_e, b=∂f/∂u∣eb = \partial f/\partial u\big|_e.
  • State space: δx˙=Aδx+Bδu\delta\dot{\mathbf x} = A\delta\mathbf x + B\delta u, δy=Cδx+Dδu\delta y = C\delta\mathbf x + D\delta u, with A=∂f/∂x∣eA = \partial\mathbf f/\partial\mathbf x\big|_e, B=∂f/∂u∣eB = \partial\mathbf f/\partial u\big|_e, C=∂h/∂x∣eC = \partial h/\partial\mathbf x\big|_e, D=∂h/∂u∣eD = \partial h/\partial u\big|_e (Jacobians: differentiate first, then evaluate at (xe,ue)(\mathbf x_e,u_e)).
  • Input-output ODE y(n)=ϕ(y,…,y(n−1),u)y^{(n)} = \phi(y,\dots,y^{(n-1)},u): δy(n)=∑k∂ϕ/∂y(k)∣e δy(k)+∂ϕ/∂u∣e δu\delta y^{(n)} = \sum_k \partial\phi/\partial y^{(k)}\big|_e\,\delta y^{(k)} + \partial\phi/\partial u\big|_e\,\delta u.
  • Transfer function: Glin(s)=ΔY(s)/ΔU(s)=C(sI−A)−1B+DG_{\text{lin}}(s) = \Delta Y(s)/\Delta U(s) = C(sI-A)^{-1}B + D.
  • Examples: y˙=−y2+u\dot y = -y^2 + u at (1,1)(1,1) gives δy˙=−2δy+δu\delta\dot y = -2\delta y + \delta u, 1/(s+2)1/(s+2); at (−1,1)(-1,1) gives δy˙=+2δy+δu\delta\dot y = +2\delta y + \delta u, unstable. Pendulum: sin⁡(θe+δθ)≈cos⁡θe δθ\sin(\theta_e+\delta\theta) \approx \cos\theta_e\,\delta\theta; down (θe=0\theta_e=0) gives +gℓδθ+\tfrac{g}{\ell}\delta\theta, up (θe=π\theta_e=\pi) gives −gℓδθ-\tfrac{g}{\ell}\delta\theta, roots of opposite sign, locally unstable.
  • Validity: worse for large deviations, strongly changing slope, or moving operating point; design on the linear model, then verify on the nonlinear one.
  • Typical mistakes: linearizing before checking f(xe,ue)=0f(\mathbf x_e,u_e)=0; not using deviation variables (writing y,uy,u instead of δy,δu\delta y,\delta u); derivatives at the wrong point; sin⁡θ≈θ\sin\theta\approx\theta everywhere; reading a local result as global. The linearization is not unique: it depends on the operating point. See also The Routh-Hurwitz CriterionThe Routh-Hurwitz criterion decides whether all roots of a characteristic polynomial lie in the open left half-plane, and counts the right-half-plane roots, by building a table (the Routh array) from the coefficients and counting sign changes in its first column.The Routh-Hurwitz Criterion → for testing the stability of the linearized characteristic polynomial.

Teoria collegata