mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +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:
@@ -0,0 +1,22 @@
|
||||
# Fixed-wing Vehicle Configuration
|
||||
|
||||
Fixed-wing configuration and calibration follows the same high level steps as other frames: selection of firmware, configuration of the frame including actuator/motor geometry and output mappings, sensor configuration and calibration, configuration of safety and other features, and finally tuning.
|
||||
|
||||
:::info
|
||||
This topic is the recommended entry point when performing first-time configuration and calibration of a new multicopter frame.
|
||||
:::
|
||||
|
||||
The main steps are:
|
||||
|
||||
- [Standard Configuration](../config/index.md)
|
||||
|
||||
- [Autotune](../config/autotune_fw.md) - PID Tuning
|
||||
|
||||
::: info
|
||||
Autotune simplifies the manual process described in: [Fixed-wing Rate/Attitude Controller Tuning Guide](../config_fw/pid_tuning_guide_fixedwing.md).
|
||||
|
||||
:::
|
||||
|
||||
- [Fixed-wing Altitude/Position Controller Tuning Guide](../config_fw/position_tuning_guide_fixedwing.md)
|
||||
|
||||
- [Fixed-wing Trimming Guide](../config_fw/trimming_guide_fixedwing.md)
|
||||
@@ -0,0 +1,114 @@
|
||||
# 固定翼角速度/姿态控制器调节指南
|
||||
|
||||
本指南介绍如何手动调整固定翼PID控制器。
|
||||
它是为高级用户/专家设计的,因为错误的 PID 调节可能会使您的飞机坠毁。
|
||||
|
||||
:::info
|
||||
[Autotune](../config/autotune_fw.md) is recommended for most users, as it is far faster, easier and provides good tuning for most frames.
|
||||
建议对自动调整不起作用或必须进行更加的调校的机型进行手工调整。
|
||||
:::
|
||||
|
||||
## 操作前提
|
||||
|
||||
- “微调”必须首先配置(在开始PID调校之前)。
|
||||
The [Fixed-Wing Trimming Guide](../config_fw/trimming_guide_fixedwing.md) explains how.
|
||||
- 调节过程中错误的设置增益可能会使姿态控制不稳定。
|
||||
A pilot tuning gains should therefore be able to fly and land the plane in [manual](../flight_modes_fw/manual.md) (override) control.
|
||||
- 过高地增益(和快速的舵面响应)可能会超过你的机体结构允许最大过载――增加增益时需谨慎。
|
||||
- 滚转和俯仰参数调整都遵循相同的顺序。
|
||||
The only difference is that pitch is more sensitive to trim offsets, so [trimming](../config_fw/trimming_guide_fixedwing.md) has to be done carefully and integrator gains need more attention to compensate this.
|
||||
|
||||
## 建立机型基准线
|
||||
|
||||
如果有条件飞手可以手动飞行,最好是通过手动飞行试验确定几个系统核心特性。
|
||||
为了做到这一点,飞这些科目。
|
||||
在飞行过程中即使你无法及时在纸上记录全部参数,日志文件在供以后调整也将非常有用。
|
||||
|
||||
:::info
|
||||
All these quantities will be automatically logged.
|
||||
如果你想在不查看日志的情况下直接调整时才需要使用笔进行记录。
|
||||
|
||||
- 在合适的空速下平飞。
|
||||
注意油门杆位置和空速(例如:70%-> 0.7 油门,15米/秒空速)。
|
||||
- 以最大油门和足够的空速爬升10-30秒(例如:12米/秒的空速,在30秒内攀升100米)。
|
||||
- 以零油门和合理的空速来下滑10-30秒(例如:18米/秒的空速,30秒内下降80米)。
|
||||
- 滚转杆右侧最大,直到滚转角为60度, 然后滚转杆左侧最大,直到滚转角为负60度为止。
|
||||
- 俯仰最大45度抬头,俯仰最小负45度低头。
|
||||
|
||||
:::
|
||||
|
||||
本指南将使用这些参数来设置控制器的部分增益。
|
||||
|
||||
## 滚转调参
|
||||
|
||||
先调节滚转通道,然后俯仰通道。
|
||||
滚转更安全,因为不准确只会导致运动,而不会导致掉高。
|
||||
|
||||
### 调整前馈增益
|
||||
|
||||
调整这个增益前,首先将其他增益设定为最低值 (名义上为0.005, 但请检查参数文档)。
|
||||
|
||||
#### 设为最小增益
|
||||
|
||||
- [FW_RR_I](../advanced_config/parameter_reference.md#FW_RR_I)
|
||||
- [FW_RR_P](../advanced_config/parameter_reference.md#FW_RR_P)
|
||||
|
||||
#### 待调整增益
|
||||
|
||||
- [FW_RR_FF](../advanced_config/parameter_reference.md#FW_RR_FF) - start with a value of 0.4.
|
||||
增加该参数值 (每次双倍增加) 直到飞机滚转响应特性良好并到达设置值。
|
||||
最后将增益降低20%。
|
||||
|
||||
### 调整角速率增益
|
||||
|
||||
- [FW_RR_P](../advanced_config/parameter_reference.md#FW_RR_P) - start with a value of 0.06.
|
||||
增加这个值 (每次翻倍) 直到系统开始抖动。
|
||||
然后将增益降低50%。
|
||||
|
||||
### 通过积分器增益调整微调偏置
|
||||
|
||||
- [FW_RR_I](../advanced_config/parameter_reference.md#FW_RR_I) - start with a value of 0.01.
|
||||
增加这个值(每次翻倍),直到命令和实际滚转角之间没有偏差(这很可能需要查看日志文件)。
|
||||
|
||||
## 俯仰调参
|
||||
|
||||
俯仰轴可能需要更多的积分增益和正确的俯仰偏置。
|
||||
|
||||
### 调整前馈增益
|
||||
|
||||
在调整该增益前,将其他增益项设为最小值。
|
||||
|
||||
#### 设为最小增益
|
||||
|
||||
- [FW_PR_I](../advanced_config/parameter_reference.md#FW_PR_I)
|
||||
- [FW_PR_P](../advanced_config/parameter_reference.md#FW_PR_I)
|
||||
|
||||
#### 待调整增益
|
||||
|
||||
- [FW_PR_FF](../advanced_config/parameter_reference.md#FW_PR_FF) - start with a value of 0.4.
|
||||
增加该参数值 (每次翻倍) 直到飞机俯仰响应特性良好并到达设置值。
|
||||
最后将增益降低20%。
|
||||
|
||||
### 调整角速率增益
|
||||
|
||||
- [FW_PR_P](../advanced_config/parameter_reference.md#FW_PR_P) - start with a value of 0.04.
|
||||
增加这个值 (每次翻倍) 直到系统开始抖动。
|
||||
然后将增益降低50%。
|
||||
|
||||
### 通过积分器增益调整微调偏置
|
||||
|
||||
- [FW_PR_I](../advanced_config/parameter_reference.md#FW_PR_I) - start with a value of 0.01.
|
||||
增加这个值(每次翻倍),直到命令和实际俯仰角之间没有偏差(这很可能需要查看日志文件)。
|
||||
|
||||
## 调整外环时间常数
|
||||
|
||||
控制环的整体响应偏软/偏硬可通过时间常数调整。
|
||||
预设值0.5秒对常规固定翼是个合适的值,通常不需要调整。
|
||||
|
||||
- [FW_P_TC](../advanced_config/parameter_reference.md#FW_P_TC) - set to a default of 0.5 seconds, increase to make the Pitch response softer, decrease to make the response harder.
|
||||
- [FW_R_TC](../advanced_config/parameter_reference.md#FW_R_TC) - set to a default of 0.5 seconds, increase to make the Roll response softer, decrease to make the response harder.
|
||||
|
||||
## 其他调整参数
|
||||
|
||||
本指南将介绍所有重要参数。
|
||||
Additional tuning parameters are documented in the [Parameter Reference](../advanced_config/parameter_reference.md).
|
||||
@@ -0,0 +1,85 @@
|
||||
# Fixed-wing Altitude/Position Controller Tuning
|
||||
|
||||
本指南为调整飞行任务和高度/位置控制模式下所需的高级固定翼控制器提供一些帮助。
|
||||
PX4 uses TECS for altitude and airspeed control, and NPFG for horizontal heading/position control.
|
||||
|
||||
:::info
|
||||
An incorrectly set gain during tuning can make altitude or heading control unstable.
|
||||
因此,调节 TECS 增益的飞行员应该能够以稳定的控制模式飞行和降落飞机。
|
||||
:::
|
||||
|
||||
:::tip
|
||||
All parameters are documented in the [Parameter Reference](../advanced_config/parameter_reference.md#fw-tecs).
|
||||
本指南将介绍所有重要参数。
|
||||
:::
|
||||
|
||||
## TECS 调节(高度和空速)
|
||||
|
||||
TECS(总能量控制系统)是一种用于固定翼飞机的制导算法,该算法通过协调油门和俯仰角设定值来控制飞机的高度和空速。
|
||||
For a detailed description of the TECS algorithm and the control diagram, see [Controller Diagrams](../flight_stack/controller_diagrams.md).
|
||||
|
||||
A well-tuned attitude controller is required before tuning TECS: [PID Tuning Guide](../config_fw/pid_tuning_guide_fixedwing.md).
|
||||
|
||||
调整 TECS 主要是正确地设置机身限制。
|
||||
这些限制可以通过如下所述的一系列飞行操作确定的参数来指定。
|
||||
Most of the maneuvers required the plane to be flown by a pilot in [Stabilized flight mode](../flight_modes_fw/stabilized.md).
|
||||
|
||||
:::tip
|
||||
It is highly beneficial to have a person available who can read and take note of telemetry data while the pilot is flying the maneuvers.
|
||||
为了提高准确性,我们还建议您使用飞行日志中记录的数据来验证飞行期间获得的数据。
|
||||
:::
|
||||
|
||||
#### 1st:平衡条件
|
||||
|
||||
Fly in [stabilized mode](../flight_modes_fw/stabilized.md) and find trim values for both throttle and pitch angle for level flight at trim airspeed.
|
||||
使用油门去调节空速和俯仰以保持水平飞行。
|
||||
|
||||
设置以下参数:
|
||||
|
||||
- [FW_AIRSPD_TRIM](../advanced_config/parameter_reference.md#FW_AIRSPD_TRIM) - set to the desired trim airspeed flown during the maneuver.
|
||||
- [FW_THR_TRIM](../advanced_config/parameter_reference.md#FW_THR_TRIM) - set to the throttle required to fly at trim airspeed.
|
||||
- [FW_PSP_OFF](../advanced_config/parameter_reference.md#FW_PSP_OFF) - set to the pitch angle required to maintain level flight.
|
||||
|
||||
#### 2nd: Airspeed & Throttle Limits
|
||||
|
||||
Fly in [stabilized mode](../flight_modes_fw/stabilized.md) and increase throttle while maintaining level flight using pitch control - until the vehicle reaches
|
||||
the maximum allowed airspeed.
|
||||
|
||||
设置以下参数:
|
||||
|
||||
- [FW_THR_MAX](../advanced_config/parameter_reference.md#FW_THR_MAX) - set to the throttle you applied to reach maximum airspeed during level flight.
|
||||
- [FW_THR_MIN](../advanced_config/parameter_reference.md#FW_THR_MIN) - set to the minimum throttle the plane should fly at.
|
||||
- [FW_AIRSPD_MAX](../advanced_config/parameter_reference.md#FW_AIRSPD_MAX) - set to the maximum airspeed you achieved during level flight at `FW_THR_MAX`.
|
||||
|
||||
#### 3rd: Pitch & Climb Rate Limits
|
||||
|
||||
:::warning
|
||||
Do not use [FW_T_CLMB_MAX](../advanced_config/parameter_reference.md#FW_T_CLMB_MAX), [FW_T_SINK_MAX](../advanced_config/parameter_reference.md#FW_T_SINK_MAX) or [FW_T_SINK_MIN](../advanced_config/parameter_reference.md#FW_T_SINK_MIN) to specify the desired climb or sink performance you would like to get from the vehicle!这些参数定义了操作限制,应在调试阶段进行设置,如下所述。
|
||||
:::
|
||||
|
||||
Fly in stabilized mode, apply full throttle (`FW_THR_MAX`) and slowly increase the pitch angle of the vehicle until the airspeed reaches `FW_AIRSPD_TRIM`.
|
||||
|
||||
- [FW_P_LIM_MAX](../advanced_config/parameter_reference.md#FW_P_LIM_MAX) - set to the pitch angle required to climb at trim airspeed when applying `FW_THR_MAX`.
|
||||
- [FW_T_CLMB_MAX](../advanced_config/parameter_reference.md#FW_T_CLMB_MAX) - set to the climb rate achieved during the climb at `FW_AIRSPD_TRIM`.
|
||||
|
||||
Fly in stabilized mode, reduce the throttle to `FW_THR_MIN` and slowly decrease the pitch angle until the vehicle reaches `FW_AIRSPD_MAX`.
|
||||
|
||||
- [FW_P_LIM_MIN](../advanced_config/parameter_reference.md#FW_P_LIM_MIN) - set to the pitch angle required to reach `FW_AIRSPD_MAX` at `FW_THR_MIN`.
|
||||
- [FW_T_SINK_MAX](../advanced_config/parameter_reference.md#FW_T_SINK_MAX) - set to the sink rate achieved during the descent.
|
||||
|
||||
Fly in stabilized mode, reduce throttle to `FW_THR_MIN` and adjust the pitch angle such that the plane maintains `FW_AIRSPD_TRIM`.
|
||||
|
||||
- [FW_T_SINK_MIN](../advanced_config/parameter_reference.md#FW_T_SINK_MIN) - set to the sink rate achieved while maintaining `FW_AIRSPD_TRIM`.
|
||||
|
||||
Specify the target climb and sink rate for autonomous missions by adjusting [FW_T_CLMB_R_SP](../advanced_config/parameter_reference.md#FW_T_CLMB_R_SP) and [FW_T_SINK_R_SP](../advanced_config/parameter_reference.md#FW_T_SINK_R_SP).
|
||||
这些参数指定了飞行器改变高度时的爬升率和下降率。
|
||||
Furthermore, these two values define the height rate limits commanded by the user in [Altitude mode](../flight_modes_fw/altitude.md) and [Position mode](../flight_modes_fw/position.md).
|
||||
|
||||
### 固定翼轨迹控制调整(位置)
|
||||
|
||||
All path control parameters are described [here](../advanced_config/parameter_reference.md#fw-path-control).
|
||||
|
||||
- [NPFG_PERIOD](../advanced_config/parameter_reference.md#NPFG_PERIOD) - This is the previously called L1 distance and defines the tracking point ahead of the aircraft it's following.
|
||||
大多数飞机适用于10-20米的数值范围。
|
||||
调整期间缓慢缩短,直到响应迅速没有振荡。
|
||||
飞机动态特性缓慢的该数值应该增加。
|
||||
@@ -0,0 +1,53 @@
|
||||
# 固定翼配平指南
|
||||
|
||||
配平校准是指在配平状态下计算/设置舵面偏度(配平状态包含相对空速、空气密度、攻击角、飞机配置等)。
|
||||
一架具有合适配平设置的飞机在配平状态下飞行将自动保持其姿态,不需要飞行员或增稳计算机进行任何的控制操作。
|
||||
|
||||
General aviation, commercial and large unmanned planes trim their control surfaces using [trim tabs](https://en.wikipedia.org/wiki/Trim_tab) while small UAVs simply add an offset to the actuator of the control surface.
|
||||
|
||||
The [Basic trimming](#basic-trimming) section explains the purpose of each trim parameter and how to find the correct value.
|
||||
The [Advanced Trimming](#advanced-trimming) section introduces parameters that can be set to automatically adjust the trims based on the measured airspeed and flap position.
|
||||
|
||||
## 基础配平
|
||||
|
||||
操作者可通过若干个参数来恰当地配平固定翼飞机。
|
||||
以下是这些参数及其使用场景的概述:
|
||||
|
||||
- [RCx_TRIM](../advanced_config/parameter_reference.md#RC1_TRIM) applies trim to the signal received from the RC transmitter.
|
||||
These parameters are set automatically during [RC calibration](../config/radio.md).
|
||||
- [CA_SV_CSx_TRIM](../advanced_config/parameter_reference.md#CA_SV_CS0_TRIM) applies trim to a control surfaces channel.
|
||||
该参数用于在飞行前精确地将舵面与默认角度对齐。
|
||||
- [FW_PSP_OFF](../advanced_config/parameter_reference.md#FW_PSP_OFF) applies an offset to the pitch setpoint.
|
||||
该参数用来设定飞机在巡航速度飞行时所需要的攻角。
|
||||
- [FW_AIRSPD_TRIM](../advanced_config/parameter_reference.md#FW_AIRSPD_TRIM) is used by the rate controllers to scale their output depending on the measured airspeed.
|
||||
See [Airspeed Scaling](../flight_stack/controller_diagrams.md#airspeed-scaling) for more details.
|
||||
- [TRIM_ROLL](../advanced_config/parameter_reference.md#TRIM_ROLL), [TRIM_PITCH](../advanced_config/parameter_reference.md#TRIM_PITCH) and [TRIM_YAW](../advanced_config/parameter_reference.md#TRIM_YAW) apply trim to the control signals _before_ mixing.
|
||||
For example, if you have two servos for the elevator, `TRIM_PITCH` applies trim to both of them.
|
||||
这些参数在您的舵面已对齐,但在手动飞行期间出现飞机俯仰/滚轮/偏航/上下/左右动作(不稳定)时,或在增稳飞行期间控制信号有恒定偏移时使用。
|
||||
|
||||
设置上述参数的正确顺序是:
|
||||
|
||||
1. Trim the servos by physically adjusting the linkages lengths if possible and fine tune by trimming the PWM channels (use `PWM_MAIN/AUX_TRIMx`) on the bench to properly set the control surfaces to their theoretical position.
|
||||
2. Fly in stabilized mode at cruise speed and set the pitch setpoint offset (`FW_PSP_OFF`) to desired angle of attack.
|
||||
巡航速度飞行下的需用攻角为飞机在平飞状态下保持固定高度时的实际飞行迎角。
|
||||
If you are using an airspeed sensor, also set the correct cruise airspeed (`FW_AIRSPD_TRIM`).
|
||||
3. Look at the actuator controls in the log file (upload it to [Flight Review](https://logs.px4.io) and check the _Actuator Controls_ plot for example) and set the pitch trim (`TRIM_PITCH`).
|
||||
将该值设置为平飞时俯仰角度的平均值。
|
||||
|
||||
步骤3可以在步骤2之前执行,如果你不想查看日志, 或者如果您在手动模式下感觉舒适。
|
||||
You can then trim your remote (with the trim switches) and report the values to `TRIM_PITCH` (and remove the trims from your transmitter) or update `TRIM_PITCH` directly during flight via telemetry and QGC.
|
||||
|
||||
## 高级配平
|
||||
|
||||
在空速增加过程中,会因非对称翼型和使用襟翼而引入俯仰通道低头力矩,因此飞机需要根据测量空速和襟翼位置重新计算配平。
|
||||
为此,可以使用以下参数定义一个关于空速的双线性曲线函数和关于襟翼状态的俯仰修正增量函数(参见下图):
|
||||
|
||||
- [FW_DTRIM\_\[R/P/Y\]\_\[VMIN/VMAX\]](../advanced_config/parameter_reference.md#FW_DTRIM_R_VMIN) are the roll/pitch/yaw trim value added to `TRIM_ROLL/PITCH/YAW` at min/max airspeed (defined by [FW_AIRSPD_MIN](../advanced_config/parameter_reference.md#FW_AIRSPD_MIN) and [FW_AIRSPD_MAX](../advanced_config/parameter_reference.md#FW_AIRSPD_MAX)).
|
||||
- [CA_SV_CSx_FLAP](../advanced_config/parameter_reference.md#CA_SV_CS0_FLAP) and [CA_SV_CSx_SPOIL](../advanced_config/parameter_reference.md#CA_SV_CS0_SPOIL) are the trimming values that are applied to these control surfaces if the flaps or the spoilers are fully deployed, respectively.
|
||||
|
||||

|
||||
|
||||
<!-- The drawing is on draw.io: https://drive.google.com/file/d/15AbscUF1kRdWMh8ONcCRu6QBwGbqVGfl/view?usp=sharing
|
||||
Request access from dev team. -->
|
||||
|
||||
A perfectly symmetrical airframe would only require pitch trim increments, but since a real airframe is never perfectly symmetrical, roll and yaw trims increments are also sometimes required.
|
||||
@@ -0,0 +1,135 @@
|
||||
# Advanced TECS Tuning (Weight and Altitude)
|
||||
|
||||
This topic shows how you can compensate for changes to the [weight of the vehicle](#vehicle-weight-compensation) and the [air density](#air-density-compensation), along with information about the [algorithms](#weight-and-density-compensation-algorithms) that are used.
|
||||
|
||||
:::warning
|
||||
This topic requires that you have already performed [basic TECS tuning](../config_fw/position_tuning_guide_fixedwing.md#tecs-tuning-altitude-and-airspeed).
|
||||
:::
|
||||
|
||||
[Basic TECS tuning](../config_fw/position_tuning_guide_fixedwing.md#tecs-tuning-altitude-and-airspeed) established the key performance limitations of the vehicle that are required for the altitude and airspeed controller to function properly.
|
||||
|
||||
While those limitations are specified using constant parameters, in reality vehicle performance is not constant and is affected by various factors.
|
||||
If changes in weight and air density are not taken into account, altitude and airspeed tracking will likely deteriorate in the case where the configuration (air density and weight) deviate significantly from the configuration at which the vehicle was tuned.
|
||||
|
||||
## Vehicle Weight Compensation
|
||||
|
||||
Set (both) the following parameters to scale the maximum climb rate, minimum sink rate, and adjust airspeed limits for weight:
|
||||
|
||||
- [WEIGHT_BASE](../advanced_config/parameter_reference.md#WEIGHT_BASE) — the weight of the vehicle at which the [Basic TECS tuning](../config_fw/position_tuning_guide_fixedwing.md#tecs-tuning-altitude-and-airspeed) was performed.
|
||||
- [WEIGHT_GROSS](../advanced_config/parameter_reference.md#WEIGHT_BASE) — the actual weight of the vehicle at any given time, for example when using a larger battery, or with a payload that was not present during tuning.
|
||||
|
||||
You can determine the values by measuring the weight of the vehicle using a scale in the tuning configuration and when flying with a payload.
|
||||
|
||||
Scaling is performed when _both_ `WEIGHT_BASE` and `WEIGHT_GROSS` are greater than `0`, and will have no effect if the values are the same.
|
||||
See the [algorithms](#weight-and-density-compensation-algorithms) section below for more information.
|
||||
|
||||
## Air Density Compensation
|
||||
|
||||
### Specify a Service Ceiling
|
||||
|
||||
In PX4 the service ceiling [FW_SERVICE_CEIL](../advanced_config/parameter_reference.md#FW_SERVICE_CEIL) specifies the altitude in standard atmospheric conditions at which the vehicle is still able to achieve a maximum climb rate of 0.5 m/s at maximum throttle and weight equal to [WEIGHT_BASE](../advanced_config/parameter_reference.md#WEIGHT_BASE).
|
||||
By default this parameter is disabled and no compensation will take place.
|
||||
|
||||
This parameter needs to be determined experimentally.
|
||||
It is always better to set a conservative value (lower value) than an optimistic value.
|
||||
|
||||
### Apply Density Correction to Minimum Sink Rate
|
||||
|
||||
The minimum sink rate is set in [FW_T_SINK_MIN](../advanced_config/parameter_reference.md#FW_T_SINK_MIN).
|
||||
|
||||
If the [Basic TECS tuning](../config_fw/position_tuning_guide_fixedwing.md#tecs-tuning-altitude-and-airspeed) was not done in standard sea level conditions then the [FW_T_SINK_MIN](../advanced_config/parameter_reference.md#FW_T_SINK_MIN) parameter must be modified by multiplying with correction factor $P$ (where $\rho$ is the air density during tuning):
|
||||
|
||||
$$P = \sqrt{\rho\over{\rho_{sealevel}}}$$
|
||||
|
||||
For more information see [Effect of Density on minimum sink rate](#effect-of-density-on-minimum-sink-rate).
|
||||
|
||||
### Apply Density Correction to Trim Throttle
|
||||
|
||||
The trim throttle is set using [FW_THR_TRIM](../advanced_config/parameter_reference.md#FW_THR_TRIM).
|
||||
|
||||
If basic tuning was not done in standard sealevel conditions then the value for [FW_THR_TRIM](../advanced_config/parameter_reference.md#FW_THR_TRIM) must be modified by multiplying with correction factor $P$:
|
||||
|
||||
$$P = \sqrt{\rho\over{\rho_{sealevel}}}$$
|
||||
|
||||
For more information see [Effect of Density on Trim Throttle](#effect-of-density-on-trim-throttle)
|
||||
|
||||
## Weight and Density Compensation Algorithms
|
||||
|
||||
This section contains information about the scaling operations performed by PX4.
|
||||
This is provided for interest only, and may be of interest to developers who want to modify the scaling code.
|
||||
|
||||
### 符号
|
||||
|
||||
In the following sections we will use the notation $\hat X$ to specify that this value is a calibrated value of the variable $X$.
|
||||
By calibrated we mean the value of that variable measured at sea level in standard atmospheric conditions, and when vehicle weight was equal to [WEIGHT_BASE](../advanced_config/parameter_reference.md#WEIGHT_BASE).
|
||||
|
||||
E.g. by $\hat{\dot{h}}_{max}$ we specify the maximum climb rate the vehicle can achieve at [WEIGHT_BASE](../advanced_config/parameter_reference.md#WEIGHT_BASE) at sea level in standard atmospheric conditions.
|
||||
|
||||
### Effect of Weight on Maximum Climb Rate
|
||||
|
||||
The maximum climb rate ([FW_T_CLMB_MAX](../advanced_config/parameter_reference.md#FW_T_CLMB_MAX)) is scaled as a function of the weight ratio.
|
||||
|
||||
From the steady state equations of motions of an airplane we find that the maximum climb rate can be written as:
|
||||
|
||||
$$\dot{h}_{max} = { V * ( Thrust - Drag ) \over{m*g}}$$
|
||||
|
||||
where `V` is the true airspeed and `m` is the vehicle mass.
|
||||
From this equation we see that the maximum climb rates scales with vehicle mass.
|
||||
|
||||
### Effect of Weight on Minimum Sink Rate
|
||||
|
||||
The minimum sink rate ([FW_T_SINK_MIN](../advanced_config/parameter_reference.md#FW_T_SINK_MIN)) is scaled as a function of weight ratio
|
||||
|
||||
The minimum sink rate can be written as:
|
||||
|
||||
$$\dot{h}_{min} = \sqrt{2mg\over{\rho S}} f(C_L, C_D)$$
|
||||
|
||||
where $\rho$ is the air density, S is the wing surface reference area and $f(C_L, C_D)$ is a function of the polars, lift and drag.
|
||||
|
||||
From this equation we see that the minimum sink rate scales with the square root of the weight ratio.
|
||||
|
||||
### Effect of Weight on Airspeed Limits
|
||||
|
||||
The minimum airspeed ([FW_AIRSPD_MIN](../advanced_config/parameter_reference.md#FW_AIRSPD_MIN)), the stall airspeed ([FW_AIRSPD_STALL](../advanced_config/parameter_reference.md#FW_AIRSPD_STALL)) and trim airspeed ([FW_AIRSPD_TRIM](../advanced_config/parameter_reference.md#FW_AIRSPD_TRIM)) are adjusted based on the weight ratio specified by [WEIGHT_BASE](../advanced_config/parameter_reference.md#WEIGHT_BASE) and [WEIGHT_GROSS](../advanced_config/parameter_reference.md#WEIGHT_GROSS).
|
||||
|
||||
In steady state flight we can demand that lift should equal weight of the vehicle:
|
||||
|
||||
$$Lift = mg = {1\over{2}} \rho V^2 S C_L$$
|
||||
|
||||
rearranging this equation for airspeed gives:
|
||||
|
||||
$$V = \\sqrt{\\frac{2mg}{\\rho S C_D }}$$
|
||||
|
||||
From this equation we see that if we assume a constant angle of attack (which we generally desire), the vehicle weight affects airspeed with a square root relation.
|
||||
Therefore, the airspeed limits mentioned above are all scaled using the square root of the weight ratio.
|
||||
|
||||
### Effect of Density on Maximum Climb Rate
|
||||
|
||||
The maximum climb rate is set using [FW_T_CLMB_MAX](../advanced_config/parameter_reference.md#FW_T_CLMB_MAX).
|
||||
|
||||
As we have seen previously, the maximum climb rate can be formulated as:
|
||||
|
||||
$$\dot{h}_{max} = { V * ( Thrust - Drag ) \over{m*g}}$$
|
||||
|
||||
The air density affects the airspeed, the thrust and the drag and modelling this effects is not straight forward.
|
||||
However, we can refer to literature and experience, which suggest that for a propeller airplane the maximum climb rate reduces approximately linear with the air density.
|
||||
Therefore, we can write the maximum climb rate as:
|
||||
|
||||
$$\dot{h}_{max} = \hat{\dot{h}} * {\rho_{sealevel} \over{\rho}} K$$
|
||||
|
||||
where $\rho_{sealevel}$ is the air density at sea level in the standard atmosphere and K is a scaling factor which determines the slope of the function.
|
||||
Rather than trying to identify this constants, the usual practice in aviation is to specify a service ceiling altitude at which the vehicle is still able to achieve a minimum specified climb rate.
|
||||
|
||||
### Effect of Density on Minimum Sink Rate
|
||||
|
||||
The minimum sink rate is set using [FW_T_SINK_MIN](../advanced_config/parameter_reference.md#FW_T_SINK_MIN).
|
||||
|
||||
In previous sections we have seen the formula for the minimum sink rate:
|
||||
|
||||
$$\dot{h}_{min} = \sqrt{2mg\over{\rho S}} f(C_L, C_D)$$
|
||||
|
||||
This shows that the minimum sink rate scales with the square root of the inverse air density.
|
||||
|
||||
### Effect of Density on Trim Throttle
|
||||
|
||||
TODO: Add derivation here.
|
||||
Reference in New Issue
Block a user