px4: actuators control, control group 和 mixer科普

2023-05-16

原文链接:https://pixhawk.org/dev/mixing


Control Mixing

This page discusses the general-purpose control mixing architecture in PX4. If you are looking for specific mixer setup instructions, you should go to the Platforms page.

The description of the mixer definition language is in the  source code README file on Github.  Check out the graphical example below as well!

Custom Mixer

Custom mixer files can be put onto the microSD card. This is described in the startup documentation.

Terminology

  • Actuator Control Groups: An actuator control group is a set of 8 outputs which cover one type of actuation, e.g. for the airframe, payload or gimbals. It is emitted by an actuator and the  input to the mixer. Different control groups can be emitted by different processes.
  • Mixers: A mixer is a set of individual scalers / mappers which read from control inputs and write to actuator outputs.
  • Actuator Output Groups: An actuator output group is a set of 1 to 8 outputs which are part of one physical output device, e.g. PX4FMU or PX4IO. It represents the output of the mixer.

Actuator Mixing

Video Example

The mixing architecture is capable to deal with relatively complex airframes, as shown in this video:



Example Mixers and Syntax Explanation

The following image explains the mixing for a wing only elevon configuration (roll and pitch inputs mixed together for 2 elevon servo actuators) The “output channels” (Pixhawk pins) are assigned to the mixer description file based upon the order they appear in the mix's file:

If you wanted to change only the second output, channel-1 (Pixhawk pin 2), you still need an entry for first output, channel-0 (Pixhawk pin 1)

EXAMPLE:  Roll has no mix here, but is needed to have the pitch description be second in the file.

When using the multirotor mixer (R:), it takes the place of the first three output pins mixes. The first mix after an “R:” is pin4.

Output Groups and Rates

Setting a high output rate (>50Hz) can burn analog servos. Due to physical constraints some output channel rates can only be set in conjunction with other channels.

Configuration

The output rates can be configured with this command line app: pwm (Application) or via IOCTLs (please refer to the source code of the app for examples on how to use the IOCTL interface).

Output Rates

The default output rate in the RC industry is 50 Hz, which normal analog servos sustain well. Digital servos can accept higher rates. The recommended output rate for multicopter ESCs is 400 Hz, in order to minimise latency (NOT because the outputs would require 400 Hz, as multicopter rotors spin only at 80-120 Hz and can't change speed multiple times during a single revolution, but to actually overcome the input filtering most motor controllers have and to minimize worst-case latency if the attitude control loop is not synchronized to the PWM generation).

Output Groups

The hardware generating the PWM signal is grouped into different timers, and each timer outputs on one or multiple pins. These pins can change their output rate only together. The three groups for IO (MAIN output on Pixhawk) are:

  • channel group 0: channels 1 2
  • channel group 1: channels 5 6 7 8
  • channel group 2: channels 3 4

Attempting to set only a part of the channels of an output group to a different rate will fail, as the whole group has to be set at once

Mixing Details

Terminology

Mixer

A module that combines a set of inputs according to pre-defined rules and parameters to produce a set of outputs.

Scaler

An arithmetic module that adjusts a single input according to parameters to generate a single output.

Input

Inputs are expected to be in the range -1.0 (-10000) to 1.0 (10000) for roll, pitch and yaw, and 0 - 1.0 (10000) for thrust and made available to the mixer by the module or component that owns the mixer. This may be a vehicle control such as 'roll', or any other number.

Output

The result of applying the mixer rules to zero or more inputs.

Mixing Basics

A module invokes a mixer (or mixer group, see below) when it wants to generate a fresh set of outputs; for example, when it is notified that the inputs it has been watching have changed.

The mixer will obtain the inputs it requires, scale and mix them according to the mixer definition, and generate the output set. The module is then free to use the outputs as required; for example to update servo outputs, or to publish the results for other modules to use.

Scaling

Mixer inputs are often scaled in order to adjust the relative significance of each input during the mixing phase. Several different scaling approaches are used, depending on circumstance.

Simple Scaling

The simplest form of scaling simply multiplies the input value by a constant scaling factor. This approach is used when the base value for an input is well-known, or the value is not otherwise required to be adjusted.

Linear Scaling

This scaling technique allows for asymmetrical scaling either side of input zero, as well as biasing the result and clamping the output.

Inputs to this scaler are:

  • negative scale factor
  • positive scale factor
  • offset
  • lower output limit
  • upper output limit

The scaling workflow looks like this:


if (input < 0)
    output = (input * NEGATIVE_SCALE) + OFFSET
else
    output = (input * POSITIVE_SCALE) + OFFSET

if (output < LOWER_LIMIT)
    output = LOWER_LIMIT
if (output > UPPER_LIMIT)
    output = UPPER_LIMIT  

Mixers

The rules that are applied vary from mixer to mixer, with the following mixers being defined:

Simple Mixer

As its name suggests, the simple mixer reads one or more inputs, scales them, sums the scaled values, scales the result and returns a single output.


 input      input     input
   |          |         |
   v          v         v
 scale      scale     scale
   |          |         |
   |          v         |
   +-------> mix <------+
              |
            scale
              |
              v
            output  

Parameters to the simple mixer are:

  • the set of inputs
  • scaling parameters for each input
  • scaling parameters for the output

Both the input and output scaling is performed using linear scalers.

Multirotor Mixer

This mixer is designed for mixing flight controls (roll, pitch, yaw, thrust) to produce motor speed control outputs suitable for multirotor air vehicles.

Parameters to the multirotor mixer (R:) are:

R: <geometry> <roll scale> <pitch scale> <yaw scale> <deadband>

  • the geometry of the vehicle
  • separate roll, pitch and yaw control scaling factors
  • motor output deadband

A variety of vehicle geometries are known to the mixer, including common quad (4X,4+), hex (6X,6+) and octo (8X,8+) and tri (3y)configurations. The mixer can be extended to any configuration that can be expressed using separate roll, pitch and yaw compensation factors for each rotor. In all cases, simple scaling is applied to the inputs.

Ratio Clamping

The output from the multirotor mixer is clamped such that at most one rotor output is saturated, in order to avoid issues rolling heavy vehicles, and the output value is never permitted to fall into the deadband in order to avoid issues with motor re-start whilst in flight.

In addition to that, any clamping respects the ratio of the input, to prevent multi rotors from flipping over. If a motor gets into positive or negative saturation, the overall thrust will be reduced so that the ratio between the individual motors can be satisfied without saturation.

Clamping Example

Input (quadrotor, four motors), Limit is 100:


150 75 75 75  

Resulting clamped output:


100 50 50 50  

Note that motor 1 has still double the speed of motors 2-4, so the resulting attitude will be correct. The vehicle will however not increase altitude (or decrease altitude) compared to the non-clamped motor inputs. If the clamping would just limit motor 1, the vehicle may flip over or become unstable, because the ratio between the motors that defines the collective thrust plane is violated.

Control Groups

Control groups are grouped actuator control positions. These functional groups are centered around core flight control (group 0), auxiliary flight control (group 1), payload (group 2) and manual passthrough (group 3, e.g. for gimbal control).

Control groups 1, 2, and 3 are not sent to the actuators unless there is a change in control group 0. If, for example, aux0 was being used to control the pitch setting of a gimbal motor, the pitch would only change when the flight control motors associated with control group 0 were armed.

Control Group #0 (Flight Control)

  • 0: roll (-1..1)
  • 1: pitch (-1..1)
  • 2: yaw (-1..1)
  • 3: throttle (0..1 normal range, -1..1 for variable pitch / thrust reversers)
  • 4: flaps (-1..1)
  • 5: spoilers (-1..1)
  • 6: airbrakes (-1..1)
  • 7: landing gear (-1..1)

Control Group #1 (Flight Control VTOL/Alternate)

  • 0: roll ALT (-1..1)
  • 1: pitch ALT (-1..1)
  • 2: yaw ALT (-1..1)
  • 3: throttle ALT (0..1 normal range, -1..1 for variable pitch / thrust reversers)
  • 4: reserved / aux0
  • 5: reserved / aux1
  • 6: reserved / aux2
  • 7: reserved / aux3

Control Group #2 (Payload)

  • 0: gimbal roll
  • 1: gimbal pitch
  • 2: gimbal yaw
  • 3: gimbal shutter
  • 4: reserved
  • 5: reserved
  • 6: reserved
  • 7: reserved (parachute, -1..1)

Control Group #3 (Manual Passthrough)

  • 0: RC roll
  • 1: RC pitch
  • 2: RC yaw
  • 3: RC throttle
  • 4: RC mode switch
  • 5: RC aux1
  • 6: RC aux2
  • 7: RC aux3

Virtual Control Groups

These groups are NOT mixer inputs, but serve as meta-channels to feed fixed wing and multicopter controller outputs into the VTOL governor module.

Control Group #4 (Flight Control MC VIRTUAL)

  • 0: roll ALT (-1..1)
  • 1: pitch ALT (-1..1)
  • 2: yaw ALT (-1..1)
  • 3: throttle ALT (0..1 normal range, -1..1 for variable pitch / thrust reversers)
  • 4: reserved / aux0
  • 5: reserved / aux1
  • 6: reserved / aux2
  • 7: reserved / aux3

Control Group #5 (Flight Control FW VIRTUAL)

  • 0: roll ALT (-1..1)
  • 1: pitch ALT (-1..1)
  • 2: yaw ALT (-1..1)
  • 3: throttle ALT (0..1 normal range, -1..1 for variable pitch / thrust reversers)
  • 4: reserved / aux0
  • 5: reserved / aux1
  • 6: reserved / aux2
  • 7: reserved / aux3

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

px4: actuators control, control group 和 mixer科普 的相关文章

  • PX4进入系统控制台以及运行程序

    这里提供进入控制台两种办法 1 运行 Tools mavlink shell py dev ttyACM0 是我进入Px4系统控制台的命令 xff0c 进入之后应该是这样 Pixhawk src Firmware Tools mavlink
  • 无人机仿真—PX4编译,gazebo仿真及简单off board控制模式下无人机起飞

    无人机仿真 PX4编译 xff0c gazebo仿真及简单off board控制模式下无人机起飞 前言 在上篇记录中 xff0c 已经对整体的PX4仿真环境有了一定的了解 xff0c 现如今就要开始对无人机进行起飞等仿真环境工作 xff0c
  • PX4 -- EKF2

    文章目录 EKF2参数高度估计Range Finder滤波 单变量更新单变量更新对多变量的影响 EKF2 参数 EKF2 中有一类 GATE 参数 当测量值在 VAR GATE 范围内才会更新值 高度估计 四种高度控制方法 xff1a 气压
  • PX4模块设计之一:SITL & HITL模拟框架

    PX4模块设计之一 xff1a SITL amp HITL模拟框架 1 模拟框架1 1 SITL模拟框架1 2 HITL模拟框架 2 模拟器类型3 MAVLink API4 总结 基于PX4开源软件框架简明简介的框架设计 xff0c 逐步分
  • PX4模块设计之十一:Built-In框架

    PX4模块设计之十一 xff1a Built In框架 1 Nuttx Built In框架2 PX4 Built In框架2 1 NSH Built In关联文件2 2 NSH Built In关联文件生成2 3 NSH Built In
  • PX4模块设计之十六:Hardfault模块

    PX4模块设计之十六 xff1a Hardfault模块 1 Hardfault模块初始化2 Hardfault模块主程序3 Hardfault命令3 1 hardfault check status3 2 hardfault rearm3
  • px4仿真无法起飞问题(Failsafe enabled: no datalink)

    报错信息 问题描述 xff1a 使用JMAVSim和gazebo仿真px4起飞时报错如下 xff1a WARN commander Failsafe enabled no datalink 说不安全 解决方法 打开QGC 就可以起飞了
  • Px4源码框架结构图

    此篇blog的目的是对px4工程有一个整体认识 xff0c 对各个信号的流向有个了解 xff0c 以及控制算法采用的控制框架 PX4自动驾驶仪软件 可分为三大部分 xff1a 实时操作系统 中间件和飞行控制栈 1 NuttX实时操作系统 提
  • warning: control reaches end of non-void function

    用gcc编译一个程序的时候出现这样的警告 xff1a warning control reaches end of non void function 它的意思是 xff1a 控制到达非void函数的结尾 就是说你的一些本应带有返回值的函数
  • PX4中自定义MAVLink消息(记录)

    简单记录一下这个过程 一 自定义uORB消息 这一步比较简单 xff0c 首先在msg 中新建ca trajectory msg文件 uint64 timestamp time since system start span class t
  • PX4——Range Finder 篇

    Range Finder 此处选用的是 Benewake 下的 Lidar 参数设置 General Configuration 除了官方的参数设置外 xff0c 我在 EKF2 中还找到了 EKF2 RNG AID 参数 xff0c 用来
  • PX4模块设计之二十七:LandDetector模块

    PX4模块设计之二十七 xff1a LandDetector模块 1 LandDetector模块简介2 模块入口函数2 1 主入口land detector main2 2 自定义子命令custom command 3 LandDetec
  • 步骤八:PX4使用cartographer与move_base进行自主建图导航

    首先老样子硬件如下 飞控 HOLYBRO PIXHAWK V4 PX4 机载电脑 jetson nano b01 激光雷达 思岚a2 前提 你已经完成了cartographer建图部分 能够正常输出map话题 前言 由于要参加中国机器人大赛
  • 【MFC开发(17)】高级列表控件List Control

    1 介绍 ListCtrl 高级列表控件也是我们平时编程过程中很常用的一个控件 xff0c 一般涉及到报表展示 记录展示之类的 xff0c 都需要ListCtrl 高级列表控件 例如 xff1a 任务管理器啊 xff0c 文件列表啊 xff
  • 四、无人机知识笔记(初级:基本运动原理)

    笔记来源于 沈阳无距科技 工业级无人机的中国名片 编程外星人 目录 一 多旋翼直升机 二 基本飞行姿态 三 多旋翼飞行原理 四 反扭力与偏航运动 五 螺旋桨 六 有刷电机和无刷电机 七 电调与PWM信号 八 动力电池 九 遥控器 十 机架设
  • Apollo代码学习(一)—控制模块概述

    Apollo代码学习 控制模块概述 补充 2018 11 08更新 2018 11 15更新 2018 11 20更新 前言 控制 纵向控制 标定表的生成 横向控制 控制信号 仿真 仿真平台及工具 Apollo 阿波罗 是一个开放的 完整的
  • Apollo代码学习(六)—模型预测控制(MPC)

    Apollo代码学习 模型预测控制 前言 模型预测控制 预测模型 线性化 单车模型 滚动优化 反馈矫正 总结 前言 非专业选手 此篇博文内容基于书本和网络资源整理 可能理解的较为狭隘 起点较低 就事论事 如发现有纰漏 请指正 非常感谢 查看
  • 飞行姿态解算(三)

    继之前研究了一些飞行姿态理论方面的问题后 又找到了之前很流行的一段外国大神写的代码 来分析分析 第二篇文章的最后 讲到了文章中的算法在实际使用中有重大缺陷 大家都知道 分析算法理论的时候很多情况下我们没有考虑太多外界干扰的情况 原因是很多情
  • 在 Excel 中拆分和分组值

    Hi I have a column of values which has different suffix after a dot i need it to group it based on the value after dot E
  • Android:如何配置“tinymix”以使用“tinycap”录制系统音频

    在 Android 中 目前无法使用 Android SDK 录制系统音频 因此 我尝试了一下 TinyALSA 自 Android 4 起 希望可以重新路由音频输出 以便可以录制它 当我在设备上调用 tinymix 时 我得到以下配置 c

随机推荐

  • PX4分析系列之添加北醒TOF传感器(使用UART)

    PX4分析系列之添加北醒TOF传感器 xff08 使用UART xff09 提示 xff1a 一个飞行器爱好者 xff0c 才疏学浅 通过自己学习PX4源码的过程 xff0c 进行分析和记录 欢迎各路大神讨论 xff0c 并指正文中错误 x
  • 产品化的理解

    我对产品化的理解 产品化的时机是看业务的需要 xff0c 不管是对前景的落实 xff0c 还是项目转化成产品 xff0c 这些都不是技术人员能考虑的 xff0c 业务的发展和策划 xff0c 如何进行市场细化等如果都由技术人员考虑 xff0
  • JS对象转insert语句

    function obj2Sql tablename obj var sqls 61 34 34 f 61 34 34 v 61 34 34 obj forEach o 61 gt f 61 34 34 v 61 34 34 for let
  • HTML5小试 双人贪吃蛇

    lt html gt lt head gt lt head gt lt body gt lt div style 61 34 float left 34 gt 当前速度1 xff1a lt button nclick 61 34 jianc
  • 九个Console命令,让js调试更简单

    九个Console命令 xff0c 让js调试更简单 一 显示信息的命令 lt DOCTYPE html gt lt html gt lt head gt lt title gt 常用console命令 lt title gt lt met
  • echarts自定义功能按钮图片 网络路径格式

    toolbox show true orient 39 vertical 39 x 39 left 39 top 39 20 39 feature myTool show true title 39 自定义扩展方法 39 icon 39 i
  • 上班摸鱼逛博客,逮到一个字节8年测试开发,聊过之后羞愧难当......

    老话说的好 xff0c 这人呐 xff0c 一旦在某个领域鲜有敌手了 xff0c 就会闲得某疼 前几天我在上班摸鱼刷博客的时候认识了一位字节测试开发大佬 xff0c 在字节工作了8年 xff0c 因为本人天赋比较高 xff0c 平时工作也兢
  • Ubuntu下USB权限问题以及udev规则文件笔记

    在ubuntu系统下使用传感器的时候 xff0c 通常会遇到一些权限上的问题 比如我使用ROS驱动包来启动bluefox摄像头 xff0c 如果没有任何关于权限上的处理就会提示权限问题导致无法正常启动该摄像头 xff0c 如下图 xff1a
  • 三.卡尔曼滤波器(EKF)开发实践之三: 基于三个传感器的海拔高度数据融合

    本系列文章主要介绍如何在工程实践中使用卡尔曼滤波器 分七个小节介绍 一 卡尔曼滤波器开发实践之一 五大公式 二 卡尔曼滤波器开发实践之二 一个简单的位置估计卡尔曼滤波器 三 卡尔曼滤波器 EKF 开发实践之三 基于三个传感器的海拔高度数据融
  • 树莓派 - 1 安装与配置 - a 系统安装(Raspbian)

    xff08 1 xff09 软件 Raspbian operating system https www raspberrypi org downloads raspbian Etcher SD card writing tool http
  • 分享一个Linux的录屏工具script

    在使用该命令后 xff0c 直接录屏 xff0c 会记录终端在命令行的所有动作 想让别人帮你操作 xff0c 但你的思路跟不上对方敲命令的速度 xff0c 可以先录下来 xff0c 然后回去慢慢琢磨 我的是centos7系统 span cl
  • 最佳Linux防病毒软件推荐!

    看到标题或许你会疑问 xff0c linux如此安全 xff0c 为什么我们还需要安装防病毒软件呢 确实 xff0c linux为全球超过70 的web服务器提供支持 xff0c 黑客极有动机来制造强大的病毒来渗透这些服务器安全系统 xff
  • NvidiaAGXXavier刷机Jetpack5.0.2报错记录(已解决,非搬运)

    网上有很多教程 xff0c 很详细的讲了这个板子刷机应该怎么去做 xff0c 正常的话就按照那个步骤走就可以了 xff0c 这里就不再赘述了 xff0c 但是我在给自己的NvidiaAgxXavier刷Jetpack5 0 2的时候 xff
  • Atmel Cortex-A5跑Nuttx是如此酸爽

    开源RTOS Nuttx已经支持Atmel SAMA5系列MPU xff0c 而且看到Nuttx还支持Graphic API xff0c 决定尝试在Ateml SAMA5D3 Xplained上跑下Nuttx Nuttx是一款开源RTOS
  • Using NuttX OS as a library on Atmel Studio 7

    This document explains how to add NuttX OS to your application on Atmel Studio 7 using NuttX OS as a library With Atmel
  • 【开发备忘】QGroundControl编译

    本文记录在windows下编译最新版QGC的过程 Qt版本为5 15 2 xff0c 编译器为MSVC2015 1 Qt环境配置 尽管目前已有Qt6 xff0c 但是QGC官网明确强调了仅可使用Qt 5 15 2 xff0c 因此首先需要安
  • Linux都应用在哪些领域?发展如何?

    与Windows操作系统软件一样 xff0c Linux也是一个操作系统软件 但与Windows不同的是 xff0c Linux是一套开放源代码程序的 xff0c 并可以自由传播的类UNIX操作系统软件 xff0c 随着信息技术的更新变化
  • opensuse 11.1 在线安装虚拟机 VirtualBox-2.2.4

    有些喜欢的windows软件可以用wine虚拟出来了 xff0c 比如酷狗 xff0c 但是有些就比较麻烦了 xff0c 比如中国特色的在线电影 xff0c 网银 xff0c 或许只有用虚拟机解决起来比较方面 xff0c 说句实在话 xff
  • Linux下CMakeLists.txt编译C++程序笔记

    在Linux下运用ROS系统可免去很多构建框架的步骤 xff0c 所以一般只要按照官网给的教程逐步进行即可 但是ROS自身有许多的毛病 xff0c 比如其稳定性和实时性差 xff0c 有时候数据传输会发现丢失的现象 xff0c 因此其性能不
  • px4: actuators control, control group 和 mixer科普

    原文链接 xff1a https pixhawk org dev mixing Control Mixing This page discusses the general purpose control mixing architectu