Further setup and tuning for a high-speed drone
Configuration:
- The minimal configuration is to use only a gyro and accelerometer sensor.
- Considering the electromagnetic interference, disable the magnetometer.
- Make sure to balance the propellers. [2]
- Make sure that the center of gravity is as close as possible to the center of thrust.
- Choose Generic 250 Racer airframe in QGC.
- Switch the estimator to local_position_estimator if no external position available. (ex: GPS, camera, etc.)
- Make sure to calibrate the ESCs.
Control latency:
- Enable SYS_FMU_TASK to reduce latency.
- Disable SYS_USE_IO and attach the motors to the AUX pins instead.
- Enable One-Shot PWM output signal to reduce latency (PWM_RATE=0)
Filter tuning:
- Tune the low-pass filter on the gyro sensor data: IMU_GYRO_CUTOFF.
- 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.
Following two figures show my filter tuning result.
Before 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'
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'
留言
張貼留言