Ardupilot 3.5.0:Quadplane/ardupilot plane 3.5.0垂直起降翻译

来源:互联网 发布:mac os x 10.12下载 编辑:程序博客网 时间:2024/05/02 22:03

======作者信息======

作者:riddle
业余爱好无人机及各种打杂事项,飞控漫谈交流社群&知控制微信公众平台维护,开源公益及合作事宜请联系本人。
联系方式:riddle911(at)foxmail.com

文章转载请注明来源。

===================

2016.8.22注:
1.在博客中添加电调校准、飞行转换、参数设置、固定翼辅助飞行、全自动飞行的内容。
2.整个翻译原文版本是2016年1月前后的了,最近APM作者放话说,关于QuadPlane官方wiki有大的调整,但限于本人下半年精力实在有限,无法再做更新,也不知道官网对quadplane做了什么调整,请读者自行去比对有关更新内容,以免造成不必要损失。


QuadPlane Support

This article explains how to set up and use a combined fixed wing and multicopter aircraft, also known as a “QuadPlane”.

../_images/quadplane_senior_telemaster.jpg

Overview

A QuadPlane is a combined fixed wing and MultiCopter aircraft. This sort of aircraft brings the benefit of vertical takeoff and landing, significantly greater speed and range of travel, and the ability to hover and perform copter-like tasks at the destination (limited by available power).

QuadPlane is built upon Plane, but adds control over between 4 and 8 horizontal rotors. Additional modes and commands allow a QuadPlane to take off, land and fly like a copter, and to smoothly transition between the Plane and Copter-like modes in both automatic and autopilot-assisted modes. The additional rotors can also provide lift and stability in normal Plane modes.

Support for QuadPlane simulation is available in SITL.

Getting the code

QuadPlane support is in APM:Plane releases from 3.5.0 onwards. The normal instructions for installing the Plane firmware apply.

Flight modes

The QuadPlane code is based upon the Plane master firmware but with 3 extra modes:

  • mode 17: QSTABILIZE (like Copter STABILIZE)
  • mode 18: QHOVER (like Copter ALT_HOLD)
  • mode 19: QLOITER (like Copter LOITER)
  • mode 20: QLAND (like Copter LAND)

Tip

You may probably need to set the FLTMODE* parameters for these extra modes as numeric values if your GCS doesn’t understand these values yet.

If you are familiar with the equivalent Copter flight modes then you should be comfortable flying a QuadPlane. The only real difference comes during transition between fixed wing and QuadPlane flight, which is described below.

Note

The landing detection logic in QLOITER mode is not as sophisticated as the landing detection logic in Copter, so if you get GPS movement while on the ground in QLOITER mode then the aircraft may try to tip over as it tries to hold position while in contact with the ground. It is suggested that you switch to QHOVER or QSTABILIZE once landed as these are unaffected by GPS movement.

Flight modes to avoid

The linked nature of of the vertical lift and fixed wing control in quadplanes means the autopilot always needs to know what the pilot is trying to do in terms of speed and attitude. For this reason you should avoid the following flight modes in a quadplane:

  • ACRO
  • STABILIZE
  • TRAINING

these modes are problematic as the stick input from the pilot is not sufficient to tell the autopilot what attitude the aircraft wants or what climb rate is wanted, so the quadplane logic does not engage the quad motors when in these modes. These modes also make log analysis difficult. Please use FBWA mode instead of STABILIZE for manual flight.

In the future we may adds ways to use the quad motors in these modes, but for now please avoid them.

The other mode where the quad motors are disabled is MANUAL mode. That mode still can be useful for checking aircraft trim in fixed wing flight, but make sure you only enter MANUAL mode once you have plenty of airspeed.

Frame setup

The code supports several frame arrangements of quadcopter, hexacopter, octacopter and octaquad multicopter frames.

The motor order and output channel is the same as for copter (see Copter motor layout) except that the output channel numbers start at 5 instead of 1.

For example, with the default Quad-X frame the motors are on outputs 5 to 8. The arrangement is:

  • Channel 5: Front right motor, counter-clockwise
  • Channel 6: Rear left motor, counter-clockwise
  • Channel 7: Front left motor, clockwise
  • Channel 8: Rear right motor, clockwise

You can remember the clockwise/counter-clockwise rule by “motors turn in towards the fuselage”.

Another common setup is an octa-quad, which uses the following ordering

  • Channel 5: Front right top motor, counter-clockwise
  • Channel 6: Front left top motor, clockwise
  • Channel 7: Rear left top motor, counter-clockwise
  • Channel 8: Rear right top motor, clockwise
  • Channel 9: Front left bottom motor, counter-clockwise
  • Channel 10: Front right bottom motor, clockwise
  • Channel 11: Rear right bottom motor, counter-clockwise
  • Channel 12: Rear left bottom motor, clockwise

You can remember the clockwise/counter-clockwise rule for an octa-quad by “top motors turn in towards the fuselage, bottom motors turn out away from the fuselage”.

The normal plane outputs are assumed to be on 1 to 4 as usual. Only vertical lift outputs (5 to 8 on a quad setup) run at high PWM rate (400Hz). In a quad setup you can also use channels 9 to 14 in any way you like, just as with the normal Plane code.

You can optionally move the quad motors to be on any other channel above 4, using the procedure outlined below.

To use a different frame type you can set Q_FRAME_CLASS and Q_FRAME_TYPE. Q_FRAME_CLASS can be:

  • 0 for quad
  • 1 for hexa
  • 2 for octa
  • 3 for octaquad

Within each of these frame classes the Q_FRAME_TYPE chooses the motor layout

  • 0 for plus frame
  • 1 for X frame
  • 2 for V frame
  • 3 for H frame

Using different channel mappings

You can remap what output channels the quad motors are on by setting values for RCn_FUNCTION. This follows the same approach as other output functions.

Note

Note that you do not need to set any of the RCn_FUNCTION values unless you have a non-standard motor ordering. It is highly recommended that you use the standard ordering and do not set the RCn_FUNCTION parameters, leaving them at zero. They will be automatically set to the right values for your frame on boot.

The output function numbers are:

  • 33: motor1
  • 34: motor2
  • 35: motor3
  • 36: motor4
  • 37: motor5
  • 38: motor6
  • 39: motor7
  • 40: motor8

So to put your quad motors on outputs 9 to 12 (the auxillary channels on a Pixhawk) you would use these settings in the advanced parameter list:

  • RC9_FUNCTION = 33
  • RC10_FUNCTION = 34
  • RC11_FUNCTION = 35
  • RC12_FUNCTION = 36

ESC calibration

Most models of PWM based ESC need to be calibrated to ensure that all the ESCs respond to the same input with the same speed. To calibrate them they need to receive maximum PWM input when initially powered on, then receive minimum PWM input when they have beeped to indicate that the maximum has registered.

The quadplane code doesn’t have a dedicated ESC calibration feature yet, but you can use the following procedure to calibrate until that is available:

  1. remove your propellers for safety
  2. power up just the flight board and not your motors. If you don’t have the ability to isolate power to the ESCs when on battery power then power up your flight board on USB power
  3. set both the parameters Q_M_SPIN_ARMED and Q_THR_MID to 1000. This sets the PWM output when armed at zero throttle to full power
  4. set the safety switch off to activate the outputs
  5. arm your aircraft. The PWM output on all quad motors will now climb to maximum.
  6. add power to your ESCs by connecting the battery
  7. wait for the ESCs to beep to indicate they have registered the maximum PWM
  8. disarm your aircraft. The ESCs should beep again indicating they have registered minimum PWM

Now set the Q_M_SPIN_ARMED and Q_THR_MID parameters back to the correct values. A value of 50 for Q_M_SPIN_ARMED is a reasonable starting point. For Q_THR_MID a value of between 500 and 600 is good depending on the power of your motors

Transition

You can transition between any modes, fixed wing or QuadPlane just by changing mode. The transition rules are:

  • If you transition to MANUAL then the quad motors will immediately stop.
  • If you transition to any other fixed wing mode then the quad will continue to supply lift and stability until you have reached the ARSPD_FBW_MIN airspeed (or airspeed estimate if no airspeed sensor).
  • Once that airspeed is reached the quad motors will slowly drop in power over Q_TRANSITION_MS milliseconds (default is 5000, so 5 seconds) and will switch off after that

If you transition from a fixed wing mode to a QuadPlane mode then the fixed wing motor will immediately stop, but the control surfaces will continue to provide stability while the plane slows down. This allows for transitions to QuadPlane modes while flying at high speed.

Note

If you transition to QLOITER while flying at high speed then the loiter code will try to bring the aircraft to a very rapid stop which will cause the plane to pitch up hard and then fly backwards to get back to the point where QLOITER was entered. Unless you are sure of the strength of your airframe it would be a good idea to transition to QHOVER first which will result in a much gentler transition, then move to QLOITER once the aircraft has slowed down.

Parameter setup

All QuadPlane specific parameters start with a “Q_” prefix. The parameters are very similar to the equivalent Copter parameters so if you are familiar with those you should find setting up a QuadPlane is easy.

Key parameters are:

  • To enable QuadPlane functionality you need to set the Q_ENABLE parameter to 1 and then refresh the parameter list
  • The Q_THR_MIN_PWM and Q_THR_MAX_PWM parameters used to set the PWM range of the quad motors (this allows them to be different from the range for the forward motor). These need to be set to the range your ESCs expect.
  • You should set SCHED_LOOP_RATE to 300 so the code runs the main loop at 300Hz, which is a good rate for both fixed wing and quadplane VTOL.
  • The most critical tuning parameters are Q_RT_RLL_P and Q_RT_PIT_P. These default to 0.15 (same as Copter) but you may find significantly higher values are needed for a QuadPlane.
  • The Q_M_SPIN_ARMED parameter is important for getting the right level of motor output when armed in a quad mode
  • It is recommended that you set ARMING_RUDDER to 2 to allow for rudder disarm. Alternatively you could have MANUAL as one of your available flight modes (as that will shut down the quad motors). Please be careful not to use hard left rudder and zero throttle while flying or you risk disarming your motors.
  • The Q_THR_MID parameter is important for smooth transitions. It defaults to 500 which means 50% throttle for hover. If your aircraft needs more or less than 50% throttle to hover then please adjust this. That will prevent a throttle surge during transition as the altitude controller learns the right throttle level

Note

The QuadPlane code requires GPS lock for proper operation. This is inherited from the plane code, which disables intertial estimation of attitude and position if GPS lock is not available. Do not try to fly a QuadPlane indoors. It will not fly well

Assisted fixed-wing flight

The QuadPlane code can also be configured to provide assistance to the fixed wing code in any flight mode except MANUAL. To enable quad assistance you should set Q_ASSIST_SPEED parameter to the airspeed below which you want assistance.

When Q_ASSIST_SPEED is non-zero then the quad motors will assist with both stability and lift whenever the airspeed drops below that threshold. This can be used to allow flying at very low speeds in FBWA mode for example, or for assisted automatic fixed wing takeoffs.

It is suggested that you do initial flights with Q_ASSIST_SPEED=0 just to test the basic functionality and tune the airframe. Then try with Q_ASSIST_SPEED above plane stall speed if you want that functionality.

What assistance the quad motors provides depends on the fixed wing flight mode. If you are flying in an autonomous or semi-autonomous mode then the quad motors will try to assist with whatever climb rate and turn rate the autonomous flight mode wants. In a manually navigated mode the quad will try to provide assistance that fits with the pilot inputs.

The specific handling is:

  • In AUTO mode the quad will provide lift to get to the altitude of the next waypoint, and will help turn the aircraft at the rate the navigation controller is demanding.
  • In fixed wing LOITER, RTL or GUIDED modes the quad motors will try to assist with whatever climb rate and turn rate the navigation controller is asking for.
  • In CRUISE or FBWB mode the quad will provide lift according to the pilots demanded climb rate (controlled with pitch stick). The quad motors will try to turn at the pilot demanded turn rate (combining aileron and rudder input).
  • In FBWA mode the quad will assume that pitch stick input is proportional to the climb rate the user wants. So if the user pulls back on the pitch stick the quad motors will try to climb, and if the user pushes forward on the pitch stick the quad motors will try to provide a stable descent.
  • In AUTOTUNE mode the quad will provide the same assistance as in FBWA, but it is not a good idea to use AUTOTUNE mode with a high value of Q_ASSIST_SPEED as the quad assistance will interfere with the learning of the fixed wing gains.
  • In MANUAL, ACRO and TRAINING modes the quad motors will completely turn off. In those modes the aircraft will fly purely as a fixed wing.
  • In STABILIZE mode the quad motors will try to provide lift if assistance is turned on.

Autonomous flight

You can also ask the QuadPlane code to fly AUTO missions. To do that you plan an AUTO mission as usual and send a DO_VTOL_TRANSITION with parameter 1 equal to 3 to ask the aircraft to switch to VTOL mode while flying the mission. When you do that the fixed wing motor will stop and the aircraft will continue the mission as a quadcopter. You can then send a DO_VTOL_TRANSITION with parameter 1 equal to 4 to switch back to fixed wing flight.

The smooth transition rules apply to transitions in AUTO mode as they do for other modes, plus quad assistance applies in auto fixed-wing mode if Q_ASSIST_SPEED is enabled.

In addition to DO_VTOL_TRANSITION the QuadPlane code supports two new mission commands:

  • NAV_VTOL_TAKEOFF
  • NAV_VTOL_LAND

These mission commands can be used as part of a full auto mission to give a vertical takeoff, followed by smooth transition to auto fixed wing flight and then a vertical landing.

What will happen?

Understanding hybrid aircraft can be difficult at first, so below are some scenarios and how the ArduPilot code will handle them.

I am hovering in QHOVER and switch to FBWA mode

The aircraft will continue to hover, waiting for pilot input. If you take your hands off the sticks at zero throttle the aircraft will continue to hold the current height and hold itself level. It will drift with the wind as it is not doing position hold.

If you advance the throttle stick then the forward motor will start and the aircraft will start to move forward. The quad motors will continue to provide both lift and stability while the aircraft is moving slowly. You can control the attitude of the aircraft with roll and pitch stick input. When you use the pitch stick (elevator) that will affect the climb rate of the quad motors. If you pull back on the elevator the quad motors will assist with the aircraft climb. If you push forward on the pitch stick the power to the quad motors will decrease and the aircraft will descend.

The roll and pitch input also controls the attitude of the aircraft, so a right roll at low speed will cause the aircraft to move to the right. It will also cause the aircraft to yaw to the right (as the QuadPlane code interprets right aileron in fixed wing mode as a commanded turn).

Once the aircraft reaches an airspeed of ARSPD_FBW_MIN (or Q_ASSIST_SPEED if that is set and is greater than ARSPD_FBW_MIN) the amount of assistance the quad motors provide will decrease over 5 seconds. After that time the aircraft will be flying purely as a fixed wing.

I am flying fast in FBWA mode and switch to QHOVER mode

The quad motors will immediately engage and will start by holding the aircraft at the current height. The climb/descent rate is now set by the throttle stick, with a higher throttle stick meaning climb and a lower throttle stick meaning descend. At mid-stick the aircraft will hold altitude.

The forward motor will stop, but the aircraft will continue to move forward due to its momentum. The drag of the air will slowly bring it to a stop. The attitude of the aircraft can be controlled with roll and pitch sticks (aileron and elevator). You can yaw the aircraft with rudder.

I am flying fast in FBWA mode and switch to QLOITER mode

The quad motors will immediately engage and the aircraft will pitch up hard, as it tries to hold position at the position it was in when you switched to QLOITER mode.

The aircraft will stop very quickly, and will back up slightly to the position where QLOITER was entered. The movement of the aircraft can be controlled with roll and pitch sticks (aileron and elevator). You can yaw the aircraft with rudder.

The climb/descent rate is now set by the throttle stick, with a higher throttle stick meaning climb and a lower throttle stick meaning descend. At mid-stick the aircraft will hold altitude.

I switch to RTL mode while hovering

The aircraft will transition to fixed wing flight. The quad motors will provide assistance with lift and attitude while the forward motor starts to pull the aircraft forward.

The normal Plane RTL flight plan will then be run, which defaults to circling at the RTL altitude above the arming position or nearest rally point. If you have RTL_AUTOLAND setup then the aircraft will do a fixed wing landing.

When the aircraft is close to home you could switch it to QHOVER or QLOITER to land vertically.

Typical flight

A typical test flight would be:

  • takeoff in QLOITER or QHOVER
  • switch to FBWA mode and advance throttle to start flying fixed wing
  • switch to QHOVER mode to go back to quad mode.

Simulation

A simple QuadPlane model is available in SITL, allowing you to test the features of the QuadPlane code without risking a real aircraft.

You can start it like this:

sim_vehicle.sh -j4 -f quadplane --console --map

A parameter file to setup your QuadPlane is in Tools/autotest:

param load ../Tools/autotest/quadplane.parm

To visualise the aircraft you can use FlightGear in view-only mode. The simulation will output FlightGear compatible state on UDP port 5503. Start FlightGear using the fg_plane_view.sh scripts provided in the Tools/autotest directory.

Note that to get good scenery for FlightGear it is best to use a major airport. I tend to test at San Francisco airport, like this:

sim_vehicle.sh -L KSFO -f quadplane --console --map

Using the joystick module with a USB adapter for your transmitter gives a convenient way to get used to the QuadPlane controls before flying.

If flying at KSFO there is a sample mission available with VTOL takeoff and landing:

wp load ../Tools/autotest/ArduPlane-Missions/KSFO-VTOL.txt

As usual you can edit the mission using “module load misseditor”

Building a QuadPlane

Putting together a QuadPlane can be a daunting task. To help with ideas, here are some links to some build logs that provide useful hints:

  • Porter OctaQuadPlane build: http://diydrones.com/profiles/blogs/building-flying-and-not-crashing-a-large-octaquadplane
  • Porter QuadPlane build: http://diydrones.com/profiles/blogs/building-flying-and-crashing-a-large-quadplane
  • QuadRanger build: http://px4.io/docs/quadranger-vtol/
===================================分割线======================
2016.5.25更新一部分汉化
这篇文章介绍了如何组装、使用结合了固定翼与多旋翼的飞行器,也可以称为“四轴固定翼”。(译者按:quadplane字面翻译为四轴固定翼,但按其飞行特性以及翻译需要,并参照成都纵横相关机型命名,下文译作复合翼飞机)

概述

复合翼飞机将多旋翼与固定翼结合在一起,这种飞机在可以垂直起降的同时又兼有着长航时、长航距;同时也可以像多轴飞机一样在目标地点完成悬停任务(悬停取决于剩余动力)。

复合翼飞机是在固定翼飞机基础上,添加了4个或8个水平面的电机。附带的飞行模式和指令可以让复合翼飞机像多轴一样起降、飞行,也可以自动或半自动的完成在多轴与固定翼飞行模式之间的平滑转换。附加的电机也可在平飞模式中增加飞机的升力并保持其稳定。

SITL中支持对复合翼飞机的模拟。

获取程序

ardupilot plane 3.5.0版本中开始支持复合翼飞机,按照正常步骤安装固件即可。

飞行模式

TheQuadPlane code is based upon the Plane master firmware but with 3 extra modes:复合翼飞机的程序以Plane为基础,但是多了以下4种模式:

·        模式17QSTABILIZE,如同多轴的自稳模式

·        模式 18: QHOVER,类似多轴的定高模式

·        模式 19: QLOITER类似多轴的GPS模式

·        模式 20: QLAND,类似多轴的降落模式

Tip

如果你使用的地面站还无法识别以上的飞行模式的参数,则需要你在 FLTMODE* 参数中自行设置另外的数值。

如果你熟悉多轴的飞行模式,那么也会轻松飞行复合翼飞机。惟一真正的差别在于固定翼和多轴模式之间的转换,下面详细说明。

Note

QLOITER模式的降落检测逻辑没有多轴的检测逻辑复杂,所以如果飞机在地面上这时又发生了GPS的位移,那么飞机会为了保持定点而进行姿态调整这时与地面的接触就会发生侧翻等情况。建议你在降落后立即切换到QHOVER(定高)或者QSTABLIZE(自稳)模式,因为这两种飞行模式不受GPS位移影响。

避免使用的飞行模式

从复合翼飞机的垂起与固定翼控制特征来讲,依据飞行的速度与姿态,自驾仪需要时刻了解驾驶员的操作意图,所以你要避免使用以下三种飞行模式。

·        ACRO(特技)

·        STABILIZE(自稳)

·        TRAINING  (练习)

这些飞行模式的问题在于,通过遥控器摇杆的指令输入,自驾仪并无法充分的辅助飞行,比如飞机需要什么样的姿态,飞机需要多大的爬升速率等。所以在以上这些模式中,复合翼飞机的飞行机制中多轴电机是无法工作的。这些飞行模式也使得分析飞行日志更困难。所以在人工飞行中,请使用FBWA(线性增稳)模式而不是使用Stabilize模式。

以后我们会在这些模式中加入控制多轴电机的功能,但现实现在还是请不要使用这些模式。

MAUAL(手动)模式中多轴电机也是不可用的。在飞行中这个模式对于固定翼的调机仍然有用,但需要注意切换MANUAL模式前飞机要有足够的空速。

装机

本固件的复合翼飞机支持四轴、六轴、八轴以及X8模式的多轴飞机。电机的安装顺序和飞控接口与多轴一样(参见Coptermotor layout),只不过电机接口从5号开始而不是1号。

比如,对于常规的X型四轴机型,电机连接第5~8接口,安装顺序如下:

·        Channel5: 右前电机,逆时针

·        Channel6: 左后电机,逆时针

·        Channel7: 左前电机,顺时针

·        Channel8: 右后电机,顺时针

你可以这样来记电机的顺序:电机都是朝着机身内侧方向旋转。

另一种常见的布置是X8模式,按照以下顺序安装:

(译者注:对于Pixhawk来说,分别为MAIN1~8接口与AUX1~6接口,以下所说的CH9~14即为AUX1~6接口)                                                                        

·        Channel5: 右前、上电机,逆时针

·        Channel6: 左前、上电机,顺时针

·        Channel7: 左后、上电机,逆时针

·        Channel8: 右后、上电机,顺时针

·        Channel9: 左前、下电机,逆时针

·        Channel10: 右前、下电机,顺时针

·        Channel11: 右后、下电机,逆时针

·        Channel12: 左后、下电机,顺时针

你可以这样来记忆X8电机的顺序:上面的电机朝着机身内侧方向旋转,下面的电机朝着机身外侧方向旋转。

正常固定翼的舵机连接1~4接口。多轴电机接5~8接口。多轴电机是接在高速PWM接口(400Hz)。In a quad setup you can also use channels 9to 14 in any way you like, just as with the normal Plane code.

按照以下步骤操作,你也可以将多轴电机接在其他接口上

使用其他机型,修改Q_FRAME_CLASS Q_FRAME_TYPE参数。 Q_FRAME_CLASS分别可以赋以下四种值:

·        0代表四轴

·        1代表六轴

·        2代表八轴

·        3代表X8

对于每一种机型,可以选择以下电机布局:

Q_FRAME_TYPE分别有四种值:

·        0代表十字形

·        1代表X

·        2代表 V型机架

·        3代表H型机架

使用不同的接口定义

通过设置RCn_FUNCTIOND的值,你可以自定义多轴电机的接口。设置与other output functions一样。

Note

需要注意的是除非你使用非标准的电机顺序,就无需改动RCn_FUNCTION的参数。强烈推荐你使用标准的机型,不要改动参数,默认都设置为0,启动时他们会自动变为正确的参数。

·        33: motor1

·        34: motor2

·        35: motor3

·        36: motor4

·        37: motor5

·        38: motor6

·        39: motor7

·        40: motor8

·        所以假如你要将9~12接口(即pixhawkaux1~4接口)改为四轴的1~4号电机,那么可以按照如下设置:

·        RC9_FUNCTION= 33

·        RC10_FUNCTION= 34

·        RC11_FUNCTION= 35

·        RC12_FUNCTION= 36

电调校准                             

大部分基于PWM控制的电调都需要校准来保证所有电调对于输入输出都是一致的。电调校准方法:油门推到最大,上电,滴滴两声响,油门拉到最低,滴——完成校准。

复合翼飞机还没有专门用来校准电调的方法,在此之前你可以使用以下的方法校准电调。

1.   首先拆下螺旋桨

2.   只对自驾仪上电(电机不要供电)。如果无法隔离电调供电,那么就给飞控通过USB供电

3.   设置Q_M_SPIN_ARMED Q_THR_MID参数值为1000,意思是当解锁时油门从零输出到满油门

4.   屏蔽安全开关

5.   解锁飞控,飞控输出油门值会达到最大值

6.   用电池给电调供电

7.   等待电调滴滴叫表示已接收最大油门值

8.   给飞控上锁,这时电调应该会再滴一下表示已经接收到最小油门值

现在把Q_M_SPIN_ARMEDQ_THR_MID 的参数改为正确的值,

Q_M_SPIN_ARMED50作为初始值

Q_THR_MID:根据你电机动力,选择500600之间的值

飞行转换

固定翼和多轴两种模式之间都可以转换。转换规则如下

·        如果你转换为手动模式( MANUAL ,多轴电机会立即停转。

·        如果你转换到固定翼的某种模式,在飞机达到 ARSPD_FBW_MINI(没有空速计就以估算值为准)所设定的最小空速之前,多轴电机仍然提供升力

·        当空速达到设定值,多轴电机会在Q_TRANSITION_MS设定的时间内 (默认值是 5000ms,5s) 降低转速并停转

如果你从固定翼状态下转换到多轴状态,固定翼的电机会立即停转,但是在飞机减速以前,舵面还会继续保持飞机的平衡。这个机制保证了高速飞行状态下转入多轴模式。

Note

如果你在高速飞行状态下转到QLOITER模式,这时由于QLOITER的机制会导致飞机急停,导致飞机pitch up hard 并飞回到进入QLOITER模式的位置。除非你确定飞机机身的强度,否则就先切换到QHOVER模式,这是一个转换时非常柔和的模式,然后当飞机减速后再次进入QLOITER模式。

参数设置

复合翼飞机的所有特定参数都以”Q_”开头,这些参数与多轴中的参数比较类似,如果你对多轴的参数很熟悉,那么在这里的参数设置会很容易上手。

关键参数:

·        若要启用复合翼模式,需要设置Q_ENABLE1,之后写入并刷新参数

·        Q_THR_MIN_PWMQ_THR_MAX_PWM这两个参数规定了多轴电机PWM值的范围(为了与前拉电机的PWM值区分)。这两个参数需要按照电调来设置。(These need to be set to the range your ESCs expect.

·        设置SCHED_LOOP_RATE 300,这样程序就会以300Hz来运行main loop,这个速率很适合固定翼和复合翼飞机。

·        最关键的调整参数是Q_RT_RLL_PQ_RT_PIT_P,他们的默认设置为0.15(对于多轴也是如此),但是你会发现,对于复合翼来说,这两个参数值要明显的高一些。

·        Q_M_SPIN_ARMED这个参数可以调整解锁后电机转速(即多轴解锁怠速选项)

·        ARMING_RUDDER:推荐将此参数设为2,就可以使用方向舵进行加锁。(没理解……)或者你可以将MANUAL设置为其中一种飞行模式(在这个模式下将关闭多轴电机)。飞行的时候注意not to use hard left rudder and zerothrottle,否则电机会加锁。

·        Q_THR_MID这个参数对飞行转换的顺滑很重要。默认参数是500,意味着50%的油门用来盘旋(定高),如果你的飞机需要不同的油门则可以调整高度控制系统会学习正确的油门输出,这样会防止转换过程中油门的激增。

Note

复合翼飞机的程序要求GPS定位良好的情况下才能运行,这是从Plane的代码中传承过来的,即如果没有定位的情况下会屏蔽姿态和位置的惯性估计。所以在室内,复合翼飞机是无法起飞的。

固定翼辅助飞行

QuadPlane的程序还支持对固定翼的飞行辅助(MANUAL模式不可)。通过设置Q_ASSIST_SPEED为一定的速度,在低于此空速下,多轴电机会参与到固定翼的平飞过程中。

Q_ASSIST_SPEED不为零时,如果空速低于此值,那么多轴电机就会保持飞机的稳定与升力,参与飞行当中。这一设定可以允许飞机在 FBWA模式下以较低速度飞行或辅助固定翼的自动起飞。

建议在初次飞行中设置Q_ASSIST_SPEED=0,来调试飞机。之后如果想开启此功能,则设置Q_ASSIST_SPEED为大于飞机的失速速度。

至于多轴电机怎样辅助固定翼飞行取决于飞行模式,如果你在全自动、或半自动飞行模式,则多轴电机会辅助飞机达到飞控要求的爬升速率以及转弯速率。在人工导航模式下,多轴电机配合遥控输入来飞行。

特别注意事项:

·        AUTO模式下,多轴会提供升力使飞机达到足够高度来达到下一个航点,并辅助飞机达到航向控制器要求的转弯速率。

·        在固定翼的LOITERRTL或者GUIDED模式,多轴电机会辅助飞机达到航向控制器要求的爬升速率以及转弯速率。

·        CRUISEFBWB模式下,多轴电机会提供升力达到驾驶员的要求的爬升速率(pitch摇杆的输入);同样根据驾驶员的要求进行转向达到转弯速率(结合副翼与方向舵的输入)

·        FBWA模式下,多轴会假定pitch摇杆的输入与用户想要的爬升速率成一定比例,即“拉杆”多轴会使得飞机抬头,“顶杆”多轴会使得飞机低头。

·        AUTOTUNE模式下,多轴电机的辅助飞行与FBWA一样,但是在Q_ASSIST_SPEED设定值高的情况下不推荐使用AUTOTUNE模式,因为多轴的辅助飞行会干扰the learning of the fixed wing gains.

·        MANUAL,ACROTRAINING模式下,多轴电机会彻底关闭,还是像普通固定翼一样飞行。

·        STABILIZE模式下,开启辅助模式,多轴电机会尝试提供升力。

全自动飞行

AUTO模式下,复合翼飞机也可以执行航线任务。按照常规制定航线任务,并对DO_VTOL_TRANSITION参数进行设置(13)使得飞机在任务飞行中切换到VTOL模式。做完以上操作,固定翼电机会停转,飞机会以多轴模式执行航点动作。之后你可以设置DO_VTOL_TRANSITION14)让飞机切换回固定翼模式。

AUTO 及其他模式下,飞行模式的顺滑切换同样适用,若启用Q_ASSIST_SPEED参数设置,多轴电机的辅助飞行中也可以顺滑切换。

除了DO_VTOL_TRANSITION,复合翼飞机还支持以下两种任务命令:

·        NAV_VTOL_TAKEOFF

·        NAV_VTOL_LAND

这两个命令在全自动飞行中作为控制飞机的垂直起降来使用。

会发生什么?

刚开始理解复合翼飞机很困难,下面结合一些飞行场景谈谈ArduPilot的程序是如何解决他们的。
(未完待续)

===================================分割线======================

2016.5.24更新

和一众牛人搞起了飞控的开源社群,目前有一个雏形,通过QQ、微信两个渠道进行交流。






1 0
原创粉丝点击