diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/BooleanSignals.mo" "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/BooleanSignals.mo" --- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/BooleanSignals.mo" 2021-11-24 08:09:29.375341262 +0000 +++ "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/BooleanSignals.mo" 2021-11-24 08:10:15.195203528 +0000 @@ -6,7 +6,7 @@ block Sample "Sample the continuous-time, Boolean input signal and provide it as clocked output signal (clock is inferred)" - extends Modelica_Synchronous.BooleanSignals.Interfaces.PartialSISOSampler; + extends Modelica.Clocked.BooleanSignals.Interfaces.PartialSISOSampler; equation y = sample(u); @@ -41,8 +41,8 @@ block SampleClocked "Sample the continuous-time, Boolean input signal and provide it as clocked output signal. The clock is provided as input signal" - extends Modelica_Synchronous.BooleanSignals.Interfaces.SamplerIcon; - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + extends Modelica.Clocked.BooleanSignals.Interfaces.SamplerIcon; + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock "Output signal y is associated with this clock input" annotation (Placement(transformation( extent={{-20,-20},{20,20}}, @@ -93,7 +93,7 @@ block SampleVectorizedAndClocked "Sample the continuous-time, Boolean input signal vector and provide it as clocked output signal vector. The clock is provided as input signal" - extends Modelica_Synchronous.BooleanSignals.Interfaces.SamplerIcon; + extends Modelica.Clocked.BooleanSignals.Interfaces.SamplerIcon; parameter Integer n(min=1)=1 "Size of input signal vector u (= size of output signal vector y)"; Modelica.Blocks.Interfaces.BooleanInput @@ -104,7 +104,7 @@ y[n] "Connector of clocked, Boolean output signal vector" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock "Output signal vector y is associated with this clock input" annotation (Placement(transformation( extent={{-20,-20},{20,20}}, @@ -629,6 +629,7 @@ ")); end BackSample; + block AssignClock "Assigns a clock to a clocked Boolean signal" Modelica.Blocks.Interfaces.BooleanInput @@ -639,7 +640,7 @@ y "Connector of clocked, Boolean output signal" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock annotation (Placement(transformation( extent={{-20,-20},{20,20}}, rotation=90, @@ -731,7 +732,7 @@ y[n] "Connector of clocked, Boolean output signal" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock annotation (Placement(transformation( extent={{-20,-20},{20,20}}, rotation=90, @@ -812,6 +813,7 @@ package Utilities "Utility components that are usually not directly used" extends Modelica.Icons.UtilitiesPackage; + block UpSample "Upsample the clocked Boolean input signal and provide it as clocked output signal" @@ -832,22 +834,22 @@ Boolean b(start=false); Boolean b_super(start=false); Boolean u_super; - equation - when Clock() then // clock of u - dummy = u; - b = not previous(b); - end when; - - when Clock() then // clock of y - b_super = superSample(b); - if inferFactor then - u_super = superSample(u); - else - u_super = superSample(u,factor); - end if; - y = if b_super <> previous(b_super) then u_super else false; + equation + when Clock() then +// clock of u + dummy = u; + b = not previous(b); + end when; + when Clock() then +// clock of y + b_super = superSample(b); + if inferFactor then + u_super = superSample(u); + else + u_super = superSample(u, factor); + end if; + y = if b_super <> previous(b_super) then u_super else false; end when; - annotation ( defaultComponentName="upSample1", Icon(coordinateSystem( @@ -943,7 +945,7 @@ block AssignClockToTriggerHold "Generate a Boolean continuous-time trigger signal from a clocked Boolean input" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; parameter Boolean y_start=false "Initial value of output signal"; Modelica.Blocks.Interfaces.BooleanInput u @@ -1006,7 +1008,7 @@ block AssignClockToSquareWaveHold "Generate a Boolean continuous-time square signal from a clocked Real input" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; parameter Boolean y_start=false "Initial value of output signal"; Modelica.Blocks.Interfaces.BooleanInput u @@ -1018,7 +1020,7 @@ protected Boolean y2(start=y_start); equation - // dummy condition to relate clock of u with y2 +// dummy condition to relate clock of u with y2 y2 = if u == false then not previous(y2) else not previous(y2); y = hold(y2); annotation ( @@ -1059,7 +1061,6 @@

")); end AssignClockToSquareWaveHold; - annotation (Documentation(info="

This package contains utility blocks that are usually not directly utilized @@ -1067,7 +1068,6 @@

")); end Utilities; - annotation (Documentation(info="

This package contains blocks that mark boundaries of a clocked partition @@ -1142,7 +1142,7 @@ extends Modelica.Icons.Package; block UnitDelay "Delays the clocked input signal for one sample period" - extends Modelica_Synchronous.BooleanSignals.Interfaces.PartialClockedSISO( + extends Modelica.Clocked.BooleanSignals.Interfaces.PartialClockedSISO( u(final start=y_start)); parameter Boolean y_start=false "Value of output signal at first clock tick"; @@ -1187,7 +1187,7 @@ block FractionalDelay "Delays the clocked input signal for a fractional multiple of the sample period" - extends Modelica_Synchronous.BooleanSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.BooleanSignals.Interfaces.PartialClockedSISO; parameter Integer shift(min=0) = 0 "Delay = interval() * shift/resolution"; @@ -1257,10 +1257,10 @@ extends Modelica.Icons.SourcesPackage; block Step "Generate step signal of type Boolean" extends BooleanSignals.Interfaces.PartialClockedSO; - parameter Modelica.SIunits.Time startTime=0 "Time instant of step start"; + parameter Modelica.Units.SI.Time startTime=0 "Time instant of step start"; parameter Boolean startValue = false "Output before startTime"; protected - Modelica.SIunits.Time simTime; + Modelica.Units.SI.Time simTime; equation simTime = sample(time); y = if simTime >= startTime then not startValue else startValue; @@ -1403,19 +1403,19 @@ parameter Real width( final min=Modelica.Constants.small, final max=100) = 50 "Width of pulse in % of period"; - parameter Modelica.SIunits.Time period(final min=Modelica.Constants.small,start=1) + parameter Modelica.Units.SI.Time period(final min=Modelica.Constants.small,start=1) "Time for one period"; - parameter Modelica.SIunits.Time startTime=0 + parameter Modelica.Units.SI.Time startTime=0 "Time instant of first pulse"; protected - Modelica.SIunits.Time simTime; - parameter Modelica.SIunits.Duration Twidth=period*width/100 + Modelica.Units.SI.Time simTime; + parameter Modelica.Units.SI.Duration Twidth=period*width/100 "width of one pulse" annotation(HideResult=true); - Modelica.SIunits.Time next(start=startTime, fixed=true) + Modelica.Units.SI.Time next(start=startTime, fixed=true) "next = startTime + n*period, for smallest n such that next>simTime"; - Modelica.SIunits.Duration tol = 0.1*interval(simTime) "Tolerance for numeric comparisons"; + Modelica.Units.SI.Duration tol = 0.1*interval(simTime) "Tolerance for numeric comparisons"; equation simTime = sample(time); next = if (simTime >= previous(next) - tol) then previous(next) + period else previous(next); @@ -1595,7 +1595,7 @@ protected Integer counter(start=0); equation - // stop counter after counter = startTick to avoid integer overflow for long running simulations +// stop counter after counter = startTick to avoid integer overflow for long running simulations counter = if previous(counter) < startTick then previous(counter) + 1 else previous(counter); y = if counter >= startTick then not startValue else startValue; annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100, @@ -1743,7 +1743,7 @@ Boolean startOutput(start=false) "Flag whether counter >= startTick reached once"; equation - // restart counter after reaching threshold to avoid integer overflow for long running simulations +// restart counter after reaching threshold to avoid integer overflow for long running simulations if previous(startOutput) then counter = if previous(counter) == (periodTicks-1) then 0 else previous(counter) + 1; startOutput = previous(startOutput); @@ -1949,7 +1949,7 @@ partial block PartialSISOSampler "Basic block used for sampling of Boolean signals" - extends Modelica_Synchronous.BooleanSignals.Interfaces.SamplerIcon; + extends Modelica.Clocked.BooleanSignals.Interfaces.SamplerIcon; Modelica.Blocks.Interfaces.BooleanInput u "Connector of continuous-time, Real input signal" @@ -1967,7 +1967,7 @@ partial block PartialClockedSISO "Block with clocked single input and clocked single output Boolean signals" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; Modelica.Blocks.Interfaces.BooleanInput u @@ -1984,7 +1984,7 @@ partial block PartialClockedSO "Block with clocked single output Boolean signals" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; Modelica.Blocks.Interfaces.BooleanOutput y diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/ClockSignals.mo" "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/ClockSignals.mo" --- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/ClockSignals.mo" 2021-11-24 08:09:29.375341262 +0000 +++ "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/ClockSignals.mo" 2021-11-24 08:10:14.299206221 +0000 @@ -5,11 +5,12 @@ package Clocks "Library of blocks that generate clocks" extends Modelica.Icons.SourcesPackage; + block PeriodicRealClock "Generates a periodic clock signal with a period defined by a Real number" - parameter Modelica.SIunits.Time period + parameter Modelica.Units.SI.Time period "Period of clock (defined as Real number)" annotation(Evaluate=true); - extends Modelica_Synchronous.ClockSignals.Interfaces.PartialPeriodicClock; + extends Modelica.Clocked.ClockSignals.Interfaces.PartialPeriodicClock; equation if useSolver then y = Clock(Clock(period), solverMethod=solverMethod); @@ -75,13 +76,13 @@ block PeriodicExactClock "Generates a periodic clock signal with a period defined by an Integer number with resolution" - import R = Modelica_Synchronous.Types.Resolution; + import R = Modelica.Clocked.Types.Resolution; parameter Integer factor(min=0) "Sample factor with respect to resolution" annotation(Evaluate=true); - parameter Modelica_Synchronous.Types.Resolution resolution=R.ms + parameter Modelica.Clocked.Types.Resolution resolution=R.ms "Clock resolution" annotation(Evaluate=true, __Dymola_editText=false); - extends Modelica_Synchronous.ClockSignals.Interfaces.PartialPeriodicClock; + extends Modelica.Clocked.ClockSignals.Interfaces.PartialPeriodicClock; protected constant Integer conversionTable[8]={365*24*60*60, 24*60*60, 60*60, 60, 1, 1000, 1000*1000, 1000*1000*1000} "Table to convert from Resolution to Integer clock resolution"; @@ -167,7 +168,7 @@ block EventClock "Generates a clock signal when the Boolean input changes from false to true" - extends Modelica_Synchronous.ClockSignals.Interfaces.PartialClock; + extends Modelica.Clocked.ClockSignals.Interfaces.PartialClock; Modelica.Blocks.Interfaces.BooleanInput u annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); equation @@ -377,7 +378,7 @@ changed for a certain, constant rotational-interval." extends PartialRotationalClock; - parameter Modelica.SIunits.Angle trigger_interval = 2*Modelica.Constants.pi + parameter Modelica.Units.SI.Angle trigger_interval = 2*Modelica.Constants.pi "Rotational-interval the input angle must be changed to trigger the next clock tick."; @@ -417,7 +418,6 @@ textString = "%trigger_interval%")})); end FixedRotationalClock; end Rotational; - annotation (Documentation(info="

This package contains blocks that generate clock signals. For an introduction @@ -434,10 +434,10 @@ block SubSample "Sub-sample the input clock and provide it as output clock" parameter Integer factor(min=1) "Sub-sampling factor (>= 1)" annotation(Evaluate=true); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput u + Modelica.Clocked.ClockSignals.Interfaces.ClockInput u "Connector of a clock as input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockOutput y + Modelica.Clocked.ClockSignals.Interfaces.ClockOutput y "Connector of a clock as output signal (clock y is slower as clock of u)" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); equation @@ -561,10 +561,10 @@ "Super-sample the input clock and provide it as output clock" parameter Integer factor(min=1) "Super-sampling factor (>= 1)" annotation(Evaluate=true); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput u + Modelica.Clocked.ClockSignals.Interfaces.ClockInput u "Connector of a clock as input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockOutput y + Modelica.Clocked.ClockSignals.Interfaces.ClockOutput y "Connector of a clock as output signal (clock y is faster as clock of u)" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); equation @@ -900,7 +900,7 @@ annotation(Evaluate=true, Dialog(tab="Advanced"), choices(checkBox=true)); parameter ModelicaServices.Types.SolverMethod solverMethod="ExplicitEuler" "Integration method used for discretized continuous-time partitions" annotation(Dialog(tab="Advanced",enable=useSolver)); - Modelica_Synchronous.ClockSignals.Interfaces.ClockOutput y + Modelica.Clocked.ClockSignals.Interfaces.ClockOutput y annotation (Placement(transformation(extent={{100,-10},{120,10}}))); annotation ( @@ -970,7 +970,7 @@ partial block PartialPeriodicClock "Icon, connector, and solver method of a block that generates a periodic clock" - extends Modelica_Synchronous.ClockSignals.Interfaces.PartialClock; + extends Modelica.Clocked.ClockSignals.Interfaces.PartialClock; end PartialPeriodicClock; diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/Examples.mo" "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/Examples.mo" --- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/Examples.mo" 2021-11-24 08:09:29.379341250 +0000 +++ "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/Examples.mo" 2021-11-24 08:10:14.091206846 +0000 @@ -1,4 +1,4 @@ -´╗┐within Modelica_Synchronous; +within Modelica_Synchronous; package Examples "Library of examples to demonstrate the usage of package Modelica_Synchronous" extends Modelica.Icons.ExamplesPackage; @@ -105,20 +105,20 @@ Modelica.Mechanics.Rotational.Sources.Torque torque annotation (Placement(transformation(extent={{60,0},{80,20}}))); - Modelica_Synchronous.RealSignals.Periodic.PI + Modelica.Clocked.RealSignals.Periodic.PI PI( Td=1, x(fixed=true), kd=110) annotation (Placement(transformation(extent={{-14,0},{6,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked sample2 + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample2 annotation (Placement(transformation(extent={{-68,4},{-56,16}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold hold1 + Modelica.Clocked.RealSignals.Sampler.Hold hold1 annotation (Placement(transformation(extent={{26,4},{38,16}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample + Modelica.Clocked.RealSignals.Sampler.Sample sample1 annotation (Placement(transformation(extent={{38,-38},{26,-26}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock(period=0.1) annotation (Placement(transformation(extent={{-106,-46},{-94,-34}}))); equation @@ -207,20 +207,20 @@ Modelica.Mechanics.Rotational.Sources.Torque torque annotation (Placement(transformation(extent={{40,0},{60,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample2 annotation (Placement(transformation(extent={{-66,4},{-54,16}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold hold1 + Modelica.Clocked.RealSignals.Sampler.Hold hold1 annotation (Placement(transformation(extent={{14,4},{26,16}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample sample1 + Modelica.Clocked.RealSignals.Sampler.Sample sample1 annotation (Placement(transformation(extent={{26,-26},{14,-14}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.PI + Modelica.Clocked.RealSignals.NonPeriodic.PI PI( x(fixed=true), T=0.1, k=110) annotation (Placement(transformation(extent={{-18,0},{2,20}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock(period=0.1) annotation (Placement(transformation(extent={{-98,-36},{-86,-24}}))); equation @@ -312,22 +312,22 @@ Modelica.Mechanics.Rotational.Sources.Torque torque annotation (Placement(transformation(extent={{60,0},{80,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample2 annotation (Placement(transformation(extent={{-68,4},{-56,16}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold hold1 + Modelica.Clocked.RealSignals.Sampler.Hold hold1 annotation (Placement(transformation(extent={{26,4},{38,16}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample sample1 + Modelica.Clocked.RealSignals.Sampler.Sample sample1 annotation (Placement(transformation(extent={{38,-36},{26,-24}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.PI + Modelica.Clocked.RealSignals.NonPeriodic.PI PI( x(fixed=true), T=0.1, k=110) annotation (Placement(transformation(extent={{-14,0},{6,20}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock(factor=100, resolution= - Modelica_Synchronous.Types.Resolution.ms) + Modelica.Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-100,-46},{-88,-34}}))); equation connect(speed.flange, load.flange_b) annotation (Line( @@ -415,12 +415,12 @@ Modelica.Mechanics.Rotational.Sources.Torque torque annotation (Placement(transformation(extent={{42,0},{62,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample2 annotation (Placement(transformation(extent={{-66,4},{-54,16}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold hold1 + Modelica.Clocked.RealSignals.Sampler.Hold hold1 annotation (Placement(transformation(extent={{20,4},{32,16}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample sample1 + Modelica.Clocked.RealSignals.Sampler.Sample sample1 annotation (Placement(transformation(extent={{30,-26},{18,-14}}))); Modelica.Blocks.Continuous.PI PI( initType=Modelica.Blocks.Types.Init.InitialOutput, @@ -428,7 +428,7 @@ T=0.1, k=110) annotation (Placement(transformation(extent={{-20,0},{0,20}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock( period=0.1, useSolver=true, @@ -525,14 +525,14 @@ Modelica.Mechanics.Rotational.Sources.Torque torque annotation (Placement(transformation(extent={{60,0},{80,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleWithADeffects + Modelica.Clocked.RealSignals.Sampler.SampleWithADeffects sample2( limited=true, quantized=true, yMax=10, bits=16) annotation (Placement(transformation(extent={{-68,4},{-56,16}}))); - Modelica_Synchronous.RealSignals.Sampler.HoldWithDAeffects + Modelica.Clocked.RealSignals.Sampler.HoldWithDAeffects hold1( computationalDelay=true, resolution=10, @@ -543,19 +543,19 @@ yMin=-9.5, bits=16) annotation (Placement(transformation(extent={{26,4},{38,16}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleWithADeffects + Modelica.Clocked.RealSignals.Sampler.SampleWithADeffects sample1(noisy= true, noise(noiseMax=0.01)) annotation (Placement(transformation(extent={{38,-36},{26,-24}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.PI + Modelica.Clocked.RealSignals.NonPeriodic.PI PI( T=0.1, k=110) annotation (Placement(transformation(extent={{-14,0},{6,20}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock + Modelica.Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{8,-36},{-4,-24}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock(period=0.1) annotation (Placement(transformation(extent={{-54,-74},{-42,-62}}))); equation @@ -755,6 +755,7 @@ experiment(StopTime=4)); end Continuous; + model SubClocked "Drive with clocked cascade controller where clocks are defined with sub-sampling and partitions with super-sampling" extends Modelica.Icons.Example; @@ -769,7 +770,7 @@ rotation=-90, origin={111.5,-11.5}))); - Modelica_Synchronous.RealSignals.NonPeriodic.PI + Modelica.Clocked.RealSignals.NonPeriodic.PI PI( k=100, T=0.5, @@ -795,25 +796,25 @@ annotation (Placement(transformation(extent={{-82,2},{-66,18}}))); Modelica.Blocks.Math.Gain gain(k=20) annotation (Placement(transformation(extent={{-56,0},{-36,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{52,-26},{40,-14}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample + Modelica.Clocked.RealSignals.Sampler.Sample sample2 annotation (Placement(transformation(extent={{-42,-46},{-54,-34}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold + Modelica.Clocked.RealSignals.Sampler.Hold hold1 annotation (Placement(transformation(extent={{42,4},{54,16}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample3 annotation (Placement(transformation(extent={{-104,4},{-92,16}}))); - Modelica_Synchronous.RealSignals.Sampler.SuperSample super(inferFactor= + Modelica.Clocked.RealSignals.Sampler.SuperSample super(inferFactor= true) annotation (Placement(transformation(extent={{-28,4},{-16,16}}))); - Modelica_Synchronous.ClockSignals.Sampler.SubSample + Modelica.Clocked.ClockSignals.Sampler.SubSample subSample1(factor=5) annotation (Placement(transformation(extent={{16,-76},{4,-64}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.002) annotation (Placement(transformation(extent={{78,-76},{66,-64}}))); equation @@ -930,7 +931,7 @@ rotation=-90, origin={111.5,-11.5}))); - Modelica_Synchronous.RealSignals.NonPeriodic.PI + Modelica.Clocked.RealSignals.NonPeriodic.PI PI( k=100, T=0.5, @@ -956,22 +957,22 @@ annotation (Placement(transformation(extent={{-82,2},{-66,18}}))); Modelica.Blocks.Math.Gain gain(k=20) annotation (Placement(transformation(extent={{-56,0},{-36,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{52,-26},{40,-14}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample + Modelica.Clocked.RealSignals.Sampler.Sample sample2 annotation (Placement(transformation(extent={{18,-46},{6,-34}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold + Modelica.Clocked.RealSignals.Sampler.Hold hold1 annotation (Placement(transformation(extent={{42,4},{54,16}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample + Modelica.Clocked.RealSignals.Sampler.Sample sample3 annotation (Placement(transformation(extent={{-100,4},{-88,16}}))); - Modelica_Synchronous.RealSignals.Sampler.SuperSample super(factor=5, + Modelica.Clocked.RealSignals.Sampler.SuperSample super(factor=5, inferFactor=false) annotation (Placement(transformation(extent={{-28,4},{-16,16}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.002) annotation (Placement(transformation(extent={{76,-72},{64,-60}}))); equation @@ -1076,7 +1077,7 @@ rotation=-90, origin={111.5,-11.5}))); - Modelica_Synchronous.RealSignals.NonPeriodic.PI + Modelica.Clocked.RealSignals.NonPeriodic.PI PI( k=100, T=0.5, @@ -1102,28 +1103,28 @@ annotation (Placement(transformation(extent={{-82,2},{-66,18}}))); Modelica.Blocks.Math.Gain gain(k=20) annotation (Placement(transformation(extent={{-56,0},{-36,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{52,-26},{40,-14}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample + Modelica.Clocked.RealSignals.Sampler.Sample sample2 annotation (Placement(transformation(extent={{-46,-46},{-58,-34}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold + Modelica.Clocked.RealSignals.Sampler.Hold hold1 annotation (Placement(transformation(extent={{42,4},{54,16}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample3 annotation (Placement(transformation(extent={{-100,4},{-88,16}}))); - Modelica_Synchronous.RealSignals.Sampler.SuperSample super(inferFactor= + Modelica.Clocked.RealSignals.Sampler.SuperSample super(inferFactor= true) annotation (Placement(transformation(extent={{-28,4},{-16,16}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock slowClock(factor=10, resolution= - Modelica_Synchronous.Types.Resolution.ms) annotation (Placement( + Modelica.Clocked.Types.Resolution.ms) annotation (Placement( transformation(extent={{-128,-74},{-116,-62}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock fastClock(factor=2, resolution= - Modelica_Synchronous.Types.Resolution.ms) + Modelica.Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{22,-76},{34,-64}}))); equation connect(speed.flange, load.flange_b) annotation (Line( @@ -1218,7 +1219,6 @@ "), experiment(StopTime=4)); end AbsoluteClocks; - annotation (Documentation(info="

This package shows the same example in different variants. @@ -1248,7 +1248,7 @@ model ControlledMixingUnit "Simple example of a mixing unit where a (discretized) nonlinear inverse plant model is used as feedforward controller" extends Modelica.Icons.Example; - import SI = Modelica.SIunits; + import Modelica.Units.SI; parameter SI.Frequency freq = 1/300 "Critical frequency of filter"; parameter Real c0(unit="mol/l") = 0.848 "Nominal concentration"; parameter SI.Temperature T0 = 308.5 "Nominal temperature"; @@ -1273,7 +1273,7 @@ final parameter Real a22=a22_inv*pro; final parameter Real b=b_inv*pro; final parameter Real k0=k0_inv*pro; - Modelica_Synchronous.Examples.Systems.Utilities.ComponentsMixingUnit.MixingUnit + Modelica.Clocked.Examples.Systems.Utilities.ComponentsMixingUnit.MixingUnit invMixingUnit( c0=c0, T0=T0, @@ -1293,7 +1293,7 @@ annotation (Placement(transformation(extent={{40,-18},{56,-2}}))); Modelica.Blocks.Math.InverseBlockConstraints inverseBlockConstraints annotation (Placement(transformation(extent={{-54,8},{-2,40}}))); - Modelica_Synchronous.Examples.Systems.Utilities.ComponentsMixingUnit.MixingUnit + Modelica.Clocked.Examples.Systems.Utilities.ComponentsMixingUnit.MixingUnit mixingUnit( c(start=c_start, fixed=true), T(start=T_start, fixed=true), @@ -1315,11 +1315,11 @@ f=freq, x(start={0.49,0.49,0.49}, fixed={true,false,false})) annotation (Placement(transformation(extent={{-86,14},{-66,34}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold hold1(y_start=0) + Modelica.Clocked.RealSignals.Sampler.Hold hold1(y_start=0) annotation (Placement(transformation(extent={{66,-16},{78,-4}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample sample1 + Modelica.Clocked.RealSignals.Sampler.Sample sample1 annotation (Placement(transformation(extent={{80,-40},{68,-28}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock periodicClock1( + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1( useSolver=true, period=1, solverMethod="ExplicitEuler") @@ -1546,19 +1546,19 @@ offset=207.34, height=103.67) annotation (Placement(transformation(extent={{-90,6},{-70,26}}))); - Modelica_Synchronous.Examples.Systems.Utilities.ComponentsThrottleControl.SpeedControl + Modelica.Clocked.Examples.Systems.Utilities.ComponentsThrottleControl.SpeedControl speedControl annotation (Placement(transformation(extent={{-32,-5},{0,25}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample + Modelica.Clocked.RealSignals.Sampler.Sample sample1 annotation (Placement(transformation(extent={{-60,9},{-46,23}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold + Modelica.Clocked.RealSignals.Sampler.Hold hold1(y_start=8.9) annotation (Placement(transformation(extent={{8,4},{20,16}}))); - Modelica_Synchronous.ClockSignals.Clocks.Rotational.FixedRotationalClock + Modelica.Clocked.ClockSignals.Clocks.Rotational.FixedRotationalClock rotationalClock(trigger_interval(displayUnit="deg") = 3.1415926535898) annotation (Placement(transformation(extent={{20,-50},{0,-30}}))); - Modelica_Synchronous.Examples.Systems.Utilities.ComponentsThrottleControl.Engine2 + Modelica.Clocked.Examples.Systems.Utilities.ComponentsThrottleControl.Engine2 engine( crankshaftPositionEvent( trigger_interval = rotationalClock.trigger_interval)) @@ -1684,7 +1684,7 @@ package ComponentsThrottleControl extends Modelica.Icons.Package; block ThrottleBody "Basic throttle body equations" - extends Modelica.Blocks.Interfaces.BlockIcon; + extends Modelica.Blocks.Icons.Block; parameter Real P_0 = 1 "Atmospheric pressure, bar"; protected @@ -1709,8 +1709,8 @@ equation der(m_ai) = f_Theta * g_Pm; - f_Theta = 2.821 - 0.05231*Theta + 0.10299*Theta^2 - 0.00063*Theta^3; // different to paper 0.0063*Theta^3 - // Note: If the flow direction changes, i.e. Pm>P_0 the logic will fail since sqrt(-x) + f_Theta = 2.821 - 0.05231*Theta + 0.10299*Theta^2 - 0.00063*Theta^3; // different to paper 0.0063*Theta^3 +// Note: If the flow direction changes, i.e. Pm>P_0 the logic will fail since sqrt(-x) tmp1 = Pm / P_0; tmp2 = P_0 / Pm; pratio = min(tmp1, tmp2); @@ -1724,7 +1724,7 @@ end ThrottleBody; block IntakeManifold "Dynamics of the intake manifold" - extends Modelica.Blocks.Interfaces.BlockIcon; + extends Modelica.Blocks.Icons.Block; parameter Real RTVmRatio = 0.41328 "RT/V_m TODO: What are sensible individual values of R,T, and V_m! (took same value like SIMULINK example for comparison reasons)"; parameter Real P_0 = 0.543 @@ -1741,14 +1741,14 @@ "Intake manifold presure, (bar)" annotation (Placement(transformation(extent={{100,-70},{120,-50}}))); equation - der(P_m) = RTVmRatio*(m_ai_dot - m_ao_dot); // TODO adapt so that der(m_ai) and der(m_ao) is used! + der(P_m) = RTVmRatio*(m_ai_dot - m_ao_dot); // TODO adapt so that der(m_ai) and der(m_ao) is used! m_ao_dot = -0.366 + 0.08979*N*P_m - 0.0337*N*P_m^2 + 0.0001*N^2*P_m; annotation (Diagram(graphics)); end IntakeManifold; block TorqueGeneration - extends Modelica.Blocks.Interfaces.BlockIcon; + extends Modelica.Blocks.Icons.Block; parameter Real AFR = 14.6 "air-fuel ratio (took same value like SIMULINK example for comparison reasons)"; parameter Real sigma = 15.0 @@ -1987,7 +1987,7 @@ block CylinderAirCharge "Integrates the air mass flow into a cylinder. After the charge for one cylinder is complete, resets the mass to 0" - extends Modelica.Blocks.Interfaces.BlockIcon; + extends Modelica.Blocks.Icons.Block; Modelica.Blocks.Interfaces.RealOutput m_a "Mass of an cylinder air charge (g)" @@ -1996,7 +1996,7 @@ "Mass flow rate of air out of manifold (g/s)" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock annotation (Placement(transformation( extent={{-20,-20},{20,20}}, rotation=90, @@ -2017,7 +2017,7 @@ block InductionToPowerDelay "Accounts for the induction-to-power stroke lag" - extends Modelica.Blocks.Interfaces.BlockIcon; + extends Modelica.Blocks.Icons.Block; Modelica.Blocks.Interfaces.RealInput m_a "Mass of cylinder air charge (g)" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); @@ -2028,7 +2028,7 @@ Real m_a_sampled(start=0.152, fixed=true); Real m_a_delayedSampled(start=0.152, fixed=true); public - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock annotation (Placement(transformation( extent={{-20,-20},{20,20}}, rotation=90, @@ -2043,26 +2043,24 @@ end InductionToPowerDelay; model Engine2 "Internal combustion engine" - - public Modelica.Blocks.Interfaces.RealInput Theta "throttle angle, degrees" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica_Synchronous.Examples.Systems.Utilities.ComponentsThrottleControl.ThrottleBody + Modelica.Clocked.Examples.Systems.Utilities.ComponentsThrottleControl.ThrottleBody throttleBody annotation (Placement(transformation(extent={{-78,20},{-58,40}}))); - Modelica_Synchronous.Examples.Systems.Utilities.ComponentsThrottleControl.IntakeManifold + Modelica.Clocked.Examples.Systems.Utilities.ComponentsThrottleControl.IntakeManifold intakeManifold annotation (Placement(transformation(extent={{-78,-20},{-58,0}}))); - Modelica_Synchronous.Examples.Systems.Utilities.ComponentsThrottleControl.TorqueGeneration + Modelica.Clocked.Examples.Systems.Utilities.ComponentsThrottleControl.TorqueGeneration torqueGeneration annotation (Placement(transformation(extent={{18,28},{38,48}}))); - Modelica_Synchronous.ClockSignals.Clocks.Rotational.FixedRotationalClock + Modelica.Clocked.ClockSignals.Clocks.Rotational.FixedRotationalClock crankshaftPositionEvent annotation (Placement(transformation(extent={{70,-74},{50,-54}}))); - Modelica_Synchronous.Examples.Systems.Utilities.ComponentsThrottleControl.InductionToPowerDelay + Modelica.Clocked.Examples.Systems.Utilities.ComponentsThrottleControl.InductionToPowerDelay inductionToPowerDelay annotation (Placement(transformation(extent={{-22,-20},{-2,0}}))); - Modelica_Synchronous.Examples.Systems.Utilities.ComponentsThrottleControl.CylinderAirCharge + Modelica.Clocked.Examples.Systems.Utilities.ComponentsThrottleControl.CylinderAirCharge cylinderAirCharge annotation (Placement(transformation(extent={{-50,-20},{-30,0}}))); Modelica.Mechanics.Rotational.Sources.Torque @@ -2201,7 +2199,7 @@ extends Modelica.Icons.Package; model MixingUnit "Mixing unit demo from Foellinger, Nichtlineare Regelungen II, p. 280" - import SI = Modelica.SIunits; + import Modelica.Units.SI; Modelica.Blocks.Interfaces.RealInput T_c(unit="K") "Cooling temperature" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); @@ -2277,7 +2275,7 @@ model MixingUnitWithContinuousControl extends Modelica.Icons.Example; - import SI = Modelica.SIunits; + import Modelica.Units.SI; parameter SI.Frequency freq = 1/300 "Critical frequency of filter"; parameter Real c0(unit="mol/l") = 0.848 "Nominal concentration"; @@ -2417,7 +2415,7 @@ extends Modelica.Blocks.Interfaces.SISO; parameter Integer n=2 "Order of filter"; - parameter Modelica.SIunits.Frequency f(start=1) "Cut-off frequency"; + parameter Modelica.Units.SI.Frequency f(start=1) "Cut-off frequency"; parameter Boolean normalized = true "= true, if amplitude at f_cut is 3 dB, otherwise unmodified filter"; /* @@ -2514,19 +2512,20 @@ "Examples that are used for the documentation of the Modelica_Synchronous.ClockSignals sub-library" extends Modelica.Icons.ExamplesPackage; + model SubSample "Example of a SubSample block for Clock signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-56,24},{-44,36}}))); - Modelica_Synchronous.ClockSignals.Sampler.SubSample subSample( + Clocked.ClockSignals.Sampler.SubSample subSample( factor=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked sample1 + Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{16,52},{28,64}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-24,48},{-4,68}}))); @@ -2554,18 +2553,18 @@ end SubSample; model SuperSample "Example of a SuperSample block for Clock signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-56,24},{-44,36}}))); - Modelica_Synchronous.ClockSignals.Sampler.SuperSample superSample( + Clocked.ClockSignals.Sampler.SuperSample superSample( factor=3) annotation (Placement(transformation(extent={{-26,24},{-14,36}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked sample1 + Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{10,56},{22,68}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-30,52},{-10,72}}))); @@ -2593,18 +2592,18 @@ end SuperSample; model ShiftSample "Example of a ShiftSample block for Clock signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-56,24},{-44,36}}))); - Modelica_Synchronous.ClockSignals.Sampler.ShiftSample shiftSample( + Clocked.ClockSignals.Sampler.ShiftSample shiftSample( shiftCounter=4, resolution=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked sample1 + Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{14,54},{26,66}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-26,50},{-6,70}}))); @@ -2638,18 +2637,18 @@ Modelica.Blocks.Sources.Sine angle_input( amplitude = 10, - freqHz = 1) +f = 1) annotation (Placement(transformation(extent = {{-70,-10},{-50,10}}))); Modelica.Blocks.Sources.Pulse trigger_interval_input( amplitude = 2, period = 1, offset = 1) annotation (Placement(transformation(extent = {{-70,30},{-50,50}}))); - Modelica_Synchronous.ClockSignals.Clocks.Rotational.RotationalClock rotationalClock + + Modelica.Clocked.ClockSignals.Clocks.Rotational.RotationalClock rotationalClock annotation (Placement(transformation(extent = {{-10,-10},{10,10}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked sample_angle + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample_angle annotation (Placement(transformation(extent = {{34,-14},{46,-26}}))); - equation connect(angle_input.y, rotationalClock.angle) annotation (Line( @@ -2682,7 +2681,6 @@ . ")); end RotationalSample; - annotation (Documentation(info="

This package contains models that have been used to produce @@ -2699,16 +2697,16 @@ model Sample1 "Example of a Sample block for Real signals" extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample sample + Modelica.Clocked.RealSignals.Sampler.Sample sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock + Modelica.Clocked.RealSignals.Sampler.AssignClock assignClock annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Modelica.Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-42,-2},{-30,10}}))); equation connect(sine.y, sample.u) annotation (Line( @@ -2735,12 +2733,12 @@ model Sample2 "Example of a Sample block with discontinuous Real input signals" extends Modelica.Icons.Example; - Modelica_Synchronous.RealSignals.Sampler.Sample sample + Modelica.Clocked.RealSignals.Sampler.Sample sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock + Modelica.Clocked.RealSignals.Sampler.AssignClock assignClock annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Modelica.Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-42,-2},{-30,10}}))); Modelica.Blocks.Sources.Step step(startTime=0.1) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); @@ -2768,22 +2766,22 @@ model Sample3 "Example of a Sample block for Real signals with direct feed-through in the continuous-time and the clocked partition" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.RealSignals.Sampler.SampleClocked sample1 + Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-52,24},{-40,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-76,-6},{-64,6}}))); Modelica.Blocks.Sources.Step step(startTime=0.04) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); Modelica.Blocks.Math.Gain gain(k=1.2) annotation (Placement(transformation(extent={{-8,20},{12,40}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold hold + Clocked.RealSignals.Sampler.Hold hold annotation (Placement(transformation(extent={{20,24},{32,36}}))); Modelica.Blocks.Math.Feedback feedback annotation (Placement(transformation(extent={{-36,20},{-16,40}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample sample2 + Clocked.RealSignals.Sampler.Sample sample2 annotation (Placement(transformation(extent={{6,-6},{-6,6}}))); equation connect(step.y, sample1.u) @@ -2821,18 +2819,18 @@ end Sample3; model SampleClocked "Example of a SampleClocked block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); equation connect(sine.y, sample.u) annotation (Line( @@ -2855,21 +2853,21 @@ model SampleVectorizedAndClocked "Example of a SampleVectorizedAndClocked block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; Modelica.Blocks.Sources.Sine sine2( - freqHz=2, + f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleVectorizedAndClocked + Clocked.RealSignals.Sampler.SampleVectorizedAndClocked sample(n=2) annotation (Placement(transformation(extent={{-14,24},{-2,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-28,-6},{-16,6}}))); - Modelica.Blocks.Sources.Sine sine1(startTime=0, freqHz=3) + Modelica.Blocks.Sources.Sine sine1(startTime=0, f =3) annotation (Placement(transformation(extent={{-80,-2},{-60,18}}))); equation connect(periodicClock.y, sample.clock) annotation (Line( @@ -2895,27 +2893,27 @@ model SampleWithADeffects "Example of a SampleWithADeffects block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, startTime=0, amplitude=0.95) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleWithADeffects + Clocked.RealSignals.Sampler.SampleWithADeffects sample( noisy=true, limited=true, quantized=true, yMax=0.8, redeclare - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.UniformNoise +Clocked.RealSignals.Sampler.Utilities.Internal.UniformNoise noise(noiseMax=0.2)) annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock + Clocked.RealSignals.Sampler.AssignClock assignClock annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - resolution=Modelica_Synchronous.Types.Resolution.ms, factor=20) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + resolution=Clocked.Types.Resolution.ms, factor=20) annotation (Placement(transformation(extent={{-42,-2},{-30,10}}))); equation connect(sine.y, sample.u) annotation (Line( @@ -2940,22 +2938,22 @@ end SampleWithADeffects; model Hold "Example of a Hold block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-52,24},{-40,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica_Synchronous.RealSignals.Sampler.Hold hold(y_start=-1.0) + Clocked.RealSignals.Sampler.Hold hold(y_start=-1.0) annotation (Placement(transformation(extent={{-8,24},{4,36}}))); - Modelica_Synchronous.RealSignals.Sampler.ShiftSample shiftSample( + Clocked.RealSignals.Sampler.ShiftSample shiftSample( shiftCounter=2) annotation (Placement(transformation(extent={{-30,24},{-18,36}}))); equation @@ -2985,20 +2983,20 @@ model HoldWithDAeffects1 "Example of a HoldWithDAeffects block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, startTime=0, amplitude=2) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-52,24},{-40,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica_Synchronous.RealSignals.Sampler.HoldWithDAeffects + Clocked.RealSignals.Sampler.HoldWithDAeffects hold( computationalDelay=true, shiftCounter=1, @@ -3007,7 +3005,7 @@ limited=true, yMax=1.9) annotation (Placement(transformation(extent={{-8,24},{4,36}}))); - Modelica_Synchronous.RealSignals.Sampler.ShiftSample shiftSample( + Clocked.RealSignals.Sampler.ShiftSample shiftSample( shiftCounter=2) annotation (Placement(transformation(extent={{-30,24},{-18,36}}))); equation @@ -3037,20 +3035,20 @@ model HoldWithDAeffects2 "Example of a HoldWithDAeffects block for Real signals (with a computational delay of one sample period)" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, startTime=0, amplitude=2) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-52,24},{-40,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica_Synchronous.RealSignals.Sampler.HoldWithDAeffects + Clocked.RealSignals.Sampler.HoldWithDAeffects hold( computationalDelay=true, shiftCounter=1, @@ -3059,7 +3057,7 @@ yMax=1.9, resolution=1) annotation (Placement(transformation(extent={{-8,24},{4,36}}))); - Modelica_Synchronous.RealSignals.Sampler.ShiftSample shiftSample( + Clocked.RealSignals.Sampler.ShiftSample shiftSample( shiftCounter=2) annotation (Placement(transformation(extent={{-30,24},{-18,36}}))); equation @@ -3088,20 +3086,20 @@ end HoldWithDAeffects2; model SubSample "Example of a SubSample block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.RealSignals.Sampler.SubSample subSample( + Clocked.RealSignals.Sampler.SubSample subSample( inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); equation @@ -3127,20 +3125,20 @@ end SubSample; model SuperSample "Example of a SuperSample block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.RealSignals.Sampler.SuperSample superSample(inferFactor=false, + Clocked.RealSignals.Sampler.SuperSample superSample(inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); equation @@ -3168,20 +3166,20 @@ model SuperSampleInterpolated "Example of a SuperSampleInterpolated block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.RealSignals.Sampler.SuperSampleInterpolated superSampleIpo( + Clocked.RealSignals.Sampler.SuperSampleInterpolated superSampleIpo( inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); equation @@ -3208,20 +3206,20 @@ end SuperSampleInterpolated; model ShiftSample "Example of a ShiftSample block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.RealSignals.Sampler.ShiftSample shiftSample1( + Clocked.RealSignals.Sampler.ShiftSample shiftSample1( shiftCounter=4, resolution=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); equation @@ -3247,23 +3245,23 @@ end ShiftSample; model BackSample "Example of a BackSample block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.RealSignals.Sampler.ShiftSample shiftSample1( + Clocked.RealSignals.Sampler.ShiftSample shiftSample1( shiftCounter=4, resolution=3) annotation (Placement(transformation(extent={{-26,24},{-14,36}}))); - Modelica_Synchronous.RealSignals.Sampler.BackSample backSample1( + Clocked.RealSignals.Sampler.BackSample backSample1( backCounter=4, resolution=3, y_start=0.5) @@ -3294,15 +3292,15 @@ end BackSample; model AssignClock "Example of a AssignClock block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-42,0},{-30,12}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock1 + Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-26,22},{-14,34}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.UnitDelay unitDelay1 + Clocked.RealSignals.NonPeriodic.UnitDelay unitDelay1 annotation (Placement(transformation(extent={{-38,48},{-58,68}}))); Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{-58,18},{-38,38}}))); @@ -3338,26 +3336,26 @@ model AssignClockVectorized "Example of a AssignClockVectorized block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-54,-50},{-42,-38}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.UnitDelay unitDelay1 + Clocked.RealSignals.NonPeriodic.UnitDelay unitDelay1 annotation (Placement(transformation(extent={{-38,58},{-58,78}}))); Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{-58,28},{-38,48}}))); Modelica.Blocks.Sources.Constant const(k=1) annotation (Placement(transformation(extent={{-92,22},{-72,42}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClockVectorized + Clocked.RealSignals.Sampler.AssignClockVectorized assignClock1(n=2) annotation (Placement(transformation(extent={{-24,18},{-12,30}}))); Modelica.Blocks.Math.Add add1 annotation (Placement(transformation(extent={{-58,2},{-38,22}}))); Modelica.Blocks.Sources.Constant const1(k=2) annotation (Placement(transformation(extent={{-92,-10},{-72,10}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.UnitDelay unitDelay2 + Clocked.RealSignals.NonPeriodic.UnitDelay unitDelay2 annotation (Placement(transformation(extent={{-38,-28},{-58,-8}}))); equation connect(add.u2, const.y) annotation (Line( @@ -3400,22 +3398,22 @@ end AssignClockVectorized; model UpSample1 "Example of an UpSample block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-48,24},{-36,36}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.UpSample upSample1 + Clocked.RealSignals.Sampler.Utilities.UpSample upSample1 annotation (Placement(transformation(extent={{-26,34},{-14,46}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.UpSample upSample2( + Clocked.RealSignals.Sampler.Utilities.UpSample upSample2( inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-26,14},{-14,26}}))); Modelica.Blocks.Math.Add add @@ -3453,29 +3451,29 @@ model UpSample2 "Example of an UpSample block for Real signals combined with FIR filter blocks" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-48,24},{-36,36}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.UpSample upSample( + Clocked.RealSignals.Sampler.Utilities.UpSample upSample( inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-24,24},{-12,36}}))); - Modelica_Synchronous.RealSignals.Sampler.SuperSampleInterpolated + Clocked.RealSignals.Sampler.SuperSampleInterpolated superSampleIpo(inferFactor=false, factor=3) annotation (Placement(transformation(extent={{12,-44},{24,-32}}))); - Modelica_Synchronous.RealSignals.Periodic.FIRbyCoefficients FIR2(a={1/3,2/3,1, + Clocked.RealSignals.Periodic.FIRbyCoefficients FIR2(a={1/3,2/3,1, 2/3,1/3}, cBufStart={0,0,0,0}) annotation (Placement(transformation(extent={{6,-14},{26,6}}))); - Modelica_Synchronous.RealSignals.Periodic.FIRbyCoefficients FIR1(a={1,1,1}, + Clocked.RealSignals.Periodic.FIRbyCoefficients FIR1(a={1,1,1}, cBufStart={0,0}) annotation (Placement(transformation(extent={{6,20},{26,40}}))); equation @@ -3512,22 +3510,22 @@ model AssignClockToTriggerHold "Example of an AssignClockToTriggerHold block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-48,24},{-36,36}}))); Modelica.Blocks.Discrete.TriggeredSampler triggeredSampler annotation (Placement(transformation(extent={{10,40},{30,60}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.AssignClockToTriggerHold + Clocked.RealSignals.Sampler.Utilities.AssignClockToTriggerHold clockToTrigger annotation (Placement(transformation(extent={{-20,20},{0,40}}))); equation @@ -3560,20 +3558,20 @@ model AssignClockToSquareWaveHold "Example of an AssignClockToSquareWaveHold block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-48,24},{-36,36}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.AssignClockToSquareWaveHold + Clocked.RealSignals.Sampler.Utilities.AssignClockToSquareWaveHold clockToSquareWave annotation (Placement(transformation(extent={{-24,20},{-4,40}}))); equation @@ -3599,16 +3597,16 @@ end AssignClockToSquareWaveHold; model UniformNoise "Example of a UniformNoise block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.UniformNoise + Clocked.RealSignals.Sampler.Utilities.Internal.UniformNoise uniformNoise annotation (Placement(transformation(extent={{-26,20},{-6,40}}))); Modelica.Blocks.Sources.Constant const(k=0) @@ -3637,20 +3635,20 @@ model FractionalDelay "Example of a FractionalDelay block for Real signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Clocked.RealSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-48,24},{-36,36}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.FractionalDelay + Clocked.RealSignals.NonPeriodic.FractionalDelay fractionalDelay(shift=3, resolution=2) annotation (Placement(transformation(extent={{-26,20},{-6,40}}))); equation @@ -3677,14 +3675,14 @@ model TimeBasedStep "Example of using the clocked simulation time based Step source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.RealSignals.TimeBasedSources.Step + Clocked.RealSignals.TimeBasedSources.Step step(startTime=0.2) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock1 + Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-24,24},{-12,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-70,-18},{-58,-6}}))); equation @@ -3708,14 +3706,14 @@ model TickBasedStep "Example of using the clocked tick based Step source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock1 + Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-24,24},{-12,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-70,-18},{-58,-6}}))); - Modelica_Synchronous.RealSignals.TickBasedSources.Step step(startTick=3) + Clocked.RealSignals.TickBasedSources.Step step(startTick=3) annotation (Placement(transformation(extent={{-66,20},{-46,40}}))); equation @@ -3738,15 +3736,15 @@ model TimeBasedSine "Example of using the clocked time based Sine source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock1 + Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-24,24},{-12,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-70,-18},{-58,-6}}))); - Modelica_Synchronous.RealSignals.TimeBasedSources.Sine - sine(freqHz=2) + Clocked.RealSignals.TimeBasedSources.Sine + sine(f =2) annotation (Placement(transformation(extent={{-66,20},{-46,40}}))); equation @@ -3769,20 +3767,20 @@ model TickBasedSine "Example of using the clocked tick based Sine source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock1 + Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-24,24},{-12,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-70,-18},{-58,-6}}))); - Modelica_Synchronous.RealSignals.TickBasedSources.Sine sine( + Clocked.RealSignals.TickBasedSources.Sine sine( periodTicks=10, periodOffset=2, startTick=4) annotation (Placement(transformation(extent={{-72,20},{-52,40}}))); Modelica.Blocks.Sources.Sine sineRef( - freqHz=1, + f =1, phase=1/5*(2*Modelica.Constants.pi), startTime=0.3) annotation (Placement(transformation(extent={{-72,58},{-52,78}}))); @@ -3807,14 +3805,14 @@ model TimeBasedRamp "Example of using the clocked time based Ramp source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock1 + Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-24,24},{-12,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-70,-18},{-58,-6}}))); - Modelica_Synchronous.RealSignals.TimeBasedSources.Ramp + Clocked.RealSignals.TimeBasedSources.Ramp ramp(duration=0.5) annotation (Placement(transformation(extent={{-72,20},{-52,40}}))); equation @@ -3838,14 +3836,14 @@ model TickBasedRamp "Example of using the clocked tick based Ramp source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.RealSignals.Sampler.AssignClock assignClock1 + Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-24,24},{-12,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-70,-18},{-58,-6}}))); - Modelica_Synchronous.RealSignals.TickBasedSources.Ramp ramp( + Clocked.RealSignals.TickBasedSources.Ramp ramp( height=1, durationTicks=3, startTick=2, @@ -3884,18 +3882,18 @@ extends Modelica.Icons.ExamplesPackage; model Sample1 "Example of a Sample block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.IntegerSignals.Sampler.AssignClock + Clocked.IntegerSignals.Sampler.AssignClock assignClock annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-42,-2},{-30,10}}))); Modelica.Blocks.Sources.IntegerStep step(startTime=0.1) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Sample sample + Clocked.IntegerSignals.Sampler.Sample sample annotation (Placement(transformation(extent={{-48,24},{-36,36}}))); equation connect(periodicClock.y, assignClock.clock) annotation (Line( @@ -3921,21 +3919,21 @@ model Sample2 "Example of a Sample block for Integer signals with direct feed-through in the continuous-time and the clocked partition" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Clocked.IntegerSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-60,24},{-48,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-76,-6},{-64,6}}))); Modelica.Blocks.Sources.IntegerStep step(startTime=0.04) annotation (Placement(transformation(extent={{-96,20},{-76,40}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Hold + Clocked.IntegerSignals.Sampler.Hold hold annotation (Placement(transformation(extent={{22,24},{34,36}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Sample + Clocked.IntegerSignals.Sampler.Sample sample2 annotation (Placement(transformation(extent={{6,-6},{-6,6}}))); Modelica.Blocks.MathInteger.Sum sum1(k={1,-1}, nu=2) @@ -3989,17 +3987,17 @@ model SampleClocked "Example of a SampleClocked block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; Modelica.Blocks.Sources.IntegerStep step(startTime=0.1, offset=1) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Clocked.IntegerSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); equation connect(periodicClock.y, sample.clock) annotation (Line( @@ -4022,17 +4020,17 @@ model SampleVectorizedAndClocked "Example of a SampleVectorizedAndClocked block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; Modelica.Blocks.Sources.IntegerStep step2(offset=1, startTime=0.04) annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SampleVectorizedAndClocked + Clocked.IntegerSignals.Sampler.SampleVectorizedAndClocked sample(n=2) annotation (Placement(transformation(extent={{-14,24},{-2,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-28,-6},{-16,6}}))); Modelica.Blocks.Sources.IntegerStep step1(startTime=0.08) @@ -4060,22 +4058,22 @@ end SampleVectorizedAndClocked; model Hold "Example of a Hold block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; Modelica.Blocks.Sources.IntegerTable table(table=[0,1; 0.05,2; 0.1,0; 0.15,-1; 0.2,3]) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Clocked.IntegerSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-52,24},{-40,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Hold + Clocked.IntegerSignals.Sampler.Hold hold(y_start=-1) annotation (Placement(transformation(extent={{-8,24},{4,36}}))); - Modelica_Synchronous.IntegerSignals.Sampler.ShiftSample + Clocked.IntegerSignals.Sampler.ShiftSample shiftSample( shiftCounter=2) annotation (Placement(transformation(extent={{-30,24},{-18,36}}))); @@ -4105,16 +4103,16 @@ end Hold; model SubSample "Example of a SubSample block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Clocked.IntegerSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SubSample + Clocked.IntegerSignals.Sampler.SubSample subSample( inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); @@ -4144,16 +4142,16 @@ end SubSample; model SuperSample "Example of a SuperSample block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Clocked.IntegerSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SuperSample superSample(inferFactor=false, + Clocked.IntegerSignals.Sampler.SuperSample superSample(inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); Modelica.Blocks.Sources.IntegerTable table(table=[0,1; 0.05,2; 0.1,0; 0.15,-1; @@ -4182,16 +4180,16 @@ end SuperSample; model ShiftSample "Example of a ShiftSample block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Clocked.IntegerSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.IntegerSignals.Sampler.ShiftSample shiftSample1( + Clocked.IntegerSignals.Sampler.ShiftSample shiftSample1( shiftCounter=4, resolution=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); Modelica.Blocks.Sources.IntegerTable table(table=[0,1; 0.025,2; 0.05, @@ -4220,19 +4218,19 @@ end ShiftSample; model BackSample "Example of a BackSample block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Clocked.IntegerSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.IntegerSignals.Sampler.ShiftSample shiftSample1( + Clocked.IntegerSignals.Sampler.ShiftSample shiftSample1( shiftCounter=4, resolution=3) annotation (Placement(transformation(extent={{-18,24},{-6,36}}))); - Modelica_Synchronous.IntegerSignals.Sampler.BackSample backSample1( + Clocked.IntegerSignals.Sampler.BackSample backSample1( backCounter=4, resolution=3, y_start=1) @@ -4266,15 +4264,15 @@ end BackSample; model AssignClock "Example of an AssignClock block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-42,0},{-30,12}}))); - Modelica_Synchronous.IntegerSignals.Sampler.AssignClock assignClock1 + Clocked.IntegerSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-26,22},{-14,34}}))); - Modelica_Synchronous.IntegerSignals.NonPeriodic.UnitDelay unitDelay1 + Clocked.IntegerSignals.NonPeriodic.UnitDelay unitDelay1 annotation (Placement(transformation(extent={{-38,48},{-58,68}}))); Modelica.Blocks.Sources.IntegerConstant const(k=1) @@ -4311,24 +4309,24 @@ model AssignClockVectorized "Example of an AssignClockVectorized block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-54,-50},{-42,-38}}))); - Modelica_Synchronous.IntegerSignals.NonPeriodic.UnitDelay unitDelay1 + Clocked.IntegerSignals.NonPeriodic.UnitDelay unitDelay1 annotation (Placement(transformation(extent={{-38,58},{-58,78}}))); Modelica.Blocks.Sources.IntegerConstant const(k=1) annotation (Placement(transformation(extent={{-92,22},{-72,42}}))); - Modelica_Synchronous.IntegerSignals.Sampler.AssignClockVectorized + Clocked.IntegerSignals.Sampler.AssignClockVectorized assignClock1(n=2) annotation (Placement(transformation(extent={{-24,18},{-12,30}}))); Modelica.Blocks.Sources.IntegerConstant const1(k=2) annotation (Placement(transformation(extent={{-92,-10},{-72,10}}))); - Modelica_Synchronous.IntegerSignals.NonPeriodic.UnitDelay unitDelay2 + Clocked.IntegerSignals.NonPeriodic.UnitDelay unitDelay2 annotation (Placement(transformation(extent={{-38,-28},{-58,-8}}))); Modelica.Blocks.MathInteger.Sum sum1(nu=2) annotation (Placement(transformation(extent={{-54,32},{-42,44}}))); @@ -4375,18 +4373,18 @@ end AssignClockVectorized; model UpSample "Example of an UpSample block for Integer signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Clocked.IntegerSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-48,24},{-36,36}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Utilities.UpSample upSample1 + Clocked.IntegerSignals.Sampler.Utilities.UpSample upSample1 annotation (Placement(transformation(extent={{-26,34},{-14,46}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Utilities.UpSample upSample2( + Clocked.IntegerSignals.Sampler.Utilities.UpSample upSample2( inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-26,14},{-14,26}}))); Modelica.Blocks.Sources.IntegerTable table(table=[0,1; 0.025,2; 0.05, @@ -4427,18 +4425,18 @@ model TimeBasedStep "Example of using the clocked simulation time based Integer Step source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.IntegerSignals.TimeBasedSources.Step step( + Clocked.IntegerSignals.TimeBasedSources.Step step( height=3, offset=1, startTime=0.2) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-60,-8},{-48,4}}))); - Modelica_Synchronous.IntegerSignals.Sampler.AssignClock assignClock1 + Clocked.IntegerSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); equation connect(step.y, assignClock1.u) annotation (Line( @@ -4461,15 +4459,15 @@ model TickBasedStep "Example of using the clocked simulation tick/sample based Integer Step source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-60,-8},{-48,4}}))); - Modelica_Synchronous.IntegerSignals.Sampler.AssignClock assignClock1 + Clocked.IntegerSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.IntegerSignals.TickBasedSources.Step step( + Clocked.IntegerSignals.TickBasedSources.Step step( height=3, offset=1, startTick=3) @@ -4507,18 +4505,18 @@ extends Modelica.Icons.ExamplesPackage; model Sample1 "Example of a Sample block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.BooleanSignals.Sampler.AssignClock + Clocked.BooleanSignals.Sampler.AssignClock assignClock annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-42,-2},{-30,10}}))); Modelica.Blocks.Sources.BooleanStep step(startTime=0.1) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Sample sample + Clocked.BooleanSignals.Sampler.Sample sample annotation (Placement(transformation(extent={{-48,24},{-36,36}}))); equation connect(periodicClock.y, assignClock.clock) annotation (Line( @@ -4544,21 +4542,21 @@ model Sample2 "Example of a Sample block for Boolean signals with direct feed-through in the continuous-time and the clocked partition" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Clocked.BooleanSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-60,24},{-48,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-76,-6},{-64,6}}))); Modelica.Blocks.Sources.BooleanStep step(startTime=0.04) annotation (Placement(transformation(extent={{-96,20},{-76,40}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Hold + Clocked.BooleanSignals.Sampler.Hold hold annotation (Placement(transformation(extent={{22,24},{34,36}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Sample + Clocked.BooleanSignals.Sampler.Sample sample2 annotation (Placement(transformation(extent={{6,-6},{-6,6}}))); Modelica.Blocks.Sources.BooleanConstant integerConstant(k=true) @@ -4610,17 +4608,17 @@ model SampleClocked "Example of a SampleClocked block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; Modelica.Blocks.Sources.BooleanStep step(startTime=0.1) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Clocked.BooleanSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); equation connect(periodicClock.y, sample.clock) annotation (Line( @@ -4643,17 +4641,17 @@ model SampleVectorizedAndClocked "Example of a SampleVectorizedAndClocked block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; Modelica.Blocks.Sources.BooleanStep step2(startTime=0.04) annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SampleVectorizedAndClocked + Clocked.BooleanSignals.Sampler.SampleVectorizedAndClocked sample(n=2) annotation (Placement(transformation(extent={{-14,24},{-2,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-28,-6},{-16,6}}))); Modelica.Blocks.Sources.BooleanStep step1(startTime=0.08) @@ -4681,21 +4679,21 @@ end SampleVectorizedAndClocked; model Hold "Example of a Hold block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; Modelica.Blocks.Sources.BooleanTable table(table={0.05,0.15}) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Clocked.BooleanSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-52,24},{-40,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Hold + Clocked.BooleanSignals.Sampler.Hold hold(y_start=false) annotation (Placement(transformation(extent={{-8,24},{4,36}}))); - Modelica_Synchronous.BooleanSignals.Sampler.ShiftSample + Clocked.BooleanSignals.Sampler.ShiftSample shiftSample( shiftCounter=2) annotation (Placement(transformation(extent={{-30,24},{-18,36}}))); @@ -4725,16 +4723,16 @@ end Hold; model SubSample "Example of a SubSample block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Clocked.BooleanSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SubSample + Clocked.BooleanSignals.Sampler.SubSample subSample( inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); @@ -4763,16 +4761,16 @@ end SubSample; model SuperSample "Example of a SuperSample block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Clocked.BooleanSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SuperSample superSample(inferFactor=false, + Clocked.BooleanSignals.Sampler.SuperSample superSample(inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); Modelica.Blocks.Sources.BooleanTable table(table={0.05,0.15}) @@ -4800,16 +4798,16 @@ end SuperSample; model ShiftSample "Example of a ShiftSample block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Clocked.BooleanSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.BooleanSignals.Sampler.ShiftSample shiftSample1( + Clocked.BooleanSignals.Sampler.ShiftSample shiftSample1( shiftCounter=4, resolution=3) annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); Modelica.Blocks.Sources.BooleanTable table(table={0.05,0.15}) @@ -4837,19 +4835,19 @@ end ShiftSample; model BackSample "Example of a BackSample block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Clocked.BooleanSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.BooleanSignals.Sampler.ShiftSample shiftSample1( + Clocked.BooleanSignals.Sampler.ShiftSample shiftSample1( shiftCounter=4, resolution=3) annotation (Placement(transformation(extent={{-18,24},{-6,36}}))); - Modelica_Synchronous.BooleanSignals.Sampler.BackSample backSample1( + Clocked.BooleanSignals.Sampler.BackSample backSample1( backCounter=4, resolution=3, y_start=true) @@ -4882,15 +4880,15 @@ end BackSample; model AssignClock "Example of an AssignClock block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-42,0},{-30,12}}))); - Modelica_Synchronous.BooleanSignals.Sampler.AssignClock assignClock1 + Clocked.BooleanSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-26,22},{-14,34}}))); - Modelica_Synchronous.BooleanSignals.NonPeriodic.UnitDelay unitDelay1 + Clocked.BooleanSignals.NonPeriodic.UnitDelay unitDelay1 annotation (Placement(transformation(extent={{-38,48},{-58,68}}))); Modelica.Blocks.Logical.Xor xor annotation (Placement(transformation(extent={{-59,18},{-39,38}}))); @@ -4926,18 +4924,18 @@ model AssignClockVectorized "Example of an AssignClockVectorized block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-54,-50},{-42,-38}}))); - Modelica_Synchronous.BooleanSignals.NonPeriodic.UnitDelay unitDelay1 + Clocked.BooleanSignals.NonPeriodic.UnitDelay unitDelay1 annotation (Placement(transformation(extent={{-38,58},{-58,78}}))); - Modelica_Synchronous.BooleanSignals.Sampler.AssignClockVectorized + Clocked.BooleanSignals.Sampler.AssignClockVectorized assignClock1(n=2) annotation (Placement(transformation(extent={{-24,18},{-12,30}}))); - Modelica_Synchronous.BooleanSignals.NonPeriodic.UnitDelay unitDelay2(y_start= + Clocked.BooleanSignals.NonPeriodic.UnitDelay unitDelay2(y_start= true) annotation (Placement(transformation(extent={{-38,-28},{-58,-8}}))); Modelica.Blocks.Logical.Xor xor @@ -4989,18 +4987,18 @@ end AssignClockVectorized; model UpSample "Example of an UpSample block for Boolean signals" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock periodicClock( - factor=20, resolution=Modelica_Synchronous.Types.Resolution.ms) + Clocked.ClockSignals.Clocks.PeriodicExactClock periodicClock( + factor=20, resolution=Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-68,-6},{-56,6}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Clocked.BooleanSignals.Sampler.SampleClocked sample annotation (Placement(transformation(extent={{-48,24},{-36,36}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Utilities.UpSample upSample1 + Clocked.BooleanSignals.Sampler.Utilities.UpSample upSample1 annotation (Placement(transformation(extent={{-26,34},{-14,46}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Utilities.UpSample upSample2( + Clocked.BooleanSignals.Sampler.Utilities.UpSample upSample2( inferFactor=false, factor=3) annotation (Placement(transformation(extent={{-26,14},{-14,26}}))); Modelica.Blocks.Sources.BooleanTable table1(table={0.05,0.15}) @@ -5040,16 +5038,16 @@ model TimeBasedStep "Example of using the clocked simulation time based Boolean Step source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.BooleanSignals.TimeBasedSources.Step step( + Clocked.BooleanSignals.TimeBasedSources.Step step( startTime=0.2) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-60,-8},{-48,4}}))); - Modelica_Synchronous.BooleanSignals.Sampler.AssignClock assignClock1 + Clocked.BooleanSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); equation connect(periodicClock1.y, assignClock1.clock) annotation (Line( @@ -5072,15 +5070,15 @@ model TickBasedStep "Example of using the clocked simulation tick/sample based Boolean Step source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-60,-8},{-48,4}}))); - Modelica_Synchronous.BooleanSignals.Sampler.AssignClock assignClock1 + Clocked.BooleanSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.BooleanSignals.TickBasedSources.Step step(startTick= + Clocked.BooleanSignals.TickBasedSources.Step step(startTick= 3) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); equation @@ -5104,18 +5102,18 @@ model TimeBasedPulse "Example of using the clocked simulation time based Boolean Pulse source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.BooleanSignals.TimeBasedSources.Pulse pulse( + Clocked.BooleanSignals.TimeBasedSources.Pulse pulse( width=50, period=0.4, startTime=0.1) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-60,-8},{-48,4}}))); - Modelica_Synchronous.BooleanSignals.Sampler.AssignClock assignClock1 + Clocked.BooleanSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); equation connect(periodicClock1.y, assignClock1.clock) annotation (Line( @@ -5138,15 +5136,15 @@ model TickBasedPulse "Example of using the clock tick based Boolean Pulse source block" - import Modelica_Synchronous; + import Modelica.Clocked; extends Modelica.Icons.Example; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-60,-8},{-48,4}}))); - Modelica_Synchronous.BooleanSignals.Sampler.AssignClock assignClock1 + Clocked.BooleanSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-22,24},{-10,36}}))); - Modelica_Synchronous.BooleanSignals.TickBasedSources.Pulse pulse( + Clocked.BooleanSignals.TickBasedSources.Pulse pulse( widthTicks=2, periodTicks=4, startTick=2) diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/IntegerSignals.mo" "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/IntegerSignals.mo" --- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/IntegerSignals.mo" 2021-11-24 08:09:29.379341250 +0000 +++ "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/IntegerSignals.mo" 2021-11-24 08:10:07.703226040 +0000 @@ -6,7 +6,7 @@ block Sample "Sample the continuous-time, Integer input signal and provide it as clocked output signal (clock is inferred)" - extends Modelica_Synchronous.IntegerSignals.Interfaces.PartialSISOSampler; + extends Modelica.Clocked.IntegerSignals.Interfaces.PartialSISOSampler; equation y = sample(u); @@ -43,8 +43,8 @@ block SampleClocked "Sample the continuous-time, Integer input signal and provide it as clocked output signal. The clock is provided as input signal" - extends Modelica_Synchronous.IntegerSignals.Interfaces.SamplerIcon; - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + extends Modelica.Clocked.IntegerSignals.Interfaces.SamplerIcon; + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock "Output signal y is associated with this clock input" annotation (Placement(transformation( extent={{-20,-20},{20,20}}, @@ -95,7 +95,7 @@ block SampleVectorizedAndClocked "Sample the continuous-time, Integer input signal vector and provide it as clocked output signal vector. The clock is provided as input signal" - extends Modelica_Synchronous.IntegerSignals.Interfaces.SamplerIcon; + extends Modelica.Clocked.IntegerSignals.Interfaces.SamplerIcon; parameter Integer n(min=1)=1 "Size of input signal vector u (= size of output signal vector y)"; Modelica.Blocks.Interfaces.IntegerInput @@ -106,7 +106,7 @@ y[n] "Connector of clocked, Integer output signal vector" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock "Output signal vector y is associated with this clock input" annotation (Placement(transformation( extent={{-20,-20},{20,20}}, @@ -154,7 +154,7 @@ block Hold "Hold the clocked, Integer input signal and provide it as continuous-time output signal (zero order hold)" - extends Modelica_Synchronous.IntegerSignals.Interfaces.PartialSISOHold; + extends Modelica.Clocked.IntegerSignals.Interfaces.PartialSISOHold; parameter Integer y_start = 0 "Value of output y before the first tick of the clock associated to input u"; @@ -611,7 +611,7 @@ y "Connector of clocked, Integer output signal" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock annotation (Placement(transformation( extent={{-20,-20},{20,20}}, rotation=90, @@ -703,7 +703,7 @@ y[n] "Connector of clocked, Integer output signal" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock annotation (Placement(transformation( extent={{-20,-20},{20,20}}, rotation=90, @@ -784,6 +784,7 @@ package Utilities "Utility components that are usually not directly used" extends Modelica.Icons.UtilitiesPackage; + block UpSample "Upsample the clocked Integer input signal and provide it as clocked output signal" @@ -804,22 +805,22 @@ Boolean b(start=false); Boolean b_super(start=false); Integer u_super; - equation - when Clock() then // clock of u - dummy = u; - b = not previous(b); - end when; - - when Clock() then // clock of y - b_super = superSample(b); - if inferFactor then - u_super = superSample(u); - else - u_super = superSample(u,factor); - end if; - y = if b_super <> previous(b_super) then u_super else 0; + equation + when Clock() then +// clock of u + dummy = u; + b = not previous(b); + end when; + when Clock() then +// clock of y + b_super = superSample(b); + if inferFactor then + u_super = superSample(u); + else + u_super = superSample(u, factor); + end if; + y = if b_super <> previous(b_super) then u_super else 0; end when; - annotation ( defaultComponentName="upSample1", Icon(coordinateSystem( @@ -916,7 +917,7 @@ block AssignClockToTriggerHold "Generate a Boolean continuous-time trigger signal from a clocked Integer input" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; parameter Boolean y_start=false "Initial value of output signal"; Modelica.Blocks.Interfaces.IntegerInput u @@ -979,7 +980,7 @@ block AssignClockToSquareWaveHold "Generate a Boolean continuous-time square signal from a clocked Integer input" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; parameter Boolean y_start=false "Initial value of output signal"; Modelica.Blocks.Interfaces.IntegerInput u @@ -991,7 +992,7 @@ protected Boolean y2(start=y_start); equation - // dummy condition to relate clock of u with y2 +// dummy condition to relate clock of u with y2 y2 = if u > 0 then not previous(y2) else not previous(y2); y = hold(y2); annotation ( @@ -1032,7 +1033,6 @@

")); end AssignClockToSquareWaveHold; - annotation (Documentation(info="

This package contains utility blocks that are usually not directly utilized @@ -1114,7 +1114,7 @@ extends Modelica.Icons.Package; block IntegerChange - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; Modelica.Blocks.Interfaces.IntegerInput u "Connector of Integer input signal." @@ -1159,7 +1159,7 @@ end IntegerChange; block UnitDelay "Delays the clocked input signal for one sample period" - extends Modelica_Synchronous.IntegerSignals.Interfaces.PartialClockedSISO( + extends Modelica.Clocked.IntegerSignals.Interfaces.PartialClockedSISO( u(final start=y_start)); parameter Integer y_start=0 "Value of output signal at first clock tick"; equation @@ -1202,7 +1202,7 @@ block FractionalDelay "Delays the clocked input signal for a fractional multiple of the sample period" - extends Modelica_Synchronous.IntegerSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.IntegerSignals.Interfaces.PartialClockedSISO; parameter Integer shift(min=0) = 0 "Delay = interval() * shift/resolution"; @@ -1274,10 +1274,10 @@ extends Interfaces.PartialClockedSO; parameter Integer height = 1 "Height of step"; parameter Integer offset = 0 "Offset of output signal y"; - parameter Modelica.SIunits.Time startTime = 0 + parameter Modelica.Units.SI.Time startTime = 0 "Output y = offset for time < startTime"; protected - Modelica.SIunits.Time simTime; + Modelica.Units.SI.Time simTime; equation simTime = sample(time); y = offset + (if simTime < startTime then 0 else height); @@ -1457,7 +1457,7 @@ protected Integer counter(start=0); equation - // stop counter after counter = startTick to avoid integer overflow for long running simulations +// stop counter after counter = startTick to avoid integer overflow for long running simulations counter = if previous(counter) < startTick then previous(counter) + 1 else previous(counter); y = offset + (if counter < startTick then 0 else height); annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100, @@ -1656,7 +1656,7 @@ partial block PartialSISOSampler "Basic block used for sampling of Integer signals" - extends Modelica_Synchronous.IntegerSignals.Interfaces.SamplerIcon; + extends Modelica.Clocked.IntegerSignals.Interfaces.SamplerIcon; Modelica.Blocks.Interfaces.IntegerInput u "Connector of continuous-time, Real input signal" @@ -1723,7 +1723,7 @@ partial block PartialClockedSISO "Block with clocked single input and clocked single output Integer signals" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; Modelica.Blocks.Interfaces.IntegerInput u @@ -1740,7 +1740,7 @@ partial block PartialClockedSO "Block with clocked single output Integer signal" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; Modelica.Blocks.Interfaces.IntegerOutput y diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/RealSignals.mo" "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/RealSignals.mo" --- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/RealSignals.mo" 2021-11-24 08:09:29.379341250 +0000 +++ "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/RealSignals.mo" 2021-11-24 08:10:06.499229658 +0000 @@ -4,7 +4,7 @@ package Sampler "Library of sampler and hold blocks for Real signals" block Sample "Sample the continuous-time, Real input signal and provide it as clocked output signal (clock is inferred)" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialSISOSampler; + extends Modelica.Clocked.RealSignals.Interfaces.PartialSISOSampler; equation y = sample(u); @@ -124,19 +124,19 @@ block SampleClocked "Sample the continuous-time, Real input signal and provide it as clocked output signal. The clock is provided as input signal" - extends Modelica_Synchronous.RealSignals.Interfaces.SamplerIcon; + extends Modelica.Clocked.RealSignals.Interfaces.SamplerIcon; Modelica.Blocks.Interfaces.RealInput u "Connector of continuous-time, Real input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); Modelica.Blocks.Interfaces.RealOutput y "Connector of clocked, Real output signal" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput clock + + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock "Output signal y is associated with this clock input" annotation (Placement(transformation( extent={{-20,-20},{20,20}}, rotation=90, origin={0,-120}))); - equation y = sample(u,clock); @@ -200,7 +200,7 @@ block SampleVectorizedAndClocked "Sample the continuous-time, Real input signal vector and provide it as clocked output signal vector. The clock is provided as input signal" - extends Modelica_Synchronous.RealSignals.Interfaces.SamplerIcon; + extends Modelica.Clocked.RealSignals.Interfaces.SamplerIcon; parameter Integer n(min=1)=1 "Size of input signal vector u (= size of output signal vector y)"; Modelica.Blocks.Interfaces.RealInput u[n] @@ -209,7 +209,7 @@ Modelica.Blocks.Interfaces.RealOutput y[n] "Connector of clocked, Real output signal vector" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock "Output signal vector y is associated with this clock input" annotation (Placement(transformation( extent={{-20,-20},{20,20}}, @@ -279,7 +279,7 @@ block SampleWithADeffects "Sample with (simulated) Analog-Digital converter effects including noise" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialSISOSampler; + extends Modelica.Clocked.RealSignals.Interfaces.PartialSISOSampler; parameter Boolean noisy = false "= true, if output should be superimposed with noise" @@ -299,15 +299,14 @@ annotation (Placement(transformation(extent={{-84,-6},{-72,6}}))); replaceable - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.UniformNoise - noise if noisy constrainedby - Modelica_Synchronous.RealSignals.Interfaces.PartialNoise "Noise model" +Modelica.Clocked.RealSignals.Sampler.Utilities.Internal.UniformNoise + noise if noisy constrainedby Modelica.Clocked.RealSignals.Interfaces.PartialNoise "Noise model" annotation (choicesAllMatching=true, Dialog(enable=noisy,group="Sampling and noise"),Placement(transformation(extent={{-54,-6}, {-42,6}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.Limiter limiter(uMax=yMax, + Modelica.Clocked.RealSignals.Sampler.Utilities.Internal.Limiter limiter(uMax=yMax, uMin=yMin) if limited annotation (Placement(transformation(extent={{-24,-8},{-8,8}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.Quantization quantization( + Modelica.Clocked.RealSignals.Sampler.Utilities.Internal.Quantization quantization( quantized=quantized, yMax=yMax, yMin=yMin, @@ -465,7 +464,7 @@ block Hold "Hold the clocked, Real input signal and provide it as continuous-time output signal (zero order hold)" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialSISOHold; + extends Modelica.Clocked.RealSignals.Interfaces.PartialSISOHold; equation y = hold(u); @@ -548,7 +547,7 @@ block HoldWithDAeffects "Hold with (simulated) Digital-Analog converter effects and computational delay" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialSISOHold; + extends Modelica.Clocked.RealSignals.Interfaces.PartialSISOHold; parameter Boolean computationalDelay = false "=true, if a computational delay should be imposed" @@ -569,16 +568,16 @@ parameter Integer bits(min=1)=8 "Number of bits of quantization (if quantized = true)" annotation(Dialog(enable=limited and quantized,group="Limiting and quantization")); - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.Limiter limiter(uMax=yMax, + Modelica.Clocked.RealSignals.Sampler.Utilities.Internal.Limiter limiter(uMax=yMax, uMin=yMin) if limited annotation (Placement(transformation(extent={{-56,-8},{-40,8}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.Quantization quantization( + Modelica.Clocked.RealSignals.Sampler.Utilities.Internal.Quantization quantization( quantized=quantized, yMax=yMax, yMin=yMin, bits=bits) if quantized and limited annotation (Placement(transformation(extent={{-18,-8}, {-2,8}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.ComputationalDelay + Modelica.Clocked.RealSignals.Sampler.Utilities.Internal.ComputationalDelay compDelay(shiftCounter=shiftCounter, resolution=resolution) if computationalDelay annotation (Placement(transformation(extent={{20,-8},{36,8}}))); @@ -1077,24 +1076,24 @@ Integer usedFactor = if inferFactor then integer( (superSample(interval(u))/interval(u_super)) + 0.5) else factor; Integer ticks(start=0); Boolean first(start=true); - equation - when Clock() then // clock of u - uu = u; - first = false; - u_pre = if previous(first) then u else previous(uu); + equation + when Clock() then +// clock of u + uu = u; + first = false; + u_pre = if previous(first) then u else previous(uu); + end when; + when Clock() then +// clock of y + if inferFactor then + u_super = superSample(u); + else + u_super = superSample(u, factor); + end if; + u_preSuper = superSample(u_pre); + ticks = if previous(ticks) < usedFactor then previous(ticks) + 1 else 1; + y = u_preSuper + ticks / usedFactor * (u_super - u_preSuper); end when; - - when Clock() then // clock of y - if inferFactor then - u_super = superSample(u); - else - u_super = superSample(u,factor); - end if; - u_preSuper = superSample(u_pre); - ticks = if previous(ticks) < usedFactor then previous(ticks) + 1 else 1; - y = u_preSuper + ticks/usedFactor*(u_super - u_preSuper); - end when; - annotation ( defaultComponentName="superSampleIpo1", Icon(coordinateSystem( @@ -1501,6 +1500,7 @@ ")); end BackSample; + block AssignClock "Assigns a clock to a clocked Real signal" Modelica.Blocks.Interfaces.RealInput u @@ -1509,7 +1509,7 @@ Modelica.Blocks.Interfaces.RealOutput y "Connector of clocked, Real output signal" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock annotation (Placement(transformation( extent={{-20,-20},{20,20}}, rotation=90, @@ -1636,7 +1636,7 @@ Modelica.Blocks.Interfaces.RealOutput y[n] "Connector of clocked, Real output signal" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockInput + Modelica.Clocked.ClockSignals.Interfaces.ClockInput clock annotation (Placement(transformation( extent={{-20,-20},{20,20}}, rotation=90, @@ -1741,6 +1741,7 @@ package Utilities "Utility components that are usually not directly used" extends Modelica.Icons.UtilitiesPackage; + block UpSample "Upsample the clocked Real input signal and provide it as clocked output signal" @@ -1759,22 +1760,22 @@ Boolean b(start=false); Boolean b_super(start=false); Real u_super; - equation - when Clock() then // clock of u - dummy = u; - b = not previous(b); - end when; - - when Clock() then // clock of y - b_super = superSample(b); - if inferFactor then - u_super = superSample(u); - else - u_super = superSample(u,factor); - end if; - y = if b_super <> previous(b_super) then u_super else 0.0; + equation + when Clock() then +// clock of u + dummy = u; + b = not previous(b); + end when; + when Clock() then +// clock of y + b_super = superSample(b); + if inferFactor then + u_super = superSample(u); + else + u_super = superSample(u, factor); + end if; + y = if b_super <> previous(b_super) then u_super else 0.0; end when; - annotation ( defaultComponentName="upSample1", Icon(coordinateSystem( @@ -1948,7 +1949,7 @@ block AssignClockToTriggerHold "Generate a Boolean continuous-time trigger signal from a clocked Real input" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; parameter Boolean y_start=false "Initial value of output signal"; Modelica.Blocks.Interfaces.RealInput u annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); @@ -2036,7 +2037,7 @@ block AssignClockToSquareWaveHold "Generate a Boolean continuous-time square-wave output from a clocked Real input" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; parameter Boolean y_start=false "Initial value of output signal"; Modelica.Blocks.Interfaces.RealInput u annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); @@ -2114,9 +2115,10 @@ package Internal "Internal blocks and functions that are usually of no interest for the user" extends Modelica.Icons.InternalPackage; + block ComputationalDelay "Delays a clocked signal for at most one period, in order to model a computational delay" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter Integer shiftCounter(min=0,max=resolution) = 0 "(min=0, max=resolution), computational delay = interval()*shiftCounter/resolution" annotation(Evaluate=true,Dialog(group="Computational delay in seconds = interval() * shiftCounter/resolution")); @@ -2145,7 +2147,7 @@ end ComputationalDelay; block UniformNoise "Add band-limited uniform noise to a clocked signal" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialNoise; + extends Modelica.Clocked.RealSignals.Interfaces.PartialNoise; parameter Real noiseMax=0.1 "Upper limit of noise band"; parameter Real noiseMin=-noiseMax "Lower limit of noise band"; parameter Integer firstSeed[3](each min=0, each max=255) = {23,87,187} @@ -2156,7 +2158,7 @@ Real noise "Noise in the range 0..1" annotation(HideResult=true); equation (noise,seedState) = - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.random( + Modelica.Clocked.RealSignals.Sampler.Utilities.Internal.random( previous(seedState)); y = u + noiseMin + (noiseMax - noiseMin)*noise; @@ -2332,7 +2334,7 @@ end UniformNoise; model Quantization "DAC quantization effects" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter Boolean quantized = false "= true, if quantization effects shall be computed"; @@ -2363,7 +2365,7 @@ block Limiter "Limit the range of a signal" extends - Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; +Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter Real uMax(start=1) "Upper limits of input signals"; parameter Real uMin= -uMax "Lower limits of input signals"; @@ -2450,7 +2452,7 @@ seedOut[1] := rem((171*seedIn[1]), 30269); seedOut[2] := rem((172*seedIn[2]), 30307); seedOut[3] := rem((170*seedIn[3]), 30323); - // zero is a poor seed, therfore substitute 1; +// zero is a poor seed, therfore substitute 1; if seedOut[1] == 0 then seedOut[1] := 1; end if; @@ -2550,7 +2552,6 @@

")); end random; - annotation (Documentation(info="

The blocks in this package are internal that should usually not be @@ -2559,7 +2560,6 @@

")); end Internal; - annotation (Documentation(info="

This package contains utility blocks that are usually not directly utilized @@ -2567,7 +2567,6 @@

")); end Utilities; - annotation (Documentation(info="

This package contains blocks that mark boundaries of a clocked partition @@ -2659,9 +2658,10 @@ "Library of blocks that operate on periodically and non-periodically clocked signals" extends Modelica.Icons.Package; + block PI "Discrete-time PI controller with clocked input and output signals (for periodic and aperiodic systems using the parameterization of the continuous PI controller)" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter Real k "Gain of continuous PI controller"; parameter Real T(min=Modelica.Constants.small) "Time constant of continuous PI controller"; @@ -2739,7 +2739,7 @@ end PI; block UnitDelay "Delays the clocked input signal for one sample period" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO(u( + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO(u( final start=y_start)); parameter Real y_start=0 "Value of output signal at first clock tick"; equation @@ -2782,7 +2782,7 @@ block FractionalDelay "Delays the clocked input signal for a fractional multiple of the sample period" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter Integer shift(min=0) = 0 "Delay = interval() * shift/resolution"; @@ -2874,7 +2874,6 @@

")); end FractionalDelay; - annotation (Documentation(info="

This package contains blocks that can be utilized for periodic and non-periodic @@ -2891,13 +2890,14 @@ "Library of blocks that are designed to operate only on periodically clocked signals (mainly described by z transforms)" extends Modelica.Icons.Package; + block StateSpace "Discrete-time State Space block" parameter Real A[:, size(A, 1)] "Matrix A of state space model"; parameter Real B[size(A, 1), :] "Matrix B of state space model"; parameter Real C[:, size(A, 1)] "Matrix C of state space model"; parameter Real D[size(C, 1), size(B, 2)]=zeros(size(C, 1), size(B, 2)) "Matrix D of state space model"; - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedMIMO( + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedMIMO( final nin=size(B, 2), final nout=size(C, 1)); output Real x[size(A, 1)](each start=0.0) "State vector"; @@ -2996,7 +2996,7 @@ end StateSpace; block TransferFunction "Discrete-time Transfer Function block" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter Real b[:]={1} "Numerator coefficients of transfer function."; parameter Real a[:] "Denominator coefficients of transfer function."; @@ -3096,7 +3096,7 @@ end TransferFunction; block PI "Discrete-time PI controller" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter Real kd "Gain of discrete PI controller"; parameter Real Td(min=Modelica.Constants.small) "Time constant of discrete PI controller"; @@ -3180,7 +3180,7 @@ block MovingAverage "Moving average filter (= FIR filter with coefficients a = fill(1/n,n), but implemented recursively)" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter Integer n = 2 "Number of points that are averaged (= number of coefficients of corresponding FIR filter)"; protected @@ -3194,14 +3194,11 @@ equation when Clock() then first = false; - uu = u; - - // At the first clock tick u_last is filled with "u" (to initialize in steady state). - u_buffer = if previous(first) then fill(uu,n+1) else - cat( 1, {uu}, previous(u_buffer[1:n])); - - // Moving average formula - y = if previous(first) then uu else previous(yy) + (u_buffer[1] - u_buffer[n+1])/n; + uu = u; +// At the first clock tick u_last is filled with "u" (to initialize in steady state). + u_buffer = if previous(first) then fill(uu, n + 1) else cat(1, {uu}, previous(u_buffer[1:n])); +// Moving average formula + y = if previous(first) then uu else previous(yy) + (u_buffer[1] - u_buffer[n + 1]) / n; yy = y; end when; annotation ( @@ -3260,7 +3257,7 @@ end MovingAverage; block FIRbyCoefficients "FIR filter defined by coefficients" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; input Real a[:]={1/2,1/2} "Coefficients of FIR filter" annotation(Dialog); parameter Real cBufStart[size(a,1)-1] = ones(size(a,1)-1) "The u-buffer [u(i-1), u(i-2), ..., u(size(a,1)-1)] is initialized with u(i=1)*cBufStart" @@ -3272,14 +3269,11 @@ Boolean first(start=true) "Used to identify the first clock tick"; equation when Clock() then - first = false; - - // At the first clock tick u_last is filled with "u" (to initialize in steady state). - u_buffer = if previous(first) then cat( 1, {u}, u*cBufStart) else - cat( 1, {u}, previous(u_buffer[1:n])); - - // FIR formula - y = a*u_buffer; + first = false; +// At the first clock tick u_last is filled with "u" (to initialize in steady state). + u_buffer = if previous(first) then cat(1, {u}, u * cBufStart) else cat(1, {u}, previous(u_buffer[1:n])); +// FIR formula + y = a * u_buffer; end when; annotation (defaultComponentName="FIR1", @@ -3331,7 +3325,6 @@ fillPattern=FillPattern.Solid, textString="a=%a")})); end FIRbyCoefficients; - annotation (Documentation(info="

This package contains blocks that are designed for periodically clocked @@ -3346,14 +3339,15 @@ "Package of signal source blocks generating clocked simulation time based Real signals" extends Modelica.Icons.SourcesPackage; + block Step "Generate step signal of type Real" extends Interfaces.PartialClockedSO; parameter Real height = 1 "Height of step"; parameter Real offset = 0 "Offset of output signal y"; - parameter Modelica.SIunits.Time startTime = 0 + parameter Modelica.Units.SI.Time startTime = 0 "Output y = offset for time < startTime"; protected - Modelica.SIunits.Time simTime; + Modelica.Units.SI.Time simTime; equation simTime = sample(time); y = offset + (if simTime < startTime then 0 else height); @@ -3487,13 +3481,13 @@ block Ramp "Generate ramp signal" extends Interfaces.PartialClockedSO; parameter Real height=1 "Height of ramps"; - parameter Modelica.SIunits.Time duration(min=Modelica.Constants.small, start = 2) + parameter Modelica.Units.SI.Time duration(min=Modelica.Constants.small, start = 2) "Durations of ramp"; parameter Real offset=0 "Offset of output signal"; - parameter Modelica.SIunits.Time startTime=0 + parameter Modelica.Units.SI.Time startTime=0 "Output = offset for time < startTime"; protected - Modelica.SIunits.Time simTime; + Modelica.Units.SI.Time simTime; equation simTime = sample(time); y = offset + (if simTime < startTime then 0 else if simTime < (startTime + @@ -3646,16 +3640,16 @@ block Sine "Generate sine signal" extends Interfaces.PartialClockedSO; parameter Real amplitude=1 "Amplitude of sine wave"; - parameter Modelica.SIunits.Frequency freqHz(start=1) + parameter Modelica.Units.SI.Frequency freqHz(start=1) "Frequency of sine wave"; - parameter Modelica.SIunits.Angle phase=0 "Phase of sine wave"; + parameter Modelica.Units.SI.Angle phase=0 "Phase of sine wave"; parameter Real offset=0 "Offset of output signal"; - parameter Modelica.SIunits.Time startTime=0 + parameter Modelica.Units.SI.Time startTime=0 "Output = offset for time < startTime"; protected constant Real pi=Modelica.Constants.pi; protected - Modelica.SIunits.Time simTime; + Modelica.Units.SI.Time simTime; equation simTime = sample(time); y = offset + (if simTime < startTime then 0 else amplitude* @@ -3809,7 +3803,6 @@

")); end Sine; - annotation (Documentation(info="

This package provides source components akin to the blocks provided in @@ -3839,7 +3832,7 @@ protected Integer counter(start=0); equation - // stop counter after counter = startTick to avoid integer overflow for long running simulations +// stop counter after counter = startTick to avoid integer overflow for long running simulations counter = if previous(counter) < startTick then previous(counter) + 1 else previous(counter); y = offset + (if counter < startTick then 0 else height); annotation ( @@ -4001,7 +3994,7 @@ protected Integer counter(start=0); equation - // stop counter after counter = startTick+durationTicks to avoid integer overflow for long running simulations +// stop counter after counter = startTick+durationTicks to avoid integer overflow for long running simulations counter = if previous(counter) < startTick+durationTicks then previous(counter) + 1 else previous(counter); y = offset + (if counter < startTick then 0 else if counter < (startTick + @@ -4188,7 +4181,7 @@ Boolean startOutput(start=false) "Flag whether counter >= startTick reached once"; equation - // restart counter after reaching threshold to avoid integer overflow for long running simulations +// restart counter after reaching threshold to avoid integer overflow for long running simulations if previous(startOutput) then counter = if previous(counter) == (periodTicks-1) then 0 else previous(counter) + 1; startOutput = previous(startOutput); @@ -4402,7 +4395,7 @@ partial block PartialSISOSampler "Basic block used for sampling of Real signals" - extends Modelica_Synchronous.RealSignals.Interfaces.SamplerIcon; + extends Modelica.Clocked.RealSignals.Interfaces.SamplerIcon; Modelica.Blocks.Interfaces.RealInput u "Connector of continuous-time, Real input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); @@ -4462,7 +4455,7 @@ partial block PartialClockedSISO "Block with clocked single input and clocked single output Real signals" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; Modelica.Blocks.Interfaces.RealInput u "Connector of clocked, Real input signal" @@ -4475,7 +4468,7 @@ partial block PartialClockedMIMO "Block with multiple clocked input and multiple clocked output Real signals" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; parameter Integer nin=1 "Number of inputs"; parameter Integer nout=1 "Number of outputs"; @@ -4493,7 +4486,7 @@ partial block PartialClockedSO "Block with clocked single output Real signal" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; Modelica.Blocks.Interfaces.RealOutput y "Connector of clocked, Real output signal" @@ -4505,7 +4498,7 @@ partial block PartialNoise "Interface for SISO blocks with Real signals that add noise to the signal" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}))); end PartialNoise; diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/WorkInProgress.mo" "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/WorkInProgress.mo" --- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/WorkInProgress.mo" 2021-11-24 08:09:29.383341238 +0000 +++ "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/WorkInProgress.mo" 2021-11-24 08:10:03.555238505 +0000 @@ -3,7 +3,7 @@ package Incubate "Stuff that might be adapted and used at some future time" package TrueTime "Communication block and external C interface of TrueTime simulators." - extends Modelica_Synchronous.WorkInProgress.Icons.PackageNotReady; + extends Modelica.Clocked.WorkInProgress.Icons.PackageNotReady; package ExternalC "Implementation of TrueTime kernel and network simulators in external C-code" class Kernel "External C interface of kernel simulator" @@ -11,7 +11,7 @@ encapsulated function constructor "Initialize simulated real-time kernel" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; input Integer policy "Scheduling policy"; input Integer numberOfTasks "Number of tasks"; output Kernel kernelHandle "Handle to kernel simulator object"; @@ -21,14 +21,14 @@ encapsulated function destructor "Terminate simulated real-time kernel" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; input Kernel kernelHandle "Handle to kernel simulator object"; external "C" Kernel_Terminate(kernelHandle); end destructor; encapsulated function runKernel "Run the kernel simulator instance" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; input Kernel kernelHandle "Handle to kernel simulator object"; input Real currTime "Current time"; external "C" runKernel(kernelHandle, currTime); @@ -37,7 +37,7 @@ encapsulated function getNextHitKernel "Get next event time for kernel simulator" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; input Kernel kernelHandle "Handle to kernel simulator object"; input Real currTime "Current time"; output Real nextT "Next event time"; @@ -46,7 +46,7 @@ encapsulated function getSchedule "Get the real-time task schedule" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; input Kernel kernelHandle "Handle to kernel simulator object"; input Integer numberOfTasks "Number of tasks"; input Real currTime "Current time"; @@ -57,7 +57,7 @@ encapsulated function createTask "Create a real-time kernel task (called during initialization)" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; input Kernel kernelHandle "Handle to kernel simulator object"; input Integer taskID "Task ID"; input String taskName "Task name"; @@ -72,7 +72,7 @@ encapsulated function createJob "Create task instance for controller calculation" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; input Kernel kernelHandle "Handle to kernel simulator object"; input String taskName "Task name"; input Real executionTimeCalculate "Time to calculate outputs"; @@ -85,9 +85,9 @@ encapsulated function createJobNw "Create task instance for controller calculation and network transmission" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network; input Kernel kernelHandle "Handle to kernel simulator object"; input String taskName "Task name"; input Real executionTimeCalculate "Time to calculate outputs"; @@ -104,7 +104,7 @@ encapsulated function setControl "Set computed control signal for task" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; input Kernel kernelHandle "Handle to kernel simulator object"; input String taskName "Task name"; input Real u "Control signal"; @@ -115,7 +115,7 @@ encapsulated function analogOut "Output calculated control signal" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel; input Kernel kernelHandle "Handle to kernel simulator object"; input String taskName "Task name"; input Real currTime "Current time"; @@ -129,7 +129,7 @@ extends ExternalObject; encapsulated function constructor "Initialize simulated network bus" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network; input Real params[:] "General parameter vector"; input Real schedule[:] "Schedule for TDMA"; input Real systemmatrix[:,:] "System matrix for TTCAN"; @@ -145,14 +145,14 @@ encapsulated function destructor "Terminate simulated network bus" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network; input Network networkHandle "Handle to network simulator object"; external "C" Network_Terminate(networkHandle); end destructor; encapsulated function runNetwork "Run the network simulator instance" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network; input Network networkHandle "Handle to network simulator object"; input Real currTime "Current time"; external "C" runNetwork(networkHandle, currTime); @@ -161,7 +161,7 @@ encapsulated function getNextHitNetwork "Get next event time for network simulator" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network; input Network networkHandle "Handle to network simulator object"; input Real currTime "Current time"; output Real nextT "Next event time"; @@ -170,7 +170,7 @@ encapsulated function getNwSchedule "Get the network schedule" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network; input Network networkHandle "Handle to network simulator object"; input Integer numberOfFrames "Number of frames"; input Real currTime "Current time"; @@ -180,7 +180,7 @@ encapsulated function transmitFrame "Transmit a network frame" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network; input Network networkHandle "Handle to network simulator object"; input Integer frameID "Frame identifier"; input Real data "Frame data"; @@ -193,7 +193,7 @@ encapsulated function receiveFrame "Receive a network frame" import - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network; + Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network; input Network networkHandle "Handle to network simulator object"; input Integer frameID "Frame identifier"; input Real currTime "Current time"; @@ -217,14 +217,14 @@ TTCAN, FlexRay) "Enumeration to define Media Access Control policies"; block ControllerTask "Truetime simulation: Controller task" - extends Modelica_Synchronous.WorkInProgress.Icons.CommunicationIcon; + extends Modelica.Clocked.WorkInProgress.Icons.CommunicationIcon; parameter String taskName = "DefaultTask" "Task name" annotation (Dialog(group="Controller task parameters")); parameter Real executionTimeCalculate = 0.002 "Execution time to calculate outputs" annotation (Dialog(group="Controller task parameters")); parameter Real executionTimeUpdate = -1 "Execution time to update states" annotation (Dialog(group="Controller task parameters")); parameter - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel +Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel kernelHandle "Handle to kernel simulator object" annotation(Dialog(group="Kernel simulator")); Modelica.Blocks.Interfaces.RealInput u annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); @@ -238,28 +238,12 @@ protected Real err; Real set_ctrl; - equation - when trigger then - err = - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.createJob( - kernelHandle, - taskName, - executionTimeCalculate, - executionTimeUpdate, - time); - end when; - set_ctrl = - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.setControl( - kernelHandle, - taskName, - u, - time); - y = - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.analogOut( - kernelHandle, - taskName, - time, - u); + equation + when trigger then + err = Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.createJob(kernelHandle, taskName, executionTimeCalculate, executionTimeUpdate, time); + end when; + set_ctrl = Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.setControl(kernelHandle, taskName, u, time); + y = Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.analogOut(kernelHandle, taskName, time, u); annotation ( Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}})), @@ -327,13 +311,13 @@ end ControllerTask; block TransmitReceive "TrueTime simulation: Transmit/Receive" - extends Modelica_Synchronous.WorkInProgress.Icons.CommunicationIcon; + extends Modelica.Clocked.WorkInProgress.Icons.CommunicationIcon; parameter Integer frameDataSize = 32 "Frame size (bits)" annotation (Dialog(group="Transmission parameters")); parameter Integer frameID = 1 "Frame ID (1,...,numberOfFrames)" annotation (Dialog(group="Transmission parameters")); parameter Integer framePriority = frameID "Priority of frame (for CAN and TTCAN)" annotation (Dialog(group="Transmission parameters")); parameter - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network +Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network networkHandle "Handle to network simulator object" annotation(Dialog(group="Network simulator")); Modelica.Blocks.Interfaces.RealInput u annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); @@ -346,23 +330,11 @@ origin={0,-120}))); protected Real err; - equation - when trigger then - err = - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network.transmitFrame( - networkHandle, - frameID, - u, - frameDataSize, - framePriority, - time); - end when; - y = - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network.receiveFrame( - networkHandle, - frameID, - time, - u); + equation + when trigger then + err = Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network.transmitFrame(networkHandle, frameID, u, frameDataSize, framePriority, time); + end when; + y = Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network.receiveFrame(networkHandle, frameID, time, u); annotation ( Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}})), @@ -410,21 +382,21 @@ block ControllerNode "TrueTime simulation: Controller task with network interface" - extends Modelica_Synchronous.WorkInProgress.Icons.CommunicationIcon; + extends Modelica.Clocked.WorkInProgress.Icons.CommunicationIcon; parameter String taskName = "DefaultTask" "Task name" annotation (Dialog(group="Controller task parameters")); parameter Real executionTimeCalculate = 0.002 "Execution time to calculate outputs" annotation (Dialog(group="Controller task parameters")); parameter Real executionTimeUpdate = -1 "Execution time to update states" annotation (Dialog(group="Controller task parameters")); parameter - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel +Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel kernelHandle "Handle to kernel simulator object" annotation(Dialog(group="Kernel simulator")); parameter Integer frameDataSize = 32 "Frame size (bits)" annotation (Dialog(group="Transmission parameters")); parameter Integer frameID = 1 "Frame ID (1,...,numberOfFrames)" annotation (Dialog(group="Transmission parameters")); parameter Integer framePriority = frameID "Priority of frame (for CAN and TTCAN)" annotation (Dialog(group="Transmission parameters")); parameter - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network +Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network networkHandle "Handle to network simulator object" annotation(Dialog(group="Network simulator")); Modelica.Blocks.Interfaces.RealInput u annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); @@ -438,32 +410,12 @@ protected Real err; Real set_ctrl; - equation - when trigger then - err = - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.createJobNw( - kernelHandle, - taskName, - executionTimeCalculate, - executionTimeUpdate, - networkHandle, - frameDataSize, - frameID, - framePriority, - time); - end when; - set_ctrl = - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.setControl( - kernelHandle, - taskName, - u, - time); - y = - Modelica_Synchronous.WorkInProgress.Incubate.TrueTime.ExternalC.Network.receiveFrame( - networkHandle, - frameID, - time, - u); + equation + when trigger then + err = Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.createJobNw(kernelHandle, taskName, executionTimeCalculate, executionTimeUpdate, networkHandle, frameDataSize, frameID, framePriority, time); + end when; + set_ctrl = Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Kernel.setControl(kernelHandle, taskName, u, time); + y = Modelica.Clocked.WorkInProgress.Incubate.TrueTime.ExternalC.Network.receiveFrame(networkHandle, frameID, time, u); annotation ( Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}})), @@ -549,7 +501,7 @@ package IntegerSignals block Limiter "Limit the range of a signal" - extends Modelica_Synchronous.ClockSignals.Interfaces.ClockedBlockIcon; + extends Modelica.Clocked.ClockSignals.Interfaces.ClockedBlockIcon; parameter Integer uMax(start=1) "Upper limits of input signals"; parameter Integer uMin= -uMax "Lower limits of input signals"; parameter Boolean limitsAtInit = true @@ -632,7 +584,7 @@ end Limiter; block ComputationalDelay - extends Modelica_Synchronous.IntegerSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.IntegerSignals.Interfaces.PartialClockedSISO; parameter Integer shiftCounter(min=0,max=resolution) = 0 "(min=0, max=resolution), computational delay = interval()*shiftCounter/resolution" annotation(Dialog(group="Computational delay in seconds = interval() * shiftCounter/resolution")); @@ -650,7 +602,7 @@ block UniformNoise extends - Modelica_Synchronous.WorkInProgress.Incubate.IntegerSignals.PartialIntegerNoise; +Modelica.Clocked.WorkInProgress.Incubate.IntegerSignals.PartialIntegerNoise; parameter Integer noiseMin=-1 "Lower limit of noise band"; parameter Integer noiseMax=1 "Upper limit of noise band"; parameter Integer firstSeed[3](each min=0, each max=255) = {23,87,187} @@ -660,7 +612,7 @@ Real noise "Noise in the range 0..1" annotation(HideResult=true); equation (noise,seedState) = - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.random( + Modelica.Clocked.RealSignals.Sampler.Utilities.Internal.random( previous(seedState)); y = u + noiseMin + integer((noiseMax - noiseMin)*noise + 0.5); annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, @@ -669,7 +621,7 @@ block FractionalDelay "Delay clocked input signal for a fractional multiple of the sample period" - extends Modelica_Synchronous.IntegerSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.IntegerSignals.Interfaces.PartialClockedSISO; parameter Integer shift(min=0) = 0 "Delay = interval() * shift/resolution"; parameter Integer resolution(min=1) = 1 @@ -735,7 +687,7 @@ partial block PartialIntegerNoise "Interface for SISO blocks with Integer signals that add noise to the signal" extends - Modelica_Synchronous.IntegerSignals.Interfaces.PartialClockedSISO; +Modelica.Clocked.IntegerSignals.Interfaces.PartialClockedSISO; annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}))); end PartialIntegerNoise; @@ -743,7 +695,7 @@ package BooleanSignals block ComputationalDelay - extends Modelica_Synchronous.BooleanSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.BooleanSignals.Interfaces.PartialClockedSISO; parameter Integer shiftCounter(min=0,max=resolution) = 0 "(min=0, max=resolution), computational delay = interval()*shiftCounter/resolution" annotation(Dialog(group="Computational delay in seconds = interval() * shiftCounter/resolution")); @@ -761,7 +713,7 @@ block FractionalDelay "Delay clocked input signal for a fractional multiple of the sample period" - extends Modelica_Synchronous.BooleanSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.BooleanSignals.Interfaces.PartialClockedSISO; parameter Integer shift(min=0) = 0 "Delay = interval() * shift/resolution"; parameter Integer resolution(min=1) = 1 @@ -828,9 +780,9 @@ package RealSignals block CommunicationDelaySpecifiedInSeconds "NOT VALID MODELICA 3.3! Might be nice to provide a block that allows to specify delay in seconds instead of indirectly as fractions of the current rate" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; - extends Modelica_Synchronous.WorkInProgress.Icons.BlockNotReady; - parameter Modelica.SIunits.Time communicationDelayTime(min=0)=0 + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.WorkInProgress.Icons.BlockNotReady; + parameter Modelica.Units.SI.Time communicationDelayTime(min=0)=0 "Time delay due to communication"; /* Modelica 3.3 doesn't allow the following code since interval(..) has a non-parameter variability! */ /* Statement as comment, in order that check does not produce an error @@ -860,15 +812,15 @@ Real delayRateRatio = delay/rate; Real shift; String number = realString(delayRateRatio, 1, 10) "10 digits precision"; - algorithm - // truncate all trailing zeros + algorithm +// truncate all trailing zeros index := findLast(number, "0"); while index == length(number) loop number := substring(number,1, length(number) -1); index := findLast(number, "0"); - end while; - // Compute fitting resolution and shiftCounter - iDecPoint :=findLast(number, "."); + end while; +// Compute fitting resolution and shiftCounter + iDecPoint := findLast(number, "."); resolution := length(number) - iDecPoint; shift := delayRateRatio * 10^resolution; shiftCounter := integer(floor(shift + 0.5)); @@ -896,7 +848,7 @@ end Types; block PID "Discrete-time PID controller" - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + extends Modelica.Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter Real k = 1 "Gain of PID controller"; parameter Real Ti(min=Modelica.Constants.small) = 0.5 "Time constant of integrator part"; @@ -985,17 +937,17 @@ end PID; model TestPIDController - import Modelica_Synchronous; - extends Modelica_Synchronous.WorkInProgress.Icons.OperatesOnlyPartially; - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + import Modelica.Clocked; + extends Clocked.WorkInProgress.Icons.OperatesOnlyPartially; + Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-36,-16},{-24,-4}}))); - Modelica_Synchronous.WorkInProgress.Incubate.PID + Clocked.WorkInProgress.Incubate.PID PI1 annotation (Placement(transformation(extent={{28,0},{48,20}}))); Modelica.Blocks.Sources.Step step(startTime=0.19) annotation (Placement(transformation(extent={{-82,0},{-62,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked sample1 + Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-8,4},{4,16}}))); Modelica_LinearSystems2.Controller.Sampler sampler(blockType= Modelica_LinearSystems2.Controller.Types.BlockTypeWithGlobalDefault.Discrete) @@ -1042,28 +994,28 @@ block FIRbyWindow "FIR filter defined by filter order, cut-off frequency and window-type" - import Modelica_Synchronous; - extends Modelica_Synchronous.RealSignals.Interfaces.PartialClockedSISO; + import Modelica.Clocked; + extends Clocked.RealSignals.Interfaces.PartialClockedSISO; parameter - Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_FilterType +Clocked.WorkInProgress.Incubate.Types.FIR_FilterType filterType= - Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_FilterType.LowPass + Clocked.WorkInProgress.Incubate.Types.FIR_FilterType.LowPass "Type of filter"; parameter Integer order(min=1) = 2 "Order of filter"; - parameter Modelica.SIunits.Frequency f_cut=1 "Cut-off frequency"; - parameter Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_Window - window= Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_Window.Kaiser + parameter Modelica.Units.SI.Frequency f_cut=1 "Cut-off frequency"; + parameter Clocked.WorkInProgress.Incubate.Types.FIR_Window + window= Clocked.WorkInProgress.Incubate.Types.FIR_Window.Kaiser "Type of window"; parameter Real beta=2.12 "Beta-Parameter for Kaiser-window" annotation(Dialog(enable = window == Modelica_Synchronous.Types.FIR_Window.Kaiser)); - final output Real a[order+1]=Modelica_Synchronous.WorkInProgress.Incubate.Internal.FIR_coefficients( + final output Real a[order+1]=Clocked.WorkInProgress.Incubate.Internal.FIR_coefficients( filterType, order, f_cut, interval(u), window, beta); - Modelica_Synchronous.RealSignals.Periodic.FIRbyCoefficients FIRbyCoefficients1(final a=a) + Clocked.RealSignals.Periodic.FIRbyCoefficients FIRbyCoefficients1(final a=a) annotation (Placement(transformation(extent={{-20,-10},{0,10}}))); equation connect(FIRbyCoefficients1.u, u) @@ -1140,16 +1092,16 @@ function FIR_coefficients "Calculates the FIR-filter coefficient vector from filter design parameters" import FilterType = - Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_FilterType; - input Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_FilterType +Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_FilterType; + input Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_FilterType filterType= - Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_FilterType.LowPass + Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_FilterType.LowPass "Type of filter"; input Integer order(min=1) = 2 "Order of filter"; - input Modelica.SIunits.Frequency f_cut=1 "Cut-off frequency"; - input Modelica.SIunits.Time Ts(min=0) "Sampling period"; - input Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_Window - window= Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_Window.Rectangle + input Modelica.Units.SI.Frequency f_cut=1 "Cut-off frequency"; + input Modelica.Units.SI.Time Ts(min=0) "Sampling period"; + input Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_Window + window= Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_Window.Rectangle "Type of window"; input Real beta=2.12 "Beta-Parameter for Kaiser-window" annotation(Dialog(enable = window == Modelica_Synchronous.Types.Window.Kaiser)); @@ -1180,7 +1132,7 @@ w[i]/(k*pi) else w[i]*(sin(k*pi) - sin(k*Wc))/(k*pi); end if; end for; - // Scale coefficients, so that the sum is one +// Scale coefficients, so that the sum is one a := a/sum(a); annotation ( Documentation(info=" @@ -1212,9 +1164,9 @@ function FIR_window "Calculation of n-point weighting window for FIR filter" import Window = - Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_Window; +Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_Window; input Integer na "Number of points of weighting window vector"; - input Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_Window + input Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_Window window=Window.Kaiser "Type of window"; input Real beta=2.12 "Beta-Parameter for Kaiser-window"; output Real a[na] "Weighting window vector a[na]"; @@ -1382,17 +1334,17 @@ model TestFIR_1 parameter Integer order=3; final parameter Real a[:]=fill(1/order,order); - Modelica_Synchronous.RealSignals.Periodic.FIRbyCoefficients + Modelica.Clocked.RealSignals.Periodic.FIRbyCoefficients fIRbyCoefficients(a=a) annotation (Placement(transformation(extent={{-20,20},{0,40}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0.1) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-44,24},{-32,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.01) annotation (Placement(transformation(extent={{-74,-14},{-62,-2}}))); equation @@ -1411,20 +1363,20 @@ end TestFIR_1; model TestFIR - extends Modelica_Synchronous.WorkInProgress.Icons.OperatesOnlyPartially; + extends Modelica.Clocked.WorkInProgress.Icons.OperatesOnlyPartially; parameter Integer order=3; final parameter Real a[:]=fill(1/order,order); - Modelica_Synchronous.RealSignals.Periodic.FIRbyCoefficients + Modelica.Clocked.RealSignals.Periodic.FIRbyCoefficients fIRbyCoefficients(a=a) annotation (Placement(transformation(extent={{-20,20},{0,40}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0.1) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-44,24},{-32,36}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.01) annotation (Placement(transformation(extent={{-74,-14},{-62,-2}}))); Modelica_LinearSystems2.Controller.FilterFIR filter( @@ -1461,7 +1413,7 @@ end TestFIR; block TestFIR_Step - extends Modelica_Synchronous.WorkInProgress.Icons.OperatesOnlyPartially; + extends Modelica.Clocked.WorkInProgress.Icons.OperatesOnlyPartially; parameter Integer na=4; final parameter Real a[:]=fill(1/na,na); inner Modelica_LinearSystems2.Controller.SampleClock sampleClock(blockType= @@ -1476,13 +1428,13 @@ annotation (Placement(transformation(extent={{-20,-34},{0,-14}}))); Modelica.Blocks.Sources.Step step(startTime=0.4999, offset=0.5) annotation (Placement(transformation(extent={{-80,6},{-60,26}}))); - Modelica_Synchronous.RealSignals.Periodic.FIRbyCoefficients + Modelica.Clocked.RealSignals.Periodic.FIRbyCoefficients fIRbyCoefficients(a=a) annotation (Placement(transformation(extent={{-20,6},{0,26}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-44,10},{-32,22}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-74,-40},{-62,-28}}))); Modelica.Blocks.Sources.Step step1( offset=0.5, startTime=0.5) @@ -1493,7 +1445,7 @@ a=a, sampleFactor=1) annotation (Placement(transformation(extent={{-20,-94},{0,-74}}))); - Modelica_Synchronous.RealSignals.Periodic.MovingAverage + Modelica.Clocked.RealSignals.Periodic.MovingAverage movingAverage(n=na) annotation (Placement(transformation(extent={{-20,46},{0,66}}))); equation @@ -1526,17 +1478,17 @@ end TestFIR_Step; block TestFIR_Step2 - extends Modelica_Synchronous.WorkInProgress.Icons.OperatesOnlyPartially; + extends Modelica.Clocked.WorkInProgress.Icons.OperatesOnlyPartially; inner Modelica_LinearSystems2.Controller.SampleClock sampleClock(blockType= Modelica_LinearSystems2.Controller.Types.BlockType.Discrete, sampleTime= 0.1) annotation (Placement(transformation(extent={{20,0},{40,20}}))); Modelica.Blocks.Sources.Step step(startTime=0.4999, offset=0.5) annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-44,44},{-32,56}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); Modelica.Blocks.Sources.Step step1( offset=0.5, startTime=0.5) @@ -1549,11 +1501,11 @@ window=Modelica_LinearSystems2.Controller.Types.Window.Rectangle, order=3) annotation (Placement(transformation(extent={{-20,-60},{0,-40}}))); - Modelica_Synchronous.WorkInProgress.Incubate.FIRbyWindow + Modelica.Clocked.WorkInProgress.Incubate.FIRbyWindow FIR1( - filterType=Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_FilterType.LowPass, + filterType=Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_FilterType.LowPass, f_cut=2, - window=Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_Window.Rectangle, + window=Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_Window.Rectangle, order=3) annotation (Placement(transformation(extent={{-20,40},{0,60}}))); equation @@ -1580,20 +1532,20 @@ end TestFIR_Step2; block TestFIR_Step2b - extends Modelica_Synchronous.WorkInProgress.Icons.OperatesOnlyPartially; + extends Modelica.Clocked.WorkInProgress.Icons.OperatesOnlyPartially; Modelica.Blocks.Sources.Step step(startTime=0.4999, offset=0.5) annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-44,44},{-32,56}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-62,-6},{-50,6}}))); - Modelica_Synchronous.WorkInProgress.Incubate.FIRbyWindow + Modelica.Clocked.WorkInProgress.Incubate.FIRbyWindow FIR1( - filterType=Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_FilterType.LowPass, + filterType=Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_FilterType.LowPass, f_cut=2, - window=Modelica_Synchronous.WorkInProgress.Incubate.Types.FIR_Window.Rectangle, + window=Modelica.Clocked.WorkInProgress.Incubate.Types.FIR_Window.Rectangle, order=3) annotation (Placement(transformation(extent={{-20,40},{0,60}}))); equation @@ -1617,7 +1569,7 @@ end TestFIR_Step2b; model TestInterpolator - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-94,40},{-74,60}}))); @@ -1625,10 +1577,10 @@ Modelica_LinearSystems2.Controller.Types.BlockType.Discrete, sampleTime=0.025) annotation (Placement(transformation(extent={{60,-60},{80,-40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-36,44},{-24,56}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-50,-6},{-38,6}}))); Modelica_LinearSystems2.Controller.Sampler sampler(sampleFactor=4) @@ -1636,19 +1588,19 @@ Modelica_LinearSystems2.Controller.Interpolator ls_interpolator( inputSampleFactor=4, meanValueFilter=true) annotation (Placement(transformation(extent={{0,-60},{20,-40}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock + Modelica.Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{52,44},{64,56}}))); - Modelica_Synchronous.ClockSignals.Sampler.SuperSample + Modelica.Clocked.ClockSignals.Sampler.SuperSample superSample1(factor=4) annotation (Placement(transformation(extent={{6,-6},{18,6}}))); - Modelica_Synchronous.WorkInProgress.Interpolator + Modelica.Clocked.WorkInProgress.Interpolator interpolator1( factor=4, inferFactor=false, movingAverageFilter=false) annotation (Placement(transformation(extent={{2,44},{14,56}}))); - Modelica_Synchronous.WorkInProgress.Interpolator + Modelica.Clocked.WorkInProgress.Interpolator interpolator2( movingAverageFilter=true, factor=4, @@ -1694,7 +1646,7 @@ end TestInterpolator; model TestUnitDelay - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0.15) annotation (Placement(transformation(extent={{-92,40},{-72,60}}))); @@ -1702,10 +1654,10 @@ Modelica_LinearSystems2.Controller.Types.BlockType.Discrete, sampleTime=0.1) annotation (Placement(transformation(extent={{60,-60},{80,-40}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-36,44},{-24,56}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-50,-6},{-38,6}}))); Modelica_LinearSystems2.Controller.Sampler sampler(sampleFactor=1) @@ -1713,7 +1665,7 @@ Modelica_LinearSystems2.Controller.UnitDelay ls_unitDelay(blockType= Modelica_LinearSystems2.Controller.Types.BlockTypeWithGlobalDefault.Discrete) annotation (Placement(transformation(extent={{0,-60},{20,-40}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.UnitDelay + Modelica.Clocked.RealSignals.NonPeriodic.UnitDelay UnitDelay1(y_start=0) annotation (Placement(transformation(extent={{0,40},{20,60}}))); equation @@ -1738,14 +1690,14 @@ end TestUnitDelay; model TestTransferFunction - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-92,40},{-72,60}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-18,44},{-6,56}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-40,14},{-28,26}}))); Modelica.Blocks.Discrete.Sampler sampler(samplePeriod=0.1) @@ -1755,7 +1707,7 @@ a={1,0.5}, b={0.1,0.2}) annotation (Placement(transformation(extent={{0,-40},{20,-20}}))); - Modelica_Synchronous.RealSignals.Periodic.TransferFunction + Modelica.Clocked.RealSignals.Periodic.TransferFunction transferFunction1(a={1,0.5}, b={0.1,0.2}) annotation (Placement(transformation(extent={{20,40},{40,60}}))); equation @@ -1781,14 +1733,14 @@ end TestTransferFunction; model TestStateSpace - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-92,40},{-72,60}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-44,24},{-32,36}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-16,44},{-4,56}}))); Modelica.Blocks.Discrete.StateSpace stateSpace2( @@ -1801,7 +1753,7 @@ annotation (Placement(transformation(extent={{0,-40},{20,-20}}))); Modelica.Blocks.Discrete.Sampler sampler(samplePeriod=0.1) annotation (Placement(transformation(extent={{-44,-40},{-24,-20}}))); - Modelica_Synchronous.RealSignals.Periodic.StateSpace stateSpace1( + Modelica.Clocked.RealSignals.Periodic.StateSpace stateSpace1( A=[1], B=[1], C=[1], @@ -1830,32 +1782,32 @@ model TestRealSampler Modelica.Blocks.Sources.Sine sine1( - freqHz=2, + f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-94,20},{-74,40}}))); Modelica.Blocks.Sources.Sine sine2( offset=0.1, startTime=0, - freqHz=3) +f =3) annotation (Placement(transformation(extent={{-94,-20},{-74,0}}))); Modelica.Blocks.Routing.Multiplex2 multiplex2_1 annotation (Placement(transformation(extent={{-48,0},{-28,20}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock1(period=0.1) annotation (Placement(transformation(extent={{-26,-36},{-14,-24}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClockVectorized + Modelica.Clocked.RealSignals.Sampler.AssignClockVectorized assignClock1(n=2) annotation (Placement(transformation(extent={{10,4},{22,16}}))); Modelica.Blocks.Math.Gain gain[2](k={2,3}) annotation (Placement(transformation(extent={{40,0},{60,20}}))); - Modelica_Synchronous.RealSignals.Sampler.Sample + Modelica.Clocked.RealSignals.Sampler.Sample sample1[2] annotation (Placement(transformation(extent={{-14,4},{-2,16}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleVectorizedAndClocked + Modelica.Clocked.RealSignals.Sampler.SampleVectorizedAndClocked sample2(n=2) annotation (Placement(transformation(extent={{-10,48},{2,60}}))); - Modelica_Synchronous.RealSignals.Sampler.SubSample + Modelica.Clocked.RealSignals.Sampler.SubSample subSample1[2](each inferFactor=false, each factor=3) annotation (Placement(transformation(extent={{14,48},{26,60}}))); equation connect(sine1.y, multiplex2_1.u1[1]) annotation (Line( @@ -1894,27 +1846,27 @@ end TestRealSampler; model TestShiftSample - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-92,40},{-72,60}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-84,-6},{-72,6}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-34,44},{-22,56}}))); - Modelica_Synchronous.RealSignals.Sampler.ShiftSample + Modelica.Clocked.RealSignals.Sampler.ShiftSample shiftSample1(shiftCounter=3, resolution=2) annotation (Placement(transformation(extent={{6,44},{18,56}}))); Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{40,20},{60,40}}))); - Modelica_Synchronous.RealSignals.Sampler.ShiftSample + Modelica.Clocked.RealSignals.Sampler.ShiftSample shiftSample2(shiftCounter=3, resolution=2) annotation (Placement(transformation(extent={{10,18},{22,30}}))); - Modelica_Synchronous.ClockSignals.Sampler.ShiftSample + Modelica.Clocked.ClockSignals.Sampler.ShiftSample shiftSample3(shiftCounter=1, resolution=3) annotation (Placement(transformation(extent={{-54,-6},{-42,6}}))); equation @@ -1948,17 +1900,17 @@ end TestShiftSample; model TestClockedRealToTrigger - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-92,20},{-72,40}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-56,4},{-44,16}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-34,24},{-22,36}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.AssignClockToTriggerHold + Modelica.Clocked.RealSignals.Sampler.Utilities.AssignClockToTriggerHold ClockedRealToTrigger annotation (Placement(transformation(extent={{0,20},{20,40}}))); Modelica.Blocks.Discrete.TriggeredSampler triggeredSampler @@ -1987,13 +1939,13 @@ end TestClockedRealToTrigger; model TestClockedBooleanToTrigger - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-56,4},{-44,16}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Modelica.Clocked.BooleanSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-34,24},{-22,36}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Utilities.AssignClockToTriggerHold + Modelica.Clocked.BooleanSignals.Sampler.Utilities.AssignClockToTriggerHold ClockedSignalToTrigger annotation (Placement(transformation(extent={{0,20},{20,40}}))); Modelica.Blocks.Sources.BooleanPulse booleanPulse(period=0.2) @@ -2025,13 +1977,13 @@ end TestClockedBooleanToTrigger; model TestClockedIntegerToTrigger - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-56,4},{-44,16}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Modelica.Clocked.IntegerSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-34,24},{-22,36}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Utilities.AssignClockToTriggerHold + Modelica.Clocked.IntegerSignals.Sampler.Utilities.AssignClockToTriggerHold ClockedSignalToTrigger annotation (Placement(transformation(extent={{0,20},{20,40}}))); TriggeredIntegerSampler triggeredBooleanSampler @@ -2064,21 +2016,21 @@ end TestClockedIntegerToTrigger; model TestBackSample - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-92,40},{-72,60}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-60,2},{-48,14}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-34,44},{-22,56}}))); - Modelica_Synchronous.RealSignals.Sampler.ShiftSample + Modelica.Clocked.RealSignals.Sampler.ShiftSample shiftSample1(resolution=2, shiftCounter=1) annotation (Placement(transformation(extent={{6,44},{18,56}}))); - Modelica_Synchronous.RealSignals.Sampler.BackSample + Modelica.Clocked.RealSignals.Sampler.BackSample backSample2( backCounter=1, resolution=2, @@ -2086,7 +2038,7 @@ annotation (Placement(transformation(extent={{34,44},{46,56}}))); Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{68,24},{88,44}}))); - Modelica_Synchronous.RealSignals.Sampler.BackSample + Modelica.Clocked.RealSignals.Sampler.BackSample backSample3( backCounter=1, y_start=0.3, @@ -2122,17 +2074,17 @@ end TestBackSample; model TestClockedRealToSquare - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-92,40},{-72,60}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-50,-6},{-38,6}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-34,44},{-22,56}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.AssignClockToSquareWaveHold + Modelica.Clocked.RealSignals.Sampler.Utilities.AssignClockToSquareWaveHold ClockedRealToSquare annotation (Placement(transformation(extent={{-4,40},{16,60}}))); equation @@ -2151,53 +2103,53 @@ end TestClockedRealToSquare; model TestIntegerSamplerAndHolds - Modelica_Synchronous.IntegerSignals.Sampler.AssignClock + Modelica.Clocked.IntegerSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-46,64},{-34,76}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-88,-96},{-76,-84}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Hold + Modelica.Clocked.IntegerSignals.Sampler.Hold hold1 annotation (Placement(transformation(extent={{-20,64},{-8,76}}))); Modelica.Blocks.Sources.IntegerConstant integerConstant1(k=1) annotation (Placement(transformation(extent={{-80,-20},{-60,0}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SampleClocked + Modelica.Clocked.IntegerSignals.Sampler.SampleClocked sample2 annotation (Placement(transformation(extent={{-44,-16},{-32,-4}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SampleVectorizedAndClocked + Modelica.Clocked.IntegerSignals.Sampler.SampleVectorizedAndClocked sample1(n=3) annotation (Placement(transformation(extent={{-44,-54},{-32,-42}}))); Modelica.Blocks.Sources.IntegerConstant integerConstant2[3](each k=1) annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}))); Modelica.Blocks.Sources.IntegerConstant integerConstant3[3](each k=1) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Modelica_Synchronous.IntegerSignals.Sampler.AssignClockVectorized + Modelica.Clocked.IntegerSignals.Sampler.AssignClockVectorized assignClock2(n=3) annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SubSample + Modelica.Clocked.IntegerSignals.Sampler.SubSample subSample1(inferFactor=false, factor=2) annotation (Placement(transformation(extent={{-20,26},{-8,38}}))); - Modelica_Synchronous.IntegerSignals.Sampler.SuperSample + Modelica.Clocked.IntegerSignals.Sampler.SuperSample superSample1(inferFactor= false, factor=2) annotation (Placement(transformation(extent={{12,26},{24,38}}))); - Modelica_Synchronous.IntegerSignals.Sampler.ShiftSample + Modelica.Clocked.IntegerSignals.Sampler.ShiftSample shiftSample1(shiftCounter=2, resolution=3) annotation (Placement(transformation(extent={{-16,-16},{-4,-4}}))); - Modelica_Synchronous.IntegerSignals.Sampler.BackSample + Modelica.Clocked.IntegerSignals.Sampler.BackSample backSample1(backCounter=2, resolution=3) annotation (Placement(transformation(extent={{8,-16},{20,-4}}))); Modelica.Blocks.Sources.IntegerTable integerTable(table=[0,1; 0.2,3; 0.5, 5; 0.9,2; 1.1,-1; 1.4,9]) annotation (Placement(transformation(extent={{-98,60},{-78,80}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Sample + Modelica.Clocked.IntegerSignals.Sampler.Sample sample3 annotation (Placement(transformation(extent={{-68,64},{-56,76}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Utilities.UpSample + Modelica.Clocked.IntegerSignals.Sampler.Utilities.UpSample upSample1(inferFactor= false, factor=2) annotation (Placement(transformation(extent={{36,106},{48,118}}))); @@ -2206,7 +2158,7 @@ IntegerSignals.NonPeriodic.FractionalDelay fractionalDelay(shift=2, resolution=3) annotation (Placement(transformation(extent={{34,46},{54,66}}))); - Modelica_Synchronous.IntegerSignals.Sampler.Utilities.AssignClockToSquareWaveHold + Modelica.Clocked.IntegerSignals.Sampler.Utilities.AssignClockToSquareWaveHold ClockedSignalToSquare annotation (Placement(transformation(extent={{52,12},{72,32}}))); equation @@ -2278,33 +2230,33 @@ end TestIntegerSamplerAndHolds; model TestBooleanSamplerAndHolds - Modelica_Synchronous.BooleanSignals.Sampler.AssignClock + Modelica.Clocked.BooleanSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-48,64},{-36,76}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-88,-96},{-76,-84}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Hold + Modelica.Clocked.BooleanSignals.Sampler.Hold hold1 annotation (Placement(transformation(extent={{-22,64},{-10,76}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SampleClocked + Modelica.Clocked.BooleanSignals.Sampler.SampleClocked sample2 annotation (Placement(transformation(extent={{-44,-16},{-32,-4}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SampleVectorizedAndClocked + Modelica.Clocked.BooleanSignals.Sampler.SampleVectorizedAndClocked sample1(n=3) annotation (Placement(transformation(extent={{-44,-54},{-32,-42}}))); - Modelica_Synchronous.BooleanSignals.Sampler.AssignClockVectorized + Modelica.Clocked.BooleanSignals.Sampler.AssignClockVectorized assignClock2(n=3) annotation (Placement(transformation(extent={{-46,24},{-34,36}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SubSample + Modelica.Clocked.BooleanSignals.Sampler.SubSample subSample1(inferFactor=false, factor=2) annotation (Placement(transformation(extent={{-20,42},{-8,54}}))); - Modelica_Synchronous.BooleanSignals.Sampler.SuperSample + Modelica.Clocked.BooleanSignals.Sampler.SuperSample superSample1(inferFactor= false, factor=2) annotation (Placement(transformation(extent={{12,42},{24,54}}))); - Modelica_Synchronous.BooleanSignals.Sampler.ShiftSample + Modelica.Clocked.BooleanSignals.Sampler.ShiftSample shiftSample1(shiftCounter=2, resolution=3) annotation (Placement(transformation(extent={{-16,-16},{-4,-4}}))); Modelica.Blocks.Sources.BooleanPulse booleanConstant(period=0.2) @@ -2315,13 +2267,13 @@ annotation (Placement(transformation(extent={{-80,-20},{-60,0}}))); Modelica.Blocks.Sources.BooleanConstant booleanConstant3[3] annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Utilities.AssignClockToSquareWaveHold + Modelica.Clocked.BooleanSignals.Sampler.Utilities.AssignClockToSquareWaveHold ClockedSignalToSquare annotation (Placement(transformation(extent={{20,-20},{40,0}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Sample + Modelica.Clocked.BooleanSignals.Sampler.Sample sample3 annotation (Placement(transformation(extent={{-66,64},{-54,76}}))); - Modelica_Synchronous.BooleanSignals.Sampler.Utilities.UpSample + Modelica.Clocked.BooleanSignals.Sampler.Utilities.UpSample upSample1(inferFactor= false, factor=2) annotation (Placement(transformation(extent={{16,88},{28,100}}))); @@ -2330,7 +2282,7 @@ BooleanSignals.NonPeriodic.FractionalDelay fractionalDelay(shift=2, resolution=3) annotation (Placement(transformation(extent={{-14,100},{6,120}}))); - Modelica_Synchronous.BooleanSignals.Sampler.BackSample + Modelica.Clocked.BooleanSignals.Sampler.BackSample backSample1(backCounter=2, resolution=3) annotation (Placement(transformation(extent={{16,-44},{28,-32}}))); @@ -2420,42 +2372,25 @@ annotation (Placement(transformation(extent={{-43,0},{-23,20}}))); Modelica.Mechanics.Rotational.Sources.Torque torque annotation (Placement(transformation(extent={{60,0},{80,20}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicClock(period=0.1) annotation (Placement(transformation(extent={{-78,-72},{-58,-52}}))); - replaceable Modelica_Synchronous.RealSignals.Sampler.SampleWithADeffects - sample2 constrainedby - Modelica_Synchronous.RealSignals.Interfaces.PartialSISOSampler( - limited=true, - quantized=true, - yMax=10, - bits=16) + replaceable Modelica.Clocked.RealSignals.Sampler.SampleWithADeffects + sample2 constrainedby Modelica.Clocked.RealSignals.Interfaces.PartialSISOSampler(limited = true, quantized = true, yMax = 10, bits = 16) annotation (Placement(transformation(extent={{-68,4},{-56,16}}))); - replaceable Modelica_Synchronous.RealSignals.Sampler.HoldWithDAeffects - hold1 constrainedby - Modelica_Synchronous.RealSignals.Interfaces.PartialSISOHold( - computationalDelay=true, - resolution=10, - shiftCounter=2, - limited=true, - quantized=true, - yMax=9.5, - yMin=-9.5, - bits=16) + replaceable Modelica.Clocked.RealSignals.Sampler.HoldWithDAeffects + hold1 constrainedby Modelica.Clocked.RealSignals.Interfaces.PartialSISOHold(computationalDelay = true, resolution = 10, shiftCounter = 2, limited = true, quantized = true, yMax = 9.5, yMin = -9.5, bits = 16) annotation (Placement(transformation(extent={{26,4},{38,16}}))); - replaceable Modelica_Synchronous.RealSignals.Sampler.SampleWithADeffects - sample1 constrainedby - Modelica_Synchronous.RealSignals.Interfaces.PartialSISOSampler( - noisy= - true, noise(noiseMax=0.01)) + replaceable Modelica.Clocked.RealSignals.Sampler.SampleWithADeffects + sample1 constrainedby Modelica.Clocked.RealSignals.Interfaces.PartialSISOSampler(noisy = true, noise(noiseMax = 0.01)) annotation (Placement(transformation(extent={{38,-36},{26,-24}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.PI + Modelica.Clocked.RealSignals.NonPeriodic.PI PI( x(fixed=true), T=0.1, k=110) annotation (Placement(transformation(extent={{-14,0},{6,20}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock + Modelica.Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{8,-36},{-4,-24}}))); equation @@ -2521,26 +2456,26 @@ end TestReplaceableSamplerHold; model TestSimulatedADC - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-92,40},{-72,60}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-58,22},{-46,34}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleWithADeffects + Modelica.Clocked.RealSignals.Sampler.SampleWithADeffects sample1( noisy=true, limited=true, quantized=true, redeclare - Modelica_Synchronous.RealSignals.Sampler.Utilities.Internal.UniformNoise +Modelica.Clocked.RealSignals.Sampler.Utilities.Internal.UniformNoise noise) annotation (Placement(transformation(extent={{-44,44},{-32,56}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock + Modelica.Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-16,44},{-4,56}}))); - Modelica_Synchronous.RealSignals.Sampler.HoldWithDAeffects + Modelica.Clocked.RealSignals.Sampler.HoldWithDAeffects hold1( computationalDelay=true, shiftCounter=1, @@ -2548,10 +2483,10 @@ limited=true, quantized=true) annotation (Placement(transformation(extent={{10,44},{22,56}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleWithADeffects + Modelica.Clocked.RealSignals.Sampler.SampleWithADeffects sample2 annotation (Placement(transformation(extent={{-44,68},{-32,80}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock + Modelica.Clocked.RealSignals.Sampler.AssignClock assignClock2 annotation (Placement(transformation(extent={{-18,68},{-6,80}}))); equation @@ -2585,20 +2520,20 @@ end TestSimulatedADC; model TestCommunicationDelay - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0) annotation (Placement(transformation(extent={{-92,40},{-72,60}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.1) annotation (Placement(transformation(extent={{-66,18},{-54,30}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleWithADeffects + Modelica.Clocked.RealSignals.Sampler.SampleWithADeffects sample1 annotation (Placement(transformation(extent={{-58,44},{-46,56}}))); - Modelica_Synchronous.RealSignals.Sampler.AssignClock + Modelica.Clocked.RealSignals.Sampler.AssignClock assignClock1 annotation (Placement(transformation(extent={{-30,44},{-18,56}}))); - Modelica_Synchronous.RealSignals.NonPeriodic.FractionalDelay + Modelica.Clocked.RealSignals.NonPeriodic.FractionalDelay fixedDelay(shift=3, resolution=2) annotation (Placement(transformation(extent={{-6,40},{14,60}}))); @@ -2622,16 +2557,16 @@ end TestCommunicationDelay; model TestEventClockWithIntegrator - Modelica_Synchronous.ClockSignals.Clocks.EventClock + Modelica.Clocked.ClockSignals.Clocks.EventClock eventClock(useSolver=true, solverMethod="ExplicitEuler") annotation (Placement(transformation(extent={{-36,23},{-24,37}}))); Modelica.Blocks.Sources.BooleanPulse booleanPulse(width=60, period=0.1) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); Modelica.Blocks.Continuous.FirstOrder firstOrder(T=0.1, initType=Modelica.Blocks.Types.Init.InitialState) annotation (Placement(transformation(extent={{20,60},{40,80}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2) + Modelica.Blocks.Sources.Sine sine(f =2) annotation (Placement(transformation(extent={{-40,60},{-20,80}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-6,64},{6,76}}))); equation @@ -2659,16 +2594,16 @@ y_start=0, T=1e-6) annotation (Placement(transformation(extent={{20,60},{40,80}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=2e4) + Modelica.Blocks.Sources.Sine sine(f =2e4) annotation (Placement(transformation(extent={{-40,60},{-20,80}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-6,64},{6,76}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock periodicExactClock( useSolver=true, solverMethod="ExplicitEuler", - resolution=Modelica_Synchronous.Types.Resolution.us, + resolution=Modelica.Clocked.Types.Resolution.us, factor=2) annotation (Placement(transformation(extent={{-34,26},{-22,38}}))); equation @@ -2700,7 +2635,7 @@ end TestSuperSampleClock; block TriggeredBooleanSampler "Triggered sampling of continuous signals" - extends Modelica.Blocks.Interfaces.DiscreteBlockIcon; + extends Modelica.Blocks.Icons.DiscreteBlock; parameter Boolean y_start=false "initial value of output signal"; Modelica.Blocks.Interfaces.BooleanInput u "Connector with a Boolean input signal" annotation (Placement( @@ -2765,7 +2700,7 @@ end TriggeredBooleanSampler; block TriggeredIntegerSampler "Triggered sampling of continuous signals" - extends Modelica.Blocks.Interfaces.DiscreteBlockIcon; + extends Modelica.Blocks.Icons.DiscreteBlock; parameter Integer y_start=0 "initial value of output signal"; Modelica.Blocks.Interfaces.IntegerInput u "Connector with a Integer input signal" annotation (Placement( @@ -2835,13 +2770,13 @@ y_start=0, T=1) annotation (Placement(transformation(extent={{20,40},{40,60}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-6,56},{6,44}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock periodicExactClock( useSolver=true, - resolution=Modelica_Synchronous.Types.Resolution.ms, + resolution=Modelica.Clocked.Types.Resolution.ms, factor=200, solverMethod="ImplicitEuler") annotation (Placement(transformation(extent={{-36,64},{-24,76}}))); @@ -2888,27 +2823,27 @@ model SuperSampling "Different ways to super sample a signal" extends Modelica.Icons.Example; parameter Integer factor=4 "Super sampling factor"; - Modelica.Blocks.Sources.Sine sine(freqHz=2, + Modelica.Blocks.Sources.Sine sine(f =2, offset=0.1, startTime=0.0) annotation (Placement(transformation(extent={{-60,0},{-40,20}}))); - Modelica_Synchronous.RealSignals.Sampler.SuperSample + Modelica.Clocked.RealSignals.Sampler.SuperSample superSample1(inferFactor=false, factor= factor) annotation (Placement(transformation(extent={{24,34},{36,46}}))); - Modelica_Synchronous.RealSignals.Sampler.SampleClocked + Modelica.Clocked.RealSignals.Sampler.SampleClocked sample1 annotation (Placement(transformation(extent={{-24,4},{-12,16}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.02) annotation (Placement(transformation(extent={{-54,-34},{-42,-22}}))); - Modelica_Synchronous.RealSignals.Sampler.Utilities.UpSample + Modelica.Clocked.RealSignals.Sampler.Utilities.UpSample upSample1( inferFactor=false, factor=factor) annotation (Placement(transformation(extent={{22,4},{34,16}}))); - Modelica_Synchronous.RealSignals.Sampler.SuperSampleInterpolated + Modelica.Clocked.RealSignals.Sampler.SuperSampleInterpolated superSampleIpo1(inferFactor=false, factor=factor) annotation (Placement(transformation(extent={{24,-26},{36,-14}}))); - Modelica_Synchronous.RealSignals.Periodic.MovingAverage + Modelica.Clocked.RealSignals.Periodic.MovingAverage movingAverage(n=factor) annotation (Placement(transformation(extent={{58,-30},{78,-10}}))); equation @@ -2945,25 +2880,25 @@ end RealSignals; model TheDifferentClocks - Modelica_Synchronous.ClockSignals.Clocks.PeriodicRealClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicRealClock periodicRealClock(period=0.01) annotation (Placement(transformation(extent={{-36,44},{-24,56}}))); - Modelica_Synchronous.ClockSignals.Clocks.PeriodicExactClock + Modelica.Clocked.ClockSignals.Clocks.PeriodicExactClock periodicExactClock(factor=10, resolution= - Modelica_Synchronous.Types.Resolution.ms) + Modelica.Clocked.Types.Resolution.ms) annotation (Placement(transformation(extent={{-36,14},{-24,26}}))); - Modelica_Synchronous.ClockSignals.Clocks.EventClock + Modelica.Clocked.ClockSignals.Clocks.EventClock eventClock annotation (Placement(transformation(extent={{-36,-16},{-24,-4}}))); Modelica.Blocks.Sources.BooleanPulse booleanPulse(period=0.1) annotation (Placement(transformation(extent={{-96,-20},{-76,0}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockOutput + Modelica.Clocked.ClockSignals.Interfaces.ClockOutput y1 annotation (Placement(transformation(extent={{0,44},{12,56}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockOutput + Modelica.Clocked.ClockSignals.Interfaces.ClockOutput y2 annotation (Placement(transformation(extent={{0,14},{12,26}}))); - Modelica_Synchronous.ClockSignals.Interfaces.ClockOutput + Modelica.Clocked.ClockSignals.Interfaces.ClockOutput y3 annotation (Placement(transformation(extent={{0,-16},{12,-4}}))); equation @@ -3006,10 +2941,10 @@ Modelica.Blocks.Interfaces.RealOutput y "Connector of clocked, Real output signal (clock of y is faster als clock of u)" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - Modelica_Synchronous.RealSignals.Sampler.SuperSampleInterpolated superSampleIpo(final + Modelica.Clocked.RealSignals.Sampler.SuperSampleInterpolated superSampleIpo(final inferFactor=inferFactor, final factor=factor) annotation (Placement(transformation(extent={{-76,-6},{-64,6}}))); - Modelica_Synchronous.RealSignals.Periodic.MovingAverage + Modelica.Clocked.RealSignals.Periodic.MovingAverage movingAverage(final n=factor) if movingAverageFilter annotation (Placement(transformation(extent={{4,-10},{24,10}}))); protected diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/openmodelica.metadata.json" "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/openmodelica.metadata.json" --- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/openmodelica.metadata.json" 2021-11-24 08:09:29.383341238 +0000 +++ "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/openmodelica.metadata.json" 2021-11-24 08:10:15.207203492 +0000 @@ -1 +1 @@ -{"path":"Modelica_Synchronous", "sha":"9a62642ad632deb12de86d31e3331bafb12cea43", "support":"support", "uses":{"Modelica":"3.2.3", "ModelicaServices":"3.2.3"}, "version":"0.93.0", "zipfile":"https://github.com/modelica/Modelica_Synchronous/archive/9a62642ad632deb12de86d31e3331bafb12cea43.zip"} +{"path": "Modelica_Synchronous", "sha": "9a62642ad632deb12de86d31e3331bafb12cea43", "support": "support", "uses": {"Modelica": "4.0.0", "ModelicaServices": "4.0.0"}, "version": "0.93.0", "zipfile": "https://github.com/modelica/Modelica_Synchronous/archive/9a62642ad632deb12de86d31e3331bafb12cea43.zip", "extraInfo": "Conversion script /home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om//Resources/Scripts/Conversion/ConvertModelica_from_3.2.3_to_4.0.0.mos was applied"} \ No newline at end of file diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/package.mo" "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/package.mo" --- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/package.mo" 2021-11-24 08:09:29.383341238 +0000 +++ "converted-libraries/.openmodelica/libraries/Modelica_Synchronous 0.93.0/package.mo" 2021-11-24 08:10:15.203203504 +0000 @@ -4,7 +4,7 @@ extends Modelica.Icons.Package; annotation (preferredView="info", - uses(Modelica(version="3.2.3"), ModelicaServices(version="3.2.3")), + uses(ModelicaServices(version = "4.0.0")), version="0.93.0", versionBuild=1, versionDate="2019-04-10",