Lean Angle Controller - Two-wheelers

This controller is used in case of simulating two-wheelers to follow a demand lean profile provided by the user.

The controller employs a PID algorithm using Demand lean angle as the process variable and the steering angle as the control variable. For more details on the algorithm, please look at the Lean angle profile control section.

The controller block for this controller can be specified as:
[FOLLOW_LEAN_CONTROLLER]
TAG = 'PID'
TYPE = 'FOLLOW_LEAN'
DEMAND_SIGNAL = 'DEMAND_LEAN'                                                   
KP = 60                                                              
KI = 80                                                              
KD = 20 

[DEMAND_LEAN]                                                                              
TYPE = 'EXPRESSION'                                                                           
SIGNAL_CHANNEL = 0                                                                     
EXPRESSION = 'STEP(TIME,2.0,0,3.5,25.0D)'
In the above example, the Lean controller is specified using the ‘PID’ tag and providing the constants required for the PID controller. The demand path is specified as expression in the ‘DEMAND_LEAN’ block as a signal that goes from 0 at 2 sec to 25 degrees at 3.5 sec. The demand lean can be specified in other ways as mentioned in the Demand Signal for Controllers section.
[FOLLOW_LEAN_CONTROLLER]
TAG Attr - string REQUIRED

<PID >

TYPE Attr - string REQUIRED

<FOLLOW_LEAN >

Specifies objective of the controller.

DEMAND_SIGNAL Attr - real REQUIRED

Specified the block where the user demand signal is provided.

KP Attr - real OPTIONAL

Proportional constant for the PID controller.

If absent, the default value of 60 is assumed.

KI Attr - real OPTIONAL

Integral constant for the PID controller.

If absent, the default value of 80 is assumed.

KD Attr - real OPTIONAL

Derivative constant for the controller.

If absent, the default value of 20 is assumed.

Note:
  • The behavior of the controller following a demand lean depends on the values for KP, KI, and KD.
  • If the behavior is not acceptable for a vehicle, the constants need to be tuned.