mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:38:52 +08:00
Move PX4 Guide source into /docs (#24490)
* Add vitepress tree * Update existing workflows so they dont trigger on changes in the docs path * Add nojekyll, package.json, LICENCE etc * Add crowdin docs upload/download scripts * Add docs flaw checker workflows * Used docs prefix for docs workflows * Crowdin obvious fixes * ci: docs move to self hosted runner runs on a beefy server for faster builds Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: don't run build action for docs or ci changes Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: update runners Signed-off-by: Ramon Roche <mrpollo@gmail.com> * Add docs/en * Add docs assets and scripts * Fix up editlinks to point to PX4 sources * Download just the translations that are supported * Add translation sources for zh, uk, ko * Update latest tranlsation and uorb graphs * update vitepress to latest --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com> Co-authored-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
co-authored by
Ramon Roche
parent
8e6d2ebe4a
commit
88d623bedb
@@ -0,0 +1,176 @@
|
||||
# MC Filter Tuning & Control Latency
|
||||
|
||||
Filters can be used to trade off [control latency](#control-latency), which affects flight performance, and noise filtering, which impacts both flight performance and motor health.
|
||||
|
||||
This topic provides an overview of control latency and PX4 filter tuning.
|
||||
|
||||
:::info
|
||||
Before filter tuning you should do a first pass at [Basic MC PID tuning](../config_mc/pid_tuning_guide_multicopter_basic.md).
|
||||
The vehicle needs to be undertuned (the **P** and **D** gains should be set too low), such that there are no oscillations from the controller that could be interpreted as noise (the default gains might be good enough).
|
||||
:::
|
||||
|
||||
## Control Latency
|
||||
|
||||
The _control latency_ is the delay from a physical disturbance of the vehicle until the motors react to the change.
|
||||
|
||||
:::tip
|
||||
Lowering latency allows you to increase the rate **P** gains, which results in better flight performance.
|
||||
Even one millisecond difference in the latency can have a significant impact.
|
||||
:::
|
||||
|
||||
The following factors affect control latency:
|
||||
|
||||
- A soft airframe or soft vibration mounting increases latency (they act as a filter).
|
||||
- Low-pass filters in software and on the sensor chip trade off increased latency for improved noise filtering.
|
||||
- PX4 software internals: the sensor signals need to be read in the driver and then pass through the controller to the output driver.
|
||||
- The maximum gyro publication rate (configured with [IMU_GYRO_RATEMAX](../advanced_config/parameter_reference.md#IMU_GYRO_RATEMAX)).
|
||||
A higher rate reduces latency but is computationally intensive/can starve other processes.
|
||||
4 kHz or higher is only recommended for controllers with STM32H7 processor or newer (2 kHz value is near the limit for less capable processors).
|
||||
- The IO chip (MAIN pins) adds about 5.4 ms latency compared to using the AUX pins (this does not apply to a _Pixracer_ or _Omnibus F4_, but does apply to a Pixhawk).
|
||||
To avoid the IO delay attach the motors to the AUX pins instead.
|
||||
- PWM output signal: enable [Dshot](../peripherals/dshot.md) by preference to reduce latency (or One-Shot if DShot is not supported).
|
||||
The protocol is selected for a group of outputs during [Actuator Configuration](../config/actuators.md).
|
||||
|
||||
Below we look at the impact of the low pass filters.
|
||||
|
||||
## Filters
|
||||
|
||||
The filtering pipeline for the controllers in PX4 is described below.
|
||||
|
||||
:::info
|
||||
Sampling and filtering is always performed at the full raw sensor rate (commonly 8kHz, depending on the IMU).
|
||||
:::
|
||||
|
||||
### On-chip DLPF for the Gyro Sensor
|
||||
|
||||
This is disabled on all chips where it can be disabled (if not, cutoff frequency is set to the highest level of the chip).
|
||||
|
||||
### Notch Filters
|
||||
|
||||
Setups that have a significant lower-frequency noise spike (e.g. due to harmonics at the rotor blade pass frequency) can benefit from using the notch filter to clean the signal before it is passed to the low pass filter (these harmonics have a similar detrimental impact on motors as other sources of noise).
|
||||
|
||||
Without the notch filter you'd have to set the low pass filter cutoff much lower (increasing the phase lag) in order to avoid passing this noise to the motors.
|
||||
|
||||
#### Static Notch Filters
|
||||
|
||||
One or two static notch filters on the gyro sensor data that are used to filter out narrow band noise, for example a bending mode of the airframe.
|
||||
|
||||
The static notch filters can be configured using:
|
||||
|
||||
- First notch filter: [IMU_GYRO_NF0_BW](../advanced_config/parameter_reference.md#IMU_GYRO_NF0_BW) and [IMU_GYRO_NF0_FRQ](../advanced_config/parameter_reference.md#IMU_GYRO_NF0_FRQ).
|
||||
- Second notch filter: [IMU_GYRO_NF1_BW](../advanced_config/parameter_reference.md#IMU_GYRO_NF1_BW) and [IMU_GYRO_NF1_FRQ](../advanced_config/parameter_reference.md#IMU_GYRO_NF1_FRQ).
|
||||
|
||||
:::info
|
||||
Only two notch filters are provided.
|
||||
Airframes with more than two frequency noise spikes typically clean the first two spikes with the notch filters, and subsequent spikes using the low pass filter.
|
||||
:::
|
||||
|
||||
#### Dynamic Notch Filters
|
||||
|
||||
Dynamic notch filters use ESC RPM feedback and/or the onboard FFT analysis.
|
||||
The ESC RPM feedback is used to track the rotor blade pass frequency and its harmonics, while the FFT analysis can be used to track a frequency of another vibration source, such as a fuel engine.
|
||||
|
||||
ESC RPM feedback requires ESCs capable of providing RPM feedback such as [DShot](../peripherals/esc_motors.md#dshot) with telemetry connected, a bidirectional DShot set up ([work in progress](https://github.com/PX4/PX4-Autopilot/pull/23863)), or [UAVCAN/DroneCAN ESCs](../dronecan/escs.md).
|
||||
Before enabling, make sure that the ESC RPM is correct.
|
||||
You might have to adjust the [pole count of the motors](../advanced_config/parameter_reference.md#MOT_POLE_COUNT).
|
||||
|
||||
The following parameters should be set to enable and configure dynamic notch filters:
|
||||
|
||||
| 参数 | 描述 |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a href="IMU_GYRO_DNF_EN"></a>[IMU_GYRO_DNF_EN](../advanced_config/parameter_reference.md#IMU_GYRO_DNF_EN) | Enable IMU gyro dynamic notch filtering. `0`: ESC RPM, `1`: Onboard FFT. |
|
||||
| <a href="IMU_GYRO_FFT_EN"></a>[IMU_GYRO_FFT_EN](../advanced_config/parameter_reference.md#IMU_GYRO_FFT_EN) | Enable onboard FFT (required if `IMU_GYRO_DNF_EN` is set to `1`). |
|
||||
| <a href="IMU_GYRO_DNF_MIN"></a>[IMU_GYRO_DNF_MIN](../advanced_config/parameter_reference.md#IMU_GYRO_DNF_MIN) | Minimum dynamic notch frequency in Hz. |
|
||||
| <a href="IMU_GYRO_DNF_BW"></a>[IMU_GYRO_DNF_BW](../advanced_config/parameter_reference.md#IMU_GYRO_DNF_BW) | Bandwidth for each notch filter in Hz. |
|
||||
| <a href="IMU_GYRO_DNF_HMC"></a>[IMU_GYRO_DNF_HMC](../advanced_config/parameter_reference.md#IMU_GYRO_NF0_BW) | Number of harmonics to filter. |
|
||||
|
||||
### Low-pass Filter
|
||||
|
||||
A low pass filter on the gyro data can be configured with the [IMU_GYRO_CUTOFF](../advanced_config/parameter_reference.md#IMU_GYRO_CUTOFF) parameter.
|
||||
|
||||
To reduce the control latency, we want to increase the cutoff frequency for the low-pass filters.
|
||||
The effect on latency of increasing `IMU_GYRO_CUTOFF` is approximated below.
|
||||
|
||||
| Cutoff (Hz) | Delay approx. (ms) |
|
||||
| ------------------------------ | ----------------------------------------------------- |
|
||||
| 30 | 8 |
|
||||
| 60 | 3.8 |
|
||||
| 120 | 1.9 |
|
||||
|
||||
However this is a trade-off as increasing `IMU_GYRO_CUTOFF` will also increase the noise of the signal that 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.
|
||||
|
||||
### Low-pass Filter on D-term
|
||||
|
||||
The D-term is most susceptible to noise while slightly increased latency does not negatively affect performance.
|
||||
For this reason the D-term has a separately-configurable low-pass filter, [IMU_DGYRO_CUTOFF](../advanced_config/parameter_reference.md#IMU_DGYRO_CUTOFF).
|
||||
|
||||
### Slew-rate Filter on Motor Outputs
|
||||
|
||||
An optional slew-rate filter on the motor outputs.
|
||||
This rate may be configured as part of the [Multicopter Geometry](../config/actuators.md#motor-geometry-multicopter) when configuring actuators (which in turn modifies the [CA_Rn_SLEW](../advanced_config/parameter_reference.md#CA_R0_SLEW) parameters for each motor `n`).
|
||||
|
||||
## Filter Tuning
|
||||
|
||||
:::info
|
||||
The best filter settings depend on the vehicle.
|
||||
The defaults are set conservatively — such that they work on lower-quality setups as well.
|
||||
:::
|
||||
|
||||
First make sure to have the high-rate logging profile activated ([SDLOG_PROFILE](../advanced_config/parameter_reference.md#SDLOG_PROFILE) parameter).
|
||||
[Flight Review](../getting_started/flight_reporting.md) will then show an FFT plot for the roll, pitch and yaw controls.
|
||||
|
||||
:::warning
|
||||
|
||||
- Do not try to fix a vehicle that suffers from high vibrations with filter tuning!
|
||||
Instead fix the vehicle hardware setup.
|
||||
- Confirm that PID gains, in particular D, are not set too high as this can show up as vibrations.
|
||||
|
||||
:::
|
||||
|
||||
Filter tuning is best done by reviewing flight logs.
|
||||
You can do multiple flights right after each other with different parameters and then inspect all logs, but make sure to disarm in between so that separate log files are created.
|
||||
|
||||
The performed flight manoeuvre can simply be hovering in [Stabilized mode](../flight_modes_mc/manual_stabilized.md) with some rolling and pitching to all directions and some increased throttle periods.
|
||||
The total duration does not need to be more than 30 seconds.
|
||||
In order to better compare, the manoeuvre should be similar in all tests.
|
||||
|
||||
First tune the gyro filter [IMU_GYRO_CUTOFF](../advanced_config/parameter_reference.md#IMU_GYRO_CUTOFF) by increasing it in steps of 10 Hz while using a low D-term filter value ([IMU_DGYRO_CUTOFF](../advanced_config/parameter_reference.md#IMU_DGYRO_CUTOFF) = 30).
|
||||
Upload the logs to [Flight Review](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 (`IMU_DGYRO_CUTOFF`) in the same way.
|
||||
Note that there can be negative impacts on performance if `IMU_GYRO_CUTOFF` and `IMU_DGYRO_CUTOFF` are set too far apart (the differences have to be significant though - e.g. D=15, gyro=80).
|
||||
|
||||
Below is an example for three different `IMU_DGYRO_CUTOFF` filter values (40Hz, 70Hz, 90Hz).
|
||||
At 90 Hz the general noise level starts to increase (especially for roll), and thus a cutoff frequency of 70 Hz is a safe setting.
|
||||

|
||||

|
||||

|
||||
|
||||
:::info
|
||||
The plot cannot be compared between different vehicles, as the y axis scale can be different.
|
||||
On the same vehicle it is consistent and independent of the flight duration.
|
||||
:::
|
||||
|
||||
If the flight plots shows significant low frequency spikes, like the one shown in the diagram below, you can remove it using a notch filter.
|
||||
In this case you might use the settings: [IMU_GYRO_NF0_FRQ=32](../advanced_config/parameter_reference.md#IMU_GYRO_NF0_FRQ) and [IMU_GYRO_NF0_BW=5](../advanced_config/parameter_reference.md#IMU_GYRO_NF0_BW) (note, this spike is narrower than usual).
|
||||
The low pass filters and the notch filter can be tuned independently (i.e. you don't need to set the notch filter before collecting the data for tuning the low pass filter).
|
||||
|
||||

|
||||
|
||||
## Additional Tips
|
||||
|
||||
1. Acceptable latency depends on vehicle size and expectations.
|
||||
FPV racers typically tune for the absolute minimal latency (as a ballpark `IMU_GYRO_CUTOFF` around 120, `IMU_DGYRO_CUTOFF` of 50 to 80).
|
||||
For bigger vehicles latency is less critical and `IMU_GYRO_CUTOFF` of around 80 might be acceptable.
|
||||
|
||||
2. You can start tuning at higher `IMU_GYRO_CUTOFF` values (e.g. 100Hz), which might be desirable because the default tuning of `IMU_GYRO_CUTOFF` is set very low (30Hz).
|
||||
The only caveat is that you must be aware of the risks:
|
||||
- Don't fly for more than 20-30 seconds
|
||||
- Check that the motors are not getting to hot
|
||||
- Listen for odd sounds and symptoms of excessive noise, as discussed above.
|
||||
@@ -0,0 +1,173 @@
|
||||
# 多旋翼配置
|
||||
|
||||
多旋翼的配置和校准遵循与其他框架相同的高级步骤:选择固件,配置框架,包括执行器/电机几何和输出映射,传感器配置和校准,安全和其他功能的配置,最后进行调整。
|
||||
|
||||
This topic explains how to configure a multicopter using selected topics from [Standard Configuration](../config/index.md), [Advanced Configuration](../advanced_config/index.md), and [Flight Controller Peripherals](../peripherals/index.md), along with multicopter-specific tuning topics.
|
||||
|
||||
:::info
|
||||
This topic is the recommended entry point when performing first-time configuration and calibration of a new multicopter frame.
|
||||
:::
|
||||
|
||||
## 加载固件
|
||||
|
||||
The first step is to [load PX4 firmware](../config/firmware.md) onto your [flight controller](../flight_controller/index.md).
|
||||
这一步最容易通过使用 QGroundControl 完成,它会自动选择适合您特定控制器硬件的固件。
|
||||
默认情况下,QGC 会安装最新的稳定版本的 PX4,但如果需要,您可以选择测试版或自定义版本。
|
||||
|
||||
相关章节:
|
||||
|
||||
- [Loading Firmware](../config/firmware.md)
|
||||
|
||||
## 机架选择和配置
|
||||
|
||||
This section explains how to configure the vehicle type (multicopter), specific motor/flight control geometry, and motor outputs.
|
||||
|
||||
First [select a multicopter airframe](../config/airframe.md) (options are listed in [Airframe Reference > Copter](../airframes/airframe_reference.md#copter)).
|
||||
You should select the frame that matches your vehicle brand and model if one exists, and otherwise select the "Generic" frame type that most closely matches your geometry in terms of number of motors and their relative positions.
|
||||
For example, for a [Quadrotor X](../airframes/airframe_reference.md#quadrotor-x) frame you would look for the name of your frame in the list, and if it was not present select the [Generic Quadrotor X](../airframes/airframe_reference.md#copter_quadrotor_x_generic_quadcopter) frame.
|
||||
|
||||
:::info
|
||||
Any selected multicopter frame can be modified in the next step (actuator configuration) to add/remove motors and otherwise change the geometry, and to specify what flight controller outputs are connected to particular motors and the output properties.
|
||||
Selecting a frame that matches your vehicle reduces the configuration work required.
|
||||
|
||||
:::details
|
||||
How does this work (details)
|
||||
Selecting an airframe applies a [frame configuration file](../dev_airframes/adding_a_new_frame.md#adding-a-frame-configuration) that contains a predefined set of [parameters](../advanced_config/parameters.md), such as [CA_AIRFRAME=0](../advanced_config/parameter_reference.md#CA_AIRFRAME) for the vehicle type and [CA_ROTOR_COUNT](../advanced_config/parameter_reference.md#CA_ROTOR_COUNT) for the number of rotors.
|
||||
|
||||
A frame configuration can define everything about a vehicle, from it's geometry and output mappings, through to its tuning and calibration values.
|
||||
When you're bringing up a new vehicle though, the frame will usually contain a fairly minimal configuration:
|
||||
|
||||
- Frames named with "Generic" define the vehicle type, number of rotors, and "placeholder" rotor positions.
|
||||
After selecting the airframe you define the actual geometry and then configure outputs.
|
||||
- Frames named with model/brand will define the vehicle type, number of rotors, actual rotor positions, and motor directions.
|
||||
After selecting the airframe you usually still have to configure outputs.
|
||||
|
||||
:::
|
||||
|
||||
The next step is to define your vehicle [geometry](../config/actuators.md#motor-geometry-multicopter) (the number of motors and their relative positions) and [assign those motors](../config/actuators.md#actuator-outputs) to the physical outputs that they are wired to on your flight controller (both of these are covered in [Actuator Configuration and Testing](../config/actuators.md)).
|
||||
|
||||
If using PWM ESCs and OneShot ESCs (but not DShot and DroneCAN/Cyphal ESC) you should then perform [ESC Calibration](../advanced_config/esc_calibration.md) before proceeding to [Motor Configuration](../config/actuators.md#motor-configuration).
|
||||
This ensures that all ESC provide exactly the same output for a given input (ideally we'd calibrate ESCs first, but you can't calibrate your ESCs until outputs are mapped).
|
||||
|
||||
The final step is [Motor Configuration](../config/actuators.md#motor-configuration):
|
||||
|
||||
- [Reverse any motors](../config/actuators.md#reversing-motors) that don't match the spin direction configured in the Geometry.
|
||||
For DShot ESC you can do this through the Acuator Testing UI.
|
||||
- PWM, OneShot, and CAN ESC, set the motor input limits for disarmed, low and high speed (not needed for DShot ESC)
|
||||
|
||||
相关章节:
|
||||
|
||||
- [Vehicle (Frame) Selection](../config/airframe.md) — Select vehicle type to match your frame.
|
||||
- [Actuator Configuration and Testing](../config/actuators.md) — Vehicle geometry, output mapping, motor configuration, testing.
|
||||
- [ESC Calibration](../advanced_config/esc_calibration.md) — Do between output mapping and motor configuration (topic above) for PWM and OneShot ESC.
|
||||
|
||||
## 传感器设置和校准
|
||||
|
||||
PX4 most commonly relies on a magnetometer (compass) for direction information, a barometer for altitude, a gyroscope for body rates, an accelerometer for attitude and a GPS/GNSS for global position.
|
||||
Pixhawk flight controllers (and many others) have inbuilt magnetometer, accelerometer, gyroscope, and barometer.
|
||||
The inbuilt compass usually isn't particularly reliable, and it is common to also add an external compass (usually combined with a GNSS receiver in the same device).
|
||||
|
||||
We first need to set the [Sensor Orientation](../config/flight_controller_orientation.md), informing PX4 how the autopilot (and its inbuilt sensors) and external compasses are oriented relative to the vehicle.
|
||||
Generally you'll orient towards the front of the vehicle and not have to set anything.
|
||||
Once that is done we need to calibrate the compass(es), gyroscope, and accelerometer.
|
||||
|
||||
The core sensor setup is covered in these topics:
|
||||
|
||||
- [Sensor Orientation](../config/flight_controller_orientation.md)
|
||||
- [Compass](../config/compass.md)
|
||||
- [Gyroscope](../config/gyroscope.md)
|
||||
- [Accelerometer](../config/accelerometer.md)
|
||||
|
||||
PX4 can use other peripherals, such as distance sensors, optical flow sensors, traffic avoidance alarms, cameras, and so on:
|
||||
|
||||
- [飞控外设](../peripherals/index.md) - 设置特定传感器、可选传感器、执行器等。
|
||||
|
||||
:::info
|
||||
Sensors that you don't need to calibrate/configure include:
|
||||
|
||||
- [Level Horizon](../config/level_horizon_calibration.md) calibration isn't usually needed if you have mounted the flight controller level.
|
||||
- Sensors that are not present, or that are not used by PX4 multicopter for flight control, such as [Airspeed sensors](../config/airspeed.md).
|
||||
- Sensors that don't need calibration, including: Barometers and GNSS.
|
||||
|
||||
:::
|
||||
|
||||
## 手动控制设置
|
||||
|
||||
Pilots can control a vehicle manually using either a Radio Control (RC) System or a Joystick/Gamepad controller connected via QGroundControl.
|
||||
|
||||
:::info
|
||||
A manual control is essential in order to bring up a new vehicle safely!
|
||||
:::
|
||||
|
||||
Radio Control:
|
||||
|
||||
- [Radio Controller (RC) Setup](../config/radio.md)
|
||||
- [Flight Mode Configuration](../config/flight_mode.md)
|
||||
|
||||
Joystick/GamePad:
|
||||
|
||||
- [Joystick Setup](../config/joystick.md) (includes button/flight mode mapping)
|
||||
|
||||
## 安全配置
|
||||
|
||||
PX4 can be configured to automatically handle conditions such as low battery, losing radio or data links, flying too far from the home location, and so on:
|
||||
|
||||
- [Battery Estimation Tuning](../config/battery.md) — estimate remaining power (needed for low power failsafe).
|
||||
- [Safety Configuration (Failsafes)](../config/safety.md)
|
||||
|
||||
## 调试
|
||||
|
||||
Tuning is the final step, carried out only after most other setup and configuration is complete.
|
||||
|
||||
- Rate and attitude controllers:
|
||||
|
||||
- [Autotune](../config/autotune_mc.md) — Automates tuning PX4 rate and attitude controllers (recommended).
|
||||
|
||||
::: info
|
||||
Automatic tuning works on frames that have reasonable authority and dynamics around all the body axes.
|
||||
It has primarily been tested on racing quads and X500, and is expected to be less effective on tricopters with a tiltable rotor.
|
||||
|
||||
Manual tuning using these guides are only needed if there is a problem with autotune:
|
||||
|
||||
- [MC PID Tuning (Manual/Basic)](../config_mc/pid_tuning_guide_multicopter_basic.md) — Manual tuning basic how to.
|
||||
- [MC PID Tuning Guide (Manual/Detailed)](../config_mc/pid_tuning_guide_multicopter.md) — Manual tuning with detailed explanation.
|
||||
|
||||
|
||||
:::
|
||||
|
||||
- [MC Filter/Control Latency Tuning](../config_mc/filter_tuning.md) — Trade off control latency and noise filtering.
|
||||
|
||||
- [MC Setpoint Tuning (Trajectory Generator)](../config_mc/mc_trajectory_tuning.md)
|
||||
- [MC Jerk-limited Type Trajectory](../config_mc/mc_jerk_limited_type_trajectory.md)
|
||||
|
||||
- [Multicopter Racer Setup](../config_mc/racer_setup.md)
|
||||
|
||||
<!--
|
||||
- Explain what you have to tune on PX4, what you can tune, and what each topic covers
|
||||
- I expect we should start with an exhaustive list of the tuning you could want to do - such as position tuning, etc. Do we have one?
|
||||
-->
|
||||
|
||||
<!-- TBD this is just text for me to mine
|
||||
|
||||
AFAIK autotune was tested on various not so custom platforms e.g. X500, racer quad, Loong standard VTOL. I honestly used it only once on a tricopter and it worked for roll and pitch but the resulting yaw tuning was not stable. Since then it was improved but that's not merged yet :eyes: https://github.com/PX4/PX4-Autopilot/pull/21857
|
||||
Autotune was never tested on a Helicopter.
|
||||
can you in theory autotune frame with any number of motors?
|
||||
In theory yes but it needs to be able to have reasonable authority around all axes so I'd expect autotune to not work well for a monocopter without swashplate and so on. Probably also the controllers wouldn't work out of the box. I saw issues before with designs that tilt the rotor e.g. tricopter, bicopter, ... again
|
||||
|
||||
|
||||
will PX4 still understand how to autotune?
|
||||
Autotune should work for any vehicle that has reasonable authority and dynamics around all the body axes. A tiltable motor e.g. tricopter has at the least dynamics which are less tested with autotune.
|
||||
My assumption is that the mixing system can cope with whatever geometry you throw at it.
|
||||
Yes but it must be physically feasible. E.g. if you make a quadrotor where all motors turn the same way it will "deal" with it but that cannot work without very specific controllers. Same for a monocopter or a tricopter without swiveling one motor.
|
||||
-->
|
||||
|
||||
## See Also
|
||||
|
||||
- [QGroundControl > Setup](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/setup_view.html)
|
||||
- [飞控外设](../peripherals/index.md) - 设置特定传感器、可选传感器、执行器等。
|
||||
- [Advanced Configuration](../advanced_config/index.md) - Factory/OEM calibration, configuring advanced features, less-common configuration.
|
||||
- Vehicle-Centric Config/Tuning:
|
||||
- **Multicopter Config/Tuning**
|
||||
- [直升机配置/调参](../config_heli/index.md)
|
||||
- [Fixed Wing Config/Tuning](../config_fw/index.md)
|
||||
- [VTOL 配置/调参](../config_vtol/index.md)
|
||||
@@ -0,0 +1,78 @@
|
||||
# 多旋翼的加加速度限制型轨迹
|
||||
|
||||
加加速度有限的轨迹类型能响应用户摇杆输入或任务的变化(例如:航拍,测绘,货运)并为机体提供平滑的运动。
|
||||
它能产生对称的平滑 S-曲线使加加速度和加速度的极限始终得到保证。
|
||||
|
||||
This trajectory type is always enabled in [Mission mode](../flight_modes_mc/mission.md).
|
||||
To enable it in [Position mode](../flight_modes_mc/position.md) set the parameter [MPC_POS_MODE](../advanced_config/parameter_reference.md#MPC_POS_MODE) to `Smoothed velocity`.
|
||||
|
||||
:::info
|
||||
The jerk-limited type is not used _by default_ in position mode.
|
||||
但它可能不适合于那些需要较快响应的机体/使用案例——例如穿越机。
|
||||
:::
|
||||
|
||||
## 轨迹生成器
|
||||
|
||||
下图显示了具有如下约束的典型加加速度限制剖面:
|
||||
|
||||
- `jMax`: maximum jerk
|
||||
- `a0`: initial acceleration
|
||||
- `aMax`: maximum acceleration
|
||||
- `a3`: final acceleration (always 0)
|
||||
- `v0`: initial velocity
|
||||
- `vRef`: desired velocity
|
||||
|
||||
The constraints `jMax`, `aMax` are configurable by the user via parameters and can be different in manual position control and auto mode.
|
||||
|
||||
所得的速度剖面通常称为“S-曲线”。
|
||||
|
||||

|
||||
|
||||
## 手动模式
|
||||
|
||||
In manual position mode, the sticks are mapped to velocity where a full XY-stick deflection corresponds to [MPC_VEL_MANUAL](../advanced_config/parameter_reference.md#MPC_VEL_MANUAL) and a full Z-stick deflection corresponds to [MPC_Z_VEL_MAX_UP](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_UP) (upward motion) or [MPC_Z_VEL_MAX_DN](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_DN) (downward motion).
|
||||
|
||||
### 约束
|
||||
|
||||
XY平面:
|
||||
|
||||
- `jMax`: [MPC_JERK_MAX](../advanced_config/parameter_reference.md#MPC_JERK_MAX)
|
||||
- `aMax`: [MPC_ACC_HOR_MAX](../advanced_config/parameter_reference.md#MPC_ACC_HOR_MAX)
|
||||
|
||||
Z轴:
|
||||
|
||||
- `jMax`: [MPC_JERK_MAX](../advanced_config/parameter_reference.md#MPC_JERK_MAX)
|
||||
- `aMax` (upward motion): [MPC_ACC_UP_MAX](../advanced_config/parameter_reference.md#MPC_ACC_UP_MAX)
|
||||
- `aMax` (downward motion): [MPC_ACC_DOWN_MAX](../advanced_config/parameter_reference.md#MPC_ACC_DOWN_MAX)
|
||||
|
||||
## 自动模式
|
||||
|
||||
In auto mode, the desired velocity is [MPC_XY_CRUISE](../advanced_config/parameter_reference.md#MPC_XY_CRUISE) but this value is automatically adjusted depending on the distance to the next waypoint, the maximum possible velocity in the waypoint and the maximum desired acceleration and jerk.
|
||||
The vertical speed is defined by [MPC_Z_V_AUTO_UP](../advanced_config/parameter_reference.md#MPC_Z_V_AUTO_UP) (upward motion) and [MPC_Z_V_AUTO_DN](../advanced_config/parameter_reference.md#MPC_Z_V_AUTO_DN) (downward motion).
|
||||
|
||||
### 约束
|
||||
|
||||
XY平面:
|
||||
|
||||
- `jMax`: [MPC_JERK_AUTO](../advanced_config/parameter_reference.md#MPC_JERK_AUTO)
|
||||
- `aMax`: [MPC_ACC_HOR](../advanced_config/parameter_reference.md#MPC_ACC_HOR)
|
||||
|
||||
Z轴:
|
||||
|
||||
- `jMax`: [MPC_JERK_AUTO](../advanced_config/parameter_reference.md#MPC_JERK_AUTO)
|
||||
- `aMax` (upward motion): [MPC_ACC_UP_MAX](../advanced_config/parameter_reference.md#MPC_ACC_UP_MAX)
|
||||
- `aMax` (downward motion): [MPC_ACC_DOWN_MAX](../advanced_config/parameter_reference.md#MPC_ACC_DOWN_MAX)
|
||||
|
||||
渐进某个航点时的距离-速度增益:
|
||||
|
||||
- [MPC_XY_TRAJ_P](../advanced_config/parameter_reference.md#MPC_XY_TRAJ_P)
|
||||
|
||||
### 相关参数
|
||||
|
||||
- [MPC_XY_VEL_MAX](../advanced_config/parameter_reference.md#MPC_XY_VEL_MAX)
|
||||
- [MPC_Z_VEL_MAX_UP](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_UP)
|
||||
- [MPC_Z_VEL_MAX_DN](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_DN)
|
||||
- [MPC_TKO_SPEED](../advanced_config/parameter_reference.md#MPC_TKO_SPEED)
|
||||
- [MPC_LAND_SPEED](../advanced_config/parameter_reference.md#MPC_LAND_SPEED)
|
||||
- [MPC_LAND_ALT1](../advanced_config/parameter_reference.md#MPC_LAND_ALT1)
|
||||
- [MPC_LAND_ALT2](../advanced_config/parameter_reference.md#MPC_LAND_ALT2)
|
||||
@@ -0,0 +1,76 @@
|
||||
# 多旋翼设定值调整(轨迹生成器)
|
||||
|
||||
This document provides an overview of the multicopter tuning parameters that change the _user experience_: how fast the vehicle reacts to stick movements or direction changes in missions, the maximum allowed velocity, etc.
|
||||
|
||||
In other words, this topic explains how to tune the parameters that affect the value of a _desired setpoint_ rather than those that affect how well the vehicle _tracks_ the setpoint).
|
||||
|
||||
生成这些设定点的算法称为“轨迹生成器”。
|
||||
|
||||
:::warning
|
||||
This guide is for advanced users/experts.
|
||||
:::
|
||||
|
||||
:::tip
|
||||
Follow the instructions in the [Multicopter PID Tuning Guide](../config_mc/pid_tuning_guide_multicopter.md) _before_ doing any of the tuning described here.
|
||||
请不要试图通过调整这些参数来修复错误的轨迹或抖动。
|
||||
:::
|
||||
|
||||
## 综述
|
||||
|
||||
The input to the P/PID controller is a _desired setpoint_ that the vehicle should attempt to track.
|
||||
[PID Tuning](../config_mc/pid_tuning_guide_multicopter.md) ("Lower level tuning") aims to reduce the error between the desired setpoint and the estimate of the vehicle state.
|
||||
|
||||
The _desired setpoint_ passed to the P/PID controller is itself calculated from a _demanded setpoint_ based on a stick position (in RC modes) or from a mission command.
|
||||
要求设定值可能会改变得很快(例如,如果用户“一下子”将摇杆从零移动到最大值)。
|
||||
如果缓慢调整相应的目标设定值, 飞行器的特性就会更好。
|
||||
|
||||
_Setpoint value tuning_ ("higher level tuning") is used to specify the mapping between the _demanded_ and the _desired_ setpoints - i.e. defining the "ramp" at which the desired setpoint follows the demanded setpoint.
|
||||
|
||||
:::tip
|
||||
Poorly tuned [P/PID Gains](../config_mc/pid_tuning_guide_multicopter.md) can lead to instability.
|
||||
Poorly tuned _setpoint values_ cannot result in instability, but may result in either very jerky or very unresponsive reactions to setpoint changes.
|
||||
:::
|
||||
|
||||
<a id="modes"></a>
|
||||
|
||||
## 飞行模式轨迹支持
|
||||
|
||||
[Mission mode](../flight_modes_mc/mission.md) used the [Jerk-limited](../config_mc/mc_jerk_limited_type_trajectory.md) trajectory all the time.
|
||||
|
||||
[Position mode](../flight_modes_mc/position.md) supports the [implementations](#position-mode-implementations) listed below.
|
||||
It uses the acceleration based mapping by default; other types can be set using [MPC_POS_MODE](../advanced_config/parameter_reference.md#MPC_POS_MODE).
|
||||
|
||||
[Altitude mode](../flight_modes_mc/altitude.md) similarly supports the [implementations](#altitude-mode-implementations) selected by [MPC_POS_MODE](../advanced_config/parameter_reference.md#MPC_POS_MODE), but _only_ for smoothing the vertical component (i.e. when controlling the altitude).
|
||||
|
||||
其他模式不支持轨迹调整。
|
||||
|
||||
## Position Mode Implementations
|
||||
|
||||
The following list provides an _overview_ of the different implementations of how the stick input is interpreted and turned into trajectory setpoints:
|
||||
|
||||
- Acceleration based (Default)
|
||||
- Horizontal stick input mapped to acceleration setpoints.
|
||||
- Intuitive stick feel because it's like pushing the vehicle around.
|
||||
- No unexpected tilt changes upon reaching travel speed velocity.
|
||||
- Vertical stick input mapped with jerk-limited trajectory.
|
||||
- Set in position mode using `MPC_POS_MODE=Acceleration based`.
|
||||
- [Jerk-limited](../config_mc/mc_jerk_limited_type_trajectory.md)
|
||||
- Used when smooth motion is required (e.g.: filming, mapping, cargo).
|
||||
- Generates symmetric smooth S-curves where the jerk and acceleration limits are always guaranteed.
|
||||
- May not be suitable for vehicles/use-cases that require a faster response - e.g. race quads.
|
||||
- Set in position mode using `MPC_POS_MODE=Smoothed velocity`.
|
||||
- **Simple position control**
|
||||
- Sticks map directly to velocity setpoints without smoothing.
|
||||
- Useful for velocity control tuning.
|
||||
- Set in position mode using `MPC_POS_MODE=Direct velocity`.
|
||||
|
||||
## Altitude Mode Implementations
|
||||
|
||||
Analogously to [position mode implementations](#position-mode-implementations) these are the implementations for interpreting vertical stick input:
|
||||
|
||||
- [Jerk-limited](../config_mc/mc_jerk_limited_type_trajectory.md)
|
||||
- Smoothed vertical input.
|
||||
- Set in altitude mode with `MPC_POS_MODE` Smoothed velocity or Acceleration based.
|
||||
- **Simple altitude control**
|
||||
- Unsmoothed vertical input.
|
||||
- Set in altitude mode only when using `MPC_POS_MODE=Direct velocity`.
|
||||
@@ -0,0 +1,294 @@
|
||||
# 多旋翼PID调参(手动/高级)
|
||||
|
||||
本主题提供有关 PX4 控制器以及如何调参的详细信息。
|
||||
|
||||
:::tip
|
||||
[Autotune](../config/autotune_mc.md) is recommended for tuning the vehicles _around the hover thrust point_, as the approach described is intuitive, easy, and fast.
|
||||
这就是许多机体所需要的全部。
|
||||
:::
|
||||
|
||||
当调整悬停推力点不足时使用自动调参(例如,在机体上,在更高推力时存在非线性和振荡)。
|
||||
It is also useful for a deeper understanding of how the basic tuning works, and to understand how to use the [airmode](#airmode-mixer-saturation) setting.
|
||||
|
||||
## 调参步骤
|
||||
|
||||
:::info
|
||||
For safety reasons, the default gains are set to low values.
|
||||
您必须增加增益才能得到良好的控制响应。
|
||||
:::
|
||||
|
||||
以下是做调参时要遵循的一些要点:
|
||||
|
||||
- 调整增益时,所有的增益值都应该慢慢增加, 因为增益过大可能会导致危险的振荡!
|
||||
一般情况下,每次增益值的调整幅度大约在20%到30%,获得最优增益值后,基于最优值再下调5%到10%。
|
||||
- 在修改参数之前务必先着陆。
|
||||
慢慢增加油门,观察振荡的现象。
|
||||
- Tune the vehicle around the hovering thrust point, and use the [thrust curve parameter](#thrust-curve) to account for thrust non-linearities or high-thrust oscillations.
|
||||
- Optionally enable the high-rate logging profile with the [SDLOG_PROFILE](../advanced_config/parameter_reference.md#SDLOG_PROFILE) parameter so you can use the log to evaluate the rate and attitude tracking performance (the option can be disabled afterwards).
|
||||
|
||||
:::warning
|
||||
Always disable [MC_AIRMODE](../advanced_config/parameter_reference.md#MC_AIRMODE) when tuning a vehicle.
|
||||
:::
|
||||
|
||||
### 角速度控制器
|
||||
|
||||
The rate controller is the inner-most loop with three independent PID controllers to control the body rates (roll, pitch, yaw).
|
||||
|
||||
:::info
|
||||
A well-tuned rate controller is very important as it affects _all_ flight modes.
|
||||
A badly tuned rate controller will be visible in [Position mode](../flight_modes_mc/position.md), for example, as "twitches" or oscillations (the vehicle will not hold perfectly still in the air).
|
||||
:::
|
||||
|
||||
#### 速率控制器架构/形式
|
||||
|
||||
PX4 supports two (mathematically equivalent) forms of the PID rate controller in a single "mixed" implementation: [Parallel](#parallel-form) and [Standard](#standard-form).
|
||||
|
||||
Users can select the form that is used by setting the proportional gain for the other form to "1" (i.e. in the diagram below set **K** to 1 for the parallel form, or **P** to 1 for the standard form - this will replace either the K or P blocks with a line).
|
||||
|
||||

|
||||
|
||||
<!-- The drawing is on draw.io: https://drive.google.com/file/d/1hXnAJVRyqNAdcreqNa5W4PQFkYnzwgOO/view?usp=sharing -->
|
||||
|
||||
- _G(s)_ represents the angular rates dynamics of a vehicle
|
||||
- _r_ is the rate setpoint
|
||||
- _y_ is the body angular rate (measured by a gyro)
|
||||
- _e_ is the error between the rate setpoint and the measured rate
|
||||
- _u_ is the output of the PID controller
|
||||
|
||||
这两种形式将在后面介绍。
|
||||
|
||||
:::info
|
||||
The derivative term (**D**) is on the feedback path in order to avoid an effect known as the [derivative kick](http://brettbeauregard.com/blog/2011/04/improving-the-beginner%E2%80%99s-pid-derivative-kick/).
|
||||
:::
|
||||
|
||||
:::tip
|
||||
有关详细信息,请参阅︰
|
||||
|
||||
- [Not all PID controllers are the same](https://www.controleng.com/articles/not-all-pid-controllers-are-the-same/) (www.controleng.com)
|
||||
- [PID controller > Standard versus parallel (ideal) PID form](https://en.wikipedia.org/wiki/PID_controller#Standard_versus_parallel_\(ideal\)_form) (Wikipedia)
|
||||
|
||||
:::
|
||||
|
||||
##### 并行模式
|
||||
|
||||
The _parallel form_ is the simplest form, and is (hence) commonly used in textbooks.
|
||||
在这种情况下,控制器的输出只是简单的将比例,积分和微分项相加。
|
||||
|
||||

|
||||
|
||||
##### 标准模式
|
||||
|
||||
这种形式在数学上等同于并行形式。 但主要的优点是(即使似乎有点反直觉)将比例增益的调试与积分、微分增益分离开了。
|
||||
这意味着一个新的平台通过使用同样大小/推力 无人机的增益,使它更易于调试,只是简单地调整K增益就可正常飞行。
|
||||
|
||||

|
||||
|
||||
#### 角速度 PID 调试
|
||||
|
||||
调试角速度PID控制器的相关参数是:
|
||||
|
||||
- Roll rate control ([MC_ROLLRATE_P](../advanced_config/parameter_reference.md#MC_ROLLRATE_P), [MC_ROLLRATE_I](../advanced_config/parameter_reference.md#MC_ROLLRATE_I), [MC_ROLLRATE_D](../advanced_config/parameter_reference.md#MC_ROLLRATE_D), [MC_ROLLRATE_K](../advanced_config/parameter_reference.md#MC_ROLLRATE_K))
|
||||
- Pitch rate control ([MC_PITCHRATE_P](../advanced_config/parameter_reference.md#MC_PITCHRATE_P), [MC_PITCHRATE_I](../advanced_config/parameter_reference.md#MC_PITCHRATE_I), [MC_PITCHRATE_D](../advanced_config/parameter_reference.md#MC_PITCHRATE_D), [MC_PITCHRATE_K](../advanced_config/parameter_reference.md#MC_PITCHRATE_K))
|
||||
- Yaw rate control ([MC_YAWRATE_P](../advanced_config/parameter_reference.md#MC_YAWRATE_P), [MC_YAWRATE_I](../advanced_config/parameter_reference.md#MC_YAWRATE_I), [MC_YAWRATE_D](../advanced_config/parameter_reference.md#MC_YAWRATE_D), [MC_YAWRATE_K](../advanced_config/parameter_reference.md#MC_YAWRATE_K))
|
||||
|
||||
The rate controller can be tuned in [Acro mode](../flight_modes_mc/acro.md) or [Stabilized mode](../flight_modes_mc/manual_stabilized.md):
|
||||
|
||||
- _Acro mode_ is preferred because it allows for isolated rate control testing.
|
||||
However it is significantly harder to pilot.
|
||||
|
||||
::: warning
|
||||
If you choose this mode, you must [disable all stick expo and have reasonable maximum rates for all axes](../flight_modes_mc/acro.md#stick-input-mapping):
|
||||
|
||||
- `MC_ACRO_EXPO` = 0, `MC_ACRO_EXPO_Y` = 0, `MC_ACRO_SUPEXPO` = 0,
|
||||
`MC_ACRO_SUPEXPOY` = 0
|
||||
- `MC_ACRO_P_MAX` = 200, `MC_ACRO_R_MAX` = 200
|
||||
- `MC_ACRO_Y_MAX` = 100
|
||||
|
||||
For PX4 v1.15 and later the defaults are set for this purpose to a maximum rate of 100°/s linear mapping for all axes.
|
||||
|
||||
:::
|
||||
|
||||
- _Stabilized mode_ is simpler to fly, but it is also much more difficult to distinguish if attitude or rate controller causes a certain behavior.
|
||||
|
||||
万一你的飞行器完全飞不起来:
|
||||
|
||||
- If there are strong oscillations when first trying to takeoff (to the point where it does not fly), decrease all **P** and **D** gains until it takes off.
|
||||
- If the reaction to RC movement is minimal, increase the **P** gains.
|
||||
|
||||
The actual tuning is roughly the same in _Manual mode_ or _Acro mode_:
|
||||
You iteratively tune the **P** and **D** gains for roll and pitch, and then the **I** gain.
|
||||
一开始你的ROLL和PITCH可以用相同的值,等调的差不多了,细调的时候可以分别再调整滚转和俯仰(如果你的飞行器是对称的,那就不用再细调了。)
|
||||
For yaw it is very similar, except that **D** can be left at 0.
|
||||
|
||||
##### 比例增益 (P/K)
|
||||
|
||||
The proportional gain is used to minimize the tracking error (below we use **P** to refer to both **P** or **K**).
|
||||
它可以加快响应速度,因此应该在不引入震荡的前提下设的尽量的高。
|
||||
|
||||
- If the **P** gain is too high: you will see high-frequency oscillations.
|
||||
- If the **P** gain is too low:
|
||||
- 飞行器会对遥控器的输入很迟钝。
|
||||
- In _Acro mode_ the vehicle will drift, and you will constantly need to correct to keep it level.
|
||||
|
||||
##### 微分增益 (D)
|
||||
|
||||
The **D** (derivative) gain is used for rate damping.
|
||||
同样地,这个值应该尽量设大一些来避免超调。
|
||||
|
||||
- If the **D** gain is too high: the motors become twitchy (and maybe hot), because the **D** term amplifies noise.
|
||||
- If the **D** gain is too low: you see overshoots after a step-input.
|
||||
|
||||
典型值是:
|
||||
|
||||
- standard form (**P** = 1): between 0.01 (4" racer) and 0.04 (500 size), for any value of **K**
|
||||
- parallel form (**K** = 1): between 0.0004 and 0.005, depending on the value of **P**
|
||||
|
||||
##### 积分增益 (I)
|
||||
|
||||
The **I** (integral) gain keeps a memory of the error. The **I** term increases when the desired rate is not reached over some time.
|
||||
It is important (especially when flying _Acro mode_), but it should not be set too high.
|
||||
|
||||
- 如果积分增益太高:你会看到缓慢的振荡。
|
||||
- If the I gain is too low: this is best tested in _Acro mode_, by tilting the vehicle to one side about 45 degrees, and keeping it like that.
|
||||
他应该始终保持相同的角度。
|
||||
If it drifts back, increase the **I** gain.
|
||||
A low **I** gain is also visible in a log, when there is an offset between the desired and the actual rate over a longer time.
|
||||
|
||||
典型值是:
|
||||
|
||||
- standard form (**P** = 1): between 0.5 (VTOL plane), 1 (500 size) and 8 (4" racer), for any value of **K**
|
||||
- parallel form (**K** = 1): between 0.3 and 0.5 if **P** is around 0.15
|
||||
The pitch gain usually needs to be a bit higher than the roll gain.
|
||||
|
||||
#### 测试步骤
|
||||
|
||||
To test the current gains, provide a fast **step-input** when hovering and observe how the vehicle reacts.
|
||||
他应该反应很快,振荡和超调量都不大。(有种「锁定」的感觉)。
|
||||
|
||||
比如在横滚方向上来一个阶跃输入,把横滚杆推向一侧,然后让它迅速回中(注意如果你直接松手的话,由于它的弹簧结构,杆会振荡 - 调好的无人机会跟随这些振荡)。
|
||||
|
||||
:::info
|
||||
A well-tuned vehicle in _Acro mode_ will not tilt randomly towards one side, but keeps the attitude for tens of seconds even without any corrections.
|
||||
:::
|
||||
|
||||
#### 日志
|
||||
|
||||
看看日志有助于你看看你调的参咋样。
|
||||
下面是一份调得比较好的滚转和偏航角速度的日志。
|
||||
|
||||

|
||||

|
||||
|
||||
下面这份日志的滚转角速度调试的很好,它有几个翻转,也就是很极限的阶跃输入。
|
||||
You can see that the vehicle overshoots only by a very small amount:
|
||||

|
||||
|
||||
### 角度控制
|
||||
|
||||
角度控制环控制机体的姿态角,并通过以下参数输出目标角速度:
|
||||
|
||||
- Roll control ([MC_ROLL_P](../advanced_config/parameter_reference.md#MC_ROLL_P))
|
||||
- Pitch control ([MC_PITCH_P](../advanced_config/parameter_reference.md#MC_PITCH_P))
|
||||
- Yaw control ([MC_YAW_P](../advanced_config/parameter_reference.md#MC_YAW_P))
|
||||
|
||||
姿态角控制环调起来就容易多了。
|
||||
其实大多数时候默认值就够了,完全不用调。
|
||||
|
||||
To tune the attitude controller, fly in _Stabilized mode_ and increase the **P** gains gradually.
|
||||
如果看到有振荡或者超调,就说明增益调得太高了。
|
||||
|
||||
下面这几个参数也可以调整 这些参数决定了绕三个轴的最大角速度:
|
||||
|
||||
- Maximum roll rate ([MC_ROLLRATE_MAX](../advanced_config/parameter_reference.md#MC_ROLLRATE_MAX))
|
||||
- Maximum pitch rate ([MC_PITCHRATE_MAX](../advanced_config/parameter_reference.md#MC_PITCHRATE_MAX))
|
||||
- Maximum yaw rate ([MC_YAWRATE_MAX](../advanced_config/parameter_reference.md#MC_YAWRATE_MAX))
|
||||
|
||||
### 推力曲线
|
||||
|
||||
以上的调整都是在悬停油门的基础上的。
|
||||
但当你逐渐增大到满油门时,机体可能又开始振荡了。
|
||||
|
||||
To counteract that, adjust the **thrust curve** with the [THR_MDL_FAC](../advanced_config/parameter_reference.md#THR_MDL_FAC) parameter.
|
||||
|
||||
:::info
|
||||
The rate controller might need to be re-tuned if you change this parameter.
|
||||
:::
|
||||
|
||||
The mapping from motor control signals (e.g. PWM) to expected thrust is linear by default — setting `THR_MDL_FAC` to 1 makes it quadratic.
|
||||
Values in between use a linear interpolation of the two. Typical values are between 0.3 and 0.5.
|
||||
|
||||
If you have a [thrust stand](https://www.tytorobotics.com/pages/series-1580-1585) <!-- RCbenchmark Series 1580/1585 Test Stand --> (or can otherwise _measure_ thrust and motor commands simultaneously), you can determine the relationship between the motor control signal and the motor's actual thrust, and fit a function to the data.
|
||||
The motor command in PX4 called `actuator_output` can be PWM, Dshot, UAVCAN commands for the respective ESCs in use.
|
||||
[This Notebook][THR_MDL_FAC_Calculation] shows one way for how the thrust model factor `THR_MDL_FAC` may be calculated from previously measured thrust and PWM data.
|
||||
The curves shown in this plot are parametrized by both α and k, and also show thrust and PWM in real units (kgf and μs).
|
||||
In order to simplify the curve fit problem, you can normalize the data between 0 and 1 to find `k` without having to estimate α (α = 1, when the data is normalized).
|
||||
|
||||
] <!-- removed link to THR_MDL_FAC_Calculation as causes problems for link checker -->
|
||||
|
||||
:::info
|
||||
The mapping between PWM and static thrust depends highly on the battery voltage.
|
||||
:::
|
||||
|
||||
An alternative way of performing this experiment is to make a scatter plot of the normalized motor command and thrust values, and iteratively tune the thrust curve by experimenting with the `THR_MDL_FAC` parameter.
|
||||
An example of that graph is shown here:
|
||||
|
||||

|
||||
|
||||
If raw motor command and thrust data is collected throughout the full-scale range in the experiment, you can normalize the data using the equation:
|
||||
|
||||
_normalized_value = ( raw_value - min (raw_value) ) / ( max ( raw_value ) - min ( raw_value ) )_
|
||||
|
||||
After you have a scatter plot of the normalized values, you can try and make the curve match by plotting the equation
|
||||
|
||||
_rel_thrust = ( `THR_MDL_FAC` ) _ rel_signal^2 + ( 1 - `THR_MDL_FAC` ) \* rel_signal\*
|
||||
|
||||
over a linear range of normalized motor command values between 0 and 1.
|
||||
Note that this is the equation that is used in the firmware to map thrust and motor command, as shown in the [THR_MDL_FAC](../advanced_config/parameter_reference.md#THR_MDL_FAC) parameter reference.
|
||||
Here, _rel_thrust_ is the normalized thrust value between 0 and 1, and _rel_signal_ is the normalized motor command signal value between 0 and 1.
|
||||
|
||||
In this example above, the curve seemed to fit best when `THR_MDL_FAC` was set to 0.7.
|
||||
|
||||
[THR_MDL_FAC_Calculation]: https://github.com/PX4/PX4-user_guide/blob/main/assets/config/mc/ThrustCurve.ipynb
|
||||
|
||||
If you don't have access to a thrust stand, you can also tune the modeling factor empirically.
|
||||
Start off with 0.3 and increase it by 0.1 at a time.
|
||||
If it is too high, you will start to notice oscillations at lower throttle values.
|
||||
If it is too low you'll notice oscillations at higher throttle values.
|
||||
|
||||
<a id="airmode"></a>
|
||||
|
||||
### Airmode & Mixer Saturation
|
||||
|
||||
The rate controller outputs torque commands for all three axis (roll, pitch and yaw) and a scalar thrust value, which need to be converted into individual motor thrust commands.
|
||||
This step is called mixing.
|
||||
|
||||
It can happen that one of the motor commands becomes negative, for example for a low thrust and large roll command (and similarly it can go above 100%).
|
||||
This is a mixer saturation.
|
||||
It is physically impossible for the vehicle to execute these commands (except for reversible motors).
|
||||
PX4 has two modes to resolve this:
|
||||
|
||||
- Either by reducing the commanded torque for roll such that none of the motor commands is below zero (Airmode disabled).
|
||||
In the extreme case where the commanded thrust is zero, it means that no attitude correction is possible anymore, which is why a minimum thrust is always required for this mode.
|
||||
- Or by increasing (boosting) the commanded thrust, such that none of the motor commands is negative (Airmode enabled).
|
||||
This has the big advantage that the attitude/rates can be tracked correctly even at low or zero throttle.
|
||||
It generally improves the flight performance.
|
||||
|
||||
However it increases the total thrust which can lead to situations where the vehicle continues to ascend even though the throttle is reduced to zero.
|
||||
For a well-tuned, correctly functioning vehicle it is not the case, but for example it can happen when the vehicle strongly oscillates due to too high P tuning gains.
|
||||
|
||||
Both modes are shown below with a 2D illustration for two motors and a torque command for roll <span style="color:#9673A6">r</span>.
|
||||
On the left motor <span style="color:#9673A6">r</span> is added to the commanded thrust, while on the right motor it is subtracted from it.
|
||||
The motor thrusts are in <span style="color:#6A9153">green</span>.
|
||||
With Airmode enabled, the commanded thrust is increased by <span style="color:#B85450">b</span>.
|
||||
When it is disabled, <span style="color:#9673A6">r</span> is reduced.
|
||||
|
||||

|
||||
|
||||
<!-- The drawing is on draw.io: https://drive.google.com/file/d/1N0qjbiJX6JuEk2I1-xFvigLEPKJRIjBP/view?usp=sharing
|
||||
On the first Tab
|
||||
-->
|
||||
|
||||
If mixing becomes saturated towards the upper bound the commanded thrust is reduced to ensure that no motor is commanded to deliver more than 100% thrust.
|
||||
This behaviour is similar to the Airmode logic, and is applied whether Airmode is enabled or disabled.
|
||||
|
||||
Once your vehicle flies well you can enable Airmode via the [MC_AIRMODE](../advanced_config/parameter_reference.md#MC_AIRMODE) parameter.
|
||||
@@ -0,0 +1,150 @@
|
||||
# Multicopter PID Tuning Guide (Manual/Basic)
|
||||
|
||||
This tutorial explains how to _manually_ tune the PID loops on PX4 for all [multicopter setups](../airframes/airframe_reference.md#copter) (Quads, Hexa, Octo etc).
|
||||
|
||||
:::tip
|
||||
[Autotune](../config/autotune_mc.md) is recommended for most users, as it is far faster, easier and provides good tuning for most frames.
|
||||
建议对自动调整不起作用或必须进行更加的调校的机型进行手工调整。
|
||||
:::
|
||||
|
||||
Generally if you're using an appropriate [supported frame configuration](../airframes/airframe_reference.md#copter), the default tuning should allow you to fly the vehicle safely.
|
||||
Tuning is recommended for all new vehicle setups to get the _very best_ performance, because relatively small hardware and assembly changes can affect the gains required tuning gains for optimal flight.
|
||||
For example, different ESCs or motors change the optimal tuning gains.
|
||||
|
||||
## 简介
|
||||
|
||||
PX4 uses **P**roportional, **I**ntegral, **D**erivative (PID) controllers (these are the most widespread control technique).
|
||||
|
||||
The _QGroundControl_ **PID Tuning** setup provides real-time plots of the vehicle setpoint and response curves.
|
||||
The goal of tuning is to set the P/I/D values such that the _Response_ curve matches the _Setpoint_ curve as closely as possible (i.e. a fast response without overshoots).
|
||||
|
||||

|
||||
|
||||
The controllers are layered, which means a higher-level controller passes its results to a lower-level controller.
|
||||
The lowest-level controller is the **rate controller**, followed by the **attitude controller**, and finally the **velocity & position controller**.
|
||||
The PID tuning needs to be done in this same order, starting with the rate controller, as it will affect all other controllers.
|
||||
|
||||
The testing procedure for each controller (rate, attitude, velocity/position) and axis (yaw, roll, pitch) is always the same: create a fast setpoint change by moving the sticks very rapidly and observe the response.
|
||||
Then adjust the sliders (as discussed below) to improve the tracking of the response to the setpoint.
|
||||
|
||||
:::tip
|
||||
|
||||
- Rate controller tuning is the most important, and if tuned well, the other controllers often need no or only minor adjustments
|
||||
- Usually the same tuning gains can be used for roll and pitch.
|
||||
- use Acro/Stabilized/Altitude mode to tune the rate controller
|
||||
- Use [Position mode](../flight_modes_mc/position.md) to tune the _Velocity Controller_ and the _Position Controller_.
|
||||
Make sure to switch to the _Simple position control_ mode so you can generate step inputs.
|
||||

|
||||
|
||||
:::
|
||||
|
||||
## 操作前提
|
||||
|
||||
- You have selected the closest matching [default frame configuration](../config/airframe.md) for your vehicle.
|
||||
This should give you a vehicle that already flies.
|
||||
|
||||
- You should have done an [ESC calibration](../advanced_config/esc_calibration.md).
|
||||
|
||||
- If using PWM outputs their minimum values should be set correctly in the [Actuator Configuration](../config/actuators.md).
|
||||
These need to be set low, but such that the **motors never stop** when the vehicle is armed.
|
||||
|
||||
This can be tested in [Acro mode](../flight_modes_mc/acro.md) or in [Stabilized mode](../flight_modes_mc/manual_stabilized.md):
|
||||
|
||||
- Remove propellers
|
||||
- Arm the vehicle and lower the throttle to the minimum
|
||||
- Tilt the vehicle to all directions, about 60 degrees
|
||||
- Check that no motors turn off
|
||||
|
||||
- Use a high-rate telemetry link such as WiFi if at all possible (a typical low-range telemetry radio is not fast enough for real-time feedback and plots).
|
||||
This is particularly important for the rate controller.
|
||||
|
||||
- Disable [MC_AIRMODE](../advanced_config/parameter_reference.md#MC_AIRMODE) before tuning a vehicle (there is an options for this in the PID tuning screen).
|
||||
|
||||
:::warning
|
||||
Poorly tuned vehicles are likely to be unstable, and easy to crash.
|
||||
Make sure to have assigned a [Kill switch](../config/safety.md#emergency-switches).
|
||||
:::
|
||||
|
||||
## Tuning Procedure
|
||||
|
||||
The tuning procedure is:
|
||||
|
||||
1. Arm the vehicle, takeoff, and hover (typically in [Position mode](../flight_modes_mc/position.md)).
|
||||
|
||||
2. Open _QGroundControl_ **Vehicle Setup > PID Tuning**
|
||||

|
||||
|
||||
3. Select the **Rate Controller** tab.
|
||||
|
||||
4. Confirm that the airmode selector is set to **Disabled**
|
||||
|
||||
5. Set the _Thrust curve_ value to: 0.3 (PWM, power-based controllers) or 1 (RPM-based ESCs)
|
||||
|
||||
::: info
|
||||
For PWM, power-based and (some) UAVCAN speed controllers, the control signal to thrust relationship may not be linear.
|
||||
As a result, the optimal tuning at hover thrust may not be ideal when the vehicle is operating at higher thrust.
|
||||
|
||||
The thrust curve value can be used to compensate for this non-linearity:
|
||||
|
||||
- For PWM controllers, 0.3 is a good default (which may benefit from [further tuning](../config_mc/pid_tuning_guide_multicopter.md#thrust-curve)).
|
||||
- For RPM-based controllers, use 1 (no further tuning is required as these have a quadratic thrust curve).
|
||||
|
||||
For more information see the [detailed PID tuning guide](../config_mc/pid_tuning_guide_multicopter.md#thrust-curve).
|
||||
|
||||
:::
|
||||
|
||||
6. Set the _Select Tuning_ radio button to: **Roll**.
|
||||
|
||||
7. (Optionally) Select the **Automatic Flight Mode Switching** checkbox.
|
||||
This will _automatically_ switch from [Position mode](../flight_modes_mc/position.md) to [Stabilised mode](../flight_modes_mc/manual_stabilized.md) when you press the **Start** button
|
||||
|
||||
8. For rate controller tuning switch to _Acro mode_, _Stabilized mode_ or _Altitude mode_ (unless automatic switching is enabled).
|
||||
|
||||
9. Select the **Start** button in order to start tracking the setpoint and response curves.
|
||||
|
||||
10. Rapidly move the _roll stick_ full range and observe the step response on the plots.
|
||||
:::tip
|
||||
Stop tracking to enable easier inspection of the plots.
|
||||
This happens automatically when you zoom/pan.
|
||||
Use the **Start** button to restart the plots, and **Clear** to reset them.
|
||||
|
||||
:::
|
||||
|
||||
11. Modify the three PID values using the sliders (for roll rate-tuning these affect `MC_ROLLRATE_K`, `MC_ROLLRATE_I`, `MC_ROLLRATE_D`) and observe the step response again.
|
||||
The values are saved to the vehicle as soon as the sliders are moved.
|
||||
::: info
|
||||
The goal is for the _Response_ curve to match the _Setpoint_ curve as closely as possible (i.e. a fast response without overshoots).
|
||||
|
||||
:::
|
||||
The PID values can be adjusted as follows:
|
||||
- P (proportional) or K gain:
|
||||
- increase this for more responsiveness
|
||||
- reduce if the response is overshooting and/or oscillating (up to a certain point increasing the D gain also helps).
|
||||
- D (derivative) gain:
|
||||
- this can be increased to dampen overshoots and oscillations
|
||||
- increase this only as much as needed, as it amplifies noise (and can lead to hot motors)
|
||||
- I (integral) gain:
|
||||
- used to reduce steady-state error
|
||||
- if too low, the response might never reach the setpoint (e.g. in wind)
|
||||
- if too high, slow oscillations can occur
|
||||
|
||||
12. Repeat the tuning process above for the pitch and yaw:
|
||||
- Use _Select Tuning_ radio button to select the axis to tune
|
||||
- Move the appropriate sticks (i.e. pitch stick for pitch, yaw stick for yaw).
|
||||
- For pitch tuning, start with the same values as for roll.
|
||||
:::tip
|
||||
Use the **Save to Clipboard** and **Reset from Clipboard** buttons to copy the roll settings for initial pitch settings.
|
||||
|
||||
:::
|
||||
|
||||
13. Repeat the tuning process for the attitude controller on all the axes.
|
||||
|
||||
14. Repeat the tuning process for the velocity and positions controllers (on all the axes).
|
||||
|
||||
- Use Position mode when tuning these controllers
|
||||
- Select the **Simple position control** option in the _Position control mode ..._ selector (this allows direct control for the generation of step inputs)
|
||||
|
||||

|
||||
|
||||
All done!
|
||||
Remember to re-enable airmode before leaving the setup.
|
||||
@@ -0,0 +1,153 @@
|
||||
# Multicopter Racer Setup
|
||||
|
||||
This page describes how to setup and configure a multicopter racer for optimal performance (in particular for [Acro mode](../flight_modes_mc/acro.md)).
|
||||
|
||||
请注意穿越机是经过特殊设计的动力强劲的快速飞行器。
|
||||
你应该是有一定经验的使用者,或者让有经验的使用者帮助你。
|
||||
|
||||
:::tip
|
||||
Many things described here can also be applied to improve the flight performance of other types of multicopters.
|
||||
:::
|
||||
|
||||
:::info
|
||||
A racer usually omits some sensors (e.g. GPS).
|
||||
因此,他的保护性选项有所缺失。
|
||||
:::
|
||||
|
||||
## 构建选项
|
||||
|
||||
穿越机通常会少一些传感器。
|
||||
|
||||
最小配置是只使用陀螺仪和加速度计。
|
||||
|
||||
:::info
|
||||
If the board has an internal magnetometer, it should not be used (small racers are particularly prone to strong electromagnetic interference).
|
||||
:::
|
||||
|
||||
穿越机通常没有GPS,因为它会增加重量且再发生撞击时候更容易被损坏(一个GPS+外部磁罗盘需要被放置在GPS杆上来避免大电流对磁罗盘的影响,因此也就意味着它更容易被损坏)。
|
||||
|
||||
但是增加GPS也有一些好处,尤其是对于初学者。
|
||||
|
||||
- 你可以让飞机进入定位状态,飞行器将会待在一个地方。
|
||||
当你失去方向或者需要刹车时候,这会是有用的。
|
||||
它通常也可以被用来安全降落。
|
||||
- [Return mode](../flight_modes_mc/return.md) can be used, either on a switch or as RC loss/low battery failsafe.
|
||||
- 当发生事故时,你将有飞机最后的位置,方便寻找飞机。
|
||||
- 飞行记录将包含飞行路线追踪,这意味着你可以进行航行回顾(3D 模式)。
|
||||
这可以帮助你改善特技飞行技巧。
|
||||
|
||||
:::info
|
||||
During aggressive acrobatic maneuvers the GPS can lose its position fix for a short time.
|
||||
If you switch into [position mode](../flight_modes_mc/position.md) during that time, [altitude mode](../flight_modes_mc/altitude.md) will be used instead until the position becomes valid again.
|
||||
:::
|
||||
|
||||
## 硬件安装
|
||||
|
||||
以下各段叙述了在构建穿越机时的几个重要问题。
|
||||
If you need complete build instructions, you can follow the [QAV-R 5" KISS ESC Racer](../frames_multicopter/qav_r_5_kiss_esc_racer.md) build log.
|
||||
|
||||
### 振动设置
|
||||
|
||||
有各种安装方法来减少振动。
|
||||
For example, the flight controller can be mounted with vibration dampening foam, or using [O-rings](../frames_multicopter/qav_r_5_kiss_esc_racer.md#mounting).
|
||||
|
||||
While there is no single best method, you will typically have fewer problems with vibrations if you use high-quality components (frame, motors, props) as for example used in the [QAV-R 5" KISS ESC Racer](../frames_multicopter/qav_r_5_kiss_esc_racer.md).
|
||||
|
||||
Make sure to use **balanced props**.
|
||||
|
||||
### 重心
|
||||
|
||||
确保重心尽可能靠近推力中心。
|
||||
左右平衡通常不是问题,但前后平衡可能是一个问题。
|
||||
您可以移动电池直到重心配置正确后再机架上标记它,这样您就可以始终正确放置电池。
|
||||
|
||||
:::info
|
||||
The integral term can account for an imbalanced setup, and a custom mixer can do that even better.
|
||||
然而,最好还是将不平衡问题在飞行器安装阶段解决掉。
|
||||
:::
|
||||
|
||||
## 软件设置
|
||||
|
||||
After having built the racer, you will need to configure the software.
|
||||
|
||||
Go through the [Basic Configuration Guide](../config/index.md).
|
||||
In particular, set the [Airframe](../config/airframe.md) that most closely matches your frame (typically you will choose the [Generic 250 Racer](../airframes/airframe_reference.md#copter_quadrotor_x_generic_250_racer) airframe, which sets some racer-specific parameters by default).
|
||||
|
||||
These parameters are important:
|
||||
|
||||
- Enable One-Shot or DShot by selecting the protocol for a group of outputs during [Actuator Configuration](../config/actuators.md).
|
||||
- Set the maximum roll-, pitch- and yaw rates for Stabilized mode as desired: [MC_ROLLRATE_MAX](../advanced_config/parameter_reference.md#MC_ROLLRATE_MAX), [MC_PITCHRATE_MAX](../advanced_config/parameter_reference.md#MC_PITCHRATE_MAX) and [MC_YAWRATE_MAX](../advanced_config/parameter_reference.md#MC_YAWRATE_MAX).
|
||||
The maximum tilt angle is configured with [MPC_MAN_TILT_MAX](../advanced_config/parameter_reference.md#MPC_MAN_TILT_MAX).
|
||||
- The minimum thrust [MPC_MANTHR_MIN](../advanced_config/parameter_reference.md#MPC_MANTHR_MIN) should be set to 0.
|
||||
|
||||
### 估计器
|
||||
|
||||
If you use a GPS you can skip this section and use the default estimator.
|
||||
Otherwise you should switch to the Q attitude estimator, which works without a magnetometer or barometer.
|
||||
|
||||
To enable it set [ATT_EN = 1](../advanced_config/parameter_reference.md#ATT_EN), [EKF2_EN =0 ](../advanced_config/parameter_reference.md#EKF2_EN) and [LPE_EN = 0](../advanced_config/parameter_reference.md#LPE_EN) (for more information see [Switching State Estimators](../advanced/switching_state_estimators.md#how-to-enable-different-estimators)).
|
||||
|
||||
Then change the following parameters:
|
||||
|
||||
- Set [SYS_HAS_MAG](../advanced_config/parameter_reference.md#SYS_HAS_MAG) to `0` if the system does not have a magnetometer.
|
||||
- Set [SYS_HAS_BARO](../advanced_config/parameter_reference.md#SYS_HAS_BARO) to `0` if the system does not have a barometer.
|
||||
- Configure the Q estimator: set [ATT_ACC_COMP](../advanced_config/parameter_reference.md#ATT_ACC_COMP) to `0`, [ATT_W_ACC](../advanced_config/parameter_reference.md#ATT_W_ACC) to 0.4 and [ATT_W_GYRO_BIAS](../advanced_config/parameter_reference.md#ATT_W_GYRO_BIAS) to 0.
|
||||
如果您愿意,您可以稍后调整这些。
|
||||
|
||||
### 故障保护
|
||||
|
||||
Configure [RC loss and low battery failsafe](../config/safety.md).
|
||||
If you do not use a GPS, set the failsafe to **Lockdown**, which turns off the motors.
|
||||
Test RC loss on the bench without props attached by turning off the remote when the vehicle is armed.
|
||||
|
||||
Make sure to assign a [kill switch](../config/safety.md#kill-switch) or an [arming switch](../config/safety.md#arm-disarm-switch).
|
||||
Test it and train to use it!
|
||||
|
||||
### PX4 调试
|
||||
|
||||
:::info
|
||||
Make sure to calibrate the ESCs before doing any tuning.
|
||||
:::
|
||||
|
||||
At this point you should be ready for a first test flight.
|
||||
|
||||
Assuming the vehicle is able to fly using the default settings, we then do a first pass of [Basic MC PID tuning](../config_mc/pid_tuning_guide_multicopter_basic.md).
|
||||
The vehicle needs to be **undertuned** (the **P** and **D** gains should be set too low), such that there are no oscillations from the controller that could be interpreted as noise (the default gains might be good enough).
|
||||
This is important for the [filter tuning](#filter-tuning) (there will be a second PID tuning round later).
|
||||
|
||||
### Control Latency
|
||||
|
||||
The _control latency_ is the delay from a physical disturbance of the vehicle until the motors react to the change.
|
||||
|
||||
:::tip
|
||||
It is _crucial_ to reduce the control latency as much as possible!
|
||||
A lower latency allows you to increase the rate **P** gains, which means better flight performance.
|
||||
Even one millisecond added to the latency makes a difference.
|
||||
:::
|
||||
|
||||
这些因素影响到延迟:
|
||||
|
||||
- A soft airframe or soft vibration mounting increases latency (they act as a filter).
|
||||
- [Low-pass filters](../config_mc/filter_tuning.md) in software and on the sensor chip trade off increased latency for improved noise filtering.
|
||||
- PX4 software internals: the sensor signals need to be read in the driver and then pass through the controller to the output driver.
|
||||
- The IO chip (MAIN pins) adds about 5.4 ms latency compared to using the AUX pins (this does not apply to a _Pixracer_ or _Omnibus F4_, but does apply to a Pixhawk).
|
||||
To avoid the IO delay attach the motors to the AUX pins instead.
|
||||
- PWM output signal: enable [Dshot](../peripherals/dshot.md) by preference to reduce latency (or One-Shot if DShot is not supported).
|
||||
The protocol is selected for a group of outputs during [Actuator Configuration](../config/actuators.md).
|
||||
|
||||
### Filter Tuning
|
||||
|
||||
Filters trade off control latency and noise filtering, both of which impact performance.
|
||||
For information see: [Filter/Control Latency Tuning](../config_mc/filter_tuning.md)
|
||||
|
||||
### PID 调整 (第二轮)
|
||||
|
||||
Now do a second round of PID tuning, this time as tight as possible, and also tuning the thrust curve.
|
||||
|
||||
:::tip
|
||||
You can use the approach described in [Basic MC PID tuning](../config_mc/pid_tuning_guide_multicopter_basic.md) to tune the frame, but you will need to use the [Advanced Multicopter PID Tuning Guide (Advanced/Detailed)](../config_mc/pid_tuning_guide_multicopter.md#thrust-curve) to understand how to tune the thrust curve.
|
||||
|
||||
### 飞行模式
|
||||
|
||||
After you have verified that the vehicle flies well at low and high throttle, you can enable [airmode](../config_mc/pid_tuning_guide_multicopter.md#airmode) with the [MC_AIRMODE](../advanced_config/parameter_reference.md#MC_AIRMODE) parameter.
|
||||
This feature makes sure that the vehicle is still controllable and tracks the rate at low throttle.
|
||||
Reference in New Issue
Block a user