In the document analyse_brake.html. the speed of the vehicle changes due to applied traction or brake force. Sometimes the track has a given speed profile which the vehicle ahall follow. This document shows how to create a regulator which applies pitch moment on the axles in order to make the vehicle to follow a given speed profile.
func intpl_l Vo= time 0. 130/3.6
20. 130/3.6
30 160/3.6
50 160/3.6
60 130/3.6
80 130/3.6
##
## Regulate the pitch moment on the axles
## --------------------------------------------------------------------------
func const FactP= 5e4
func const FactI= .2e6
func operp MtracP= FactP * car_1.vx # P-regulator
func operp MtracI= FactI * car_1.x # I-regulator
func operp Mtrac= MtracP + MtracI
if_then Mtrac .gt. 0.1*9.81*(mc+2*mb+4*ma)/4 # Max traction force
no_warning func copy Mtrac= 0.1*9.81*(mc+2*mb+4*ma)/4
endif
if_then Mtrac .lt. -0.1*9.81*(mc+2*mb+4*ma)/4 # Max brake force
no_warning func copy Mtrac= -0.1*9.81*(mc+2*mb+4*ma)/4
endif
force rel_lsys1 F_traction_111 axl_111 0 0 -ro 0. 0. 0. 0. Mtrac 0.
force rel_lsys1 F_traction_112 axl_112 0 0 -ro 0. 0. 0. 0. Mtrac 0.
force rel_lsys1 F_traction_121 axl_121 0 0 -ro 0. 0. 0. 0. Mtrac 0.
force rel_lsys1 F_traction_122 axl_122 0 0 -ro 0. 0. 0. 0. Mtrac 0.
In the variables FactP and FactI the user can choose how fast the vehicle shall respond to changes in the speed.