Model Uncertainty and Robustness · Lesson
English translation
Topics covered
Apply a controller designed for one model to several actual models and delay conditions to find where performance deteriorates.
Nominal and actual models
The plant is , with state-feedback gain fixed at . Using all combinations of mass , damping , and stiffness gives models to check.
Examining stability and performance separately
Assess stability from each model's poles, and compare steady-state error and settling time in the step responses. The performance table for the 27 combinations reports results at the selected values.
Before applying input delay and saturation, stability of the linear model can be assessed using the characteristic polynomial . If all three coefficients of a 2nd-order polynomial are positive, its poles have negative real parts. All three coefficients are positive throughout the given range, so the system is stable throughout that range.
Response speed and error depend on the parameters.
Checking the same design in MATLAB
Keep the designed gain fixed and change only the plant's mass, damping, and stiffness. The poles of each combination indicate stability; the response curves show changes in overshoot and settling time.
Actual systems with different masses
Keep the same controller and change only mass to compare poles and time responses.
import numpy as np
from scipy.signal import place_poles,StateSpace,lsim
import matplotlib.pyplot as plt
A0=np.array([[0.,1.],[-2.,-3.]])
B0=np.array([[0.],[1.]]);C=np.array([[1.,0.]])
K=place_poles(A0,B0,[-2.,-4.]).gain_matrix;N=8.
t=np.linspace(0,6,1201)
for m in [.7,1.,1.3]:
A=np.array([[0.,1.],[-2/m,-3/m]]);B=np.array([[0.],[1/m]])
poles=np.linalg.eigvals(A-B@K)
_,y,_=lsim(StateSpace(A-B@K,B*N,C,0),np.ones(len(t)),t)
print('mass',m,'poles',poles);plt.plot(t,y,label=f'm={m}')
plt.xlabel('Time [s]');plt.ylabel('Position');plt.legend();plt.grid()
mass 0.7 poles [-1.65155873 -6.91986984] mass 1.0 poles [-2. -4.] mass 1.3 poles [-2.30769231+0.91016612j -2.30769231-0.91016612j]