Main Content

# Piston Engine

Reciprocating combustion engine with variable number of pistons

## Library

Simscape / Driveline / Engines

## Description

The Piston Engine block represents a reciprocating combustion engine with multiple cylinders. The piston model accounts for the instantaneous torque transmitted to the engine drive shaft. The instantaneous torque enables you to model vibrations in the drivetrain due to piston revolution. To model just the piston mechanism of a combustion engine, use the Piston block.

Port B represents the translating piston and port F the rotating crankshaft. The piston force follows from the cylinder pressure and cross-sectional area. The block obtains the combustion pressure from a lookup table parameterized in terms of the crank angle and, optionally, the crank angular velocity and engine throttle level.

The crank torque follows from the piston force and crank angle as well as the crank and connecting rod lengths. In terms of these inputs, the ratio of the piston force and crank torque is

`$\frac{{T}_{\text{F}}}{{F}_{\text{B}}}=-\text{c}\left(sin\left(\theta \right)+\frac{sin\left(2\theta \right)}{2\sqrt{{\left(\frac{\text{r}}{\text{c}}\right)}^{2}-{\mathrm{sin}}^{2}\left(\theta \right)}}\right),$`

where:

• FB is the instantaneous piston force associated with the base port.

• TF is the instantaneous crank torque associated with the follower port.

• c is the crank length.

• θ is the instantaneous crank angle.

• r is the connecting rod length.

Piston Dimensions

Physical signal port T lets you specify the engine throttle level as a fraction between 0 and 1. This fraction corresponds to the percentage of full power generated. The block uses the physical signal input whenever the pressure lookup table in the block dialog box is parameterized only in terms of the crank angle.

## Ports

B

Conserving rotational port representing the engine block

F

Conserving rotational port representing the engine crankshaft

T

Physical signal input port for specifying the engine throttle setting

FC

Physical signal input port for specifying fuel consumption rate. This port is hidden by default. Selecting one of these options for the Fuel consumption model parameter in the Fuel Consumption settings exposes this port:

• `Constant per revolution`

• ```Fuel consumption by speed and torque```

• ```Brake specific fuel consumption by speed and torque```

• ```Brake specific fuel consumption by speed and brake mean effective pressure```

## Parameters

### Pistons

Number of pistons

Number of pistons in the combustion engine. The default number is `4`.

Offset angle vector

Vector of piston offset angles. The offset angle specifies the point in the engine cycle when the piston reaches top dead center. The engine cycle spans in angle from -S*180 to +S*180 degrees, where S is the number of strokes per cycle.

The vector size must be the same as the number of pistons. The default vector is `[0.0, 180.0, 360.0, -180.0]`, corresponding to a four-stroke, four-piston engine.

Cylinder bore

Internal diameter of the engine cylinder that the piston travels in. The default value is `0.10` m.

Piston stroke

Distance between the top dead center and bottom dead center piston positions. The default value is `0.06` m.

Piston rod length

Length of the connecting rod located between the engine piston and the crankshaft. The default value is `0.10` m.

Number of strokes per cycle

Number of strokes required to complete one engine cycle. One stroke corresponds to a full extension or retraction of the engine piston. A typical automobile engine is based on a four-stroke cycle with induction, compression, power, and exhaust stages. The default value is `4`

Pressure parameterization

Engine variables that the cylinder pressure depends on. Options include `By crank angle`, ```By crank angle and throttle```, ```By crank angle, throttle, and crank velocity```. The default setting is ```By crank angle```.

Crank angle vector

M-element vector of crank angles at which to specify the cylinder pressure. A zero angle corresponds to a piston at top dead center. The vector must range from -S*180 to +S*180 degrees, where S is the number of strokes per cycle. The default vector is an eight-element vector ranging in value from -360 to +360 deg, corresponding to a four-stroke cycle.

Throttle vector

N-element vector of engine throttle settings at which to specify the cylinder pressure. A value of `0` corresponds to no throttle and a value of `1` to full throttle. This parameter is active only when Pressure parameterization is set to `By crank angle and throttle` and ```By crank angle, throttle, and crank velocity```. The default vector is `[0.0, 0.3, 0.8, 1.0]`.

Crank velocity vector

L-element vector of crankshaft angular velocities at which to specify the cylinder pressure. This parameter is active only when Pressure parameterization is set to ```By crank angle, throttle, and crank velocity```. The default vector is `[0.0, 1000.0, 6000.0]` rpm.

Pressure vector

M-element vector of cylinder pressures corresponding to the crank angles specified in the Crank angle vector parameter. This parameter is active only when Pressure parameterization is set to `By crank angle`.

Pressure matrix (gauge)

M-by-N matrix of cylinder pressures corresponding to the crank angles and throttle settings specified in the Crank angle vector and Throttle vector parameters. This parameter is active only when Pressure parameterization is set to ```By crank angle and throttle```. The default matrix is an 8–by-4 matrix ranging in value from 0 to 50 bar.

Pressure matrix 3D (gauge)

M-by-N-by-L matrix of cylinder pressures corresponding to the crank angles, throttle settings, and crank angular velocity values specified in the Crank angle vector, Throttle vector, and Crank velocity vector parameters. This parameter is active only when Pressure parameterization is set to ```By crank angle, throttle, and crank velocity```. The default matrix is an 8–by-4–by-3 matrix ranging in value from 0 to 50 bar.

### Crankshaft

Shaft dynamics

Optional shaft dynamics parameters. Options include ```No shaft dynamics — Suitable for HIL simulation``` and ```Specify shaft stiffness, damping, and inertia```

Stiffness

Stiffness coefficient of the engine crankshaft. This parameter accounts for resistance to shaft deformation. This parameter is active only when the Shaft dynamics parameter is set to ```Specify shaft stiffness, damping, and inertia```. The default value is `1e6` N*m/rad.

Damping

Damping coefficients of the engine crankshaft. This parameter accounts for energy dissipation due to shaft deformation. This parameter is active only when the Shaft dynamics parameter is set to ```Specify shaft stiffness, damping, and inertia```. The default value is `1000` N*m/(rad/s).

Inertia

Moment of inertia of the crankshaft about its rotational axis. This parameter accounts for resistance to sudden changes in motion. This parameter is active only when the Shaft dynamics parameter is set to ```Specify shaft stiffness, damping, and inertia```. The default value is `0.02` kg*m^2.

Initial angular deflection

Deflection angle between the base and follower ends of the crankshaft at time zero. The deflection angle measures the angular deformation of the crankshaft due to torsion. This parameter is active only when the Shaft dynamics parameter is set to ```Specify shaft stiffness, damping, and inertia```. The default value is `0` deg.

Initial angular velocity

Angular velocity of the crankshaft at time zero. This parameter is active only when the Shaft dynamics parameter is set to ```Specify shaft stiffness, damping, and inertia```. The default value is `0` rpm.

Base and follower bearing viscous friction coefficients

Two-element vector with the viscous friction coefficients of the base and follower shaft bearings. The block uses viscous friction to account for energy losses between the base and follower shafts. The default vector is `[0.0, 0.0]` N*m/(rad/s), corresponding to zero damping.

Initial crank angle

Crank angle at time zero relative to a top dead center position. The default value is `90` deg.

### Fuel Consumption

The table shows how the visibility of some parameters depends on the option that you choose for other parameters. To learn how to read the table, see Parameter Dependencies.

Fuel Consumption Parameter Dependencies

Fuel Consumption
Fuel consumption model — Choose `No fuel consumption`, `Constant per revolution`, ```Fuel consumption by speed and torque```, ```Brake specific fuel consumption by speed and torque```, or ```Brake specific fuel consumption by speed and brake mean effective pressure```
No fuel consumptionConstant per revolutionFuel consumption by speed and torqueBrake specific fuel consumption by speed and torqueBrake specific fuel consumption by speed and brake mean effective pressure

Fuel consumption per revolution

Speed vector

Torque vector

Brake mean effective pressure vector

Fuel consumption table

Brake specific fuel consumption table

Interpolation method — Choose `Linear` or `Smooth`

Fuel consumption model

Select a model for calculating engine-fuel consumption. Model parameterizations are compatible with standard industrial data. Choose between these options:

• `No fuel consumption` — The default option

• `Constant per revolution`

• ```Fuel consumption by speed and torque```

• ```Brake specific fuel consumption by speed and torque```

• ```Brake specific fuel consumption by speed and brake mean effective pressure```

Selecting any option other than ```No fuel consumption``` exposes the FC port and related parameters. For more information, see the Fuel Consumption Parameter Dependencies table.

No fuel consumption

The block does not calculate fuel consumption. The FC port, which reports the fuel consumption rate, is not exposed. Selecting this option increases simulation speed.

Fuel consumption per revolution

Enter the volume of fuel consumed in one crankshaft revolution. The default is `25` `mg/rev`.

Selecting `Constant per revolution` for the Fuel consumption model parameter exposes this parameter.

For more information, see the Fuel Consumption Parameter Dependencies table.

Speed vector

Enter vector of engine speeds used in lookup table parameterizations. Vector size must match Torque vector size. The default is `[1000, 2000, 3000, 4000, 5000, 6000]` `rpm`. Selecting ```Fuel consumption by speed and torque```, ```Brake specific fuel consumption by speed and torque```, or ```Brake specific fuel consumption by speed and brake mean effective pressure``` for the Fuel consumption model parameter exposes this parameter.

For more information, see the Fuel Consumption Parameter Dependencies table.

Torque vector

Enter vector of engine torques used in the lookup table parameterizations. Vector size must match Speed vector size. The default is ```[0, 80, 160, 200, 240, 320, 360, 400]``` `N*m`. Selecting ```Fuel consumption by speed and torque``` or ```Brake specific fuel consumption by speed and torque``` for the Fuel consumption model parameter exposes this parameter.

For more information, see the Fuel Consumption Parameter Dependencies table.

Fuel consumption table

Enter matrix with fuel consumption rates corresponding to engine speed and torque vectors. The number of rows must equal the number of elements in the Speed vector. The number of columns must equal the number of elements in the Torque vector. The default is ```[.5, .9, 1.4, 1.6, 1.9, 2.7, 3.4, 4.4; 1, 1.7, 2.7, 3.1, 3.6, 5, 6, 7.4; 1.4, 2.7, 4, 4.8, 5.6, 7.5, 8.5, 10.5; 2, 3.6, 5.8, 6.7, 8, 10.4, 11.7, 13.3; 2.5, 4.8, 7.9, 9.4, 10.8, 14, 16.2, 18.6; 3.1, 6, 10.3, 11.9, 13.8, 18.4, 22, 26.5]``` `g/s`.

Selecting ```Fuel consumption by speed and torque``` for the Fuel consumption model parameter exposes this parameter.

For more information, see the Fuel Consumption Parameter Dependencies table.

Brake mean effective pressure vector

Enter vector of brake mean effective pressure (BMEP) values. The default is `[0, 250, 500, 625, 750, 1000, 1150, 1250]` `kPa`. The BMEP satisfies the expression:

`$BMEP=T\cdot \left(\frac{2\pi \cdot {n}_{c}}{{V}_{d}}\right)$`

where:

• T — Output torque

• nc — Number of cycles per revolution

• Vd — Cylinder displaced volume

Selecting ```Brake specific fuel consumption by speed and brake mean effective pressure``` for the Fuel consumption model parameter exposes this parameter.

For more information, see the Fuel Consumption Parameter Dependencies table.

Brake specific fuel consumption table

Selecting ```Brake specific fuel consumption by speed and torque``` or ```Brake specific fuel consumption by speed and brake mean effective pressure``` for the Fuel consumption model parameter exposes this parameter.

For more information, see the Fuel Consumption Parameter Dependencies table.

For the ```Brake specific fuel consumption by speed and torque``` fuel model, enter the matrix with brake specific fuel consumption (BSFC) rates corresponding to engine speed and torque vectors. BSFC is the ratio of the fuel consumption rate to the output power. The number of rows must equal the number of elements in the Speed vector. The number of columns must equal the number of elements in the Torque vector.

For the ```Brake specific fuel consumption by speed and brake mean effective pressure``` fuel model, enter the matrix with brake specific fuel consumption (BSFC) rates corresponding to engine speed and brake mean effective pressure (BMEP) vectors. BSFC is the ratio of the fuel consumption rate to the output power. The number of rows must equal the number of elements in the Speed vector. The number of columns must equal the number of elements in the Brake mean effective pressure vector.

For both fuel-consumption models, the default is ```[410, 380, 300, 280, 270, 290, 320, 380; 410, 370, 290, 270, 260, 270, 285, 320; 415, 380, 290, 275, 265, 270, 270, 300; 420, 390, 310, 290, 285, 280, 280, 285; 430, 410, 340, 320, 310, 300, 310, 320; 450, 430, 370, 340, 330, 330, 350, 380]``` `g/hr/kW`.

Interpolation method

Select the interpolation method used to calculate fuel consumption at intermediate speed-torque values. Methods are `Linear` and `Smooth`. Outside the data range, fuel consumption is held constant at the last value given in the lookup table. Selecting ```Fuel consumption by speed and torque```, ```Brake specific fuel consumption by speed and torque```, or ```Brake specific fuel consumption by speed and brake mean effective pressure``` for the Fuel consumption model parameter exposes this parameter.

For more information, see the Fuel Consumption Parameter Dependencies table.

## See Also

### Topics

Introduced in R2016a

Get trial now