Example scenario To predict the subsequent motion of two objects at the same position, what must you know besides their current position?
Description
You also need the current velocity. If one object is stationary and the other moving, their subsequent positions differ.
The constant-acceleration equations also used both starting position and velocity. Now extend them to a model where acceleration depends on position, velocity, and force.
With position and velocity as states, must acceleration also be stored separately?
Description
In this model, acceleration can be calculated from the current position, velocity, and applied force, so it is not included as a separate state.
Velocity is the rate of change of position, and acceleration is the rate of change of velocity. Combining these relationships expresses the 2nd-order differential equation for position as two 1st-order differential equations.
03 States and outputs
Must the information needed to calculate motion always match the quantity being observed?
Description
Even when position and velocity are both needed for calculation, the observed output may be position alone.
In this exercise, choose position or velocity as the output of the same state model. Distinguish the information retained from the value displayed.
Practice
1. Derive the state equations
R, L, and C are connected in parallel between the same two nodes. Take the lower node as the reference potential. Define the upper-node voltage as , the inductor current flowing downward as , and the supply current as .
In , use KCL and to write the two differential equations for and the output yourself, and find .
Set the initial conditions to 0 and apply the Laplace transform to both equations. In the inductor relation, express in terms of , then substitute into the KCL equation. Collect terms containing to find .
First state the values that and approach when a constant current of 1 A is supplied for sufficient time.
Create an ss model using the matrices you derived and verify using tf·dcgain.
This parallel circuit differs in configuration from the circuit with a series RL branch below.
This time, replace one of the three repeated values for the RL circuit with this comparison.
2. Mechanical State Space
Keep the mechanical model's and , and rebuild A and sys for . Plot the three position step responses on the same time axis and label in the legend.
Compare the presence of oscillations and convergence of each curve. State which curve supports your judgment.
Using the same state order, select only linear velocity as the output. Record the Cout and dcgain(sys) used beside their values for position output.
3. Electrical State Space
The states of this circuit are . is the capacitor voltage [V], and is the current in the series RL branch [A].
Keep the other baseline circuit coefficients unchanged and rebuild A, Cout, and sys for .
Calculate the final output voltage for a 1 A input using dcgain(sys), and record and voltage in two columns.
State that Ccap is capacitance and Cout is the output matrix. Use the state order and Cout to write the output equation , and judge whether it represents the intended resistor voltage.
4. State coordinates and initial values
On the same time axis as the baseline model, plot initial(sys,[0;1],0:0.01:10) and initial(sys,[1;0],0:0.01:10). Label the initial states in the legend.
State which state starts at a value other than 0 and whether an external input is present. Distinguish the step response with initial state 0 from the output caused by the initial state.
Submission and saving
Include code, actual outputs and plots, and your own interpretation. Submit through KLAS; check the semester schedule and latest announcements for the deadline.
Filename: Name_StudentID_Week5.mlx.
Restart the runtime, run all code from the top, then save.
Optional practice
Example: Selecting the wrong state as the output
Keep A,B,D of the mechanical model unchanged. When position is required, record the transfer functions obtained using Cout=[0 1] and Cout=[1 0].
State the order of the states and the units of each output. Change only the Cout line to output position, and rebuild the model.