Page 1 of 1

PID tuning

Posted: Mon Sep 18, 2017 11:37 pm
by zhanghaijason
Hello,
For my experiment, I added some parts on the CF2. So every time I make it take off by just giving it thrust, it will take off and fly backward(toward the two blue LEDS). I think tuning the PID parameters should help. So I followed this post: viewtopic.php?f=6&t=192&p=1181&hilit=ad ... trol#p1181. When I tune the Rate parameters, I can detect the oscillation and can find good PID parameters. However, when I continue for the Attitude tuning, what I can get is just the CF rotates around the strings. I can not see oscillation. Does anyone have an idea how to solve this? Is there other PID tuning tutotial for CF that I can refer to?
Thanks

Re: PID tuning

Posted: Wed Sep 20, 2017 1:24 pm
by arnaud
Hi,
How much margin do you have on the motor power? You can see that by looking at the individual motor thrust and see if any is close to 0 of 100%.

By adding weight off-center you will start to reduce the power margin to control the Crazyflie attitude by pushing part of the motor closer to 100%. If that is happening you might be able to modify the power distribution to get a better attitude control (the current power distribution is designed with the assumption that no motor is capped at 100%), but you will loose in thrust control instead.

Re: PID tuning

Posted: Wed Sep 20, 2017 8:23 pm
by zhanghaijason
arnaud wrote: Wed Sep 20, 2017 1:24 pm Hi,
How much margin do you have on the motor power? You can see that by looking at the individual motor thrust and see if any is close to 0 of 100%.

By adding weight off-center you will start to reduce the power margin to control the Crazyflie attitude by pushing part of the motor closer to 100%. If that is happening you might be able to modify the power distribution to get a better attitude control (the current power distribution is designed with the assumption that no motor is capped at 100%), but you will loose in thrust control instead.
Hi arnaud,
Thanks for your reply. I just placed two carbon fiber with a "+" shape on top of crazyflie and placed 4 markers for motion tracking system. For checking the margin of motor power, could you detail where could I check it? I connect the CF to PC client, however, only the part I circled do display something. Even the battery capacity is not displayed.

Re: PID tuning

Posted: Thu Sep 21, 2017 7:45 am
by arnaud
It looks like the connection process hangged mid-way (the connection button shows "cancel" instead of "Disconnect"). Can you try to update both firmware and client to the latest version and changing the radio datarate to 2M?

Re: PID tuning

Posted: Fri Sep 22, 2017 4:45 pm
by zhanghaijason
arnaud wrote: Thu Sep 21, 2017 7:45 am It looks like the connection process hangged mid-way (the connection button shows "cancel" instead of "Disconnect"). Can you try to update both firmware and client to the latest version and changing the radio datarate to 2M?
Hi, I have fixed it, it seems 4 markers are too heavy for it. Thank you.

Re: PID tuning

Posted: Mon Sep 25, 2017 1:11 pm
by arnaud
Hi, glad to hear that the problem is fixed. I guess it depends of the Marker size and weight. There has been experiments with more than 4 markers by using small markers, see the MIT paper on this page: https://www.bitcraze.io/research/.