[SOLVED]Zero of gyros

Post here to get support
Post Reply
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

[SOLVED]Zero of gyros

Post by Mitteau »

Hi!
I investigate the behaviour of the gyros of my copter. Without any motion, the result is:
P_20171212_153709_r.jpg
I can see that:
1 the noise is rather important,
2 the mean over time is not null:.1 for gyro.x, .2 to .3 for gyro.y and .5 for gyro.z.
These values differ after a power up and down of the cf2. I also get values around 1.
Does these values show a damaged sensor ?
Last edited by Mitteau on Sat Dec 30, 2017 9:22 am, edited 2 times in total.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Zero of gyros

Post by arnaud »

Hi,
1. The noise looks similar to a good working Crazyflie I have on my desk
2. From time to time I also get drift in the gyro. The gyros 0 are measured at startup but they will eventually drift, that is what MEMS gyro do.

Anyway, since the gyro drifts, the sensor fusion algorithm will take care and correct for it (for roll and pitch). Do you have problem with the attitude estimation, ie. with the roll, pitch, yaw measurements?
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Re: Zero of gyros

Post by Mitteau »

Hi,
Thank you very much. I asked the question because sometimes brutal instabilities appear like in an old post of mine dated 2016/01/29. If it is not the sensors, could it be a lost packet in internal firmware?
With flowcontrol deck, it happens sometimes an oscillatory mode, sometimes damped, sometimes driving to a crash... Perhaps my modifs?
Regards
Jean-Claude
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Zero of gyros

Post by tobias »

After one of these instabilities have you checked the console output in the cfclient. If there is an I2C problem I think it will show up there.
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Re: Zero of gyros

Post by Mitteau »

I will look at but I feel there is no such information, I would have seen it. I see only a long oscillatory behaviour of stabilizer. The modification I introduced to firmware are rather limited but perhaps are responsible for this.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Zero of gyros

Post by arnaud »

Oscillation with the flow deck could also come from bad tracking yielding bad data entering the kalman filter. Have seen a correlation between the oscillation and the type of floor or lightning bellow the Crazyflie?

One other possibility is that the code you added takes a lot of CPU time, this would affect the rate at which the control loop are running. Though if you have done only minimal change I guess this is unlikely.
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Re: Zero of gyros

Post by Mitteau »

I agree with your opinions. The floor is not a good reference because it is rather dark wood and there is not much light. This can explain one of the instabilities, for instance when cf starts go rapidly forward.
But another is the light RP oscillations slowly diverging, 2 or 3 Hz, sometimes ending with a crash, sometimes vanishing. Perhaps I have to lower a little bit the gain of the attitude PID.
My opinion is that the PID coefficients can depend somehow of the inertial parameters of the plane. Do you think it can be the case?
Jean-Claude
Post Reply