Sunday 31 March 2013

First flight with new PID parameters

Hovering the Quad' was OK, but it still seemed to be unstable if a gust hit it or too much control was put in. This suggested the P term in the PID tuning was too large, causing oscillations if the difference between the commanded stick input and the measured attitude of the 'copter was too large. So I used the quadcopter on strings method to tune out P and I for pitch and roll (and had a stab at the yaw values). The results seemed good, so I found a nice large field in Devon, grabbed three battery packs and went flying...

PID values used were (low pass filter on the MPU-6050 set to 42Hz):

Roll and pitch: P=1.2 I=0.008 D=3
Yaw: P=2.5 I=0.016 D=0

Next step is to calibrate the auto-level!

Oh, and the crash at the end resulted in a snapped prop, and an excuse to buy lurid green and orange props :)

Wednesday 20 March 2013

Quadcopter PID tuning and in-flight footage

Now that my quadcopter has its low-pass filter set on the accelerometer, I can fly again! This time I've put on a wee video camera from Veho to capture the quads-eye-view of the flight.

Still need to do some PID tuning as the quad reacts a bit too much to large disturbances, but its now controllable in a hover :)


Monday 18 March 2013

MultiWii quadcopter - re-flashing the board with new code

So its March and in the UK this means we get glorious sunny skies and 20 degrees C temperatures... oh, wait... that was March 2012. This year we've mostly had snow, wind, fog and rain. All of which are counter-productive to quadcopter testing and flying.

This would be frustrating enough if I hadn't tried to re-flash the flight control board with new MultiWii software that then made the 'copter as unstable as an elephant riding a unicycle on a bouncy castle in an earthquake...

After lots of staring at code and running tests on my ECU, transmitter and motors, I noted that the accelerometer data lines on the multiwii config software were dancing all over the place. Remembering the bit of code in config.h:



      /* MPU6050 Low pass filter setting. In case you cannot eliminate all vibrations to the Gyro, you can try
         to decrease the LPF frequency, only one step per try. As soon as twitching gone, stick with that setting.
         It will not help on feedback wobbles, so change only when copter is randomly twiching and all dampening and
         balancing options ran out. Uncomment only one option!
         IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.*/
      //#define MPU6050_LPF_256HZ     // This is the default setting, no need to uncomment, just for reference
      //#define MPU6050_LPF_188HZ
      //#define MPU6050_LPF_98HZ
      //#define MPU6050_LPF_42HZ
      //#define MPU6050_LPF_20HZ
      //#define MPU6050_LPF_10HZ
      //#define MPU6050_LPF_5HZ       // Use this only in extreme cases, rather change motors and/or props

 
I tried going through the low-pass filters until the wobbles seemed to be manageable using the 98Hz filter. I also balanced the motors, as these seemed to be creating much noise and vibration. I also added another layer of rubber grommets onto the flight controls mounting board. The results can be seen below on a kitchen table tethered flight:

Roll on Spring! Next step is to get outside and do some hardcore PID tuning :)