Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using IRID #14

Open
cnpcshangbo opened this issue Mar 5, 2018 · 11 comments
Open

Using IRID #14

cnpcshangbo opened this issue Mar 5, 2018 · 11 comments

Comments

@cnpcshangbo
Copy link
Owner Author

impulse response invariant discretization (IRID) method

@cnpcshangbo
Copy link
Owner Author

@cnpcshangbo
Copy link
Owner Author

cnpcshangbo commented Mar 8, 2018

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.

@cnpcshangbo
Copy link
Owner Author

cnpcshangbo commented Mar 8, 2018

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

@cnpcshangbo
Copy link
Owner Author

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

@cnpcshangbo
Copy link
Owner Author

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]

@cnpcshangbo
Copy link
Owner Author

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.

@cnpcshangbo
Copy link
Owner Author

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

@cnpcshangbo
Copy link
Owner Author

Then I am going to retry the Simscape simulation.
image

@cnpcshangbo
Copy link
Owner Author

This is a comparison between IOPID and FOPD.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant