Hi all dear guys,
I' m back after long time spent to work abroad, just to start again with more entusiasm.
Ok, the question:
- I have implemented succesfully a Kalman filtering for my stabilization IMU so I can get good outputs and results just from accelerometers and gyros.
I read lots of material about stabilization, I doewnloaded premerlani 's documents, and ardupilot code (this one is really difficult to understand, to me).
Forgetting about navigation, (I ll take care about it in the future) I want that my IMU must stabilize itself once on board of the rc modell.
Could you please direct me or give me some useful tips to write code to stabilize the aricraft?
I read about the sinecosine matrix, and I suppose that's the key, but, since I don't want to equip my plane with a GPS yet, I cannot get velocity value, so the matrix is really unuseful.
Moreover, since I dont want to implement the navigation code, the tranformation from body frame refernce to earth frame refernce is still unuseful.
Or, (please tell me if so) I thought...I can get velocity about the frame body of the aricraft simply intergating accelerometers outputs and getting the speed about the three axis.

Could be it an idea?
I know that acceleromers don t give good results if intergrated over time..

Sorry if I missed some informations!

thank you all in advance

Bye!
Dave

Tags: stabilization

Views: 258

Reply to This

Replies to This Discussion

Have you flown the imu yet? If not I would start there because you will most likely have to do more tuning of the filter in the air. Check that first.
Thank you Ryan,
no I don't have flown the IMU yet.
I tried simply to "debug" it visualizing the oputput on my laptop.
What do yu suggest?
To make some flights and programming the PIC in order to keep trace of gyros and accelerometers?
Or to write a simple proportional (form Premerlani first UAV board version)...let's say...:
deflect(t) = Kp * (Pitch_set_point - Pitch_mesaured) for pitch and then for others axis and then see what happens?

The problem if that I don't have now idea on how to go on...
At glance I would avoid nopw the MatrixRnav, not bacause difficult, but because non nescessary.
In this case, since I want to develop a stabilization unit, I wuold think to write simple PID code for the three axis referred to the boy freame reference...

Any suggestion?

I tnank you for your reply :)
Bye!
Dave
Well there a lot of things to you can try but the best is to have a groundstation set up so you can watch the estimated angles as it flys. Most likely you will have missed a negative sign or misplaced some much needed equations. If you don't have a ground station you can try the feedback of control trick but if it departs you don't really know why. Tuning an IMU in flight involves using some common sense but with out any information as to what it is doing its almost impossible.
I understand...
Let say that I want to fly a simple small cessna Rc model elctro, and waht I really want is to implemente a simle IMU unit, with stabilization for the pitch, aileron and yaw assistant.
Ii must just stabilize the model, avoiding navigation fopr the moment.
I would start with simple code, proportional terms and perhaps if needed add more compex euquations

Thank to your suggestion I will try to mount a Xbee on the aircraft that send to my laptop the "response" of the aircraft and the angles while fliyng.

I set up a 6 degrees board, with kalman of filter, and the estimated results are really really good. The gyros are not affected by drift anymore.

That's all...
Just I would need of some code or idea on how to develop a control for elevator and airloren and rudder given the estimated angles form the IMU.
The the link I really miss...

Thank you!

dave
yeah proportional control for pitch and roll is all you need. Don't want to discourage you but you will most likely have problems with your Kalman once it gets airborne. That's why everyone has table top imu's that work but you see very few that actually fly.

ele_servo = (ele_cmd_deg - pitch)*kp_pitch;
ail_servo = (ail_cmd_deg - roll)*kp_roll;

simple as that
Thank a lot guys!!!!!!!!!!! :) :) :)

Thank you Ryan! What yuo wrote is exactly what I meant!! So it seems really simplke to implement a Proportional controller (after my deep work about Kalman).. the only problem is: I still don't understand on how to couple pitch and roll., maybe another proportional gain times the 2 angles (roll and pitch) ????
Usually what do the others tune exaclty in their kalman processes? The process noise? the measurement noise?

Hi Paul: thank you for your reply, you also got the point. BUT since I read the DCMdraft doicuments by Bill, I cannot find any tip on how to split the process in two, as you said. I would ask you if you could tell me the right way or where I can find a simple example. (since I don' t use a GPS I would forget about the yaw estimation)

Thank you again!!

BYyyyyyye!!
Dave
Thank you Paul!
Very clear and helpful!!!
At glance it seems complicated and I admit I haven't understood the process yet.
But as I implemented a kalman filter which does remove bias offset from gyro and outputs correct angles value, mayeb I m able to undesrtand better your post.

Just one question, to me is not clear whether should I take account of centripetal acceleration during turns (and correct the accelerometers output) or the problem is automatically solved by the DCM matrix.

You say: "if you have airplane speed information", but it is not clear whether it is necessary for computing Zem or for centrifugal compensation.

I m going to read again about DCM matrix...perhaps that's the key. :)

Thank you again!

bye!
Dave
:) :) :)
Ok Paul, thank you for youzr answer.
Yes I have implemented a kalman filter on a 6 IMU board.
I read, searched, got crazy on this topic for almost 1 monnths and fnally I got it working (on the Table I mean...) Thanks to many conrtibutions by Tom Bycke, and other person I m proud to have calibrated, rewrote the code on a IMU.
Again, on the table it gives accurate results, but it never flow yet (the reason is: I m looking for a suitable airframe first).

Now you say that kalman filter is much better than DCM, ok. BUT, sorry to say tthat, if you say me "keep kalman", I don`t understand how to develop a PID (or simply a proportional controller) for govering ailerons and elevator.

Ryan gave me a great suggestion and he confirmed me the proportional equation that I should use to develop such controller.
BUT, still it is hard to me to understand HOW to implemente a aileron-elevator coupled action
You spoke about the DCM, ok, but now you are telling me to keep kalman.
Since kalman gives me onla acurate angle (pitch roll and ywa) it doesn`t take in account other effects, such as elevator compensation during a steady turn.

In the firts draft, Bill premerlani spoke about the first UAV board (with dof, the ET312) and at the time he developed simply another proportional controller for correcting picth durign turns. BUT he said also that solution was a bit... "rough".

And now I don`t understand whether should I use DCM for correcting pitch or using kalman outputs and another kind of controller..

That`s all :(

I thank you again for your patience and your explanation.
I never gave importance to DCM before your siggestions :)

Thank you

Dave
Now it much clearer.
I m going right now to dwonload the code you mentioned and give it a deep loop.
I thank you again for your help and suggestions.
If still in trouble I'lL come bak again..

See you

Dave
Hi Dave,

I am working on a similar project to you. It sounds to me like you got some good answers from Paul however the rest of us cant see them :) I was wondering If you could post what he sent you.

Cheers,

Will
Hi Will

Good question!
I don't know whether you can or not see his answers above!
Me no!!

Someone knows if Paul is still in this forum?
Or he left the forum board and removed all topics????

Anyway I suggested me to check ardupilot code.

Tomorrow I will send you these files...

bye
Dave
Hi Will
the software is downloable from here
Doenload ArduPilot231.zip and you can find the software Paul suggested to me.

I can tell you that the source is very compact and to me is not the best example of code easly written to be understandable.
Anyway the interesting part is the PID control, that is , I think, what you are looking for.

Pay attention because the autopilot doesn't use gyroscopes or accelerometers but FMA module.
So it is just partially similar to what I need for my project and , I suppose, to your porpuose.

Anyway, if you tell me more about your project we can share some common "ideas".

For istance, to me is not still clear how to compensate the centripetal acceleretion during turns...in that configuration accelerometers start to give erratic data and the output of kalman is a false indication of the angle of pitch and bank angle.....

Bye!
Dave

RSS

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The third round was a reliablilty/aerial photography round for both planes and copters, which is now closed. Stay tuned for the next round, beginning soon.

A list of all T3 contests is here

 

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service