iii. Discrete-Time Dynamic Plant

Note: As I said before, I will try to keep the math simple as possible but in order to understand the contents of this web page, you will need to have some basic training in calculus. Of course, knowing linear algebra and differential equations will help.

The motion plant's controller is a digital computer, whether that computer is a PC with a data acquisition board or an Arduino microcontroller. Thus, the controller must be designed as discrete-time to take into account digitizing effects such as zero-order hold and sampling frequency. A digital computer can't implement a continuous-time differential equation. We will have to somehow translate these continuous time equations,

into these discrete time equations, which the Arduino microcontroller can easily implement in an iterative loop.

A block diagram of the implemented discrete-time linear compensator is shown in Figure IV.C.iii.1. The (1/z) block means to delay processing one unit of time (such as to the next iterative loop on a computer).

Figure IV.C.iii.1: Subsystem block diagram of the Linear Compensator.

To begin formulating the equations, let's start with the exogenous force.

The sampling time of our Arduino microcontroller will be (T = 800 microseconds). We are sampling q every 800 µs. The assumption that q will not change too much in value during each 800-µs iteration is a big assumption but not one that will hamper performance. In order to digitize this equation, we will need to integrate.

For velocity, a degree of complexity is added. In most standard kinematics formula derivations, the acceleration or force is constant. Here, the time derivative of the exogenous force will be constant. The input force from the solenoids will be constant. We will have to treat these two terms differently.

The trick is to realize that the second derivative of the velocity is the process white noise. A precaution we must take is to account for the initial exogenous force at sampled time (nT)

Let's give the same treatment to the payload position. The third derivative of the displacement is the process white noise.

A far shorter but more mathematically rigorous derivation

For those with training in advanced matrix algebra and calculus, the standard formulas for turning the continuous time state-space equations

into the discrete time equations.

are