140 likes | 413 Views
WORKSHOP 15 Adams/Car Mechatronics. Mechatronics. Use Adams/Car Mechatronics to investigate vehicle dynamics through a lane change event with and without an Electronic Stability Program (ESP) system active. The Control systems will be based on either: Adams/Solver function expressions
E N D
WORKSHOP 15 Adams/Car Mechatronics
Mechatronics • Use Adams/Car Mechatronics to investigate vehicle dynamics through a lane change event with and without an Electronic Stability Program (ESP) system active. • The Control systems will be based on either: • Adams/Solver function expressions • Compiled control system libraries created in MATLAB/Simulink.
Baseline Simulation • Import the model • Start Adams/Car MD R2 in Standard Interface mode. • Load the Adams/Car Mechatronics plugin using the menu picks: Tools -> Plugin Manager. • Load the assembly named MDI_Demo_Vehicle_lt_ABS_ESP_01.asy from the amech_shared database.
Baseline Simulation • Running a Baseline Simulation You will run a lane change simulation on a road surface having two very different traction characteristics: the left lane is slippery (mu = 0.2) while the right lane has greater traction (mu = 0.9). The ABS and ESP systems will be deactivated for the baseline simulation as the steering wheel is guided through a prescribed motion. • Deactivate the control systems: • From the menus, select Mechatronics -> Control System -> Modify… • In the Modify Control System panel, right-click and Browse for the system named: .MDI_Demo_Vehicle_lt_ABS_ESP_01.ABS_system_01.ues_ABS • Set the Active flag to be off. • In a similar fashion, turn off the ESP system named: .MDI_Demo_Vehicle_lt_ABS_ESP_01.ESP_system_01.ues_ESP
Baseline Simulation • Run a lane change simulation • From the menus, select Simulate -> Full-Vehicle Analysis -> Open-Loop Steering Events -> Single Lane Change. • Specify the simulation parameters as following, taking care to use the Road 3d_road_smooth_flat_splitmu02.xml Data File, provided in the acar_training_MDr2/roads.tbl. • Run the simulation.
Baseline Simulation • Plot the vehicle yaw rate (ues_cst_body_yaw_rate_model_units), as follows • Note the increasing yaw rate after 1.5 seconds as the vehicle begins to spin out of control near the end of the event. (Note that the steering wheel has a prescribed motion throughout the simulation, so no driver correction occurs to counteract the yawing).
Function Expression Control System • Activating the ‘Function Expression’ ESP Controller Now activate the ESP and ABS controllers that are built into the Adams/Car Mechatronics demo model. These controllers are based on Adams/Solver Function Expressions alone, so neither MATLAB nor EASY5 are required. • Activate the controlsystems • From the menus, select Mechatronics -> Control System -> Modify. • In the Modify Control System panel, right-click and Browse for the system named: .MDI_Demo_Vehicle_lt_ABS_ESP_01.ABS_system_01.ues_ABS. • Set the Active flag to be on. • In a similar fashion, turn on the ESP system named: .MDI_Demo_Vehicle_lt_ABS_ESP_01.ESP_system_01.ues_ESP.
Function Expression Control System • Re-run the lane change simulation • From the menus, select Simulate -> Full-Vehicle Analysis -> Open-Loop Steering Events -> Single Lane Change. • Use the same settings as for the last simulation, but change the Output Prefix to be ‘with_esp_functions’. • Compare the vehicle yaw rate (ues_cst_body_yaw_rate_model_units) between the with- and without-ESP simulations. Also plot the left and right front brake torques (pt[l,r]_front_brake_torque_data) for the with-ESP simulation. The effect of the ESP system activating the brakes should be apparent from the yaw rate plot. This ESP system has a target maximum yaw rate of approximately 10 deg/sec; the ESP simulation results should clearly show this.
Function Expression Control System Yaw Rate and Brake Torque Comparison, Function-based Controller
External Control System Change ‘Function Expression’ ABS and ESP Controllers to use controller built externally using Easy5/Matlab. • Activate the control systems • From the menus, select Mechatronics -> Control System -> Modify. • In the Modify Control System panel, right-click and Browse for the system named: .MDI_Demo_Vehicle_lt_ABS_ESP_01.ABS_system_01.ues_ABS • Change System Type to External System Library. • For the Library property File use the ABS_control_system_01.esl in the amech_shared/external_system_libraries.tbl directory. • In a similar fashion, turn on the ESP system named: .MDI_Demo_Vehicle_lt_ABS_ESP_01.ESP_system_01.ues_ESP. • For the ESP controller use the ESP_control_system_01.esl from the amech_shared/external_system_libraries.tbl directory.
External Control System • Re-run the lane change simulation • From the menus, select Simulate -> Full-Vehicle Analysis -> Open-Loop Steering Events -> Single Lane Change. • Use the same settings as for the last simulation, but change the Output Prefix to be ‘with_esp_external’. • Compare the vehicle yaw rate (ues_cst_body_yaw_rate_model_units) between the with- and without-ESP simulations. Also plot the left and right front brake torques (pt[l,r]_front_brake_torque_data) for the with-ESP simulation.
External Control System Yaw Rate and Brake Torque Comparison, Imported Library Controller
Mechatronics • The characteristics of the function-based and external system based controllers are shown to be slightly different. Factors such as different gains/settings used while building the library can affect the results. • For using the Co-simulation method the knowledge base article below: 1-43315471: Using Mechatronics to Incorporate a Vehicle Controller into an Adams/Car Model http://support.mscsoftware.com/kb/results_kb.cfm?S_ID=1-43315471 • To learn more about building the control system in the template builder go through the tutorial provided in the online help documentation under: Adams/Car – Mechatronics - Tutorials