control_allocation

Returns the control allocation matrix of a multicopter.

Syntax

Description

Returns the control allocation matrix of a multicopter with n propellers. The parameter d specifies the distance from each propeller to the origin of the body coordinate. And ku specifies the ratio of the torque to thrust of each propeller.


More parameters of the propulsion system of a multicopter are specified by kwargs. See Input Arguments for more information.

Examples

  1. Assuming there is a Plus-shape quadcopter, the distance between each propeller and the origin of body coordinate are the same, that is d = 0.28. And ku = 0.1.

  1. Assuming an X-shape quadcopter that is equipped with almost the same propulsion system with the above one, and its yaw angle is uncontrollable yet.

Input Arguments

n —— The number of propellers of a multicopter, specified as a positive integer scalar.


d —— The distance between each propeller and the origin of the body coordinate.

When all distances are almost equal, specify d as a positive value. For example, d = 0.28.

Otherwise, specify d as an array of positive values of length n. For example, d = [0.28 0.35 0.28 0.35].


ku —— The ratio of the torque to thrust of each propeller.

When all ratios are almost equal, specify ku as a positive value. For example, ku = 0.1.

Otherwise, specify ku as an array of positive values of length n.


init_angle —— The angle from Obxb axis to each supporting arm of the propeller in clockwise direction in radians, specified as 0 (default), real numeric scalar, or an array of positive values of length n.

When all the propellers are distributed evenly, specify init_angle as a positive value. It then indicates the angle of propeller #1, namely ϕ1 = init_angle. So, there are

ϕi=ϕ1+2πn(i1),i=1,2,,n.

Otherwise, specify init_angle as an array of numeric values of length n. That is, ϕi,i=1,2,,n are assigned seperately.


drct —— The rotation direction of each propeller, specified as an array of length n, in which each element is -1 or 1. Default is [1, -1, 1, -1, 1, -1].


eta —— The efficient coefficient of each propeller, specified as 1 (default), a numeric value in [0,1], or an array of length n, in which each element is in [0,1].


giveup_height —— Whether to give up the control of height or not. True or False (default).

The height control of the aircraft will be given up if it's True. Correspondingly, the first row of the original 4-by-n matrix will be removed.


giveup_yaw —— Whether to give up the control of yaw or not. True or False (default).

The yaw control of the aircraft will be given up if it's True. Correspondingly, the fourth row of the original 4-by-n matrix will be removed.

Properties of Arguments

Name of the parametersIs optional?Source, dialog or input port?
nNoDialog
dNoDialog
kuNoInput port
init_angleYesDialog
drctYesDialog
etaYesDialog
giveup_heightYesDialog
giveup_yawYesDialog

References

[1] Q. Quan. Introduction to Multicopter Design and Control. Singapore: Springer, 2017.