UAV blocks

https://raw.githubusercontent.com/petercorke/bdsim/master/figs/BDSimLogo_NoBackgnd@2x.png
class roboticstoolbox.blocks.uav.MultiRotor(*args: Any, **kwargs: Any)[source]

Bases: ContinuousBlock

MULTIROTOR

Dynamic model of a multi-rotor flying robot.

Inputs:

1

Outputs:

1

States:

16

Port type

Port number

Types

Description

Input

0

ndarray(N)

\(\varpi\), rotor velocities in (radians/sec)

Output

0

dict

\(\mathit{x}\), vehicle state

Dynamic model of a multi-rotor flying robot that includes rotor flapping. The vehicle state is a dict containing the following items:

  • x pose in the world frame as \([x, y, z, \theta_Y, \theta_P, \theta_R]\)

  • trans position and velocity in the world frame as \([x, y, z, \dot{x}, \dot{y}, \dot{z}]\)

  • rot orientation and angular rate in the world frame as \([\theta_Y, \theta_P, \theta_R, \dot{\theta_Y}, \dot{\theta_P}, \dot{\theta_R}]\)

  • vb translational velocity in the body frame as \([\dot{x}, \dot{y}, \dot{z}]\)

  • w angular rates in the body frame as

    \([\dot{\theta_Y}, \dot{\theta_P}, \dot{\theta_R}]\)

  • a1s longitudinal flapping angles (radians)

  • b1s lateral flapping angles (radians)

  • X full state vector as \([x, y, z, \theta_Y, \theta_P, \theta_R, \dot{x}, \dot{y}, \dot{z}, \dot{\theta_Y}, \dot{\theta_P}, \dot{\theta_R}]\)

The dynamic model is a dict with the following key/value pairs.

key

description

nrotors

Number of rotors (even integer)

J

Flyer rotational inertia matrix (3x3)

h

Height of rotors above CoG

d

Length of flyer arms

nb

Number of blades per rotor

r

Rotor radius

c

Blade chord

e

Flapping hinge offset

Mb

Rotor blade mass

Mc

Estimated hub clamp mass

ec

Blade root clamp displacement

Ib

Rotor blade rotational inertia

Ic

Estimated root clamp inertia

mb

Static blade moment

Ir

Total rotor inertia

Ct

Non-dim. thrust coefficient

Cq

Non-dim. torque coefficient

sigma

Rotor solidity ratio

thetat

Blade tip angle

theta0

Blade root angle

theta1

Blade twist angle

theta75

3/4 blade angle

thetai

Blade ideal root approximation

a

Lift slope gradient

A

Rotor disc area

gamma

Lock number

Note

  • Based on MATLAB code developed by Pauline Pounds 2004.

  • SI units are used.

  • Rotor velocity is defined looking down, clockwise from the front rotor which lies on the x-axis.

References:
  • Design, Construction and Control of a Large Quadrotor micro air vehicle. P.Pounds, PhD thesis Australian National University, 2007.

  • Robotics, Vision & Control by Peter Corke, sec 4.2 in all editions

Seealso:

MultiRotorMixer MultiRotorPlot

__init__(model, groundcheck=True, speedcheck=True, x0=None, **blockargs)[source]

Create a multi-rotor dynamic model block.

Parameters:
  • model (dict) – A dictionary of vehicle geometric and inertial properties

  • groundcheck (bool) – Prevent vehicle moving below ground \(z>0\), defaults to True

  • speedcheck (bool) – Check for non-positive rotor speed, defaults to True

  • x0 (array_like(6) or array_like(12), optional) – Initial state, defaults to None

  • blockargs (dict) – common Block options

class roboticstoolbox.blocks.uav.MultiRotorMixer(*args: Any, **kwargs: Any)[source]

Bases: FunctionBlock

MULTIROTORMIXER

Speed mixer for a multi-rotor flying vehicle.

Inputs:

4

Outputs:

1

States:

0

Port type

Port number

Types

Description

Input

0

float

\(\tau_R\), roll torque

Input

1

float

\(\tau_P\), pitch torque

Input

2

float

\(\tau_Y\), yaw torque

Input

3

float

\(T\), total thrust

Output

0

ndarray(N)

\(\varpi\), rotor speeds

This block converts airframe moments and total thrust into a 1D array of rotor speeds which can be input to the MULTIROTOR block.

The model is a dict with the following key/value pairs.

key

description

nrotors

Number of rotors (even integer)

h

Height of rotors above CoG

d

Length of flyer arms

r

Rotor radius

Note

Based on MATLAB code developed by Pauline Pounds 2004.

Seealso:

MultiRotor MultiRotorPlot

__init__(model=None, wmax=1000, wmin=5, **blockargs)[source]
Parameters:
  • model (dict) – A dictionary of vehicle geometric and inertial properties

  • maxw (float) – maximum rotor speed in rad/s, defaults to 1000

  • minw (float) – minimum rotor speed in rad/s, defaults to 5

  • blockargs (dict) – common Block options

class roboticstoolbox.blocks.uav.MultiRotorPlot(*args: Any, **kwargs: Any)[source]

Bases: GraphicsBlock

MULTIROTORPLOT

Displays/animates a multi-rotor flying vehicle.

Inputs:

1

Outputs:

0

States:

0

Port type

Port number

Types

Description

Input

0

dict

\(\mathit{x}\), vehicle state

Animate a multi-rotor flying vehicle using Matplotlib graphics. The rotors are shown as circles and their orientation includes rotor flapping which can be exagerated by flapscale.

example of generated graphic

Example of quad-rotor display.

The input is a dictionary signal and the block requires the items:

  • x pose in the world frame as \([x, y, z, \theta_Y, \theta_P, \theta_R]\)

  • a1s rotor flap angle

  • b1s rotor flap angle

The model is a dict with the following key/value pairs.

key

description

nrotors

Number of rotors (even integer)

h

Height of rotors above CoG

d

Length of flyer arms

r

Rotor radius

Note

Based on MATLAB code developed by Pauline Pounds 2004.

Seealso:

MultiRotor MultiRotorMixer

PLOT3D = True
TIMESTAMP = True
__init__(model, scale=None, flapscale=1, projection='ortho', **blockargs)[source]
Parameters:
  • model (dict) – A dictionary of vehicle geometric and inertial properties

  • scale (array_like, optional) – dimensions of workspace: xmin, xmax, ymin, ymax, zmin, zmax, defaults to [-2,2,-2,2,10]

  • flapscale (float) – exagerate flapping angle by this factor, defaults to 1

  • projection (str) – 3D projection, one of: ‘ortho’ [default], ‘perspective’

  • blockargs (dict) – common GraphicsBlock options