Apollo  6.0
Open source self driving car software
Public Member Functions | Protected Attributes | List of all members
apollo::control::LeadlagController Class Reference

A lead/lag controller for speed and steering using defualt integral hold. More...

#include <leadlag_controller.h>

Collaboration diagram for apollo::control::LeadlagController:
Collaboration graph

Public Member Functions

void Init (const LeadlagConf &leadlag_conf, const double dt)
 initialize lead/lag controller More...
 
void SetLeadlag (const LeadlagConf &leadlag_conf)
 
void TransformC2d (const double dt)
 transfer lead/lag controller coefficients to the discrete-time form, with the bilinear transform (trapezoidal integration) method More...
 
void Reset ()
 reset variables for lead/leg controller More...
 
virtual double Control (const double error, const double dt)
 compute control value based on the error More...
 
int InnerstateSaturationStatus () const
 get saturation status More...
 

Protected Attributes

double alpha_ = 0.0
 
double beta_ = 0.0
 
double tau_ = 0.0
 
double Ts_ = 0.01
 
double kn1_ = 0.0
 
double kn0_ = 0.0
 
double kd1_ = 0.0
 
double kd0_ = 0.0
 
double previous_output_ = 0.0
 
double previous_innerstate_ = 0.0
 
double innerstate_ = 0.0
 
double innerstate_saturation_high_ = 0.0
 
double innerstate_saturation_low_ = 0.0
 
int innerstate_saturation_status_ = 0
 
bool transfromc2d_enabled_ = false
 

Detailed Description

A lead/lag controller for speed and steering using defualt integral hold.

Member Function Documentation

◆ Control()

virtual double apollo::control::LeadlagController::Control ( const double  error,
const double  dt 
)
virtual

compute control value based on the error

Parameters
errorerror value, the difference between a desired value and a measured value
dtsampling time interval
Returns
control value based on Lead/Lag terms

◆ Init()

void apollo::control::LeadlagController::Init ( const LeadlagConf &  leadlag_conf,
const double  dt 
)

initialize lead/lag controller

Parameters
leadlag_confconfiguration for leadlag controller
dtsampling time interval

◆ InnerstateSaturationStatus()

int apollo::control::LeadlagController::InnerstateSaturationStatus ( ) const

get saturation status

Returns
saturation status

◆ Reset()

void apollo::control::LeadlagController::Reset ( )

reset variables for lead/leg controller

◆ SetLeadlag()

void apollo::control::LeadlagController::SetLeadlag ( const LeadlagConf &  leadlag_conf)

alpha, beta and tau

Parameters
leadlag_confconfiguration for leadlag controller

◆ TransformC2d()

void apollo::control::LeadlagController::TransformC2d ( const double  dt)

transfer lead/lag controller coefficients to the discrete-time form, with the bilinear transform (trapezoidal integration) method

Parameters
dtsampling time interval

Member Data Documentation

◆ alpha_

double apollo::control::LeadlagController::alpha_ = 0.0
protected

◆ beta_

double apollo::control::LeadlagController::beta_ = 0.0
protected

◆ innerstate_

double apollo::control::LeadlagController::innerstate_ = 0.0
protected

◆ innerstate_saturation_high_

double apollo::control::LeadlagController::innerstate_saturation_high_ = 0.0
protected

◆ innerstate_saturation_low_

double apollo::control::LeadlagController::innerstate_saturation_low_ = 0.0
protected

◆ innerstate_saturation_status_

int apollo::control::LeadlagController::innerstate_saturation_status_ = 0
protected

◆ kd0_

double apollo::control::LeadlagController::kd0_ = 0.0
protected

◆ kd1_

double apollo::control::LeadlagController::kd1_ = 0.0
protected

◆ kn0_

double apollo::control::LeadlagController::kn0_ = 0.0
protected

◆ kn1_

double apollo::control::LeadlagController::kn1_ = 0.0
protected

◆ previous_innerstate_

double apollo::control::LeadlagController::previous_innerstate_ = 0.0
protected

◆ previous_output_

double apollo::control::LeadlagController::previous_output_ = 0.0
protected

◆ tau_

double apollo::control::LeadlagController::tau_ = 0.0
protected

◆ transfromc2d_enabled_

bool apollo::control::LeadlagController::transfromc2d_enabled_ = false
protected

◆ Ts_

double apollo::control::LeadlagController::Ts_ = 0.01
protected

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