delphyne
DynamicBicycleCar< T > Class Template Referencefinal

Detailed Description

template<typename T>
class delphyne::DynamicBicycleCar< T >

DynamicBicycleCar implements a planar rigid body bicycle model of an automobile with a non-linear brush tire model from Bobier (2012) [1].

This is a simplified model that assumes a vehicle that has two wheels: one at the front, and one at the rear. Also, this three-DOF model captures the dynamics in the lateral (Cy), longitudinal (Cx), and yaw (about Cz) directions but not the roll (about Cx) and pitch (about Cy) directions.

There are three coordinate frames of interest in this model: a local frame L fixed on earth with origin Lo, a frame attached to the vehicle's chassis C with the origin of C being Co located at a distance of Lf from the front axle along the center line of the vehicle, and a steering frame D with the origin Do located at the front axle along the center line of the vehicle. Note that the point Co is also referred to as the control point Cp, and although the location of the vehicle's center of mass Ccm can move depending on weight transfer dynamics, it is assumed that the location of Ccm is coincident with Co and Ccp. L is a cartesian, right handed coordinate system with Lz being gravity aligned (gravity acts in the negative Lz direction).

The states of the model are:

  • Lx measure of the location of Cp from Lo p_LoCp_x [m]
  • Ly measure of the location of Cp from Lo p_LoCp_y [m]
  • Yaw angle from Lx to Cx with positive Lz sense yaw_LC [rad]
  • Cx measure of Cp's velocity in L v_LCp_x [m/s]
  • Cy measure of Cp's velocity in L v_LCp_y [m/s]
  • C's angular velocity in frame L yawDt_LC [rad/s]

Inputs to this system:

  • Steer angle from Cx to Dx with positive Cz sense steer_CD [rad]
  • The Cx measure of the Longitudinal force on body C at Cp f_Cp_x [N]

Outputs of this system:

Note that the vehicle's angular velocity in L yawDt_LC is sometimes referred to as the yaw rate r, and the tire angle is sometimes referred to as δ.

Instantiated templates for the following kinds of T's are provided:

  • double
  • drake::AutoDiffXd
  • drake::symbolic::Expression

[1] C. Bobier. A Phase Portrait Approach to Vehicle Stability and Envelope Control. Ph. D. thesis (Stanford University), 2012. pp. 22 - 25, pp. 35.

[2] H. Pacejka, Tire and vehicle dynamics, 3rd ed. Society of Automotive Engineers and Butterworth-Heinemann, 2012.

[3] G. Heydinger, R. Bixel, W. Garrott, M. Pyne, J. Howe and D. Guenther, "Measured Vehicle Inertial Parameters-NHTSA’s Data Through November 1998", SAE Technical Paper Series, 1999. p. 24.

#include <src/systems/dynamic_bicycle_car.h>

Inheritance diagram for DynamicBicycleCar< T >:
[legend]

Public Types

enum  Tire { kFrontTire, kRearTire }
 Specifies whether to use the front or rear tire for calculating various parameters. More...
 

Public Member Functions

 DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN (DynamicBicycleCar)
 
 DynamicBicycleCar ()
 Default constructor. More...
 
template<typename U >
 DynamicBicycleCar (const DynamicBicycleCar< U > &)
 Scalar-converting copy constructor. More...
 
const drake::systems::OutputPort< T > & get_output_port () const
 Returns the port to output the state. More...
 
const drake::systems::InputPort< T > & get_input_port () const
 Returns the input port to the tire angle and applied longitudinal force. More...
 
const DynamicBicycleCarState< T > & get_state (const drake::systems::Context< T > &context) const
 
DynamicBicycleCarState< T > & get_mutable_state (drake::systems::Context< T > *context) const
 

Static Public Member Functions

static T CalcTireSlip (const DynamicBicycleCarState< T > &state, const DynamicBicycleCarParams< T > &params, const T &steer_angle, Tire tire_select)
 Slip angle of front or rear tires. More...
 
static T CalcNormalTireForce (const DynamicBicycleCarParams< T > &params, const T &f_x, Tire tire_select)
 Normal forces on the front or rear tires. More...
 
static T CalcLateralTireForce (const T &tire_slip_angle, const T &c_alpha, const T &f_z, const T &mu)
 Lateral tire forces on the front or rear tires. More...
 

Member Enumeration Documentation

◆ Tire

enum Tire
strong

Specifies whether to use the front or rear tire for calculating various parameters.

Enumerator
kFrontTire 
kRearTire 

Constructor & Destructor Documentation

◆ DynamicBicycleCar() [1/2]

Default constructor.

◆ DynamicBicycleCar() [2/2]

DynamicBicycleCar ( const DynamicBicycleCar< U > &  )
explicit

Scalar-converting copy constructor.

Member Function Documentation

◆ CalcLateralTireForce()

T CalcLateralTireForce ( const T &  tire_slip_angle,
const T &  c_alpha,
const T &  f_z,
const T &  mu 
)
static

Lateral tire forces on the front or rear tires.

◆ CalcNormalTireForce()

T CalcNormalTireForce ( const DynamicBicycleCarParams< T > &  params,
const T &  f_x,
Tire  tire_select 
)
static

Normal forces on the front or rear tires.

◆ CalcTireSlip()

T CalcTireSlip ( const DynamicBicycleCarState< T > &  state,
const DynamicBicycleCarParams< T > &  params,
const T &  steer_angle,
Tire  tire_select 
)
static

Slip angle of front or rear tires.

◆ DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN()

DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN ( DynamicBicycleCar< T >  )

◆ get_input_port()

const drake::systems::InputPort< T > & get_input_port

Returns the input port to the tire angle and applied longitudinal force.

◆ get_mutable_state()

DynamicBicycleCarState< T > & get_mutable_state ( drake::systems::Context< T > *  context) const

◆ get_output_port()

const drake::systems::OutputPort< T > & get_output_port

Returns the port to output the state.

◆ get_state()

const DynamicBicycleCarState< T > & get_state ( const drake::systems::Context< T > &  context) const

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