1st-Order Differential Equations and Proportional Control
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.
When we studied difference equations, we started with the first-order homogenous difference equation,
Solutions to first-order homogenous differential equations are quite similar. If
If
For higher order difference equations, the DT natural frequencies were roots of higher-order polynomials, and therefore real equations could have complex natural frequencies. The same will be true for CT natural frequencies, they will be the roots of higher-order polynomials and can be complex. But we will return to the higher-order case later, for now, let us consider an example of proportional feedback leading to homogenous difference or differential equations.
Let us return to the cargo crane traveling on track above a buried beacon, as shown in Figure 2. Suppose we must decide between two control systems, a discrete-time controller that measures distance to the beacon every \Delta T seconds, and a continuous-time controller that measures the distance continuously. One way to compare the two systems is to examine the problem of returning the crane as rapidly as possible to "home" position, that is, back to the beacon at d = 0. And for this comparison, we are going to assume that the crane has an internal feedback controller, one allows us to design a controller that senses position and controls crane velocity (as show in Figure 3 below).
For our velocity-controlled crane with discrete-time sensor,
If we use proportional control to return the robot back to the beacon (d=0), then the DT controller velocity at n \Delta T is given by
For the continuous-time controller, crane distance and velocity are related by a derivative,
Suppose the cranes are being independently monitored with remote LIDAR, which measures the distance between the crane and the beacon every ten seconds. A test was run using the CT controller with an unknown proportional gain K_p, in which two consecutive measurements from the LIDAR system (which we can denote as d(t) and d(t+10)) gave distances of 200 meters and then 10 meters between the beacon and the crane.
What was the third consecutive LIDAR measurement, d(t+20), and to within one percent, what was the controller gain, K_p?
Suppose we want to test the DT controller with \Delta T = 0.1, then \Delta T = 0.5, and finally with \Delta T = 10 seconds. Determine the three values of K_p we should use if we want to match the measured performance to the CT system. That is, if d[n_0] = 200 meters, and n = \frac{10}{\Delta T}, then then d[n+n_0] = 10 meters (so n=100 for \Delta T = 0.1, n=20 for \Delta T = 0.5, and n=1 if \Delta T = 10). Determine the three values for K_p (answers should be within one percent).
Suppose we know that the same proportional gain, K_p, is being used for both the CT and a DT controller, and that the LIDAR monitor recorded d(t_0) = 100 for the CT controller and d[n_0] = 100 for the DT controller. If the next recorded value for the CT controller was d(t+10) = 10, and was matched (to within 10 percent) by the next recorded value from the DT controller d[n_0 + \frac{10}{\Delta T}] (Assuming \frac{10}{\Delta T} is an integer). What is the largest possible value for \Delta T. This problem requires a bit of trial and error.
If \Delta T is small, so the sample rate for the DT system is fast, how close are the behavoirs of the DT and CT crane control systems? As we noted more generally above,
For example, in the CT crane control problem, we can pick a gain, K_p, that will reduce the distance to the beacon by a factor of ten in one millisecond. What would that gain be?
For the CT case, fast response corresponds to a very negative natural frequency, and in the DT case, fast response corresponds to a natural frequency whose magnitude is near zero. We can pick a K_p for the DT case that will give us a natural frequency of exactly zero, and ensure a one-step return to the beacon. Such controllers are sometimes referred to as dead-band controllers. What is the value of the natural-frequency-zeroing K_p as a function of \Delta T? (use a python expression, and use 'dt' to for \Delta T.)
How do the above K_p's compare if the DT case has a one millisecond sample period? How do the distances from the beacon compare?
As \Delta T shrinks, the K_p needed to achieve a DT natural frequency of zero can become impractically large. For \Delta T = 10, like the case above, a zero natural frequency can be achieved using a reasonable gain. But consider the crane velocity just before an update when moving from d[n_0] = 200 to d[n_0+1] = 5 meters. With K_p = 0.1, the velocity jumps from 20 meters per second to 0.5 meters per second, hardly smooth deceleration.
But there is a more serious issue associated with the dead-bang approach. What if someone puts much larger tires on the crane, so that the relation between velocity and position from proportional control gets scaled by an uncertain \gamma, as in
What would the CT system's response look like in this case?
For any system we are trying to control, we will presumably try to influence its outputs by changing its inputs, so lets add an input to the homogenous first-order CT model above as in
We are often interested in responses to step changes in input, as in
Let us start with an easier problem. Suppose
So, we have a family of solutions to the homogenous (zero input) equation,
Since our differential equation is linear, we can add the homogenous solution to the particular solutions, and use our one degree of freedom, A to make sure we match y(0). That is,
If y(0) = 0 and x(t) = 1 for t \ge 0, then x(t) = 1 e^{st} for s = 0 and
A plot of the step response for b = 10 and \lambda = -100 is given below. Note that the step response settles to \frac{b}{-\lambda} as t \rightarrow \infty, and has risen to about two-thirds of the steady-state at t \approx \frac{1}{-\lambda}.
It is easy to verify that the above y(t) satisfies the differential equation by redoing the analysis with a redefined time, \tilde{t} = t - t_0.
It is often useful to represent x(t) as a sum,
If we want to move the crane to positions other than the beacon position at d=0, we will need to specify a desired position along the track. The desired position, which we will denote as d_{in}(t), will become an input to our position controller, which will try to keep the drane position, d(t), close to the desired position d_{in}(t).
A proportional feedback approach to controlling the crane's position would be to make the crane velocity proportional to the difference between the desired and measured crane positions, as diagrammed for the DT case in the figure above. Then the velocity is given by
In order to determine how the performance of this proportional-feedback controller changes as we increase or decrease gain, we substitute the control formula in to the distance-velocity relation for the crane,
Above are four plots of d(t) versus time for the case d(0) = 5 and d_{in}(t) = 1. There are four plots, blue, orange,yellow and purple, and each plot is associated with a different value of K_p. Assuming that the four K_p values are integers in the range \{1,...20\}, what are the four gains in blue, orange, yellow, and purple (hint, e^{-1} \approx \frac{1}{3}). Enter your solution as a python list, e.g. [5,10,15,20].
If d(0) = 5, and d_{in}(t) = 1, what is the analytic solution for d(t) as a function of K_p and t? Use a python expression, use 'Kp' to for K_p and use, for example, 'e**(-a*t)' to represent e^{-at}.