Control Engineering II Programming language Python MATLAB
Preview learning notebook Download learning notebook
Preview learning mlx script Download learning mlx script
State Feedback and Observer English translation
Estimate velocity to control a system that measures only position, and compare estimated velocity and noise sensitivity.
Before practice 01 Can velocity be determined by measuring position?Description Position at a single instant is insufficient. Observability concerns whether velocity can be distinguished from a record of changing position under known dynamics.
02 What changes when observer poles move further left?Description Initial estimation error may decay faster, but estimator gain for measurement noise may also increase. Compare convergence and noise response together.
1. Can measurements distinguish states? Starting conditions With position [m] and velocity [m/s] as states, use x ̇ = A x + B u \dot x=Ax+Bu , y = C x y=Cx . Use A = [ 0 1 − 2 − 3 ] A=\begin{bmatrix}0&1\\-2&-3\end{bmatrix} , B = [ 0 1 ] B=\begin{bmatrix}0\\1\end{bmatrix} , C = [ 1 0 ] C=\begin{bmatrix}1&0\end{bmatrix} .
Procedure Form the controllability matrix [B,AB] and observability matrix [C;CA], and find their ranks. Compare the case where B is a zero vector with the case C = [ 0 0 ] C=\begin{bmatrix}0&0\end{bmatrix} . Explain the distinction between an ineffective input and an unavailable measurement. Results to retain A comparison table of both ranks and feasible designs for the three conditions. Items to record and points to check
Condition
Controllability rank
Observability rank
Design feasibility Points to check Are both ranks of the baseline model 2? Did you avoid applying pole placement directly to a rank-deficient model? 2. Connecting state feedback and observer Starting conditions u = − K x ̂ + 8 r u=-K\hat x+8r , r = 1 r=1 . Control poles: −2,−4; observer poles: −8,−10. Use x ( 0 ) = [ 1 0 ] x(0)=\begin{bmatrix}1\\0\end{bmatrix} , x ̂ ( 0 ) = [ 0 0 ] \hat x(0)=\begin{bmatrix}0\\0\end{bmatrix} .
Procedure Calculate K and L, and compare the eigenvalues of A − B K A-BK and A − L C A-LC . Integrate actual and estimated states simultaneously, and plot position, velocity, and estimation errors over 0–4 s. Distinguish the reduction in estimation error from the output approaching its reference. Results to retain Two plots of actual and estimated position and actual and estimated velocity, and the final estimation errors. Items to record and points to check
K
L
Control poles
Observer Pole
Final error Points to check Do the eigenvalues of A − B K A-BK and A − L C A-LC , after substituting the calculated K K and L L , match the specified control and observer poles, respectively? At t = 4 t=4 s, are the position and velocity estimation errors below 1e-6 m and 1e-6 m/s, respectively? 3. Is a faster observer always better? Starting conditions Add n(t)=0.02*sin(40*t) to the measurement. Compare observer poles (−8,−10) and (−20,−25), keeping controller K fixed.
Procedure Use both observer settings in the practice notebook's function, and compare the control input u on the same time axis. Calculate position-error RMS, velocity-error RMS, and control-input RMS separately after 1 s. Interpret initial estimation-error convergence separately from the response to measurement noise. Results to retain Control-input curves, a comparison table of the three RMS values, and justification for the selected setting. Items to record and points to check
Observer Pole
Position error RMS [m]
Velocity error RMS [m/s]
Input RMS [N]
Reason for your choice Points to check Are noise, initial conditions, and time steps the same for both settings? Did you avoid conflating error and input in a single metric?
Official examples and data