modelEngineThrottleControl

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This example shows how to model a non-periodic synchronous sampled data systems with the Modelica_Synchronous library. This is demonstrated at hand of a closed-loop throttle control synchronized to the crankshaft angle of an internal combustion engine. This system has the following properties:

  • Engine speed is regulated with a throttle actuator.
  • Controller execution is synchronized with the engine crankshaft angle.
  • The influence of disturbances, such as a change in load torque, is reduced.

The complete system is shown in figure below (diagram-layer):

Block speedControl is the discrete control system. The boundaries of this controller are defined by sample1, sample2 and hold1. The sampling is done via rotationalClock, an event-based clock that ticks every 180° rotation of the crankshaft angle. The speed controller therefore is automatically executed every half-rotation of the engine's crankshaft. To produce respective clock ticks, rotationalClock bookeeps the angular of the last time a half-rotation of the crankshaft has been recognized (angular_offset). Given angular_offset, the event-condition for half-rotations is:

abs(angle - angular_offset) >= abs(trigger_interval)

with trigger_interval = 180°. The model of rotationalClock therefore is (diagram-layer):

In the end, rotationalClock samples it's own input angle to bookeep an offset used to decide when to tick; the clock's event condition depends on the state present when the condition changed last time from beeing non-satisfied to beeing satisfied, i.e., the state when the clock last ticked.

Components

TypeNameDefaultDescription
Modelica.Blocks.Sources.StepspeedRef
Modelica_Synchronous.Examples.Systems.Utilities.ComponentsThrottleControl.SpeedControlspeedControl
Modelica_Synchronous.RealSignals.Sampler.Samplesample1
Modelica_Synchronous.RealSignals.Sampler.Holdhold1
Modelica_Synchronous.ClockSignals.Clocks.Rotational.FixedRotationalClockrotationalClock
Modelica_Synchronous.Examples.Systems.Utilities.ComponentsThrottleControl.Engine2engine
Modelica.Blocks.Sources.Stepstep
Modelica.Blocks.Sources.Stepstep1
Modelica.Blocks.Math.Addadd
Modelica.Mechanics.Rotational.Sources.Torquetorque2
Modelica.Mechanics.Rotational.Sensors.AngleSensorangleSensor
Modelica.Blocks.Continuous.Derderivative
RealSignals.Sampler.SampleClockedsample2