In this modeling and simulation tutorial, we are going to analyze the dynamic behavior of a simple vehicle driveline model. Let’s consider that the driveline consists of an engine, a gearbox and a wheel. The engine is modeled as a **lumped inertia**, the gearbox as a fixed gear ratio and the rest of the driveline (after the gearbox) and the wheels as another inertia.

where:

J_{1} [kgm^{2}] – engine + transmission (engine side) inertia

J_{2} [kgm^{2}] – transmisson (wheel side) + wheels inertia

c_{1} [Ns/m] – viscous damping coefficient on engine side

c_{2} [Ns/m] – viscous damping coefficient on wheel side

i [-] – gear ratio

In order to simplify things we’ll assume that:

- the shafts are stiff, without elasticity (stiffness coefficients)
- the inertia of different components (e.g. clutch, propeller shaft) are contained in the engine and wheel inertia
- there are no losses in the system (e.g. gearbox losses)

The gear ratio *i* is defined as the ratio between the radius *b [mm]* of the output gear and the radius *a [mm]* of the input gear.

First step is to draw the **free body diagram (FBD)** of the system.

where:

T_{1} [Nm] – effective engine torque (input)

T_{i1} [Nm] – engine side inertial torque

T_{d1} [Nm] – engine side damping torque

T_{i2} [Nm] – wheel side inertial torque

T_{d2} [Nm] – wheel side damping torque

a [mm] – radius of input gear

b [mm] – radius of output gear

X_{1} [N] – tangential force in the gear mesh at the input wheel

X_{2} [N] – tangential force in the gear mesh at the output wheel

D’Alembert’s law states that the sum of the torques (internal and external), which act on a body (inertia), are equal to zero:

\[\sum T = 0\]Based on this law we can write the equations of equilibrium for each inertia:

\[T_1 – T_{i1} – T_{d1} – X_1 a = 0 \tag{1}\]From this equation we extract the expression of the tangential force in the gear mesh at the input wheel:

\[X_1 = \frac{1}{a} \left (T_1 – T_{i1} – T_{d1} \right )\]The inertial torque and damping torque at the engine side are expressed function of:

\[ \begin{split}T_{i1} &= J_1 \epsilon_1 = J_1 \frac{d \omega_1}{dt} = J_1 \frac{d^2 \alpha_1}{dt^2}\\

T_{d1} &= c_1 \omega_1 = c_1 \frac{d \alpha_1}{dt}\\

\end{split} \]

where:

α_{1} [rad] – angle of rotation of engine lumped inertia

ω_{1} [rad/s] – angular speed of engine lumped inertia

ε_{1} [rad/s^{2}] – angular acceleration of engine lumped inertia

Replacing the inertial and damping engine torque in equation (1) gives:

\[X_1 = \frac{1}{a} \left (T_1 -J_1 \frac{d^2 \alpha_1}{dt^2} – c_1 \frac{d \alpha_1}{dt} \right )\]Following the same approach for the wheel side inertia, we get the second equation of equilibrium:

\[X_2 b – T_{i2} – T_{d2} = 0 \tag{2}\]Extracting the expression of the tangential force in the gear mesh at the output wheel, we get:

\[X_2 = \frac{1}{b} \left (T_{i2} + T_{d2} \right )\]The inertial torque and damping torque at the wheel side are expressed function of:

\[ \begin{split}T_{i2} &= J_2 \epsilon_2 = J_2 \frac{d \omega_2}{dt} = J_2 \frac{d^2 \alpha_2}{dt^2}\\

T_{d2} &= c_2 \omega_2 = c_2 \frac{d \alpha_2}{dt}\\

\end{split} \]

where:

α_{2} [rad] – angle of rotation of wheel lumped inertia

ω_{2} [rad/s] – angular speed of wheel lumped inertia

ε_{2} [rad/s2] – angular acceleration of wheel lumped inertia

Replacing the inertial and damping wheel torque in equation (2) gives:

\[X_2 = \frac{1}{b} \left (J_2 \frac{d^2 \alpha_2}{dt^2} + c_2 \frac{d \alpha_2}{dt} \right )\]There is a kinematic relationship between the two inertia, give by the gear ratio *i*:

\alpha_1 &= i \alpha_2\\

\frac{d \alpha_1}{dt} &= i \frac{d \alpha_2}{dt}\\

\frac{d^2 \alpha_1}{dt^2} &= i \frac{d^2 \alpha_2}{dt^2}

\end{split} \]

We also know that in any gear mesh, the tangential (contact) force between the gear is the same for both gears:

\[X_1 = X_2\]Replacing the expression for the tangential forces, we get:

\[\frac{1}{a} \left (T_1 -J_1 \frac{d^2 \alpha_1}{dt^2} – c_1 \frac{d \alpha_1}{dt} \right ) = \frac{1}{b} \left (J_2 \frac{d^2 \alpha_2}{dt^2} + c_2 \frac{d \alpha_2}{dt} \right )\]Putting *b* in the left side of the equation gives:

Since we are interested in the wheel (output) speed behavior, for a given input engine torque *T _{1}*, we are going to replace all the kinematic relationships in equation (3):

Now we have a differential equations with all the differential terms function of *α _{2}*:

For simplification, we are going to define two constants *A* and *B*, as the coefficients of the differential terms:

A &= (J_2 + i^2 J_1)\\

B &= (c_2 + i^2 c_1)\\

i T_1 &= A \frac{d^2 \alpha_2}{dt^2} + B \frac{d \alpha_2}{dt}

\end{split} \]

We now have a second order ordinary differential equation (ODE) which describes the dynamics of our simplified lumped parameters driveline model.

In order to help the integration of the ODE in Xcos, we need to keep only the second derivative on the left side of the equal sign:

\[\frac{d^2 \alpha_2}{dt^2} = \frac{1}{A} \left ( i T_1 -B \frac{d \alpha_2}{dt} \right )\]**Xcos block diagram model**

Before running the simulation load the parameters in the Scilab workspace:

`J1 = 0.16;`

`J2 = 1.72;`

`c1 = 0.5;`

`c2 = 0.05;`

`i = 3.5;`

`A = J2 + J1*i^2;`

`B = c2 + c1*i^2;`

The input torque is a *100 Nm* step at *t = 1 s*. Both angular speed and position initial conditions are zero. The simulation is run for *10 s*.

To plot the system’s output (angular speed of the wheel inertia) run the following post-processing Scilab instructions:

subplot(2,1,1) plot(simOut.time,simOut.values(:,1),'r'), xgrid() ylabel('$T_1 \quad [Nm]$','FontSize',3) subplot(2,1,2) plot(simOut.time,simOut.values(:,3)*180/%pi), xgrid() xlabel('$t \quad [s]$','FontSize',3) ylabel('$n_2 \quad [rpm]$','FontSize',3)

By running the above Scilab instructions, we get the following graphical window:

The simplified driveline model behaves as a first order system. Due to the damping coefficient, for a step input torque of *100 Nm*, it takes the wheel around *2.5 s* to accelerate at *2500 rpm*. In order to improve the accuracy of the model we could consider also a load torque on the wheel inertia, which will simulate the road losses, aerodynamic losses and gradient losses..

For any questions or observations regarding this tutorial please use the comment form below.

Don’t forget to Like, Share and Subscribe!

## lamia faris

hello i have two node the first is driver and the second is autonomous i want to calculate the velocity and acceleration of two node i work in ns2 please can you help me

thanks