CF2.0 Stabilization Response

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
nimble
Beginner
Posts: 19
Joined: Tue Dec 16, 2014 12:20 am

CF2.0 Stabilization Response

Post by nimble »

Hi,

While I think the CF2.0 is behaving with expected parameters, I feel that its stabilization could be improved.
With no wind - its very stable. With wind, it counteracts very slowly, resulting in a kind of 'thrashing' and 'wobble'.

I can post some videos if noone else has witnessed this, but I have cheap quads (~US$35) both smaller and larger than the CF2, which behave much better, not altering their pitch at all in heavy wind. I also have a few CF2.0s, and they all behave the same.
The cheap quads just 'drift' instead of thrashing.

Can I configure this form improvement, or is this in the firmware?
staniles
Beginner
Posts: 3
Joined: Mon Jan 26, 2015 9:57 am

Re: CF2.0 Stabilization Response

Post by staniles »

Hi nimble,

To make your crazyflie react faster, you can at first change its PID settings.
Try to increase a bit the "P" and "I" terms (for attitude control, both for pitch and roll) so that it reacts faster. Be aware that a large increase will destabilize the quad, so be careful.
The "P" value aims at rejecting some external perturbations faster, while the "I" value aims at canceling the static error (in case the wind doesn't stop blowing for instance). But at a certain stage it can also involve some oscillations. You have on the Internet some ways of experimentally tuning the PID controller (without any mathematical model) so that it is quite reactive. I also think that someone proposed some values in this forum (but it slightly depends on your configuration, how your battery is fixed etc).
I never experimented the CF with some wind, I'm pretty happy with the initial values, even if I increased them a bit so that it is more reactive. It is something I definitely have to try, flying the CF outside :-) (I'm just waiting it's a bit warmer). For now I'm just trying to obtain a mathematical model of it so that I can experiment some other control laws.

Good luck, and keep us posted!

Cheers

stan
ricardo.halfeld
Beginner
Posts: 24
Joined: Tue May 22, 2018 1:40 pm

Re: CF2.0 Stabilization Response

Post by ricardo.halfeld »

I'm just going to leave a little food for thought here, even though it's a bit of an old thread, hoping it will help others.

PID is a controller meant for regulation, not tracking (these are the names of specific control problems and are worth a little research). In other words, PID has all the cool properties a controller can brag about if, and only if, you want to take an output from one value to another and leave it there. Sending variable setpoints does not qualify as such.

The reason is that a PID is a strictly feedback controller. In order to make a plant track a trajectory, one must implement both feedback and feedforward controllers. The feedforward makes your system responsive and your feedback handles the divergences between model and reality, such as simplifications and disturbances.

If you've never seen a controller perform trajectory tracking. It's awesome. It changes how you see these things.

A mistake I'm also guilty of is trying to force a strictly feedback controller to do a FF/FB controller's job. In doing so, you are pushing the system into the intermittent failure zone. Everything looks fine, you fly for a while then suddenly your quad starts wobbling and down it goes.

I'm not saying you shouldn't try to find a better setting for your PID, but bear in mind that a stable system without a FF part is likely to feel a little unresponsive. Perhaps your time is better spent in search of that FF/FB. On the other hands, these little guys withstand quite a beating. One way or another, be sure to let everyone know how it went! :)
Post Reply