MATLAB Answers

EDITED:Why controller goes unstable after first flight?

1 view (last 30 days)
Huzeyfe KILIÇ
Huzeyfe KILIÇ on 6 Apr 2020
Edited: Huzeyfe KILIÇ on 8 Apr 2020
I m trying to design my own position controller for Parrot mambo
When i upload the designed controller, It works fine for the first time. It flies stable.
But when i try to fly it for the second time controller goes unstable and drone crashes.
When i upload the same code again, It works fine again.
Disconnecting and reconnecting or powering the drone off also won't help.
Anybody had this problem before?
What could be the cause?
Ok so:
Here are the results from one of my tests
I ran these tests a few times and responses change from controller to controller
Original controller does not have this phenomenom for example
Can somebody else try the controller i am giving below and tell me if they have similar results?
IMPORTANT: Error is defined as belo so adjust your values accordingly for your control architecture!!!!
Ok for attitute control (Note that I only changed pitch control values and left the roll control values same except the integration block):
I-P-D values as follows:
-0.0100 -0.0098 - 0.0047
Again for position controller i only changed the X controller values:
P-D values as follos:
0.2449 0.2386
For flight scenario drone first holds its ltitute for 10 seconds and 0.5 m referance is given at 10th second then drone hovers until 20th second. At 20th second drone shuts itself down and falls from 1m. Drone is Parrot MAMBO.
Test enviroment is a room and there is a rag on the floor. (Although trials with a blanket(to make sure rag causes something??) also gave same results)
If you decide to try the controller make sure the floor is covered with soft material because trial may damage the drone seriously. Also make sure you try in a large room!!!!!
First trial:
First trial
I know it is not the perfect controller but at least it is stable and goes to the 0.5 m referance with overshoot and oscilations
Now when i run the soma controller again WITHOUT UPLOADING NEW CODE the results are as follows
Second controller trial
As can be seen from figure I had to stop the flight at 7th second since it was going unstable!
What causes this error?
Is it the controller or a bug?
Or is it the drone?
Laso if anybody decides to try this controller just remember that my controller may not ork on your drone so please be careful when doing test flights (large room soft floor) and stop the flight immediately if the controller goes unstable
Another safety measure can be a time switch that can enable my controller after the drone hovers and satbel (Thats how i tested the controllers i designed to make sure they are stable)
Thank you

Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by