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.
[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)'
[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. |
- 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.