Template Basics
Your template-based product's library includes a variety of templates. Templates define the topology,
major role, and default parameters for
subsystems. This tab includes template information that is specific to your product.
For general template information, as well as information about the other files that make up model architecture, see
Building Models.
Conventions in Template Descriptions
For each template description, we provide the following:
■Overview - A brief description of the template.
■Template Name - The file name containing the template.
■Major Role - The major role of the template.
■Application - The types of analyses in which you can use the template.
■Description - A complete description of the template and its use.
■Limitations - Limitations of the template design that you should be aware of.
■Files Referenced - The property or MNF files that the template uses to define such entities as bushings, springs, and flexible bodies.
■Topology - How the different entities of the template connect and how forces or torques are transferred from one entity to another.
■Parameter Variables - The parameter variables that store key information in the template. For example, in templates, parameter variables often store angles for a suspension or the orientation of axes.
■Communicators - Communicators used in the template.
■Notes - Miscellaneous information about the template.
When we refer to communicator and parameter names, we often use the notation [lr] to indicate that there is both a left and right communicator or parameter of the specified name.
About Designing Templates
Adams Car
templates are parameterized models in which you define the topology of vehicle components. Building a template means defining parts, how they connect to each other, and how the template communicates information to other templates and the test rig.
At the template level, it is not crucial that you correctly define the parts, assign force characteristics, and assign mass properties, because you can modify these values at the subsystem level. It is very important, however, to correctly define part connectivity and exchange of information, because you cannot modify them at the subsystem level.
When building templates, keep in mind the assembly process. That is, make sure that your templates can communicate to each other and can communicate to the test rigs you specify. In Adams Car,
communicators define how models communicate.
Template Updates
The 2005 Driving Machine employs vehicle controllers developed by MSC Software, commonly known as Machine Control, which replaces DriverLite functionality, and Adams SmartDriver. You must update Adams Car 2003 powertrain and body templates to make the compatible with the enhanced Driving Machine in Adams Car.
To better control speed and path, the 2005 Driving Machine needs additional information about the vehicle. In particular, the speed controller uses a feed-forward function to ensure quick and accurate response. However, this requires information about the available engine brake torque, engine drive torque, brake torque, and aerodynamic drag. You supply this information by creating new output communicators in your templates powertrain and body/aerodynamic templates. In addition, you must also enter vehicle parameter data, such as overall steering ratio that is stored in the assembly file.
Powertrain Template Update
You should update powertrain templates by creating new output communicators to match the following input communicators in the testrig used by the Driving Machine:
■testrig.cis_max_engine_driving_torque
■testrig.cis_max_engine_braking_torque
■testrig.cis_engine_speed
■testrig.cis_engine_map
Maximum engine driving and braking torques
For closed-loop machine control, the maximum engine driving and braking torques must be communicated to the Driving Machine. The machine control uses these values in its feed forward computations when determining the needed throttle and brake inputs to achieve a target longitudinal acceleration. The Driving Machine expects powertrain templates to provide these torques as Solver Variables. The torques should depend on the engine speed. You must add two output communicators to your powertrain template and the corresponding entities that are output. The entities are data element solver variables that compute the maximum driving and maximum braking torques the powertrain subsystem produces at the current engine speed. Note that without this information machine control of the vehicle speed and/or longitudinal acceleration will be unreliable.
In the powertrain.tpl and .powertrain_lt.tpl template files distributed in the shared car database, there are Adams Solver VARIABLEs with functions computing the maximum powertrain torque (fully open throttle) and maximum powertrain brake torque (closed throttle):
AKISPL(MAX(0,VARVAL(engine_speed)/ucf_angle_to_radians),1,gss_engine_torque)
AKISPL(MAX(0,VARVAL(engine_speed)/ucf_angle_to_radians),0,gss_engine_torque)
These functions interpolate the 3D engine map spline at the current engine speed for at full throttle (max engine driving torque) and closed (0) throttle position (max engine braking torque).
The output communicators you create to output these Adams Solver VARIABLE are:
Name: engine_driving_torque
Matching Name: engine_maximum_driving_torque
Entity Type: solver_variable
Minor Role: inherit
Entity: engine_driving_torque
Name: engine_braking_torque
Matching Name: engine_maximum_braking_torque
Entity Type: solver_variable
Minor Role: inherit
Entity: engine_braking_torque
Engine Map
If your powertrain contains an engine map spline (torque vs. engine speed and throttle position), you can output the spline to the Driving Machine via an output communicator to achieve better control of speed and longitudinal acceleration. However, the engine map is optional. Define the engine_map output communicator as:
Name: engine_map
Matching Name: engine_map
Entity Type: spline
Minor Role: inherit
Entity: gss_engine_torque
In the templates powertrain.tpl and powertrain_lt.tpl distributed in the shared car database, the engine_map output communicators reference the gss_engine_torque spline entity. In your own templates, choose the appropriate spline.
The engine speed is a solver variable outputting the engine speed in radians/s.
Engine speed
In the case of a closed-loop controller on the vehicle forward velocity, you must define an output communicator in your powertrain template, as follows:
Name: engine_speed
Matching Name: engine_speed
Entity Type: solver_variable
Minor Role: inherit
Entity: engine_speed
The solver variable, engine_speed, represents the engine rotational velocity expressed in angular/time units [rad/second]. In the powertrain template distributed in the shared car database , engine_speed is defined as MAX(0,DIF(._powertrain.engine_omega)).
The __mdi_sdi_testrig references the output communicator you define and SmartDriver uses that communicator in the smart_driver_controller_inputs_array. The SmartDriver controller input array references various entities used to sense certain vehicle states. Adding the engine_speed communicator enables the longitudinal controller so you can perform a constant-speed maneuver or any other type of closed-loop machine control.
Aero Drag Force
If your vehicle model includes aerodynamic forces, then the drag force affects the longitudinal dynamics of the vehicle. The feed-forward speed controller can account for the drag force when predicting the throttle position needed to follow velocity or acceleration profile, if you create an output communicator that passes the aerodynamic drag force to the __mdi_sdi_testrig. If your vehicle model does not include aerodynamic forces, then you do not need to create an output communicator for the drag force.
The chassis template delivered in the shared car database, for example, has an aerodynamic force modeled using a GFORCE. The GFORCE’s drag (longitudinal) force component is measured in a solver VARIABLE named aero_drag_force with this function expression:
GFORCE(aero_forces,0,4,aero_drag_reference_marker)
Then, the aerodynamic drag is output to the __mdi_sdi_testrig using output communicator of type solver variable:
Name: aero_drag_force
Matching Name: aero_drag_force
Entity Type: solver_variable
Minor Role: inherit
Entity: aero_drag_force
The chassis templates (_rigid_chassis_pickup.tpl, _rigid_chassis_bof.tpl, _rigid_chassis_bed_bof.tpl, _rigid_chassis_two_body.tpl) delivered in the acar_concept database, for example has aerodynamic forces modelled using a more detailed
aerodynamics implementation.
Other Vehicle Parameters
Some sets of quantities that are used by the Adams SmartDriver lateral and longitudinal controllers cannot be easily inferred from the vehicle model. These quantities are defined in the test rig as parameter variables and are easily accessible. To modify vehicle parameters, display the Set Full-Vehicle Parameters dialog. From the Simulate menu, point to Full Vehicle Analysis, and then select Set Full-Vehicle Parameters.
In the resulting dialog box, you can set the following ratios that affect the lateral dynamics of the vehicle, providing Adams SmartDriver information about the characteristics of the steering system. Bad values almost certainly guarantee solver failure in closed-loop events or, if successful, the vehicle will most certainly be off course.
■Steering Ratio - Dimensionless ratio between the steering wheel angle and the road wheel angle. You can obtain this value by running a steering analysis on the front suspension and steering assembly.
■Steering Rack Ratio - Ratio (angle/length) between the steering hand wheel and the rack displacement expressed in S.I. units. This parameter influences the response of the controller only when driving by force/displacement.
The following parameters help Adams SmartDriver in predicting and calculating the brake signal:
■Max. Front/Rear Brake Torque - Maximum torque, expressed in model units, representing the torque generated for each front/rear brake in condition of maximum brake demand, also expressed in model units.
■N.B. - Currently these torques are interpreted assuming the vehicle has 2 brakes (left and right) in the front, and 2 more in the rear. As a workaround for vehicles with a different number of brakes (for example, trucks with multiple braked axles) these torques can be scaled to compensate. For example, for a tractor unit driven bobtail with two braked rear axles and load sensitive metering of the rear brake pressure, if the four individual brakes on the rear axles would produce torques of 1.6e7 Nmm each given full brake pressure and the load sensitive metering is expected to reduce the brake pressure to an average of 45% of the available value during the bobtail simulation, then the Max. Rear Brake Torque should be specified as 1.6e7*(4/2)*0.45 = 1.44e7. Similarly, for a tractor trailer combination with a total of 8 brakes in the rear (4 on the 2 rear axles of the tractor and 4 on two axles on the trailer), the Max. Rear Brake Torque should be increased to four (8/2) times the nominal value.
■Brake Bias - Front to rear dimensionless ratio. It can be computed as max_front_brake_torque / (max_front_brake_torque + max_rear_brake_torque).
These parameters are saved to the assembly file, as well as to the test rig in session.
Creating Topology for Your Templates
Topology in Adams Car consists of creating elements, such as hardpoints, parts, attachments, and parameters that define
subsystems, as explained next:
■Creating hardpoints - You first create hardpoints.
Hardpoints are the Adams Car elements that define all key locations in your model. They are the most elementary building blocks that you can use to parameterize locations and orientations for higher-level entities. Hardpoint locations define most parts and attachments. Hardpoints are only defined by their coordinate locations.
■Creating parts - Once you’ve defined hardpoints, you create parts and define them using the hardpoints that you created. In this tutorial, you create two types of parts:
General Parts, such as control arm and wheel carrier, and
Mount Parts.
■Creating attachments - Finally, you create the attachments, such as joints and bushings, and parameters which tell Adams Car how the parts react in relation to one another. You can define attachments for the compliant and kinematic analysis modes. The compliant mode uses bushings, while the kinematic mode uses joints.
Before you begin to build a template, you must decide what elements are most appropriate for your model. You must also decide which geometries seem most applicable to each part or whether you want any geometry at all. Once you’ve decided, you create a template and create the basic topology for it.