The questions below are due on Friday September 15, 2023; 09:59:00 AM.
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.
Crane Control with Inputs
Figure 1: Crane traveling on a track and measuring distance to a Beacon.
Let us return to the cargo crane traveling on track above a buried beacon, as shown in the figure above. Let us assume that the crane measures distance to a beacon every seconds, with negative distances left of the beacon and positive distances to the right. In addition we will assume that we can set the crane's velocity, though that likely requires the crane to have an internal velocity feedback loop (not unlike a car with cruise control, where one can specify a speed, and the car adjusts its acceleration to maintain that speed).
If we try to control the crane's position by adjusting its velocity, and the crane has an internal velocity controller, then the combination can be summarized in the block diagram below.
Crane proportional controller.
To model how the crane moves along its track, we will represent the crane's
measured distance and specified velocity as sequences,
and respectively,
where and are the measured distance and specified velocity. We can relate to with
where and are the measured distances along the crane's track at sample time and , respectively, is the crane velocity at the time of sample , and is the time between samples. Note that the above equation is exact only if the velocity is constant between sample and sample .
We denote the desired crane position (also the input to our position controller), as the sequence , and a proportional feedback approach to control would be to set the crane velocity proportional
to the difference between the desired and measured crane positions,
as diagrammed in the Figure above. Then the velocity is
given by
where is the proportional gain and is the input,
or desired, position.
In order to determine the performance of this proportional-feedback approach as a function of gain, we substitute the control formula in to the distance-velocity relation for the crane,
and then simplify,
to arrive at a first-order LDE with an input, .
We know how to solve homogenous LDEs (LDEs with no external input), but we now need to learn about including inputs.
First Order LDE's with Inputs
For any system we are trying to control, we will presumably try to influence its outputs by changing its inputs, so we will need to add an input to the homogenous LDE models we already know. In the first-order case, the general form of an LDE with an input is
where and are real coefficients, the sequence is a known input, and the sequence is the output we need to determine.
General Solution
Performing a process known as "plugging and chugging", we can write
and so on. From the three steps above, it is easy to see the general pattern,
ZIR, ZSR and Linearity
We can easily see the linearity of the difference equation from the above general form. First, suppose we have three "building-block" solutions to our general first-order equation:
an equation with zero input,
whose general solution is
an equation with a zero initial condition and an non-zero input,
whose general solution is
and another equation with a zero initial condition and a different
non-zero input,
whose general solution is
Now suppose
with intial condition , where
, , and are three arbitrary scalar weights. Then the general
solution for is given by
or reorganizing,
Substituting the "building-block" solutions for , and , we can readily see that is a weighted combination of , , and ,
which verifies the linearity.
Note that has a nonzero initial condition and its difference equation had zero input, so is referred to as a ZIR (for zero-input-response). Also note that the difference equations for and have non-zero inputs but their initial conditions are both zero, so we refer to them as ZSRs (for zero-state-response). In general, one can determine the response to very complicated inputs by decomposing those inputs into sums of much simpler inputs whose ZSR you might already know. So it is helpful to have a library of ZIRs and ZSRs for several "building-block" inputs, and in the sections below, we calculate a few common ones: the ZIR, the ZSR to a unit sample input, and the ZSR to a unit step input.
Zero Input Case
A robot that measures obstacle distances ten times a second is placed five meters from a wall. The robot is programmed to move with a velocity negatively proportional to the distance from the wall. We set the velocity negatively proportional to distance to the wall because a robot moving with a positive velocity is moving away from the wall. As the robot gets closer to the wall, it should slow down, but what really happens?
To model how the robot moves towards the wall, we start by representing its distance measurements as a sequence, , where is the measured distance and . The difference between and can be related to the robot's velocity and the time between measurements,
where is time between distance measurements, and is the robot velocity at the time of sample .
Since the robot's velocity was programmed to be negatively proportional to its distance to the wall,
where is the proportional feedback gain. Combining equations leads to a first-order LDE for ,
where is the LDE's natural frequency.
If we do not want the robot to crash into the wall, or equivalently, if we do not want to become negative, we now know that the first-order LDE's natural frequency must be non-negative. In addition, if we want to decay to zero (so that we end up next to the wall), the natural frequency must be less than one. Ensuring that , or equivalently, that , yields constraints on as in
Consider the following questions carefully before moving on to the next section:
What happens if is very near but ?
What happens if is exactly ?
What happens if is ?
Unit Sample Input Case
A delayed unit sample with delay is given by
for which we use the compact notation .
As a formal matter, systems described by LDEs are completely characterized by the output due to a unit sample input, referred to as the unit sample response, but that is a digression for us. Formality aside, we can reason about systems by examining their response to a unit sample.
If , and the input is a delayed unit sample, , then has a familiar power series form that can be derived in a few steps.
For , , and for ,
For , and therefore , the generating difference equation for the power series. Iterating yields
a form very similar to the solution of the homogenous case with non-zero initial conditions.
In the stable case, that is if ,
Unit Step Input Case
A delayed unit step with delay is given by
for which we use the compact notation
Given a unit step input, , and is still zero, then and must equal . For , and therefore
If we write out the terms, we can see the pattern,
Iterating yields a representation of as a power series sum,
In the stable case, that is ,
which can be seen by summing the series.
Determining the large N limit
For the stable case, , if the input eventually becomes constant, such as in the delayed unit step, we are often only interested in behavior for large . If so, there is an easier approach to determining , a surprisingly useful trick more generally.
Suppose for and . In this stable, constant input, case, and both approach for large , so
and solving for ,
There are many ideas hidden in the above simple formula, and they are best exposed by answering questions.
Questions:
Given and , if does remain bounded?
For the case, does exist?
Does remain bounded if ?
Given , and , what value of minimizes when it exists, and what is that minimum value.
Answers:
Yes, is bounded.
No, does not exist as alternates between and forever.
If , is unbounded, and does not exist.
Setting very close to minimizes , which is bounded from below by . But then oscillates and decays very slowly.
And one last use of , we use it to construct the entire step response. If , , and , then for and
In the Figures below we show the behavior of the step response for several different values for . Notice the large values in the plots. For example, even if , the large value is still positive.
Delayed step response for and .
Delayed step response for and .
Delayed step response for and .
Unit step (no delay) response for and .
Exercises
For the following problems,
where denotes the unit step, and
and
A:
B:
C:
D:
E:
F:
For which plots above is ? (Enter the letters below, separated by commas.)
Loading...
For which plots above is ? (Enter the letters of the plots separated by commas below:)
Loading...
For which plots above is ? (Enter the letters of the plots separated by commas below):
Loading...
For what value of is the limit as of equal to:
:
Loading...
:
Loading...
:
Loading...
:
Loading...
Consider a feedback system in which is being controlled so that it
tracks , where
A model for a proportional feedback system is given by the difference
equation
where is the time between samples. A difference equation of this
form could be a model for velocity control, where is the velocity and
is the acceleration due to proportional feedback. Below are plots of the response of the system for different values of the proportional gain :
A:
B:
C:
D:
E:
F:
G:
H:
Enter the letter of the plot above that corresponds to when
Loading...
Enter the letter of the plot above that corresponds to when :
Loading...
Enter the letter of the plot above that corresponds to for :
Loading...
Enter the letter of the plot above that corresponds to when :