The questions below are due on Friday December 06, 2024; 05:00:00 PM.
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.
Goals
This problem focuses on CT-to-DT conversion. We will use three examples we have already seen in the lab and in prelabs, the propeller speed control problem, the pendulum, and the L-motor-driven arm.
CT-to-DT Conversion
Recall that given a single-input, single-output CT state space system has the form
where \textbf{x}(t) is an n-length vector of states, u(t) is the input, y(t) is observed output, \textbf{A} is an n \times n evolution matrix, \textbf{B} is the n \times 1 input matrix and \textbf{C} is the 1 \times n output matrix.
The single-input, single-output DT state space system has the form
where \textbf{x}[n] is an n-length vector of states, u[n] is the input, y[n] is the observed output, \textbf{A}_d is the n \times n evolution matrix, \textbf{B}_d is the n \times 1 input matrix and \textbf{C}_d is the 1 \times n output matrix.
If we assume u(t) = u[floor(\frac{t}{\Delta})] (that is, u(t) is piecewise constant), then we can make an "exact" conversion from a CT to a DT state-space system. And by "exact", we mean that the relationships
x[n] = x(n \Delta T),\;\;\; y[n] = y(n\Delta T)
hold exactly.
To derive the exact conversion, let us start with the solution of the CT state-space system with initial condition \textbf{x}(0), and constant input u(t) = u[0], given by
We can verify that the above formula is a solution by substituting for x(t) in the CT state-space equation system, and then show that the equations are satisfied. To do so, we will need to make use of one of the defining properties of the matrix exponential,
If we want to compute \textbf{x} (n \Delta T ) given \textbf{x}((n-1) \Delta T ) , and we know that the input will be constant over this short interval ((n-1)\Delta T, n \Delta T), we can treat \textbf{x}((n-1) \Delta T) as if it were an initial condition, and adapt the above solution to get
Although exact conversion seems desirable, it is quite common to approximate the CT-to-DT conversion. For example, we used approximate conversion in the first few labs, when we equated the change in angular velocity with product of \Delta T and angular acceleration. Our approximation was a particular example of the "Forward-Euler" approach, given in general by
In terms of I, A, B, deltaT, and what is Ad for the Forward-Euler approximation?
Loading...
In terms of I, A, B, C, and deltaT, what is Bd for the Forward-Euler approximation?
Loading...
In terms of I, A, B, C, and deltaT what is Cd for the Forward-Euler approximation?
Loading...
As an alternative to the "Forward-Euler" approximation, suppose we derived approximate \textbf{A}_d and \textbf{B}_d matrices by using a first-order Taylor approximation to the matrix exponential. More specifically, if we expand e^{\textbf{A} \Delta T } about \Delta T = 0, and keep only the first order terms,
e^{\textbf{A} \Delta T} \approx \textbf{I} + \Delta T \textbf{A}.
In terms of I, A, B, and deltaT, what is Ad for the first-order Taylor approximation?
Loading...
In terms of I, A, B, C and deltaT, what is Bd for the first-order Taylor approximation?
Loading...
Given the above, it is not surprising that "Forward-Euler" and "First-Order" are used interchangeably to describe the above approximate CT to DT conversion.
Three numerical examples
In order to gain some concrete experience with CT to DT conversion, we will consider three examples:
Propeller Speed
We developed a model relating the propellor motor's back-EMF, which is proportional to rotational velocity voltage, to the voltage applied to the motor, v_{pwm} of the form
For this scalar example, v_{emf}(t) is the scalar state, which we will denote generically as x(t), v_{pwm}(t) will be denoted as u(t), and we substituted values for the above parameters to yield a scalar state-space model,
In CT, we assumed that \textbf{A} had unique eigenvalues, and used diagonalization by eigenvectors to show that that the poles of the transfer function from U(s) to Y(s) are the eigenvalues of \textbf{A}. An alternative argument starts with the observation that if p is a pole of H(s), then H(p) = \infty. But H(p) can only be infinite if the inverse of \left( p \textbf{I} - \textbf{A} \right) is infinite.
If there exists a non-zero vector \textbf{w} such that
\textbf{A} \textbf{w} = p \textbf{w}
then p and \textbf{w} are an eigenvalue-eigenvector pair for \textbf{A},
and
\left( p \textbf{I} - \textbf{A} \right) \textbf{w} = 0.
That is, \left( p \textbf{I} - \textbf{A} \right) is zero, at least in one direction, so its inverse is infinite.
An identical argument can be made in the DT case, giving us the fact that if the poles of H(z) are unique, then
poles(H(z)) = eig(\textbf{A}_d).
The Spectral Mapping Theorem for Matrices
Given a polynomial function,
f(z) \equiv \sum_{l=0}^L \alpha_l z^l,
if \lambda is an eigenvalue of an n \times n matrix \textbf{A},
then f(\lambda) is an eigenvalue of f(\textbf{A}), given by
So for example, if \lambda is an eigenvalue of \textbf{A}, then 3 + 4\lambda is an eigenvalue of
3 \textbf{I} + 4\textbf{A},
and \lambda^{17} is an eigenvalue of \textbf{A}^{17}.
If the eigenvalues of \textbf{A} are distinct, the spectral mapping theorem is easy to prove. Recall that for matrices with distinct eigenvalues, the matrix of its eigenvectors, \textbf{V}, is invertible, and
\textbf{V} \Lambda \textbf{V}^{-1} = \textbf{A},
where \Lambda is the diagonal matrix of \textbf{A}'s eigenvalues.
You are welcome to use matlab to help answer the following questions. Commands you might find useful include:
'dss': Converts A,B,C,D,E matrices in to a CT state space system.
'c2d': Creates a DT system from a CT system using the formulas above.
'expm(A)': computes the matrix exponential e^{A}. DO NOT USE 'exp(A)'!!!!
Please enter numerical answers as real or complex scalars, e.g. 8.3 or 5.0+3.0j, or in python list format, e.g. [4.0,5.0+3.0j,5.0-3.0j]. When answering questions with expressions, please use python syntax, such as e^{6\Delta T } becomes e**(6*DeltaT).
This set of questions examines the pole of DT state-space models of the single-state propeller speed example. Notice that for small values of \Delta T, the DT pole is close to, but less than, 1.0.
What is the pole of the CT propeller speed system (example 3.1)?
Loading...
If deltaT = 1/20, what is the pole of the exact DT propeller speed system?
Loading...
If deltaT = 1/20, what is the pole of first-order approximate DT propeller speed system?
Loading...
For what deltaT (to FOUR SIGNIFICANT DIGITS) is the pole of the exact DT propeller speed system equal to 0.99?
Loading...
For what deltaT (to FOUR SIGNIFICANT DIGITS) is the pole of the first-order approximate DT propeller speed system equal to 0.99?
Loading...
What is the smallest deltaT for which the first-order approximate DT propeller speed system is unstable (if never unstable, enter -1, if never stable, enter 0)?
Loading...
What is the smallest deltaT for which the exact DT propeller speedsystem is unstable (if never unstable, enter -1, if never stable, enter 0)?
Loading...
This set of questions refers to DT models of the two-state pendulum example without friction, given above. With no input and a nonzero initial condition, the pendulum oscillates forever, so its two CT poles are purely imaginary. The associated exact and approximate DT state-space systems can behave in surprising ways, particularly for larger \Delta T's.
What are the poles of the CT pendulum system? Remember to enter as a python list, e.g. [2.0+7j,2.0-7j].
Loading...
What are the MAGNITUDES of the poles of exact DT pendulum system (does not depend on DeltaT)? Remember to enter as a python list, e.g. [5.0,3.7].
Loading...
What is the smallest deltaT for which the first-order approximate DT pendulum system is unstable (if never unstable, enter -1, if never stable, enter 0)?
Loading...
What is the smallest positive deltaT for which the Ad matrix of the exact DT system is a negative identity matrix (equal to -I) (hint:what must the DT poles be, then use the spectral mapping theorem).
Loading...
What is the smallest positive deltaT for which the poles of the exact DT system are purely imaginary? If no such deltaT exists, enter 0.
Loading...
What is the Bd matrix for exact DT system with purely imaginary poles whose deltaT was found in the previous question? Please give your answer as a list, e.g. `[3.7, 4.8]'.
Loading...
Notice that the 2 \times 1\textbf{B} matrix for the CT pendulum system has only one nonzero entry, as does the \textbf{B}_d matrix generated by the first-order approximate DT system. But for the exact DT system, the entries of its associated \textbf{B}_d matrix are usually all nonzero, particularly when the \Delta T is larger. To see why, suppose the state is zero when the input changes from zero to one. For the CT system, after a single \Delta T, all the states will have changed. And since the DT system is exact, it must represent the change in the states after one \Delta T, from all the states being zero to all the states being nonzero. Multiplying the starting all-zero state by \textbf{A}_d will always yield zero, so the nonzero state at the end of the \Delta T interval has to be represented in \textbf{B}_d.
The following questions refer to the L-motor driven arm example.
What are the poles of the CT L-motor driven arm example? Remember to enter as a python list, e.g. [2.0, 2.0+7j, 2.0-7j].
Loading...
What is the largest pole for the exact DT system for the L-motor driven arm example (note that it does not depend on deltaT)?
Loading...
For what value of deltaT is 0.1 the smallest pole of the exact DT system for the L motor driven arm example?
Loading...
What is the smallest deltaT for which the exact DT system for the L-motor driven arm example has at least one negative pole? If there is none, enter 0.