A state space model is on the form: dx = Ax + Bu y = Cx + Du
Nonlinear state space models which is linearized is on this form:
dΔx = AΔx + BΔu
Δy = CΔx + DΔu
Where:
Δx = [x1 - x10; x2 - x20; x3 - x30; .... ; xn - xn0]
Δu = [u1 - u10; u2 - u20; u3 - u30; .... ; um - um0]
The x10, x20, x30, xn0, u10, u20, u30, um0 is constants/initial values for the linearization.
So! The question is about the MATLAB command "lsim":
lsim (sys, u, t, x0)
In this case, sys is the A, B, C, D matrices from the lineraized state space model. u is the insignal vector, t is the time vector. But x0....can i say that x0 is x10, x20, x30, .... ,xn0?
Can I also say that u = u - u0 , and u0 is , u10 u10, u20, u30,... , um0 ?
Example:
u = linspace(5, 5, 100); % insignal 5
t = linspace(0, 100, 100); % 100 seconds
u0 = [0.2; -1.2; -3];
u = u - u0; %
x0 = [-2; 2; -1]
lsim (sys, u, t, x0)
This will results:
Δx = [x1 - 2; x2 + 2; x3 - 1]
Δu = [u1 + 0.2; u2 - 1.2; u3 - 3]
Am I right?