File Exchange

image thumbnail

Four-Cylinder Engine Ignition Control Simulation

version 1.1 (1.3 MB) by Guy Rouleau
Simulation of the ignition control of a four-cylinder engine


Updated 26 Mar 2019

View License

This example simulates the ignition control of a four-cylinder engine. It has been developed as a collaboration between Guy Rouleau from MathWorks and Isaac Hisahiro Ito at Toyota Motor North America R&D. The model is intended for demonstration and educational purpose.

The model implements the following feature:
- Simscape language for modeling a four-cylinder engine ignition process
- Symbolic Math Toolbox for designing the engine model equations
- Simscape Driveline for modeling of the vehicle drivetrain
- Export-function model for the controller, allowing the code generated from it to be integrated with an external environment and scheduler
- Stateflow for simulating the Engine Control Unit scheduler
- SimEvents for simulation of hardware timers

See this blog post for more details:

Cite As

Guy Rouleau (2020). Four-Cylinder Engine Ignition Control Simulation (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)



Great job!

Steve Miller

Really great example. Shows a lot of best practices and combines a lot of capabilities. Definitely one to review even if this application isn't one you regularly work on. The blog post is also great:



Updated to R2019a:
- Improved fidelity of the engine model at low speed during startup and shutdown.
- Use Initialize and Terminate function


Fixed Typos in Notes


Updated description to mention Symbolic Math Toolbox

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux