Skip to main content

Gain scheduling

Accessibility

If math images are not rendering, a pre-compiled PDF version of this page is available here.

syms matlab, linearization

Video Lecture

I link below a short (and dense) example of the Linearization of a nonlinear set of dynamics using both MATLAB syms and a manual method: Linerization Example with syms in MATLAB

Definitions

We are some system described by the following equation, for state x and input u:

xdot = f(x,u)

where our linearization is defined, about a linearization point (x0,u0):

xdot approx f plus jacobians

The jacobians are redefined to be A(x0,u0) and B(x0,u0) in order of appearance. We can then group terms and define Delta x, Delta u, such that:

Delta xdot = A Delta x + B Delta u

Note the linearity of the derivative, such that d(Delta x)/dt = Delta dx/dt.

full state feedback

Definitions

I will assume you have seen or understand the prior definitions for the linearization of our nonlinear dynamics. Given them, we define full state feedback as such:

u = -KTx implies Delta xdot = (A-BKT) Delta x

It should be noted u0 = -KTx0 implies Delta u = -KT Delta x. The matrix A-BKT's eigenvalues decide directly the settling time and stability margins for our linear system. Because our system is heavily nonlinear and MIMO (Multiple Input, Multiple Output), we cannot simply solve for the eigenvalues and remain computationally efficient. Instead, we can use place() in MATLAB or python control packages to automate these processes. There are conditions to this process, one such one being the linear system be controllable, a key failure of gain scheduling.

Iterative Eigenvalue Manipulation

Now that we can know the form of the matrix to solve for and have a method to solve for the gain matrix K, we must build our pipeline.

function getNewControl(f,x)
Given dynamics f, current state x,
linearize f about x,
solve for desired eigenvalues,
return controller u=-K^Tx

General Tools

MATLAB

syms MATLAB help page

ode45 MATLAB help page

Pole Placement MATLAB Tutorial (Eigenvalue Manipulation)