# Differential

Gear mechanism that allows driven shafts to spin at different speeds

## Library

Simscape / Driveline / Gears

## Description

This block represents a gear mechanism that allows the driven shafts to spin at different speeds. Differentials are common in automobiles, where they enable the various wheels to spin at different speeds while cornering. Ports S, D1, and D2 represent the driving and driven shafts of the differential. Any of the shafts can drive the remaining two.

The block models the differential mechanism as a structural component based on Simple Gear and Sun-Planet Bevel Simscape™ Driveline™ blocks. The figure shows the block diagram of this structural component.

To increase the fidelity of the gear model, you can specify properties such as gear inertia, meshing losses, and viscous losses. By default, gear inertia and viscous losses are assumed negligible. The block enables you to specify the inertias of the gear carrier and internal planet gears only. To model the inertias of the outer gears, connect Simscape Inertia blocks to ports D, S1, and S2.

### Thermal Modeling

You can model the effects of heat flow and temperature change through an optional thermal conserving port. By default, the thermal port is hidden. To expose the thermal port, right-click the block in your model and, from the context menu, select Simscape > Block choices. Select a variant that includes a thermal port. Specify the associated thermal parameters for the component.

## Differential Gear Model

### Ideal Gear Constraints and Gear Ratios

Differential imposes one kinematic constraint on the three connected axes:

ωD = ±(1/2)gD(ωS1 + ωS2) ,

with the upper (+) or lower (–) sign valid for the differential crown to the right or left, respectively, of the centerline. The three degrees of freedom reduce to two independent degrees of freedom. The gear pairs are (1,2) = (S,S) and (C,D). C is the carrier.

The sum of the lateral motions is the transformed longitudinal motion. The difference of side motions ωS1ωS2 is independent of the longitudinal motion. The general motion of the lateral shafts is a superposition of these two independent degrees of freedom, which have this physical significance:

• One degree of freedom (longitudinal) is equivalent to the two lateral shafts rotating at the same angular velocity (ωS1 = ωS2) and at a fixed ratio with respect to the longitudinal shaft.

• The other degree of freedom (differential) is equivalent to keeping the longitudinal shaft locked (ωD = 0) while the lateral shafts rotate with respect to each other in opposite directions (ωS1 = –ωS2).

The torques along the lateral axes, τS1 and τS2, are constrained to the longitudinal torque τD in such a way that the power flows into and out of the gear, less any power loss Ploss, sum to zero:

ωS1τS1 + ωS2τS2 + ωDτDPloss= 0 .

When the kinematic and power constraints are combined, the ideal case yields:

gDτD = 2(ωS1τS1 + ωS2τS2) / (ωS1 + ωS2) .

### Nonideal Gear Constraints and Losses

In the nonideal case, τloss ≠ 0. See Model Gears with Losses.

## Ports

PortDescription
DRotational conserving port representing the longitudinal driveshaft
S1Rotational conserving port representing one of the sun gears
S2Rotational conserving port representing one of the sun gears
HThermal conserving port for thermal modeling

## Parameters

### Main

Crown wheel located

Select the placement of the bevel crown gear with respect to the centerline of the gear assembly. The default is ```To the right of the centerline```.

Carrier (C) to driveshaft (D) teeth ratio (NC/ND)

Fixed ratio gD of the carrier gear to the longitudinal driveshaft gear. The default is `4`.

### Meshing Losses

Parameters for meshing losses vary with the block variant chosen—one with a thermal port for thermal modeling and one without it.

### Viscous Losses

Sun-carrier and driveshaft-casing viscous friction coefficients

Vector of viscous friction coefficients [μS μD] for the sun-carrier and longitudinal driveshaft-casing gear motions, respectively. The default is `[0 0]`.

From the drop-down list, choose units. The default is newton-meters/(radians/second) (`N*m/(rad/s)`).

### Inertia

Carrier inertia

Moment of inertia of the planet gear carrier. This value must be positive or zero. Enter `0` to ignore carrier inertia. The default value is `0` kg*m^2.

Planet gear inertia

Moment of inertia of the combined planet gears. This value must be positive or zero. Enter `0` to ignore gear inertia. The default value is `0` kg*m^2.

### Thermal Port

Thermal mass

Thermal energy required to change the component temperature by a single degree. The greater the thermal mass, the more resistant the component is to temperature change. The default value is `50` J/K.

Initial temperature

Component temperature at the start of simulation. The initial temperature alters the component efficiency according to an efficiency vector that you specify, affecting the starting meshing or friction losses. The default value is `300` K.

## Extended Capabilities

### Real-Time and Hardware-in-the-Loop Simulation

For optimal simulation performance, use the Meshing Losses > Friction model parameter default setting, ```No meshing losses - Suitable for HIL simulation```.