IMU stuff

Post Reply
User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

IMU stuff

Post by Plüschi »

brm wrote:i would replace all low pass filters by a pt1 elements


I cant understand your preference for pt1.
https://de.wikipedia.org/wiki/PT1-Glied

brm wrote:will be interesting to do some testing with such a setup.


I have a version with no filtering / averaging except the internal 6050 lpf set to 42hz. Flies on a brushed /geared mini quad. No problem at all, the whole double-reads / averaging / acc smoothing / G-limiting of gyro-acc fusion is not necessary with a 6050 sensor. I use the full rotation code and so can run this at 20ms looptime with finely tuned PID's.

Yes, 20ms, its no typo. :)

btw if you got a 328 with a 6050 ( $5 hardware )
http://www.banggood.com/5Pcs-Arduino-5V ... 51795.html
http://www.banggood.com/5Pcs-6DOF-MPU-6 ... 59259.html
I can send you the sketch to test YAW gyro drift. Its impressive what a $2.50 sensor can do.

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: IMU stuff

Post by brm »

https://groups.google.com/forum/#!topic/drones-discuss/VfjH0HIF50k

one of the reasons is not allowing higher frequencies to pass.
i also had succesfull testing with filtering the pwm output this in case the imu calculates 'crazy' outputvalues.

in the mean time i prefer a pt1 element on the pwm output.
the pt1 element is stable when looking at the math and it does not disturb the input signal.
which is not the case with higher order filters (pt2 element like a butterworth filter).
also when cascading multiple higher order filters you can run into a problem as the
internal delay elements start to oscilate.

i have vibrations as i can count my crashes ...
and also these min quads with thin arms cause high frequency virbrations.
and all these small problems do sum up...

i have a spare imu from whitespy using an mpu-6050.
so, yes - i can test your view on the sw.

thanks

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: IMU stuff

Post by Plüschi »

File is attached. Be aware this is for brushed quad and has looptime set to 20ms for testing (adjustable in config.h). I think the gyro drift on yaw is quite good. Full rotation works good. The absence of any filters (except the gyro-acc fusion filter) works too. Running original code at 20ms doesent work :)

PID will have to be very good for 20ms since its near to the quads "eigenresonanz" of around 8hz. I also had to lower the D-term averaging to 2 samples since 3 samples would fall right into the quads 8hz resonance. (20ms * 3 = 60ms, since its half.wave * 2 = 120ms = 8hz. Quad would shake like crazy with d-pid > 0).
Attachments
simple_mwii_based_22.zip
(41.13 KiB) Downloaded 229 times

Post Reply