Commands have limits.

The questions below are due on Tuesday October 05, 2021; 09:00: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.
Limits of Command

In the propeller arm, let us consider just the "D" part of the PD controller,

c[n] = \frac{K_d}{m*\Delta T} (\theta_d[n]-\theta_d[n-m]),
where c is the motor command, \theta_d is the desired angle, and we have assumed that the measured angle is zero, \theta[n] = 0 for all n (for example, suppose we disconnected the angle sensor).

For this ENTIRE question, assume

K_d = 0.5, \;\;\; \Delta T = 1.0e-3

Toggle response.

Suppose m = 1, and \theta_d[n] = 0 for n < 0 and \theta_d[n] = 0.1 for n \ge 0. What are the values of c[0], c[1] and c[2]?

c[0] (m=1):

c[1] (m=1):

c[2] (m=1):

Again assume \theta_d[n] = 0 for n < 0 and \theta_d[n] = 0.1 for n \ge 0. What is the smallest value of m (which is an integer) for which c[n] < 1 (strictly less than 1!)?

smallest m such that c[n] < 1:

Smooth Desire.

Now suppose \theta_d[n] = 0 for n < 0 but for n \ge 0,

\theta_d[n] = 0.1*(1 - \lambda^n)
for some real positive \lambda < 1. Note that \theta_d[n] eventually rises to 0.1, but not in one step, so it is "smoother".

If \lambda = 0.9 and m = 1, what are c[0], c[1], and c[2]?

c[0] (m=1):

c[1] (m=1):

c[2] (m=1):

Give an analytic expression for c[n], n \ge 1, as a function of \lambda and n. Use python syntax and use 'lam' for \lambda. For example, to enter \frac{1}{(1 - \lambda^n)}, type 1/(1-lam**n).

c[n], n > 0, =

What is smallest value of \lambda > 0 for which is c[n] \le 1 for all n?

lambda such that c[n] less than or equal to 1:

If \theta_d[n] = 0.1*(1 - \lambda^n), and for your \lambda above, how long, in seconds, does it take for \theta_d[n] to get to within two percent of its steady-state value \lim_{n \rightarrow \infty} \theta_d[n] = 0.1. Keep in mind that \Delta T = 1.0e-3.

Seconds for theta_d to be within two percent of steady-state:

Suppose we wish to determine a difference equation that smooths \theta_d. That is,

\theta_{ds}[n] = a_1 \theta_{ds}[n-1] + a_2 \theta_d[n].
where \theta_{ds} is the smoothed \theta_d.

If \theta_d[n] = \theta_{d0} for n \ge 0, and zero otherwise, for what values a_1 and a_2 will \theta_{ds}[n] = theta_{d0}*(1 - \lambda^{n+1})?

Give an analytic expression for a_1 and a_2 as a function of \lambda. Use python syntax and use 'lam' for \lambda. For example, to enter \frac{1}{1- \lambda}, type 1/(1-lam).

a1 =

a2 =

If we change the smoothing slightly, and you have the correct coefficients for a_1 and a_2, then

\theta_{ds}[n] = a_1 \theta_{ds}[n-1] + a_2 \theta_d[n].
will give you
\theta_{ds}[n] = \theta_{d0}*(1 - \lambda^{n+1}),
if \theta_d[n] = \theta_{d0} for all n \ge 0 and zero otherwise.

Based on this difference equation, we can relate \theta_{ds}(z) to \theta_{d}(z), as in

\theta_{ds}(z) = H_{sm}(z) \theta_{d}(z),
where H_{sm}(z) is the smoothing transfer function given by? Give your answer as a python expression, and using a1, a2, and z in your expression, for example,\frac{1}{a_1-a_2 z^{-1}} would be 1/(a1-a2*z**(-1)).

H_sm(z) =

The take-away? You can dramatically reduce the maximum value the derivative term of the motor command if you smooth the step changes in desired angle. And since the motor command for the propeller arm system has a maximum value of 1, you can either smooth the desired angle or struggle with the nonlinearity associated with limiting the motor command.