Prelab 6

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.
You are viewing the PRELIMINARY 6.3100 Spring 2026 web site. Please note that information on this page may change throughout the semester, please check back frequently.

State of State-Space.

We took a continuous-time path through state-space in lectures, staying with continuous time state-space for modeling, measured-state feedback, optimization-based gain selection. In lab, we used continuous-time models to determine measured-state feedback gains (using pole placement or LQR), and ignored the fact that the coil voltage on the maglev's electromagnet (the u in our model of the "plant") was only updated every 200 microseconds.

We are switching back to the two-propeller arm for the last lab, a system with much slower dynamics than maglev. The slower dynamics makes it easy to automate the process of measuring the arm's frequency response, which can then be fit to a third-order model numerically using least-squares. We can then combine this automatically-generated arm model with LQR to determine gains for a state-space controller. However, we only have one measurement, position. We will have to estimate velocity and acceleration (the other two states).

We can estimate velocity and acceleration using differences in position measurements divided by the time between measurements, but already know such estimate are quite noisy. Instead, we can simulate the arm using our model, use simulated states to substitute for measured states, and use our arm angle measurements to correct the simulation. More specificially,

  • Evolve the observer-estimated state using the state-space model,
  • Use the difference between the measured and observer-predicted position to correct the observer's estimated state,
  • Use the observer-estimated state instead of the measured state when adjusting commands.

But exactly how do we "evolve" the observer-estimated state? If we are still in continuous time, then "evolving" means solving differential equations to update the observer states, and that is too expensive to do on a microcontroller. But if we are in discrete-time, then "evolving" means multiplying the current state by a matrix, as we will see.

So, it is time to switch to discrete time. But we can not just "switch" to discrete-time, our physical system is in continuous time, only our controller is in discrete-time. The two do connect, through sampling and a zero-order hold. The controller "samples" the state and output of the physical system every \Delta T seconds. That is,

y[n] = y(n \Delta T),
where n is being used as the sample index. The u(t) the controller sends to the plant is only updated every \Delta T seconds, but it is "held" between samples as,
u(t) = u[\lfloor \frac{t}{\Delta T} \rfloor],
where the notation \lfloor \tau \rfloor means "greatest integer less than \tau. A typical zero-order hold continuous waveform is shown in the figure below:

Given the physical system is in continuous time, our continuous time plant model is still valid,

\frac{d}{dt}\textbf{x}(t) = \textbf{A}\textbf{x}(t) + \textbf{B}u(t),
y(t) = \textbf{C}\textbf{x}(t),
though we now understand that if u(t) is generated by a microcontroller, it is piecewise-constant in time. And in addition, we are only interested in samples of y(t) for t = n \Delta T. In particular,
\textbf{x}[n] = \textbf{A}_d\textbf{x}[n-1] + \textbf{B}_du[n-1],
and
y[n] = \textbf{C}\textbf{x}[n],
where
\textbf{A}_d \approx \textbf{I} + \Delta T \textbf{A}
and
\textbf{B}_d = \approx \Delta T \textbf{B},
where the approximations on the right side of the above two equations become exact in the limit as \Delta T \rightarrow 0.

The Bigger Picture

We have a path to practical observer-based control:

  1. Combine physical insight, block diagrams, and composition strategies to construct a parameterized-transfer-function system model.
  2. Use ad-hoc control strategies to enable the collection of calibration data (step- and frequency-responses).
  3. Convert the calibrated transfer function model to a CT State-Space model.
  4. Compute the assocated DT State-Space Model (assuming ZOH on u).
  5. Determine state feedback gains (using LQR).
  6. Determine observer gains (using pole placement).

As you will see in lab6b, using pole place to determine observer gains feels very much like using pole placement to determine controller gains (though we are in discrete-time), we have no way to tie pole distribution to some notion of performance. That may feel a little unsatisfying, and it should, because there is much more to learn.

In this short prelab, we will start with an example of discrete-time state-space control, followed by a few basic problems and a description of the discrete observer approach (please read).