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模块设计之一:SITL & HITL模拟框架

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

    PX4模块设计之五 xff1a 自定义MAVLink消息 1 MAVLink Dialects1 1 PX4 Dialects1 2 Paprazzi Dialects1 3 MAVLink XML File Format 2 添加自定义M
  • PX4模块设计之六:PX4-Fast RTPS(DDS)简介

    64 TOC PX4模块设计之六 xff1a PX4 Fast RTPS DDS 简介 基于PX4开源软件框架简明简介的框架设计 xff0c 逐步分析内部模块功能设计 PX4 Fast RTPS DDS 具有实时发布 订阅uORB消息接口
  • PX4模块设计之九:PX4飞行模式简介

    PX4模块设计之九 xff1a PX4飞行模式简介 关于模式的探讨1 需求角度1 1 多旋翼 MC multi copter 1 1 1 RC控制模式1 1 1 1 Position Mode1 1 1 2 Altitude Mode1 1
  • PX4模块设计之十八:Logger模块

    PX4模块设计之十八 xff1a Logger模块 1 Logger模块简介2 模块入口函数2 1 主入口logger main2 2 自定义子命令Logger custom command2 3 日志主题uORB注册 3 重要实现函数3
  • PX4模块设计之四十七:mavlink模块

    PX4模块设计之四十七 xff1a mavlink模块 1 mavlink模块简介2 模块入口函数mavlink main3 mavlink模块重要函数3 1 Mavlink start3 2 Mavlink task main3 3 Ma
  • px4_simple_example和uorb机制

    px4 simple app PX4 Autopilot src exampes px4 simple app xff0c 这个程序是用c语言调用orb API和poll机制订阅和发布通讯数据 xff0c 但是这个例子并不是既有接收又有发送
  • pixhawk px4 commander.cpp

    对于复杂的函数 xff0c 要做的就是看函数的输入是什么 来自哪里 xff0c 经过处理后得到什么 给谁用 xff0c 这样就可以把程序逻辑理清 中间的分析就是看函数如何处理的 span class hljs keyword extern
  • PX4 OffBoard Control

    终于还是走上了这一步 xff0c 对飞控下手 xff0c 可以说是一张白纸了 记录一下学习的过程方便以后的查阅 目录 一 ubuntu18 04配置px4编译环境及mavros环境 二 PX4的OffBoard控制 1 搭建功能包 2 编写
  • PHP模拟SQL的GROUP BY算法

    BY JENNER 2015年1月24日 阅读次数 xff1a 25 github地址 xff1a https github com huyanping Zebra PHP ArrayGroupBy packagist地址 xff1a ht
  • PX4飞控的PPM接收机

    xff08 一 xff09 原理图 xff1a PX4飞控的PPM输入捕获由协处理器完成 xff0c 接在A8引脚 xff0c 对应Timer1的通道1 xff08 二 xff09 PPM协议 xff1a PPM的每一帧数据间隔为20ms
  • PX4——Range Finder 篇

    Range Finder 此处选用的是 Benewake 下的 Lidar 参数设置 General Configuration 除了官方的参数设置外 xff0c 我在 EKF2 中还找到了 EKF2 RNG AID 参数 xff0c 用来
  • 步骤八:PX4使用cartographer与move_base进行自主建图导航

    首先老样子硬件如下 飞控 HOLYBRO PIXHAWK V4 PX4 机载电脑 jetson nano b01 激光雷达 思岚a2 前提 你已经完成了cartographer建图部分 能够正常输出map话题 前言 由于要参加中国机器人大赛
  • PX4项目学习::(五)模块代码启动流程

    54条消息 PX4 模块代码启动流程 zhao23333的博客 CSDN博客
  • 机器人独立关节PD控制(控制小白入门)

    通过今天的学习仿佛对机器人控制有了进一步了解 特记录下看书和抄相关代码笔记 参考书目如下 模型如下 推导出动力学方程如下 忽略重力 摩擦力及外界干扰 可以写成如下形式 不计重力 与上上张图片对比 得p的具体含义 此处p只用到p1 p2 p3
  • 如何在 Linux 中创建组(groupadd 命令)

    在 Linux 中 组用于组织和管理用户帐户 组的主要目的是定义一组权限 例如读 写或执行允许对于可以在组内的用户之间共享的给定资源 在本文中 我们将讨论如何在 Linux 中使用groupadd命令 groupadd命令语法 的一般语法为
  • 《现代控制系统》第五章——反馈控制系统性能分析 5.3 二阶系统的性能

    现在我们看一个单环二阶系统的单位阶跃响应 一个闭环反馈控制系统如下图所示 已知该闭环系统的转换方程为 把受控系统的转换方程代入进去得到 如果给一个阶跃输入 那么 查拉普拉斯逆变换表我们得到时域输出为 其中 同时也是特征方程在s域的根与原点的
  • 在 Java 中,如何录制扬声器的声音输出? [复制]

    这个问题在这里已经有答案了 我有一个 Java 应用程序 它从多个来源接收声音 用户的能力之一是将应用程序中发生的情况记录到 AVI 文件中 我想将声音包含在该视频捕获中 如何录制用户会听到的声音 例如所有声音输入混合在一起的结果 我可以弄
  • 如何在 Unity 中将混音器的音量设置为滑块的音量?

    我正在尝试进行一些音频设置 这是我的脚本 public AudioMixer masterMixer public float masterLvl public float musicLvl public float sfxLvl publ
  • 在 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

随机推荐

  • 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