Started this discussion. Last reply by Don Kim Mar 26, 2012. 2 Replies 0 Likes
After computing orthogoanl X, Y and Z matrix, a Taylor's expansion is used in 'Direction Cosine Matrix IMU: Theory'.Scaling X, Y and Z using a Taylor's expansion,[In the paper]X_norm = 0.5 (3 -…Continue
1123 members
4 members
283 members
1074 members
77 members
© 2019 Created by Chris Anderson. Powered by
Comment Wall (5 comments)
T3William Premerlani said…
Hi Don,
You asked:
"Now I am implementing in MATLAB through your C programming code. But I have encountered some problems.
1) Your C programming (R.c) looks slightly different from 'Direction Cosine Matrix IMU' when I look at the accelerometers part. After computing the magnitude of speed over ground from the GPS, I am not really sure how to compute the centrifugal acceleration. Because this C programming codes corrects body acceleration for centrifugal effect directly.
2) What is different when accelerometers measure only gravity? How the system is different? How to design it? Is there any problem?
3) 'simstruc.h' requires any MATLAB MEX files or any input files to run this program. If you do not mind, I could have your files or give me any clues for inputs.
4) How you could decide PI controller gains (Kp yaw and pitch-roll=0.02 / Ki yaw and pitch-roll=0.00001)?
[Summary]
1) Would you explain the accelerometer part?
2) How to design it when the accelerometers measure only gravity?
3) Would you help me decide input values?
4) Would you explain how to decide PI controller gains?"
1. Regarding acceleration, there were a couple of slight changes from the draft paper, as we learned more...the centrifugal acceleration compensation is computed from the air speed, not the ground speed. I make the approximation that the angle of attack and side slip angles are zero. Therefore the centrifugal acceleration is computed from the cross product of the gyro rotation rate vector with the air velocity vector. We also account for forward acceleration from GPS information.
2. All physical accelerometers measure acceleration minus gravity, there are no sensors that can measure gravity only. However, if you are doing a simulation, and you want to use gravity only, then simply skip the acceleration compensation computations.
3. Regarding the MATLAB simulations, you will have to contact Paul Bizard, he did that work.
4. Regarding the PI controller gains, Paul Bizard did a study of a range of values and selected values that gave good performance. However, if you look at the latest code in MatrixPilot, you will see that I am now using a much different approach. For more information on that, you should read my report on the subject.
Best regards,
Bill
Hi Don,
I don't work on the DCM algorithm anymore. Sorry but I don't have the time to help you very much.
Regarding your question, it seems that William Premerlani has chosen a different approach for the latest code. I don't know what it is.
The values of the gains that I found "optimal" (in my way) in the original algorithm are :
KPPitchRoll 0.012 // Pitch-Roll correction proportional gain
KIPitchRoll 0.00002 // Pitch-Roll correction integral gain
KPYaw 0.3 // Yaw correction proportional gain
KIYaw 0.0001 // Yaw correction integral gain
(International system units)
Good luck.
Best regards,
Paul
Hi Don,
1/ I found the gains by gut feelings. I have some experience.
- KI is set relatively to KP in order to avoid oscillations of the response
- the two of them are set high enough to filter the noise from the accelerometers but low enough to allow recovery in case of divergency (this happens if the plane flies aerobatics)
If you want a more powerful attitude estimation algorithm then try the Extended Kalman Filter. It is very powerful.
2/ I don't understand your second question.
Regards,
Paul
Hi Don,
I don't understand what you mean by "help me set these inputs" ?
Do you mean "generate these inputs" ?
I used my Matlab/Simulink model to generate the inputs. It is a sort of flight simulator.
Regards,
Paul
Hi Don,
You can download my simulator here : http://diydrones.com/profiles/blogs/matlabsimulinkavl-simulator
Best regards,
Paul
You need to be a member of DIY Drones to add comments!
Join DIY Drones