cnpcshangbo/simscapeFOPD

Using IRID

Opened this issue · 11 comments

impulse response invariant discretization (IRID) method

Using this piece of code, I am able to get the controller in z domain.

gam=0.9693;
Ts=.01;
dfod=irid_fod(gam,Ts,5);

cd=7.9733+0.2238*dfod;

s=tf('s');
p=0.99217/(0.2486*s+1)/s;
pd=c2d(p,Ts,'tustin');%plant

phiz=cd*pd/(1+cd*pd);

num=
[0.304491262548240,-0.937336830445012,1.08933728516398,-0.584146578665016,0.138183294173986,-0.0102548884710634];
den=
[0.0101201839324044,-0.0228427827690589,0.0162967440497079,-0.00320636053105791,-0.000423005899049262,8.95094110425754e-05];
Also, we can prove the closed-loop stability from the closed-loop transfer function poles.

So, the designed discrete controller is working well in numerical simulation. Next step, I am going to test it in Simscape Quadrotor.

However, the performance is like this, when I put the controller in Simscape.
image

Closed-loop poles:
[0.000102719520635084,-0.000865537908196629,0.00325800756133674,-0.00720132367524617,0.0103194622578090,-0.00996028888391507,0.00647724417673368,-0.00271339814764816,0.000622707859943362,-1.58357641906846e-05,-2.98124871203922e-05,6.18697332722469e-06,-4.03141517099768e-08,-9.84756134649096e-08,7.30629718690601e-09]

What to do next?
A. Try to fix roll and pitch.
B. Read Professor Xue's book.
C. Read FO motion control and ask Yingluo.
D. Search literature.

I corrected a bug in the code: 16f19cd
Then the performance in numerical simulation is getting better:
image

Then I am going to retry the Simscape simulation.
image

This is a comparison between IOPID and FOPD.
image