PID tuning

Firmware/software/electronics/mechanics
Post Reply
zhanghaijason
Member
Posts: 52
Joined: Fri Jul 28, 2017 9:07 pm

PID tuning

Post 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
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: PID tuning

Post 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.
zhanghaijason
Member
Posts: 52
Joined: Fri Jul 28, 2017 9:07 pm

Re: PID tuning

Post 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.
Attachments
Untitled.png
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: PID tuning

Post 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?
zhanghaijason
Member
Posts: 52
Joined: Fri Jul 28, 2017 9:07 pm

Re: PID tuning

Post 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.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: PID tuning

Post 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/.
Post Reply