Main Content

Spark Ignition Engine

Spark ignition engine

Since R2022a

Libraries:
Simscape / Driveline / Engines & Motors

Description

The Spark Ignition Engine block represents a naturally aspirated, spark-ignited internal combustion engine. The engine can be an arbitrary configuration of one to four cylinders. This block is a composite block that uses a subcomponent implementation of these blocks:

  • The SI Combustion Cylinder block represents an individual spark ignited combustion cylinder. The Spark Ignition Engine block controls how many SI Combustion Cylinder blocks it uses in the subcomponent implementation based on the value of the Number of cylinders parameter. You can adjust the valve timing to suit traditional gasoline engine applications as well as hybrid electric and plug-in hybrid electric vehicle applications.

  • The Ignition Trigger block controls the igniter timing for the SI Combustion Cylinder blocks.

  • The Air Intake block provides the intake manifold pressure to the SI Combustion Cylinder block. To enable the air intake implementation, select Compute air intake dynamics.

  • The Crank Shaft block connects to each SI Combustion Cylinder block to report the crank-angle-resolved instantaneous torque.

  • The Exhaust Manifold Thermal block abstracts the thermodynamics of the exhaust manifold and reports the temperature of the exhaust manifold. To compute the exhaust manifold thermal effects, select Compute exhaust manifold temperature.

Many of the Spark Ignition Engine parameters are identical to the parameters in the subcomponent blocks, and when the block implements subcomponent blocks, it uses the equations from those blocks. You can learn more about how the Spark Ignition Engine block uses each parameter by visiting the reference pages for the subcomponent blocks. You can use this block to learn how to create your own implementations of the subcomponent blocks by viewing the source code.

Equations

The block derives performance information about the engine components using their respective relationship with the crank position, θ, where 0 degrees ≤ θ < 720 degrees. The block defines the crank starting position as the intake stroke at top dead center. For a four-stroke engine, each cylinder is uniquely affiliated with a crank position, where the crank position for a given cylinder i is θi. The block derives the angular velocity from θ as

ω=ddxθ.

The block sets the first cylinder θ1 = θ regardless of how many cylinders you simulate. When you set Number of cylinders to Two cylinders, the block calculates θ2 as

θ2=θ1+Δ,

where Δ is the Spark angle difference parameter.

When you set Number of cylinders to Three cylinders, the block assumes that the cylinders are evenly phased such that

θ2=θ1+(1720°3)θ3=θ1+(2720°3)

When you set Number of cylinders to Four cylinders, the block assumes that the spark angle difference is 180 degrees. You can select the firing order using the Firing order parameter.

Assumptions and Limitations

  • The block ignores knocking and other combustion instabilities.

  • The block ignores internal and external exhaust gas recirculation.

Examples

Ports

Inputs

expand all

Physical signal output associated with the ignitor, where 0 turns off the ignitor and 1 turns on the ignitor.

Dependencies

To enable this port, set Spark input type to Fixed or Spark angle.

Physical signal input associated with the intake manifold, in kPa. When you clear Compute air intake dynamics, you supply the intake manifold pressure using this port. You can use this port as an alternative to providing the throttle command to port Thr.

Dependencies

To enable this port, clear Compute air intake dynamics.

Physical signal input associated with the normalized throttle command, where 0 represents a fully closed throttle, and 1 represents a fully open throttle. The block maps this input to a throttle-open angle between 0 and 90 degrees.

Dependencies

To enable this port, select Compute air intake dynamics.

Physical signal input associated with the angle to shift the intake valve open and close timings, in degrees. Positive values advance the timing and negative values delay the timing.

Dependencies

To enable this port, select Intake Variable Valve Timing.

Physical signal input associated with angle to shift the exhaust valve open and close timings, in degrees. Negative values advance the timing and positive values delay the timing.

Dependencies

To enable this port, set Exhaust Variable Valve Timing.

Physical signal input associated with the unitless air-fuel ratio command. Note that this is different from the stoichiometric air-fuel ratio for gasoline, which the block fixes at 14.6.

Dependencies

To enable this port, select Input air-fuel ratio and clear Input injector pulse width.

Physical signal input associated with the duration during which the injector is open to inject fuel, in ms. The block multiplies this signal by the value of the Injector slope parameter to calculate the amount of fuel that the injector releases during one pulse.

Dependencies

To enable this port, select Input air-fuel ratio and Input injector pulse width.

Physical signal input associated with the spark angle before top dead center, in deg.

Dependencies

To enable this port, set Spark input type to Spark angle.

Physical signal input associated with the ignition trigger. The block treats a rise from 0 to 1 as a trigger. The input must return to 0 before the block accepts another trigger.

Dependencies

To enable this port, set Spark input type to Spark trigger event.

Physical signal input associated with the exhaust back pressure, in kPa.

Dependencies

To enable this port, select Input back pressure.

Outputs

expand all

Physical signal output associated with the cycle-average net indicated torque in Nm.

Dependencies

To enable this port, select Cycle-average net indicated torque.

Physical signal output associated with the cycle-average speed output, in rad/s.

Dependencies

To enable this port, select Cycle-average speed.

Physical signal output associated with the intake manifold pressure, in kPa.

Dependencies

To enable this port, select Intake manifold pressure.

Physical signal output associated with the crank position, in degrees.

Dependencies

To enable this port, select Crank position.

Physical signal output associated with the air mass flow, in g/s.

Dependencies

To enable this port, select Cylinder air mass flow .

Physical signal output associated with the fuel mass flow, in g/s.

Dependencies

To enable this port, select Cylinder fuel mass flow.

Physical signal output associated with the unitless air-fuel ratio response that the block attains during operation. Note that this is different from the stoichiometric air-fuel ratio for gasoline, which the block fixes at 14.6.

Dependencies

To enable this port, select Air-fuel ratio.

Physical signal output associated with the cylinder volume, in cm3.

Dependencies

To enable this port, select Cylinder volume.

Physical signal output associated with the cylinder pressure, in MPa.

Dependencies

To enable this port, select Cylinder pressure.

Physical signal output associated with the cylinder temperature, in K.

Dependencies

To enable this port, select Cylinder temperature.

Conserving

expand all

Mechanical rotational conserving port associated with the crankshaft connection to the driveline. Include friction and inertia here to simulate engine load or directly connect other driveline elements.

Parameters

expand all

Mechanical

Number of spark ignition cylinders.

Spark angle difference for two-cylinder engines.

Dependencies

To enable this parameter, set Number of cylinders to Two Cylinders.

Firing order for four-cylinder engines. Firing order is engine specific, but your selection for this parameter will not affect the block performance. Controller development requires this information.

Dependencies

To enable this parameter, set Number of cylinders to Four Cylinders.

Diameter of the piston cylinder.

Distance the piston head travels within the cylinder.

Length of the piston connecting rod from hole center to hole center.

Ratio of the maximum to minimum cylinder volume.

Ambient

Pressure of the air entering the intake.

Temperature of the air entering the intake.

Density of the air entering the intake.

Specific gas constant of dry air.

Air Intake

Whether to compute the air intake dynamics. Selecting this parameter enables these parameters:

  • Throttle response time constant

  • Throttle rest angle

  • Throttle plate diameter

  • Throttle leakage area

  • Intake manifold volume

Time constant associated with the response rate of the engine to the throttle command.

Dependencies

To enable this parameter, select Compute air intake dynamics.

Radial distance from the resting throttle position to 0 degrees.

Dependencies

To enable this parameter, select Compute air intake dynamics.

Diameter of the butterfly valve disc in the throttle body.

Dependencies

To enable this parameter, select Compute air intake dynamics.

Cumulative area of the throttle leakage.

Dependencies

To enable this parameter, select Compute air intake dynamics.

Volumetric capacity of the intake manifold.

Dependencies

To enable this parameter, select Compute air intake dynamics.

Valves

Ratio of actual discharge to ideal discharge for the intake valve.

Crank position before top dead center at which the intake valve opens. Measure from top dead center to the crank position in the opposite direction of the crank rotation.

Crank position after bottom dead center at which the intake valve closes. Measure from bottom dead center to the crank position in the same direction of the crank rotation.

Crank position before bottom dead center at which the exhaust valve opens. Measure from bottom dead center to the crank position in the opposite direction of the crank rotation.

Crank position after top dead center at which the exhaust valve closes. Measure from top dead center to the crank position in the same direction of the crank rotation.

Whether to control the intake valve timing. Selecting this parameter enables the InVT port.

Whether to control the exhaust valve timing. Selecting this port enables the ExVT port.

Fuel

Lower heating value for gasoline. This value is also known as the fuel net calorific value.

Whether to specify the air-fuel ratio by using the Air-fuel ratio parameter or the AfrCmd port.

Mixture ratio of air to fuel.

Dependencies

To enable this parameter, clear Input air-fuel ratio.

Whether to specify the injector pulse width.

Dependencies

To enable this parameter, select Input air-fuel ratio.

Slope of the fuel injector mass flow rate.

Dependencies

To enable this parameter, select Input air-fuel ratio and Input injector pulse width.

Combustion

Whether to parameterize the spark input using a fixed value, spark angle, or spark trigger events.

Spark advance before top dead center.

Duration of combustion as a portion of the crank shaft rotation.

Time constant for the cylinder pressure slow decay.

Time constant for the cylinder temperature slow decay.

Exhaust

Time constant for the exhaust gas temperature decay.

Option to input the back-pressure pressure constant and speed constant.

Back-pressure pressure constant.

Dependencies

To enable this parameter, clear Input back pressure.

Back-pressure speed constant.

Dependencies

To enable this parameter, clear Input back pressure.

Whether the block computes the exhaust manifold temperature. Selecting this parameter enables these parameters:

  • Surface area of exhaust wall

  • Mass of exhaust wall

  • Heat capacity of exhaust wall

  • Time constant of exhaust heat flow

  • Convective heat transfer coefficient for the outer side of exhaust

  • Radiation constant

  • Stefan-Boltzmann constant

Surface area of the exhaust wall. This wall is only the surface area of the internal wall that makes contact with the exhaust.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Mass of the exhaust wall.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Heat capacity of the exhaust wall.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Time constant for the rate of exhaust heat flow.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Convective heat transfer coefficient for the outer side of the exhaust.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Radiation constant of the exhaust.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Stefan-Boltzmann constant for the total exhaust.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Simulation

Intake manifold pressure at the start of the simulation.

Crank position at the start of the simulation.

Rotational speed of the engine at the start of the simulation.

Maximum engine speed allowed during the simulation. If the block exceeds this value, it will generate an error and stop the simulation.

Output

Whether to output engine outlet gas energy flow from physical signal port Weo.

Whether to output the cylinder volume from physical signal port Vcyl.

Whether to output the cylinder pressure from physical signal port Pcyl.

Whether to output the cylinder temperature from physical signal port Tcyl.

Whether to output the air-to-fuel ratio from physical signal port AFR.

Whether to output the intake manifold pressure from physical signal port AirMassFlow.

Whether to output the fuel mass flow from physical signal port FuelMassFlow.

Version History

Introduced in R2022a

expand all