

The complete speed control system shows the flexibility of Simulink. Simulink retains model fidelity, including precisely timed cylinder intake events, which is critical in creating a model of this type. The power of the simulation is evident in the presentation of the models above. The ability to model nonlinear, complex systems, such as the engine model described here, is one of Simulink's key features. Any subsystem can be converted to a triggered subsystem by dragging a copy of this block into the subsystem diagram from the Simulink Connections library.įigure 3: Typical simulation results Closing ModelĬlose the model. The key component that makes this a triggered subsystem is the 'Trigger' block shown at the bottom of Figure 2. This indicates that the block inherits its sample time, in this case executing each time the subsystem is triggered. Note the setting for sample time set (internally) at -1. This block implements a proportional-integral control system in discrete time. Of note is the use of the 'PID Controller' block. The detailed construction of the 'Controller' subsystem is illustrated in Figure 2. The controller is embedded in a triggered subsystem that is triggered by the valve timing signal described above. As is typical in the industry, the controller execution is synchronized with the engine's crankshaft rotation. The integral term in Equation 1 must thus be realized with a discrete-time approximation. In this model we employ a discrete-time controller, which is suitable for microprocessor implementation. Figure 1: Closed-loop engine model and simulation results
