Generic Engine
Internal combustion engine with throttle and rotational inertia and time lag
- Library:
Simscape / Driveline / Engines & Motors
Description
The Generic Engine block represents a general internal combustion engine. This block is a suitable generic engine for 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 the engine fuel consumption rate based on the fuel consumption model that you choose. Optional speed and redline controllers prevent engine stall and enable cruise control.
Engine Speed, Throttle, Power, and Torque
By default, the Generic Engine block uses a programmed relationship between torque and speed that is modulated by the throttle signal.
The block evaluates engine power demand as a function of engine speed, 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 = g(Ω0). Define w ≡ Ω/Ω0 and g(Ω) ≡ Pmax·p(w). Then p(1) = 1 and dp(1)/dw = 0. The torque function is:
τ = (Pmax/Ω0)·[p(w)/w].
You can derive forms for p(w) from engine data and models. The Generic Engine block uses a third-order polynomial form
p(w) = p1·w + p2·w2 – p3·w3
that satisfies
p1 + p2 – p3 = 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:
For the engine power polynomial, there are restrictions on the polynomial coefficients pi to achieve a valid power-speed curve. If you use tabulated power or torque data, the corresponding restrictions on P(Ω) apply.
Typical Engine Power Demand Curve
Determine the speed and power, w = Ω/Ω0 and p = P(Ω)/P0, and define the boundaries as wmin = Ωmin/Ω0 and wmax = Ωmax/Ω0. Then:
The block restricts the engine speed to a positive range above the minimum speed and below the maximum speed: 0 ≤ wmin ≤ w ≤ wmax.
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·w2min – p3·wmin3 ≥ 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: wmax ≤ w+.
Engine Power Forms for Different Engine Types
For the default parameterization, the block provides two choices of internal combustion engine types, each with different engine power demand parameters.
Power Demand Coefficient | Engine Type | |
---|---|---|
Spark-Ignition | Diesel | |
p 1 | 1 | 0.6526 |
p 2 | 1 | 1.6948 |
p 3 | 1 | 1.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:
and
where:
Π is the engine throttle.
Πi is the input throttle (port T).
Πc is the controller throttle.
ω is the engine speed or crankshaft angular velocity.
ωr is the idle speed reference.
ωt is the controller speed threshold.
τ is the 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 part of the equation smooths the time derivative of the controlled throttle. The function limits the controlled throttle 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 it computes the lag.
Redline Controller Model
While the idle speed controller determines the minimum throttle value for maintaining engine speed, the redline controller prevents excessive speed based on a maximum throttle input. To determine the maximum throttle value, the redline controller uses the idle speed controller model equation. However, for the redline controller:
ωr is the redline speed reference.
ωt is the redline speed threshold.
τ is the redline time constant.
Performance
To increase simulation speed, set Fuel consumption model to
No fuel consumption
.
If you select any other option for Fuel consumption model, the block must perform a nonlinear computation. The block solves the equation even if the FC port, which reports the fuel consumption rate, is not connected to another block.
When the parameter is set to No fuel consumption
, the block
does not calculate fuel consumption, even if the FC port is
connected to another block.
Assumptions and Limitations
This block contains an engine time lag limitation.
Engines lag in their response to changing speed and throttle. The block optionally supports lag due to a changing throttle only. Time lag simulation increases model fidelity but reduces simulation performance.
Hardware-in-the-Loop Simulation
To improve simulation performance, set the Dynamics > Time Constant parameter to No time constant - Suitable for HIL
simulation
.