01.05.2017 Views

4569846498

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

374 Multibody Systems Approach to Vehicle Dynamics<br />

Table 6.4 A portion of an MSC.ADAMS command file showing the implementation of<br />

differential equations to retrieve and use integral and derivative terms for a state variable<br />

! -- Derivative Term - not generally used --<br />

part create equation differential_equation &<br />

differential_equation_name .test.yaw_rate_error_equation_1 &<br />

adams_id 3 &<br />

comments “Yaw Rate Error Equation - Implicit” &<br />

initial_condition 0.0 &<br />

function “DIF(3)-varval(yaw_rate_error)” &<br />

implicit on &<br />

static_hold off<br />

data_element create variable &<br />

variable_name yaw_rate_error_derivative &<br />

function “DIF1(3)”<br />

! -- Integral Term --<br />

part create equation differential_equation &<br />

differential_equation_name .test.yaw_rate_error_equation_2 &<br />

adams_id 4 &<br />

comments “Yaw Rate Error Equation - Explicit” &<br />

initial_condition 0.0 &<br />

function “varval(yaw_rate_error)” &<br />

implicit off &<br />

static_hold off<br />

data_element create variable &<br />

variable_name yaw_rate_error_integral &<br />

function “(DIF(4))”<br />

! Steer input torque in response to path error.<br />

force create direct single_component_force &<br />

single_component_force_name yaw_rate_handwheel_torque &<br />

type_of_freedom rotational &<br />

action_only on &<br />

i_marker_name .hand_wheel_column.m_wheel_column &<br />

j_marker_name .hand_wheel_column.m_wheel_column &<br />

function “(“, &<br />

“ VARVAL(yaw_rate_error) * VARVAL(yp_gain) ”, &<br />

“ VARVAL(yaw_rate_error_integral) * VARVAL(yi_gain) ”, &<br />

“ VARVAL(yaw_rate_error_derivative)* VARVAL(yd_gain) ”, &<br />

“)”, &<br />

“* STEP(TIME,0.0,0.0,1.0,1.0)”<br />

of a command file from MSC.ADAMS implementing those terms for yaw<br />

rate. While it is a working example, no claim is made that is in any sense<br />

optimum.<br />

Such variables can usually be manipulated within the model using the programming<br />

syntax provided with the code being used. For simulation codes<br />

such as MSC.ADAMS, the format of such calculations can appear a little<br />

clumsy but this soon disappears with familiarity. The most recent versions<br />

of MSC.ADAMS include a ‘control toolbox’ to facilitate the implementation<br />

of PID controllers. For codes such as MATLAB/Simulink the implementation<br />

of control systems is arguably easier since they are written with<br />

the prime objective of control system modelling. However, the modelling<br />

of the vehicle as a plant is more difficult within these systems and so there

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!