Drake
RigidBodyWingWithControlSurface Class Reference

Implements functionality similar to RigidBodyWing but with a control surface attached to the wing. More...

Inheritance diagram for RigidBodyWingWithControlSurface:
Collaboration diagram for RigidBodyWingWithControlSurface:

## Public Member Functions

function RigidBodyWingWithControlSurface (frame_id, profile, chord, span, stall_angle, velocity, control_surface_chord, control_surface_min_deflection, control_surface_max_deflection)
Constructor taking similar arguments to RigidBodyWing except with the addition of control surface parameters. More...

function onCompile (obj, model)
Called on compile. More...

function computeSpatialForce (obj, manip, q, qd)
Computes the forces from the wing including the control surface. More...

function flateplateControlSurfaceInterp (obj)
Builds a smooth interpolation of values for lift, drag, and moment coefficients for a flatplate control surface. More...

function flatplateControlSurface (obj, aoa, control_surface_angle_rad)
Computes coefficients for a flat plate control surface given angle of attack and the control surface offset in radians. More...

function getControlSurfaceRange (obj)
Returns a range of values between the minimum and maximum deflection of the control surface. More...

function drawWing (obj, manip, q, qd, fill_color)
Draws the wing with control surfaces. More...

function addWingVisualGeometryToBody (obj, model, body)
Adds a visual geometry of the wing to the model on the body given for drawing the wing in a visualizer. More...

function updateVisualShapes (varargin)

function updateVisualGeometry (obj, model)
Update visual geometry. More...

Public Member Functions inherited from RigidBodyWing
function RigidBodyWing (frame_id, profile, chord, span, stallAngle, velocity)
calls AVL and XFOIL over different angles of attack at the given velocity, generates first order polynomials of the CL, CD, and pitch moments of the wing. More...

function onCompile (obj, model)
Runs on model compilation, constructs an airfoil if one does not exist with these parameters. More...

Public Member Functions inherited from RigidBodyForceElement
function updateBodyCoordinates (obj, body_ind, T_old_body_to_new_body)

function setInputNum (obj, input_num)

function energy (obj, manip, q, qd)

Public Member Functions inherited from RigidBodyElement
function bindParams (body, model, pval)
Bind parameters from msspolys to doubles. More...

## Static Public Member Functions

static function parseURDFNode (model, name, robotnum, node, options)
Parses URDF node for wing_with_control_surface. More...

Static Public Member Functions inherited from RigidBodyForceElement
static function cartesianForceToSpatialForce (varargin)
This method is deprecated. More...

## Public Attributes

Property control_surface_chord

Property control_surface_min_deflection

Property control_surface_max_deflection

Property fCl_control_surface

Property fCd_control_surface

Property fCm_control_surface

Property control_surface_increment
resolution of control surface parameterization in radians More...

Public Attributes inherited from RigidBodyWing
Property fCl

Property fCd

Property fCm

Property dfCl

Property dfCd

Property dfCm

Property area

Property rho
Air density for 20 degC dry air, at sea level. More...

Property has_control_surface

Property span

Property stall_angle

Property chord

Property profile

Property visual_geometry

Property parent_id

Property airfoil_needs_update
flag that tells us if we need to create a new airfoil on compile More...

Property velocity

Property kinframe

Public Attributes inherited from RigidBodyForceElement
Property name

Property direct_feedthrough_flag

Property input_num

Property input_limits

Public Attributes inherited from RigidBodyElement
Property param_bindings
structure containing msspoly parameterized representations of some properties More...

## Detailed Description

Implements functionality similar to RigidBodyWing but with a control surface attached to the wing.

URDF parsing is handled by RigidBodyWing.

## Constructor & Destructor Documentation

 function RigidBodyWingWithControlSurface ( frame_id , profile , chord , span , stall_angle , velocity , control_surface_chord , control_surface_min_deflection , control_surface_max_deflection )

Constructor taking similar arguments to RigidBodyWing except with the addition of control surface parameters.

Parameters
 control_surface_chord length of the control surface attached to the wing control_surface_min_deflection minimum deflection of the control surface attached to the wing in raidans (ex. -0.9) control_surface_max_deflection maximum deflection of the control surface attached to the wing in radians (ex. 0.9)
Return values
 obj

## Member Function Documentation

 function addWingVisualGeometryToBody ( obj , model , body )

Adds a visual geometry of the wing to the model on the body given for drawing the wing in a visualizer.

Parameters
 model manipulator the wing is part of body body to add the visual geometry to
Return values
 model updated model
 function addWingVisualShapeToBody ( varargin )
Return values
 varargout
 function computeSpatialForce ( obj , manip , q , qd )

Computes the forces from the wing including the control surface.

Returns the force from the wing along with the B matrix which the matrix for a linearized input for the control surface.

Parameters
 manip manipulator we are a part of q state vector qd q-dot, time derivative of the state vector
Return values
 force force from the wing that is independant of the control surface B_force B matrix containing the linearized component of the force from the input (from the control surface's deflection)
 function drawWing ( obj , manip , q , qd , fill_color )

Draws the wing with control surfaces.

Parameters
 manip manipulator the wing is part of q state vector qd q-dot (state vector derivatives) fill_color Default: 1
 function flateplateControlSurfaceInterp ( obj )

Builds a smooth interpolation of values for lift, drag, and moment coefficients for a flatplate control surface.

See flateplateControlSurface for more information on the computation.

Return values
 fCl_interp smooth interpolated surface for lift force divided by $$v^2$$ fCd_interp smooth interpolated surface for drag force divided by $$v^2$$ fCm_interp smooth interpolated surface for moment force divided by $$v^2$$
 function flatplateControlSurface ( obj , aoa , control_surface_angle_rad )

Computes coefficients for a flat plate control surface given angle of attack and the control surface offset in radians.

Parameters
 aoa angle of attack of the wing (can be an array) control_surface_angle_rad angle of the control surface in radians. 0 is no deflection, positive deflection is upwards (if it was an elevator, it would be pitch up on the plane) can be an array.

Lift force from control surface = $$\frac{1}{2} \rho v^2 C_l(aoa+u) S_2$$

Drag force = $$\frac{1}{2} \rho v^2 C_d(aoa+u) S_2$$

Moment torque comes just from the lift on the control surface since drag is in the plane and will not produce a torque

Moment torque = $$v^2 \rho r \sin(aoa + u) \cos(aoa + u) S_2$$

  rho: air pressure
S2: control surface area
aoa: angle of attack
u: amount of deflection in radians from the control input
v: airspeed


See pages 34-35 of Cory10a.

So here, we return $$\frac{1}{2} \rho C_l(aoa+u) S_2$$ because then you can multiply by just $$v^2$$ to compute force.

Return values
 fCl instantaneous life force from the control surface divided by $$v^2$$ Cd instantaneous drag force from the control surface divided by $$v^2$$ Cm instantaneous moment coefficient from the control surface divided by $$v^2$$ aoa_mat matrix of angle of attack values used control_surface_mat matrix of control surfaces used
 function getControlSurfaceRange ( obj )

Returns a range of values between the minimum and maximum deflection of the control surface.

Return values
 control_surface_range the range as an array
 function onCompile ( obj , model )

Called on compile.

Builds a new airfoil if needed and also builds a new control surface parameterization if needed

Return values
 obj model
 static function parseURDFNode ( model , name , robotnum , node , options )
static

Parses URDF node for wing_with_control_surface.

Parameters
 model model we are buidling robotnum node URDF node to parse options none right now
Return values
 model updated model obj newly created RigidBodyWingWithControlSurface object
 function updateVisualGeometry ( obj , model )

Update visual geometry.

This should be called after a parameter update that may change the automatic drawing of geometry (ie the area of the drag force is changed).

Parameters
 model RigidBodyManipulator this is a part of
Return values
 model updated model
 function updateVisualShapes ( varargin )
Return values
 varargout

## Member Data Documentation

 Property control_surface_chord
 Property control_surface_increment

resolution of control surface parameterization in radians

 Property control_surface_max_deflection
 Property control_surface_min_deflection
 Property fCd_control_surface
 Property fCl_control_surface
 Property fCm_control_surface

The documentation for this class was generated from the following file: