Hauptinhalt

Spark Ignition Engine

R2026b

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.

To visualize the engine performance properties for the block, click the View live script button in the Engine properties parameter.

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.

Programmatic Use

Port: IGSW

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.

Programmatic Use

Port: Pim_in

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.

Programmatic Use

Port: thr_cmd

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.

Programmatic Use

Port: dIV

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.

Programmatic Use

Port: dEV

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.

Programmatic Use

Port: afr_in

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.

Programmatic Use

Port: InjPw_in

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.

Programmatic Use

Port: sa

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.

Programmatic Use

Port: fire

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.

Programmatic Use

Port: trq_avr_out

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

Dependencies

To enable this port, select Cycle-average speed.

Programmatic Use

Port: w_avr_out

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

Dependencies

To enable this port, select Intake manifold pressure.

Programmatic Use

Port: Pim_out

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

Dependencies

To enable this port, select Crank position.

Programmatic Use

Port: crkpos

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

Dependencies

To enable this port, select Cylinder air mass flow .

Programmatic Use

Port: airMassFlow_out

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

Dependencies

To enable this port, select Cylinder fuel mass flow.

Programmatic Use

Port: fuelMassFlow_out

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.

Programmatic Use

Port: afr_out

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

Dependencies

To enable this port, select Cylinder volume.

Programmatic Use

Port: V_out

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

Dependencies

To enable this port, select Cylinder pressure.

Programmatic Use

Port: P_out

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

Dependencies

To enable this port, select Cylinder temperature.

Programmatic Use

Port: T_out

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.

Programmatic Use

Port: F

Parameters

expand all

Mechanical

Number of spark ignition cylinders.

Programmatic Use

Parameter: numCyls
Values: "sdl.enum.engineNumCylinders.One" | "sdl.enum.engineNumCylinders.Two" | "sdl.enum.engineNumCylinders.Three" | "sdl.enum.engineNumCylinders.Four"

Spark angle difference for two-cylinder engines.

Dependencies

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

Programmatic Use

Parameter: twoCylSADiff

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.

Programmatic Use

Parameter: L4FiringOrder
Values: "sdl.enum.engineFiringOrderFourCylinders.L4_1342" | "sdl.enum.engineFiringOrderFourCylinders.L4_1324"

Diameter of the piston cylinder.

Programmatic Use

Parameter: bore

Distance the piston head travels within the cylinder.

Programmatic Use

Parameter: stroke

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

Programmatic Use

Parameter: conrod

Ratio of the maximum to minimum cylinder volume.

Programmatic Use

Parameter: CR

Ambient

Pressure of the air entering the intake.

Programmatic Use

Parameter: P_amb

Temperature of the air entering the intake.

Programmatic Use

Parameter: T_amb

Density of the air entering the intake.

Programmatic Use

Parameter: rho_air

Specific gas constant of dry air.

Programmatic Use

Parameter: R_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

Programmatic Use

Parameter: UseAirIntake
Values: "true" | "false"

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

Dependencies

To enable this parameter, select Compute air intake dynamics.

Programmatic Use

Parameter: c_thr

Radial distance from the resting throttle position to 0 degrees.

Dependencies

To enable this parameter, select Compute air intake dynamics.

Programmatic Use

Parameter: thr_rest

Diameter of the butterfly valve disc in the throttle body.

Dependencies

To enable this parameter, select Compute air intake dynamics.

Programmatic Use

Parameter: D_plate

Cumulative area of the throttle leakage.

Dependencies

To enable this parameter, select Compute air intake dynamics.

Programmatic Use

Parameter: S_leak

Volumetric capacity of the intake manifold.

Dependencies

To enable this parameter, select Compute air intake dynamics.

Programmatic Use

Parameter: V_im

Valves

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

Programmatic Use

Parameter: Cd_in

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.

Programmatic Use

Parameter: IVO_0

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.

Programmatic Use

Parameter: IVC_0

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.

Programmatic Use

Parameter: EVO_0

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.

Programmatic Use

Parameter: EVC_0

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

Programmatic Use

Parameter: UseInVVT
Values: "true" | "false"

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

Programmatic Use

Parameter: UseExVVT
Values: "true" | "false"

Fuel

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

Programmatic Use

Parameter: q_LHV

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.

Programmatic Use

Parameter: InputInjPw
Values: "true" | "false"

Slope of the fuel injector mass flow rate.

Dependencies

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

Programmatic Use

Parameter: Sinj

Combustion

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

Programmatic Use

Parameter: SparkInputType
Values: "sdl.enum.engineSparkInputType.Const" | "sdl.enum.engineSparkInputType.Angle" | "sdl.enum.engineSparkInputType.Trigger"

Spark advance before top dead center.

Programmatic Use

Parameter: SA_const

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

Programmatic Use

Parameter: comb_bd

Time constant for the cylinder pressure slow decay.

Programmatic Use

Parameter: dt_Pcyl_slow_decay

Time constant for the cylinder temperature slow decay.

Programmatic Use

Parameter: dt_Tcyl_slow_decay

Exhaust

Time constant for the exhaust gas temperature decay.

Programmatic Use

Parameter: dt_exh_decay

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

Programmatic Use

Parameter: InputBackPressure
Values: "true" | "false"

Back-pressure pressure constant.

Dependencies

To enable this parameter, clear Input back pressure.

Programmatic Use

Parameter: dP_exh

Back-pressure speed constant.

Dependencies

To enable this parameter, clear Input back pressure.

Programmatic Use

Parameter: dw_exh

Whether to model thermal effects in the exhaust manifold. Selecting this parameter enables the exhaust manifold thermal model and the thermal port.

Programmatic Use

Parameter: UseExhaustThermal
Values: "true" | "false"

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

Programmatic Use

Parameter: OutputTexh
Values: "true" | "false"

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.

Programmatic Use

Parameter: S_exh

Mass of the exhaust wall.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Programmatic Use

Parameter: M_exh

Heat capacity of the exhaust wall.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Programmatic Use

Parameter: C_exh

Time constant for the rate of exhaust heat flow.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Programmatic Use

Parameter: k_gas

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

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Programmatic Use

Parameter: h_convection

Radiation constant of the exhaust.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Programmatic Use

Parameter: k_radiation

Stefan-Boltzmann constant for the total exhaust.

Dependencies

To enable this parameter, select Compute exhaust manifold temperature.

Programmatic Use

Parameter: SB

Simulation

Intake manifold pressure at the start of the simulation.

Programmatic Use

Parameter: Pim_0

Crank position at the start of the simulation.

Programmatic Use

Parameter: ca0

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

Programmatic Use

Parameter: w0

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

Programmatic Use

Parameter: EngSpdSimLimit

Output

Whether to output the cycle-average net indicated torque from physical signal port AvrTrq.

Programmatic Use

Parameter: OutputTorqueAvr
Values: "true" | "false"

Whether to output the cycle-average speed from physical signal port AvrSpd.

Programmatic Use

Parameter: OutputSpeedAvr
Values: "true" | "false"

Whether to output the crank position from physical signal port crkpos.

Programmatic Use

Parameter: OutputCrkpos
Values: "true" | "false"

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

Programmatic Use

Parameter: AFR_const

Parameter: OutputAFR

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

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

Programmatic Use

Parameter: OutputVcyl
Values: "true" | "false"

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

Programmatic Use

Parameter: OutputPcyl
Values: "true" | "false"

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

Programmatic Use

Parameter: OutputTcyl
Values: "true" | "false"

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

Programmatic Use

Parameter: InputAFR
Values: "true" | "false"

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

Programmatic Use

Parameter: OutputAirMassFlow
Values: "true" | "false"

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

Programmatic Use

Parameter: OutputFuelMassFlow
Values: "true" | "false"

Utilities

Use the Open live script button to visualize engine performance properties.

Version History

Introduced in R2022a

expand all