Further setup and tuning for a high-speed drone

Configuration: 

  1. The minimal configuration is to use only a gyro and accelerometer sensor.
  2. Considering the electromagnetic interference, disable the magnetometer.
  3. Make sure to balance the propellers. [2]
  4. Make sure that the center of gravity is as close as possible to the center of thrust.
  5. Choose Generic 250 Racer airframe in QGC.
  6. Switch the estimator to local_position_estimator if no external position available. (ex: GPS, camera, etc.)
  7. Make sure to calibrate the ESCs.

Control latency:

  1. Enable SYS_FMU_TASK to reduce latency.
  2. Disable SYS_USE_IO and attach the motors to the AUX pins instead.
  3. Enable One-Shot PWM output signal to reduce latency (PWM_RATE=0)

Filter tuning:

  1. Tune the low-pass filter on the gyro sensor data: IMU_GYRO_CUTOFF.
  2. Tune the low-pass filter on the D-term: MC_DTERM_CUTOFF.
Step1: Active high-rate logging profile (SDLOG_PROFILE parameter)

Step2: Tune the gyro filter IMU_GYRO_CUTOFF by increasing it in steps of 10 Hz while using a low D-term filter value (MC_DTERM_CUTOFF = 30).

Step3: Upload the logs to https://logs.px4.io and compare the Actuator Controls FFT plot. Set the cutoff frequency to a value before the noise starts to increase noticeably (for frequencies around and above 60 Hz). Then tune the D-term filter (MC_DTERM_CUTOFF) in the same way.

Following two figures show my filter tuning result.
Before filter tuning

After filter tuning

Step4: Tune PID parameters and thrust curve again.

*** To reduce the control latency, we want to increase the cutoff frequency for the low-pass filters. However this is a trade-off as it will also increase the noise of the signal, which is fed to the motors. Noise on the motors has the following consequences:

  • Motors and ESCs can get hot, to the point where they get damaged.
  • Reduced flight time because the motors continuously change their speed.
  • Visible random small twitches.

**************************************************************************************
In my case, firstly I tuned PID parameters of attitude controller, secondly enabled SYS_FMU_TASK to reduce control latency, thirdly tuned filter with IMU_GYRO_CUTOFF and MC_DTERM_CUTOFF, finally tuned PID parameters of attitude controller again (Optional: tune position controller). By following above steps, you can also realize the basic position control (hovering) as shown in my video.
**************************************************************************************





Reference:
[1] https://docs.px4.io/en/config_mc/racer_setup.html
[2] How to balance a prop for FPV to help remove video 'wobbles'

留言

這個網誌中的熱門文章

Tuing PID parameters in QGroundcontrol (2)

Useful PX4 Parameters

Burn linux image to eMMC storage on Banana Pi M3