I have a nonlinear model that is represented by: TVo/V*X''+X'=KVo/V*D where D is the control input. I wanted to design an integral controller to control X to some Xd(desired) Assuming that V=Vo. I did that with no problem. Next, I wanted to design a gain scheduling to compensate for slowly varying V. I did that as well.
Now I have to simulate the system performance with MATLAB using both controllers to a square wave input in which Xd varies between X1 and X2 while slowing varying V. I'm not sure about the square input part, I don't quite understand what and how to do it. I might be missing something here.
If it helps I will explain how I found the design for the integral controller: Integral control: I did change of variables so that Y1=X, Y2=Y1'=X' Y1'= Y2, Y2'=KD/T-Y2/T X-Xr=e=W' (error which at steady state becomes zero b/c of the integral controller). D=-K1Y1-K2Y2-K3W (Assuming linear PI controller). After linearing the system, I ended up with 2 state spaces that represent Y1-Y1ss, Y2-Y2ss & W-Wss (where ss represents steady state).
[ Y1-Y1ss;Y2-Y2ss;W-Wss]' = [0 1 0;-K*K1/T (-1-K*K2)/T -K*K3/T;1 0 0]* [Y1-Y1ss;Y2-Y2ss;W-Wss]All of K,K1,K2,K3 & T have to be chosen so that the matrix is hurwitz.
Any explanation or help would be appreciated. Thanks.