# Crankshaft

**Libraries:**

Simscape /
Driveline /
Engines & Motors /
Engine Subcomponents

## Description

The Crankshaft block represents the crankshaft component of an abstracted internal combustion engine. Connect this block to one or more SI Combustion Cylinder blocks to compute the crank-angle-resolved instantaneous torque.

### Equations

The generic torque-speed-power relationship governs the block, such that

$$\tau \cdot \omega =P,$$

where

*τ*is the torque.*ω*is the rotational speed, which the block assumes is nonnegative.*P*is the power.

The block calculates the power as

$$P={\displaystyle \sum _{i=1}^{N}{P}_{i}},$$

where *N* is the value of the **Number
of cylinders** parameter. The block calculates *ω* as
the time derivative of the crank position, *θ*, such that

$$\frac{d}{dt}\theta =\omega .$$

The constant *ω _{c}* is the

**Threshold to avoid divide-by-zero**parameter. When

*ω*<

*ω*, the block applies 1/

_{c}*ω*linearization.

$$\tau =\{\begin{array}{cc}\begin{array}{l}\frac{P}{\omega}\\ P\cdot \left(\frac{2}{\omega}-\frac{\omega}{{\omega}_{c}^{2}}\right)\end{array}& \begin{array}{r}\omega \ge {\omega}_{c}\\ \\ \omega <{\omega}_{c}\end{array}\end{array}$$

**Crank Position**

The block calculates the crank position with respect to the top dead center position for
each combustion cylinder, where 0 ≤ *θ _{i}* ≤
720 degrees. How the block performs this calculation depends on

*N*. For all values of

*N*,

*θ*=

_{1}*θ*. For

*N*= 2,

*θ*=

_{2}*θ*+

_{1}*Δ*, where

*Δ*is the

**Spark angle difference**parameter. This parameter value is specific to the engine you want to model. It may be a value such as 270° or 360°. When

*N*= 3, the block assumes that the cylinders are evenly phased such that

$$\begin{array}{l}{\theta}_{2}={\theta}_{1}+\left(1\cdot \frac{720}{3}\right)\\ {\theta}_{3}={\theta}_{1}+\left(2\cdot \frac{720}{3}\right)\end{array}$$

When *N* = 4, the block assumes that the cylinders are evenly phased at
180° and enables the **Firing order** parameter.

## Examples

## Ports

### Input

### Output

### Conserving

## Parameters

## Version History

**Introduced in R2022a**