Complete Vehicle Model

About the Complete Vehicle Model

The full car drivetrain simulation of the sdl_vehicle example encompasses all the basic methods of driveline modeling and many key Simscape™ Driveline™ features. It includes engine and transmission models and a model of the drivetrain-wheel-road coupling. The engine and transmission are coupled with a torque converter. Programmed clutch control steps the transmission through four gears during the simulation. The clutch pressure signals are smooth and more realistic than the sharp clutch pressure signals in the simpler drivetrain examples. This section describes these features, subsystems, and their relationship and purposes, leading you to actual simulation.

Understanding the Model's Global Structure

Open the example. The model pre-load function defines a set of workspace variables in MATLAB® used by some of the blocks. Note the major systems of this car model.

Complete Vehicle Model

The main driveline subsystems are:

  • Engine

  • Transmission

  • Transmission controller

  • Vehicle and tires

The largest subsystem is the CR-CR 4-speed transmission. While the engine is idling initially at a nonzero speed, the transmission output and the vehicle as a whole are initially not moving.

Model the Engine

Simscape Driveline software is primarily devoted to modeling the rotational dynamics of drivelines, accepting rotational power from any source that can be modeled in Simulink® and converted to a connection line transferring torque. In most applications, your modeled driveline power and torque sources represent engines and motors. For the purposes of system modeling, an engine or motor specifies an output torque as a function of driveline speed. However you specify the behavior of the engine or motor, its Simscape Driveline output is a connector port transferring torque to the rest of the system.

Using an Engine Block from Vehicle Components

The Engines library contains blocks representing simple engine models. You control these engine models with an input physical signal for the throttle. The heart of the engine model is a function that specifies the maximum engine torque possible for each engine speed. The throttle signal controls how much torque, from this maximum possible, that the engine can deliver. The maximum possible torque itself is a function of the engine speed at any instant.

The sdl_vehicle example uses a Generic Engine block, configured as spark-ignition type. The block properties specified in its dialog box include the engine's maximum power, its speed at maximum power, and its maximum possible speed. The throttle signal is a physical constant. Open these blocks to view these settings and the throttle profile. The throttle signal is programmed to produce a realistic acceleration profile and to be consistent with the gear shifting sequence described in Control the Clutches. The engine torque and motion are modeled relative to the rotational ground, which is taken as the engine's base reference and the starting point of the driveline, or mechanical rotational, connections in this model.

Engine Dynamics Subsystem

Learn more about the Engine block models from their block reference pages.

Alternative and Advanced Methods for Modeling Engines

The engine models of the Engines library are simple. You can create your own, more complex, engine models by elaborating on the basic pattern of engine speed determining engine torque output. The complete engine model involves a feedback loop because the output torque, once connected to the external load, determines how fast the output driveshaft spins. The engine model then uses this output speed to set the maximum possible torque.

Several important engine features to consider in a more complete model are:

  • Distinguishing steady-state behavior from engine start-up, when the engine speed-engine torque function has not yet reached its maximum possible envelope

  • Details of mechanical power production, such as air-fuel compression and combustion

  • Additional controls beyond what can be represented by a single throttle signal

Model the Transmission

The CR-CR 4-speed transmission subsystem in the sdl_vehicle model is similar to other examples with the same transmission. The clutch and planetary gear properties are set in the blocks with workspace variables.

Workspace VariableDescription
eff_tor_radClutch: effective torque radius (m)
num_fric_surfClutch: number of friction surfaces in contact
engagement_areaClutch: friction surface area in contact (m2)
fric_coeffClutch: kinetic friction coefficient of surfaces in contact
peak_normalClutch: static (locking) friction coefficient of surfaces in contact
velTolClutch: clutch velocity locking tolerance (rad/s)
pressThreshClutch: Normalized pressure threshold
p0Clutch: Physical pressure normalization (Pa)

For more about gears, clutches, and transmissions, see the Disk Friction Clutch block reference page.

Couple the Engine to the Transmission

The sdl_vehicle model couples the engine and the transmission through a torque converter subsystem.

Torque Converter Stage

Like clutch, a torque converter couples two independent driveline axes in such a way as to transfer angular motion and torque from an input to an output shaft. However, unlike a clutch, a torque converter never locks and the output shaft never exactly reaches the speed of the input. (The torque converter transfers motion by hydrodynamic viscosity, not by surface friction.) Thus a torque converter does not step through discrete stages and avoids the motion discontinuities inherent in friction clutches.

To mimic engine idling at the start of the simulation, the initial condition of the Impeller inertia is a nonzero angular velocity. The initial condition of the Turbine & input shaft inertia is zero speed.

For more details about these blocks, see the Torque Converter and Inertia block reference pages.

Model the Wheels, Tires, and Road

The CR-CR 4-speed transmission feeds its output torque to the final drive subsystem, Vehicle and tire dynamics. This subsystem represents the vehicle inertia (the load on the transmission), the wheels, and the wheel contact with the road. The dynamics models only the rear wheels as driven by the transmission.

Final Drive Subsystem: Vehicle Load, Wheels, and Road Coupling

The subsystem has two major areas.

Modeling the Tires

On the left of the figure are the two Tires, which accept the driveline torque and rotation from the transmission at their wheel axle rotational ports (A). Given a normal or vertical load (N), this torque and rotation are converted to a thrust force and translation at the wheel hub translational ports (H).

The tires rotate nonideally, developing slip as they generate traction and react against the road surface. The tire slip of the left tire is reported as a physical signal and converted to Simulink for use with the Tire slip scope.

Modeling the Vehicle Body and Load

The driveline connection line sequence of the model ends with the Vehicle Body block, which specifies the vehicle geometry, mass, aerodynamic drag, and initial velocity (zero). This block generates the normal forces that the Tire blocks accept as vertical loads. Vehicle Body accepts the developed thrust force and motion at its horizontal motion translational port (H). The vehicle body model also requires a wind velocity (W) and a road incline (beta), both provided by physical constants.

The rear wheel vertical load force (NR) is reported back to the Tire blocks. The forward wheel vertical load (NF) is not used.

The vehicle's forward velocity (V) is converted and reported, through the subsystem outport, to the Vehicle velocity scope.

Alternative Differential, Wheel, Road, and Braking Models

The sdl_vehicle example models only the rear wheels, the rear tires, and the vehicle body, without the more realistic drivetrain components of differential gears and brakes. The sdl_4wd_dynamics example illustrates how to model a vehicle with four wheels, as well as front and rear differential gears.

You can create and add a brake model built around a clutch. See Brake Motion with Clutches and Model a Two-Speed Transmission with Braking.

Control the Clutches

Return to the main model window of sdl_vehicle. To simulate car motion, the vehicle model requires control signals. One of these signals controls the throttle, as described in Model the Engine. The other signals control the clutches. Run the Model presents the full interplay of these control signals and how they determine the simulation results.

Programming the Transmission Clutches

The Transmission controller subsystem controls the five clutches of the CR-CR 4-Speed transmission subsystem.

  1. Open the Transmission controller. The Signal Builder block, called Clutch pressure signals, contributes five individual signals to lock or unlock the four forward clutches of the CR-CR transmission, and to keep the reverse clutch unlocked.

    Master Transmission Clutch Control

  2. Close the Transmission controller subsystem.

  3. Open the Clutch pressure signals block.

    Programmed Clutch Pressure Signals

    While the reverse clutch (R) remains unlocked for the entire simulation, the four forward clutches (A, B, C, D) are put through a locking and unlocking sequence that produces a fixed gear-changing sequence for the transmission as a whole: first gear, second gear, third gear, and fourth gear, at 0, 10, 35, and 75 seconds, respectively, of simulation time.

    For more details about this transmission and its clutch schedule, see Model a CR-CR 4-Speed Transmission Driveline with Braking.

  4. Close the Clutch pressure signals block.

Shaping Clutch Pressure Signals

To add realism to the clutch control signals, these signals are filtered through Transfer Fcn blocks (Actuator Dynamics) that smooth their rise and fall, instead of the sharp steps of the original signals.

In the Actuator Dynamics blocks, the characteristic rise/fall time of the transfer functions is set by the workspace variable clutchRise, with units of seconds. If s0 = 1/clutchRise, the transfer functions have the form s0/(s+s0).

Run the Model

Simulate the car. The model is configured to simulate for 150 seconds.

  1. After closing all subsystems, open the Vehicle velocity, Speed ratio, and Engine RPM scopes.

  2. Open the Engine dynamics and the Vehicle and tire dynamics subsystems. Open the Engine power and Tire slip scopes. Close the subsystems.

  3. Review the simulation sequence before starting the model.

    Time RangesCR-CR Gear Settings
    0 – 101
    10 – 352
    35 – 753
    75 – 1504

  4. Start the simulation, then review the scope outputs.

Engine Speed and Power

The Engine RPM scope shows the engine speed in revolutions per minute (rpm), as well as the engine output power delivered to the Torque Converter, in watts (W). When the transmission shifts to second gear at 10 seconds, the engine reaches its maximum speed and power.

Vehicle Speed

The Vehicle Velocity scope displays the vehicle's linear velocity in miles per hour (mph).

Drive Ratio

The Speed ratio scope measures the effective gear ratio of the CR-CR 4-speed transmission by computing the ratio of the output shaft to the input shaft angular velocities, respectively. (This ratio is the reciprocal of the drive ratio.) As the transmission shifts through each gear from 1 to 4, its speed ratio goes up, and the drive ratio goes down.

Tire Slip

The Tire slip scope displays the tire slip, in percent, of the rear tires. As the transmission steps into higher gears, the speed ratio rises. The drive ratio falls, and the tire slip decreases. The tire motion more closely approaches ideal (nonslipping) motion at higher speeds and lower drive ratios.

Was this topic helpful?