Modelica.Clocked.ClockSignals.Clocks

Library of blocks that generate clocks

Information

This package contains blocks that generate clock signals. For an introduction to clocks see UsersGuide.Clocks.

Extends from Modelica.Icons.SourcesPackage (Icon for packages containing sources).

Package Content

Name Description
Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock PeriodicRealClock Generate a periodic clock signal with a period defined by a Real number
Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock PeriodicExactClock Generate a periodic clock signal with a period defined by an Integer number with resolution
Modelica.Clocked.ClockSignals.Clocks.EventClock EventClock Generate a clock signal when the Boolean input changes from false to true
Modelica.Clocked.ClockSignals.Clocks.Rotational Rotational Library of blocks that generate a clock tick each time an observed input angle changes
Modelica.Clocked.ClockSignals.Clocks.Logical Logical Library of blocks for combining several input clock signals by logical combinators

Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock

Generate a periodic clock signal with a period defined by a Real number

Information

This component generates a periodic clock that starts ticking when the simulation starts. The period is defined in seconds by a Real number. If clocks are synchronized relatively to each other then only one of the clocks can be defined with PeriodicRealClock.

For an introduction to clocks see UsersGuide.Clocks. If exact, integer based, time synchronization with absolute period definitions is desired, use block PeriodicExactClock to generate a periodic clock signal.

If a clock is associated to a clocked continuous-time partition, then an integrator has to be defined that is used to integrate the partition from the previous to the current clock tick. This is performed by setting parameter useSolver = true and defining the integration method as String with parameter solver. Both parameters are in tab Advanced. For an example, see Examples.Systems.ControlledMixingUnit.

Extends from Clocked.ClockSignals.Interfaces.PartialPeriodicClock (Icon, connector, and solver method of a block that generates a periodic clock).

Parameters

NameDescription
periodPeriod of clock (defined as Real number) [s]
Advanced
useSolver= true, if solverMethod shall be explicitly defined
solverMethodIntegration method used for discretized continuous-time partitions

Connectors

NameDescription
y 

Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock

Generate a periodic clock signal with a period defined by an Integer number with resolution

Information

This component generates a periodic clock that starts ticking when the simulation starts. The period is defined as the product of a resolution, defined with enumeration Resolution, and Integer parameter factor. Internally, the period is represented as a rational number. All clocks with rational number definitions are exactly time synchronized to each other.

Example:

import Modelica.Clocked.ClockSignals.Clocks;
import Modelica.Clocked.Types;
Clocks.PeriodicExactClock periodicClock(factor=10,
                                        resolution=Types.Resolution.ms);
// Clock ticks every 1/100 seconds

For an introduction to clocks see UsersGuide.Clocks.

If a clock is associated to a clocked continuous-time partition, then an integrator has to be defined that is used to integrate the partition from the previous to the current clock tick. This is performed by setting parameter useSolver = true and defining the integration method as String with parameter solver. Both parameters are in tab Advanced. For an example, see Examples.Systems.ControlledMixingUnit.

Extends from Clocked.ClockSignals.Interfaces.PartialPeriodicClock (Icon, connector, and solver method of a block that generates a periodic clock).

Parameters

NameDescription
factorSample factor with respect to resolution
resolutionClock resolution
Advanced
useSolver= true, if solverMethod shall be explicitly defined
solverMethodIntegration method used for discretized continuous-time partitions

Connectors

NameDescription
y 

Modelica.Clocked.ClockSignals.Clocks.EventClock Modelica.Clocked.ClockSignals.Clocks.EventClock

Generate a clock signal when the Boolean input changes from false to true

Information

This component generates a clock signal triggered by a continuous-time Boolean input signal u: Whenever the Boolean input signal u changes from false to true, then the output clock signal y ticks.

For an introduction to clocks see UsersGuide.Clocks.

If a clock is associated to a clocked continuous-time partition, then an integrator has to be defined that is used to integrate the partition from the previous to the current clock tick. This is performed by setting parameter useSolver = true and defining the integration method as String with parameter solver. Both parameters are in tab Advanced. For an example, see Examples.Systems.ControlledMixingUnit.

Extends from Clocked.ClockSignals.Interfaces.PartialClock (Icon, connector, and solver method of a block that generates a clock).

Parameters

NameDescription
Advanced
useSolver= true, if solverMethod shall be explicitly defined
solverMethodIntegration method used for discretized continuous-time partitions

Connectors

NameDescription
y 
u 
Automatically generated Thu Oct 1 16:07:36 2020.