Vivek Yadav, PhD

Motivation

For many systems, the task of designing control can be simplified by using a simpler more intuitive coordinate representation. For example, consider the system given by,

and another system given by,

The two systems are similar, however, the first form is more useful for control, because the terms in the last row of state matrix represent the coefficients of characteristic polynomial. This idea in nonlinear system becomes more complex because the state transition matrix itself depends on several variables. The techniques of nonlinear dynamic inversion and feedback linearization allow us to unwrap a complex nonlinear system into a simpler linear system. The main idea is to perform a variable transformation that gives a more managable system. The conecepts of dynamic inversion are presented first.

Basics of dynamic inversion (or input-state feedback linearization):

Say we have a simple single input, single output system given by

The system above can be linearized by using an auxillary control input \( v \) as,

The system dynamics after subtituting for \(u \) becomes,

Or the system reduces to,

By choosing

The system reduces to,

or

Therefore, by choosing gains \( k\), the system can be made to follow an n-order linear dynamic system. For tracking task, we derive error dynamics and follow the same approach, as above with X replaced by the tracking error \( e = X - X_d \). The process of finding \(v \) and \( u \) are referred as outer loop and inner loop control also. The outer loop control stabilizes a virtual first order system, whereas the inner loop control \(u\) makes sure that the system’s control law follows commanded control \( v\).

Example:

Consider the example of the system given by,

With transformation,

The states of the system becomes,

By defining,

The system reduces to,

We can design \( v \) to drive system states \( Z \) to any desired value. Note \( v \) is not the true control, the original control \( u \) is computed as,

Note, in the expression above, we are dividing by \( cos(2 z_1 ) \), and it is possible that the control \( u \) goes to infinity.

Considerations for nonlinear dynamic inversion,

  1. Full state measurement is required to invert the control \( u = a(X)^{-1}(v-b(X)) \).
  2. The matrix \( a(X) \) must be invertible.
  3. \( a(X) \) may got zero for some values of states, and these singularities can result in \( u \rightarrow \infty \).

Note, by following the nonlinear dynamic inversion scheme above, it appears that we are completely cancelling out the effect of nonlinearities. Any dynamic advantage afforded by nonlinearities is captured by the desired trajectory or reference trajectory, that is computed using optimization routines.

Input-output linearization (working principle):

In some cases it may be difficult to obtain a simple expression as above, i.e. the system dynamics need not be in companion form. Further, in many applications we are more interested in making the output of the dynamics follow a particular dynamics. In these cases, it is helpful to linearize the output of the system. Therefore, the linearized system with inner loop control \( u = a(X)^{-1}(u - b(X)) \) becomes, \( y^{(r)} = v \).

Example 1:

Consider the system given by

with measurement \( y = sin(X_1) \).

We start with,

As there is no control input \( u \), we compute derivative of the measurement,

As there is no control input \( u \) in \( \dot{y} \), we compute derivative of the measurement,

Example 2:

Say, we are interested in the measurement \( X_1 \).

There is no control input in this term, so we differentiate and get,

There is no control input in this term, so we differentiate again and get,

Therefore, choosing \( v = (X_3 + cos(X_2)) (X_1^5 + X_3)+ (X_2+1)X_1^2 + (X_2+1)u \), we get,

The transformed system is a second order linear system, and control input \( v \) can be chosen to have any second order behavior of \( Z_1 \).

** NOTE: In both the examples above, we started with 3 state system, and got a linearized 2-state system of measurement. Therefore, there is another degree of freedom of dynamics that is not represented by this input-output linearization. **

Zero dynamics

Zero dynamics are the dynamics of system when the output is zero. In most cases, we try to drive the measurement output (or error) to zero, and therefore the residual dynamics is expected to be similar to zero dynamics. For linear systems, we can show that if the zero dynamics is stable, then the residual dynamics is also stable. However, for nonlinear systems, this need not be true. Regardless, we can say that if the zero dynamics is stable (via Lyapunov’s first method), the dynamics of the residual system will be stable, atleast locally. We will first investigate zero dynamics for a simple linear system.

Zero dynamics for linear systems

Consider a system in canonical form,

with a single measurement

The measurement equation has first \( m \) terms, and remaing \( n-m -1 \) terms are zero. We first rewrite measurement equation as,

By taking derivative of measurement \( y \), we get,

Therefore, by taking derivative, the b-values shifted one to right. Similarly, it can be shown that by taking \( n-m-1\) derivatives, we get

Taking derivative once again gives,

Note, for this linear system, the number of poles was \( n \) and number of zeros are \( m \), and the relative degree \( r \) of the system is the difference of number of poles and zeros.

By choosing \( v \) appropriately, we can design a stable \( n-m \) order close loop dynamics for \( y \). However, we need to investigate the dynamics of the residual \( m \) order system. This can be investigated by looking at the laplace transform of the measurement function. Note, as we are commanding \(z\) to follow a desired trajectory, \( z \) behaves as input to the resulting \( m \) order dynamics. Therefore, the transfer function between \( x \) and \(z \) can be written as,

Therefore, if the poles of this system are all on the negative half plane, then the residual dynamics is stable. In other words, if the zeros of the original system are on negative half of the plane, then the resulting zero-dynamics is stable. Systems with stable zero dynamics are referred to as minimum phase systems, and systems without stable zero dynamics are referred to as non-minimum phase systems.

Linear system zero dynamics examples:

Consider the system given by,

System 1:

Say we are interested in controlling \( X_1 \). Then the zero dyanmics are given by,

Taking derivative gives,

Therefore,

Substituting this ins the last equation gives,

Therefore, by choosing a reduced order system \( [z, \dot{z}] \), we get a stable overall performance because the zero dynamics is stable.

System 2:

By following the same steps above, we get, the zero dynamics as,

Therefore, in this case, as the residual dynamics is not stable, using \( [z, \dot{z}] \) for control results in unstable internal dynamics, inspite of the fact that \( [z, \dot{z}] \) system is stable.

Zero dynamics nonlinear system:

Say, we are interested in the measurement \( X_1 \).

There is no control input in this term, so we differentiate and get,

There is no control input in this term, so we differentiate again and get,

When \(Z_1= 0\), we get, the zero dynamics as,

After simplifications, the zero dynamics becomes,

The zero dynamics in this case is not stable, because if \(X_3 « 0 \), then \( X_2 \rightarrow 0 \) and \(X_3 \) will diverge to minus infinity.

Input-output linearization with Lie derivatives

We will now define general tools on computing the input-output linearization of the system.

Relative degree

In the previous example, we had to differentiate the measurement output twice to get the input appear in the derivative of measurement. This is referred to as relative degree of the system. Therefore, by differentiating the measurement \( r \) times, where \( r \) is the relative degree of the system, we get the control appear in the derivative.

Feedback linearization

Consider the system given by,

with measurements,

We will now compute derivative of states with respect to time,

Recall Lie derivative \( L_f h(X) \) is given by,

As relative degree is \( r \), the control term \( u \) will not appear in the first \( r-1\) derivatives. \( L_gL_f^{(i)} h(X) = 0 \) for \( i<r \) becuase system has relative degree \( r \). Therefore,

Therefore, choosing the inner loop control \( u \) as

After this transformation, we get, the original system changed as,

Therefore, based on Lie derivatives, we can construct a representation of the system that is of order \( r \). However, the true system was of order \( n \), therefore, we need to account for additional \( n-r \) order dynamics to fully understand the behavior of the system. If the residual \( n-r \) dynamics is stable, then the whole system is stable, however, if the residual \( n-r \) dynamics is not stable, then the internal states of the system may diverge. One way to investigate the leftover dynamics is to investigate the zero-dynamics of the system. However, as these dynamics are very specific to nonlinear system being studied, it is very difficult to come up with general rules for zero dynamics.

Normal form

We saw above that by using Lie Algebra, we can express output of a n-dimension system

with measurement \( y \) as,

Therefore, if we chose a variable transform corresponding to first \( r-1 \) derivatives of \( y \), we get a reduced representation of dynamics. However, there is a \( n-r \) order dynamics that is not accounted for. The system in normal form can be written in terms of states \( [ \mu_1~\mu_2~\dots ~\mu_r]^T = [ y~ \dot{y}~\dots ~y^{(r)}]^T\) and additional \( n-r \) variables \( \psi \) as,

and

with output \( y = \mu_1 \). For the transformation between original states and \( [ \mu, \psi] \) to be valid, the transformation must be one-to-one and invertible (or Diffiomorphism). \( \psi \) can be found that satisfy,

Example: Normal form

Consider the system,

with measurement \( y = X_3 \). Following the procedure above, we first define,

We now need to find a third variable \( \psi \) such that \( L_g \psi = 0\)

A possible solution for equation above is,

Therefore, varaible transformation,

The states \(X \) can be obtained using,

Transforms the original system into,

Note, the zero dynamics is,

which is stable. Therefore, the feedback linearization scheme can be used to follow any desired trajectory, and the underlying residual dynamics is expected to be stable.

Input-state linearization

Now the main question becomes, given a general nonlinear system, can we find a variable transformation such that the resulting system is a \( n \) order system, and has a compact linear-like form, i.e. is it possible to obtain an input-state linearization that simplifies the nonlinear system into a much simpler system. Before, getting into specific details, lets recap lie brackets.

Lie Brackets: Recap

Lie bracket between two vector fields is given by,

Lie brackets can be interpreted as a new direction that can be obtained by combining vector fields \( f \) and \( g\).

Definition: Involutive

We call a group of vectors \( g: [g_1, g_2, \dots , g_n] \) involutive, if lie bracket between any two vector fields results in a linear combination of vectors in \( g \). i.e. dynamics along no new directions can be obtained by combining vector fields in \( g \).

Necessary condition for existance of simplified n-order system.

Given a system,

we can get a transformation of variables from \( X \) to \(Z\) such that, \( Z = [ Z_1 ~ \dot{Z}_1~ \ddot{Z}_2 ~ \dots ~ Z_1^{(n-1)} ] \) form the states of the system, and the dynamics are in canonical form, with

if the follwoing 2 conditions hold,

  1. (Controllability) The vectors \(\left[ \begin{array}{cccccc} adj_f^0 g(X) & adj_f^1 g(X) & adj_f^2 g(X) & \dots & adj_f^{n-2} g(X) & adj_f^{n-1} g(X) \end{array} \right] \) are all linearly independent or has full rank, and
  2. (Integrability/involutivity) \(\left[ \begin{array}{cccccc} adj_f^0 g(X) & adj_f^1 g(X) & adj_f^2 g(X) & \dots & adj_f^{n-2} g(X) &\end{array} \right] \) is involutive.

The second condition is called the integrability condition, because \( z_1 \) can be computed from the following relation,

where \( \nabla z_1 \) is the gradient of \( z_1 \). Therefore, the transformation of variables can be computed by integrating the gradient function. The second condition ensures that \( \nabla z_1 \) is integrable. More specifically, \( \nabla z_1 \) forms a gradient field.

Note, the conditions above are very specific, and depend on the state variables, therefore, it is possible that in some region of space, a one to one transformation may not exist. However, if conditions 1 and 2 above are satisfied, then a linear transform of the system can be obtained by following these steps,

  • Construct vector fields, \( ad_f^ig \) for i in \(0\) to \( n - 1 \).
  • Check if controllability and integrability conditions are satisfied.
  • If both conditions are satisfied, then compute the first \( z_1 \) such that, \( \nabla z_1 ad_f^i g = 0 \) for \( i = 0 \) to \( n-2 \), and \( \nabla z_1 ad_f^{(n-1)} g \neq 0 \).
  • Define \( Z(X) = \left[ \begin{array}{cccccc} z_1 & L_f z_1 & L_f^2 z_1 & \dots & L_f^{n-2} z_1 & L_f^{n-1} z_1 \end{array} \right] \) and,

Example: Flexible robot joint

Consider the robot joint given by,

We wish to linearize this system using the input-control linear transform scheme presented before.

Solution:

We first express the system in a state space form using states \( X = \left[ q_1 ~ q_2 ~ \dot{q}_1 ~ \dot{q}_2 \right]^T \). The state dynamics can be written as,

The controllability matrix form, \(\left[ \begin{array}{cccccc} adj_f^0 g(X) & adj_f^1 g(X) & adj_f^2 g(X) & adj_f^{3} g(X) \end{array} \right] \) using,

Therefore, the controllability matrix is,

which is a full-rank matrix. Further, as the controllability matrix is a constant, the controllability law applies for all states. Further, as all the adjoints are constants, their derivative is zero, which is a linear combination of them. Therefore, integrability/involutivility condition is also satisfied, therefore, the origrinal system is input-control linearizable. We can therefore move to the next step of designing state transformation. Recall, we need to find a \(z_1 \) such that,

The matrix equation above gives,

Therefore, we choose \( z_1 = x_1 \), the state transforms can be computed as,

The control appears in the derivative of \( z_4 \) as \( L_gL_f^3z_1 \neq 0 \) and \( L_gL_f^iz_1 = 0 \) for i = 0,1 and 2.

Therefore, by this transformation, the states of the system change as,

which is a linear system, and can be made to follow any fourth order state dynamics.

ADDITIONAL NOTES

Interpretation of conditions:

First condition controllability

The first condition is also the controllability condition we previously defined,

In the special case of linear system we have,

In this example, \( f(X) = AX \) and \( g(X) = B \). Therefore,

Therefore, the first condition reduces to

Note, the rank of the matrix above, is the same as the rank of the matrix

and we have the same condition for the linear system to be controllable.