Generic Engine

Internal combustion engine with throttle and rotational inertia and time lag

Engines

Description

The block represents a general internal combustion engine. Engine types include spark-ignition and diesel. Speed-power and speed-torque parameterizations are provided. A throttle physical signal input specifies the normalized engine torque. Optional dynamic parameters include crankshaft inertia and response time lag. A physical signal port outputs engine fuel consumption rate based on choice of fuel consumption model. An optional speed controller prevents engine stall and enables cruise control. See Generic Engine Model.

Dialog Box and Parameters

Engine Torque

Model parameterization

Select how to model the engine. The default is ```Normalized 3rd-order polynomial matched to peak power```.

• ```Normalized 3rd-order polynomial matched to peak power``` — Parametrize the engine with a power function controlled by power and speed characteristics.

• `Tabulated torque data` — Engine is parametrized by speed–torque table that you specify. If you select this option, the panel changes from its default.

• `Tabulated power data` — Engine is parametrized by speed-power table that you specify. If you select this option, the panel changes from its default.

Dynamics

Inertia

Select how to model the rotational inertia of the engine block. The default is `No inertia`.

• `No inertia` — Engine crankshaft is modeled with no inertia.

• `Specify inertia and initial velocity` — Engine crankshaft is modeled with rotational inertia and initial angular velocity. If you select this option, the panel changes from its default.

Engine time constant

Select how to model the time lag of the engine response. The default is `No time constant — Suitable for HIL simulation`.

• ```No time constant — Suitable for HIL simulation``` — Engine reacts with no time lag.

• ```Specify engine time constant and initial throttle``` — Engine reacts with a time lag. If you select this option, the panel changes from its default.

Limits

Speed threshold

Width of the speed range over which the engine torque is blended to zero as Ω approaches the stall speed. The default is `100`.

From the drop-down list, choose units. The default is revolutions per minute (`rpm`).

Fuel Consumption

Fuel consumption model

Select model to specify engine fuel consumption. Models range from simple to advanced parameterizations compatible with standard industrial data. The default model is `Constant per revolution`.

Speed Control

Idle speed control

Select speed control model. Options include ```No idle speed controller``` and ```Enable idle speed controller```.

• `No idle speed controller` — Omit idle speed controller. Throttle input is used directly.

• `Enable idle speed controller` — Include idle speed controller to prevent engine stalling. For more information, see Idle Speed Controller Model.

Idle speed reference

Enter the value of the speed reference below which speed increases, and above which speed decreases. The default value is `1000`. The default unit is `rpm`.

Controller time constant

Enter the value of the time constant associated with an increase or decrease of the controlled throttle. The constant value must be positive. The default value is `1`. The default unit is `s`.

Controller threshold speed

Parameter used to smooth the controlled throttle value when the engine's rotational speed crosses the idle speed reference. For more information, see Idle Speed Controller Model. Large values decrease controller responsiveness. Small values increase computational cost. This parameter must be positive. The default value is `1`. The default unit is `rpm`.

Generic Engine Model

By default, the Generic Engine model uses a programmed relationship between torque and speed, modulated by the throttle signal.

Engine Speed, Throttle, Power, and Torque

The engine model is specified by an engine power demand function g(Ω). The function provides the maximum power available for a given engine speed Ω. The block parameters (maximum power, speed at maximum power, and maximum speed) normalize this function to physical maximum torque and speed values.

The normalized throttle input signal T specifies the actual engine power. The power is delivered as a fraction of the maximum power possible in a steady state at a fixed engine speed. It modulates the actual power delivered, P, from the engine: P(Ω,T) = T·g(Ω). The engine torque is τ = P/Ω.

Engine Power Demand

The engine power is nonzero when the speed is limited to the operating range, Ωmin ≤ Ω ≤ Ωmax. The absolute maximum engine power Pmax defines Ω0 such that Pmax = g0). Define w ≡ Ω/Ω0 and g(Ω) ≡ Pmax·p(w). Then p(1) = 1 and dp(1)/dw = 0. The torque function is:

τ = (Pmax0)·[p(w)/w] .

You can derive forms for p(w) from engine data and models. Generic Engine uses a third-order polynomial form:

p(w) = p1·w + p2·w2p3·w3

satisfying

p1 + p2p3 = 1 , p1 + 2p2– 3p3 = 0 .

In typical engines, the pi are positive. This polynomial has three zeros, one at w = 0, and a conjugate pair. One of the pair is positive and physical; the other is negative and unphysical:

Typical Engine Power Demand Function

Restrictions on Engine Speed and Power

• For the engine power polynomial, there are restrictions on the polynomial coefficients pi, to achieve a valid power-speed curve. These restrictions are detailed below.

• If you use tabulated power or torque data, corresponding restrictions on P(Ω) remain.

Set w = Ω/Ω0 and p = P(Ω)/P0, and wmin = Ωmin0 and wmax = Ωmax0. Then:

• The engine speed is restricted to a positive range above the minimum speed and below the maximum speed: 0 ≤ wminwwmax.

• The engine power at minimum speed must be nonnegative: p(wmin) ≥ 0. If you use the polynomial form, this condition is a restriction on the pi:

p(wmin) = p1·wmin + p2·w2minp3·w3min ≥ 0 .

• The engine power at maximum speed must be nonnegative: p(wmax) ≥ 0. If you use the polynomial form, this condition is a restriction on wmax: wmaxw+.

Engine Power Forms for Different Engine Types

For the default parametrization, Generic Engine provides two choices of internal combustion engine types, each with different engine power demand parameters.

Power Demand
Coefficient
Engine Type:
Spark-IgnitionDiesel
p110.6526
p211.6948
p311.3474

Idle Speed Controller Model

The idle speed controller adjusts the throttle signal to increase engine rotation below a reference speed according to the following expressions:

`$\Pi =\mathrm{max}\left({\Pi }_{i},{\Pi }_{c}\right)$`
`$\frac{d\left({\Pi }_{c}\right)}{dt}=\frac{0.5\cdot \left(1-\mathrm{tanh}\left(4\cdot \frac{\omega -{\omega }_{r}}{{\omega }_{t}}\right)\right)-{\Pi }_{c}}{\tau }$`

where:

• Π — Engine throttle

• Πi — Input throttle (port T)

• Πc — Controller throttle

• ω — Engine speed

• ωe — Idle speed reference

• ωt — Controller speed threshold

• τ — Controller time constant

The controlled throttle increases with a first-order lag from zero to one when engine speed falls below the reference speed. When the engine speed rises above the reference speed, the controlled throttle decreases from one to zero. When the difference between engine velocity and reference speed is smaller than the controller speed threshold, the tanh function smooths the time derivative of the controlled throttle. The controlled throttle is limited to the range 0–1. The engine uses the larger of the input and controlled throttle values. If engine time lag is included, the controller changes the input before the lag is computed.

Limitations

This block contains an engine time lag limitation.

Engine Time Lag

Engines lag in their response to changing speed and throttle. The Generic Engine block optionally supports lag due to a changing throttle only. Time lag simulation increases model fidelity but reduces simulation performance.

Ports

PortDescription
BRotational conserving port representing the engine block
FRotational Conserving port representing the engine crankshaft
TPhysical signal input port specifying the normalized engine throttle level
PPhysical signal output port reporting the instantaneous engine power
FCPhysical signal output port reporting the fuel consumption rate

Port T accepts a signal with values in the range 0–1. The signal specifies the engine torque as a fraction of the maximum torque possible in steady state at fixed engine speed. The signal saturates at zero and one. Values below zero are interpreted as zero. Values above one are interpreted as one.