Prelab - LQR

You are not logged in.

Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.

This prelab is intended to prepare you for the first state-space lab, in which we return to the problem of several weeks ago, controlling the angle of the single propeller arm. In the lab, you will first use pole-placement, and then LQR to determine the gains of a measured-state feedback controller for the arm. Then you can try adding the integral

We will also address the issue of the input scaling, K_r (also referred to as precompensation), set to ensure zero steady-state error. We computed K_r's for several examples in the pre-prelab, but of course we assumed the model was perfect. Modeling errors can lead to inaccurate K_r's, and inaccurate K_r's produce irreparable steady-state errors.

This prelab is intended to prepare you for both the above aspects of state-space control.

The State of Space.

So far, we have considered four ideas in linear state-space control:

  1. The Model. We can model many systems with an \textbf{E}, \textbf{A}, \textbf{B} and \textbf{C} state-space model,

    \textbf{E}\frac{d}{dt}\textbf{x}(t) = \textbf{A}\textbf{x}(t) + \textbf{B}u(t)
    y(t) = \textbf{C}\textbf{x}(t)
    where \textbf{x} is the state, \textbf{u} is the "plant" input (and is a scalar for most of our examples), \textbf{y} is the observed output (which can be a single state, a weighted combination of states, or many weighted combinations of states).

  2. Eigenvalues are Natural. The natural frequencies (aka poles) of a system described by an \textbf{E},\textbf{A},\textbf{B},\textbf{C} state-space model are the the eigenvalues of \textbf{A}. The natural frequencies of a state-feedback system with gain matrix \textbf{K} are the eigenvalues of \textbf{A} - \textbf{B} \textbf{K} . The more negative the real part of the eigenvalues, the faster the system responds, and if any eigenvalue has a positive real part, the system is unstable.

  3. The state, the whole state, and nothing but the state. We can improve a feedback system's performance by using a controller that monitors more system states. If the system is described by an \textbf{E},\textbf{A},\textbf{B},\textbf{C} state-space model, and the full state-feedback is of the form,

    u(t) = K_r r(t) -\textbf{K} \textbf{x}(t),
    where \textbf{K} is a matrix of feedback gains, r is the primary input, and K_r is a precompensation scaling of the primary input.

  4. Gaining the system. Given modest assumptions about \textbf{A} and \textbf{B}, it is possible to determine a gain matrix, \textbf{K} , that places the natural frequencies (aka poles) of a feedback system, that is the eigenvalues of \textbf{A}-\textbf{B}\textbf{K}, anywhere we wish. In fact, the process of computing the needed gains from a set of desired natural frequencies is completely automatic, using the what is often referred to as the acker algorithm (used by Matlab's place and Python's acker functions).

As we will see in lab, it can be very difficult to design a controller by first selecting candidate poles, and then using a program like place to determine the associated gains. The problem is that natural frequencies can have a complicated impact on trade-offs we care about, such as minimizing response time without exceeding equipment limits. We will then switch to using LQR, and find that gives us a much better result. As a last step in lab, we will connect LQR and phase margin, but we are getting ahead of ourselves.

Time for practice!

VERY Useful state space videos:

We start with looking at the impact of different choices of weights for LQR applied to the L-motor example of the pre-prelab (not the pre-pre-prelab...oh never mind), we then examine adding an integral term, and finally we derive the state-space model for the single and double propeller arms.

Again, Chapters 6 and 7 from the on-line (and free) textbook Feedback Systems: An Introduction for Scientists and Engineers by Karl J. Åström and Richard M. Murray are particularly good matches to the state-space material.

Links to Åström and Murray Chapter 6 , Chapter 7