From 0fce87691ced4e3d640eb2269719ea4df25cebdb Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Fri, 26 Jun 2015 16:01:01 +0200 Subject: [PATCH 01/46] Implementation slightly changed, so that OpenModelica 1.9.2 can cope with it --- .../Blocks/Noise/GenericNoise.mo | 28 ++++----- .../Blocks/Noise/GlobalSeed.mo | 60 ++----------------- .../initialStateWithXorshift64star.mo | 23 ++++--- 3 files changed, 32 insertions(+), 79 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo index 857640b2..19838aae 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo @@ -55,24 +55,22 @@ protected "= true if noise shall be generated, otherwise no noise"; // Declare state and random number variables - discrete Integer state[generator.nState] - "Internal state of random number generator"; - discrete Real r "Uniform random number in the range (0,1]"; + Integer state[generator.nState] "Internal state of random number generator"; + discrete Real r "Random number according to the desired distribution"; + discrete Real r_raw "Uniform random number in the range (0,1]"; -algorithm - when initial() then - // Initialize the random number generator - state := generator.initialState(localSeed, actualGlobalSeed); - (r, state) := generator.random(state); - r := distribution(r); - - elsewhen generateNoise and sample(startTime+samplePeriod, samplePeriod) then - // At every sample instance draw a new random number - (r, state) := generator.random(state); - r := distribution(r); - end when; +initial equation + pre(state) = generator.initialState(localSeed, actualGlobalSeed); + r_raw = generator.random(pre(state)); + r = distribution(r_raw); equation + // Draw random number at sample times + when generateNoise and sample(startTime, samplePeriod) then + (r_raw, state) = generator.random(pre(state)); + r = distribution(r_raw); + end when; + // Generate noise if requested y = if not generateNoise or time < startTime then y_off else r; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo index 3b6aa962..e8cff0a2 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo @@ -13,64 +13,14 @@ model GlobalSeed final parameter Integer seed = if useAutomaticSeed then Modelica_Noise.Math.Random.Utilities.automaticGlobalSeed() else fixedSeed "Actually used global seed"; - function random = Modelica_Noise.Math.Random.Utilities.impureRandom(final id=id) - "Impure random number generator function" - annotation (Documentation(info=" -

The impure function random() can be used to retrieve a random number in when-clauses, so at event instants.

-

Note

-

This function is impure!

-", revisions=" -

- - - - - - -
Date Description
June 22, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); + function random = Modelica_Noise.Math.Random.Utilities.impureRandom(final id=id_impure) + "Impure random number generator function"; function randomInteger = - Modelica_Noise.Math.Random.Utilities.impureRandomInteger(final id=id) - "Impure Integer random number generator function" - annotation (Documentation(info=" -

The impure function randomInteger() can be used to retrieve a random integer number in when-clauses, so at event instants.

-

Note

-

This function is impure!

-", revisions=" -

- - - - - - -
Date Description
June 22, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); + Modelica_Noise.Math.Random.Utilities.impureRandomInteger(final id=id_impure) + "Impure Integer random number generator function"; protected - final parameter Integer id = Modelica_Noise.Math.Random.Utilities.initializeImpureRandom(seed); + parameter Integer id_impure = Modelica_Noise.Math.Random.Utilities.initializeImpureRandom(seed); annotation ( defaultComponentName="globalSeed", diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo index f4cc9e1d..e3a6de54 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo @@ -11,23 +11,28 @@ function initialStateWithXorshift64star protected Real r "Random number only used inside function"; + Integer aux[2]; + Integer nStateEven; algorithm - // Set the first 2 states by using the initialState() function + aux :=Xorshift64star.initialState(localSeed, globalSeed); if nState >= 2 then - state[1:2] := Xorshift64star.initialState(localSeed, globalSeed); + state[1:2] := aux; else - state[1] := Xorshift64star.initialState(localSeed, globalSeed)*{1,0}; + state[1] := aux[1]; end if; - // Fill the next elements of the state vector (besides last) - for i in 3:2:(nState-1) loop - (r,state[i:i+1]) := Xorshift64star.random(state[i-2:i-1]); + // Fill the next elements of the state vector + nStateEven :=2*div(nState, 2); + for i in 3:2:nStateEven loop + (r,aux) := Xorshift64star.random(state[i-2:i-1]); + state[i:i+1] := aux; end for; - // Fill the last element of the state vector (to handle the case if nState is uneven) - if nState >= 3 then - (r,state[nState-1:nState]) := Xorshift64star.random(state[nState-2:nState-1]); + // If nState is uneven, fill the last element as well + if nState >= 3 and nState <> nStateEven then + (r,aux) := Xorshift64star.random(state[nState-2:nState-1]); + state[nState] :=aux[1]; end if; annotation (Documentation(revisions=" From 4bd7de0143c4c8af696e18abd02dcd2a7987e589 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Fri, 26 Jun 2015 17:19:27 +0200 Subject: [PATCH 02/46] Update for separate AdvancedNoise library --- README.md | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 06cde00b..0e0448b3 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,33 @@ -Noise +Modelica_Noise ===== -An open Library for the Generation of Stochastic Signals in Modelica +Modelica library for generating stochastic signals to be included in the Modelica Standard Library. +This library contains standard models for generating random numbers in Modelica. It is intended to include this set of models in the [Modelica Standard Library (MSL)](https://github.com/modelica/Modelica). More advanced noise features building on this library can be found in the [AdvancedNoise](https://github.com/DLR-SR/AdvancedNoise) library. -## Library description +The library contains the following elements: +- a standard sampled noise source using the xorshift random number generator suite +- some commonly used probability distributions +- some statistical analysis blocks -The Noise library is developed to consistently define an algorithmically random source in Modelica. Care has been taken to develop a source which has a high statistical randomness. This is illustrated in an example. Furthermore, care has been taken to generate a continuous, event-free source to avoid extremely high performance penalties due to integrator restarts. +Main features of the elements provided are: +- statistical quality of the random numbers by using the xorshift suite +- reproducability of the random sequences by providing a global and a local seed +- versatility by replaceable probability distributions for the generated noise +- mathematically correct statistical properties by using standard procedures only -Potential applications are: -- Sensor Noise -- Stochastical excitations like air gusts and road excitation +Potential applications of the provided elements are: +- correctly modeling sensor noise by using the provided distributions +- stochastic excitations such as turbulence by filtering band-limited white noise +- any other application by providing easy-to-use basic functions. -## Current release +## Current MSL evaluation + +The master branch of this library is currently reviewed for inclusion in the MSL. + +## Original release + +The original version of this library was released after the Modelica conference in 2014: Download [Noise 0.2.0 (2014-06-13)](../../archive/v0.2.0.zip) @@ -27,12 +42,13 @@ Copyright (C) 2014, **DLR** German Aerospace Center ## Development and contribution -The library was developed by the **DLR** German Aerospace Center contributors: +The library is developed by the **DLR** German Aerospace Center contributors: - Andreas Klöckner - Franciscus van der Linden - Dirk Zimmer + - Martin Otter You may report any issues with using the [Issues](../../issues) button. -Contributions in shape of [Pull Requests](../../pulls) are always welcome. +Contributions in the form of [Pull Requests](../../pulls) are always welcome. From 60932409d369f6dd6d2b490f65959176f4339d7f Mon Sep 17 00:00:00 2001 From: akloeckner Date: Fri, 26 Jun 2015 17:19:54 +0200 Subject: [PATCH 03/46] Ups... 2015... --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e0448b3..6577ce8d 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ This Modelica package is free software and the use is completely at your own ris it can be redistributed and/or modified under the terms of the [Modelica License 2](https://modelica.org/licenses/ModelicaLicense2). -Copyright (C) 2014, **DLR** German Aerospace Center +Copyright (C) 2015, **DLR** German Aerospace Center ## Development and contribution From 7786b28d779f13143c0eb16cd0c08ca2443da826 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Fri, 26 Jun 2015 17:25:32 +0200 Subject: [PATCH 04/46] Remove AdvancedNoise This has moved to https://github.com/DLR-SR/AdvancedNoise --- .../Distributions/Bates/cumulative.mo | 86 --- .../Distributions/Bates/density.mo | 67 --- .../Distributions/Bates/package.mo | 50 -- .../Distributions/Bates/package.order | 3 - .../Distributions/Bates/quantile.mo | 109 ---- .../Distributions/Discrete/cumulative.mo | 26 - .../Distributions/Discrete/density.mo | 20 - .../Distributions/Discrete/package.mo | 38 -- .../Distributions/Discrete/package.order | 3 - .../Distributions/Discrete/quantile.mo | 41 -- Noise 1.0 Beta.1/Distributions/package.mo | 19 - Noise 1.0 Beta.1/Distributions/package.order | 2 - Noise 1.0 Beta.1/Examples/Correlations.mo | 49 -- Noise 1.0 Beta.1/Examples/Derivatives.mo | 233 -------- Noise 1.0 Beta.1/Examples/FrequencyShaping.mo | 62 --- .../Examples/InterpolateRandomNumbers.mo | 68 --- Noise 1.0 Beta.1/Examples/Interpolation.mo | 155 ------ .../Comparisons/FilterAndConvolution.mo | 101 ---- .../Comparisons/MinimumAndZeroPhase.mo | 9 - .../Comparisons/SpaceAndTimeDomain.mo | 8 - .../RailIrregularities/Comparisons/package.mo | 6 - .../Comparisons/package.order | 3 - .../Interpolator/package.order | 0 .../MinimumPhaseInterpolator/package.mo | 12 - .../MinimumPhaseInterpolator/package.order | 0 .../RailIrregularities/Parts/Displacement.mo | 39 -- .../RailIrregularities/Parts/Irregularity.mo | 47 -- .../Parts/QuarterRailwayCar.mo | 92 ---- .../Parts/SimpleRailwayTrack.mo | 53 -- .../RailIrregularities/Parts/package.mo | 4 - .../RailIrregularities/Parts/package.order | 4 - .../RailIrregularities/TrainOnTrack.mo | 64 --- .../ZeroPhaseInterpolator/package.mo | 12 - .../ZeroPhaseInterpolator/package.order | 0 .../Examples/RailIrregularities/package.mo | 4 - .../Examples/RailIrregularities/package.order | 5 - Noise 1.0 Beta.1/Examples/SignalBasedNoise.mo | 69 --- .../Examples/SignalInterpolation.mo | 94 ---- .../Utilities/RailIrregularities/package.mo | 52 -- .../RailIrregularities/package.order | 0 .../Examples/Utilities/package.order | 1 - Noise 1.0 Beta.1/Examples/package.mo | 4 - Noise 1.0 Beta.1/Examples/package.order | 8 - Noise 1.0 Beta.1/Generators/package.mo | 9 - Noise 1.0 Beta.1/Generators/package.order | 0 .../Interpolators/Constant/package.mo | 74 --- .../Interpolators/Constant/package.order | 1 - .../Interpolators/FirstOrder/package.mo | 57 -- .../Interpolators/FirstOrder/package.order | 5 - .../Interpolators/Linear/der_interpolate.mo | 63 --- .../Interpolators/Linear/package.mo | 88 --- .../Interpolators/Linear/package.order | 2 - .../SmoothIdealLowPass/der_interpolate.mo | 54 -- .../SmoothIdealLowPass/der_kernel_offset.mo | 37 -- .../SmoothIdealLowPass/kernel.mo | 37 -- .../SmoothIdealLowPass/package.mo | 150 ------ .../SmoothIdealLowPass/package.order | 5 - .../StepResponse/kernelVariance.mo | 6 - .../Interpolators/StepResponse/package.mo | 53 -- .../Interpolators/StepResponse/package.order | 7 - .../Interpolators/StepResponse/trapz.mo | 8 - .../Interfaces/PartialInterpolator/package.mo | 114 ---- .../PartialInterpolator/package.order | 6 - .../der_interpolate.mo | 30 -- .../PartialInterpolatorWithKernel/package.mo | 108 ---- .../package.order | 5 - .../Utilities/Interfaces/package.mo | 5 - .../Utilities/Interfaces/package.order | 3 - .../Utilities/Interfaces/partialKernel.mo | 5 - .../Interpolators/Utilities/package.mo | 4 - .../Interpolators/Utilities/package.order | 1 - Noise 1.0 Beta.1/Interpolators/package.mo | 10 - Noise 1.0 Beta.1/Interpolators/package.order | 6 - Noise 1.0 Beta.1/Math/binomial.mo | 11 - Noise 1.0 Beta.1/Math/factorial.mo | 13 - Noise 1.0 Beta.1/Math/package.mo | 13 - Noise 1.0 Beta.1/Math/package.order | 2 - .../Plots/Distributions/Discrete.mo | 25 - Noise 1.0 Beta.1/Plots/Distributions/bates.mo | 31 -- .../Plots/Distributions/normal.mo | 31 -- .../Plots/Distributions/package.mo | 5 - .../Plots/Distributions/package.order | 5 - .../Plots/Distributions/uniform.mo | 31 -- .../Plots/Distributions/weibull.mo | 30 -- .../Plots/TruncatedDistributions/normal.mo | 28 - .../Plots/TruncatedDistributions/package.mo | 8 - .../TruncatedDistributions/package.order | 3 - .../Plots/TruncatedDistributions/uniform.mo | 31 -- .../Plots/TruncatedDistributions/weibull.mo | 28 - Noise 1.0 Beta.1/Plots/package.mo | 7 - Noise 1.0 Beta.1/Plots/package.order | 3 - Noise 1.0 Beta.1/Plots/special.mo | 35 -- .../Sources/ColoredSignalBasedNoise.mo | 13 - Noise 1.0 Beta.1/Sources/SignalBasedNoise.mo | 455 ---------------- Noise 1.0 Beta.1/Sources/TimeBasedNoise.mo | 500 ------------------ Noise 1.0 Beta.1/Sources/package.mo | 11 - Noise 1.0 Beta.1/Sources/package.order | 3 - Noise 1.0 Beta.1/Statistics/Correlation.mo | 75 --- .../Statistics/CorrelationTest.mo | 59 --- .../Statistics/SignificanceTest.mo | 27 - Noise 1.0 Beta.1/Statistics/package.mo | 19 - Noise 1.0 Beta.1/Statistics/package.order | 3 - Noise 1.0 Beta.1/Test/densities.mo | 30 -- Noise 1.0 Beta.1/Test/package.order | 3 - Noise 1.0 Beta.1/Test/quantiles.mo | 34 -- Noise 1.0 Beta.1/Test/special.mo | 35 -- .../Bates/cumulative.mo | 49 -- .../TruncatedDistributions/Bates/density.mo | 40 -- .../TruncatedDistributions/Bates/package.mo | 50 -- .../Bates/package.order | 3 - .../TruncatedDistributions/Bates/quantile.mo | 59 --- .../Discrete/cumulative.mo | 35 -- .../Discrete/density.mo | 20 - .../Discrete/package.mo | 38 -- .../Discrete/package.order | 3 - .../Discrete/quantile.mo | 42 -- .../TruncatedDistributions/package.mo | 14 - .../TruncatedDistributions/package.order | 2 - Noise 1.0 Beta.1/libraryinfo.mos | 17 - Noise 1.0 Beta.1/package.mo | 24 - Noise 1.0 Beta.1/package.order | 9 - 121 files changed, 4687 deletions(-) delete mode 100644 Noise 1.0 Beta.1/Distributions/Bates/cumulative.mo delete mode 100644 Noise 1.0 Beta.1/Distributions/Bates/density.mo delete mode 100644 Noise 1.0 Beta.1/Distributions/Bates/package.mo delete mode 100644 Noise 1.0 Beta.1/Distributions/Bates/package.order delete mode 100644 Noise 1.0 Beta.1/Distributions/Bates/quantile.mo delete mode 100644 Noise 1.0 Beta.1/Distributions/Discrete/cumulative.mo delete mode 100644 Noise 1.0 Beta.1/Distributions/Discrete/density.mo delete mode 100644 Noise 1.0 Beta.1/Distributions/Discrete/package.mo delete mode 100644 Noise 1.0 Beta.1/Distributions/Discrete/package.order delete mode 100644 Noise 1.0 Beta.1/Distributions/Discrete/quantile.mo delete mode 100644 Noise 1.0 Beta.1/Distributions/package.mo delete mode 100644 Noise 1.0 Beta.1/Distributions/package.order delete mode 100644 Noise 1.0 Beta.1/Examples/Correlations.mo delete mode 100644 Noise 1.0 Beta.1/Examples/Derivatives.mo delete mode 100644 Noise 1.0 Beta.1/Examples/FrequencyShaping.mo delete mode 100644 Noise 1.0 Beta.1/Examples/InterpolateRandomNumbers.mo delete mode 100644 Noise 1.0 Beta.1/Examples/Interpolation.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/FilterAndConvolution.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/MinimumAndZeroPhase.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/SpaceAndTimeDomain.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/package.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/package.order delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Interpolator/package.order delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/MinimumPhaseInterpolator/package.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/MinimumPhaseInterpolator/package.order delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/Displacement.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/Irregularity.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/QuarterRailwayCar.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/SimpleRailwayTrack.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/package.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/package.order delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/TrainOnTrack.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/ZeroPhaseInterpolator/package.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/ZeroPhaseInterpolator/package.order delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/package.mo delete mode 100644 Noise 1.0 Beta.1/Examples/RailIrregularities/package.order delete mode 100644 Noise 1.0 Beta.1/Examples/SignalBasedNoise.mo delete mode 100644 Noise 1.0 Beta.1/Examples/SignalInterpolation.mo delete mode 100644 Noise 1.0 Beta.1/Examples/Utilities/RailIrregularities/package.mo delete mode 100644 Noise 1.0 Beta.1/Examples/Utilities/RailIrregularities/package.order delete mode 100644 Noise 1.0 Beta.1/Examples/Utilities/package.order delete mode 100644 Noise 1.0 Beta.1/Examples/package.mo delete mode 100644 Noise 1.0 Beta.1/Examples/package.order delete mode 100644 Noise 1.0 Beta.1/Generators/package.mo delete mode 100644 Noise 1.0 Beta.1/Generators/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/Constant/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Constant/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/FirstOrder/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/FirstOrder/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/Linear/der_interpolate.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Linear/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Linear/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/der_interpolate.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/der_kernel_offset.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/kernel.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/StepResponse/kernelVariance.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/StepResponse/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/StepResponse/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/StepResponse/trapz.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolator/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolator/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/der_interpolate.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/partialKernel.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/Utilities/package.order delete mode 100644 Noise 1.0 Beta.1/Interpolators/package.mo delete mode 100644 Noise 1.0 Beta.1/Interpolators/package.order delete mode 100644 Noise 1.0 Beta.1/Math/binomial.mo delete mode 100644 Noise 1.0 Beta.1/Math/factorial.mo delete mode 100644 Noise 1.0 Beta.1/Math/package.mo delete mode 100644 Noise 1.0 Beta.1/Math/package.order delete mode 100644 Noise 1.0 Beta.1/Plots/Distributions/Discrete.mo delete mode 100644 Noise 1.0 Beta.1/Plots/Distributions/bates.mo delete mode 100644 Noise 1.0 Beta.1/Plots/Distributions/normal.mo delete mode 100644 Noise 1.0 Beta.1/Plots/Distributions/package.mo delete mode 100644 Noise 1.0 Beta.1/Plots/Distributions/package.order delete mode 100644 Noise 1.0 Beta.1/Plots/Distributions/uniform.mo delete mode 100644 Noise 1.0 Beta.1/Plots/Distributions/weibull.mo delete mode 100644 Noise 1.0 Beta.1/Plots/TruncatedDistributions/normal.mo delete mode 100644 Noise 1.0 Beta.1/Plots/TruncatedDistributions/package.mo delete mode 100644 Noise 1.0 Beta.1/Plots/TruncatedDistributions/package.order delete mode 100644 Noise 1.0 Beta.1/Plots/TruncatedDistributions/uniform.mo delete mode 100644 Noise 1.0 Beta.1/Plots/TruncatedDistributions/weibull.mo delete mode 100644 Noise 1.0 Beta.1/Plots/package.mo delete mode 100644 Noise 1.0 Beta.1/Plots/package.order delete mode 100644 Noise 1.0 Beta.1/Plots/special.mo delete mode 100644 Noise 1.0 Beta.1/Sources/ColoredSignalBasedNoise.mo delete mode 100644 Noise 1.0 Beta.1/Sources/SignalBasedNoise.mo delete mode 100644 Noise 1.0 Beta.1/Sources/TimeBasedNoise.mo delete mode 100644 Noise 1.0 Beta.1/Sources/package.mo delete mode 100644 Noise 1.0 Beta.1/Sources/package.order delete mode 100644 Noise 1.0 Beta.1/Statistics/Correlation.mo delete mode 100644 Noise 1.0 Beta.1/Statistics/CorrelationTest.mo delete mode 100644 Noise 1.0 Beta.1/Statistics/SignificanceTest.mo delete mode 100644 Noise 1.0 Beta.1/Statistics/package.mo delete mode 100644 Noise 1.0 Beta.1/Statistics/package.order delete mode 100644 Noise 1.0 Beta.1/Test/densities.mo delete mode 100644 Noise 1.0 Beta.1/Test/package.order delete mode 100644 Noise 1.0 Beta.1/Test/quantiles.mo delete mode 100644 Noise 1.0 Beta.1/Test/special.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Bates/cumulative.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Bates/density.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Bates/package.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Bates/package.order delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Bates/quantile.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Discrete/cumulative.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Discrete/density.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Discrete/package.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Discrete/package.order delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/Discrete/quantile.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/package.mo delete mode 100644 Noise 1.0 Beta.1/TruncatedDistributions/package.order delete mode 100644 Noise 1.0 Beta.1/libraryinfo.mos delete mode 100644 Noise 1.0 Beta.1/package.mo delete mode 100644 Noise 1.0 Beta.1/package.order diff --git a/Noise 1.0 Beta.1/Distributions/Bates/cumulative.mo b/Noise 1.0 Beta.1/Distributions/Bates/cumulative.mo deleted file mode 100644 index 54417184..00000000 --- a/Noise 1.0 Beta.1/Distributions/Bates/cumulative.mo +++ /dev/null @@ -1,86 +0,0 @@ -within Noise.Distributions.Bates; -function cumulative "Cumulative distribution function of Bates distribution" - import Noise.Math.factorial; - import Noise.Math.binomial; - extends Modelica_Noise.Math.Distributions.Interfaces.partialCumulative; - input Real y_min=0 "Lower limit of band" annotation (Dialog); - input Real y_max=1 "Upper limit of band" annotation (Dialog); - input Integer n=12 "Number of uniform random values" annotation (Dialog); -protected - Real x "Abbreviation into the interval (0,1)"; -algorithm - - // This is the formula for the PDF: - // pdf = n^n /(n-1)!*sum( (-1)^k * binomial(n,k) * (x-k/n)^(n-1) , k = 0..floor(n*x)) - - // The integral is actually only once over x - // cdf = n^(n-1)/(n-1)!*sum( (-1)^k * binomial(n,k) * (x-k/n)^( n ) , k = 0..floor(n*x)) - - // Map the scaled distribution to the stable region - x := (u - y_min) / (y_max - y_min); - if u > 0.5*(y_min+y_max) then - x := 1 - x; - end if; - - // Only calculate a number within the boundary - y := 0; - if u >= y_min and u <= y_max then - - // Loop over k = 0 .. floor(n*x) - for k in 0:integer(n*x) loop - // Sum up the inner part - y := y + (-1)^k * binomial(n,k) * (x-k/n)^(n); - end for; - // Multiply by the outer factor - y := n^(n-1) / factorial(n-1) * y; - - elseif u > y_max then - y := 1; - end if; - - // Invert the CDF for x > 0.5 - if u > 0.5*(y_min+y_max) and u <= y_max then - y := 1 - y; - end if; - annotation (Inline=true,Documentation(info=" -

Syntax

-
-Bates.cumulative(u, y_min=0, y_max=1, n=12);
-
- -

Description

-

-This function computes the cumulative distribution function -according to a Bates distribution (= mean of n uniform distributions). -The returned value y is in the range: -

- -

-0 ≤ y ≤ 1 -

- -

-Plot of the function: -

- -

- -

- -

-For more details, see -Wikipedia. -

- -

Example

-
-  cumulative(0,-3,3,12) // = 0.5
-
- -

See also

-

-Bates.density, -Bates.quantile. -

-")); -end cumulative; diff --git a/Noise 1.0 Beta.1/Distributions/Bates/density.mo b/Noise 1.0 Beta.1/Distributions/Bates/density.mo deleted file mode 100644 index 23d95223..00000000 --- a/Noise 1.0 Beta.1/Distributions/Bates/density.mo +++ /dev/null @@ -1,67 +0,0 @@ -within Noise.Distributions.Bates; -function density "Density of Bates distribution" - import Noise.Math.factorial; - import Noise.Math.binomial; - extends Modelica_Noise.Math.Distributions.Interfaces.partialDensity; - input Real y_min=0 "Lower limit of band" annotation (Dialog); - input Real y_max=1 "Upper limit of band" annotation (Dialog); - input Integer n=12 "Number of uniform random values" annotation (Dialog); -protected - Real x "Abbreviation into the interval (0,1)"; -algorithm - // This is the formula for the PDF: - // pdf = n^n/(n-1)!*sum( (-1)^k * binomial(n,k) * (x-k/n)^(n-1) , k = 0..floor(n*x)) - - // Map the scaled distribution to the stable region - x := (u - y_min) / (y_max - y_min); - if u > 0.5*(y_min+y_max) then - x := 1 - x; - end if; - - // Only calculate a number within the boundary - y := 0; - if u >= y_min and u <= y_max then - - // Loop over k = 0 .. floor(n*x) - for k in 0:integer(n*x) loop - // Sum up the inner part - y := y + (-1)^k * binomial(n,k) * (x-k/n)^(n-1); - end for; - // Multiply by the outer factor - y := n^(n)/3 / factorial(n-1) * y; - - end if; - - annotation (Inline=true,Documentation(info=" -

Syntax

-
-Bates.density(u, y_min=0, y_max=1, n=12);
-
- -

Description

-

-This function computes the probability density function according to a Bates distribution -(= mean of n uniform distributions). Plot of the function: -

- -

- -

- -

-For more details, see -Wikipedia. -

- -

Example

-
-  density(0, -3, 3, 12) // = 4.7271067821068185
-
- -

See also

-

-Bates.cumulative, -Bates.quantile. -

-")); -end density; diff --git a/Noise 1.0 Beta.1/Distributions/Bates/package.mo b/Noise 1.0 Beta.1/Distributions/Bates/package.mo deleted file mode 100644 index 1e46e371..00000000 --- a/Noise 1.0 Beta.1/Distributions/Bates/package.mo +++ /dev/null @@ -1,50 +0,0 @@ -within Noise.Distributions; -package Bates "Library of Bates distribution functions (= mean of n uniform distributions)" - extends Modelica.Icons.Package; - - -annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ - -100,-100},{100,100}}), graphics={ - Line( - points={{-70,-63.953},{-66.5,-63.8975},{-63,-63.7852},{-59.5,-63.5674}, - {-56,-63.1631},{-52.5,-62.4442},{-49,-61.2213},{-45.5,-59.2318},{-42, - -56.1385},{-38.5,-51.5468},{-35,-45.0467},{-31.5,-36.2849},{-28,-25.0617}, - {-24.5,-11.4388},{-21,4.1682},{-17.5,20.9428},{-14,37.695},{-10.5, - 52.9771},{-7,65.2797},{-3.5,73.2739},{0,76.047},{3.5,73.2739},{7,65.2797}, - {10.5,52.9771},{14,37.695},{17.5,20.9428},{21,4.1682},{24.5,-11.4388}, - {28,-25.0617},{31.5,-36.2849},{35,-45.0467},{38.5,-51.5468},{42,-56.1385}, - {45.5,-59.2318},{49,-61.2213},{52.5,-62.4442},{56,-63.1631},{59.5, - -63.5674},{63,-63.7852},{66.5,-63.8975},{70,-63.953}}, - color={0,0,0}, - smooth=Smooth.Bezier)}), Documentation(info=" -

-This package provides -

-
    -
  • probability density function (= derivative of cumulative distribution function),
  • -
  • cumulative distribution function, and
  • -
  • quantile (= inverse cumulative distribution function).
  • -
-

-of the Bates distribution (= mean of n uniform -distributions). Examples: -

- -

- -

- -

- -

- -

- -

- -

-For more details of this distribution see -Wikipedia. -

-")); -end Bates; diff --git a/Noise 1.0 Beta.1/Distributions/Bates/package.order b/Noise 1.0 Beta.1/Distributions/Bates/package.order deleted file mode 100644 index ddc9fbd9..00000000 --- a/Noise 1.0 Beta.1/Distributions/Bates/package.order +++ /dev/null @@ -1,3 +0,0 @@ -density -cumulative -quantile diff --git a/Noise 1.0 Beta.1/Distributions/Bates/quantile.mo b/Noise 1.0 Beta.1/Distributions/Bates/quantile.mo deleted file mode 100644 index f8974d7e..00000000 --- a/Noise 1.0 Beta.1/Distributions/Bates/quantile.mo +++ /dev/null @@ -1,109 +0,0 @@ -within Noise.Distributions.Bates; -function quantile "Quantile of Bates distribution" - extends Modelica_Noise.Math.Distributions.Interfaces.partialQuantile; - input Real y_min=0 "Lower limit of band" annotation (Dialog); - input Real y_max=1 "Upper limit of band" annotation (Dialog); - input Integer n=12 "Number of uniform random values" annotation (Dialog); -protected - Real tol = 1e-6 "Required acuracy of the quantile"; - Real y_l, y_m, y_h "Random values during search"; - Real p_l, p_m, p_h "Probabilities during search"; - Integer i "A counter for debugging"; -algorithm - - // Return the limits, if the probability is not in (0,1) - if u > 1 then - y := y_max; - elseif u < 0 then - y := y_min; - - // Iterate the value, because we have not found an inverse CDF - else - - // Initialize variables - i := 0; - y_l := y_min; - y_h := y_max; - p_l := cumulative(y_l, y_min, y_max, n); - p_h := cumulative(y_h, y_min, y_max, n); - - // Keep iterating as long as both estimations are not close enough - while abs(u-p_l) > tol and abs(u-p_h) > tol loop - i := i + 1; - - // Calculate an intermediate point - y_m := y_l + (y_h-y_l)/(p_h-p_l)*(u-p_l); - p_m := cumulative(y_m, y_min, y_max, n); - - // Select narrower boundaries than before - if p_m >= u then - y_h := y_m; - p_h := p_m; - end if; - if p_m <= u then - y_l := y_m; - p_l := p_m; - end if; - end while; - - // Select correct boundary - if abs(u-p_l) < abs(u-p_h) then - y := y_l; - else - y := y_h; - end if; - end if; - - annotation (Inline=true,Documentation(info=" -

Syntax

-
-Bates.quantile(u, y_min=0, y_max=1, n=12);
-
- -

Description

-

-This function computes the inverse cumulative distribution function (= quantile) according to a Bates -distribution (= mean of n uniform distributions). Input argument u must be in the range: -

- -
-

-0 ≤ u ≤ 1 -

-
- -

-The returned number y is in the range: -

- -
-

-y_min ≤ y ≤ y_max -

-
- -

-Plot of the function: -

- -

- -

- -

-For more details, see -Wikipedia. -

- -

Example

-
-  quantile(0.5,-3,3,12) // = -7.450831063238184E-010
-
- -

See also

-

-Bates.density, -Bates.cumulative. -

-")); -end quantile; diff --git a/Noise 1.0 Beta.1/Distributions/Discrete/cumulative.mo b/Noise 1.0 Beta.1/Distributions/Discrete/cumulative.mo deleted file mode 100644 index 38e0e893..00000000 --- a/Noise 1.0 Beta.1/Distributions/Discrete/cumulative.mo +++ /dev/null @@ -1,26 +0,0 @@ -within Noise.Distributions.Discrete; -function cumulative "Cumulative distribution function of discrete distribution" - extends Modelica_Noise.Math.Distributions.Interfaces.partialCumulative; - input Real x[:] = {0,1} "Discrete values to be chosen from" annotation(Dialog); - input Real p[size(x,1)] = ones(size(x,1))/size(x,1) - "The probabilities of the discrete values" annotation(Dialog); -algorithm - y := 0; - for i in 1:size(x,1) loop - if u >= x[i] then - y := y + p[i]; - end if; - end for; - y := y / sum(p); - - annotation (Inline=true,Documentation(info=" -

-This function returns the cumulative distribution function according to a uniform distribution in a band. -

- -

-For more details of this distribution see -Wikipedia. -

-")); -end cumulative; diff --git a/Noise 1.0 Beta.1/Distributions/Discrete/density.mo b/Noise 1.0 Beta.1/Distributions/Discrete/density.mo deleted file mode 100644 index b734b831..00000000 --- a/Noise 1.0 Beta.1/Distributions/Discrete/density.mo +++ /dev/null @@ -1,20 +0,0 @@ -within Noise.Distributions.Discrete; -function density "Density of discrete distribution (undefined!)" - extends Modelica_Noise.Math.Distributions.Interfaces.partialDensity; - input Real x[:] = {0,1} "Discrete values to be chosen from" annotation(Dialog); - input Real p[size(x,1)] = ones(size(x,1))/size(x,1) - "The probabilities of the discrete values" annotation(Dialog); -algorithm - assert(false, "The density of the discrete distribution is not defined."); - - annotation (Inline=true,Documentation(info=" -

-This function returns the probability density according to a uniform distribution in a band. -

- -

-For more details of this distribution see -Wikipedia. -

-")); -end density; diff --git a/Noise 1.0 Beta.1/Distributions/Discrete/package.mo b/Noise 1.0 Beta.1/Distributions/Discrete/package.mo deleted file mode 100644 index b74ce787..00000000 --- a/Noise 1.0 Beta.1/Distributions/Discrete/package.mo +++ /dev/null @@ -1,38 +0,0 @@ -within Noise.Distributions; -package Discrete "Library of discrete distribution functions" - extends Modelica.Icons.Package; - - -annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ - -100,-100},{100,100}}), graphics={ - Line( - points={{-70,-60},{-50,-60},{-50,40},{-50,-60},{-20,-60},{-20,12},{-20, - -60},{0,-60},{0,80},{0,-60},{30,-60},{30,50},{30,-60},{62,-60},{62, - 14},{62,-60},{70,-60}}, - color={0,0,0}), - Ellipse( - extent={{-54,44},{-46,36}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{-24,18},{-16,10}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{-4,84},{4,76}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{26,54},{34,46}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{58,18},{66,10}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid)})); -end Discrete; diff --git a/Noise 1.0 Beta.1/Distributions/Discrete/package.order b/Noise 1.0 Beta.1/Distributions/Discrete/package.order deleted file mode 100644 index ddc9fbd9..00000000 --- a/Noise 1.0 Beta.1/Distributions/Discrete/package.order +++ /dev/null @@ -1,3 +0,0 @@ -density -cumulative -quantile diff --git a/Noise 1.0 Beta.1/Distributions/Discrete/quantile.mo b/Noise 1.0 Beta.1/Distributions/Discrete/quantile.mo deleted file mode 100644 index 2717cb35..00000000 --- a/Noise 1.0 Beta.1/Distributions/Discrete/quantile.mo +++ /dev/null @@ -1,41 +0,0 @@ -within Noise.Distributions.Discrete; -function quantile - "Quantile of discrete distribution (= inverse cumulative distribution function)" - extends Modelica_Noise.Math.Distributions.Interfaces.partialQuantile; - input Real x[:] = {0,1} "Discrete values to be chosen from" annotation(Dialog); - input Real p[size(x,1)] = ones(size(x,1))/size(x,1) - "The probabilities of the discrete values" annotation(Dialog); -protected - Integer iSorted[size(x,1)] "Sorted indices"; - Real xSorted[size(x,1)] "Sorted values of x"; - Real pSorted[size(x,1)] "Sorted values of p"; - Real cdf; -algorithm - (xSorted, iSorted) := Modelica.Math.Vectors.sort(x); - - cdf := 0; - for i in 1:size(x,1) loop - if u > cdf/sum(p) then - y := xSorted[i]; - end if; - cdf := cdf + p[iSorted[i]]; - end for; - - annotation (Inline=true,Documentation(info=" -

-This function returns a number according to a uniform distribution in a band. -This means the returned number is in the range: -

- -
-

-y_min ≤ y ≤ y_max -

-
- -

-For more details of this distribution see -Wikipedia. -

-")); -end quantile; diff --git a/Noise 1.0 Beta.1/Distributions/package.mo b/Noise 1.0 Beta.1/Distributions/package.mo deleted file mode 100644 index 46c7358d..00000000 --- a/Noise 1.0 Beta.1/Distributions/package.mo +++ /dev/null @@ -1,19 +0,0 @@ -within Noise; -package Distributions "Additional distributions" - extends Modelica.Icons.Package; - - - annotation (Icon(graphics={ - Line( - points={{-70,-65.953},{-66.5,-65.8975},{-63,-65.7852},{-59.5,-65.5674}, - {-56,-65.1631},{-52.5,-64.4442},{-49,-63.2213},{-45.5,-61.2318},{-42, - -58.1385},{-38.5,-53.5468},{-35,-47.0467},{-31.5,-38.2849},{-28,-27.0617}, - {-24.5,-13.4388},{-21,2.1682},{-17.5,18.9428},{-14,35.695},{-10.5, - 50.9771},{-7,63.2797},{-3.5,71.2739},{0,74.047},{3.5,71.2739},{7,63.2797}, - {10.5,50.9771},{14,35.695},{17.5,18.9428},{21,2.1682},{24.5,-13.4388}, - {28,-27.0617},{31.5,-38.2849},{35,-47.0467},{38.5,-53.5468},{42,-58.1385}, - {45.5,-61.2318},{49,-63.2213},{52.5,-64.4442},{56,-65.1631},{59.5, - -65.5674},{63,-65.7852},{66.5,-65.8975},{70,-65.953}}, - color={0,0,0}, - smooth=Smooth.Bezier)})); -end Distributions; diff --git a/Noise 1.0 Beta.1/Distributions/package.order b/Noise 1.0 Beta.1/Distributions/package.order deleted file mode 100644 index 01c36113..00000000 --- a/Noise 1.0 Beta.1/Distributions/package.order +++ /dev/null @@ -1,2 +0,0 @@ -Bates -Discrete diff --git a/Noise 1.0 Beta.1/Examples/Correlations.mo b/Noise 1.0 Beta.1/Examples/Correlations.mo deleted file mode 100644 index d9879ec0..00000000 --- a/Noise 1.0 Beta.1/Examples/Correlations.mo +++ /dev/null @@ -1,49 +0,0 @@ -within Noise.Examples; -model Correlations - extends Modelica.Icons.Example; - - Sources.TimeBasedNoise noise1( - samplePeriod=0.01, - y_min=0, - y_max=1, - useAutomaticLocalSeed=false, - fixedLocalSeed=11) - annotation (Placement(transformation(extent={{-80,60},{-60,80}}))); - inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed - annotation (Placement(transformation(extent={{60,60},{80,80}}))); - Sources.TimeBasedNoise noise2( - samplePeriod=0.01, - y_min=0, - y_max=1, - useAutomaticLocalSeed=false) - annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Statistics.CorrelationTest crossCorrelationTest - annotation (Placement(transformation(extent={{-20,40},{0,60}}))); - Sources.TimeBasedNoise noise3( - samplePeriod=0.01, - y_min=0, - y_max=1, - useAutomaticLocalSeed=false) - annotation (Placement(transformation(extent={{-80,-20},{-60,0}}))); - Statistics.CorrelationTest autoCorrelationTest(correlation(delta_t=0.02)) - annotation (Placement(transformation(extent={{-20,0},{0,20}}))); -equation - connect(crossCorrelationTest.u1, noise1.y) annotation (Line( - points={{-22,56},{-40,56},{-40,70},{-59,70}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(crossCorrelationTest.u2, noise2.y) annotation (Line( - points={{-22,44},{-40,44},{-40,30},{-59,30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(autoCorrelationTest.u1, noise2.y) annotation (Line( - points={{-22,16},{-40,16},{-40,30},{-59,30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(autoCorrelationTest.u2, noise3.y) annotation (Line( - points={{-22,4},{-40,4},{-40,-10},{-59,-10}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics)); -end Correlations; diff --git a/Noise 1.0 Beta.1/Examples/Derivatives.mo b/Noise 1.0 Beta.1/Examples/Derivatives.mo deleted file mode 100644 index ca6bd1ed..00000000 --- a/Noise 1.0 Beta.1/Examples/Derivatives.mo +++ /dev/null @@ -1,233 +0,0 @@ -within Noise.Examples; -model Derivatives "Tests derivatives of the random numbers" - extends Modelica.Icons.Example; - inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed(useAutomaticSeed= - false) annotation (Placement(transformation(extent={{60,60},{80,80}}))); - Sources.TimeBasedNoise uniformLinear( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - sampleFactor=10, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = Interpolators.Linear) - annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); - Sources.TimeBasedNoise uniformSmooth( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - sampleFactor=10, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = Interpolators.SmoothIdealLowPass) - annotation (Placement(transformation(extent={{-40,70},{-20,90}}))); - Sources.TimeBasedNoise normalLinear( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - sampleFactor=10, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = Interpolators.Linear) - annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); - Sources.TimeBasedNoise normalSmooth( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - sampleFactor=10, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = Interpolators.SmoothIdealLowPass) - annotation (Placement(transformation(extent={{-40,40},{-20,60}}))); - Sources.TimeBasedNoise weibullLinear( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - sampleFactor=10, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = Interpolators.Linear) - annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); - Sources.TimeBasedNoise weibullSmooth( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - sampleFactor=10, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = Interpolators.SmoothIdealLowPass) - annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); - Sources.SignalBasedNoise uniformLinear1( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = - Interpolators.Linear, - useTime=false) - annotation (Placement(transformation(extent={{20,-30},{40,-10}}))); - Sources.SignalBasedNoise uniformSmooth1( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = - Interpolators.SmoothIdealLowPass, - useTime=false) - annotation (Placement(transformation(extent={{60,-30},{80,-10}}))); - Sources.SignalBasedNoise normalLinear1( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = - Interpolators.Linear, - useTime=false) - annotation (Placement(transformation(extent={{20,-60},{40,-40}}))); - Sources.SignalBasedNoise normalSmooth1( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = - Interpolators.SmoothIdealLowPass, - useTime=false) - annotation (Placement(transformation(extent={{60,-60},{80,-40}}))); - Sources.SignalBasedNoise weibullLinear1( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = - Interpolators.Linear, - useTime=false) - annotation (Placement(transformation(extent={{20,-90},{40,-70}}))); - Sources.SignalBasedNoise weibullSmooth1( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - y_min=-1, - y_max=3, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile, - redeclare package interpolation = - Interpolators.SmoothIdealLowPass, - useTime=false) - annotation (Placement(transformation(extent={{60,-90},{80,-70}}))); - Modelica.Blocks.Sources.Sine sine(freqHz=0.3) - annotation (Placement(transformation(extent={{-16,-10},{4,10}}))); - Modelica.Blocks.Continuous.Der der1 - annotation (Placement(transformation(extent={{-52,16},{-44,24}}))); - Modelica.Blocks.Continuous.Der der2 - annotation (Placement(transformation(extent={{-52,46},{-44,54}}))); - Modelica.Blocks.Continuous.Der der3 - annotation (Placement(transformation(extent={{-52,76},{-44,84}}))); - Modelica.Blocks.Continuous.Der der4 - annotation (Placement(transformation(extent={{-12,76},{-4,84}}))); - Modelica.Blocks.Continuous.Der der5 - annotation (Placement(transformation(extent={{-12,46},{-4,54}}))); - Modelica.Blocks.Continuous.Der der6 - annotation (Placement(transformation(extent={{-12,16},{-4,24}}))); - Modelica.Blocks.Continuous.Der der7 - annotation (Placement(transformation(extent={{46,-24},{54,-16}}))); - Modelica.Blocks.Continuous.Der der8 - annotation (Placement(transformation(extent={{46,-54},{54,-46}}))); - Modelica.Blocks.Continuous.Der der9 - annotation (Placement(transformation(extent={{46,-84},{54,-76}}))); - Modelica.Blocks.Continuous.Der der10 - annotation (Placement(transformation(extent={{86,-24},{94,-16}}))); - Modelica.Blocks.Continuous.Der der11 - annotation (Placement(transformation(extent={{86,-54},{94,-46}}))); - Modelica.Blocks.Continuous.Der der12 - annotation (Placement(transformation(extent={{86,-84},{94,-76}}))); -equation - connect(sine.y, uniformLinear1.u) annotation (Line( - points={{5,0},{10,0},{10,-20},{18,-20}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(sine.y, normalLinear1.u) annotation (Line( - points={{5,0},{10,0},{10,-50},{18,-50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(sine.y, weibullLinear1.u) annotation (Line( - points={{5,0},{10,0},{10,-80},{18,-80}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(sine.y, uniformSmooth1.u) annotation (Line( - points={{5,0},{50,0},{50,-20},{58,-20}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(sine.y, normalSmooth1.u) annotation (Line( - points={{5,0},{50,0},{50,-50},{58,-50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(sine.y, weibullSmooth1.u) annotation (Line( - points={{5,0},{50,0},{50,-80},{58,-80}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(weibullLinear.y, der1.u) annotation (Line( - points={{-59,20},{-52.8,20}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(normalLinear.y, der2.u) annotation (Line( - points={{-59,50},{-52.8,50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(uniformLinear.y, der3.u) annotation (Line( - points={{-59,80},{-52.8,80}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(uniformSmooth.y, der4.u) annotation (Line( - points={{-19,80},{-12.8,80}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(normalSmooth.y, der5.u) annotation (Line( - points={{-19,50},{-12.8,50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(weibullSmooth.y, der6.u) annotation (Line( - points={{-19,20},{-12.8,20}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(uniformLinear1.y, der7.u) annotation (Line( - points={{41,-20},{45.2,-20}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(normalLinear1.y, der8.u) annotation (Line( - points={{41,-50},{45.2,-50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(weibullLinear1.y, der9.u) annotation (Line( - points={{41,-80},{45.2,-80}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(uniformSmooth1.y, der10.u) annotation (Line( - points={{81,-20},{85.2,-20}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(normalSmooth1.y, der11.u) annotation (Line( - points={{81,-50},{85.2,-50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(weibullSmooth1.y, der12.u) annotation (Line( - points={{81,-80},{85.2,-80}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics)); -end Derivatives; diff --git a/Noise 1.0 Beta.1/Examples/FrequencyShaping.mo b/Noise 1.0 Beta.1/Examples/FrequencyShaping.mo deleted file mode 100644 index e16a5226..00000000 --- a/Noise 1.0 Beta.1/Examples/FrequencyShaping.mo +++ /dev/null @@ -1,62 +0,0 @@ -within Noise.Examples; -model FrequencyShaping - "Demonstrates shaping of the frequency content with a convolution filter" - extends Modelica.Icons.Example; - Noise.Sources.TimeBasedNoise filteredNoise( - useAutomaticLocalSeed=false, - y_min=-1, - y_max=3, - sampleFactor=10, - redeclare package interpolation = Noise.Interpolators.FirstOrder, - samplePeriod=0.1) - annotation (Placement(transformation(extent={{-60,40},{-40,60}}))); - inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed(useAutomaticSeed= - false) annotation (Placement(transformation(extent={{60,60},{80,80}}))); - Noise.Sources.TimeBasedNoise rawNoise( - useAutomaticLocalSeed=false, - y_min=-1, - y_max=3, - sampleFactor=10, - samplePeriod=filteredNoise.samplePeriod) - annotation (Placement(transformation(extent={{-60,-40},{-40,-20}}))); - Modelica.Blocks.Continuous.FirstOrder firstOrder( - k=filteredNoise.interpolation.k, - T=filteredNoise.interpolation.T, - initType=Modelica.Blocks.Types.Init.InitialState) - annotation (Placement(transformation(extent={{-20,-40},{0,-20}}))); - Modelica.Blocks.Continuous.Der derConvolution - annotation (Placement(transformation(extent={{20,40},{40,60}}))); - Modelica.Blocks.Continuous.Der derFilter - annotation (Placement(transformation(extent={{20,-40},{40,-20}}))); - Noise.Sources.TimeBasedNoise tabulatedNoise( - useAutomaticLocalSeed=false, - y_min=-1, - y_max=3, - redeclare package interpolation = Noise.Interpolators.StepResponse, - sampleFactor=10, - samplePeriod=0.1) - annotation (Placement(transformation(extent={{-60,0},{-40,20}}))); - Modelica.Blocks.Continuous.Der derTabulated - annotation (Placement(transformation(extent={{20,0},{40,20}}))); - Modelica.Blocks.Sources.RealExpression realExpression(y=tabulatedNoise.interpolation.suggestedSamplePeriod) - annotation (Placement(transformation(extent={{-36,-84},{-16,-64}}))); -equation - connect(rawNoise.y, firstOrder.u) annotation (Line( - points={{-39,-30},{-22,-30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(firstOrder.y, derFilter.u) annotation (Line( - points={{1,-30},{18,-30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(derConvolution.u, filteredNoise.y) annotation (Line( - points={{18,50},{-39,50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(derTabulated.u, tabulatedNoise.y) annotation (Line( - points={{18,10},{-39,10}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics)); -end FrequencyShaping; diff --git a/Noise 1.0 Beta.1/Examples/InterpolateRandomNumbers.mo b/Noise 1.0 Beta.1/Examples/InterpolateRandomNumbers.mo deleted file mode 100644 index 650dca3a..00000000 --- a/Noise 1.0 Beta.1/Examples/InterpolateRandomNumbers.mo +++ /dev/null @@ -1,68 +0,0 @@ -within Noise.Examples; -model InterpolateRandomNumbers - "Interpolate random numbers with the various interpolators" - extends Modelica.Icons.Example; - - parameter Modelica.SIunits.Time samplePeriod = 1.0 - "Sample period for the generation of random numbers"; - parameter Integer seed = 614657 "Seed to initialize random number generator"; - -protected - final parameter Integer id = Modelica_Noise.Math.Random.Utilities.initializeImpureRandom( - seed) - "An identifier to ensure initialization of the impure random number generator"; -public - parameter Real r[100](each fixed = false) "Random number buffer"; -initial algorithm - for i in 1:100 loop - r[i] := Modelica_Noise.Math.Random.Utilities.impureRandom(id); - end for; - -public - Real offset "The offset for interpolation"; - Real rConstant "Constantly interpolated random number"; - Real rLinear "Linearly interpolated random number"; - Real rSmooth "Smoothly inteprolated random number"; -equation - offset = mod(time / samplePeriod, 90) + 5.0; - rConstant =Noise.Interpolators.Constant.interpolate(buffer=r, offset=offset); - rLinear =Noise.Interpolators.Linear.interpolate(buffer=r, offset=offset); - rSmooth =Noise.Interpolators.SmoothIdealLowPass.interpolate(buffer=r, - offset=offset); - - annotation (experiment(StopTime=20, Interval=2e-2), - Documentation(info=" -

-This example demonstrates how to use the interpolators -of package Math.Random.Interpolators in a Modelica model. -The example uses the impure random function to generate a series of random numbers. -These are then interpolated piece-wise constantly, linearly and using the smooth interpolation of truncated ideal low-pass. -Simulations results are shown in the figure below: -

- -

- -

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-"), - __Dymola_experimentSetupOutput); -end InterpolateRandomNumbers; diff --git a/Noise 1.0 Beta.1/Examples/Interpolation.mo b/Noise 1.0 Beta.1/Examples/Interpolation.mo deleted file mode 100644 index d5908e53..00000000 --- a/Noise 1.0 Beta.1/Examples/Interpolation.mo +++ /dev/null @@ -1,155 +0,0 @@ -within Noise.Examples; -model Interpolation "Tests all interpolators" - extends Modelica.Icons.Example; - inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed(useAutomaticSeed= - false) annotation (Placement(transformation(extent={{60,60},{80,80}}))); - Sources.TimeBasedNoise - constantNoise( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - sampleFactor=10, - redeclare package interpolation = Noise.Interpolators.Constant, - y_min=-1, - y_max=3) annotation (Placement(transformation(extent={{-60,70},{-40,90}}))); - Sources.TimeBasedNoise - linearNoise( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - sampleFactor=10, - y_min=-1, - y_max=3, - redeclare package interpolation = Noise.Interpolators.Linear) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Sources.TimeBasedNoise - smoothNoise( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - redeclare package interpolation = Noise.Interpolators.SmoothIdealLowPass, - y_min=-1, - y_max=3, - sampleFactor=10) - annotation (Placement(transformation(extent={{-60,-30},{-40,-10}}))); - Sources.TimeBasedNoise filteredNoise( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - y_min=-1, - y_max=3, - sampleFactor=10, - redeclare package interpolation = Noise.Interpolators.FirstOrder) - annotation (Placement(transformation(extent={{-60,-80},{-40,-60}}))); - Modelica.Blocks.Continuous.Der derFiltered - annotation (Placement(transformation(extent={{0,-92},{20,-72}}))); - Modelica.Blocks.Continuous.FirstOrder filteredFiltered(T=0.00001, y_start=0.2, - initType=Modelica.Blocks.Types.Init.InitialState) - annotation (Placement(transformation(extent={{-20,-68},{0,-48}}))); - Modelica.Blocks.Continuous.Der derFilteredFiltered - annotation (Placement(transformation(extent={{20,-68},{40,-48}}))); - Modelica.Blocks.Continuous.Der derLinear - annotation (Placement(transformation(extent={{0,8},{20,28}}))); - Modelica.Blocks.Continuous.Filter linearFiltered( - y_start=0.2, - f_cut=1e5, - order=2) annotation (Placement(transformation(extent={{-20,32},{0,52}}))); - Modelica.Blocks.Continuous.Der derLinearFiltered - annotation (Placement(transformation(extent={{20,32},{40,52}}))); - Modelica.Blocks.Continuous.Der derSmooth - annotation (Placement(transformation(extent={{0,-42},{20,-22}}))); - Modelica.Blocks.Continuous.Filter smoothFiltered( - y_start=0.2, - f_cut=1e5, - order=2) annotation (Placement(transformation(extent={{-20,-18},{0,2}}))); - Modelica.Blocks.Continuous.Der derSmoothFiltered - annotation (Placement(transformation(extent={{20,-18},{40,2}}))); - Sources.TimeBasedNoise stepNoise( - useAutomaticLocalSeed=false, - samplePeriod=0.1, - y_min=-1, - y_max=3, - sampleFactor=10, - redeclare package interpolation = Noise.Interpolators.StepResponse) - annotation (Placement(transformation(extent={{-60,-130},{-40,-110}}))); - Modelica.Blocks.Continuous.FirstOrder stepFiltered(T=0.00001, y_start=0.2, - initType=Modelica.Blocks.Types.Init.InitialState) - annotation (Placement(transformation(extent={{-20,-118},{0,-98}}))); - Modelica.Blocks.Continuous.Der derStepFiltered - annotation (Placement(transformation(extent={{20,-118},{40,-98}}))); - Modelica.Blocks.Continuous.Der derStep - annotation (Placement(transformation(extent={{0,-140},{20,-120}}))); -equation - connect(filteredFiltered.y, derFilteredFiltered.u) annotation (Line( - points={{1,-58},{18,-58}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(filteredFiltered.u, filteredNoise.y) annotation (Line( - points={{-22,-58},{-28,-58},{-28,-70},{-39,-70}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(derFiltered.u, filteredNoise.y) annotation (Line( - points={{-2,-82},{-28,-82},{-28,-70},{-39,-70}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(linearFiltered.u, linearNoise.y) annotation (Line( - points={{-22,42},{-30,42},{-30,30},{-39,30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(linearFiltered.y, derLinearFiltered.u) annotation (Line( - points={{1,42},{18,42}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(derLinear.u, linearNoise.y) annotation (Line( - points={{-2,18},{-30,18},{-30,30},{-39,30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(smoothFiltered.y, derSmoothFiltered.u) annotation (Line( - points={{1,-8},{18,-8}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(smoothFiltered.u, smoothNoise.y) annotation (Line( - points={{-22,-8},{-32,-8},{-32,-20},{-39,-20}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(derSmooth.u, smoothNoise.y) annotation (Line( - points={{-2,-32},{-32,-32},{-32,-20},{-39,-20}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(stepFiltered.y, derStepFiltered.u) annotation (Line( - points={{1,-108},{18,-108}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(stepFiltered.u, stepNoise.y) annotation (Line( - points={{-22,-108},{-28,-108},{-28,-120},{-39,-120}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(derStep.u, stepNoise.y) annotation (Line( - points={{-2,-130},{-28,-130},{-28,-120},{-39,-120}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (experiment(StopTime=2), - Documentation(info=" -

This example demonstrates the different interpolation methods that can be selected for a Noise block.All the blocks use samplePeriod = 0.1 s and generated uniform noise in the band y_min=-1 .. y_max=3. Furhtermore, all blocks use the same fixedLocalSeed, so all blocks generate exactly the same random numbers at the sample instants 0 s, 0.1 s, 0.2 s, ... However, these values are differently interpolated as shown in the next diagram:

-
-

As can be seen, constant (constantNoise.y) and linear (linearNoise.y) interpolation respects the defined band -1 .. 3. Instead, smooth interpolation with the sinc function (smoothNoise.y) may violate the band slightly in order to be able to smoothly interpolate the random values at the sample instants. In practical applications, this is not an issue because the exact band of the noise is usually not exactly known.

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-"),Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -140},{100,100}}), graphics), Icon(coordinateSystem(extent={{-100, - -140},{100,100}}))); -end Interpolation; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/FilterAndConvolution.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/FilterAndConvolution.mo deleted file mode 100644 index d91c9d27..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/FilterAndConvolution.mo +++ /dev/null @@ -1,101 +0,0 @@ -within Noise.Examples.RailIrregularities.Comparisons; -model FilterAndConvolution - "Compares implementation with filter and convolution" - extends Modelica.Icons.Example; - - constant Real convolutionResolution=MinimumPhaseInterpolator.T[2] - - MinimumPhaseInterpolator.T[1]; - - parameter Boolean doMinimum = true "Calculate minimum phase filter?"; - parameter Boolean doZero = false "Calculate zero phase filter?"; - parameter Boolean doFilter = true "Calculate state space phase filter?"; - parameter Boolean doTime = false "Calculate time-based noise?"; - - parameter Modelica.SIunits.Duration samplePeriod = 0.1 "Common sample period"; - - inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed(useAutomaticSeed=false) - annotation (Placement(transformation(extent={{60,60},{80,80}}))); - Sources.SignalBasedNoise spaceDomainNoiseMinimum( - useTime=false, - redeclare package interpolation = - Noise.Examples.RailIrregularities.MinimumPhaseInterpolator, - samplePeriod=0.4, - y_min=-1e10, - y_max=+1e10, - redeclare function distribution = - Modelica_Noise.Math.TruncatedDistributions.Normal.quantile (mu=0, sigma= - sqrt(0.5)/sqrt(samplePeriod)), - useAutomaticLocalSeed=false) if doMinimum - annotation (Placement(transformation(extent={{-20,20},{0,40}}))); - - Modelica.Blocks.Continuous.Integrator position(y_start=123) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Modelica.Blocks.Sources.Constant velocity(k=100) - annotation (Placement(transformation(extent={{-100,20},{-80,40}}))); - Modelica.Blocks.Continuous.TransferFunction spaceDomainFilter(b={2.7542724e-04, - 4.5134777e-03} ./ {velocity.k,1}, a={1.0000000e+00,3.0670519e+00,2.2183340e-01} - ./ {velocity.k^2,velocity.k,1}) if doFilter - annotation (Placement(transformation(extent={{20,-20},{40,0}}))); - Sources.SignalBasedNoise spaceDomainNoiseWhite( - useTime=false, - y_min=-1e10, - y_max=+1e10, - useAutomaticLocalSeed=false, - samplePeriod=samplePeriod, - redeclare function distribution = - Modelica_Noise.Math.TruncatedDistributions.Normal.quantile (mu=0, sigma= - sqrt(0.5)/sqrt(samplePeriod))) if doFilter - annotation (Placement(transformation(extent={{-20,-20},{0,0}}))); - Sources.SignalBasedNoise spaceDomainNoiseZero( - useTime=false, - y_min=-1e10, - y_max=+1e10, - useAutomaticLocalSeed=false, - samplePeriod=samplePeriod, - redeclare package interpolation = - Noise.Examples.RailIrregularities.ZeroPhaseInterpolator, - redeclare function distribution = - Modelica_Noise.Math.TruncatedDistributions.Normal.quantile (mu=0, sigma= - sqrt(0.5)/sqrt(samplePeriod))) if doZero - annotation (Placement(transformation(extent={{-20,60},{0,80}}))); - Modelica.Blocks.Continuous.TransferFunction timeDomainFilter(b={2.7542724e-04, - 4.5134777e-03} ./ {velocity.k,1}, a={1.0000000e+00,3.0670519e+00, - 2.2183340e-01} ./ {velocity.k^2,velocity.k,1}) if - doTime - annotation (Placement(transformation(extent={{20,-60},{40,-40}}))); - Modelica_Noise.Blocks.Noise.BandLimitedWhiteNoise bandLimitedWhiteNoise( - samplePeriod=samplePeriod/velocity.k, noisePower= - 1/(velocity.k)) if doTime - annotation (Placement(transformation(extent={{-20,-60},{0,-40}}))); -equation - connect(velocity.y, position.u) annotation (Line( - points={{-79,30},{-62,30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(position.y, spaceDomainNoiseMinimum.u) annotation (Line( - points={{-39,30},{-22,30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(spaceDomainNoiseWhite.u, position.y) annotation (Line( - points={{-22,-10},{-30,-10},{-30,30},{-39,30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(spaceDomainFilter.u, spaceDomainNoiseWhite.y) annotation (Line( - points={{18,-10},{1,-10}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(spaceDomainNoiseZero.u, position.y) annotation (Line( - points={{-22,70},{-30,70},{-30,30},{-39,30}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(bandLimitedWhiteNoise.y, timeDomainFilter.u) annotation (Line( - points={{1,-50},{18,-50}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), experiment( - StopTime=20, - Interval=0.01, - Tolerance=0.001), - __Dymola_experimentSetupOutput); -end FilterAndConvolution; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/MinimumAndZeroPhase.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/MinimumAndZeroPhase.mo deleted file mode 100644 index 7c2f6002..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/MinimumAndZeroPhase.mo +++ /dev/null @@ -1,9 +0,0 @@ -within Noise.Examples.RailIrregularities.Comparisons; -model MinimumAndZeroPhase - "Compares implementation of convolution with minim and zero phase filters" - extends FilterAndConvolution(doMinimum = true, doZero = true, doFilter = false, doTime = false); - annotation (experiment( - StopTime=20, - Interval=0.0001, - Tolerance=0.001), __Dymola_experimentSetupOutput); -end MinimumAndZeroPhase; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/SpaceAndTimeDomain.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/SpaceAndTimeDomain.mo deleted file mode 100644 index 4e27f86a..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/SpaceAndTimeDomain.mo +++ /dev/null @@ -1,8 +0,0 @@ -within Noise.Examples.RailIrregularities.Comparisons; -model SpaceAndTimeDomain "Compares implementation in space and time domain" - extends FilterAndConvolution(doMinimum = true, doZero = false, doFilter = false, doTime = true); - annotation (experiment( - StopTime=20, - Interval=0.01, - Tolerance=0.001), __Dymola_experimentSetupOutput); -end SpaceAndTimeDomain; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/package.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/package.mo deleted file mode 100644 index 2b90b455..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/package.mo +++ /dev/null @@ -1,6 +0,0 @@ -within Noise.Examples.RailIrregularities; -package Comparisons "Contains comparisons between different implementations" -extends Modelica.Icons.ExamplesPackage; - - -end Comparisons; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/package.order b/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/package.order deleted file mode 100644 index 93cbab53..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Comparisons/package.order +++ /dev/null @@ -1,3 +0,0 @@ -FilterAndConvolution -SpaceAndTimeDomain -MinimumAndZeroPhase diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Interpolator/package.order b/Noise 1.0 Beta.1/Examples/RailIrregularities/Interpolator/package.order deleted file mode 100644 index e69de29b..00000000 diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/MinimumPhaseInterpolator/package.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/MinimumPhaseInterpolator/package.mo deleted file mode 100644 index b74d6cea..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/MinimumPhaseInterpolator/package.mo +++ /dev/null @@ -1,12 +0,0 @@ -within Noise.Examples.RailIrregularities; -package MinimumPhaseInterpolator "Provides a filter function for rail irregularities (minimum phase)" - - - extends Interpolators.StepResponse( - T = { 0.0000000e+00, 1.0000000e-01, 2.0000000e-01, 3.0000000e-01, 4.0000000e-01, 5.0000000e-01, 6.0000000e-01, 7.0000000e-01, 8.0000000e-01, 9.0000000e-01, 1.0000000e+00, 1.1000000e+00, 1.2000000e+00, 1.3000000e+00, 1.4000000e+00, 1.5000000e+00, 1.6000000e+00, 1.7000000e+00, 1.8000000e+00, 1.9000000e+00, 2.0000000e+00, 2.1000000e+00, 2.2000000e+00, 2.3000000e+00, 2.4000000e+00, 2.5000000e+00, 2.6000000e+00, 2.7000000e+00, 2.8000000e+00, 2.9000000e+00, 3.0000000e+00, 3.1000000e+00, 3.2000000e+00, 3.3000000e+00, 3.4000000e+00, 3.5000000e+00, 3.6000000e+00, 3.7000000e+00, 3.8000000e+00, 3.9000000e+00, 4.0000000e+00, 4.1000000e+00, 4.2000000e+00, 4.3000000e+00, 4.4000000e+00, 4.5000000e+00, 4.6000000e+00, 4.7000000e+00, 4.8000000e+00, 4.9000000e+00, 5.0000000e+00, 5.1000000e+00, 5.2000000e+00, 5.3000000e+00, 5.4000000e+00, 5.5000000e+00, 5.6000000e+00, 5.7000000e+00, 5.8000000e+00, 5.9000000e+00, 6.0000000e+00, 6.1000000e+00, 6.2000000e+00, 6.3000000e+00, 6.4000000e+00, 6.5000000e+00, 6.6000000e+00, 6.7000000e+00, 6.8000000e+00, 6.9000000e+00, 7.0000000e+00, 7.1000000e+00, 7.2000000e+00, 7.3000000e+00, 7.4000000e+00, 7.5000000e+00, 7.6000000e+00, 7.7000000e+00, 7.8000000e+00, 7.9000000e+00, 8.0000000e+00, 8.1000000e+00, 8.2000000e+00, 8.3000000e+00, 8.4000000e+00, 8.5000000e+00, 8.6000000e+00, 8.7000000e+00, 8.8000000e+00, 8.9000000e+00, 9.0000000e+00, 9.1000000e+00, 9.2000000e+00, 9.3000000e+00, 9.4000000e+00, 9.5000000e+00, 9.6000000e+00, 9.7000000e+00, 9.8000000e+00, 9.9000000e+00, 1.0000000e+01, 1.0100000e+01, 1.0200000e+01, 1.0300000e+01, 1.0400000e+01, 1.0500000e+01, 1.0600000e+01, 1.0700000e+01, 1.0800000e+01, 1.0900000e+01, 1.1000000e+01, 1.1100000e+01, 1.1200000e+01, 1.1300000e+01, 1.1400000e+01, 1.1500000e+01, 1.1600000e+01, 1.1700000e+01, 1.1800000e+01, 1.1900000e+01, 1.2000000e+01, 1.2100000e+01, 1.2200000e+01, 1.2300000e+01, 1.2400000e+01, 1.2500000e+01, 1.2600000e+01, 1.2700000e+01, 1.2800000e+01, 1.2900000e+01, 1.3000000e+01, 1.3100000e+01, 1.3200000e+01, 1.3300000e+01, 1.3400000e+01, 1.3500000e+01, 1.3600000e+01, 1.3700000e+01, 1.3800000e+01, 1.3900000e+01, 1.4000000e+01, 1.4100000e+01, 1.4200000e+01, 1.4300000e+01, 1.4400000e+01, 1.4500000e+01, 1.4600000e+01, 1.4700000e+01, 1.4800000e+01, 1.4900000e+01, 1.5000000e+01, 1.5100000e+01, 1.5200000e+01, 1.5300000e+01, 1.5400000e+01, 1.5500000e+01, 1.5600000e+01, 1.5700000e+01, 1.5800000e+01, 1.5900000e+01, 1.6000000e+01, 1.6100000e+01, 1.6200000e+01, 1.6300000e+01, 1.6400000e+01, 1.6500000e+01, 1.6600000e+01, 1.6700000e+01, 1.6800000e+01, 1.6900000e+01, 1.7000000e+01, 1.7100000e+01, 1.7200000e+01, 1.7300000e+01, 1.7400000e+01, 1.7500000e+01, 1.7600000e+01, 1.7700000e+01, 1.7800000e+01, 1.7900000e+01, 1.8000000e+01, 1.8100000e+01, 1.8200000e+01, 1.8300000e+01, 1.8400000e+01, 1.8500000e+01, 1.8600000e+01, 1.8700000e+01, 1.8800000e+01, 1.8900000e+01, 1.9000000e+01, 1.9100000e+01, 1.9200000e+01, 1.9300000e+01, 1.9400000e+01, 1.9500000e+01, 1.9600000e+01, 1.9700000e+01, 1.9800000e+01, 1.9900000e+01, 2.0000000e+01, 2.0100000e+01, 2.0200000e+01, 2.0300000e+01, 2.0400000e+01, 2.0500000e+01, 2.0600000e+01, 2.0700000e+01, 2.0800000e+01, 2.0900000e+01, 2.1000000e+01, 2.1100000e+01, 2.1200000e+01, 2.1300000e+01, 2.1400000e+01, 2.1500000e+01, 2.1600000e+01, 2.1700000e+01, 2.1800000e+01, 2.1900000e+01, 2.2000000e+01, 2.2100000e+01, 2.2200000e+01, 2.2300000e+01, 2.2400000e+01, 2.2500000e+01, 2.2600000e+01, 2.2700000e+01, 2.2800000e+01, 2.2900000e+01, 2.3000000e+01, 2.3100000e+01, 2.3200000e+01, 2.3300000e+01, 2.3400000e+01, 2.3500000e+01, 2.3600000e+01, 2.3700000e+01, 2.3800000e+01, 2.3900000e+01, 2.4000000e+01, 2.4100000e+01, 2.4200000e+01, 2.4300000e+01, 2.4400000e+01, 2.4500000e+01, 2.4600000e+01, 2.4700000e+01, 2.4800000e+01, 2.4900000e+01, 2.5000000e+01, 2.5100000e+01, 2.5200000e+01, 2.5300000e+01, 2.5400000e+01, 2.5500000e+01, 2.5600000e+01, 2.5700000e+01, 2.5800000e+01, 2.5900000e+01, 2.6000000e+01, 2.6100000e+01, 2.6200000e+01, 2.6300000e+01, 2.6400000e+01, 2.6500000e+01, 2.6600000e+01, 2.6700000e+01, 2.6800000e+01, 2.6900000e+01, 2.7000000e+01, 2.7100000e+01, 2.7200000e+01, 2.7300000e+01, 2.7400000e+01, 2.7500000e+01, 2.7600000e+01, 2.7700000e+01, 2.7800000e+01, 2.7900000e+01, 2.8000000e+01, 2.8100000e+01, 2.8200000e+01, 2.8300000e+01, 2.8400000e+01, 2.8500000e+01, 2.8600000e+01, 2.8700000e+01, 2.8800000e+01, 2.8900000e+01, 2.9000000e+01, 2.9100000e+01, 2.9200000e+01, 2.9300000e+01, 2.9400000e+01, 2.9500000e+01, 2.9600000e+01, 2.9700000e+01, 2.9800000e+01, 2.9900000e+01, 3.0000000e+01, 3.0100000e+01, 3.0200000e+01, 3.0300000e+01, 3.0400000e+01, 3.0500000e+01, 3.0600000e+01, 3.0700000e+01, 3.0800000e+01, 3.0900000e+01, 3.1000000e+01, 3.1100000e+01, 3.1200000e+01, 3.1300000e+01, 3.1400000e+01, 3.1500000e+01, 3.1600000e+01, 3.1700000e+01, 3.1800000e+01, 3.1900000e+01, 3.2000000e+01, 3.2100000e+01, 3.2200000e+01, 3.2300000e+01, 3.2400000e+01, 3.2500000e+01, 3.2600000e+01, 3.2700000e+01, 3.2800000e+01, 3.2900000e+01, 3.3000000e+01, 3.3100000e+01, 3.3200000e+01, 3.3300000e+01, 3.3400000e+01, 3.3500000e+01, 3.3600000e+01, 3.3700000e+01, 3.3800000e+01, 3.3900000e+01, 3.4000000e+01, 3.4100000e+01, 3.4200000e+01, 3.4300000e+01, 3.4400000e+01, 3.4500000e+01, 3.4600000e+01, 3.4700000e+01, 3.4800000e+01, 3.4900000e+01, 3.5000000e+01, 3.5100000e+01, 3.5200000e+01, 3.5300000e+01, 3.5400000e+01, 3.5500000e+01, 3.5600000e+01, 3.5700000e+01, 3.5800000e+01, 3.5900000e+01, 3.6000000e+01, 3.6100000e+01, 3.6200000e+01, 3.6300000e+01, 3.6400000e+01, 3.6500000e+01, 3.6600000e+01, 3.6700000e+01, 3.6800000e+01, 3.6900000e+01, 3.7000000e+01, 3.7100000e+01, 3.7200000e+01, 3.7300000e+01, 3.7400000e+01, 3.7500000e+01, 3.7600000e+01, 3.7700000e+01, 3.7800000e+01, 3.7900000e+01, 3.8000000e+01, 3.8100000e+01, 3.8200000e+01, 3.8300000e+01, 3.8400000e+01, 3.8500000e+01, 3.8600000e+01, 3.8700000e+01, 3.8800000e+01, 3.8900000e+01, 3.9000000e+01, 3.9100000e+01, 3.9200000e+01, 3.9300000e+01, 3.9400000e+01, 3.9500000e+01, 3.9600000e+01, 3.9700000e+01, 3.9800000e+01, 3.9900000e+01, 4.0000000e+01, 4.0100000e+01, 4.0200000e+01, 4.0300000e+01, 4.0400000e+01, 4.0500000e+01, 4.0600000e+01, 4.0700000e+01, 4.0800000e+01, 4.0900000e+01, 4.1000000e+01, 4.1100000e+01, 4.1200000e+01, 4.1300000e+01, 4.1400000e+01, 4.1500000e+01, 4.1600000e+01, 4.1700000e+01, 4.1800000e+01, 4.1900000e+01, 4.2000000e+01, 4.2100000e+01, 4.2200000e+01, 4.2300000e+01, 4.2400000e+01, 4.2500000e+01, 4.2600000e+01, 4.2700000e+01, 4.2800000e+01, 4.2900000e+01, 4.3000000e+01, 4.3100000e+01, 4.3200000e+01, 4.3300000e+01, 4.3400000e+01, 4.3500000e+01, 4.3600000e+01, 4.3700000e+01, 4.3800000e+01, 4.3900000e+01, 4.4000000e+01, 4.4100000e+01, 4.4200000e+01, 4.4300000e+01, 4.4400000e+01, 4.4500000e+01, 4.4600000e+01, 4.4700000e+01, 4.4800000e+01, 4.4900000e+01, 4.5000000e+01, 4.5100000e+01, 4.5200000e+01, 4.5300000e+01, 4.5400000e+01, 4.5500000e+01, 4.5600000e+01, 4.5700000e+01, 4.5800000e+01, 4.5900000e+01, 4.6000000e+01, 4.6100000e+01, 4.6200000e+01, 4.6300000e+01, 4.6400000e+01, 4.6500000e+01, 4.6600000e+01, 4.6700000e+01, 4.6800000e+01, 4.6900000e+01, 4.7000000e+01, 4.7100000e+01, 4.7200000e+01, 4.7300000e+01, 4.7400000e+01, 4.7500000e+01, 4.7600000e+01, 4.7700000e+01, 4.7800000e+01, 4.7900000e+01, 4.8000000e+01, 4.8100000e+01, 4.8200000e+01, 4.8300000e+01, 4.8400000e+01, 4.8500000e+01, 4.8600000e+01, 4.8700000e+01, 4.8800000e+01, 4.8900000e+01, 4.9000000e+01, 4.9100000e+01, 4.9200000e+01, 4.9300000e+01, 4.9400000e+01, 4.9500000e+01, 4.9600000e+01, 4.9700000e+01, 4.9800000e+01, 4.9900000e+01, 5.0000000e+01, 5.0100000e+01, 5.0200000e+01, 5.0300000e+01, 5.0400000e+01, 5.0500000e+01, 5.0600000e+01, 5.0700000e+01, 5.0800000e+01, 5.0900000e+01, 5.1000000e+01, 5.1100000e+01, 5.1200000e+01, 5.1300000e+01, 5.1400000e+01, 5.1500000e+01, 5.1600000e+01, 5.1700000e+01, 5.1800000e+01, 5.1900000e+01, 5.2000000e+01, 5.2100000e+01, 5.2200000e+01, 5.2300000e+01, 5.2400000e+01, 5.2500000e+01, 5.2600000e+01, 5.2700000e+01, 5.2800000e+01, 5.2900000e+01, 5.3000000e+01, 5.3100000e+01, 5.3200000e+01, 5.3300000e+01, 5.3400000e+01, 5.3500000e+01, 5.3600000e+01, 5.3700000e+01, 5.3800000e+01, 5.3900000e+01, 5.4000000e+01, 5.4100000e+01, 5.4200000e+01, 5.4300000e+01, 5.4400000e+01, 5.4500000e+01, 5.4600000e+01, 5.4700000e+01, 5.4800000e+01, 5.4900000e+01, 5.5000000e+01, 5.5100000e+01, 5.5200000e+01, 5.5300000e+01, 5.5400000e+01, 5.5500000e+01, 5.5600000e+01, 5.5700000e+01, 5.5800000e+01, 5.5900000e+01, 5.6000000e+01, 5.6100000e+01, 5.6200000e+01, 5.6300000e+01, 5.6400000e+01, 5.6500000e+01, 5.6600000e+01, 5.6700000e+01, 5.6800000e+01, 5.6900000e+01, 5.7000000e+01, 5.7100000e+01, 5.7200000e+01, 5.7300000e+01, 5.7400000e+01, 5.7500000e+01, 5.7600000e+01, 5.7700000e+01, 5.7800000e+01, 5.7900000e+01, 5.8000000e+01, 5.8100000e+01, 5.8200000e+01, 5.8300000e+01, 5.8400000e+01, 5.8500000e+01, 5.8600000e+01, 5.8700000e+01, 5.8800000e+01, 5.8900000e+01, 5.9000000e+01, 5.9100000e+01, 5.9200000e+01, 5.9300000e+01, 5.9400000e+01, 5.9500000e+01, 5.9600000e+01, 5.9700000e+01, 5.9800000e+01, 5.9900000e+01, 6.0000000e+01, 6.0100000e+01, 6.0200000e+01, 6.0300000e+01, 6.0400000e+01, 6.0500000e+01, 6.0600000e+01, 6.0700000e+01, 6.0800000e+01, 6.0900000e+01, 6.1000000e+01, 6.1100000e+01, 6.1200000e+01, 6.1300000e+01, 6.1400000e+01, 6.1500000e+01, 6.1600000e+01, 6.1700000e+01, 6.1800000e+01, 6.1900000e+01, 6.2000000e+01, 6.2100000e+01, 6.2200000e+01, 6.2300000e+01, 6.2400000e+01, 6.2500000e+01, 6.2600000e+01, 6.2700000e+01, 6.2800000e+01, 6.2900000e+01, 6.3000000e+01, 6.3100000e+01, 6.3200000e+01, 6.3300000e+01, 6.3400000e+01, 6.3500000e+01, 6.3600000e+01, 6.3700000e+01, 6.3800000e+01, 6.3900000e+01, 6.4000000e+01, 6.4100000e+01, 6.4200000e+01, 6.4300000e+01, 6.4400000e+01, 6.4500000e+01, 6.4600000e+01, 6.4700000e+01, 6.4800000e+01, 6.4900000e+01, 6.5000000e+01, 6.5100000e+01, 6.5200000e+01, 6.5300000e+01, 6.5400000e+01, 6.5500000e+01, 6.5600000e+01, 6.5700000e+01, 6.5800000e+01, 6.5900000e+01, 6.6000000e+01, 6.6100000e+01, 6.6200000e+01, 6.6300000e+01, 6.6400000e+01, 6.6500000e+01, 6.6600000e+01, 6.6700000e+01, 6.6800000e+01, 6.6900000e+01, 6.7000000e+01, 6.7100000e+01, 6.7200000e+01, 6.7300000e+01, 6.7400000e+01, 6.7500000e+01, 6.7600000e+01, 6.7700000e+01, 6.7800000e+01, 6.7900000e+01, 6.8000000e+01, 6.8100000e+01, 6.8200000e+01, 6.8300000e+01, 6.8400000e+01, 6.8500000e+01, 6.8600000e+01, 6.8700000e+01, 6.8800000e+01, 6.8900000e+01, 6.9000000e+01, 6.9100000e+01, 6.9200000e+01, 6.9300000e+01, 6.9400000e+01, 6.9500000e+01, 6.9600000e+01, 6.9700000e+01, 6.9800000e+01, 6.9900000e+01, 7.0000000e+01, 7.0100000e+01, 7.0200000e+01, 7.0300000e+01, 7.0400000e+01, 7.0500000e+01, 7.0600000e+01, 7.0700000e+01, 7.0800000e+01, 7.0900000e+01, 7.1000000e+01, 7.1100000e+01, 7.1200000e+01, 7.1300000e+01, 7.1400000e+01, 7.1500000e+01, 7.1600000e+01, 7.1700000e+01, 7.1800000e+01, 7.1900000e+01, 7.2000000e+01, 7.2100000e+01, 7.2200000e+01, 7.2300000e+01, 7.2400000e+01, 7.2500000e+01, 7.2600000e+01, 7.2700000e+01, 7.2800000e+01, 7.2900000e+01, 7.3000000e+01, 7.3100000e+01, 7.3200000e+01, 7.3300000e+01, 7.3400000e+01, 7.3500000e+01, 7.3600000e+01, 7.3700000e+01, 7.3800000e+01, 7.3900000e+01, 7.4000000e+01, 7.4100000e+01, 7.4200000e+01, 7.4300000e+01, 7.4400000e+01, 7.4500000e+01, 7.4600000e+01, 7.4700000e+01, 7.4800000e+01, 7.4900000e+01, 7.5000000e+01, 7.5100000e+01, 7.5200000e+01, 7.5300000e+01, 7.5400000e+01, 7.5500000e+01, 7.5600000e+01, 7.5700000e+01, 7.5800000e+01, 7.5900000e+01, 7.6000000e+01, 7.6100000e+01, 7.6200000e+01, 7.6300000e+01, 7.6400000e+01, 7.6500000e+01, 7.6600000e+01, 7.6700000e+01, 7.6800000e+01, 7.6900000e+01, 7.7000000e+01, 7.7100000e+01, 7.7200000e+01, 7.7300000e+01, 7.7400000e+01, 7.7500000e+01, 7.7600000e+01, 7.7700000e+01, 7.7800000e+01, 7.7900000e+01, 7.8000000e+01, 7.8100000e+01, 7.8200000e+01, 7.8300000e+01, 7.8400000e+01, 7.8500000e+01, 7.8600000e+01, 7.8700000e+01, 7.8800000e+01, 7.8900000e+01, 7.9000000e+01, 7.9100000e+01, 7.9200000e+01, 7.9300000e+01, 7.9400000e+01, 7.9500000e+01, 7.9600000e+01, 7.9700000e+01, 7.9800000e+01, 7.9900000e+01, 8.0000000e+01, 8.0100000e+01, 8.0200000e+01, 8.0300000e+01, 8.0400000e+01, 8.0500000e+01, 8.0600000e+01, 8.0700000e+01, 8.0800000e+01, 8.0900000e+01, 8.1000000e+01, 8.1100000e+01, 8.1200000e+01, 8.1300000e+01, 8.1400000e+01, 8.1500000e+01, 8.1600000e+01, 8.1700000e+01, 8.1800000e+01, 8.1900000e+01, 8.2000000e+01, 8.2100000e+01, 8.2200000e+01, 8.2300000e+01, 8.2400000e+01, 8.2500000e+01, 8.2600000e+01, 8.2700000e+01, 8.2800000e+01, 8.2900000e+01, 8.3000000e+01, 8.3100000e+01, 8.3200000e+01, 8.3300000e+01, 8.3400000e+01, 8.3500000e+01, 8.3600000e+01, 8.3700000e+01, 8.3800000e+01, 8.3900000e+01, 8.4000000e+01, 8.4100000e+01, 8.4200000e+01, 8.4300000e+01, 8.4400000e+01, 8.4500000e+01, 8.4600000e+01, 8.4700000e+01, 8.4800000e+01, 8.4900000e+01, 8.5000000e+01, 8.5100000e+01}, - step = { 0.0000000e+00, 5.4748721e-05, 1.3669502e-04, 2.3594576e-04, 3.4737509e-04, 4.6765124e-04, 5.9429827e-04, 7.2548962e-04, 8.5980984e-04, 9.9616472e-04, 1.1337263e-03, 1.2718827e-03, 1.4101993e-03, 1.5483796e-03, 1.6862062e-03, 1.8235176e-03, 1.9602063e-03, 2.0961932e-03, 2.2313923e-03, 2.3657151e-03, 2.4991084e-03, 2.6315732e-03, 2.7631398e-03, 2.8938253e-03, 3.0236104e-03, 3.1524528e-03, 3.2803213e-03, 3.4072178e-03, 3.5331704e-03, 3.6582123e-03, 3.7823648e-03, 3.9056322e-03, 4.0280049e-03, 4.1494689e-03, 4.2700163e-03, 4.3896486e-03, 4.5083742e-03, 4.6262042e-03, 4.7431516e-03, 4.8592323e-03, 4.9744653e-03, 5.0888668e-03, 5.2024432e-03, 5.3151898e-03, 5.4270976e-03, 5.5381634e-03, 5.6483930e-03, 5.7577981e-03, 5.8663889e-03, 5.9741707e-03, 6.0811443e-03, 6.1873108e-03, 6.2926773e-03, 6.3972578e-03, 6.5010701e-03, 6.6041311e-03, 6.7064519e-03, 6.8080372e-03, 6.9088886e-03, 7.0090072e-03, 7.1083938e-03, 7.2070485e-03, 7.3049708e-03, 7.4021618e-03, 7.4986260e-03, 7.5943713e-03, 7.6894064e-03, 7.7837381e-03, 7.8773709e-03, 7.9703081e-03, 8.0625551e-03, 8.1541212e-03, 8.2450185e-03, 8.3352594e-03, 8.4248527e-03, 8.5138028e-03, 8.6021107e-03, 8.6897769e-03, 8.7768033e-03, 8.8631928e-03, 8.9489484e-03, 9.0340718e-03, 9.1185642e-03, 9.2024273e-03, 9.2856639e-03, 9.3682774e-03, 9.4502713e-03, 9.5316487e-03, 9.6124134e-03, 9.6925709e-03, 9.7721279e-03, 9.8510922e-03, 9.9294708e-03, 1.0007269e-02, 1.0084489e-02, 1.0161136e-02, 1.0237215e-02, 1.0312734e-02, 1.0387700e-02, 1.0462120e-02, 1.0536000e-02, 1.0609343e-02, 1.0682152e-02, 1.0754428e-02, 1.0826176e-02, 1.0897397e-02, 1.0968095e-02, 1.1038271e-02, 1.1107927e-02, 1.1177066e-02, 1.1245690e-02, 1.1313801e-02, 1.1381403e-02, 1.1448496e-02, 1.1515084e-02, 1.1581171e-02, 1.1646761e-02, 1.1711861e-02, 1.1776475e-02, 1.1840605e-02, 1.1904254e-02, 1.1967426e-02, 1.2030126e-02, 1.2092357e-02, 1.2154126e-02, 1.2215436e-02, 1.2276290e-02, 1.2336692e-02, 1.2396647e-02, 1.2456158e-02, 1.2515230e-02, 1.2573868e-02, 1.2632075e-02, 1.2689856e-02, 1.2747215e-02, 1.2804155e-02, 1.2860681e-02, 1.2916795e-02, 1.2972499e-02, 1.3027794e-02, 1.3082683e-02, 1.3137169e-02, 1.3191255e-02, 1.3244944e-02, 1.3298237e-02, 1.3351136e-02, 1.3403643e-02, 1.3455760e-02, 1.3507491e-02, 1.3558838e-02, 1.3609805e-02, 1.3660393e-02, 1.3710606e-02, 1.3760445e-02, 1.3809915e-02, 1.3859017e-02, 1.3907756e-02, 1.3956133e-02, 1.4004152e-02, 1.4051816e-02, 1.4099127e-02, 1.4146090e-02, 1.4192707e-02, 1.4238980e-02, 1.4284911e-02, 1.4330503e-02, 1.4375758e-02, 1.4420681e-02, 1.4465272e-02, 1.4509535e-02, 1.4553472e-02, 1.4597085e-02, 1.4640375e-02, 1.4683346e-02, 1.4726001e-02, 1.4768342e-02, 1.4810372e-02, 1.4852092e-02, 1.4893506e-02, 1.4934615e-02, 1.4975423e-02, 1.5015931e-02, 1.5056140e-02, 1.5096053e-02, 1.5135670e-02, 1.5174994e-02, 1.5214026e-02, 1.5252769e-02, 1.5291222e-02, 1.5329388e-02, 1.5367268e-02, 1.5404864e-02, 1.5442177e-02, 1.5479210e-02, 1.5515965e-02, 1.5552443e-02, 1.5588645e-02, 1.5624574e-02, 1.5660232e-02, 1.5695621e-02, 1.5730742e-02, 1.5765599e-02, 1.5800193e-02, 1.5834526e-02, 1.5868600e-02, 1.5902418e-02, 1.5935983e-02, 1.5969296e-02, 1.6002359e-02, 1.6035175e-02, 1.6067747e-02, 1.6100077e-02, 1.6132168e-02, 1.6164021e-02, 1.6195638e-02, 1.6227022e-02, 1.6258175e-02, 1.6289099e-02, 1.6319796e-02, 1.6350269e-02, 1.6380518e-02, 1.6410546e-02, 1.6440355e-02, 1.6469946e-02, 1.6499321e-02, 1.6528483e-02, 1.6557432e-02, 1.6586170e-02, 1.6614699e-02, 1.6643020e-02, 1.6671134e-02, 1.6699044e-02, 1.6726750e-02, 1.6754254e-02, 1.6781558e-02, 1.6808662e-02, 1.6835568e-02, 1.6862279e-02, 1.6888795e-02, 1.6915117e-02, 1.6941246e-02, 1.6967184e-02, 1.6992932e-02, 1.7018490e-02, 1.7043861e-02, 1.7069045e-02, 1.7094042e-02, 1.7118853e-02, 1.7143479e-02, 1.7167922e-02, 1.7192182e-02, 1.7216261e-02, 1.7240158e-02, 1.7263875e-02, 1.7287413e-02, 1.7310773e-02, 1.7333956e-02, 1.7356964e-02, 1.7379797e-02, 1.7402457e-02, 1.7424945e-02, 1.7447262e-02, 1.7469409e-02, 1.7491389e-02, 1.7513201e-02, 1.7534847e-02, 1.7556329e-02, 1.7577647e-02, 1.7598805e-02, 1.7619802e-02, 1.7640640e-02, 1.7661322e-02, 1.7681847e-02, 1.7702217e-02, 1.7722435e-02, 1.7742501e-02, 1.7762417e-02, 1.7782184e-02, 1.7801803e-02, 1.7821277e-02, 1.7840605e-02, 1.7859791e-02, 1.7878835e-02, 1.7897738e-02, 1.7916501e-02, 1.7935127e-02, 1.7953615e-02, 1.7971968e-02, 1.7990186e-02, 1.8008271e-02, 1.8026223e-02, 1.8044043e-02, 1.8061733e-02, 1.8079293e-02, 1.8096725e-02, 1.8114028e-02, 1.8131205e-02, 1.8148256e-02, 1.8165181e-02, 1.8181982e-02, 1.8198659e-02, 1.8215213e-02, 1.8231645e-02, 1.8247956e-02, 1.8264146e-02, 1.8280216e-02, 1.8296167e-02, 1.8311999e-02, 1.8327713e-02, 1.8343310e-02, 1.8358791e-02, 1.8374155e-02, 1.8389405e-02, 1.8404541e-02, 1.8419564e-02, 1.8434475e-02, 1.8449273e-02, 1.8463961e-02, 1.8478540e-02, 1.8493009e-02, 1.8507370e-02, 1.8521624e-02, 1.8535772e-02, 1.8549813e-02, 1.8563750e-02, 1.8577583e-02, 1.8591312e-02, 1.8604939e-02, 1.8618464e-02, 1.8631888e-02, 1.8645211e-02, 1.8658435e-02, 1.8671561e-02, 1.8684588e-02, 1.8697518e-02, 1.8710350e-02, 1.8723087e-02, 1.8735729e-02, 1.8748277e-02, 1.8760731e-02, 1.8773092e-02, 1.8785361e-02, 1.8797538e-02, 1.8809625e-02, 1.8821622e-02, 1.8833529e-02, 1.8845348e-02, 1.8857080e-02, 1.8868724e-02, 1.8880281e-02, 1.8891753e-02, 1.8903140e-02, 1.8914442e-02, 1.8925660e-02, 1.8936794e-02, 1.8947845e-02, 1.8958815e-02, 1.8969702e-02, 1.8980508e-02, 1.8991234e-02, 1.9001879e-02, 1.9012445e-02, 1.9022932e-02, 1.9033340e-02, 1.9043670e-02, 1.9053922e-02, 1.9064098e-02, 1.9074196e-02, 1.9084218e-02, 1.9094164e-02, 1.9104035e-02, 1.9113831e-02, 1.9123553e-02, 1.9133200e-02, 1.9142774e-02, 1.9152275e-02, 1.9161703e-02, 1.9171059e-02, 1.9180344e-02, 1.9189557e-02, 1.9198700e-02, 1.9207772e-02, 1.9216775e-02, 1.9225709e-02, 1.9234573e-02, 1.9243370e-02, 1.9252099e-02, 1.9260760e-02, 1.9269355e-02, 1.9277884e-02, 1.9286347e-02, 1.9294745e-02, 1.9303077e-02, 1.9311346e-02, 1.9319552e-02, 1.9327694e-02, 1.9335774e-02, 1.9343792e-02, 1.9351749e-02, 1.9359645e-02, 1.9367481e-02, 1.9375257e-02, 1.9382974e-02, 1.9390633e-02, 1.9398234e-02, 1.9405777e-02, 1.9413264e-02, 1.9420695e-02, 1.9428070e-02, 1.9435389e-02, 1.9442654e-02, 1.9449865e-02, 1.9457022e-02, 1.9464126e-02, 1.9471177e-02, 1.9478176e-02, 1.9485123e-02, 1.9492019e-02, 1.9498864e-02, 1.9505659e-02, 1.9512404e-02, 1.9519099e-02, 1.9525745e-02, 1.9532343e-02, 1.9538893e-02, 1.9545395e-02, 1.9551849e-02, 1.9558257e-02, 1.9564617e-02, 1.9570932e-02, 1.9577200e-02, 1.9583422e-02, 1.9589599e-02, 1.9595731e-02, 1.9601817e-02, 1.9607859e-02, 1.9613856e-02, 1.9619809e-02, 1.9625718e-02, 1.9631583e-02, 1.9637404e-02, 1.9643182e-02, 1.9648916e-02, 1.9654607e-02, 1.9660255e-02, 1.9665861e-02, 1.9671424e-02, 1.9676944e-02, 1.9682422e-02, 1.9687859e-02, 1.9693253e-02, 1.9698607e-02, 1.9703919e-02, 1.9709190e-02, 1.9714420e-02, 1.9719610e-02, 1.9724759e-02, 1.9729869e-02, 1.9734939e-02, 1.9739970e-02, 1.9744962e-02, 1.9749915e-02, 1.9754830e-02, 1.9759707e-02, 1.9764546e-02, 1.9769347e-02, 1.9774112e-02, 1.9778840e-02, 1.9783531e-02, 1.9788186e-02, 1.9792805e-02, 1.9797389e-02, 1.9801938e-02, 1.9806451e-02, 1.9810930e-02, 1.9815374e-02, 1.9819785e-02, 1.9824161e-02, 1.9828504e-02, 1.9832814e-02, 1.9837090e-02, 1.9841334e-02, 1.9845546e-02, 1.9849725e-02, 1.9853872e-02, 1.9857988e-02, 1.9862072e-02, 1.9866124e-02, 1.9870146e-02, 1.9874137e-02, 1.9878097e-02, 1.9882026e-02, 1.9885925e-02, 1.9889794e-02, 1.9893632e-02, 1.9897441e-02, 1.9901220e-02, 1.9904970e-02, 1.9908690e-02, 1.9912381e-02, 1.9916043e-02, 1.9919676e-02, 1.9923280e-02, 1.9926856e-02, 1.9930403e-02, 1.9933923e-02, 1.9937414e-02, 1.9940877e-02, 1.9944313e-02, 1.9947722e-02, 1.9951103e-02, 1.9954457e-02, 1.9957784e-02, 1.9961085e-02, 1.9964359e-02, 1.9967607e-02, 1.9970829e-02, 1.9974025e-02, 1.9977195e-02, 1.9980340e-02, 1.9983460e-02, 1.9986555e-02, 1.9989625e-02, 1.9992671e-02, 1.9995693e-02, 1.9998690e-02, 2.0001664e-02, 2.0004614e-02, 2.0007541e-02, 2.0010446e-02, 2.0013327e-02, 2.0016186e-02, 2.0019023e-02, 2.0021838e-02, 2.0024631e-02, 2.0027403e-02, 2.0030153e-02, 2.0032882e-02, 2.0035591e-02, 2.0038279e-02, 2.0040948e-02, 2.0043596e-02, 2.0046224e-02, 2.0048832e-02, 2.0051422e-02, 2.0053992e-02, 2.0056543e-02, 2.0059075e-02, 2.0061588e-02, 2.0064083e-02, 2.0066560e-02, 2.0069018e-02, 2.0071459e-02, 2.0073881e-02, 2.0076286e-02, 2.0078673e-02, 2.0081043e-02, 2.0083395e-02, 2.0085730e-02, 2.0088048e-02, 2.0090348e-02, 2.0092632e-02, 2.0094899e-02, 2.0097150e-02, 2.0099384e-02, 2.0101602e-02, 2.0103803e-02, 2.0105988e-02, 2.0108157e-02, 2.0110311e-02, 2.0112448e-02, 2.0114570e-02, 2.0116676e-02, 2.0118767e-02, 2.0120842e-02, 2.0122902e-02, 2.0124947e-02, 2.0126977e-02, 2.0128991e-02, 2.0130991e-02, 2.0132976e-02, 2.0134946e-02, 2.0136902e-02, 2.0138843e-02, 2.0140770e-02, 2.0142683e-02, 2.0144581e-02, 2.0146465e-02, 2.0148335e-02, 2.0150192e-02, 2.0152034e-02, 2.0153863e-02, 2.0155679e-02, 2.0157481e-02, 2.0159269e-02, 2.0161044e-02, 2.0162806e-02, 2.0164555e-02, 2.0166292e-02, 2.0168015e-02, 2.0169725e-02, 2.0171423e-02, 2.0173108e-02, 2.0174781e-02, 2.0176441e-02, 2.0178089e-02, 2.0179725e-02, 2.0181348e-02, 2.0182960e-02, 2.0184560e-02, 2.0186148e-02, 2.0187724e-02, 2.0189288e-02, 2.0190841e-02, 2.0192382e-02, 2.0193912e-02, 2.0195430e-02, 2.0196937e-02, 2.0198433e-02, 2.0199917e-02, 2.0201390e-02, 2.0202852e-02, 2.0204303e-02, 2.0205743e-02, 2.0207171e-02, 2.0208589e-02, 2.0209995e-02, 2.0211391e-02, 2.0212775e-02, 2.0214149e-02, 2.0215511e-02, 2.0216863e-02, 2.0218204e-02, 2.0219533e-02, 2.0220852e-02, 2.0222161e-02, 2.0223458e-02, 2.0224744e-02, 2.0226020e-02, 2.0227285e-02, 2.0228539e-02, 2.0229782e-02, 2.0231015e-02, 2.0232237e-02, 2.0233449e-02, 2.0234650e-02, 2.0235841e-02, 2.0237021e-02, 2.0238192e-02, 2.0239351e-02, 2.0240501e-02, 2.0241641e-02, 2.0242770e-02, 2.0243890e-02, 2.0245000e-02, 2.0246100e-02, 2.0247191e-02, 2.0248271e-02, 2.0249343e-02, 2.0250404e-02, 2.0251457e-02, 2.0252500e-02, 2.0253534e-02, 2.0254559e-02, 2.0255575e-02, 2.0256582e-02, 2.0257580e-02, 2.0258570e-02, 2.0259551e-02, 2.0260523e-02, 2.0261487e-02, 2.0262443e-02, 2.0263391e-02, 2.0264330e-02, 2.0265261e-02, 2.0266185e-02, 2.0267100e-02, 2.0268008e-02, 2.0268908e-02, 2.0269800e-02, 2.0270685e-02, 2.0271562e-02, 2.0272431e-02, 2.0273293e-02, 2.0274148e-02, 2.0274996e-02, 2.0275836e-02, 2.0276669e-02, 2.0277495e-02, 2.0278313e-02, 2.0279125e-02, 2.0279929e-02, 2.0280727e-02, 2.0281517e-02, 2.0282301e-02, 2.0283077e-02, 2.0283847e-02, 2.0284609e-02, 2.0285365e-02, 2.0286114e-02, 2.0286856e-02, 2.0287592e-02, 2.0288320e-02, 2.0289042e-02, 2.0289758e-02, 2.0290466e-02, 2.0291168e-02, 2.0291864e-02, 2.0292553e-02, 2.0293236e-02, 2.0293912e-02, 2.0294582e-02, 2.0295246e-02, 2.0295903e-02, 2.0296554e-02, 2.0297200e-02, 2.0297839e-02, 2.0298472e-02, 2.0299100e-02, 2.0299721e-02, 2.0300337e-02, 2.0300947e-02, 2.0301552e-02, 2.0302151e-02, 2.0302745e-02, 2.0303333e-02, 2.0303916e-02, 2.0304494e-02, 2.0305066e-02, 2.0305634e-02, 2.0306196e-02, 2.0306754e-02, 2.0307307e-02, 2.0307855e-02, 2.0308398e-02, 2.0308936e-02, 2.0309470e-02, 2.0309999e-02, 2.0310524e-02, 2.0311044e-02, 2.0311560e-02, 2.0312071e-02, 2.0312578e-02, 2.0313081e-02, 2.0313579e-02, 2.0314073e-02, 2.0314562e-02, 2.0315048e-02, 2.0315529e-02, 2.0316006e-02, 2.0316479e-02, 2.0316948e-02, 2.0317413e-02, 2.0317874e-02, 2.0318331e-02, 2.0318783e-02, 2.0319232e-02, 2.0319677e-02, 2.0320118e-02, 2.0320555e-02, 2.0320988e-02, 2.0321418e-02, 2.0321843e-02, 2.0322265e-02, 2.0322683e-02, 2.0323097e-02, 2.0323507e-02, 2.0323914e-02, 2.0324317e-02, 2.0324716e-02, 2.0325111e-02, 2.0325503e-02, 2.0325891e-02, 2.0326275e-02, 2.0326656e-02, 2.0327033e-02, 2.0327406e-02, 2.0327776e-02, 2.0328142e-02, 2.0328505e-02, 2.0328864e-02, 2.0329220e-02, 2.0329572e-02, 2.0329921e-02, 2.0330266e-02, 2.0330608e-02, 2.0330947e-02, 2.0331282e-02, 2.0331614e-02, 2.0331942e-02, 2.0332267e-02, 2.0332589e-02, 2.0332908e-02, 2.0333224e-02, 2.0333536e-02, 2.0333845e-02, 2.0334151e-02, 2.0334454e-02, 2.0334753e-02, 2.0335050e-02, 2.0335343e-02, 2.0335634e-02, 2.0335921e-02, 2.0336205e-02, 2.0336486e-02, 2.0336765e-02, 2.0337040e-02, 2.0337312e-02, 2.0337581e-02, 2.0337847e-02, 2.0338110e-02, 2.0338370e-02, 2.0338627e-02, 2.0338881e-02, 2.0339132e-02, 2.0339379e-02, 2.0339624e-02, 2.0339866e-02, 2.0340105e-02, 2.0340341e-02, 2.0340573e-02, 2.0340803e-02, 2.0341029e-02, 2.0341253e-02, 2.0341473e-02, 2.0341691e-02, 2.0341905e-02, 2.0342116e-02, 2.0342324e-02, 2.0342528e-02, 2.0342730e-02, 2.0342929e-02, 2.0343124e-02, 2.0343316e-02, 2.0343506e-02, 2.0343692e-02, 2.0343875e-02, 2.0344054e-02, 2.0344231e-02, 2.0344405e-02, 2.0344575e-02, 2.0344743e-02, 2.0344907e-02, 2.0345068e-02, 2.0345226e-02, 2.0345382e-02, 2.0345534e-02, 2.0345683e-02, 2.0345829e-02, 2.0345972e-02, 2.0346112e-02, 2.0346249e-02}, - continuous = true, - nFuture=1, - nPast=900); - -end MinimumPhaseInterpolator; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/MinimumPhaseInterpolator/package.order b/Noise 1.0 Beta.1/Examples/RailIrregularities/MinimumPhaseInterpolator/package.order deleted file mode 100644 index e69de29b..00000000 diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/Displacement.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/Displacement.mo deleted file mode 100644 index fa167ac1..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/Displacement.mo +++ /dev/null @@ -1,39 +0,0 @@ -within Noise.Examples.RailIrregularities.Parts; -model Displacement "Inserts a fixed displacement" - extends Modelica.Mechanics.Translational.Interfaces.PartialTwoFlanges; - Modelica.Mechanics.Translational.Sources.Position position(useSupport=true) - annotation (Placement(transformation(extent={{10,10},{30,30}}))); - Modelica.Blocks.Interfaces.RealInput u annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=-90, - origin={0,120}), iconTransformation( - extent={{-20,-20},{20,20}}, - rotation=-90, - origin={0,24}))); -equation - connect(position.support, flange_a) annotation (Line( - points={{20,10},{20,0},{-100,0}}, - color={0,0,0}, - pattern=LinePattern.None, - smooth=Smooth.None)); - connect(position.flange, flange_b) annotation (Line( - points={{30,20},{40,20},{40,0},{100,0}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(u, position.s_ref) annotation (Line( - points={{0,120},{0,20},{8,20}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), Icon(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ - Line( - points={{-70,10},{-90,0},{-70,-10},{-90,0},{90,0},{70,10},{90,0},{70,-10}}, - color={0,0,0}, - smooth=Smooth.None), - Text( - extent={{-150,120},{150,80}}, - textString="%name", - lineColor={0,0,255})})); - -end Displacement; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/Irregularity.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/Irregularity.mo deleted file mode 100644 index 480ed116..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/Irregularity.mo +++ /dev/null @@ -1,47 +0,0 @@ -within Noise.Examples.RailIrregularities.Parts; -model Irregularity "Source of track irregularity" - extends Noise.Examples.RailIrregularities.Comparisons.FilterAndConvolution( - doMinimum = true, doZero = false, doFilter = false, doTime = false); - extends Modelica.Blocks.Interfaces.SO; -equation - assert( doMinimum and not doZero and not doFilter and not doTime - or not doMinimum and doZero and not doFilter and not doTime - or not doMinimum and not doZero and doFilter and not doTime - or not doMinimum and not doZero and not doFilter and doTime, "May only use one noise generator!"); - connect(spaceDomainNoiseZero.y, y) annotation (Line( - points={{1,70},{50,70},{50,0},{110,0}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(spaceDomainNoiseMinimum.y, y) annotation (Line( - points={{1,30},{50,30},{50,0},{110,0}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(spaceDomainFilter.y, y) annotation (Line( - points={{41,-10},{50,-10},{50,0},{110,0}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(timeDomainFilter.y, y) annotation (Line( - points={{41,-50},{50,-50},{50,0},{110,0}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), Icon(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics= - { - Line( - points={{-80,80},{-80,-80},{80,-80}}, - color={0,0,0}, - smooth=Smooth.None), - Line( - points={{-76,46},{-22,46},{42,-20},{74,-54}}, - color={0,0,255}, - smooth=Smooth.Bezier), - Line( - points={{-76,60},{-10,60},{38,4},{74,-40}}, - color={255,0,0}, - smooth=Smooth.Bezier), - Line( - points={{-76,32},{-40,32},{12,-8},{74,-68}}, - color={0,127,0}, - smooth=Smooth.Bezier)})); -end Irregularity; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/QuarterRailwayCar.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/QuarterRailwayCar.mo deleted file mode 100644 index 350209ea..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/QuarterRailwayCar.mo +++ /dev/null @@ -1,92 +0,0 @@ -within Noise.Examples.RailIrregularities.Parts; -model QuarterRailwayCar "A quarter of a railway car" - extends Modelica.Mechanics.Translational.Interfaces.PartialTwoFlanges; - Modelica.Mechanics.Translational.Components.SpringDamper contact(c=990e6, d=100e3, - stateSelect=StateSelect.never) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={-60,0}))); - Modelica.Mechanics.Translational.Components.Mass wheel( - s(fixed=true), - v(fixed=true), - stateSelect=StateSelect.always, - m=1250) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={-20,0}))); - Modelica.Mechanics.Translational.Components.SpringDamper suspension(c=0.175e6, - d=10.5e3) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={20,0}))); - Modelica.Mechanics.Translational.Components.Mass body( - s(fixed=true), - v(fixed=true), - stateSelect=StateSelect.always, - m=6750) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={60,0}))); -equation - connect(wheel.flange_a,contact. flange_b) annotation (Line( - points={{-30,0},{-50,0}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(suspension.flange_a,wheel. flange_b) annotation (Line( - points={{10,0},{-10,0}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(body.flange_a,suspension. flange_b) annotation (Line( - points={{50,0},{30,0}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(body.flange_b, flange_b) annotation (Line( - points={{70,0},{100,0}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(contact.flange_a, flange_a) annotation (Line( - points={{-70,0},{-100,0}}, - color={0,127,0}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), Icon(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics= - { - Ellipse( - extent={{-100,40},{-20,-40}}, - fillPattern=FillPattern.Solid, - fillColor={135,135,135}, - pattern=LinePattern.None, - lineColor={0,0,0}), - Ellipse( - extent={{-96,36},{-24,-36}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Sphere), - Rectangle( - extent={{-60,-30},{60,30}}, - lineColor={0,0,0}, - fillPattern=FillPattern.Sphere, - fillColor={255,255,255}, - origin={70,0}, - rotation=90), - Line( - points={{40,40},{28,40},{24,50},{18,28},{12,50},{6,28},{0,50},{-6,28}, - {-10,40},{-20,40},{-20,-40},{40,-40}}, - color={0,0,0}, - smooth=Smooth.None), - Line( - points={{30,-30},{-10,-30},{-10,-50},{30,-50}}, - color={0,0,0}, - smooth=Smooth.None), - Rectangle( - extent={{-10,-30},{20,-50}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Text( - extent={{-150,120},{150,80}}, - textString="%name", - lineColor={0,0,255})})); -end QuarterRailwayCar; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/SimpleRailwayTrack.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/SimpleRailwayTrack.mo deleted file mode 100644 index c91e3f34..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/SimpleRailwayTrack.mo +++ /dev/null @@ -1,53 +0,0 @@ -within Noise.Examples.RailIrregularities.Parts; -model SimpleRailwayTrack "A simple railway track model" - extends Modelica.Mechanics.Translational.Interfaces.PartialTwoFlanges; - Modelica.Mechanics.Translational.Components.Mass track( - L=0, - m=165, - v(start=0), - s(start=0)) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={40,0}))); - Modelica.Mechanics.Translational.Components.SpringDamper - track_bed( - d=9.4e7, - v_rel(start=0), - s_rel(start=-2.2548285e-4), - c=7.5e7) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={-40,0}))); -equation - connect(track.flange_a, track_bed.flange_b) annotation (Line( - points={{30,0},{-30,0}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(track_bed.flange_a, flange_a) annotation (Line( - points={{-50,0},{-100,0}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(track.flange_b, flange_b) annotation (Line( - points={{50,0},{100,0},{100,0}}, - color={0,127,0}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), Icon(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ - Rectangle( - extent={{-100,60},{-60,-60}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), Polygon( - points={{-60,50},{-40,50},{-30,20},{60,10},{66,20},{80,20},{90,10},{90, - -10},{80,-20},{66,-20},{60,-10},{-30,-20},{-40,-50},{-60,-50},{-60, - 50}}, - lineColor={0,0,0}, - smooth=Smooth.None, - fillColor={215,215,215}, - fillPattern=FillPattern.Solid), - Text( - extent={{-150,120},{150,80}}, - textString="%name", - lineColor={0,0,255})})); -end SimpleRailwayTrack; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/package.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/package.mo deleted file mode 100644 index 4251bfb6..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/package.mo +++ /dev/null @@ -1,4 +0,0 @@ -within Noise.Examples.RailIrregularities; -package Parts "Some parts required for this example" -extends Modelica.Icons.UtilitiesPackage; -end Parts; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/package.order b/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/package.order deleted file mode 100644 index 2534f4ea..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/Parts/package.order +++ /dev/null @@ -1,4 +0,0 @@ -QuarterRailwayCar -SimpleRailwayTrack -Displacement -Irregularity diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/TrainOnTrack.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/TrainOnTrack.mo deleted file mode 100644 index 34c39bbd..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/TrainOnTrack.mo +++ /dev/null @@ -1,64 +0,0 @@ -within Noise.Examples.RailIrregularities; -model TrainOnTrack - "This examples simulates a simple train on a track with irregularities" - extends Modelica.Icons.Example; - Modelica.Mechanics.Translational.Components.Fixed - earth - annotation (Placement(transformation(extent={{-10,-90},{10,-70}}))); - Parts.SimpleRailwayTrack simpleRailwayTrack annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={0,-40}))); - Parts.QuarterRailwayCar quarterRailwayCar annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={0,40}))); - Parts.Displacement displacement(position(v(fixed=true), a(fixed=true))) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={0,0}))); - Parts.Irregularity irregularity - annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); - Modelica.Mechanics.Translational.Sensors.AccSensor accSensor - annotation (Placement(transformation(extent={{40,80},{60,100}}))); - Modelica.Mechanics.Translational.Sensors.PositionSensor positionSensor - annotation (Placement(transformation(extent={{40,60},{60,80}}))); -equation - connect(quarterRailwayCar.flange_a, displacement.flange_b) annotation (Line( - points={{0,30},{0,10}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(displacement.flange_a, simpleRailwayTrack.flange_b) annotation (Line( - points={{0,-10},{0,-30}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(simpleRailwayTrack.flange_a, earth.flange) annotation (Line( - points={{0,-50},{0,-80}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(irregularity.y, displacement.u) annotation (Line( - points={{-39,0},{-2.4,0}}, - color={0,0,127}, - smooth=Smooth.Bezier)); - connect(positionSensor.flange, quarterRailwayCar.flange_b) annotation (Line( - points={{40,70},{0,70},{0,50}}, - color={0,127,0}, - smooth=Smooth.None)); - connect(accSensor.flange, quarterRailwayCar.flange_b) annotation (Line( - points={{40,90},{0,90},{0,50}}, - color={0,127,0}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics)); - -initial equation - simpleRailwayTrack.track.a = 0; - //simpleRailwayTrack.track.v = 0; - quarterRailwayCar.wheel.a = 0; - //quarterRailwayCar.wheel.v = 0; - quarterRailwayCar.body.a = 0; - //quarterRailwayCar.body.v = 0; -end TrainOnTrack; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/ZeroPhaseInterpolator/package.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/ZeroPhaseInterpolator/package.mo deleted file mode 100644 index 1eb754cd..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/ZeroPhaseInterpolator/package.mo +++ /dev/null @@ -1,12 +0,0 @@ -within Noise.Examples.RailIrregularities; -package ZeroPhaseInterpolator "Provides a filter function for rail irregularities (zero phase)" - - - extends Interpolators.StepResponse( - T = { -6.1600000e+01, -6.1500000e+01, -6.1400000e+01, -6.1300000e+01, -6.1200000e+01, -6.1100000e+01, -6.1000000e+01, -6.0900000e+01, -6.0800000e+01, -6.0700000e+01, -6.0600000e+01, -6.0500000e+01, -6.0400000e+01, -6.0300000e+01, -6.0200000e+01, -6.0100000e+01, -6.0000000e+01, -5.9900000e+01, -5.9800000e+01, -5.9700000e+01, -5.9600000e+01, -5.9500000e+01, -5.9400000e+01, -5.9300000e+01, -5.9200000e+01, -5.9100000e+01, -5.9000000e+01, -5.8900000e+01, -5.8800000e+01, -5.8700000e+01, -5.8600000e+01, -5.8500000e+01, -5.8400000e+01, -5.8300000e+01, -5.8200000e+01, -5.8100000e+01, -5.8000000e+01, -5.7900000e+01, -5.7800000e+01, -5.7700000e+01, -5.7600000e+01, -5.7500000e+01, -5.7400000e+01, -5.7300000e+01, -5.7200000e+01, -5.7100000e+01, -5.7000000e+01, -5.6900000e+01, -5.6800000e+01, -5.6700000e+01, -5.6600000e+01, -5.6500000e+01, -5.6400000e+01, -5.6300000e+01, -5.6200000e+01, -5.6100000e+01, -5.6000000e+01, -5.5900000e+01, -5.5800000e+01, -5.5700000e+01, -5.5600000e+01, -5.5500000e+01, -5.5400000e+01, -5.5300000e+01, -5.5200000e+01, -5.5100000e+01, -5.5000000e+01, -5.4900000e+01, -5.4800000e+01, -5.4700000e+01, -5.4600000e+01, -5.4500000e+01, -5.4400000e+01, -5.4300000e+01, -5.4200000e+01, -5.4100000e+01, -5.4000000e+01, -5.3900000e+01, -5.3800000e+01, -5.3700000e+01, -5.3600000e+01, -5.3500000e+01, -5.3400000e+01, -5.3300000e+01, -5.3200000e+01, -5.3100000e+01, -5.3000000e+01, -5.2900000e+01, -5.2800000e+01, -5.2700000e+01, -5.2600000e+01, -5.2500000e+01, -5.2400000e+01, -5.2300000e+01, -5.2200000e+01, -5.2100000e+01, -5.2000000e+01, -5.1900000e+01, -5.1800000e+01, -5.1700000e+01, -5.1600000e+01, -5.1500000e+01, -5.1400000e+01, -5.1300000e+01, -5.1200000e+01, -5.1100000e+01, -5.1000000e+01, -5.0900000e+01, -5.0800000e+01, -5.0700000e+01, -5.0600000e+01, -5.0500000e+01, -5.0400000e+01, -5.0300000e+01, -5.0200000e+01, -5.0100000e+01, -5.0000000e+01, -4.9900000e+01, -4.9800000e+01, -4.9700000e+01, -4.9600000e+01, -4.9500000e+01, -4.9400000e+01, -4.9300000e+01, -4.9200000e+01, -4.9100000e+01, -4.9000000e+01, -4.8900000e+01, -4.8800000e+01, -4.8700000e+01, -4.8600000e+01, -4.8500000e+01, -4.8400000e+01, -4.8300000e+01, -4.8200000e+01, -4.8100000e+01, -4.8000000e+01, -4.7900000e+01, -4.7800000e+01, -4.7700000e+01, -4.7600000e+01, -4.7500000e+01, -4.7400000e+01, -4.7300000e+01, -4.7200000e+01, -4.7100000e+01, -4.7000000e+01, -4.6900000e+01, -4.6800000e+01, -4.6700000e+01, -4.6600000e+01, -4.6500000e+01, -4.6400000e+01, -4.6300000e+01, -4.6200000e+01, -4.6100000e+01, -4.6000000e+01, -4.5900000e+01, -4.5800000e+01, -4.5700000e+01, -4.5600000e+01, -4.5500000e+01, -4.5400000e+01, -4.5300000e+01, -4.5200000e+01, -4.5100000e+01, -4.5000000e+01, -4.4900000e+01, -4.4800000e+01, -4.4700000e+01, -4.4600000e+01, -4.4500000e+01, -4.4400000e+01, -4.4300000e+01, -4.4200000e+01, -4.4100000e+01, -4.4000000e+01, -4.3900000e+01, -4.3800000e+01, -4.3700000e+01, -4.3600000e+01, -4.3500000e+01, -4.3400000e+01, -4.3300000e+01, -4.3200000e+01, -4.3100000e+01, -4.3000000e+01, -4.2900000e+01, -4.2800000e+01, -4.2700000e+01, -4.2600000e+01, -4.2500000e+01, -4.2400000e+01, -4.2300000e+01, -4.2200000e+01, -4.2100000e+01, -4.2000000e+01, -4.1900000e+01, -4.1800000e+01, -4.1700000e+01, -4.1600000e+01, -4.1500000e+01, -4.1400000e+01, -4.1300000e+01, -4.1200000e+01, -4.1100000e+01, -4.1000000e+01, -4.0900000e+01, -4.0800000e+01, -4.0700000e+01, -4.0600000e+01, -4.0500000e+01, -4.0400000e+01, -4.0300000e+01, -4.0200000e+01, -4.0100000e+01, -4.0000000e+01, -3.9900000e+01, -3.9800000e+01, -3.9700000e+01, -3.9600000e+01, -3.9500000e+01, -3.9400000e+01, -3.9300000e+01, -3.9200000e+01, -3.9100000e+01, -3.9000000e+01, -3.8900000e+01, -3.8800000e+01, -3.8700000e+01, -3.8600000e+01, -3.8500000e+01, -3.8400000e+01, -3.8300000e+01, -3.8200000e+01, -3.8100000e+01, -3.8000000e+01, -3.7900000e+01, -3.7800000e+01, -3.7700000e+01, -3.7600000e+01, -3.7500000e+01, -3.7400000e+01, -3.7300000e+01, -3.7200000e+01, -3.7100000e+01, -3.7000000e+01, -3.6900000e+01, -3.6800000e+01, -3.6700000e+01, -3.6600000e+01, -3.6500000e+01, -3.6400000e+01, -3.6300000e+01, -3.6200000e+01, -3.6100000e+01, -3.6000000e+01, -3.5900000e+01, -3.5800000e+01, -3.5700000e+01, -3.5600000e+01, -3.5500000e+01, -3.5400000e+01, -3.5300000e+01, -3.5200000e+01, -3.5100000e+01, -3.5000000e+01, -3.4900000e+01, -3.4800000e+01, -3.4700000e+01, -3.4600000e+01, -3.4500000e+01, -3.4400000e+01, -3.4300000e+01, -3.4200000e+01, -3.4100000e+01, -3.4000000e+01, -3.3900000e+01, -3.3800000e+01, -3.3700000e+01, -3.3600000e+01, -3.3500000e+01, -3.3400000e+01, -3.3300000e+01, -3.3200000e+01, -3.3100000e+01, -3.3000000e+01, -3.2900000e+01, -3.2800000e+01, -3.2700000e+01, -3.2600000e+01, -3.2500000e+01, -3.2400000e+01, -3.2300000e+01, -3.2200000e+01, -3.2100000e+01, -3.2000000e+01, -3.1900000e+01, -3.1800000e+01, -3.1700000e+01, -3.1600000e+01, -3.1500000e+01, -3.1400000e+01, -3.1300000e+01, -3.1200000e+01, -3.1100000e+01, -3.1000000e+01, -3.0900000e+01, -3.0800000e+01, -3.0700000e+01, -3.0600000e+01, -3.0500000e+01, -3.0400000e+01, -3.0300000e+01, -3.0200000e+01, -3.0100000e+01, -3.0000000e+01, -2.9900000e+01, -2.9800000e+01, -2.9700000e+01, -2.9600000e+01, -2.9500000e+01, -2.9400000e+01, -2.9300000e+01, -2.9200000e+01, -2.9100000e+01, -2.9000000e+01, -2.8900000e+01, -2.8800000e+01, -2.8700000e+01, -2.8600000e+01, -2.8500000e+01, -2.8400000e+01, -2.8300000e+01, -2.8200000e+01, -2.8100000e+01, -2.8000000e+01, -2.7900000e+01, -2.7800000e+01, -2.7700000e+01, -2.7600000e+01, -2.7500000e+01, -2.7400000e+01, -2.7300000e+01, -2.7200000e+01, -2.7100000e+01, -2.7000000e+01, -2.6900000e+01, -2.6800000e+01, -2.6700000e+01, -2.6600000e+01, -2.6500000e+01, -2.6400000e+01, -2.6300000e+01, -2.6200000e+01, -2.6100000e+01, -2.6000000e+01, -2.5900000e+01, -2.5800000e+01, -2.5700000e+01, -2.5600000e+01, -2.5500000e+01, -2.5400000e+01, -2.5300000e+01, -2.5200000e+01, -2.5100000e+01, -2.5000000e+01, -2.4900000e+01, -2.4800000e+01, -2.4700000e+01, -2.4600000e+01, -2.4500000e+01, -2.4400000e+01, -2.4300000e+01, -2.4200000e+01, -2.4100000e+01, -2.4000000e+01, -2.3900000e+01, -2.3800000e+01, -2.3700000e+01, -2.3600000e+01, -2.3500000e+01, -2.3400000e+01, -2.3300000e+01, -2.3200000e+01, -2.3100000e+01, -2.3000000e+01, -2.2900000e+01, -2.2800000e+01, -2.2700000e+01, -2.2600000e+01, -2.2500000e+01, -2.2400000e+01, -2.2300000e+01, -2.2200000e+01, -2.2100000e+01, -2.2000000e+01, -2.1900000e+01, -2.1800000e+01, -2.1700000e+01, -2.1600000e+01, -2.1500000e+01, -2.1400000e+01, -2.1300000e+01, -2.1200000e+01, -2.1100000e+01, -2.1000000e+01, -2.0900000e+01, -2.0800000e+01, -2.0700000e+01, -2.0600000e+01, -2.0500000e+01, -2.0400000e+01, -2.0300000e+01, -2.0200000e+01, -2.0100000e+01, -2.0000000e+01, -1.9900000e+01, -1.9800000e+01, -1.9700000e+01, -1.9600000e+01, -1.9500000e+01, -1.9400000e+01, -1.9300000e+01, -1.9200000e+01, -1.9100000e+01, -1.9000000e+01, -1.8900000e+01, -1.8800000e+01, -1.8700000e+01, -1.8600000e+01, -1.8500000e+01, -1.8400000e+01, -1.8300000e+01, -1.8200000e+01, -1.8100000e+01, -1.8000000e+01, -1.7900000e+01, -1.7800000e+01, -1.7700000e+01, -1.7600000e+01, -1.7500000e+01, -1.7400000e+01, -1.7300000e+01, -1.7200000e+01, -1.7100000e+01, -1.7000000e+01, -1.6900000e+01, -1.6800000e+01, -1.6700000e+01, -1.6600000e+01, -1.6500000e+01, -1.6400000e+01, -1.6300000e+01, -1.6200000e+01, -1.6100000e+01, -1.6000000e+01, -1.5900000e+01, -1.5800000e+01, -1.5700000e+01, -1.5600000e+01, -1.5500000e+01, -1.5400000e+01, -1.5300000e+01, -1.5200000e+01, -1.5100000e+01, -1.5000000e+01, -1.4900000e+01, -1.4800000e+01, -1.4700000e+01, -1.4600000e+01, -1.4500000e+01, -1.4400000e+01, -1.4300000e+01, -1.4200000e+01, -1.4100000e+01, -1.4000000e+01, -1.3900000e+01, -1.3800000e+01, -1.3700000e+01, -1.3600000e+01, -1.3500000e+01, -1.3400000e+01, -1.3300000e+01, -1.3200000e+01, -1.3100000e+01, -1.3000000e+01, -1.2900000e+01, -1.2800000e+01, -1.2700000e+01, -1.2600000e+01, -1.2500000e+01, -1.2400000e+01, -1.2300000e+01, -1.2200000e+01, -1.2100000e+01, -1.2000000e+01, -1.1900000e+01, -1.1800000e+01, -1.1700000e+01, -1.1600000e+01, -1.1500000e+01, -1.1400000e+01, -1.1300000e+01, -1.1200000e+01, -1.1100000e+01, -1.1000000e+01, -1.0900000e+01, -1.0800000e+01, -1.0700000e+01, -1.0600000e+01, -1.0500000e+01, -1.0400000e+01, -1.0300000e+01, -1.0200000e+01, -1.0100000e+01, -1.0000000e+01, -9.9000000e+00, -9.8000000e+00, -9.7000000e+00, -9.6000000e+00, -9.5000000e+00, -9.4000000e+00, -9.3000000e+00, -9.2000000e+00, -9.1000000e+00, -9.0000000e+00, -8.9000000e+00, -8.8000000e+00, -8.7000000e+00, -8.6000000e+00, -8.5000000e+00, -8.4000000e+00, -8.3000000e+00, -8.2000000e+00, -8.1000000e+00, -8.0000000e+00, -7.9000000e+00, -7.8000000e+00, -7.7000000e+00, -7.6000000e+00, -7.5000000e+00, -7.4000000e+00, -7.3000000e+00, -7.2000000e+00, -7.1000000e+00, -7.0000000e+00, -6.9000000e+00, -6.8000000e+00, -6.7000000e+00, -6.6000000e+00, -6.5000000e+00, -6.4000000e+00, -6.3000000e+00, -6.2000000e+00, -6.1000000e+00, -6.0000000e+00, -5.9000000e+00, -5.8000000e+00, -5.7000000e+00, -5.6000000e+00, -5.5000000e+00, -5.4000000e+00, -5.3000000e+00, -5.2000000e+00, -5.1000000e+00, -5.0000000e+00, -4.9000000e+00, -4.8000000e+00, -4.7000000e+00, -4.6000000e+00, -4.5000000e+00, -4.4000000e+00, -4.3000000e+00, -4.2000000e+00, -4.1000000e+00, -4.0000000e+00, -3.9000000e+00, -3.8000000e+00, -3.7000000e+00, -3.6000000e+00, -3.5000000e+00, -3.4000000e+00, -3.3000000e+00, -3.2000000e+00, -3.1000000e+00, -3.0000000e+00, -2.9000000e+00, -2.8000000e+00, -2.7000000e+00, -2.6000000e+00, -2.5000000e+00, -2.4000000e+00, -2.3000000e+00, -2.2000000e+00, -2.1000000e+00, -2.0000000e+00, -1.9000000e+00, -1.8000000e+00, -1.7000000e+00, -1.6000000e+00, -1.5000000e+00, -1.4000000e+00, -1.3000000e+00, -1.2000000e+00, -1.1000000e+00, -1.0000000e+00, -9.0000000e-01, -8.0000000e-01, -7.0000000e-01, -6.0000000e-01, -5.0000000e-01, -4.0000000e-01, -3.0000000e-01, -2.0000000e-01, -1.0000000e-01, 0.0000000e+00, 1.0000000e-01, 2.0000000e-01, 3.0000000e-01, 4.0000000e-01, 5.0000000e-01, 6.0000000e-01, 7.0000000e-01, 8.0000000e-01, 9.0000000e-01, 1.0000000e+00, 1.1000000e+00, 1.2000000e+00, 1.3000000e+00, 1.4000000e+00, 1.5000000e+00, 1.6000000e+00, 1.7000000e+00, 1.8000000e+00, 1.9000000e+00, 2.0000000e+00, 2.1000000e+00, 2.2000000e+00, 2.3000000e+00, 2.4000000e+00, 2.5000000e+00, 2.6000000e+00, 2.7000000e+00, 2.8000000e+00, 2.9000000e+00, 3.0000000e+00, 3.1000000e+00, 3.2000000e+00, 3.3000000e+00, 3.4000000e+00, 3.5000000e+00, 3.6000000e+00, 3.7000000e+00, 3.8000000e+00, 3.9000000e+00, 4.0000000e+00, 4.1000000e+00, 4.2000000e+00, 4.3000000e+00, 4.4000000e+00, 4.5000000e+00, 4.6000000e+00, 4.7000000e+00, 4.8000000e+00, 4.9000000e+00, 5.0000000e+00, 5.1000000e+00, 5.2000000e+00, 5.3000000e+00, 5.4000000e+00, 5.5000000e+00, 5.6000000e+00, 5.7000000e+00, 5.8000000e+00, 5.9000000e+00, 6.0000000e+00, 6.1000000e+00, 6.2000000e+00, 6.3000000e+00, 6.4000000e+00, 6.5000000e+00, 6.6000000e+00, 6.7000000e+00, 6.8000000e+00, 6.9000000e+00, 7.0000000e+00, 7.1000000e+00, 7.2000000e+00, 7.3000000e+00, 7.4000000e+00, 7.5000000e+00, 7.6000000e+00, 7.7000000e+00, 7.8000000e+00, 7.9000000e+00, 8.0000000e+00, 8.1000000e+00, 8.2000000e+00, 8.3000000e+00, 8.4000000e+00, 8.5000000e+00, 8.6000000e+00, 8.7000000e+00, 8.8000000e+00, 8.9000000e+00, 9.0000000e+00, 9.1000000e+00, 9.2000000e+00, 9.3000000e+00, 9.4000000e+00, 9.5000000e+00, 9.6000000e+00, 9.7000000e+00, 9.8000000e+00, 9.9000000e+00, 1.0000000e+01, 1.0100000e+01, 1.0200000e+01, 1.0300000e+01, 1.0400000e+01, 1.0500000e+01, 1.0600000e+01, 1.0700000e+01, 1.0800000e+01, 1.0900000e+01, 1.1000000e+01, 1.1100000e+01, 1.1200000e+01, 1.1300000e+01, 1.1400000e+01, 1.1500000e+01, 1.1600000e+01, 1.1700000e+01, 1.1800000e+01, 1.1900000e+01, 1.2000000e+01, 1.2100000e+01, 1.2200000e+01, 1.2300000e+01, 1.2400000e+01, 1.2500000e+01, 1.2600000e+01, 1.2700000e+01, 1.2800000e+01, 1.2900000e+01, 1.3000000e+01, 1.3100000e+01, 1.3200000e+01, 1.3300000e+01, 1.3400000e+01, 1.3500000e+01, 1.3600000e+01, 1.3700000e+01, 1.3800000e+01, 1.3900000e+01, 1.4000000e+01, 1.4100000e+01, 1.4200000e+01, 1.4300000e+01, 1.4400000e+01, 1.4500000e+01, 1.4600000e+01, 1.4700000e+01, 1.4800000e+01, 1.4900000e+01, 1.5000000e+01, 1.5100000e+01, 1.5200000e+01, 1.5300000e+01, 1.5400000e+01, 1.5500000e+01, 1.5600000e+01, 1.5700000e+01, 1.5800000e+01, 1.5900000e+01, 1.6000000e+01, 1.6100000e+01, 1.6200000e+01, 1.6300000e+01, 1.6400000e+01, 1.6500000e+01, 1.6600000e+01, 1.6700000e+01, 1.6800000e+01, 1.6900000e+01, 1.7000000e+01, 1.7100000e+01, 1.7200000e+01, 1.7300000e+01, 1.7400000e+01, 1.7500000e+01, 1.7600000e+01, 1.7700000e+01, 1.7800000e+01, 1.7900000e+01, 1.8000000e+01, 1.8100000e+01, 1.8200000e+01, 1.8300000e+01, 1.8400000e+01, 1.8500000e+01, 1.8600000e+01, 1.8700000e+01, 1.8800000e+01, 1.8900000e+01, 1.9000000e+01, 1.9100000e+01, 1.9200000e+01, 1.9300000e+01, 1.9400000e+01, 1.9500000e+01, 1.9600000e+01, 1.9700000e+01, 1.9800000e+01, 1.9900000e+01, 2.0000000e+01, 2.0100000e+01, 2.0200000e+01, 2.0300000e+01, 2.0400000e+01, 2.0500000e+01, 2.0600000e+01, 2.0700000e+01, 2.0800000e+01, 2.0900000e+01, 2.1000000e+01, 2.1100000e+01, 2.1200000e+01, 2.1300000e+01, 2.1400000e+01, 2.1500000e+01, 2.1600000e+01, 2.1700000e+01, 2.1800000e+01, 2.1900000e+01, 2.2000000e+01, 2.2100000e+01, 2.2200000e+01, 2.2300000e+01, 2.2400000e+01, 2.2500000e+01, 2.2600000e+01, 2.2700000e+01, 2.2800000e+01, 2.2900000e+01, 2.3000000e+01, 2.3100000e+01, 2.3200000e+01, 2.3300000e+01, 2.3400000e+01, 2.3500000e+01, 2.3600000e+01, 2.3700000e+01, 2.3800000e+01, 2.3900000e+01, 2.4000000e+01, 2.4100000e+01, 2.4200000e+01, 2.4300000e+01, 2.4400000e+01, 2.4500000e+01, 2.4600000e+01, 2.4700000e+01, 2.4800000e+01, 2.4900000e+01, 2.5000000e+01, 2.5100000e+01, 2.5200000e+01, 2.5300000e+01, 2.5400000e+01, 2.5500000e+01, 2.5600000e+01, 2.5700000e+01, 2.5800000e+01, 2.5900000e+01, 2.6000000e+01, 2.6100000e+01, 2.6200000e+01, 2.6300000e+01, 2.6400000e+01, 2.6500000e+01, 2.6600000e+01, 2.6700000e+01, 2.6800000e+01, 2.6900000e+01, 2.7000000e+01, 2.7100000e+01, 2.7200000e+01, 2.7300000e+01, 2.7400000e+01, 2.7500000e+01, 2.7600000e+01, 2.7700000e+01, 2.7800000e+01, 2.7900000e+01, 2.8000000e+01, 2.8100000e+01, 2.8200000e+01, 2.8300000e+01, 2.8400000e+01, 2.8500000e+01, 2.8600000e+01, 2.8700000e+01, 2.8800000e+01, 2.8900000e+01, 2.9000000e+01, 2.9100000e+01, 2.9200000e+01, 2.9300000e+01, 2.9400000e+01, 2.9500000e+01, 2.9600000e+01, 2.9700000e+01, 2.9800000e+01, 2.9900000e+01, 3.0000000e+01, 3.0100000e+01, 3.0200000e+01, 3.0300000e+01, 3.0400000e+01, 3.0500000e+01, 3.0600000e+01, 3.0700000e+01, 3.0800000e+01, 3.0900000e+01, 3.1000000e+01, 3.1100000e+01, 3.1200000e+01, 3.1300000e+01, 3.1400000e+01, 3.1500000e+01, 3.1600000e+01, 3.1700000e+01, 3.1800000e+01, 3.1900000e+01, 3.2000000e+01, 3.2100000e+01, 3.2200000e+01, 3.2300000e+01, 3.2400000e+01, 3.2500000e+01, 3.2600000e+01, 3.2700000e+01, 3.2800000e+01, 3.2900000e+01, 3.3000000e+01, 3.3100000e+01, 3.3200000e+01, 3.3300000e+01, 3.3400000e+01, 3.3500000e+01, 3.3600000e+01, 3.3700000e+01, 3.3800000e+01, 3.3900000e+01, 3.4000000e+01, 3.4100000e+01, 3.4200000e+01, 3.4300000e+01, 3.4400000e+01, 3.4500000e+01, 3.4600000e+01, 3.4700000e+01, 3.4800000e+01, 3.4900000e+01, 3.5000000e+01, 3.5100000e+01, 3.5200000e+01, 3.5300000e+01, 3.5400000e+01, 3.5500000e+01, 3.5600000e+01, 3.5700000e+01, 3.5800000e+01, 3.5900000e+01, 3.6000000e+01, 3.6100000e+01, 3.6200000e+01, 3.6300000e+01, 3.6400000e+01, 3.6500000e+01, 3.6600000e+01, 3.6700000e+01, 3.6800000e+01, 3.6900000e+01, 3.7000000e+01, 3.7100000e+01, 3.7200000e+01, 3.7300000e+01, 3.7400000e+01, 3.7500000e+01, 3.7600000e+01, 3.7700000e+01, 3.7800000e+01, 3.7900000e+01, 3.8000000e+01, 3.8100000e+01, 3.8200000e+01, 3.8300000e+01, 3.8400000e+01, 3.8500000e+01, 3.8600000e+01, 3.8700000e+01, 3.8800000e+01, 3.8900000e+01, 3.9000000e+01, 3.9100000e+01, 3.9200000e+01, 3.9300000e+01, 3.9400000e+01, 3.9500000e+01, 3.9600000e+01, 3.9700000e+01, 3.9800000e+01, 3.9900000e+01, 4.0000000e+01, 4.0100000e+01, 4.0200000e+01, 4.0300000e+01, 4.0400000e+01, 4.0500000e+01, 4.0600000e+01, 4.0700000e+01, 4.0800000e+01, 4.0900000e+01, 4.1000000e+01, 4.1100000e+01, 4.1200000e+01, 4.1300000e+01, 4.1400000e+01, 4.1500000e+01, 4.1600000e+01, 4.1700000e+01, 4.1800000e+01, 4.1900000e+01, 4.2000000e+01, 4.2100000e+01, 4.2200000e+01, 4.2300000e+01, 4.2400000e+01, 4.2500000e+01, 4.2600000e+01, 4.2700000e+01, 4.2800000e+01, 4.2900000e+01, 4.3000000e+01, 4.3100000e+01, 4.3200000e+01, 4.3300000e+01, 4.3400000e+01, 4.3500000e+01, 4.3600000e+01, 4.3700000e+01, 4.3800000e+01, 4.3900000e+01, 4.4000000e+01, 4.4100000e+01, 4.4200000e+01, 4.4300000e+01, 4.4400000e+01, 4.4500000e+01, 4.4600000e+01, 4.4700000e+01, 4.4800000e+01, 4.4900000e+01, 4.5000000e+01, 4.5100000e+01, 4.5200000e+01, 4.5300000e+01, 4.5400000e+01, 4.5500000e+01, 4.5600000e+01, 4.5700000e+01, 4.5800000e+01, 4.5900000e+01, 4.6000000e+01, 4.6100000e+01, 4.6200000e+01, 4.6300000e+01, 4.6400000e+01, 4.6500000e+01, 4.6600000e+01, 4.6700000e+01, 4.6800000e+01, 4.6900000e+01, 4.7000000e+01, 4.7100000e+01, 4.7200000e+01, 4.7300000e+01, 4.7400000e+01, 4.7500000e+01, 4.7600000e+01, 4.7700000e+01, 4.7800000e+01, 4.7900000e+01, 4.8000000e+01, 4.8100000e+01, 4.8200000e+01, 4.8300000e+01, 4.8400000e+01, 4.8500000e+01, 4.8600000e+01, 4.8700000e+01, 4.8800000e+01, 4.8900000e+01, 4.9000000e+01, 4.9100000e+01, 4.9200000e+01, 4.9300000e+01, 4.9400000e+01, 4.9500000e+01, 4.9600000e+01, 4.9700000e+01, 4.9800000e+01, 4.9900000e+01, 5.0000000e+01, 5.0100000e+01, 5.0200000e+01, 5.0300000e+01, 5.0400000e+01, 5.0500000e+01, 5.0600000e+01, 5.0700000e+01, 5.0800000e+01, 5.0900000e+01, 5.1000000e+01, 5.1100000e+01, 5.1200000e+01, 5.1300000e+01, 5.1400000e+01, 5.1500000e+01, 5.1600000e+01, 5.1700000e+01, 5.1800000e+01, 5.1900000e+01, 5.2000000e+01, 5.2100000e+01, 5.2200000e+01, 5.2300000e+01, 5.2400000e+01, 5.2500000e+01, 5.2600000e+01, 5.2700000e+01, 5.2800000e+01, 5.2900000e+01, 5.3000000e+01, 5.3100000e+01, 5.3200000e+01, 5.3300000e+01, 5.3400000e+01, 5.3500000e+01, 5.3600000e+01, 5.3700000e+01, 5.3800000e+01, 5.3900000e+01, 5.4000000e+01, 5.4100000e+01, 5.4200000e+01, 5.4300000e+01, 5.4400000e+01, 5.4500000e+01, 5.4600000e+01, 5.4700000e+01, 5.4800000e+01, 5.4900000e+01, 5.5000000e+01, 5.5100000e+01, 5.5200000e+01, 5.5300000e+01, 5.5400000e+01, 5.5500000e+01, 5.5600000e+01, 5.5700000e+01, 5.5800000e+01, 5.5900000e+01, 5.6000000e+01, 5.6100000e+01, 5.6200000e+01, 5.6300000e+01, 5.6400000e+01, 5.6500000e+01, 5.6600000e+01, 5.6700000e+01, 5.6800000e+01, 5.6900000e+01, 5.7000000e+01, 5.7100000e+01, 5.7200000e+01, 5.7300000e+01, 5.7400000e+01, 5.7500000e+01, 5.7600000e+01, 5.7700000e+01, 5.7800000e+01, 5.7900000e+01, 5.8000000e+01, 5.8100000e+01, 5.8200000e+01, 5.8300000e+01, 5.8400000e+01, 5.8500000e+01, 5.8600000e+01, 5.8700000e+01, 5.8800000e+01, 5.8900000e+01, 5.9000000e+01, 5.9100000e+01, 5.9200000e+01, 5.9300000e+01, 5.9400000e+01, 5.9500000e+01, 5.9600000e+01, 5.9700000e+01, 5.9800000e+01, 5.9900000e+01, 6.0000000e+01, 6.0100000e+01, 6.0200000e+01, 6.0300000e+01, 6.0400000e+01, 6.0500000e+01, 6.0600000e+01, 6.0700000e+01, 6.0800000e+01, 6.0900000e+01, 6.1000000e+01, 6.1100000e+01, 6.1200000e+01, 6.1300000e+01, 6.1400000e+01, 6.1500000e+01}, - step = { 0.0000000e+00, 2.4006265e-07, 4.8295177e-07, 7.2866479e-07, 9.7718728e-07, 1.2285079e-06, 1.4826309e-06, 1.7395742e-06, 1.9993550e-06, 2.2619756e-06, 2.5274223e-06, 2.7956789e-06, 3.0667428e-06, 3.3406289e-06, 3.6173596e-06, 3.8969486e-06, 4.1793947e-06, 4.4646897e-06, 4.7528343e-06, 5.0438467e-06, 5.3377558e-06, 5.6345861e-06, 5.9343474e-06, 6.2370398e-06, 6.5426686e-06, 6.8512552e-06, 7.1628327e-06, 7.4774306e-06, 7.7950618e-06, 8.1157254e-06, 8.4394219e-06, 8.7661681e-06, 9.0959991e-06, 9.4289540e-06, 9.7650592e-06, 1.0104324e-05, 1.0446751e-05, 1.0792355e-05, 1.1141171e-05, 1.1493241e-05, 1.1848601e-05, 1.2207265e-05, 1.2569237e-05, 1.2934525e-05, 1.3303153e-05, 1.3675156e-05, 1.4050562e-05, 1.4429386e-05, 1.4811629e-05, 1.5197295e-05, 1.5586405e-05, 1.5978991e-05, 1.6375085e-05, 1.6774703e-05, 1.7177841e-05, 1.7584493e-05, 1.7994669e-05, 1.8408400e-05, 1.8825724e-05, 1.9246667e-05, 1.9671233e-05, 2.0099417e-05, 2.0531221e-05, 2.0966668e-05, 2.1405793e-05, 2.1848624e-05, 2.2295170e-05, 2.2745428e-05, 2.3199393e-05, 2.3657078e-05, 2.4118504e-05, 2.4583691e-05, 2.5052642e-05, 2.5525340e-05, 2.6001774e-05, 2.6481946e-05, 2.6965880e-05, 2.7453603e-05, 2.7945129e-05, 2.8440454e-05, 2.8939572e-05, 2.9442495e-05, 2.9949262e-05, 3.0459926e-05, 3.0974534e-05, 3.1493113e-05, 3.2015677e-05, 3.2542251e-05, 3.3072879e-05, 3.3607626e-05, 3.4146559e-05, 3.4689730e-05, 3.5237180e-05, 3.5788958e-05, 3.6345129e-05, 3.6905780e-05, 3.7471004e-05, 3.8040874e-05, 3.8615449e-05, 3.9194790e-05, 3.9778975e-05, 4.0368104e-05, 4.0962285e-05, 4.1561611e-05, 4.2166151e-05, 4.2775962e-05, 4.3391115e-05, 4.4011702e-05, 4.4637834e-05, 4.5269612e-05, 4.5907118e-05, 4.6550412e-05, 4.7199559e-05, 4.7854640e-05, 4.8515757e-05, 4.9183010e-05, 4.9856481e-05, 5.0536230e-05, 5.1222318e-05, 5.1914818e-05, 5.2613824e-05, 5.3319428e-05, 5.4031704e-05, 5.4750702e-05, 5.5476468e-05, 5.6209057e-05, 5.6948552e-05, 5.7695043e-05, 5.8448602e-05, 5.9209272e-05, 5.9977075e-05, 6.0752038e-05, 6.1534208e-05, 6.2323651e-05, 6.3120431e-05, 6.3924584e-05, 6.4736132e-05, 6.5555093e-05, 6.6381512e-05, 6.7215455e-05, 6.8056996e-05, 6.8906195e-05, 6.9763093e-05, 7.0627727e-05, 7.1500157e-05, 7.2380464e-05, 7.3268740e-05, 7.4165062e-05, 7.5069482e-05, 7.5982044e-05, 7.6902806e-05, 7.7831859e-05, 7.8769313e-05, 7.9715269e-05, 8.0669805e-05, 8.1632981e-05, 8.2604868e-05, 8.3585567e-05, 8.4575209e-05, 8.5573930e-05, 8.6581846e-05, 8.7599055e-05, 8.8625652e-05, 8.9661753e-05, 9.0707500e-05, 9.1763045e-05, 9.2828523e-05, 9.3904044e-05, 9.4989707e-05, 9.6085630e-05, 9.7191956e-05, 9.8308841e-05, 9.9436422e-05, 1.0057481e-04, 1.0172408e-04, 1.0288432e-04, 1.0405567e-04, 1.0523823e-04, 1.0643212e-04, 1.0763743e-04, 1.0885421e-04, 1.1008249e-04, 1.1132234e-04, 1.1257386e-04, 1.1383713e-04, 1.1511222e-04, 1.1639916e-04, 1.1769797e-04, 1.1900868e-04, 1.2033135e-04, 1.2166604e-04, 1.2301280e-04, 1.2437166e-04, 1.2574260e-04, 1.2712565e-04, 1.2852086e-04, 1.2992829e-04, 1.3134800e-04, 1.3278004e-04, 1.3422441e-04, 1.3568117e-04, 1.3715038e-04, 1.3863214e-04, 1.4012658e-04, 1.4163377e-04, 1.4315377e-04, 1.4468664e-04, 1.4623247e-04, 1.4779138e-04, 1.4936352e-04, 1.5094898e-04, 1.5254786e-04, 1.5416022e-04, 1.5578615e-04, 1.5742577e-04, 1.5907924e-04, 1.6074671e-04, 1.6242831e-04, 1.6412415e-04, 1.6583436e-04, 1.6755911e-04, 1.6929861e-04, 1.7105304e-04, 1.7282259e-04, 1.7460739e-04, 1.7640761e-04, 1.7822345e-04, 1.8005513e-04, 1.8190291e-04, 1.8376700e-04, 1.8564758e-04, 1.8754482e-04, 1.8945892e-04, 1.9139013e-04, 1.9333869e-04, 1.9530486e-04, 1.9728882e-04, 1.9929076e-04, 2.0131086e-04, 2.0334934e-04, 2.0540644e-04, 2.0748241e-04, 2.0957745e-04, 2.1169175e-04, 2.1382549e-04, 2.1597890e-04, 2.1815223e-04, 2.2034573e-04, 2.2255961e-04, 2.2479404e-04, 2.2704920e-04, 2.2932529e-04, 2.3162256e-04, 2.3394126e-04, 2.3628158e-04, 2.3864369e-04, 2.4102770e-04, 2.4343377e-04, 2.4586208e-04, 2.4831286e-04, 2.5078632e-04, 2.5328263e-04, 2.5580193e-04, 2.5834438e-04, 2.6091015e-04, 2.6349948e-04, 2.6611256e-04, 2.6874958e-04, 2.7141068e-04, 2.7409600e-04, 2.7680573e-04, 2.7954009e-04, 2.8229929e-04, 2.8508351e-04, 2.8789291e-04, 2.9072762e-04, 2.9358784e-04, 2.9647384e-04, 2.9938590e-04, 3.0232429e-04, 3.0528922e-04, 3.0828089e-04, 3.1129949e-04, 3.1434532e-04, 3.1741868e-04, 3.2051989e-04, 3.2364924e-04, 3.2680695e-04, 3.2999328e-04, 3.3320848e-04, 3.3645287e-04, 3.3972675e-04, 3.4303041e-04, 3.4636408e-04, 3.4972800e-04, 3.5312247e-04, 3.5654782e-04, 3.6000440e-04, 3.6349251e-04, 3.6701239e-04, 3.7056430e-04, 3.7414849e-04, 3.7776535e-04, 3.8141526e-04, 3.8509863e-04, 3.8881580e-04, 3.9256708e-04, 3.9635278e-04, 4.0017329e-04, 4.0402906e-04, 4.0792053e-04, 4.1184810e-04, 4.1581213e-04, 4.1981293e-04, 4.2385085e-04, 4.2792628e-04, 4.3203958e-04, 4.3619107e-04, 4.4038103e-04, 4.4460970e-04, 4.4887739e-04, 4.5318447e-04, 4.5753131e-04, 4.6191823e-04, 4.6634548e-04, 4.7081328e-04, 4.7532186e-04, 4.7987156e-04, 4.8446273e-04, 4.8909574e-04, 4.9377088e-04, 4.9848837e-04, 5.0324844e-04, 5.0805136e-04, 5.1289747e-04, 5.1778715e-04, 5.2272073e-04, 5.2769853e-04, 5.3272085e-04, 5.3778805e-04, 5.4290060e-04, 5.4805897e-04, 5.5326363e-04, 5.5851500e-04, 5.6381349e-04, 5.6915960e-04, 5.7455389e-04, 5.7999700e-04, 5.8548952e-04, 5.9103201e-04, 5.9662495e-04, 6.0226889e-04, 6.0796448e-04, 6.1371248e-04, 6.1951365e-04, 6.2536871e-04, 6.3127829e-04, 6.3724304e-04, 6.4326365e-04, 6.4934089e-04, 6.5547558e-04, 6.6166847e-04, 6.6792027e-04, 6.7423168e-04, 6.8060343e-04, 6.8703636e-04, 6.9353131e-04, 7.0008909e-04, 7.0671042e-04, 7.1339595e-04, 7.2014638e-04, 7.2696246e-04, 7.3384499e-04, 7.4079472e-04, 7.4781224e-04, 7.5489806e-04, 7.6205265e-04, 7.6927657e-04, 7.7657046e-04, 7.8393496e-04, 7.9137061e-04, 7.9887789e-04, 8.0645723e-04, 8.1410916e-04, 8.2183431e-04, 8.2963339e-04, 8.3750707e-04, 8.4545596e-04, 8.5348063e-04, 8.6158169e-04, 8.6975986e-04, 8.7801588e-04, 8.8635046e-04, 8.9476419e-04, 9.0325758e-04, 9.1183121e-04, 9.2048577e-04, 9.2922205e-04, 9.3804083e-04, 9.4694280e-04, 9.5592857e-04, 9.6499875e-04, 9.7415409e-04, 9.8339546e-04, 9.9272380e-04, 1.0021400e-03, 1.0116448e-03, 1.0212389e-03, 1.0309233e-03, 1.0406989e-03, 1.0505669e-03, 1.0605284e-03, 1.0705845e-03, 1.0807362e-03, 1.0909848e-03, 1.1013314e-03, 1.1117775e-03, 1.1223245e-03, 1.1329736e-03, 1.1437261e-03, 1.1545834e-03, 1.1655467e-03, 1.1766178e-03, 1.1877982e-03, 1.1990893e-03, 1.2104925e-03, 1.2220091e-03, 1.2336404e-03, 1.2453881e-03, 1.2572538e-03, 1.2692393e-03, 1.2813457e-03, 1.2935745e-03, 1.3059268e-03, 1.3184041e-03, 1.3310079e-03, 1.3437395e-03, 1.3566001e-03, 1.3695909e-03, 1.3827128e-03, 1.3959672e-03, 1.4093554e-03, 1.4228786e-03, 1.4365383e-03, 1.4503356e-03, 1.4642720e-03, 1.4783489e-03, 1.4925683e-03, 1.5069319e-03, 1.5214414e-03, 1.5360983e-03, 1.5509038e-03, 1.5658596e-03, 1.5809674e-03, 1.5962292e-03, 1.6116470e-03, 1.6272224e-03, 1.6429569e-03, 1.6588521e-03, 1.6749097e-03, 1.6911318e-03, 1.7075205e-03, 1.7240778e-03, 1.7408057e-03, 1.7577062e-03, 1.7747814e-03, 1.7920340e-03, 1.8094662e-03, 1.8270804e-03, 1.8448786e-03, 1.8628632e-03, 1.8810366e-03, 1.8994018e-03, 1.9179616e-03, 1.9367185e-03, 1.9556749e-03, 1.9748329e-03, 1.9941946e-03, 2.0137627e-03, 2.0335401e-03, 2.0535294e-03, 2.0737331e-03, 2.0941532e-03, 2.1147915e-03, 2.1356500e-03, 2.1567310e-03, 2.1780371e-03, 2.1995706e-03, 2.2213342e-03, 2.2433306e-03, 2.2655629e-03, 2.2880345e-03, 2.3107488e-03, 2.3337090e-03, 2.3569181e-03, 2.3803792e-03, 2.4040957e-03, 2.4280719e-03, 2.4523120e-03, 2.4768202e-03, 2.5016002e-03, 2.5266553e-03, 2.5519890e-03, 2.5776057e-03, 2.6035104e-03, 2.6297084e-03, 2.6562048e-03, 2.6830043e-03, 2.7101117e-03, 2.7375315e-03, 2.7652689e-03, 2.7933286e-03, 2.8217154e-03, 2.8504339e-03, 2.8794884e-03, 2.9088835e-03, 2.9386241e-03, 2.9687145e-03, 2.9991587e-03, 3.0299600e-03, 3.0611217e-03, 3.0926482e-03, 3.1245451e-03, 3.1568191e-03, 3.1894768e-03, 3.2225242e-03, 3.2559664e-03, 3.2898091e-03, 3.3240583e-03, 3.3587214e-03, 3.3938067e-03, 3.4293224e-03, 3.4652767e-03, 3.5016779e-03, 3.5385345e-03, 3.5758553e-03, 3.6136495e-03, 3.6519258e-03, 3.6906922e-03, 3.7299571e-03, 3.7697293e-03, 3.8100182e-03, 3.8508329e-03, 3.8921811e-03, 3.9340686e-03, 3.9765012e-03, 4.0194858e-03, 4.0630320e-03, 4.1071514e-03, 4.1518570e-03, 4.1971608e-03, 4.2430745e-03, 4.2896089e-03, 4.3367763e-03, 4.3845912e-03, 4.4330695e-03, 4.4822277e-03, 4.5320816e-03, 4.5826467e-03, 4.6339384e-03, 4.6859719e-03, 4.7387615e-03, 4.7923194e-03, 4.8466568e-03, 4.9017870e-03, 4.9577270e-03, 5.0144984e-03, 5.0721257e-03, 5.1306336e-03, 5.1900445e-03, 5.2503797e-03, 5.3116615e-03, 5.3739165e-03, 5.4371761e-03, 5.5014739e-03, 5.5668411e-03, 5.6333041e-03, 5.7008873e-03, 5.7696170e-03, 5.8395247e-03, 5.9106461e-03, 5.9830203e-03, 6.0566905e-03, 6.1317050e-03, 6.2081180e-03, 6.2859865e-03, 6.3653662e-03, 6.4463087e-03, 6.5288625e-03, 6.6130786e-03, 6.6990192e-03, 6.7867660e-03, 6.8764191e-03, 6.9680843e-03, 7.0618584e-03, 7.1578291e-03, 7.2560919e-03, 7.3567714e-03, 7.4600284e-03, 7.5660466e-03, 7.6750148e-03, 7.7871295e-03, 7.9026146e-03, 8.0217348e-03, 8.1447950e-03, 8.2721526e-03, 8.4042437e-03, 8.5415944e-03, 8.6848273e-03, 8.8346705e-03, 8.9919655e-03, 9.1576893e-03, 9.3330448e-03, 9.5195487e-03, 9.7194892e-03, 9.9376761e-03, 1.0173245e-02, 1.0408813e-02, 1.0627000e-02, 1.0826941e-02, 1.1013444e-02, 1.1188800e-02, 1.1354524e-02, 1.1511819e-02, 1.1661662e-02, 1.1804895e-02, 1.1942245e-02, 1.2074337e-02, 1.2201694e-02, 1.2324754e-02, 1.2443875e-02, 1.2559360e-02, 1.2671474e-02, 1.2780443e-02, 1.2886461e-02, 1.2989718e-02, 1.3090397e-02, 1.3188660e-02, 1.3284631e-02, 1.3378405e-02, 1.3470070e-02, 1.3559723e-02, 1.3647470e-02, 1.3733411e-02, 1.3817627e-02, 1.3900180e-02, 1.3981123e-02, 1.4060503e-02, 1.4138371e-02, 1.4214784e-02, 1.4289799e-02, 1.4363469e-02, 1.4435843e-02, 1.4506964e-02, 1.4576872e-02, 1.4645602e-02, 1.4713185e-02, 1.4779648e-02, 1.4845015e-02, 1.4909313e-02, 1.4972573e-02, 1.5034828e-02, 1.5096109e-02, 1.5156445e-02, 1.5215856e-02, 1.5274363e-02, 1.5331991e-02, 1.5388762e-02, 1.5444702e-02, 1.5499832e-02, 1.5554170e-02, 1.5607728e-02, 1.5660517e-02, 1.5712551e-02, 1.5763842e-02, 1.5814408e-02, 1.5864261e-02, 1.5913420e-02, 1.5961898e-02, 1.6009713e-02, 1.6056880e-02, 1.6103415e-02, 1.6149328e-02, 1.6194632e-02, 1.6239338e-02, 1.6283457e-02, 1.6327003e-02, 1.6369988e-02, 1.6412421e-02, 1.6454308e-02, 1.6495656e-02, 1.6536471e-02, 1.6576760e-02, 1.6616532e-02, 1.6655797e-02, 1.6694563e-02, 1.6732840e-02, 1.6770634e-02, 1.6807955e-02, 1.6844811e-02, 1.6881212e-02, 1.6917167e-02, 1.6952683e-02, 1.6987768e-02, 1.7022431e-02, 1.7056680e-02, 1.7090523e-02, 1.7123965e-02, 1.7157012e-02, 1.7189670e-02, 1.7221944e-02, 1.7253841e-02, 1.7285367e-02, 1.7316529e-02, 1.7347330e-02, 1.7377775e-02, 1.7407865e-02, 1.7437606e-02, 1.7467001e-02, 1.7496055e-02, 1.7524774e-02, 1.7553161e-02, 1.7581220e-02, 1.7608958e-02, 1.7636377e-02, 1.7663485e-02, 1.7690284e-02, 1.7716781e-02, 1.7742979e-02, 1.7768883e-02, 1.7794500e-02, 1.7819834e-02, 1.7844889e-02, 1.7869669e-02, 1.7894177e-02, 1.7918417e-02, 1.7942393e-02, 1.7966110e-02, 1.7989571e-02, 1.8012780e-02, 1.8035740e-02, 1.8058455e-02, 1.8080926e-02, 1.8103159e-02, 1.8125155e-02, 1.8146919e-02, 1.8168452e-02, 1.8189758e-02, 1.8210839e-02, 1.8231698e-02, 1.8252336e-02, 1.8272756e-02, 1.8292960e-02, 1.8312949e-02, 1.8332726e-02, 1.8352295e-02, 1.8371656e-02, 1.8390814e-02, 1.8409771e-02, 1.8428528e-02, 1.8447087e-02, 1.8465453e-02, 1.8483626e-02, 1.8501611e-02, 1.8519409e-02, 1.8537023e-02, 1.8554455e-02, 1.8571708e-02, 1.8588783e-02, 1.8605683e-02, 1.8622411e-02, 1.8638969e-02, 1.8655357e-02, 1.8671579e-02, 1.8687637e-02, 1.8703532e-02, 1.8719267e-02, 1.8734842e-02, 1.8750260e-02, 1.8765522e-02, 1.8780630e-02, 1.8795585e-02, 1.8810391e-02, 1.8825048e-02, 1.8839557e-02, 1.8853921e-02, 1.8868140e-02, 1.8882217e-02, 1.8896154e-02, 1.8909951e-02, 1.8923611e-02, 1.8937134e-02, 1.8950522e-02, 1.8963776e-02, 1.8976898e-02, 1.8989889e-02, 1.9002750e-02, 1.9015481e-02, 1.9028085e-02, 1.9040562e-02, 1.9052915e-02, 1.9065143e-02, 1.9077250e-02, 1.9089235e-02, 1.9101101e-02, 1.9112849e-02, 1.9124480e-02, 1.9135997e-02, 1.9147400e-02, 1.9158691e-02, 1.9169871e-02, 1.9180942e-02, 1.9191906e-02, 1.9202763e-02, 1.9213516e-02, 1.9224165e-02, 1.9234712e-02, 1.9245158e-02, 1.9255504e-02, 1.9265753e-02, 1.9275905e-02, 1.9285961e-02, 1.9295922e-02, 1.9305790e-02, 1.9315566e-02, 1.9325250e-02, 1.9334844e-02, 1.9344349e-02, 1.9353765e-02, 1.9363094e-02, 1.9372335e-02, 1.9381490e-02, 1.9390561e-02, 1.9399546e-02, 1.9408448e-02, 1.9417267e-02, 1.9426003e-02, 1.9434658e-02, 1.9443232e-02, 1.9451725e-02, 1.9460139e-02, 1.9468473e-02, 1.9476729e-02, 1.9484907e-02, 1.9493009e-02, 1.9501033e-02, 1.9508982e-02, 1.9516856e-02, 1.9524655e-02, 1.9532380e-02, 1.9540032e-02, 1.9547611e-02, 1.9555119e-02, 1.9562554e-02, 1.9569919e-02, 1.9577213e-02, 1.9584437e-02, 1.9591591e-02, 1.9598677e-02, 1.9605694e-02, 1.9612644e-02, 1.9619527e-02, 1.9626343e-02, 1.9633093e-02, 1.9639779e-02, 1.9646400e-02, 1.9652958e-02, 1.9659453e-02, 1.9665886e-02, 1.9672257e-02, 1.9678569e-02, 1.9684821e-02, 1.9691014e-02, 1.9697148e-02, 1.9703226e-02, 1.9709246e-02, 1.9715211e-02, 1.9721120e-02, 1.9726976e-02, 1.9732777e-02, 1.9738525e-02, 1.9744220e-02, 1.9749864e-02, 1.9755457e-02, 1.9761000e-02, 1.9766492e-02, 1.9771935e-02, 1.9777330e-02, 1.9782676e-02, 1.9787974e-02, 1.9793226e-02, 1.9798430e-02, 1.9803589e-02, 1.9808701e-02, 1.9813768e-02, 1.9818791e-02, 1.9823768e-02, 1.9828702e-02, 1.9833592e-02, 1.9838438e-02, 1.9843241e-02, 1.9848001e-02, 1.9852718e-02, 1.9857393e-02, 1.9862026e-02, 1.9866618e-02, 1.9871167e-02, 1.9875676e-02, 1.9880144e-02, 1.9884571e-02, 1.9888958e-02, 1.9893305e-02, 1.9897612e-02, 1.9901879e-02, 1.9906108e-02, 1.9910298e-02, 1.9914450e-02, 1.9918563e-02, 1.9922638e-02, 1.9926676e-02, 1.9930677e-02, 1.9934641e-02, 1.9938569e-02, 1.9942460e-02, 1.9946316e-02, 1.9950136e-02, 1.9953922e-02, 1.9957673e-02, 1.9961391e-02, 1.9965074e-02, 1.9968724e-02, 1.9972341e-02, 1.9975925e-02, 1.9979477e-02, 1.9982997e-02, 1.9986485e-02, 1.9989941e-02, 1.9993367e-02, 1.9996761e-02, 2.0000125e-02, 2.0003459e-02, 2.0006762e-02, 2.0010036e-02, 2.0013281e-02, 2.0016496e-02, 2.0019682e-02, 2.0022840e-02, 2.0025969e-02, 2.0029070e-02, 2.0032144e-02, 2.0035190e-02, 2.0038208e-02, 2.0041200e-02, 2.0044165e-02, 2.0047103e-02, 2.0050015e-02, 2.0052901e-02, 2.0055762e-02, 2.0058596e-02, 2.0061406e-02, 2.0064190e-02, 2.0066949e-02, 2.0069683e-02, 2.0072393e-02, 2.0075078e-02, 2.0077740e-02, 2.0080377e-02, 2.0082990e-02, 2.0085579e-02, 2.0088145e-02, 2.0090687e-02, 2.0093207e-02, 2.0095703e-02, 2.0098176e-02, 2.0100627e-02, 2.0103055e-02, 2.0105461e-02, 2.0107845e-02, 2.0110208e-02, 2.0112548e-02, 2.0114867e-02, 2.0117164e-02, 2.0119440e-02, 2.0121695e-02, 2.0123930e-02, 2.0126143e-02, 2.0128337e-02, 2.0130510e-02, 2.0132664e-02, 2.0134797e-02, 2.0136912e-02, 2.0139007e-02, 2.0141083e-02, 2.0143140e-02, 2.0145178e-02, 2.0147198e-02, 2.0149200e-02, 2.0151184e-02, 2.0153150e-02, 2.0155099e-02, 2.0157030e-02, 2.0158944e-02, 2.0160842e-02, 2.0162722e-02, 2.0164586e-02, 2.0166434e-02, 2.0168266e-02, 2.0170082e-02, 2.0171882e-02, 2.0173667e-02, 2.0175436e-02, 2.0177191e-02, 2.0178930e-02, 2.0180655e-02, 2.0182365e-02, 2.0184061e-02, 2.0185742e-02, 2.0187410e-02, 2.0189063e-02, 2.0190703e-02, 2.0192329e-02, 2.0193941e-02, 2.0195540e-02, 2.0197126e-02, 2.0198698e-02, 2.0200257e-02, 2.0201803e-02, 2.0203335e-02, 2.0204855e-02, 2.0206363e-02, 2.0207857e-02, 2.0209339e-02, 2.0210808e-02, 2.0212265e-02, 2.0213709e-02, 2.0215141e-02, 2.0216561e-02, 2.0217968e-02, 2.0219364e-02, 2.0220747e-02, 2.0222118e-02, 2.0223476e-02, 2.0224823e-02, 2.0226158e-02, 2.0227480e-02, 2.0228791e-02, 2.0230090e-02, 2.0231377e-02, 2.0232652e-02, 2.0233915e-02, 2.0235167e-02, 2.0236407e-02, 2.0237635e-02, 2.0238852e-02, 2.0240057e-02, 2.0241251e-02, 2.0242434e-02, 2.0243605e-02, 2.0244765e-02, 2.0245914e-02, 2.0247053e-02, 2.0248180e-02, 2.0249297e-02, 2.0250404e-02, 2.0251499e-02, 2.0252585e-02, 2.0253661e-02, 2.0254726e-02, 2.0255782e-02, 2.0256827e-02, 2.0257864e-02, 2.0258890e-02, 2.0259907e-02, 2.0260915e-02, 2.0261914e-02, 2.0262904e-02, 2.0263884e-02, 2.0264856e-02, 2.0265819e-02, 2.0266774e-02, 2.0267720e-02, 2.0268657e-02, 2.0269586e-02, 2.0270507e-02, 2.0271420e-02, 2.0272324e-02, 2.0273220e-02, 2.0274109e-02, 2.0274989e-02, 2.0275861e-02, 2.0276726e-02, 2.0277583e-02, 2.0278432e-02, 2.0279274e-02, 2.0280108e-02, 2.0280934e-02, 2.0281753e-02, 2.0282565e-02, 2.0283369e-02, 2.0284166e-02, 2.0284955e-02, 2.0285737e-02, 2.0286512e-02, 2.0287280e-02, 2.0288041e-02, 2.0288794e-02, 2.0289541e-02, 2.0290280e-02, 2.0291013e-02, 2.0291738e-02, 2.0292457e-02, 2.0293170e-02, 2.0293875e-02, 2.0294574e-02, 2.0295267e-02, 2.0295953e-02, 2.0296633e-02, 2.0297306e-02, 2.0297973e-02, 2.0298635e-02, 2.0299290e-02, 2.0299939e-02, 2.0300582e-02, 2.0301220e-02, 2.0301851e-02, 2.0302477e-02, 2.0303098e-02, 2.0303713e-02, 2.0304323e-02, 2.0304928e-02, 2.0305527e-02, 2.0306121e-02, 2.0306710e-02, 2.0307294e-02, 2.0307874e-02, 2.0308448e-02, 2.0309018e-02, 2.0309583e-02, 2.0310144e-02, 2.0310700e-02, 2.0311252e-02, 2.0311799e-02, 2.0312343e-02, 2.0312882e-02, 2.0313416e-02, 2.0313947e-02, 2.0314473e-02, 2.0314996e-02, 2.0315515e-02, 2.0316029e-02, 2.0316540e-02, 2.0317047e-02, 2.0317550e-02, 2.0318049e-02, 2.0318544e-02, 2.0319036e-02, 2.0319523e-02, 2.0320007e-02, 2.0320487e-02, 2.0320964e-02, 2.0321437e-02, 2.0321905e-02, 2.0322371e-02, 2.0322832e-02, 2.0323290e-02, 2.0323744e-02, 2.0324194e-02, 2.0324641e-02, 2.0325083e-02, 2.0325523e-02, 2.0325958e-02, 2.0326390e-02, 2.0326818e-02, 2.0327243e-02, 2.0327663e-02, 2.0328081e-02, 2.0328495e-02, 2.0328905e-02, 2.0329311e-02, 2.0329714e-02, 2.0330114e-02, 2.0330510e-02, 2.0330903e-02, 2.0331292e-02, 2.0331678e-02, 2.0332060e-02, 2.0332439e-02, 2.0332814e-02, 2.0333186e-02, 2.0333555e-02, 2.0333920e-02, 2.0334282e-02, 2.0334641e-02, 2.0334996e-02, 2.0335348e-02, 2.0335697e-02, 2.0336042e-02, 2.0336385e-02, 2.0336724e-02, 2.0337060e-02, 2.0337393e-02, 2.0337723e-02, 2.0338050e-02, 2.0338373e-02, 2.0338694e-02, 2.0339012e-02, 2.0339326e-02, 2.0339638e-02, 2.0339947e-02, 2.0340252e-02, 2.0340555e-02, 2.0340855e-02, 2.0341151e-02, 2.0341445e-02, 2.0341736e-02, 2.0342024e-02, 2.0342310e-02, 2.0342592e-02, 2.0342872e-02, 2.0343149e-02, 2.0343422e-02, 2.0343693e-02, 2.0343962e-02, 2.0344227e-02, 2.0344490e-02, 2.0344750e-02, 2.0345007e-02, 2.0345261e-02, 2.0345512e-02, 2.0345761e-02, 2.0346006e-02, 2.0346249e-02}, - continuous = true, - nFuture=700, - nPast=700); - -end ZeroPhaseInterpolator; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/ZeroPhaseInterpolator/package.order b/Noise 1.0 Beta.1/Examples/RailIrregularities/ZeroPhaseInterpolator/package.order deleted file mode 100644 index e69de29b..00000000 diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/package.mo b/Noise 1.0 Beta.1/Examples/RailIrregularities/package.mo deleted file mode 100644 index 33479b2c..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/package.mo +++ /dev/null @@ -1,4 +0,0 @@ -within Noise.Examples; -package RailIrregularities "A package of examples demonstrating the shaping of rail irregularities" - extends Modelica.Icons.ExamplesPackage; -end RailIrregularities; diff --git a/Noise 1.0 Beta.1/Examples/RailIrregularities/package.order b/Noise 1.0 Beta.1/Examples/RailIrregularities/package.order deleted file mode 100644 index 6217fc4e..00000000 --- a/Noise 1.0 Beta.1/Examples/RailIrregularities/package.order +++ /dev/null @@ -1,5 +0,0 @@ -TrainOnTrack -Comparisons -MinimumPhaseInterpolator -ZeroPhaseInterpolator -Parts diff --git a/Noise 1.0 Beta.1/Examples/SignalBasedNoise.mo b/Noise 1.0 Beta.1/Examples/SignalBasedNoise.mo deleted file mode 100644 index ddf5739f..00000000 --- a/Noise 1.0 Beta.1/Examples/SignalBasedNoise.mo +++ /dev/null @@ -1,69 +0,0 @@ -within Noise.Examples; -model SignalBasedNoise "Demonstrates the a simple case of signal based noise" - extends Modelica.Icons.Example; - parameter Modelica.SIunits.Radius r = 1 "Radius of circle"; - constant Real pi = Modelica.Constants.pi "Constant pi"; - inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed - annotation (Placement(transformation(extent={{-20,40},{0,60}}))); - Noise.Sources.SignalBasedNoise signalBasedNoise( - useTime=false, - y_min=-0.05, - y_max=0.05, - samplePeriod=0.5) - annotation (Placement(transformation(extent={{-20,0},{0,20}}))); - Modelica.Blocks.Sources.RealExpression pathParameter(y=r*mod(2*pi*time, 2*pi)) - annotation (Placement(transformation(extent={{-72,0},{-40,20}}))); -equation - connect(pathParameter.y, signalBasedNoise.u) annotation (Line( - points={{-38.4,10},{-22,10}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (experiment(StopTime=4), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), - Documentation(info=" -

-This example demonstrates a simple use of the signal based noise block: -

- -
    -
  • The input to block signalBasedNoise is the path parameter of a circle: The path parameter s - starts at s=0 and continuously increases until it arrives at s=2*pi*r at the same point again - (default: r=1). - The simulation scenario is defined so that the path parameter increases with time until it reaches - s=2*pi*r at every second and then the path parameter is reset to s=0.
  • -
  • The signalBasedNoise block defines a noise band of -0.05 .. 0.05. This could be interpreted as - the height of a rough circle surface. A sample period of 0.5 in the input (so in the path parameter) - is used. This means that along the circle 2*pi*r / 0.5 + 1 random values are drawn.
  • -
- -

-The result of a simulation is show in the next diagram. It can be clearly seen that the -noise repeats after every second (when the path parameter is reset to s=0): -

- -

- -
-

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); -end SignalBasedNoise; diff --git a/Noise 1.0 Beta.1/Examples/SignalInterpolation.mo b/Noise 1.0 Beta.1/Examples/SignalInterpolation.mo deleted file mode 100644 index a82139dd..00000000 --- a/Noise 1.0 Beta.1/Examples/SignalInterpolation.mo +++ /dev/null @@ -1,94 +0,0 @@ -within Noise.Examples; -model SignalInterpolation - "Demonstrates signal-based noise with different interpolations" - import Modelica_Noise; - extends Modelica.Icons.Example; - parameter Real startTime = 0.5; - parameter Real y_off = -1.0; - constant Real pi = Modelica.Constants.pi "Constant pi"; - - inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed(useAutomaticSeed=false, enableNoise=true) - annotation (Placement(transformation(extent={{60,60},{80,80}}))); - - Noise.Sources.SignalBasedNoise constantNoise( - redeclare package interpolation = - Interpolators.Constant, - y_min=-1, - y_max=+1, - useAutomaticLocalSeed=false, - samplePeriod=0.1, - useTime=false) - annotation (Placement(transformation(extent={{-60,70},{-40,90}}))); - Modelica.Blocks.Sources.RealExpression signal(y=sin(pi*time)) - annotation (Placement(transformation(extent={{-100,70},{-80,90}}))); - Noise.Sources.SignalBasedNoise linearNoise( - useTime=false, - y_min=-1, - y_max=+1, - redeclare package interpolation = - Interpolators.Linear, - useAutomaticLocalSeed=false, - samplePeriod=0.1) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Noise.Sources.SignalBasedNoise smoothNoise( - useTime=false, - y_min=-1, - y_max=+1, - useAutomaticLocalSeed=false, - redeclare package interpolation = - Interpolators.SmoothIdealLowPass, - samplePeriod=0.1) - annotation (Placement(transformation(extent={{-60,-30},{-40,-10}}))); -equation - connect(signal.y, constantNoise.u) annotation (Line( - points={{-79,80},{-62,80}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(linearNoise.u, signal.y) annotation (Line( - points={{-62,30},{-72,30},{-72,80},{-79,80}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(smoothNoise.u, signal.y) annotation (Line( - points={{-62,-20},{-72,-20},{-72,80},{-79,80}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (experiment(StopTime=2), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), - Documentation(info=" -

-This example demonstrates the -Blocks.Noise.SignalBasedNoise -block by using various interpolation methods. The input to the blocks is a sine and -the argument of the sine, as well as the sample periods of the blocks are selected in such a way -that a sample instant hits the sine for every full period. -Therefore, the noise is repeated after every full period of the sine. -The result of a simulation is show in the next diagram, plotting the (noise) output of the -blocks over the sine output: -

- -

- -
-

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); -end SignalInterpolation; diff --git a/Noise 1.0 Beta.1/Examples/Utilities/RailIrregularities/package.mo b/Noise 1.0 Beta.1/Examples/Utilities/RailIrregularities/package.mo deleted file mode 100644 index e3b9934a..00000000 --- a/Noise 1.0 Beta.1/Examples/Utilities/RailIrregularities/package.mo +++ /dev/null @@ -1,52 +0,0 @@ -within Noise.Examples.Utilities; -package RailIrregularities "Provides a filter function for rail irregularities" - - // // Zero-phase, ds = 2.0m - // extends Interpolators.StepResponse( - // T = { -6.8000000e+01, -6.6000000e+01, -6.4000000e+01, -6.2000000e+01, -6.0000000e+01, -5.8000000e+01, -5.6000000e+01, -5.4000000e+01, -5.2000000e+01, -5.0000000e+01, -4.8000000e+01, -4.6000000e+01, -4.4000000e+01, -4.2000000e+01, -4.0000000e+01, -3.8000000e+01, -3.6000000e+01, -3.4000000e+01, -3.2000000e+01, -3.0000000e+01, -2.8000000e+01, -2.6000000e+01, -2.4000000e+01, -2.2000000e+01, -2.0000000e+01, -1.8000000e+01, -1.6000000e+01, -1.4000000e+01, -1.2000000e+01, -1.0000000e+01, -8.0000000e+00, -6.0000000e+00, -4.0000000e+00, -2.0000000e+00, 0.0000000e+00, 2.0000000e+00, 4.0000000e+00, 6.0000000e+00, 8.0000000e+00, 1.0000000e+01, 1.2000000e+01, 1.4000000e+01, 1.6000000e+01, 1.8000000e+01, 2.0000000e+01, 2.2000000e+01, 2.4000000e+01, 2.6000000e+01, 2.8000000e+01, 3.0000000e+01, 3.2000000e+01, 3.4000000e+01, 3.6000000e+01, 3.8000000e+01, 4.0000000e+01, 4.2000000e+01, 4.4000000e+01, 4.6000000e+01, 4.8000000e+01, 5.0000000e+01, 5.2000000e+01, 5.4000000e+01, 5.6000000e+01, 5.8000000e+01, 6.0000000e+01, 6.2000000e+01, 6.4000000e+01, 6.6000000e+01}, - // step = { 0.0000000e+00, 3.5944165e-08, 8.1188627e-08, 1.3857170e-07, 2.1030568e-07, 2.9744473e-07, 4.0104052e-07, 5.2247183e-07, 6.6401986e-07, 8.3071971e-07, 1.0299164e-06, 1.2691607e-06, 1.5566169e-06, 1.9006882e-06, 2.3089517e-06, 2.7922825e-06, 3.3685752e-06, 4.0596154e-06, 4.8893693e-06, 5.8862117e-06, 7.0821677e-06, 8.5150788e-06, 1.0236787e-05, 1.2310851e-05, 1.4814242e-05, 1.7854722e-05, 2.1579348e-05, 2.6169160e-05, 3.1851772e-05, 3.8915706e-05, 4.7761968e-05, 5.8943018e-05, 7.3800943e-05, 9.7683565e-05, 1.3328657e-04, 1.6888958e-04, 1.9277220e-04, 2.0763012e-04, 2.1881117e-04, 2.2765744e-04, 2.3472137e-04, 2.4040398e-04, 2.4499379e-04, 2.4871842e-04, 2.5175890e-04, 2.5426229e-04, 2.5633635e-04, 2.5805806e-04, 2.5949097e-04, 2.6068693e-04, 2.6168377e-04, 2.6251353e-04, 2.6320457e-04, 2.6378086e-04, 2.6426419e-04, 2.6467245e-04, 2.6501652e-04, 2.6530398e-04, 2.6554322e-04, 2.6574242e-04, 2.6590912e-04, 2.6605067e-04, 2.6617210e-04, 2.6627570e-04, 2.6636284e-04, 2.6643457e-04, 2.6649195e-04, 2.6653720e-04}, - // continuous = true, - // nFuture=500, - // nPast=500); - - // // Zero-phase, ds = 0.5m - // extends Interpolators.StepResponse( - // T = { -5.9500000e+01, -5.9000000e+01, -5.8500000e+01, -5.8000000e+01, -5.7500000e+01, -5.7000000e+01, -5.6500000e+01, -5.6000000e+01, -5.5500000e+01, -5.5000000e+01, -5.4500000e+01, -5.4000000e+01, -5.3500000e+01, -5.3000000e+01, -5.2500000e+01, -5.2000000e+01, -5.1500000e+01, -5.1000000e+01, -5.0500000e+01, -5.0000000e+01, -4.9500000e+01, -4.9000000e+01, -4.8500000e+01, -4.8000000e+01, -4.7500000e+01, -4.7000000e+01, -4.6500000e+01, -4.6000000e+01, -4.5500000e+01, -4.5000000e+01, -4.4500000e+01, -4.4000000e+01, -4.3500000e+01, -4.3000000e+01, -4.2500000e+01, -4.2000000e+01, -4.1500000e+01, -4.1000000e+01, -4.0500000e+01, -4.0000000e+01, -3.9500000e+01, -3.9000000e+01, -3.8500000e+01, -3.8000000e+01, -3.7500000e+01, -3.7000000e+01, -3.6500000e+01, -3.6000000e+01, -3.5500000e+01, -3.5000000e+01, -3.4500000e+01, -3.4000000e+01, -3.3500000e+01, -3.3000000e+01, -3.2500000e+01, -3.2000000e+01, -3.1500000e+01, -3.1000000e+01, -3.0500000e+01, -3.0000000e+01, -2.9500000e+01, -2.9000000e+01, -2.8500000e+01, -2.8000000e+01, -2.7500000e+01, -2.7000000e+01, -2.6500000e+01, -2.6000000e+01, -2.5500000e+01, -2.5000000e+01, -2.4500000e+01, -2.4000000e+01, -2.3500000e+01, -2.3000000e+01, -2.2500000e+01, -2.2000000e+01, -2.1500000e+01, -2.1000000e+01, -2.0500000e+01, -2.0000000e+01, -1.9500000e+01, -1.9000000e+01, -1.8500000e+01, -1.8000000e+01, -1.7500000e+01, -1.7000000e+01, -1.6500000e+01, -1.6000000e+01, -1.5500000e+01, -1.5000000e+01, -1.4500000e+01, -1.4000000e+01, -1.3500000e+01, -1.3000000e+01, -1.2500000e+01, -1.2000000e+01, -1.1500000e+01, -1.1000000e+01, -1.0500000e+01, -1.0000000e+01, -9.5000000e+00, -9.0000000e+00, -8.5000000e+00, -8.0000000e+00, -7.5000000e+00, -7.0000000e+00, -6.5000000e+00, -6.0000000e+00, -5.5000000e+00, -5.0000000e+00, -4.5000000e+00, -4.0000000e+00, -3.5000000e+00, -3.0000000e+00, -2.5000000e+00, -2.0000000e+00, -1.5000000e+00, -1.0000000e+00, -5.0000000e-01, 0.0000000e+00, 5.0000000e-01, 1.0000000e+00, 1.5000000e+00, 2.0000000e+00, 2.5000000e+00, 3.0000000e+00, 3.5000000e+00, 4.0000000e+00, 4.5000000e+00, 5.0000000e+00, 5.5000000e+00, 6.0000000e+00, 6.5000000e+00, 7.0000000e+00, 7.5000000e+00, 8.0000000e+00, 8.5000000e+00, 9.0000000e+00, 9.5000000e+00, 1.0000000e+01, 1.0500000e+01, 1.1000000e+01, 1.1500000e+01, 1.2000000e+01, 1.2500000e+01, 1.3000000e+01, 1.3500000e+01, 1.4000000e+01, 1.4500000e+01, 1.5000000e+01, 1.5500000e+01, 1.6000000e+01, 1.6500000e+01, 1.7000000e+01, 1.7500000e+01, 1.8000000e+01, 1.8500000e+01, 1.9000000e+01, 1.9500000e+01, 2.0000000e+01, 2.0500000e+01, 2.1000000e+01, 2.1500000e+01, 2.2000000e+01, 2.2500000e+01, 2.3000000e+01, 2.3500000e+01, 2.4000000e+01, 2.4500000e+01, 2.5000000e+01, 2.5500000e+01, 2.6000000e+01, 2.6500000e+01, 2.7000000e+01, 2.7500000e+01, 2.8000000e+01, 2.8500000e+01, 2.9000000e+01, 2.9500000e+01, 3.0000000e+01, 3.0500000e+01, 3.1000000e+01, 3.1500000e+01, 3.2000000e+01, 3.2500000e+01, 3.3000000e+01, 3.3500000e+01, 3.4000000e+01, 3.4500000e+01, 3.5000000e+01, 3.5500000e+01, 3.6000000e+01, 3.6500000e+01, 3.7000000e+01, 3.7500000e+01, 3.8000000e+01, 3.8500000e+01, 3.9000000e+01, 3.9500000e+01, 4.0000000e+01, 4.0500000e+01, 4.1000000e+01, 4.1500000e+01, 4.2000000e+01, 4.2500000e+01, 4.3000000e+01, 4.3500000e+01, 4.4000000e+01, 4.4500000e+01, 4.5000000e+01, 4.5500000e+01, 4.6000000e+01, 4.6500000e+01, 4.7000000e+01, 4.7500000e+01, 4.8000000e+01, 4.8500000e+01, 4.9000000e+01, 4.9500000e+01, 5.0000000e+01, 5.0500000e+01, 5.1000000e+01, 5.1500000e+01, 5.2000000e+01, 5.2500000e+01, 5.3000000e+01, 5.3500000e+01, 5.4000000e+01, 5.4500000e+01, 5.5000000e+01, 5.5500000e+01, 5.6000000e+01, 5.6500000e+01, 5.7000000e+01, 5.7500000e+01, 5.8000000e+01, 5.8500000e+01, 5.9000000e+01}, - // step = { 0.0000000e+00, 1.2789295e-08, 2.6717758e-08, 4.1835140e-08, 5.8191254e-08, 7.5832279e-08, 9.4796337e-08, 1.1511418e-07, 1.3681302e-07, 1.5991847e-07, 1.8445109e-07, 2.1042467e-07, 2.3785683e-07, 2.6678496e-07, 2.9727254e-07, 3.2940848e-07, 3.6330452e-07, 3.9908713e-07, 4.3688669e-07, 4.7683093e-07, 5.1904109e-07, 5.6362745e-07, 6.1068231e-07, 6.6027621e-07, 7.1246961e-07, 7.6733287e-07, 8.2495468e-07, 8.8544402e-07, 9.4893851e-07, 1.0156086e-06, 1.0856454e-06, 1.1592362e-06, 1.2365379e-06, 1.3176625e-06, 1.4026806e-06, 1.4916383e-06, 1.5845872e-06, 1.6816160e-06, 1.7828556e-06, 1.8884698e-06, 1.9986617e-06, 2.1136861e-06, 2.2338464e-06, 2.3594757e-06, 2.4909183e-06, 2.6285223e-06, 2.7726373e-06, 2.9235993e-06, 3.0817167e-06, 3.2472799e-06, 3.4205765e-06, 3.6019038e-06, 3.7915988e-06, 3.9900595e-06, 4.1977313e-06, 4.4150778e-06, 4.6425767e-06, 4.8807448e-06, 5.1301606e-06, 5.3914290e-06, 5.6651191e-06, 5.9517498e-06, 6.2518141e-06, 6.5658054e-06, 6.8942692e-06, 7.2378713e-06, 7.5974338e-06, 7.9739379e-06, 8.3685055e-06, 8.7823613e-06, 9.2167666e-06, 9.6729071e-06, 1.0151808e-05, 1.0654401e-05, 1.1181655e-05, 1.1734606e-05, 1.2314343e-05, 1.2922067e-05, 1.3559189e-05, 1.4227424e-05, 1.4928808e-05, 1.5665608e-05, 1.6440198e-05, 1.7254906e-05, 1.8111897e-05, 1.9013327e-05, 1.9961610e-05, 2.0959441e-05, 2.2009694e-05, 2.3115502e-05, 2.4280411e-05, 2.5508340e-05, 2.6803322e-05, 2.8169288e-05, 2.9610359e-05, 3.1131406e-05, 3.2738190e-05, 3.4437325e-05, 3.6236202e-05, 3.8142384e-05, 4.0163139e-05, 4.2306363e-05, 4.4582073e-05, 4.7002879e-05, 4.9582716e-05, 5.2335141e-05, 5.5274350e-05, 5.8418424e-05, 6.1789555e-05, 6.5413061e-05, 6.9320688e-05, 7.3553783e-05, 7.8162204e-05, 8.3207012e-05, 8.8764231e-05, 9.4938865e-05, 1.0189482e-04, 1.1003314e-04, 1.2040643e-04, 1.3327499e-04, 1.4614356e-04, 1.5651685e-04, 1.6465516e-04, 1.7161112e-04, 1.7778576e-04, 1.8334297e-04, 1.8838778e-04, 1.9299620e-04, 1.9722930e-04, 2.0113692e-04, 2.0476043e-04, 2.0813156e-04, 2.1127564e-04, 2.1421485e-04, 2.1696727e-04, 2.1954711e-04, 2.2196791e-04, 2.2424362e-04, 2.2638685e-04, 2.2840760e-04, 2.3031378e-04, 2.3211266e-04, 2.3381180e-04, 2.3541858e-04, 2.3693963e-04, 2.3838070e-04, 2.3974666e-04, 2.4104165e-04, 2.4226958e-04, 2.4343448e-04, 2.4454029e-04, 2.4559055e-04, 2.4658838e-04, 2.4753666e-04, 2.4843809e-04, 2.4929508e-04, 2.5010979e-04, 2.5088438e-04, 2.5162118e-04, 2.5232256e-04, 2.5299080e-04, 2.5362792e-04, 2.5423564e-04, 2.5481538e-04, 2.5536833e-04, 2.5589559e-04, 2.5639818e-04, 2.5687708e-04, 2.5733322e-04, 2.5776762e-04, 2.5818148e-04, 2.5857605e-04, 2.5895255e-04, 2.5931211e-04, 2.5965572e-04, 2.5998418e-04, 2.6029817e-04, 2.6059824e-04, 2.6088487e-04, 2.6115856e-04, 2.6141983e-04, 2.6166924e-04, 2.6190741e-04, 2.6213491e-04, 2.6235225e-04, 2.6255993e-04, 2.6275839e-04, 2.6294808e-04, 2.6312941e-04, 2.6330271e-04, 2.6346827e-04, 2.6362639e-04, 2.6377735e-04, 2.6392146e-04, 2.6405907e-04, 2.6419051e-04, 2.6431614e-04, 2.6443630e-04, 2.6455132e-04, 2.6466152e-04, 2.6476713e-04, 2.6486837e-04, 2.6496540e-04, 2.6505835e-04, 2.6514731e-04, 2.6523232e-04, 2.6531345e-04, 2.6539075e-04, 2.6546434e-04, 2.6553438e-04, 2.6560105e-04, 2.6566454e-04, 2.6572503e-04, 2.6578265e-04, 2.6583752e-04, 2.6588971e-04, 2.6593930e-04, 2.6598636e-04, 2.6603095e-04, 2.6607316e-04, 2.6611310e-04, 2.6615090e-04, 2.6618668e-04, 2.6622058e-04, 2.6625271e-04, 2.6628320e-04, 2.6631213e-04, 2.6633956e-04, 2.6636554e-04, 2.6639007e-04, 2.6641317e-04, 2.6643487e-04, 2.6645519e-04, 2.6647415e-04, 2.6649179e-04, 2.6650815e-04, 2.6652327e-04, 2.6653720e-04}, - // continuous = true, - // nFuture=500, - // nPast=500); - - // Zero-phase, ds = 0.1m - - extends Interpolators.StepResponse( - T = { -5.8100000e+01, -5.8000000e+01, -5.7900000e+01, -5.7800000e+01, -5.7700000e+01, -5.7600000e+01, -5.7500000e+01, -5.7400000e+01, -5.7300000e+01, -5.7200000e+01, -5.7100000e+01, -5.7000000e+01, -5.6900000e+01, -5.6800000e+01, -5.6700000e+01, -5.6600000e+01, -5.6500000e+01, -5.6400000e+01, -5.6300000e+01, -5.6200000e+01, -5.6100000e+01, -5.6000000e+01, -5.5900000e+01, -5.5800000e+01, -5.5700000e+01, -5.5600000e+01, -5.5500000e+01, -5.5400000e+01, -5.5300000e+01, -5.5200000e+01, -5.5100000e+01, -5.5000000e+01, -5.4900000e+01, -5.4800000e+01, -5.4700000e+01, -5.4600000e+01, -5.4500000e+01, -5.4400000e+01, -5.4300000e+01, -5.4200000e+01, -5.4100000e+01, -5.4000000e+01, -5.3900000e+01, -5.3800000e+01, -5.3700000e+01, -5.3600000e+01, -5.3500000e+01, -5.3400000e+01, -5.3300000e+01, -5.3200000e+01, -5.3100000e+01, -5.3000000e+01, -5.2900000e+01, -5.2800000e+01, -5.2700000e+01, -5.2600000e+01, -5.2500000e+01, -5.2400000e+01, -5.2300000e+01, -5.2200000e+01, -5.2100000e+01, -5.2000000e+01, -5.1900000e+01, -5.1800000e+01, -5.1700000e+01, -5.1600000e+01, -5.1500000e+01, -5.1400000e+01, -5.1300000e+01, -5.1200000e+01, -5.1100000e+01, -5.1000000e+01, -5.0900000e+01, -5.0800000e+01, -5.0700000e+01, -5.0600000e+01, -5.0500000e+01, -5.0400000e+01, -5.0300000e+01, -5.0200000e+01, -5.0100000e+01, -5.0000000e+01, -4.9900000e+01, -4.9800000e+01, -4.9700000e+01, -4.9600000e+01, -4.9500000e+01, -4.9400000e+01, -4.9300000e+01, -4.9200000e+01, -4.9100000e+01, -4.9000000e+01, -4.8900000e+01, -4.8800000e+01, -4.8700000e+01, -4.8600000e+01, -4.8500000e+01, -4.8400000e+01, -4.8300000e+01, -4.8200000e+01, -4.8100000e+01, -4.8000000e+01, -4.7900000e+01, -4.7800000e+01, -4.7700000e+01, -4.7600000e+01, -4.7500000e+01, -4.7400000e+01, -4.7300000e+01, -4.7200000e+01, -4.7100000e+01, -4.7000000e+01, -4.6900000e+01, -4.6800000e+01, -4.6700000e+01, -4.6600000e+01, -4.6500000e+01, -4.6400000e+01, -4.6300000e+01, -4.6200000e+01, -4.6100000e+01, -4.6000000e+01, -4.5900000e+01, -4.5800000e+01, -4.5700000e+01, -4.5600000e+01, -4.5500000e+01, -4.5400000e+01, -4.5300000e+01, -4.5200000e+01, -4.5100000e+01, -4.5000000e+01, -4.4900000e+01, -4.4800000e+01, -4.4700000e+01, -4.4600000e+01, -4.4500000e+01, -4.4400000e+01, -4.4300000e+01, -4.4200000e+01, -4.4100000e+01, -4.4000000e+01, -4.3900000e+01, -4.3800000e+01, -4.3700000e+01, -4.3600000e+01, -4.3500000e+01, -4.3400000e+01, -4.3300000e+01, -4.3200000e+01, -4.3100000e+01, -4.3000000e+01, -4.2900000e+01, -4.2800000e+01, -4.2700000e+01, -4.2600000e+01, -4.2500000e+01, -4.2400000e+01, -4.2300000e+01, -4.2200000e+01, -4.2100000e+01, -4.2000000e+01, -4.1900000e+01, -4.1800000e+01, -4.1700000e+01, -4.1600000e+01, -4.1500000e+01, -4.1400000e+01, -4.1300000e+01, -4.1200000e+01, -4.1100000e+01, -4.1000000e+01, -4.0900000e+01, -4.0800000e+01, -4.0700000e+01, -4.0600000e+01, -4.0500000e+01, -4.0400000e+01, -4.0300000e+01, -4.0200000e+01, -4.0100000e+01, -4.0000000e+01, -3.9900000e+01, -3.9800000e+01, -3.9700000e+01, -3.9600000e+01, -3.9500000e+01, -3.9400000e+01, -3.9300000e+01, -3.9200000e+01, -3.9100000e+01, -3.9000000e+01, -3.8900000e+01, -3.8800000e+01, -3.8700000e+01, -3.8600000e+01, -3.8500000e+01, -3.8400000e+01, -3.8300000e+01, -3.8200000e+01, -3.8100000e+01, -3.8000000e+01, -3.7900000e+01, -3.7800000e+01, -3.7700000e+01, -3.7600000e+01, -3.7500000e+01, -3.7400000e+01, -3.7300000e+01, -3.7200000e+01, -3.7100000e+01, -3.7000000e+01, -3.6900000e+01, -3.6800000e+01, -3.6700000e+01, -3.6600000e+01, -3.6500000e+01, -3.6400000e+01, -3.6300000e+01, -3.6200000e+01, -3.6100000e+01, -3.6000000e+01, -3.5900000e+01, -3.5800000e+01, -3.5700000e+01, -3.5600000e+01, -3.5500000e+01, -3.5400000e+01, -3.5300000e+01, -3.5200000e+01, -3.5100000e+01, -3.5000000e+01, -3.4900000e+01, -3.4800000e+01, -3.4700000e+01, -3.4600000e+01, -3.4500000e+01, -3.4400000e+01, -3.4300000e+01, -3.4200000e+01, -3.4100000e+01, -3.4000000e+01, -3.3900000e+01, -3.3800000e+01, -3.3700000e+01, -3.3600000e+01, -3.3500000e+01, -3.3400000e+01, -3.3300000e+01, -3.3200000e+01, -3.3100000e+01, -3.3000000e+01, -3.2900000e+01, -3.2800000e+01, -3.2700000e+01, -3.2600000e+01, -3.2500000e+01, -3.2400000e+01, -3.2300000e+01, -3.2200000e+01, -3.2100000e+01, -3.2000000e+01, -3.1900000e+01, -3.1800000e+01, -3.1700000e+01, -3.1600000e+01, -3.1500000e+01, -3.1400000e+01, -3.1300000e+01, -3.1200000e+01, -3.1100000e+01, -3.1000000e+01, -3.0900000e+01, -3.0800000e+01, -3.0700000e+01, -3.0600000e+01, -3.0500000e+01, -3.0400000e+01, -3.0300000e+01, -3.0200000e+01, -3.0100000e+01, -3.0000000e+01, -2.9900000e+01, -2.9800000e+01, -2.9700000e+01, -2.9600000e+01, -2.9500000e+01, -2.9400000e+01, -2.9300000e+01, -2.9200000e+01, -2.9100000e+01, -2.9000000e+01, -2.8900000e+01, -2.8800000e+01, -2.8700000e+01, -2.8600000e+01, -2.8500000e+01, -2.8400000e+01, -2.8300000e+01, -2.8200000e+01, -2.8100000e+01, -2.8000000e+01, -2.7900000e+01, -2.7800000e+01, -2.7700000e+01, -2.7600000e+01, -2.7500000e+01, -2.7400000e+01, -2.7300000e+01, -2.7200000e+01, -2.7100000e+01, -2.7000000e+01, -2.6900000e+01, -2.6800000e+01, -2.6700000e+01, -2.6600000e+01, -2.6500000e+01, -2.6400000e+01, -2.6300000e+01, -2.6200000e+01, -2.6100000e+01, -2.6000000e+01, -2.5900000e+01, -2.5800000e+01, -2.5700000e+01, -2.5600000e+01, -2.5500000e+01, -2.5400000e+01, -2.5300000e+01, -2.5200000e+01, -2.5100000e+01, -2.5000000e+01, -2.4900000e+01, -2.4800000e+01, -2.4700000e+01, -2.4600000e+01, -2.4500000e+01, -2.4400000e+01, -2.4300000e+01, -2.4200000e+01, -2.4100000e+01, -2.4000000e+01, -2.3900000e+01, -2.3800000e+01, -2.3700000e+01, -2.3600000e+01, -2.3500000e+01, -2.3400000e+01, -2.3300000e+01, -2.3200000e+01, -2.3100000e+01, -2.3000000e+01, -2.2900000e+01, -2.2800000e+01, -2.2700000e+01, -2.2600000e+01, -2.2500000e+01, -2.2400000e+01, -2.2300000e+01, -2.2200000e+01, -2.2100000e+01, -2.2000000e+01, -2.1900000e+01, -2.1800000e+01, -2.1700000e+01, -2.1600000e+01, -2.1500000e+01, -2.1400000e+01, -2.1300000e+01, -2.1200000e+01, -2.1100000e+01, -2.1000000e+01, -2.0900000e+01, -2.0800000e+01, -2.0700000e+01, -2.0600000e+01, -2.0500000e+01, -2.0400000e+01, -2.0300000e+01, -2.0200000e+01, -2.0100000e+01, -2.0000000e+01, -1.9900000e+01, -1.9800000e+01, -1.9700000e+01, -1.9600000e+01, -1.9500000e+01, -1.9400000e+01, -1.9300000e+01, -1.9200000e+01, -1.9100000e+01, -1.9000000e+01, -1.8900000e+01, -1.8800000e+01, -1.8700000e+01, -1.8600000e+01, -1.8500000e+01, -1.8400000e+01, -1.8300000e+01, -1.8200000e+01, -1.8100000e+01, -1.8000000e+01, -1.7900000e+01, -1.7800000e+01, -1.7700000e+01, -1.7600000e+01, -1.7500000e+01, -1.7400000e+01, -1.7300000e+01, -1.7200000e+01, -1.7100000e+01, -1.7000000e+01, -1.6900000e+01, -1.6800000e+01, -1.6700000e+01, -1.6600000e+01, -1.6500000e+01, -1.6400000e+01, -1.6300000e+01, -1.6200000e+01, -1.6100000e+01, -1.6000000e+01, -1.5900000e+01, -1.5800000e+01, -1.5700000e+01, -1.5600000e+01, -1.5500000e+01, -1.5400000e+01, -1.5300000e+01, -1.5200000e+01, -1.5100000e+01, -1.5000000e+01, -1.4900000e+01, -1.4800000e+01, -1.4700000e+01, -1.4600000e+01, -1.4500000e+01, -1.4400000e+01, -1.4300000e+01, -1.4200000e+01, -1.4100000e+01, -1.4000000e+01, -1.3900000e+01, -1.3800000e+01, -1.3700000e+01, -1.3600000e+01, -1.3500000e+01, -1.3400000e+01, -1.3300000e+01, -1.3200000e+01, -1.3100000e+01, -1.3000000e+01, -1.2900000e+01, -1.2800000e+01, -1.2700000e+01, -1.2600000e+01, -1.2500000e+01, -1.2400000e+01, -1.2300000e+01, -1.2200000e+01, -1.2100000e+01, -1.2000000e+01, -1.1900000e+01, -1.1800000e+01, -1.1700000e+01, -1.1600000e+01, -1.1500000e+01, -1.1400000e+01, -1.1300000e+01, -1.1200000e+01, -1.1100000e+01, -1.1000000e+01, -1.0900000e+01, -1.0800000e+01, -1.0700000e+01, -1.0600000e+01, -1.0500000e+01, -1.0400000e+01, -1.0300000e+01, -1.0200000e+01, -1.0100000e+01, -1.0000000e+01, -9.9000000e+00, -9.8000000e+00, -9.7000000e+00, -9.6000000e+00, -9.5000000e+00, -9.4000000e+00, -9.3000000e+00, -9.2000000e+00, -9.1000000e+00, -9.0000000e+00, -8.9000000e+00, -8.8000000e+00, -8.7000000e+00, -8.6000000e+00, -8.5000000e+00, -8.4000000e+00, -8.3000000e+00, -8.2000000e+00, -8.1000000e+00, -8.0000000e+00, -7.9000000e+00, -7.8000000e+00, -7.7000000e+00, -7.6000000e+00, -7.5000000e+00, -7.4000000e+00, -7.3000000e+00, -7.2000000e+00, -7.1000000e+00, -7.0000000e+00, -6.9000000e+00, -6.8000000e+00, -6.7000000e+00, -6.6000000e+00, -6.5000000e+00, -6.4000000e+00, -6.3000000e+00, -6.2000000e+00, -6.1000000e+00, -6.0000000e+00, -5.9000000e+00, -5.8000000e+00, -5.7000000e+00, -5.6000000e+00, -5.5000000e+00, -5.4000000e+00, -5.3000000e+00, -5.2000000e+00, -5.1000000e+00, -5.0000000e+00, -4.9000000e+00, -4.8000000e+00, -4.7000000e+00, -4.6000000e+00, -4.5000000e+00, -4.4000000e+00, -4.3000000e+00, -4.2000000e+00, -4.1000000e+00, -4.0000000e+00, -3.9000000e+00, -3.8000000e+00, -3.7000000e+00, -3.6000000e+00, -3.5000000e+00, -3.4000000e+00, -3.3000000e+00, -3.2000000e+00, -3.1000000e+00, -3.0000000e+00, -2.9000000e+00, -2.8000000e+00, -2.7000000e+00, -2.6000000e+00, -2.5000000e+00, -2.4000000e+00, -2.3000000e+00, -2.2000000e+00, -2.1000000e+00, -2.0000000e+00, -1.9000000e+00, -1.8000000e+00, -1.7000000e+00, -1.6000000e+00, -1.5000000e+00, -1.4000000e+00, -1.3000000e+00, -1.2000000e+00, -1.1000000e+00, -1.0000000e+00, -9.0000000e-01, -8.0000000e-01, -7.0000000e-01, -6.0000000e-01, -5.0000000e-01, -4.0000000e-01, -3.0000000e-01, -2.0000000e-01, -1.0000000e-01, 0.0000000e+00, 1.0000000e-01, 2.0000000e-01, 3.0000000e-01, 4.0000000e-01, 5.0000000e-01, 6.0000000e-01, 7.0000000e-01, 8.0000000e-01, 9.0000000e-01, 1.0000000e+00, 1.1000000e+00, 1.2000000e+00, 1.3000000e+00, 1.4000000e+00, 1.5000000e+00, 1.6000000e+00, 1.7000000e+00, 1.8000000e+00, 1.9000000e+00, 2.0000000e+00, 2.1000000e+00, 2.2000000e+00, 2.3000000e+00, 2.4000000e+00, 2.5000000e+00, 2.6000000e+00, 2.7000000e+00, 2.8000000e+00, 2.9000000e+00, 3.0000000e+00, 3.1000000e+00, 3.2000000e+00, 3.3000000e+00, 3.4000000e+00, 3.5000000e+00, 3.6000000e+00, 3.7000000e+00, 3.8000000e+00, 3.9000000e+00, 4.0000000e+00, 4.1000000e+00, 4.2000000e+00, 4.3000000e+00, 4.4000000e+00, 4.5000000e+00, 4.6000000e+00, 4.7000000e+00, 4.8000000e+00, 4.9000000e+00, 5.0000000e+00, 5.1000000e+00, 5.2000000e+00, 5.3000000e+00, 5.4000000e+00, 5.5000000e+00, 5.6000000e+00, 5.7000000e+00, 5.8000000e+00, 5.9000000e+00, 6.0000000e+00, 6.1000000e+00, 6.2000000e+00, 6.3000000e+00, 6.4000000e+00, 6.5000000e+00, 6.6000000e+00, 6.7000000e+00, 6.8000000e+00, 6.9000000e+00, 7.0000000e+00, 7.1000000e+00, 7.2000000e+00, 7.3000000e+00, 7.4000000e+00, 7.5000000e+00, 7.6000000e+00, 7.7000000e+00, 7.8000000e+00, 7.9000000e+00, 8.0000000e+00, 8.1000000e+00, 8.2000000e+00, 8.3000000e+00, 8.4000000e+00, 8.5000000e+00, 8.6000000e+00, 8.7000000e+00, 8.8000000e+00, 8.9000000e+00, 9.0000000e+00, 9.1000000e+00, 9.2000000e+00, 9.3000000e+00, 9.4000000e+00, 9.5000000e+00, 9.6000000e+00, 9.7000000e+00, 9.8000000e+00, 9.9000000e+00, 1.0000000e+01, 1.0100000e+01, 1.0200000e+01, 1.0300000e+01, 1.0400000e+01, 1.0500000e+01, 1.0600000e+01, 1.0700000e+01, 1.0800000e+01, 1.0900000e+01, 1.1000000e+01, 1.1100000e+01, 1.1200000e+01, 1.1300000e+01, 1.1400000e+01, 1.1500000e+01, 1.1600000e+01, 1.1700000e+01, 1.1800000e+01, 1.1900000e+01, 1.2000000e+01, 1.2100000e+01, 1.2200000e+01, 1.2300000e+01, 1.2400000e+01, 1.2500000e+01, 1.2600000e+01, 1.2700000e+01, 1.2800000e+01, 1.2900000e+01, 1.3000000e+01, 1.3100000e+01, 1.3200000e+01, 1.3300000e+01, 1.3400000e+01, 1.3500000e+01, 1.3600000e+01, 1.3700000e+01, 1.3800000e+01, 1.3900000e+01, 1.4000000e+01, 1.4100000e+01, 1.4200000e+01, 1.4300000e+01, 1.4400000e+01, 1.4500000e+01, 1.4600000e+01, 1.4700000e+01, 1.4800000e+01, 1.4900000e+01, 1.5000000e+01, 1.5100000e+01, 1.5200000e+01, 1.5300000e+01, 1.5400000e+01, 1.5500000e+01, 1.5600000e+01, 1.5700000e+01, 1.5800000e+01, 1.5900000e+01, 1.6000000e+01, 1.6100000e+01, 1.6200000e+01, 1.6300000e+01, 1.6400000e+01, 1.6500000e+01, 1.6600000e+01, 1.6700000e+01, 1.6800000e+01, 1.6900000e+01, 1.7000000e+01, 1.7100000e+01, 1.7200000e+01, 1.7300000e+01, 1.7400000e+01, 1.7500000e+01, 1.7600000e+01, 1.7700000e+01, 1.7800000e+01, 1.7900000e+01, 1.8000000e+01, 1.8100000e+01, 1.8200000e+01, 1.8300000e+01, 1.8400000e+01, 1.8500000e+01, 1.8600000e+01, 1.8700000e+01, 1.8800000e+01, 1.8900000e+01, 1.9000000e+01, 1.9100000e+01, 1.9200000e+01, 1.9300000e+01, 1.9400000e+01, 1.9500000e+01, 1.9600000e+01, 1.9700000e+01, 1.9800000e+01, 1.9900000e+01, 2.0000000e+01, 2.0100000e+01, 2.0200000e+01, 2.0300000e+01, 2.0400000e+01, 2.0500000e+01, 2.0600000e+01, 2.0700000e+01, 2.0800000e+01, 2.0900000e+01, 2.1000000e+01, 2.1100000e+01, 2.1200000e+01, 2.1300000e+01, 2.1400000e+01, 2.1500000e+01, 2.1600000e+01, 2.1700000e+01, 2.1800000e+01, 2.1900000e+01, 2.2000000e+01, 2.2100000e+01, 2.2200000e+01, 2.2300000e+01, 2.2400000e+01, 2.2500000e+01, 2.2600000e+01, 2.2700000e+01, 2.2800000e+01, 2.2900000e+01, 2.3000000e+01, 2.3100000e+01, 2.3200000e+01, 2.3300000e+01, 2.3400000e+01, 2.3500000e+01, 2.3600000e+01, 2.3700000e+01, 2.3800000e+01, 2.3900000e+01, 2.4000000e+01, 2.4100000e+01, 2.4200000e+01, 2.4300000e+01, 2.4400000e+01, 2.4500000e+01, 2.4600000e+01, 2.4700000e+01, 2.4800000e+01, 2.4900000e+01, 2.5000000e+01, 2.5100000e+01, 2.5200000e+01, 2.5300000e+01, 2.5400000e+01, 2.5500000e+01, 2.5600000e+01, 2.5700000e+01, 2.5800000e+01, 2.5900000e+01, 2.6000000e+01, 2.6100000e+01, 2.6200000e+01, 2.6300000e+01, 2.6400000e+01, 2.6500000e+01, 2.6600000e+01, 2.6700000e+01, 2.6800000e+01, 2.6900000e+01, 2.7000000e+01, 2.7100000e+01, 2.7200000e+01, 2.7300000e+01, 2.7400000e+01, 2.7500000e+01, 2.7600000e+01, 2.7700000e+01, 2.7800000e+01, 2.7900000e+01, 2.8000000e+01, 2.8100000e+01, 2.8200000e+01, 2.8300000e+01, 2.8400000e+01, 2.8500000e+01, 2.8600000e+01, 2.8700000e+01, 2.8800000e+01, 2.8900000e+01, 2.9000000e+01, 2.9100000e+01, 2.9200000e+01, 2.9300000e+01, 2.9400000e+01, 2.9500000e+01, 2.9600000e+01, 2.9700000e+01, 2.9800000e+01, 2.9900000e+01, 3.0000000e+01, 3.0100000e+01, 3.0200000e+01, 3.0300000e+01, 3.0400000e+01, 3.0500000e+01, 3.0600000e+01, 3.0700000e+01, 3.0800000e+01, 3.0900000e+01, 3.1000000e+01, 3.1100000e+01, 3.1200000e+01, 3.1300000e+01, 3.1400000e+01, 3.1500000e+01, 3.1600000e+01, 3.1700000e+01, 3.1800000e+01, 3.1900000e+01, 3.2000000e+01, 3.2100000e+01, 3.2200000e+01, 3.2300000e+01, 3.2400000e+01, 3.2500000e+01, 3.2600000e+01, 3.2700000e+01, 3.2800000e+01, 3.2900000e+01, 3.3000000e+01, 3.3100000e+01, 3.3200000e+01, 3.3300000e+01, 3.3400000e+01, 3.3500000e+01, 3.3600000e+01, 3.3700000e+01, 3.3800000e+01, 3.3900000e+01, 3.4000000e+01, 3.4100000e+01, 3.4200000e+01, 3.4300000e+01, 3.4400000e+01, 3.4500000e+01, 3.4600000e+01, 3.4700000e+01, 3.4800000e+01, 3.4900000e+01, 3.5000000e+01, 3.5100000e+01, 3.5200000e+01, 3.5300000e+01, 3.5400000e+01, 3.5500000e+01, 3.5600000e+01, 3.5700000e+01, 3.5800000e+01, 3.5900000e+01, 3.6000000e+01, 3.6100000e+01, 3.6200000e+01, 3.6300000e+01, 3.6400000e+01, 3.6500000e+01, 3.6600000e+01, 3.6700000e+01, 3.6800000e+01, 3.6900000e+01, 3.7000000e+01, 3.7100000e+01, 3.7200000e+01, 3.7300000e+01, 3.7400000e+01, 3.7500000e+01, 3.7600000e+01, 3.7700000e+01, 3.7800000e+01, 3.7900000e+01, 3.8000000e+01, 3.8100000e+01, 3.8200000e+01, 3.8300000e+01, 3.8400000e+01, 3.8500000e+01, 3.8600000e+01, 3.8700000e+01, 3.8800000e+01, 3.8900000e+01, 3.9000000e+01, 3.9100000e+01, 3.9200000e+01, 3.9300000e+01, 3.9400000e+01, 3.9500000e+01, 3.9600000e+01, 3.9700000e+01, 3.9800000e+01, 3.9900000e+01, 4.0000000e+01, 4.0100000e+01, 4.0200000e+01, 4.0300000e+01, 4.0400000e+01, 4.0500000e+01, 4.0600000e+01, 4.0700000e+01, 4.0800000e+01, 4.0900000e+01, 4.1000000e+01, 4.1100000e+01, 4.1200000e+01, 4.1300000e+01, 4.1400000e+01, 4.1500000e+01, 4.1600000e+01, 4.1700000e+01, 4.1800000e+01, 4.1900000e+01, 4.2000000e+01, 4.2100000e+01, 4.2200000e+01, 4.2300000e+01, 4.2400000e+01, 4.2500000e+01, 4.2600000e+01, 4.2700000e+01, 4.2800000e+01, 4.2900000e+01, 4.3000000e+01, 4.3100000e+01, 4.3200000e+01, 4.3300000e+01, 4.3400000e+01, 4.3500000e+01, 4.3600000e+01, 4.3700000e+01, 4.3800000e+01, 4.3900000e+01, 4.4000000e+01, 4.4100000e+01, 4.4200000e+01, 4.4300000e+01, 4.4400000e+01, 4.4500000e+01, 4.4600000e+01, 4.4700000e+01, 4.4800000e+01, 4.4900000e+01, 4.5000000e+01, 4.5100000e+01, 4.5200000e+01, 4.5300000e+01, 4.5400000e+01, 4.5500000e+01, 4.5600000e+01, 4.5700000e+01, 4.5800000e+01, 4.5900000e+01, 4.6000000e+01, 4.6100000e+01, 4.6200000e+01, 4.6300000e+01, 4.6400000e+01, 4.6500000e+01, 4.6600000e+01, 4.6700000e+01, 4.6800000e+01, 4.6900000e+01, 4.7000000e+01, 4.7100000e+01, 4.7200000e+01, 4.7300000e+01, 4.7400000e+01, 4.7500000e+01, 4.7600000e+01, 4.7700000e+01, 4.7800000e+01, 4.7900000e+01, 4.8000000e+01, 4.8100000e+01, 4.8200000e+01, 4.8300000e+01, 4.8400000e+01, 4.8500000e+01, 4.8600000e+01, 4.8700000e+01, 4.8800000e+01, 4.8900000e+01, 4.9000000e+01, 4.9100000e+01, 4.9200000e+01, 4.9300000e+01, 4.9400000e+01, 4.9500000e+01, 4.9600000e+01, 4.9700000e+01, 4.9800000e+01, 4.9900000e+01, 5.0000000e+01, 5.0100000e+01, 5.0200000e+01, 5.0300000e+01, 5.0400000e+01, 5.0500000e+01, 5.0600000e+01, 5.0700000e+01, 5.0800000e+01, 5.0900000e+01, 5.1000000e+01, 5.1100000e+01, 5.1200000e+01, 5.1300000e+01, 5.1400000e+01, 5.1500000e+01, 5.1600000e+01, 5.1700000e+01, 5.1800000e+01, 5.1900000e+01, 5.2000000e+01, 5.2100000e+01, 5.2200000e+01, 5.2300000e+01, 5.2400000e+01, 5.2500000e+01, 5.2600000e+01, 5.2700000e+01, 5.2800000e+01, 5.2900000e+01, 5.3000000e+01, 5.3100000e+01, 5.3200000e+01, 5.3300000e+01, 5.3400000e+01, 5.3500000e+01, 5.3600000e+01, 5.3700000e+01, 5.3800000e+01, 5.3900000e+01, 5.4000000e+01, 5.4100000e+01, 5.4200000e+01, 5.4300000e+01, 5.4400000e+01, 5.4500000e+01, 5.4600000e+01, 5.4700000e+01, 5.4800000e+01, 5.4900000e+01, 5.5000000e+01, 5.5100000e+01, 5.5200000e+01, 5.5300000e+01, 5.5400000e+01, 5.5500000e+01, 5.5600000e+01, 5.5700000e+01, 5.5800000e+01, 5.5900000e+01, 5.6000000e+01, 5.6100000e+01, 5.6200000e+01, 5.6300000e+01, 5.6400000e+01, 5.6500000e+01, 5.6600000e+01, 5.6700000e+01, 5.6800000e+01, 5.6900000e+01, 5.7000000e+01, 5.7100000e+01, 5.7200000e+01, 5.7300000e+01, 5.7400000e+01, 5.7500000e+01, 5.7600000e+01, 5.7700000e+01, 5.7800000e+01, 5.7900000e+01, 5.8000000e+01}, - step = { 0.0000000e+00, 3.1168567e-09, 6.2831991e-09, 9.4994836e-09, 1.2766261e-08, 1.6084040e-08, 1.9453174e-08, 2.2873883e-08, 2.6346367e-08, 2.9870911e-08, 3.3447887e-08, 3.7077657e-08, 4.0760483e-08, 4.4496525e-08, 4.8285935e-08, 5.2128957e-08, 5.6025933e-08, 5.9977200e-08, 6.3982967e-08, 6.8043298e-08, 7.2158217e-08, 7.6327864e-08, 8.0552561e-08, 8.4832718e-08, 8.9168661e-08, 9.3560545e-08, 9.8008405e-08, 1.0251232e-07, 1.0707252e-07, 1.1168936e-07, 1.1636319e-07, 1.2109419e-07, 1.2588244e-07, 1.3072794e-07, 1.3563080e-07, 1.4059122e-07, 1.4560941e-07, 1.5068543e-07, 1.5581925e-07, 1.6101081e-07, 1.6626019e-07, 1.7156766e-07, 1.7693355e-07, 1.8235808e-07, 1.8784138e-07, 1.9338351e-07, 1.9898473e-07, 2.0464555e-07, 2.1036664e-07, 2.1614864e-07, 2.2199202e-07, 2.2789713e-07, 2.3386436e-07, 2.3989427e-07, 2.4598764e-07, 2.5214530e-07, 2.5836803e-07, 2.6465646e-07, 2.7101131e-07, 2.7743341e-07, 2.8392380e-07, 2.9048359e-07, 2.9711376e-07, 3.0381515e-07, 3.1058863e-07, 3.1743519e-07, 3.2435605e-07, 3.3135249e-07, 3.3842568e-07, 3.4557654e-07, 3.5280589e-07, 3.6011463e-07, 3.6750389e-07, 3.7497494e-07, 3.8252905e-07, 3.9016726e-07, 3.9789042e-07, 4.0569932e-07, 4.1359495e-07, 4.2157845e-07, 4.2965099e-07, 4.3781359e-07, 4.4606706e-07, 4.5441217e-07, 4.6284981e-07, 4.7138098e-07, 4.8000672e-07, 4.8872790e-07, 4.9754514e-07, 5.0645901e-07, 5.1547016e-07, 5.2457949e-07, 5.3378793e-07, 5.4309631e-07, 5.5250510e-07, 5.6201456e-07, 5.7162494e-07, 5.8133669e-07, 5.9115047e-07, 6.0106690e-07, 6.1108643e-07, 6.2120927e-07, 6.3143565e-07, 6.4176600e-07, 6.5220100e-07, 6.6274144e-07, 6.7338802e-07, 6.8414125e-07, 6.9500163e-07, 7.0596983e-07, 7.1704673e-07, 7.2823335e-07, 7.3953055e-07, 7.5093900e-07, 7.6245924e-07, 7.7409198e-07, 7.8583824e-07, 7.9769927e-07, 8.0967625e-07, 8.2177016e-07, 8.3398178e-07, 8.4631198e-07, 8.5876196e-07, 8.7133325e-07, 8.8402747e-07, 8.9684610e-07, 9.0979038e-07, 9.2286154e-07, 9.3606098e-07, 9.4939040e-07, 9.6285157e-07, 9.7644616e-07, 9.9017555e-07, 1.0040410e-06, 1.0180440e-06, 1.0321862e-06, 1.0464694e-06, 1.0608951e-06, 1.0754648e-06, 1.0901795e-06, 1.1050402e-06, 1.1200482e-06, 1.1352049e-06, 1.1505118e-06, 1.1659695e-06, 1.1815788e-06, 1.1973401e-06, 1.2132541e-06, 1.2293217e-06, 1.2455439e-06, 1.2619215e-06, 1.2784547e-06, 1.2951438e-06, 1.3119890e-06, 1.3289909e-06, 1.3461501e-06, 1.3634670e-06, 1.3809419e-06, 1.3985748e-06, 1.4163657e-06, 1.4343150e-06, 1.4524236e-06, 1.4706920e-06, 1.4891207e-06, 1.5077100e-06, 1.5264602e-06, 1.5453722e-06, 1.5644472e-06, 1.5836866e-06, 1.6030913e-06, 1.6226622e-06, 1.6424001e-06, 1.6623059e-06, 1.6823812e-06, 1.7026276e-06, 1.7230466e-06, 1.7436392e-06, 1.7644063e-06, 1.7853490e-06, 1.8064690e-06, 1.8277681e-06, 1.8492482e-06, 1.8709111e-06, 1.8927583e-06, 1.9147915e-06, 1.9370130e-06, 1.9594252e-06, 1.9820307e-06, 2.0048318e-06, 2.0278304e-06, 2.0510287e-06, 2.0744292e-06, 2.0980350e-06, 2.1218492e-06, 2.1458745e-06, 2.1701134e-06, 2.1945681e-06, 2.2192412e-06, 2.2441359e-06, 2.2692553e-06, 2.2946026e-06, 2.3201804e-06, 2.3459910e-06, 2.3720368e-06, 2.3983206e-06, 2.4248454e-06, 2.4516144e-06, 2.4786302e-06, 2.5058954e-06, 2.5334123e-06, 2.5611839e-06, 2.5892133e-06, 2.6175037e-06, 2.6460578e-06, 2.6748779e-06, 2.7039663e-06, 2.7333256e-06, 2.7629591e-06, 2.7928697e-06, 2.8230601e-06, 2.8535324e-06, 2.8842882e-06, 2.9153294e-06, 2.9466585e-06, 2.9782782e-06, 3.0101913e-06, 3.0424001e-06, 3.0749066e-06, 3.1077126e-06, 3.1408207e-06, 3.1742336e-06, 3.2079540e-06, 3.2419842e-06, 3.2763264e-06, 3.3109824e-06, 3.3459547e-06, 3.3812459e-06, 3.4168590e-06, 3.4527964e-06, 3.4890600e-06, 3.5256518e-06, 3.5625746e-06, 3.5998316e-06, 3.6374267e-06, 3.6753633e-06, 3.7136443e-06, 3.7522724e-06, 3.7912503e-06, 3.8305817e-06, 3.8702706e-06, 3.9103212e-06, 3.9507373e-06, 3.9915221e-06, 4.0326787e-06, 4.0742109e-06, 4.1161224e-06, 4.1584175e-06, 4.2010997e-06, 4.2441722e-06, 4.2876385e-06, 4.3315023e-06, 4.3757679e-06, 4.4204400e-06, 4.4655225e-06, 4.5110187e-06, 4.5569319e-06, 4.6032658e-06, 4.6500251e-06, 4.6972151e-06, 4.7448410e-06, 4.7929073e-06, 4.8414182e-06, 4.8903780e-06, 4.9397917e-06, 4.9896650e-06, 5.0400039e-06, 5.0908137e-06, 5.1420989e-06, 5.1938640e-06, 5.2461134e-06, 5.2988520e-06, 5.3520846e-06, 5.4058156e-06, 5.4600484e-06, 5.5147865e-06, 5.5700339e-06, 5.6257953e-06, 5.6820755e-06, 5.7388788e-06, 5.7962086e-06, 5.8540676e-06, 5.9124592e-06, 5.9713875e-06, 6.0308573e-06, 6.0908733e-06, 6.1514395e-06, 6.2125588e-06, 6.2742342e-06, 6.3364693e-06, 6.3992685e-06, 6.4626369e-06, 6.5265788e-06, 6.5910984e-06, 6.6561997e-06, 6.7218877e-06, 6.7881682e-06, 6.8550477e-06, 6.9225322e-06, 6.9906273e-06, 7.0593385e-06, 7.1286725e-06, 7.1986366e-06, 7.2692391e-06, 7.3404881e-06, 7.4123906e-06, 7.4849533e-06, 7.5581834e-06, 7.6320896e-06, 7.7066816e-06, 7.7819696e-06, 7.8579631e-06, 7.9346706e-06, 8.0121005e-06, 8.0902621e-06, 8.1691655e-06, 8.2488212e-06, 8.3292395e-06, 8.4104296e-06, 8.4924008e-06, 8.5751630e-06, 8.6587268e-06, 8.7431037e-06, 8.8283040e-06, 8.9143374e-06, 9.0012126e-06, 9.0889386e-06, 9.1775256e-06, 9.2669840e-06, 9.3573234e-06, 9.4485519e-06, 9.5406760e-06, 9.6337021e-06, 9.7276377e-06, 9.8224910e-06, 9.9182702e-06, 1.0014983e-05, 1.0112635e-05, 1.0211232e-05, 1.0310782e-05, 1.0411293e-05, 1.0512773e-05, 1.0615231e-05, 1.0718677e-05, 1.0823117e-05, 1.0928559e-05, 1.1035012e-05, 1.1142488e-05, 1.1250994e-05, 1.1360538e-05, 1.1471128e-05, 1.1582771e-05, 1.1695476e-05, 1.1809253e-05, 1.1924113e-05, 1.2040065e-05, 1.2157117e-05, 1.2275276e-05, 1.2394553e-05, 1.2514959e-05, 1.2636507e-05, 1.2759208e-05, 1.2883073e-05, 1.3008110e-05, 1.3134332e-05, 1.3261752e-05, 1.3390385e-05, 1.3520246e-05, 1.3651350e-05, 1.3783710e-05, 1.3917341e-05, 1.4052261e-05, 1.4188487e-05, 1.4326039e-05, 1.4464932e-05, 1.4605185e-05, 1.4746813e-05, 1.4889836e-05, 1.5034274e-05, 1.5180149e-05, 1.5327480e-05, 1.5476284e-05, 1.5626577e-05, 1.5778380e-05, 1.5931712e-05, 1.6086596e-05, 1.6243054e-05, 1.6401103e-05, 1.6560760e-05, 1.6722042e-05, 1.6884967e-05, 1.7049555e-05, 1.7215824e-05, 1.7383790e-05, 1.7553467e-05, 1.7724870e-05, 1.7898014e-05, 1.8072918e-05, 1.8249598e-05, 1.8428073e-05, 1.8608358e-05, 1.8790472e-05, 1.8974435e-05, 1.9160272e-05, 1.9348006e-05, 1.9537660e-05, 1.9729251e-05, 1.9922799e-05, 2.0118322e-05, 2.0315847e-05, 2.0515397e-05, 2.0716998e-05, 2.0920673e-05, 2.1126442e-05, 2.1334326e-05, 2.1544347e-05, 2.1756532e-05, 2.1970908e-05, 2.2187503e-05, 2.2406342e-05, 2.2627453e-05, 2.2850865e-05, 2.3076609e-05, 2.3304718e-05, 2.3535221e-05, 2.3768147e-05, 2.4003525e-05, 2.4241389e-05, 2.4481776e-05, 2.4724725e-05, 2.4970269e-05, 2.5218439e-05, 2.5469263e-05, 2.5722768e-05, 2.5978991e-05, 2.6237968e-05, 2.6499735e-05, 2.6764326e-05, 2.7031764e-05, 2.7302076e-05, 2.7575287e-05, 2.7851429e-05, 2.8130532e-05, 2.8412631e-05, 2.8697760e-05, 2.8985953e-05, 2.9277253e-05, 2.9571704e-05, 2.9869352e-05, 3.0170237e-05, 3.0474400e-05, 3.0781881e-05, 3.1092726e-05, 3.1406991e-05, 3.1724731e-05, 3.2046003e-05, 3.2370854e-05, 3.2699327e-05, 3.3031471e-05, 3.3367341e-05, 3.3707004e-05, 3.4050531e-05, 3.4397987e-05, 3.4749437e-05, 3.5104940e-05, 3.5464560e-05, 3.5828361e-05, 3.6196408e-05, 3.6568765e-05, 3.6945489e-05, 3.7326640e-05, 3.7712278e-05, 3.8102465e-05, 3.8497261e-05, 3.8896718e-05, 3.9300878e-05, 3.9709786e-05, 4.0123499e-05, 4.0542092e-05, 4.0965652e-05, 4.1394266e-05, 4.1828014e-05, 4.2266964e-05, 4.2711188e-05, 4.3160768e-05, 4.3615802e-05, 4.4076396e-05, 4.4542661e-05, 4.5014704e-05, 4.5492635e-05, 4.5976565e-05, 4.6466612e-05, 4.6962895e-05, 4.7465530e-05, 4.7974623e-05, 4.8490283e-05, 4.9012626e-05, 4.9541779e-05, 5.0077859e-05, 5.0620968e-05, 5.1171184e-05, 5.1728582e-05, 5.2293254e-05, 5.2865325e-05, 5.3444951e-05, 5.4032298e-05, 5.4627531e-05, 5.5230798e-05, 5.5842245e-05, 5.6462034e-05, 5.7090355e-05, 5.7727419e-05, 5.8373442e-05, 5.9028633e-05, 5.9693197e-05, 6.0367335e-05, 6.1051251e-05, 6.1745130e-05, 6.2449134e-05, 6.3163412e-05, 6.3888138e-05, 6.4623537e-05, 6.5369894e-05, 6.6127530e-05, 6.6896771e-05, 6.7677915e-05, 6.8471240e-05, 6.9277041e-05, 7.0095669e-05, 7.0927537e-05, 7.1773089e-05, 7.2632735e-05, 7.3506824e-05, 7.4395678e-05, 7.5299644e-05, 7.6219136e-05, 7.7154626e-05, 7.8106628e-05, 7.9075712e-05, 8.0062515e-05, 8.1067750e-05, 8.2092171e-05, 8.3136512e-05, 8.4201451e-05, 8.5287629e-05, 8.6395718e-05, 8.7526538e-05, 8.8681165e-05, 8.9860920e-05, 9.1067196e-05, 9.2301270e-05, 9.3564298e-05, 9.4857542e-05, 9.6182639e-05, 9.7541712e-05, 9.8937182e-05, 1.0037154e-04, 1.0184737e-04, 1.0336763e-04, 1.0493580e-04, 1.0655591e-04, 1.0823267e-04, 1.0997182e-04, 1.1178031e-04, 1.1366633e-04, 1.1563949e-04, 1.1771088e-04, 1.1989339e-04, 1.2220285e-04, 1.2465928e-04, 1.2729284e-04, 1.3016693e-04, 1.3327016e-04, 1.3637338e-04, 1.3924747e-04, 1.4188103e-04, 1.4433746e-04, 1.4664693e-04, 1.4882943e-04, 1.5090082e-04, 1.5287398e-04, 1.5476000e-04, 1.5656849e-04, 1.5830764e-04, 1.5998440e-04, 1.6160451e-04, 1.6317269e-04, 1.6469295e-04, 1.6616878e-04, 1.6760313e-04, 1.6899860e-04, 1.7035767e-04, 1.7168277e-04, 1.7297602e-04, 1.7423904e-04, 1.7547312e-04, 1.7667939e-04, 1.7785915e-04, 1.7901378e-04, 1.8014460e-04, 1.8125268e-04, 1.8233886e-04, 1.8340380e-04, 1.8444814e-04, 1.8547256e-04, 1.8647780e-04, 1.8746460e-04, 1.8843369e-04, 1.8938569e-04, 1.9032118e-04, 1.9124067e-04, 1.9214464e-04, 1.9303349e-04, 1.9390758e-04, 1.9476722e-04, 1.9561278e-04, 1.9644464e-04, 1.9726327e-04, 1.9806907e-04, 1.9886240e-04, 1.9964354e-04, 2.0041278e-04, 2.0117042e-04, 2.0191678e-04, 2.0265218e-04, 2.0337690e-04, 2.0409118e-04, 2.0479518e-04, 2.0548906e-04, 2.0617298e-04, 2.0684712e-04, 2.0751168e-04, 2.0816687e-04, 2.0881289e-04, 2.0944996e-04, 2.1007828e-04, 2.1069807e-04, 2.1130952e-04, 2.1191278e-04, 2.1250802e-04, 2.1309536e-04, 2.1367499e-04, 2.1424706e-04, 2.1481173e-04, 2.1536913e-04, 2.1591935e-04, 2.1646245e-04, 2.1699854e-04, 2.1752769e-04, 2.1805003e-04, 2.1856569e-04, 2.1907478e-04, 2.1957742e-04, 2.2007370e-04, 2.2056375e-04, 2.2104768e-04, 2.2152561e-04, 2.2199765e-04, 2.2246392e-04, 2.2292451e-04, 2.2337955e-04, 2.2382913e-04, 2.2427335e-04, 2.2471230e-04, 2.2514605e-04, 2.2557466e-04, 2.2599822e-04, 2.2641681e-04, 2.2683053e-04, 2.2723944e-04, 2.2764360e-04, 2.2804305e-04, 2.2843785e-04, 2.2882804e-04, 2.2921367e-04, 2.2959482e-04, 2.2997155e-04, 2.3034391e-04, 2.3071195e-04, 2.3107575e-04, 2.3143537e-04, 2.3179088e-04, 2.3214233e-04, 2.3248978e-04, 2.3283331e-04, 2.3317297e-04, 2.3350884e-04, 2.3384099e-04, 2.3416946e-04, 2.3449431e-04, 2.3481558e-04, 2.3513332e-04, 2.3544759e-04, 2.3575843e-04, 2.3606591e-04, 2.3637008e-04, 2.3667096e-04, 2.3696861e-04, 2.3726306e-04, 2.3755436e-04, 2.3784255e-04, 2.3812768e-04, 2.3840978e-04, 2.3868889e-04, 2.3896503e-04, 2.3923824e-04, 2.3950855e-04, 2.3977599e-04, 2.4004058e-04, 2.4030235e-04, 2.4056132e-04, 2.4081755e-04, 2.4107105e-04, 2.4132187e-04, 2.4157004e-04, 2.4181559e-04, 2.4205854e-04, 2.4229892e-04, 2.4253679e-04, 2.4277217e-04, 2.4300509e-04, 2.4323560e-04, 2.4346370e-04, 2.4368945e-04, 2.4391286e-04, 2.4413397e-04, 2.4435281e-04, 2.4456941e-04, 2.4478378e-04, 2.4499597e-04, 2.4520599e-04, 2.4541387e-04, 2.4561964e-04, 2.4582332e-04, 2.4602492e-04, 2.4622447e-04, 2.4642199e-04, 2.4661752e-04, 2.4681106e-04, 2.4700265e-04, 2.4719231e-04, 2.4738004e-04, 2.4756588e-04, 2.4774984e-04, 2.4793196e-04, 2.4811224e-04, 2.4829072e-04, 2.4846740e-04, 2.4864230e-04, 2.4881544e-04, 2.4898685e-04, 2.4915652e-04, 2.4932449e-04, 2.4949076e-04, 2.4965535e-04, 2.4981827e-04, 2.4997955e-04, 2.5013921e-04, 2.5029726e-04, 2.5045372e-04, 2.5060860e-04, 2.5076193e-04, 2.5091374e-04, 2.5106403e-04, 2.5121283e-04, 2.5136016e-04, 2.5150604e-04, 2.5165048e-04, 2.5179350e-04, 2.5193513e-04, 2.5207538e-04, 2.5221427e-04, 2.5235183e-04, 2.5248805e-04, 2.5262297e-04, 2.5275660e-04, 2.5288896e-04, 2.5302007e-04, 2.5314993e-04, 2.5327856e-04, 2.5340598e-04, 2.5353220e-04, 2.5365724e-04, 2.5378111e-04, 2.5390381e-04, 2.5402535e-04, 2.5414576e-04, 2.5426504e-04, 2.5438320e-04, 2.5450025e-04, 2.5461620e-04, 2.5473106e-04, 2.5484484e-04, 2.5495754e-04, 2.5506919e-04, 2.5517978e-04, 2.5528932e-04, 2.5539783e-04, 2.5550530e-04, 2.5561176e-04, 2.5571720e-04, 2.5582164e-04, 2.5592508e-04, 2.5602754e-04, 2.5612902e-04, 2.5622953e-04, 2.5632908e-04, 2.5642768e-04, 2.5652533e-04, 2.5662204e-04, 2.5671782e-04, 2.5681268e-04, 2.5690661e-04, 2.5699964e-04, 2.5709176e-04, 2.5718299e-04, 2.5727333e-04, 2.5736279e-04, 2.5745138e-04, 2.5753910e-04, 2.5762598e-04, 2.5771201e-04, 2.5779721e-04, 2.5788159e-04, 2.5796515e-04, 2.5804791e-04, 2.5812988e-04, 2.5821107e-04, 2.5829149e-04, 2.5837115e-04, 2.5845005e-04, 2.5852821e-04, 2.5860564e-04, 2.5868235e-04, 2.5875834e-04, 2.5883363e-04, 2.5890822e-04, 2.5898213e-04, 2.5905536e-04, 2.5912792e-04, 2.5919983e-04, 2.5927107e-04, 2.5934168e-04, 2.5941164e-04, 2.5948098e-04, 2.5954969e-04, 2.5961778e-04, 2.5968527e-04, 2.5975215e-04, 2.5981843e-04, 2.5988411e-04, 2.5994922e-04, 2.6001373e-04, 2.6007768e-04, 2.6014105e-04, 2.6020384e-04, 2.6026608e-04, 2.6032775e-04, 2.6038887e-04, 2.6044944e-04, 2.6050946e-04, 2.6056893e-04, 2.6062785e-04, 2.6068625e-04, 2.6074411e-04, 2.6080143e-04, 2.6085824e-04, 2.6091452e-04, 2.6097028e-04, 2.6102553e-04, 2.6108027e-04, 2.6113450e-04, 2.6118823e-04, 2.6124146e-04, 2.6129420e-04, 2.6134645e-04, 2.6139821e-04, 2.6144950e-04, 2.6150031e-04, 2.6155065e-04, 2.6160052e-04, 2.6164994e-04, 2.6169890e-04, 2.6174741e-04, 2.6179547e-04, 2.6184310e-04, 2.6189029e-04, 2.6193705e-04, 2.6198338e-04, 2.6202929e-04, 2.6207479e-04, 2.6211987e-04, 2.6216455e-04, 2.6220881e-04, 2.6225268e-04, 2.6229614e-04, 2.6233921e-04, 2.6238190e-04, 2.6242419e-04, 2.6246610e-04, 2.6250763e-04, 2.6254879e-04, 2.6258958e-04, 2.6262999e-04, 2.6267004e-04, 2.6270973e-04, 2.6274906e-04, 2.6278804e-04, 2.6282667e-04, 2.6286495e-04, 2.6290289e-04, 2.6294048e-04, 2.6297774e-04, 2.6301466e-04, 2.6305125e-04, 2.6308752e-04, 2.6312345e-04, 2.6315907e-04, 2.6319436e-04, 2.6322933e-04, 2.6326399e-04, 2.6329833e-04, 2.6333236e-04, 2.6336608e-04, 2.6339949e-04, 2.6343260e-04, 2.6346541e-04, 2.6349791e-04, 2.6353012e-04, 2.6356204e-04, 2.6359366e-04, 2.6362498e-04, 2.6365603e-04, 2.6368678e-04, 2.6371725e-04, 2.6374744e-04, 2.6377735e-04, 2.6380699e-04, 2.6383635e-04, 2.6386544e-04, 2.6389426e-04, 2.6392281e-04, 2.6395110e-04, 2.6397913e-04, 2.6400690e-04, 2.6403442e-04, 2.6406168e-04, 2.6408870e-04, 2.6411547e-04, 2.6414199e-04, 2.6416828e-04, 2.6419432e-04, 2.6422013e-04, 2.6424571e-04, 2.6427106e-04, 2.6429618e-04, 2.6432107e-04, 2.6434575e-04, 2.6437020e-04, 2.6439444e-04, 2.6441846e-04, 2.6444228e-04, 2.6446588e-04, 2.6448928e-04, 2.6451248e-04, 2.6453548e-04, 2.6455828e-04, 2.6458089e-04, 2.6460330e-04, 2.6462552e-04, 2.6464756e-04, 2.6466940e-04, 2.6469107e-04, 2.6471255e-04, 2.6473384e-04, 2.6475496e-04, 2.6477591e-04, 2.6479667e-04, 2.6481727e-04, 2.6483769e-04, 2.6485793e-04, 2.6487801e-04, 2.6489791e-04, 2.6491765e-04, 2.6493722e-04, 2.6495663e-04, 2.6497587e-04, 2.6499494e-04, 2.6501385e-04, 2.6503260e-04, 2.6505119e-04, 2.6506962e-04, 2.6508789e-04, 2.6510600e-04, 2.6512395e-04, 2.6514174e-04, 2.6515937e-04, 2.6517685e-04, 2.6519416e-04, 2.6521132e-04, 2.6522832e-04, 2.6524517e-04, 2.6526186e-04, 2.6527839e-04, 2.6529477e-04, 2.6531099e-04, 2.6532706e-04, 2.6534297e-04, 2.6535873e-04, 2.6537434e-04, 2.6538980e-04, 2.6540511e-04, 2.6542027e-04, 2.6543527e-04, 2.6545013e-04, 2.6546485e-04, 2.6547942e-04, 2.6549384e-04, 2.6550813e-04, 2.6552227e-04, 2.6553627e-04, 2.6555014e-04, 2.6556387e-04, 2.6557746e-04, 2.6559092e-04, 2.6560425e-04, 2.6561745e-04, 2.6563052e-04, 2.6564347e-04, 2.6565629e-04, 2.6566898e-04, 2.6568155e-04, 2.6569400e-04, 2.6570633e-04, 2.6571854e-04, 2.6573064e-04, 2.6574261e-04, 2.6575448e-04, 2.6576622e-04, 2.6577785e-04, 2.6578937e-04, 2.6580078e-04, 2.6581208e-04, 2.6582327e-04, 2.6583434e-04, 2.6584531e-04, 2.6585617e-04, 2.6586693e-04, 2.6587757e-04, 2.6588811e-04, 2.6589855e-04, 2.6590888e-04, 2.6591910e-04, 2.6592923e-04, 2.6593925e-04, 2.6594916e-04, 2.6595898e-04, 2.6596869e-04, 2.6597830e-04, 2.6598781e-04, 2.6599722e-04, 2.6600653e-04, 2.6601573e-04, 2.6602484e-04, 2.6603385e-04, 2.6604277e-04, 2.6605159e-04, 2.6606031e-04, 2.6606893e-04, 2.6607746e-04, 2.6608590e-04, 2.6609425e-04, 2.6610250e-04, 2.6611066e-04, 2.6611874e-04, 2.6612672e-04, 2.6613461e-04, 2.6614242e-04, 2.6615015e-04, 2.6615778e-04, 2.6616534e-04, 2.6617281e-04, 2.6618020e-04, 2.6618751e-04, 2.6619474e-04, 2.6620189e-04, 2.6620896e-04, 2.6621596e-04, 2.6622288e-04, 2.6622973e-04, 2.6623650e-04, 2.6624320e-04, 2.6624983e-04, 2.6625639e-04, 2.6626288e-04, 2.6626930e-04, 2.6627566e-04, 2.6628195e-04, 2.6628817e-04, 2.6629433e-04, 2.6630042e-04, 2.6630645e-04, 2.6631242e-04, 2.6631832e-04, 2.6632417e-04, 2.6632995e-04, 2.6633567e-04, 2.6634133e-04, 2.6634693e-04, 2.6635247e-04, 2.6635796e-04, 2.6636338e-04, 2.6636875e-04, 2.6637405e-04, 2.6637930e-04, 2.6638449e-04, 2.6638963e-04, 2.6639470e-04, 2.6639972e-04, 2.6640468e-04, 2.6640959e-04, 2.6641443e-04, 2.6641922e-04, 2.6642395e-04, 2.6642862e-04, 2.6643324e-04, 2.6643780e-04, 2.6644231e-04, 2.6644675e-04, 2.6645115e-04, 2.6645548e-04, 2.6645976e-04, 2.6646399e-04, 2.6646816e-04, 2.6647227e-04, 2.6647633e-04, 2.6648034e-04, 2.6648429e-04, 2.6648818e-04, 2.6649203e-04, 2.6649582e-04, 2.6649955e-04, 2.6650324e-04, 2.6650687e-04, 2.6651044e-04, 2.6651397e-04, 2.6651744e-04, 2.6652086e-04, 2.6652423e-04, 2.6652755e-04, 2.6653081e-04, 2.6653403e-04, 2.6653720e-04}, - continuous = true, - nFuture=500, - nPast=500); - - // // Zero-phase, ds = 0.05m - // extends Interpolators.StepResponse( - // T = { -4.3900000e+01, -4.3850000e+01, -4.3800000e+01, -4.3750000e+01, -4.3700000e+01, -4.3650000e+01, -4.3600000e+01, -4.3550000e+01, -4.3500000e+01, -4.3450000e+01, -4.3400000e+01, -4.3350000e+01, -4.3300000e+01, -4.3250000e+01, -4.3200000e+01, -4.3150000e+01, -4.3100000e+01, -4.3050000e+01, -4.3000000e+01, -4.2950000e+01, -4.2900000e+01, -4.2850000e+01, -4.2800000e+01, -4.2750000e+01, -4.2700000e+01, -4.2650000e+01, -4.2600000e+01, -4.2550000e+01, -4.2500000e+01, -4.2450000e+01, -4.2400000e+01, -4.2350000e+01, -4.2300000e+01, -4.2250000e+01, -4.2200000e+01, -4.2150000e+01, -4.2100000e+01, -4.2050000e+01, -4.2000000e+01, -4.1950000e+01, -4.1900000e+01, -4.1850000e+01, -4.1800000e+01, -4.1750000e+01, -4.1700000e+01, -4.1650000e+01, -4.1600000e+01, -4.1550000e+01, -4.1500000e+01, -4.1450000e+01, -4.1400000e+01, -4.1350000e+01, -4.1300000e+01, -4.1250000e+01, -4.1200000e+01, -4.1150000e+01, -4.1100000e+01, -4.1050000e+01, -4.1000000e+01, -4.0950000e+01, -4.0900000e+01, -4.0850000e+01, -4.0800000e+01, -4.0750000e+01, -4.0700000e+01, -4.0650000e+01, -4.0600000e+01, -4.0550000e+01, -4.0500000e+01, -4.0450000e+01, -4.0400000e+01, -4.0350000e+01, -4.0300000e+01, -4.0250000e+01, -4.0200000e+01, -4.0150000e+01, -4.0100000e+01, -4.0050000e+01, -4.0000000e+01, -3.9950000e+01, -3.9900000e+01, -3.9850000e+01, -3.9800000e+01, -3.9750000e+01, -3.9700000e+01, -3.9650000e+01, -3.9600000e+01, -3.9550000e+01, -3.9500000e+01, -3.9450000e+01, -3.9400000e+01, -3.9350000e+01, -3.9300000e+01, -3.9250000e+01, -3.9200000e+01, -3.9150000e+01, -3.9100000e+01, -3.9050000e+01, -3.9000000e+01, -3.8950000e+01, -3.8900000e+01, -3.8850000e+01, -3.8800000e+01, -3.8750000e+01, -3.8700000e+01, -3.8650000e+01, -3.8600000e+01, -3.8550000e+01, -3.8500000e+01, -3.8450000e+01, -3.8400000e+01, -3.8350000e+01, -3.8300000e+01, -3.8250000e+01, -3.8200000e+01, -3.8150000e+01, -3.8100000e+01, -3.8050000e+01, -3.8000000e+01, -3.7950000e+01, -3.7900000e+01, -3.7850000e+01, -3.7800000e+01, -3.7750000e+01, -3.7700000e+01, -3.7650000e+01, -3.7600000e+01, -3.7550000e+01, -3.7500000e+01, -3.7450000e+01, -3.7400000e+01, -3.7350000e+01, -3.7300000e+01, -3.7250000e+01, -3.7200000e+01, -3.7150000e+01, -3.7100000e+01, -3.7050000e+01, -3.7000000e+01, -3.6950000e+01, -3.6900000e+01, -3.6850000e+01, -3.6800000e+01, -3.6750000e+01, -3.6700000e+01, -3.6650000e+01, -3.6600000e+01, -3.6550000e+01, -3.6500000e+01, -3.6450000e+01, -3.6400000e+01, -3.6350000e+01, -3.6300000e+01, -3.6250000e+01, -3.6200000e+01, -3.6150000e+01, -3.6100000e+01, -3.6050000e+01, -3.6000000e+01, -3.5950000e+01, -3.5900000e+01, -3.5850000e+01, -3.5800000e+01, -3.5750000e+01, -3.5700000e+01, -3.5650000e+01, -3.5600000e+01, -3.5550000e+01, -3.5500000e+01, -3.5450000e+01, -3.5400000e+01, -3.5350000e+01, -3.5300000e+01, -3.5250000e+01, -3.5200000e+01, -3.5150000e+01, -3.5100000e+01, -3.5050000e+01, -3.5000000e+01, -3.4950000e+01, -3.4900000e+01, -3.4850000e+01, -3.4800000e+01, -3.4750000e+01, -3.4700000e+01, -3.4650000e+01, -3.4600000e+01, -3.4550000e+01, -3.4500000e+01, -3.4450000e+01, -3.4400000e+01, -3.4350000e+01, -3.4300000e+01, -3.4250000e+01, -3.4200000e+01, -3.4150000e+01, -3.4100000e+01, -3.4050000e+01, -3.4000000e+01, -3.3950000e+01, -3.3900000e+01, -3.3850000e+01, -3.3800000e+01, -3.3750000e+01, -3.3700000e+01, -3.3650000e+01, -3.3600000e+01, -3.3550000e+01, -3.3500000e+01, -3.3450000e+01, -3.3400000e+01, -3.3350000e+01, -3.3300000e+01, -3.3250000e+01, -3.3200000e+01, -3.3150000e+01, -3.3100000e+01, -3.3050000e+01, -3.3000000e+01, -3.2950000e+01, -3.2900000e+01, -3.2850000e+01, -3.2800000e+01, -3.2750000e+01, -3.2700000e+01, -3.2650000e+01, -3.2600000e+01, -3.2550000e+01, -3.2500000e+01, -3.2450000e+01, -3.2400000e+01, -3.2350000e+01, -3.2300000e+01, -3.2250000e+01, -3.2200000e+01, -3.2150000e+01, -3.2100000e+01, -3.2050000e+01, -3.2000000e+01, -3.1950000e+01, -3.1900000e+01, -3.1850000e+01, -3.1800000e+01, -3.1750000e+01, -3.1700000e+01, -3.1650000e+01, -3.1600000e+01, -3.1550000e+01, -3.1500000e+01, -3.1450000e+01, -3.1400000e+01, -3.1350000e+01, -3.1300000e+01, -3.1250000e+01, -3.1200000e+01, -3.1150000e+01, -3.1100000e+01, -3.1050000e+01, -3.1000000e+01, -3.0950000e+01, -3.0900000e+01, -3.0850000e+01, -3.0800000e+01, -3.0750000e+01, -3.0700000e+01, -3.0650000e+01, -3.0600000e+01, -3.0550000e+01, -3.0500000e+01, -3.0450000e+01, -3.0400000e+01, -3.0350000e+01, -3.0300000e+01, -3.0250000e+01, -3.0200000e+01, -3.0150000e+01, -3.0100000e+01, -3.0050000e+01, -3.0000000e+01, -2.9950000e+01, -2.9900000e+01, -2.9850000e+01, -2.9800000e+01, -2.9750000e+01, -2.9700000e+01, -2.9650000e+01, -2.9600000e+01, -2.9550000e+01, -2.9500000e+01, -2.9450000e+01, -2.9400000e+01, -2.9350000e+01, -2.9300000e+01, -2.9250000e+01, -2.9200000e+01, -2.9150000e+01, -2.9100000e+01, -2.9050000e+01, -2.9000000e+01, -2.8950000e+01, -2.8900000e+01, -2.8850000e+01, -2.8800000e+01, -2.8750000e+01, -2.8700000e+01, -2.8650000e+01, -2.8600000e+01, -2.8550000e+01, -2.8500000e+01, -2.8450000e+01, -2.8400000e+01, -2.8350000e+01, -2.8300000e+01, -2.8250000e+01, -2.8200000e+01, -2.8150000e+01, -2.8100000e+01, -2.8050000e+01, -2.8000000e+01, -2.7950000e+01, -2.7900000e+01, -2.7850000e+01, -2.7800000e+01, -2.7750000e+01, -2.7700000e+01, -2.7650000e+01, -2.7600000e+01, -2.7550000e+01, -2.7500000e+01, -2.7450000e+01, -2.7400000e+01, -2.7350000e+01, -2.7300000e+01, -2.7250000e+01, -2.7200000e+01, -2.7150000e+01, -2.7100000e+01, -2.7050000e+01, -2.7000000e+01, -2.6950000e+01, -2.6900000e+01, -2.6850000e+01, -2.6800000e+01, -2.6750000e+01, -2.6700000e+01, -2.6650000e+01, -2.6600000e+01, -2.6550000e+01, -2.6500000e+01, -2.6450000e+01, -2.6400000e+01, -2.6350000e+01, -2.6300000e+01, -2.6250000e+01, -2.6200000e+01, -2.6150000e+01, -2.6100000e+01, -2.6050000e+01, -2.6000000e+01, -2.5950000e+01, -2.5900000e+01, -2.5850000e+01, -2.5800000e+01, -2.5750000e+01, -2.5700000e+01, -2.5650000e+01, -2.5600000e+01, -2.5550000e+01, -2.5500000e+01, -2.5450000e+01, -2.5400000e+01, -2.5350000e+01, -2.5300000e+01, -2.5250000e+01, -2.5200000e+01, -2.5150000e+01, -2.5100000e+01, -2.5050000e+01, -2.5000000e+01, -2.4950000e+01, -2.4900000e+01, -2.4850000e+01, -2.4800000e+01, -2.4750000e+01, -2.4700000e+01, -2.4650000e+01, -2.4600000e+01, -2.4550000e+01, -2.4500000e+01, -2.4450000e+01, -2.4400000e+01, -2.4350000e+01, -2.4300000e+01, -2.4250000e+01, -2.4200000e+01, -2.4150000e+01, -2.4100000e+01, -2.4050000e+01, -2.4000000e+01, -2.3950000e+01, -2.3900000e+01, -2.3850000e+01, -2.3800000e+01, -2.3750000e+01, -2.3700000e+01, -2.3650000e+01, -2.3600000e+01, -2.3550000e+01, -2.3500000e+01, -2.3450000e+01, -2.3400000e+01, -2.3350000e+01, -2.3300000e+01, -2.3250000e+01, -2.3200000e+01, -2.3150000e+01, -2.3100000e+01, -2.3050000e+01, -2.3000000e+01, -2.2950000e+01, -2.2900000e+01, -2.2850000e+01, -2.2800000e+01, -2.2750000e+01, -2.2700000e+01, -2.2650000e+01, -2.2600000e+01, -2.2550000e+01, -2.2500000e+01, -2.2450000e+01, -2.2400000e+01, -2.2350000e+01, -2.2300000e+01, -2.2250000e+01, -2.2200000e+01, -2.2150000e+01, -2.2100000e+01, -2.2050000e+01, -2.2000000e+01, -2.1950000e+01, -2.1900000e+01, -2.1850000e+01, -2.1800000e+01, -2.1750000e+01, -2.1700000e+01, -2.1650000e+01, -2.1600000e+01, -2.1550000e+01, -2.1500000e+01, -2.1450000e+01, -2.1400000e+01, -2.1350000e+01, -2.1300000e+01, -2.1250000e+01, -2.1200000e+01, -2.1150000e+01, -2.1100000e+01, -2.1050000e+01, -2.1000000e+01, -2.0950000e+01, -2.0900000e+01, -2.0850000e+01, -2.0800000e+01, -2.0750000e+01, -2.0700000e+01, -2.0650000e+01, -2.0600000e+01, -2.0550000e+01, -2.0500000e+01, -2.0450000e+01, -2.0400000e+01, -2.0350000e+01, -2.0300000e+01, -2.0250000e+01, -2.0200000e+01, -2.0150000e+01, -2.0100000e+01, -2.0050000e+01, -2.0000000e+01, -1.9950000e+01, -1.9900000e+01, -1.9850000e+01, -1.9800000e+01, -1.9750000e+01, -1.9700000e+01, -1.9650000e+01, -1.9600000e+01, -1.9550000e+01, -1.9500000e+01, -1.9450000e+01, -1.9400000e+01, -1.9350000e+01, -1.9300000e+01, -1.9250000e+01, -1.9200000e+01, -1.9150000e+01, -1.9100000e+01, -1.9050000e+01, -1.9000000e+01, -1.8950000e+01, -1.8900000e+01, -1.8850000e+01, -1.8800000e+01, -1.8750000e+01, -1.8700000e+01, -1.8650000e+01, -1.8600000e+01, -1.8550000e+01, -1.8500000e+01, -1.8450000e+01, -1.8400000e+01, -1.8350000e+01, -1.8300000e+01, -1.8250000e+01, -1.8200000e+01, -1.8150000e+01, -1.8100000e+01, -1.8050000e+01, -1.8000000e+01, -1.7950000e+01, -1.7900000e+01, -1.7850000e+01, -1.7800000e+01, -1.7750000e+01, -1.7700000e+01, -1.7650000e+01, -1.7600000e+01, -1.7550000e+01, -1.7500000e+01, -1.7450000e+01, -1.7400000e+01, -1.7350000e+01, -1.7300000e+01, -1.7250000e+01, -1.7200000e+01, -1.7150000e+01, -1.7100000e+01, -1.7050000e+01, -1.7000000e+01, -1.6950000e+01, -1.6900000e+01, -1.6850000e+01, -1.6800000e+01, -1.6750000e+01, -1.6700000e+01, -1.6650000e+01, -1.6600000e+01, -1.6550000e+01, -1.6500000e+01, -1.6450000e+01, -1.6400000e+01, -1.6350000e+01, -1.6300000e+01, -1.6250000e+01, -1.6200000e+01, -1.6150000e+01, -1.6100000e+01, -1.6050000e+01, -1.6000000e+01, -1.5950000e+01, -1.5900000e+01, -1.5850000e+01, -1.5800000e+01, -1.5750000e+01, -1.5700000e+01, -1.5650000e+01, -1.5600000e+01, -1.5550000e+01, -1.5500000e+01, -1.5450000e+01, -1.5400000e+01, -1.5350000e+01, -1.5300000e+01, -1.5250000e+01, -1.5200000e+01, -1.5150000e+01, -1.5100000e+01, -1.5050000e+01, -1.5000000e+01, -1.4950000e+01, -1.4900000e+01, -1.4850000e+01, -1.4800000e+01, -1.4750000e+01, -1.4700000e+01, -1.4650000e+01, -1.4600000e+01, -1.4550000e+01, -1.4500000e+01, -1.4450000e+01, -1.4400000e+01, -1.4350000e+01, -1.4300000e+01, -1.4250000e+01, -1.4200000e+01, -1.4150000e+01, -1.4100000e+01, -1.4050000e+01, -1.4000000e+01, -1.3950000e+01, -1.3900000e+01, -1.3850000e+01, -1.3800000e+01, -1.3750000e+01, -1.3700000e+01, -1.3650000e+01, -1.3600000e+01, -1.3550000e+01, -1.3500000e+01, -1.3450000e+01, -1.3400000e+01, -1.3350000e+01, -1.3300000e+01, -1.3250000e+01, -1.3200000e+01, -1.3150000e+01, -1.3100000e+01, -1.3050000e+01, -1.3000000e+01, -1.2950000e+01, -1.2900000e+01, -1.2850000e+01, -1.2800000e+01, -1.2750000e+01, -1.2700000e+01, -1.2650000e+01, -1.2600000e+01, -1.2550000e+01, -1.2500000e+01, -1.2450000e+01, -1.2400000e+01, -1.2350000e+01, -1.2300000e+01, -1.2250000e+01, -1.2200000e+01, -1.2150000e+01, -1.2100000e+01, -1.2050000e+01, -1.2000000e+01, -1.1950000e+01, -1.1900000e+01, -1.1850000e+01, -1.1800000e+01, -1.1750000e+01, -1.1700000e+01, -1.1650000e+01, -1.1600000e+01, -1.1550000e+01, -1.1500000e+01, -1.1450000e+01, -1.1400000e+01, -1.1350000e+01, -1.1300000e+01, -1.1250000e+01, -1.1200000e+01, -1.1150000e+01, -1.1100000e+01, -1.1050000e+01, -1.1000000e+01, -1.0950000e+01, -1.0900000e+01, -1.0850000e+01, -1.0800000e+01, -1.0750000e+01, -1.0700000e+01, -1.0650000e+01, -1.0600000e+01, -1.0550000e+01, -1.0500000e+01, -1.0450000e+01, -1.0400000e+01, -1.0350000e+01, -1.0300000e+01, -1.0250000e+01, -1.0200000e+01, -1.0150000e+01, -1.0100000e+01, -1.0050000e+01, -1.0000000e+01, -9.9500000e+00, -9.9000000e+00, -9.8500000e+00, -9.8000000e+00, -9.7500000e+00, -9.7000000e+00, -9.6500000e+00, -9.6000000e+00, -9.5500000e+00, -9.5000000e+00, -9.4500000e+00, -9.4000000e+00, -9.3500000e+00, -9.3000000e+00, -9.2500000e+00, -9.2000000e+00, -9.1500000e+00, -9.1000000e+00, -9.0500000e+00, -9.0000000e+00, -8.9500000e+00, -8.9000000e+00, -8.8500000e+00, -8.8000000e+00, -8.7500000e+00, -8.7000000e+00, -8.6500000e+00, -8.6000000e+00, -8.5500000e+00, -8.5000000e+00, -8.4500000e+00, -8.4000000e+00, -8.3500000e+00, -8.3000000e+00, -8.2500000e+00, -8.2000000e+00, -8.1500000e+00, -8.1000000e+00, -8.0500000e+00, -8.0000000e+00, -7.9500000e+00, -7.9000000e+00, -7.8500000e+00, -7.8000000e+00, -7.7500000e+00, -7.7000000e+00, -7.6500000e+00, -7.6000000e+00, -7.5500000e+00, -7.5000000e+00, -7.4500000e+00, -7.4000000e+00, -7.3500000e+00, -7.3000000e+00, -7.2500000e+00, -7.2000000e+00, -7.1500000e+00, -7.1000000e+00, -7.0500000e+00, -7.0000000e+00, -6.9500000e+00, -6.9000000e+00, -6.8500000e+00, -6.8000000e+00, -6.7500000e+00, -6.7000000e+00, -6.6500000e+00, -6.6000000e+00, -6.5500000e+00, -6.5000000e+00, -6.4500000e+00, -6.4000000e+00, -6.3500000e+00, -6.3000000e+00, -6.2500000e+00, -6.2000000e+00, -6.1500000e+00, -6.1000000e+00, -6.0500000e+00, -6.0000000e+00, -5.9500000e+00, -5.9000000e+00, -5.8500000e+00, -5.8000000e+00, -5.7500000e+00, -5.7000000e+00, -5.6500000e+00, -5.6000000e+00, -5.5500000e+00, -5.5000000e+00, -5.4500000e+00, -5.4000000e+00, -5.3500000e+00, -5.3000000e+00, -5.2500000e+00, -5.2000000e+00, -5.1500000e+00, -5.1000000e+00, -5.0500000e+00, -5.0000000e+00, -4.9500000e+00, -4.9000000e+00, -4.8500000e+00, -4.8000000e+00, -4.7500000e+00, -4.7000000e+00, -4.6500000e+00, -4.6000000e+00, -4.5500000e+00, -4.5000000e+00, -4.4500000e+00, -4.4000000e+00, -4.3500000e+00, -4.3000000e+00, -4.2500000e+00, -4.2000000e+00, -4.1500000e+00, -4.1000000e+00, -4.0500000e+00, -4.0000000e+00, -3.9500000e+00, -3.9000000e+00, -3.8500000e+00, -3.8000000e+00, -3.7500000e+00, -3.7000000e+00, -3.6500000e+00, -3.6000000e+00, -3.5500000e+00, -3.5000000e+00, -3.4500000e+00, -3.4000000e+00, -3.3500000e+00, -3.3000000e+00, -3.2500000e+00, -3.2000000e+00, -3.1500000e+00, -3.1000000e+00, -3.0500000e+00, -3.0000000e+00, -2.9500000e+00, -2.9000000e+00, -2.8500000e+00, -2.8000000e+00, -2.7500000e+00, -2.7000000e+00, -2.6500000e+00, -2.6000000e+00, -2.5500000e+00, -2.5000000e+00, -2.4500000e+00, -2.4000000e+00, -2.3500000e+00, -2.3000000e+00, -2.2500000e+00, -2.2000000e+00, -2.1500000e+00, -2.1000000e+00, -2.0500000e+00, -2.0000000e+00, -1.9500000e+00, -1.9000000e+00, -1.8500000e+00, -1.8000000e+00, -1.7500000e+00, -1.7000000e+00, -1.6500000e+00, -1.6000000e+00, -1.5500000e+00, -1.5000000e+00, -1.4500000e+00, -1.4000000e+00, -1.3500000e+00, -1.3000000e+00, -1.2500000e+00, -1.2000000e+00, -1.1500000e+00, -1.1000000e+00, -1.0500000e+00, -1.0000000e+00, -9.5000000e-01, -9.0000000e-01, -8.5000000e-01, -8.0000000e-01, -7.5000000e-01, -7.0000000e-01, -6.5000000e-01, -6.0000000e-01, -5.5000000e-01, -5.0000000e-01, -4.5000000e-01, -4.0000000e-01, -3.5000000e-01, -3.0000000e-01, -2.5000000e-01, -2.0000000e-01, -1.5000000e-01, -1.0000000e-01, -5.0000000e-02, 0.0000000e+00, 5.0000000e-02, 1.0000000e-01, 1.5000000e-01, 2.0000000e-01, 2.5000000e-01, 3.0000000e-01, 3.5000000e-01, 4.0000000e-01, 4.5000000e-01, 5.0000000e-01, 5.5000000e-01, 6.0000000e-01, 6.5000000e-01, 7.0000000e-01, 7.5000000e-01, 8.0000000e-01, 8.5000000e-01, 9.0000000e-01, 9.5000000e-01, 1.0000000e+00, 1.0500000e+00, 1.1000000e+00, 1.1500000e+00, 1.2000000e+00, 1.2500000e+00, 1.3000000e+00, 1.3500000e+00, 1.4000000e+00, 1.4500000e+00, 1.5000000e+00, 1.5500000e+00, 1.6000000e+00, 1.6500000e+00, 1.7000000e+00, 1.7500000e+00, 1.8000000e+00, 1.8500000e+00, 1.9000000e+00, 1.9500000e+00, 2.0000000e+00, 2.0500000e+00, 2.1000000e+00, 2.1500000e+00, 2.2000000e+00, 2.2500000e+00, 2.3000000e+00, 2.3500000e+00, 2.4000000e+00, 2.4500000e+00, 2.5000000e+00, 2.5500000e+00, 2.6000000e+00, 2.6500000e+00, 2.7000000e+00, 2.7500000e+00, 2.8000000e+00, 2.8500000e+00, 2.9000000e+00, 2.9500000e+00, 3.0000000e+00, 3.0500000e+00, 3.1000000e+00, 3.1500000e+00, 3.2000000e+00, 3.2500000e+00, 3.3000000e+00, 3.3500000e+00, 3.4000000e+00, 3.4500000e+00, 3.5000000e+00, 3.5500000e+00, 3.6000000e+00, 3.6500000e+00, 3.7000000e+00, 3.7500000e+00, 3.8000000e+00, 3.8500000e+00, 3.9000000e+00, 3.9500000e+00, 4.0000000e+00, 4.0500000e+00, 4.1000000e+00, 4.1500000e+00, 4.2000000e+00, 4.2500000e+00, 4.3000000e+00, 4.3500000e+00, 4.4000000e+00, 4.4500000e+00, 4.5000000e+00, 4.5500000e+00, 4.6000000e+00, 4.6500000e+00, 4.7000000e+00, 4.7500000e+00, 4.8000000e+00, 4.8500000e+00, 4.9000000e+00, 4.9500000e+00, 5.0000000e+00, 5.0500000e+00, 5.1000000e+00, 5.1500000e+00, 5.2000000e+00, 5.2500000e+00, 5.3000000e+00, 5.3500000e+00, 5.4000000e+00, 5.4500000e+00, 5.5000000e+00, 5.5500000e+00, 5.6000000e+00, 5.6500000e+00, 5.7000000e+00, 5.7500000e+00, 5.8000000e+00, 5.8500000e+00, 5.9000000e+00, 5.9500000e+00, 6.0000000e+00, 6.0500000e+00, 6.1000000e+00, 6.1500000e+00, 6.2000000e+00, 6.2500000e+00, 6.3000000e+00, 6.3500000e+00, 6.4000000e+00, 6.4500000e+00, 6.5000000e+00, 6.5500000e+00, 6.6000000e+00, 6.6500000e+00, 6.7000000e+00, 6.7500000e+00, 6.8000000e+00, 6.8500000e+00, 6.9000000e+00, 6.9500000e+00, 7.0000000e+00, 7.0500000e+00, 7.1000000e+00, 7.1500000e+00, 7.2000000e+00, 7.2500000e+00, 7.3000000e+00, 7.3500000e+00, 7.4000000e+00, 7.4500000e+00, 7.5000000e+00, 7.5500000e+00, 7.6000000e+00, 7.6500000e+00, 7.7000000e+00, 7.7500000e+00, 7.8000000e+00, 7.8500000e+00, 7.9000000e+00, 7.9500000e+00, 8.0000000e+00, 8.0500000e+00, 8.1000000e+00, 8.1500000e+00, 8.2000000e+00, 8.2500000e+00, 8.3000000e+00, 8.3500000e+00, 8.4000000e+00, 8.4500000e+00, 8.5000000e+00, 8.5500000e+00, 8.6000000e+00, 8.6500000e+00, 8.7000000e+00, 8.7500000e+00, 8.8000000e+00, 8.8500000e+00, 8.9000000e+00, 8.9500000e+00, 9.0000000e+00, 9.0500000e+00, 9.1000000e+00, 9.1500000e+00, 9.2000000e+00, 9.2500000e+00, 9.3000000e+00, 9.3500000e+00, 9.4000000e+00, 9.4500000e+00, 9.5000000e+00, 9.5500000e+00, 9.6000000e+00, 9.6500000e+00, 9.7000000e+00, 9.7500000e+00, 9.8000000e+00, 9.8500000e+00, 9.9000000e+00, 9.9500000e+00, 1.0000000e+01, 1.0050000e+01, 1.0100000e+01, 1.0150000e+01, 1.0200000e+01, 1.0250000e+01, 1.0300000e+01, 1.0350000e+01, 1.0400000e+01, 1.0450000e+01, 1.0500000e+01, 1.0550000e+01, 1.0600000e+01, 1.0650000e+01, 1.0700000e+01, 1.0750000e+01, 1.0800000e+01, 1.0850000e+01, 1.0900000e+01, 1.0950000e+01, 1.1000000e+01, 1.1050000e+01, 1.1100000e+01, 1.1150000e+01, 1.1200000e+01, 1.1250000e+01, 1.1300000e+01, 1.1350000e+01, 1.1400000e+01, 1.1450000e+01, 1.1500000e+01, 1.1550000e+01, 1.1600000e+01, 1.1650000e+01, 1.1700000e+01, 1.1750000e+01, 1.1800000e+01, 1.1850000e+01, 1.1900000e+01, 1.1950000e+01, 1.2000000e+01, 1.2050000e+01, 1.2100000e+01, 1.2150000e+01, 1.2200000e+01, 1.2250000e+01, 1.2300000e+01, 1.2350000e+01, 1.2400000e+01, 1.2450000e+01, 1.2500000e+01, 1.2550000e+01, 1.2600000e+01, 1.2650000e+01, 1.2700000e+01, 1.2750000e+01, 1.2800000e+01, 1.2850000e+01, 1.2900000e+01, 1.2950000e+01, 1.3000000e+01, 1.3050000e+01, 1.3100000e+01, 1.3150000e+01, 1.3200000e+01, 1.3250000e+01, 1.3300000e+01, 1.3350000e+01, 1.3400000e+01, 1.3450000e+01, 1.3500000e+01, 1.3550000e+01, 1.3600000e+01, 1.3650000e+01, 1.3700000e+01, 1.3750000e+01, 1.3800000e+01, 1.3850000e+01, 1.3900000e+01, 1.3950000e+01, 1.4000000e+01, 1.4050000e+01, 1.4100000e+01, 1.4150000e+01, 1.4200000e+01, 1.4250000e+01, 1.4300000e+01, 1.4350000e+01, 1.4400000e+01, 1.4450000e+01, 1.4500000e+01, 1.4550000e+01, 1.4600000e+01, 1.4650000e+01, 1.4700000e+01, 1.4750000e+01, 1.4800000e+01, 1.4850000e+01, 1.4900000e+01, 1.4950000e+01, 1.5000000e+01, 1.5050000e+01, 1.5100000e+01, 1.5150000e+01, 1.5200000e+01, 1.5250000e+01, 1.5300000e+01, 1.5350000e+01, 1.5400000e+01, 1.5450000e+01, 1.5500000e+01, 1.5550000e+01, 1.5600000e+01, 1.5650000e+01, 1.5700000e+01, 1.5750000e+01, 1.5800000e+01, 1.5850000e+01, 1.5900000e+01, 1.5950000e+01, 1.6000000e+01, 1.6050000e+01, 1.6100000e+01, 1.6150000e+01, 1.6200000e+01, 1.6250000e+01, 1.6300000e+01, 1.6350000e+01, 1.6400000e+01, 1.6450000e+01, 1.6500000e+01, 1.6550000e+01, 1.6600000e+01, 1.6650000e+01, 1.6700000e+01, 1.6750000e+01, 1.6800000e+01, 1.6850000e+01, 1.6900000e+01, 1.6950000e+01, 1.7000000e+01, 1.7050000e+01, 1.7100000e+01, 1.7150000e+01, 1.7200000e+01, 1.7250000e+01, 1.7300000e+01, 1.7350000e+01, 1.7400000e+01, 1.7450000e+01, 1.7500000e+01, 1.7550000e+01, 1.7600000e+01, 1.7650000e+01, 1.7700000e+01, 1.7750000e+01, 1.7800000e+01, 1.7850000e+01, 1.7900000e+01, 1.7950000e+01, 1.8000000e+01, 1.8050000e+01, 1.8100000e+01, 1.8150000e+01, 1.8200000e+01, 1.8250000e+01, 1.8300000e+01, 1.8350000e+01, 1.8400000e+01, 1.8450000e+01, 1.8500000e+01, 1.8550000e+01, 1.8600000e+01, 1.8650000e+01, 1.8700000e+01, 1.8750000e+01, 1.8800000e+01, 1.8850000e+01, 1.8900000e+01, 1.8950000e+01, 1.9000000e+01, 1.9050000e+01, 1.9100000e+01, 1.9150000e+01, 1.9200000e+01, 1.9250000e+01, 1.9300000e+01, 1.9350000e+01, 1.9400000e+01, 1.9450000e+01, 1.9500000e+01, 1.9550000e+01, 1.9600000e+01, 1.9650000e+01, 1.9700000e+01, 1.9750000e+01, 1.9800000e+01, 1.9850000e+01, 1.9900000e+01, 1.9950000e+01, 2.0000000e+01, 2.0050000e+01, 2.0100000e+01, 2.0150000e+01, 2.0200000e+01, 2.0250000e+01, 2.0300000e+01, 2.0350000e+01, 2.0400000e+01, 2.0450000e+01, 2.0500000e+01, 2.0550000e+01, 2.0600000e+01, 2.0650000e+01, 2.0700000e+01, 2.0750000e+01, 2.0800000e+01, 2.0850000e+01, 2.0900000e+01, 2.0950000e+01, 2.1000000e+01, 2.1050000e+01, 2.1100000e+01, 2.1150000e+01, 2.1200000e+01, 2.1250000e+01, 2.1300000e+01, 2.1350000e+01, 2.1400000e+01, 2.1450000e+01, 2.1500000e+01, 2.1550000e+01, 2.1600000e+01, 2.1650000e+01, 2.1700000e+01, 2.1750000e+01, 2.1800000e+01, 2.1850000e+01, 2.1900000e+01, 2.1950000e+01, 2.2000000e+01, 2.2050000e+01, 2.2100000e+01, 2.2150000e+01, 2.2200000e+01, 2.2250000e+01, 2.2300000e+01, 2.2350000e+01, 2.2400000e+01, 2.2450000e+01, 2.2500000e+01, 2.2550000e+01, 2.2600000e+01, 2.2650000e+01, 2.2700000e+01, 2.2750000e+01, 2.2800000e+01, 2.2850000e+01, 2.2900000e+01, 2.2950000e+01, 2.3000000e+01, 2.3050000e+01, 2.3100000e+01, 2.3150000e+01, 2.3200000e+01, 2.3250000e+01, 2.3300000e+01, 2.3350000e+01, 2.3400000e+01, 2.3450000e+01, 2.3500000e+01, 2.3550000e+01, 2.3600000e+01, 2.3650000e+01, 2.3700000e+01, 2.3750000e+01, 2.3800000e+01, 2.3850000e+01, 2.3900000e+01, 2.3950000e+01, 2.4000000e+01, 2.4050000e+01, 2.4100000e+01, 2.4150000e+01, 2.4200000e+01, 2.4250000e+01, 2.4300000e+01, 2.4350000e+01, 2.4400000e+01, 2.4450000e+01, 2.4500000e+01, 2.4550000e+01, 2.4600000e+01, 2.4650000e+01, 2.4700000e+01, 2.4750000e+01, 2.4800000e+01, 2.4850000e+01, 2.4900000e+01, 2.4950000e+01, 2.5000000e+01, 2.5050000e+01, 2.5100000e+01, 2.5150000e+01, 2.5200000e+01, 2.5250000e+01, 2.5300000e+01, 2.5350000e+01, 2.5400000e+01, 2.5450000e+01, 2.5500000e+01, 2.5550000e+01, 2.5600000e+01, 2.5650000e+01, 2.5700000e+01, 2.5750000e+01, 2.5800000e+01, 2.5850000e+01, 2.5900000e+01, 2.5950000e+01, 2.6000000e+01, 2.6050000e+01, 2.6100000e+01, 2.6150000e+01, 2.6200000e+01, 2.6250000e+01, 2.6300000e+01, 2.6350000e+01, 2.6400000e+01, 2.6450000e+01, 2.6500000e+01, 2.6550000e+01, 2.6600000e+01, 2.6650000e+01, 2.6700000e+01, 2.6750000e+01, 2.6800000e+01, 2.6850000e+01, 2.6900000e+01, 2.6950000e+01, 2.7000000e+01, 2.7050000e+01, 2.7100000e+01, 2.7150000e+01, 2.7200000e+01, 2.7250000e+01, 2.7300000e+01, 2.7350000e+01, 2.7400000e+01, 2.7450000e+01, 2.7500000e+01, 2.7550000e+01, 2.7600000e+01, 2.7650000e+01, 2.7700000e+01, 2.7750000e+01, 2.7800000e+01, 2.7850000e+01, 2.7900000e+01, 2.7950000e+01, 2.8000000e+01, 2.8050000e+01, 2.8100000e+01, 2.8150000e+01, 2.8200000e+01, 2.8250000e+01, 2.8300000e+01, 2.8350000e+01, 2.8400000e+01, 2.8450000e+01, 2.8500000e+01, 2.8550000e+01, 2.8600000e+01, 2.8650000e+01, 2.8700000e+01, 2.8750000e+01, 2.8800000e+01, 2.8850000e+01, 2.8900000e+01, 2.8950000e+01, 2.9000000e+01, 2.9050000e+01, 2.9100000e+01, 2.9150000e+01, 2.9200000e+01, 2.9250000e+01, 2.9300000e+01, 2.9350000e+01, 2.9400000e+01, 2.9450000e+01, 2.9500000e+01, 2.9550000e+01, 2.9600000e+01, 2.9650000e+01, 2.9700000e+01, 2.9750000e+01, 2.9800000e+01, 2.9850000e+01, 2.9900000e+01, 2.9950000e+01, 3.0000000e+01, 3.0050000e+01, 3.0100000e+01, 3.0150000e+01, 3.0200000e+01, 3.0250000e+01, 3.0300000e+01, 3.0350000e+01, 3.0400000e+01, 3.0450000e+01, 3.0500000e+01, 3.0550000e+01, 3.0600000e+01, 3.0650000e+01, 3.0700000e+01, 3.0750000e+01, 3.0800000e+01, 3.0850000e+01, 3.0900000e+01, 3.0950000e+01, 3.1000000e+01, 3.1050000e+01, 3.1100000e+01, 3.1150000e+01, 3.1200000e+01, 3.1250000e+01, 3.1300000e+01, 3.1350000e+01, 3.1400000e+01, 3.1450000e+01, 3.1500000e+01, 3.1550000e+01, 3.1600000e+01, 3.1650000e+01, 3.1700000e+01, 3.1750000e+01, 3.1800000e+01, 3.1850000e+01, 3.1900000e+01, 3.1950000e+01, 3.2000000e+01, 3.2050000e+01, 3.2100000e+01, 3.2150000e+01, 3.2200000e+01, 3.2250000e+01, 3.2300000e+01, 3.2350000e+01, 3.2400000e+01, 3.2450000e+01, 3.2500000e+01, 3.2550000e+01, 3.2600000e+01, 3.2650000e+01, 3.2700000e+01, 3.2750000e+01, 3.2800000e+01, 3.2850000e+01, 3.2900000e+01, 3.2950000e+01, 3.3000000e+01, 3.3050000e+01, 3.3100000e+01, 3.3150000e+01, 3.3200000e+01, 3.3250000e+01, 3.3300000e+01, 3.3350000e+01, 3.3400000e+01, 3.3450000e+01, 3.3500000e+01, 3.3550000e+01, 3.3600000e+01, 3.3650000e+01, 3.3700000e+01, 3.3750000e+01, 3.3800000e+01, 3.3850000e+01, 3.3900000e+01, 3.3950000e+01, 3.4000000e+01, 3.4050000e+01, 3.4100000e+01, 3.4150000e+01, 3.4200000e+01, 3.4250000e+01, 3.4300000e+01, 3.4350000e+01, 3.4400000e+01, 3.4450000e+01, 3.4500000e+01, 3.4550000e+01, 3.4600000e+01, 3.4650000e+01, 3.4700000e+01, 3.4750000e+01, 3.4800000e+01, 3.4850000e+01, 3.4900000e+01, 3.4950000e+01, 3.5000000e+01, 3.5050000e+01, 3.5100000e+01, 3.5150000e+01, 3.5200000e+01, 3.5250000e+01, 3.5300000e+01, 3.5350000e+01, 3.5400000e+01, 3.5450000e+01, 3.5500000e+01, 3.5550000e+01, 3.5600000e+01, 3.5650000e+01, 3.5700000e+01, 3.5750000e+01, 3.5800000e+01, 3.5850000e+01, 3.5900000e+01, 3.5950000e+01, 3.6000000e+01, 3.6050000e+01, 3.6100000e+01, 3.6150000e+01, 3.6200000e+01, 3.6250000e+01, 3.6300000e+01, 3.6350000e+01, 3.6400000e+01, 3.6450000e+01, 3.6500000e+01, 3.6550000e+01, 3.6600000e+01, 3.6650000e+01, 3.6700000e+01, 3.6750000e+01, 3.6800000e+01, 3.6850000e+01, 3.6900000e+01, 3.6950000e+01, 3.7000000e+01, 3.7050000e+01, 3.7100000e+01, 3.7150000e+01, 3.7200000e+01, 3.7250000e+01, 3.7300000e+01, 3.7350000e+01, 3.7400000e+01, 3.7450000e+01, 3.7500000e+01, 3.7550000e+01, 3.7600000e+01, 3.7650000e+01, 3.7700000e+01, 3.7750000e+01, 3.7800000e+01, 3.7850000e+01, 3.7900000e+01, 3.7950000e+01, 3.8000000e+01, 3.8050000e+01, 3.8100000e+01, 3.8150000e+01, 3.8200000e+01, 3.8250000e+01, 3.8300000e+01, 3.8350000e+01, 3.8400000e+01, 3.8450000e+01, 3.8500000e+01, 3.8550000e+01, 3.8600000e+01, 3.8650000e+01, 3.8700000e+01, 3.8750000e+01, 3.8800000e+01, 3.8850000e+01, 3.8900000e+01, 3.8950000e+01, 3.9000000e+01, 3.9050000e+01, 3.9100000e+01, 3.9150000e+01, 3.9200000e+01, 3.9250000e+01, 3.9300000e+01, 3.9350000e+01, 3.9400000e+01, 3.9450000e+01, 3.9500000e+01, 3.9550000e+01, 3.9600000e+01, 3.9650000e+01, 3.9700000e+01, 3.9750000e+01, 3.9800000e+01, 3.9850000e+01, 3.9900000e+01, 3.9950000e+01, 4.0000000e+01, 4.0050000e+01, 4.0100000e+01, 4.0150000e+01, 4.0200000e+01, 4.0250000e+01, 4.0300000e+01, 4.0350000e+01, 4.0400000e+01, 4.0450000e+01, 4.0500000e+01, 4.0550000e+01, 4.0600000e+01, 4.0650000e+01, 4.0700000e+01, 4.0750000e+01, 4.0800000e+01, 4.0850000e+01, 4.0900000e+01, 4.0950000e+01, 4.1000000e+01, 4.1050000e+01, 4.1100000e+01, 4.1150000e+01, 4.1200000e+01, 4.1250000e+01, 4.1300000e+01, 4.1350000e+01, 4.1400000e+01, 4.1450000e+01, 4.1500000e+01, 4.1550000e+01, 4.1600000e+01, 4.1650000e+01, 4.1700000e+01, 4.1750000e+01, 4.1800000e+01, 4.1850000e+01, 4.1900000e+01, 4.1950000e+01, 4.2000000e+01, 4.2050000e+01, 4.2100000e+01, 4.2150000e+01, 4.2200000e+01, 4.2250000e+01, 4.2300000e+01, 4.2350000e+01, 4.2400000e+01, 4.2450000e+01, 4.2500000e+01, 4.2550000e+01, 4.2600000e+01, 4.2650000e+01, 4.2700000e+01, 4.2750000e+01, 4.2800000e+01, 4.2850000e+01, 4.2900000e+01, 4.2950000e+01, 4.3000000e+01, 4.3050000e+01, 4.3100000e+01, 4.3150000e+01, 4.3200000e+01, 4.3250000e+01, 4.3300000e+01, 4.3350000e+01, 4.3400000e+01, 4.3450000e+01, 4.3500000e+01, 4.3550000e+01, 4.3600000e+01, 4.3650000e+01, 4.3700000e+01, 4.3750000e+01, 4.3800000e+01, 4.3850000e+01}, - // step = { 0.0000000e+00, 1.7162587e-09, 3.4601171e-09, 5.2316998e-09, 7.0310819e-09, 8.8583102e-09, 1.0713431e-08, 1.2596515e-08, 1.4507677e-08, 1.6447083e-08, 1.8414945e-08, 2.0411505e-08, 2.2437007e-08, 2.4491675e-08, 2.6575690e-08, 2.8689175e-08, 3.0832203e-08, 3.3004804e-08, 3.5206993e-08, 3.7438790e-08, 3.9700249e-08, 4.1991465e-08, 4.4312582e-08, 4.6663782e-08, 4.9045262e-08, 5.1457207e-08, 5.3899774e-08, 5.6373070e-08, 5.8877150e-08, 6.1412031e-08, 6.3977704e-08, 6.6574167e-08, 6.9201445e-08, 7.1859611e-08, 7.4548792e-08, 7.7269162e-08, 8.0020926e-08, 8.2804297e-08, 8.5619472e-08, 8.8466606e-08, 9.1345807e-08, 9.4257138e-08, 9.7200630e-08, 1.0017631e-07, 1.0318421e-07, 1.0622444e-07, 1.0929713e-07, 1.1240249e-07, 1.1554078e-07, 1.1871229e-07, 1.2191728e-07, 1.2515602e-07, 1.2842872e-07, 1.3173554e-07, 1.3507657e-07, 1.3845189e-07, 1.4186157e-07, 1.4530572e-07, 1.4878447e-07, 1.5229802e-07, 1.5584665e-07, 1.5943065e-07, 1.6305033e-07, 1.6670602e-07, 1.7039797e-07, 1.7412639e-07, 1.7789146e-07, 1.8169330e-07, 1.8553199e-07, 1.8940765e-07, 1.9332041e-07, 1.9727046e-07, 2.0125806e-07, 2.0528349e-07, 2.0934709e-07, 2.1344920e-07, 2.1759014e-07, 2.2177019e-07, 2.2598959e-07, 2.3024854e-07, 2.3454721e-07, 2.3888578e-07, 2.4326445e-07, 2.4768345e-07, 2.5214309e-07, 2.5664371e-07, 2.6118571e-07, 2.6576950e-07, 2.7039549e-07, 2.7506404e-07, 2.7977547e-07, 2.8453004e-07, 2.8932797e-07, 2.9416948e-07, 2.9905479e-07, 3.0398415e-07, 3.0895788e-07, 3.1397636e-07, 3.1904004e-07, 3.2414940e-07, 3.2930492e-07, 3.3450707e-07, 3.3975627e-07, 3.4505286e-07, 3.5039715e-07, 3.5578941e-07, 3.6122988e-07, 3.6671883e-07, 3.7225657e-07, 3.7784347e-07, 3.8347996e-07, 3.8916652e-07, 3.9490366e-07, 4.0069188e-07, 4.0653164e-07, 4.1242337e-07, 4.1836742e-07, 4.2436410e-07, 4.3041368e-07, 4.3651641e-07, 4.4267259e-07, 4.4888254e-07, 4.5514664e-07, 4.6146534e-07, 4.6783911e-07, 4.7426844e-07, 4.8075384e-07, 4.8729573e-07, 4.9389452e-07, 5.0055056e-07, 5.0726415e-07, 5.1403560e-07, 5.2086522e-07, 5.2775336e-07, 5.3470043e-07, 5.4170688e-07, 5.4877325e-07, 5.5590006e-07, 5.6308784e-07, 5.7033710e-07, 5.7764826e-07, 5.8502171e-07, 5.9245778e-07, 5.9995678e-07, 6.0751900e-07, 6.1514478e-07, 6.2283450e-07, 6.3058862e-07, 6.3840765e-07, 6.4629212e-07, 6.5424259e-07, 6.6225960e-07, 6.7034363e-07, 6.7849508e-07, 6.8671428e-07, 6.9500153e-07, 7.0335706e-07, 7.1178111e-07, 7.2027396e-07, 7.2883595e-07, 7.3746747e-07, 7.4616899e-07, 7.5494100e-07, 7.6378402e-07, 7.7269855e-07, 7.8168503e-07, 7.9074386e-07, 7.9987535e-07, 8.0907979e-07, 8.1835744e-07, 8.2770858e-07, 8.3713352e-07, 8.4663265e-07, 8.5620638e-07, 8.6585521e-07, 8.7557963e-07, 8.8538011e-07, 8.9525712e-07, 9.0521104e-07, 9.1524220e-07, 9.2535090e-07, 9.3553739e-07, 9.4580193e-07, 9.5614483e-07, 9.6656642e-07, 9.7706713e-07, 9.8764741e-07, 9.9830775e-07, 1.0090486e-06, 1.0198705e-06, 1.0307739e-06, 1.0417590e-06, 1.0528261e-06, 1.0639756e-06, 1.0752077e-06, 1.0865227e-06, 1.0979208e-06, 1.1094026e-06, 1.1209684e-06, 1.1326190e-06, 1.1443549e-06, 1.1561767e-06, 1.1680849e-06, 1.1800801e-06, 1.1921627e-06, 1.2043330e-06, 1.2165913e-06, 1.2289381e-06, 1.2413735e-06, 1.2538980e-06, 1.2665122e-06, 1.2792164e-06, 1.2920115e-06, 1.3048979e-06, 1.3178764e-06, 1.3309474e-06, 1.3441117e-06, 1.3573695e-06, 1.3707213e-06, 1.3841676e-06, 1.3977086e-06, 1.4113449e-06, 1.4250767e-06, 1.4389048e-06, 1.4528296e-06, 1.4668518e-06, 1.4809720e-06, 1.4951906e-06, 1.5095083e-06, 1.5239256e-06, 1.5384427e-06, 1.5530601e-06, 1.5677782e-06, 1.5825974e-06, 1.5975181e-06, 1.6125409e-06, 1.6276664e-06, 1.6428952e-06, 1.6582281e-06, 1.6736655e-06, 1.6892082e-06, 1.7048566e-06, 1.7206112e-06, 1.7364723e-06, 1.7524403e-06, 1.7685156e-06, 1.7846986e-06, 1.8009899e-06, 1.8173900e-06, 1.8338996e-06, 1.8505196e-06, 1.8672506e-06, 1.8840935e-06, 1.9010490e-06, 1.9181176e-06, 1.9353000e-06, 1.9525966e-06, 1.9700080e-06, 1.9875347e-06, 2.0051772e-06, 2.0229362e-06, 2.0408124e-06, 2.0588068e-06, 2.0769201e-06, 2.0951532e-06, 2.1135069e-06, 2.1319820e-06, 2.1505792e-06, 2.1692992e-06, 2.1881424e-06, 2.2071095e-06, 2.2262010e-06, 2.2454176e-06, 2.2647598e-06, 2.2842285e-06, 2.3038243e-06, 2.3235480e-06, 2.3434004e-06, 2.3633820e-06, 2.3834934e-06, 2.4037352e-06, 2.4241078e-06, 2.4446116e-06, 2.4652471e-06, 2.4860147e-06, 2.5069152e-06, 2.5279491e-06, 2.5491173e-06, 2.5704205e-06, 2.5918593e-06, 2.6134346e-06, 2.6351468e-06, 2.6569965e-06, 2.6789841e-06, 2.7011099e-06, 2.7233743e-06, 2.7457778e-06, 2.7683207e-06, 2.7910036e-06, 2.8138273e-06, 2.8367923e-06, 2.8598996e-06, 2.8831498e-06, 2.9065436e-06, 2.9300816e-06, 2.9537642e-06, 2.9775919e-06, 3.0015650e-06, 3.0256840e-06, 3.0499491e-06, 3.0743609e-06, 3.0989199e-06, 3.1236267e-06, 3.1484822e-06, 3.1734869e-06, 3.1986417e-06, 3.2239472e-06, 3.2494039e-06, 3.2750125e-06, 3.3007733e-06, 3.3266870e-06, 3.3527540e-06, 3.3789749e-06, 3.4053505e-06, 3.4318816e-06, 3.4585690e-06, 3.4854136e-06, 3.5124164e-06, 3.5395782e-06, 3.5668997e-06, 3.5943818e-06, 3.6220250e-06, 3.6498301e-06, 3.6777978e-06, 3.7059288e-06, 3.7342240e-06, 3.7626844e-06, 3.7913111e-06, 3.8201052e-06, 3.8490680e-06, 3.8782004e-06, 3.9075036e-06, 3.9369784e-06, 3.9666259e-06, 3.9964467e-06, 4.0264418e-06, 4.0566119e-06, 4.0869580e-06, 4.1174813e-06, 4.1481828e-06, 4.1790640e-06, 4.2101262e-06, 4.2413708e-06, 4.2727992e-06, 4.3044128e-06, 4.3362127e-06, 4.3681999e-06, 4.4003757e-06, 4.4327409e-06, 4.4652967e-06, 4.4980442e-06, 4.5309847e-06, 4.5641196e-06, 4.5974502e-06, 4.6309781e-06, 4.6647046e-06, 4.6986312e-06, 4.7327592e-06, 4.7670897e-06, 4.8016240e-06, 4.8363632e-06, 4.8713085e-06, 4.9064611e-06, 4.9418224e-06, 4.9773938e-06, 5.0131768e-06, 5.0491729e-06, 5.0853837e-06, 5.1218107e-06, 5.1584552e-06, 5.1953186e-06, 5.2324019e-06, 5.2697063e-06, 5.3072329e-06, 5.3449829e-06, 5.3829574e-06, 5.4211577e-06, 5.4595853e-06, 5.4982416e-06, 5.5371281e-06, 5.5762461e-06, 5.6155969e-06, 5.6551817e-06, 5.6950014e-06, 5.7350568e-06, 5.7753488e-06, 5.8158781e-06, 5.8566455e-06, 5.8976520e-06, 5.9388985e-06, 5.9803863e-06, 6.0221165e-06, 6.0640903e-06, 6.1063089e-06, 6.1487732e-06, 6.1914843e-06, 6.2344429e-06, 6.2776498e-06, 6.3211056e-06, 6.3648112e-06, 6.4087674e-06, 6.4529751e-06, 6.4974354e-06, 6.5421496e-06, 6.5871189e-06, 6.6323445e-06, 6.6778279e-06, 6.7235701e-06, 6.7695722e-06, 6.8158352e-06, 6.8623602e-06, 6.9091479e-06, 6.9561995e-06, 7.0035161e-06, 7.0510989e-06, 7.0989492e-06, 7.1470685e-06, 7.1954580e-06, 7.2441191e-06, 7.2930531e-06, 7.3422610e-06, 7.3917438e-06, 7.4415023e-06, 7.4915374e-06, 7.5418500e-06, 7.5924412e-06, 7.6433120e-06, 7.6944639e-06, 7.7458982e-06, 7.7976165e-06, 7.8496201e-06, 7.9019106e-06, 7.9544890e-06, 8.0073567e-06, 8.0605146e-06, 8.1139637e-06, 8.1677050e-06, 8.2217396e-06, 8.2760686e-06, 8.3306936e-06, 8.3856159e-06, 8.4408373e-06, 8.4963594e-06, 8.5521840e-06, 8.6083126e-06, 8.6647468e-06, 8.7214879e-06, 8.7785371e-06, 8.8358957e-06, 8.8935650e-06, 8.9515463e-06, 9.0098411e-06, 9.0684511e-06, 9.1273783e-06, 9.1866248e-06, 9.2461925e-06, 9.3060836e-06, 9.3663001e-06, 9.4268440e-06, 9.4877170e-06, 9.5489209e-06, 9.6104576e-06, 9.6723289e-06, 9.7345368e-06, 9.7970835e-06, 9.8599714e-06, 9.9232029e-06, 9.9867806e-06, 1.0050707e-05, 1.0114984e-05, 1.0179615e-05, 1.0244601e-05, 1.0309945e-05, 1.0375649e-05, 1.0441715e-05, 1.0508145e-05, 1.0574942e-05, 1.0642108e-05, 1.0709646e-05, 1.0777560e-05, 1.0845851e-05, 1.0914523e-05, 1.0983578e-05, 1.1053019e-05, 1.1122848e-05, 1.1193067e-05, 1.1263679e-05, 1.1334685e-05, 1.1406088e-05, 1.1477890e-05, 1.1550095e-05, 1.1622705e-05, 1.1695723e-05, 1.1769153e-05, 1.1842997e-05, 1.1917258e-05, 1.1991938e-05, 1.2067041e-05, 1.2142567e-05, 1.2218519e-05, 1.2294900e-05, 1.2371711e-05, 1.2448955e-05, 1.2526634e-05, 1.2604751e-05, 1.2683310e-05, 1.2762311e-05, 1.2841758e-05, 1.2921653e-05, 1.3001998e-05, 1.3082795e-05, 1.3164046e-05, 1.3245752e-05, 1.3327916e-05, 1.3410539e-05, 1.3493624e-05, 1.3577173e-05, 1.3661188e-05, 1.3745672e-05, 1.3830628e-05, 1.3916057e-05, 1.4001963e-05, 1.4088346e-05, 1.4175210e-05, 1.4262557e-05, 1.4350388e-05, 1.4438707e-05, 1.4527517e-05, 1.4616820e-05, 1.4706621e-05, 1.4796922e-05, 1.4887727e-05, 1.4979039e-05, 1.5070861e-05, 1.5163194e-05, 1.5256043e-05, 1.5349408e-05, 1.5443292e-05, 1.5537698e-05, 1.5632629e-05, 1.5728087e-05, 1.5824077e-05, 1.5920601e-05, 1.6017664e-05, 1.6115268e-05, 1.6213418e-05, 1.6312116e-05, 1.6411365e-05, 1.6511167e-05, 1.6611526e-05, 1.6712444e-05, 1.6813924e-05, 1.6915968e-05, 1.7018580e-05, 1.7121764e-05, 1.7225523e-05, 1.7329861e-05, 1.7434782e-05, 1.7540290e-05, 1.7646387e-05, 1.7753078e-05, 1.7860366e-05, 1.7968254e-05, 1.8076746e-05, 1.8185846e-05, 1.8295557e-05, 1.8405885e-05, 1.8516833e-05, 1.8628406e-05, 1.8740608e-05, 1.8853443e-05, 1.8966916e-05, 1.9081029e-05, 1.9195788e-05, 1.9311194e-05, 1.9427253e-05, 1.9543969e-05, 1.9661346e-05, 1.9779389e-05, 1.9898104e-05, 2.0017496e-05, 2.0137569e-05, 2.0258329e-05, 2.0379781e-05, 2.0501927e-05, 2.0624773e-05, 2.0748321e-05, 2.0872576e-05, 2.0997540e-05, 2.1123219e-05, 2.1249615e-05, 2.1376735e-05, 2.1504583e-05, 2.1633164e-05, 2.1762484e-05, 2.1892547e-05, 2.2023357e-05, 2.2154920e-05, 2.2287237e-05, 2.2420313e-05, 2.2554151e-05, 2.2688753e-05, 2.2824124e-05, 2.2960266e-05, 2.3097184e-05, 2.3234882e-05, 2.3373365e-05, 2.3512636e-05, 2.3652701e-05, 2.3793563e-05, 2.3935227e-05, 2.4077698e-05, 2.4220979e-05, 2.4365076e-05, 2.4509995e-05, 2.4655740e-05, 2.4802318e-05, 2.4949735e-05, 2.5097997e-05, 2.5247111e-05, 2.5397081e-05, 2.5547913e-05, 2.5699613e-05, 2.5852186e-05, 2.6005636e-05, 2.6159970e-05, 2.6315192e-05, 2.6471310e-05, 2.6628330e-05, 2.6786261e-05, 2.6945109e-05, 2.7104883e-05, 2.7265590e-05, 2.7427237e-05, 2.7589832e-05, 2.7753380e-05, 2.7917887e-05, 2.8083358e-05, 2.8249800e-05, 2.8417218e-05, 2.8585621e-05, 2.8755015e-05, 2.8925410e-05, 2.9096815e-05, 2.9269239e-05, 2.9442692e-05, 2.9617182e-05, 2.9792720e-05, 2.9969313e-05, 3.0146969e-05, 3.0325697e-05, 3.0505504e-05, 3.0686399e-05, 3.0868389e-05, 3.1051485e-05, 3.1235694e-05, 3.1421025e-05, 3.1607487e-05, 3.1795089e-05, 3.1983839e-05, 3.2173745e-05, 3.2364813e-05, 3.2557053e-05, 3.2750471e-05, 3.2945077e-05, 3.3140877e-05, 3.3337880e-05, 3.3536095e-05, 3.3735531e-05, 3.3936194e-05, 3.4138093e-05, 3.4341233e-05, 3.4545621e-05, 3.4751263e-05, 3.4958162e-05, 3.5166326e-05, 3.5375761e-05, 3.5586475e-05, 3.5798477e-05, 3.6011779e-05, 3.6226391e-05, 3.6442328e-05, 3.6659599e-05, 3.6878218e-05, 3.7098194e-05, 3.7319538e-05, 3.7542260e-05, 3.7766367e-05, 3.7991869e-05, 3.8218776e-05, 3.8447097e-05, 3.8676844e-05, 3.8908030e-05, 3.9140668e-05, 3.9374773e-05, 3.9610359e-05, 3.9847441e-05, 4.0086034e-05, 4.0326151e-05, 4.0567809e-05, 4.0811020e-05, 4.1055798e-05, 4.1302160e-05, 4.1550119e-05, 4.1799691e-05, 4.2050893e-05, 4.2303739e-05, 4.2558247e-05, 4.2814431e-05, 4.3072308e-05, 4.3331890e-05, 4.3593193e-05, 4.3856230e-05, 4.4121015e-05, 4.4387564e-05, 4.4655892e-05, 4.4926017e-05, 4.5197955e-05, 4.5471723e-05, 4.5747337e-05, 4.6024811e-05, 4.6304157e-05, 4.6585387e-05, 4.6868509e-05, 4.7153534e-05, 4.7440470e-05, 4.7729328e-05, 4.8020121e-05, 4.8312865e-05, 4.8607578e-05, 4.8904281e-05, 4.9202994e-05, 4.9503740e-05, 4.9806544e-05, 5.0111425e-05, 5.0418407e-05, 5.0727509e-05, 5.1038750e-05, 5.1352148e-05, 5.1667724e-05, 5.1985496e-05, 5.2305488e-05, 5.2627723e-05, 5.2952228e-05, 5.3279031e-05, 5.3608160e-05, 5.3939646e-05, 5.4273518e-05, 5.4609803e-05, 5.4948529e-05, 5.5289722e-05, 5.5633410e-05, 5.5979619e-05, 5.6328375e-05, 5.6679706e-05, 5.7033640e-05, 5.7390201e-05, 5.7749415e-05, 5.8111304e-05, 5.8475887e-05, 5.8843185e-05, 5.9213216e-05, 5.9586000e-05, 5.9961563e-05, 6.0339933e-05, 6.0721140e-05, 6.1105222e-05, 6.1492218e-05, 6.1882171e-05, 6.2275126e-05, 6.2671126e-05, 6.3070214e-05, 6.3472432e-05, 6.3877816e-05, 6.4286405e-05, 6.4698234e-05, 6.5113341e-05, 6.5531765e-05, 6.5953549e-05, 6.6378744e-05, 6.6807403e-05, 6.7239584e-05, 6.7675346e-05, 6.8114751e-05, 6.8557856e-05, 6.9004713e-05, 6.9455370e-05, 6.9909871e-05, 7.0368256e-05, 7.0830565e-05, 7.1296844e-05, 7.1767139e-05, 7.2241504e-05, 7.2719997e-05, 7.3202681e-05, 7.3689620e-05, 7.4180881e-05, 7.4676537e-05, 7.5176658e-05, 7.5681321e-05, 7.6190608e-05, 7.6704605e-05, 7.7223404e-05, 7.7747103e-05, 7.8275802e-05, 7.8809604e-05, 7.9348610e-05, 7.9892916e-05, 8.0442614e-05, 8.0997791e-05, 8.1558533e-05, 8.2124927e-05, 8.2697059e-05, 8.3275018e-05, 8.3858903e-05, 8.4448827e-05, 8.5044920e-05, 8.5647333e-05, 8.6256237e-05, 8.6871817e-05, 8.7494266e-05, 8.8123772e-05, 8.8760513e-05, 8.9404654e-05, 9.0056343e-05, 9.0715731e-05, 9.1382973e-05, 9.2058241e-05, 9.2741736e-05, 9.3433690e-05, 9.4134371e-05, 9.4844080e-05, 9.5563141e-05, 9.6291884e-05, 9.7030640e-05, 9.7779729e-05, 9.8539478e-05, 9.9310229e-05, 1.0009235e-04, 1.0088626e-04, 1.0169239e-04, 1.0251126e-04, 1.0334339e-04, 1.0418935e-04, 1.0504972e-04, 1.0592514e-04, 1.0681634e-04, 1.0772411e-04, 1.0864932e-04, 1.0959293e-04, 1.1055593e-04, 1.1153942e-04, 1.1254461e-04, 1.1357287e-04, 1.1462560e-04, 1.1570434e-04, 1.1681072e-04, 1.1794661e-04, 1.1911413e-04, 1.2031563e-04, 1.2155382e-04, 1.2283171e-04, 1.2415263e-04, 1.2552011e-04, 1.2693802e-04, 1.2841050e-04, 1.2994438e-04, 1.3156373e-04, 1.3326946e-04, 1.3497518e-04, 1.3659454e-04, 1.3812842e-04, 1.3960090e-04, 1.4101880e-04, 1.4238628e-04, 1.4370720e-04, 1.4498510e-04, 1.4622328e-04, 1.4742478e-04, 1.4859230e-04, 1.4972820e-04, 1.5083458e-04, 1.5191331e-04, 1.5296605e-04, 1.5399430e-04, 1.5499950e-04, 1.5598298e-04, 1.5694598e-04, 1.5788959e-04, 1.5881481e-04, 1.5972258e-04, 1.6061377e-04, 1.6148920e-04, 1.6234957e-04, 1.6319552e-04, 1.6402765e-04, 1.6484652e-04, 1.6565266e-04, 1.6644656e-04, 1.6722868e-04, 1.6799943e-04, 1.6875918e-04, 1.6950827e-04, 1.7024703e-04, 1.7097577e-04, 1.7169483e-04, 1.7240454e-04, 1.7310522e-04, 1.7379718e-04, 1.7448067e-04, 1.7515594e-04, 1.7582318e-04, 1.7648257e-04, 1.7713426e-04, 1.7777840e-04, 1.7841514e-04, 1.7904465e-04, 1.7966710e-04, 1.8028268e-04, 1.8089158e-04, 1.8149399e-04, 1.8209009e-04, 1.8268001e-04, 1.8326390e-04, 1.8384185e-04, 1.8441399e-04, 1.8498038e-04, 1.8554112e-04, 1.8609630e-04, 1.8664600e-04, 1.8719030e-04, 1.8772931e-04, 1.8826311e-04, 1.8879181e-04, 1.8931551e-04, 1.8983431e-04, 1.9034831e-04, 1.9085759e-04, 1.9136226e-04, 1.9186238e-04, 1.9235803e-04, 1.9284929e-04, 1.9333623e-04, 1.9381892e-04, 1.9429741e-04, 1.9477177e-04, 1.9524207e-04, 1.9570835e-04, 1.9617066e-04, 1.9662904e-04, 1.9708354e-04, 1.9753420e-04, 1.9798106e-04, 1.9842416e-04, 1.9886357e-04, 1.9929933e-04, 1.9973151e-04, 2.0016017e-04, 2.0058536e-04, 2.0100715e-04, 2.0142557e-04, 2.0184068e-04, 2.0225251e-04, 2.0266110e-04, 2.0306648e-04, 2.0346870e-04, 2.0386779e-04, 2.0426379e-04, 2.0465674e-04, 2.0504670e-04, 2.0543369e-04, 2.0581777e-04, 2.0619898e-04, 2.0657735e-04, 2.0695291e-04, 2.0732570e-04, 2.0769573e-04, 2.0806303e-04, 2.0842761e-04, 2.0878950e-04, 2.0914871e-04, 2.0950527e-04, 2.0985921e-04, 2.1021054e-04, 2.1055929e-04, 2.1090550e-04, 2.1124919e-04, 2.1159038e-04, 2.1192911e-04, 2.1226540e-04, 2.1259927e-04, 2.1293075e-04, 2.1325988e-04, 2.1358669e-04, 2.1391119e-04, 2.1423343e-04, 2.1455342e-04, 2.1487119e-04, 2.1518676e-04, 2.1550016e-04, 2.1581140e-04, 2.1612051e-04, 2.1642749e-04, 2.1673237e-04, 2.1703517e-04, 2.1733592e-04, 2.1763463e-04, 2.1793133e-04, 2.1822605e-04, 2.1851879e-04, 2.1880959e-04, 2.1909844e-04, 2.1938538e-04, 2.1967040e-04, 2.1995353e-04, 2.2023476e-04, 2.2051410e-04, 2.2079158e-04, 2.2106719e-04, 2.2134096e-04, 2.2161290e-04, 2.2188302e-04, 2.2215135e-04, 2.2241790e-04, 2.2268268e-04, 2.2294572e-04, 2.2320702e-04, 2.2346661e-04, 2.2372448e-04, 2.2398067e-04, 2.2423517e-04, 2.2448802e-04, 2.2473922e-04, 2.2498879e-04, 2.2523675e-04, 2.2548311e-04, 2.2572789e-04, 2.2597110e-04, 2.2621276e-04, 2.2645288e-04, 2.2669147e-04, 2.2692855e-04, 2.2716414e-04, 2.2739824e-04, 2.2763088e-04, 2.2786207e-04, 2.2809182e-04, 2.2832014e-04, 2.2854704e-04, 2.2877255e-04, 2.2899665e-04, 2.2921937e-04, 2.2944072e-04, 2.2966070e-04, 2.2987931e-04, 2.3009659e-04, 2.3031252e-04, 2.3052713e-04, 2.3074044e-04, 2.3095244e-04, 2.3116315e-04, 2.3137259e-04, 2.3158075e-04, 2.3178765e-04, 2.3199329e-04, 2.3219768e-04, 2.3240082e-04, 2.3260272e-04, 2.3280338e-04, 2.3300282e-04, 2.3320103e-04, 2.3339804e-04, 2.3359384e-04, 2.3378844e-04, 2.3398186e-04, 2.3417410e-04, 2.3436517e-04, 2.3455507e-04, 2.3474382e-04, 2.3493143e-04, 2.3511789e-04, 2.3530322e-04, 2.3548743e-04, 2.3567052e-04, 2.3585251e-04, 2.3603341e-04, 2.3621322e-04, 2.3639194e-04, 2.3656960e-04, 2.3674619e-04, 2.3692173e-04, 2.3709622e-04, 2.3726967e-04, 2.3744210e-04, 2.3761350e-04, 2.3778390e-04, 2.3795329e-04, 2.3812169e-04, 2.3828911e-04, 2.3845555e-04, 2.3862103e-04, 2.3878553e-04, 2.3894908e-04, 2.3911168e-04, 2.3927332e-04, 2.3943403e-04, 2.3959380e-04, 2.3975265e-04, 2.3991058e-04, 2.4006760e-04, 2.4022372e-04, 2.4037894e-04, 2.4053328e-04, 2.4068673e-04, 2.4083930e-04, 2.4099100e-04, 2.4114183e-04, 2.4129180e-04, 2.4144092e-04, 2.4158918e-04, 2.4173660e-04, 2.4188317e-04, 2.4202892e-04, 2.4217384e-04, 2.4231793e-04, 2.4246122e-04, 2.4260369e-04, 2.4274535e-04, 2.4288621e-04, 2.4302628e-04, 2.4316555e-04, 2.4330403e-04, 2.4344173e-04, 2.4357865e-04, 2.4371479e-04, 2.4385016e-04, 2.4398476e-04, 2.4411860e-04, 2.4425168e-04, 2.4438399e-04, 2.4451556e-04, 2.4464637e-04, 2.4477643e-04, 2.4490575e-04, 2.4503433e-04, 2.4516218e-04, 2.4528930e-04, 2.4541569e-04, 2.4554137e-04, 2.4566634e-04, 2.4579059e-04, 2.4591414e-04, 2.4603699e-04, 2.4615913e-04, 2.4628058e-04, 2.4640134e-04, 2.4652142e-04, 2.4664081e-04, 2.4675952e-04, 2.4687757e-04, 2.4699494e-04, 2.4711166e-04, 2.4722772e-04, 2.4734313e-04, 2.4745788e-04, 2.4757200e-04, 2.4768547e-04, 2.4779831e-04, 2.4791051e-04, 2.4802208e-04, 2.4813303e-04, 2.4824336e-04, 2.4835307e-04, 2.4846217e-04, 2.4857066e-04, 2.4867855e-04, 2.4878583e-04, 2.4889253e-04, 2.4899862e-04, 2.4910413e-04, 2.4920905e-04, 2.4931339e-04, 2.4941715e-04, 2.4952033e-04, 2.4962295e-04, 2.4972499e-04, 2.4982647e-04, 2.4992739e-04, 2.5002775e-04, 2.5012755e-04, 2.5022680e-04, 2.5032550e-04, 2.5042364e-04, 2.5052125e-04, 2.5061831e-04, 2.5071484e-04, 2.5081083e-04, 2.5090628e-04, 2.5100121e-04, 2.5109562e-04, 2.5118951e-04, 2.5128287e-04, 2.5137572e-04, 2.5146805e-04, 2.5155987e-04, 2.5165119e-04, 2.5174199e-04, 2.5183229e-04, 2.5192209e-04, 2.5201140e-04, 2.5210021e-04, 2.5218852e-04, 2.5227636e-04, 2.5236370e-04, 2.5245057e-04, 2.5253695e-04, 2.5262286e-04, 2.5270829e-04, 2.5279324e-04, 2.5287773e-04, 2.5296174e-04, 2.5304529e-04, 2.5312837e-04, 2.5321100e-04, 2.5329316e-04, 2.5337487e-04, 2.5345612e-04, 2.5353691e-04, 2.5361726e-04, 2.5369715e-04, 2.5377660e-04, 2.5385560e-04, 2.5393416e-04, 2.5401228e-04, 2.5408996e-04, 2.5416720e-04, 2.5424401e-04, 2.5432039e-04, 2.5439635e-04, 2.5447187e-04, 2.5454697e-04, 2.5462166e-04, 2.5469592e-04, 2.5476976e-04, 2.5484319e-04, 2.5491621e-04, 2.5498882e-04, 2.5506102e-04, 2.5513283e-04, 2.5520423e-04, 2.5527523e-04, 2.5534585e-04, 2.5541607e-04, 2.5548589e-04, 2.5555533e-04, 2.5562439e-04, 2.5569306e-04, 2.5576135e-04, 2.5582927e-04, 2.5589680e-04, 2.5596397e-04, 2.5603077e-04, 2.5609720e-04, 2.5616326e-04, 2.5622897e-04, 2.5629431e-04, 2.5635930e-04, 2.5642393e-04, 2.5648821e-04, 2.5655213e-04, 2.5661571e-04, 2.5667894e-04, 2.5674183e-04, 2.5680438e-04, 2.5686658e-04, 2.5692846e-04, 2.5698999e-04, 2.5705120e-04, 2.5711207e-04, 2.5717261e-04, 2.5723283e-04, 2.5729272e-04, 2.5735229e-04, 2.5741153e-04, 2.5747046e-04, 2.5752907e-04, 2.5758737e-04, 2.5764535e-04, 2.5770302e-04, 2.5776038e-04, 2.5781743e-04, 2.5787417e-04, 2.5793060e-04, 2.5798673e-04, 2.5804255e-04, 2.5809808e-04, 2.5815330e-04, 2.5820822e-04, 2.5826284e-04, 2.5831717e-04, 2.5837121e-04, 2.5842495e-04, 2.5847840e-04, 2.5853156e-04, 2.5858442e-04, 2.5863700e-04, 2.5868929e-04, 2.5874130e-04, 2.5879301e-04, 2.5884445e-04, 2.5889560e-04, 2.5894647e-04, 2.5899706e-04, 2.5904738e-04, 2.5909741e-04, 2.5914717e-04, 2.5919665e-04, 2.5924586e-04, 2.5929479e-04, 2.5934346e-04, 2.5939184e-04, 2.5943996e-04, 2.5948781e-04, 2.5953540e-04, 2.5958271e-04, 2.5962977e-04, 2.5967655e-04, 2.5972308e-04, 2.5976934e-04, 2.5981534e-04, 2.5986109e-04, 2.5990657e-04, 2.5995179e-04, 2.5999676e-04, 2.6004148e-04, 2.6008594e-04, 2.6013015e-04, 2.6017410e-04, 2.6021781e-04, 2.6026126e-04, 2.6030447e-04, 2.6034743e-04, 2.6039014e-04, 2.6043260e-04, 2.6047482e-04, 2.6051680e-04, 2.6055853e-04, 2.6060001e-04, 2.6064126e-04, 2.6068227e-04, 2.6072303e-04, 2.6076356e-04, 2.6080386e-04, 2.6084391e-04, 2.6088373e-04, 2.6092332e-04, 2.6096267e-04, 2.6100179e-04, 2.6104067e-04, 2.6107933e-04, 2.6111776e-04, 2.6115596e-04, 2.6119393e-04, 2.6123168e-04, 2.6126921e-04, 2.6130651e-04, 2.6134359e-04, 2.6138046e-04, 2.6141710e-04, 2.6145353e-04, 2.6148974e-04, 2.6152574e-04, 2.6156152e-04, 2.6159709e-04, 2.6163245e-04, 2.6166760e-04, 2.6170255e-04, 2.6173729e-04, 2.6177182e-04, 2.6180615e-04, 2.6184028e-04, 2.6187421e-04, 2.6190794e-04, 2.6194146e-04, 2.6197479e-04, 2.6200793e-04, 2.6204087e-04, 2.6207362e-04, 2.6210617e-04, 2.6213854e-04, 2.6217071e-04, 2.6220270e-04, 2.6223450e-04, 2.6226611e-04, 2.6229754e-04, 2.6232879e-04, 2.6235985e-04, 2.6239073e-04, 2.6242143e-04, 2.6245196e-04, 2.6248230e-04, 2.6251247e-04, 2.6254247e-04, 2.6257229e-04, 2.6260193e-04, 2.6263141e-04, 2.6266071e-04, 2.6268985e-04, 2.6271881e-04, 2.6274760e-04, 2.6277623e-04, 2.6280469e-04, 2.6283298e-04, 2.6286112e-04, 2.6288908e-04, 2.6291689e-04, 2.6294453e-04, 2.6297201e-04, 2.6299933e-04, 2.6302650e-04, 2.6305350e-04, 2.6308034e-04, 2.6310703e-04, 2.6313356e-04, 2.6315994e-04, 2.6318616e-04, 2.6321223e-04, 2.6323814e-04, 2.6326390e-04, 2.6328951e-04, 2.6331497e-04, 2.6334027e-04, 2.6336543e-04, 2.6339043e-04, 2.6341529e-04, 2.6343999e-04, 2.6346455e-04, 2.6348896e-04, 2.6351323e-04, 2.6353735e-04, 2.6356132e-04, 2.6358515e-04, 2.6360883e-04, 2.6363237e-04, 2.6365576e-04, 2.6367901e-04, 2.6370212e-04, 2.6372509e-04, 2.6374791e-04, 2.6377059e-04, 2.6379314e-04, 2.6381554e-04, 2.6383780e-04, 2.6385993e-04, 2.6388192e-04, 2.6390377e-04, 2.6392548e-04, 2.6394705e-04, 2.6396849e-04, 2.6398980e-04, 2.6401096e-04, 2.6403200e-04, 2.6405290e-04, 2.6407367e-04, 2.6409430e-04, 2.6411481e-04, 2.6413518e-04, 2.6415542e-04, 2.6417553e-04, 2.6419551e-04, 2.6421537e-04, 2.6423509e-04, 2.6425468e-04, 2.6427415e-04, 2.6429350e-04, 2.6431271e-04, 2.6433180e-04, 2.6435077e-04, 2.6436961e-04, 2.6438833e-04, 2.6440693e-04, 2.6442541e-04, 2.6444376e-04, 2.6446199e-04, 2.6448011e-04, 2.6449810e-04, 2.6451598e-04, 2.6453374e-04, 2.6455138e-04, 2.6456891e-04, 2.6458632e-04, 2.6460361e-04, 2.6462080e-04, 2.6463786e-04, 2.6465482e-04, 2.6467166e-04, 2.6468839e-04, 2.6470501e-04, 2.6472152e-04, 2.6473792e-04, 2.6475421e-04, 2.6477040e-04, 2.6478647e-04, 2.6480244e-04, 2.6481830e-04, 2.6483406e-04, 2.6484970e-04, 2.6486525e-04, 2.6488069e-04, 2.6489602e-04, 2.6491125e-04, 2.6492637e-04, 2.6494139e-04, 2.6495632e-04, 2.6497113e-04, 2.6498585e-04, 2.6500047e-04, 2.6501499e-04, 2.6502940e-04, 2.6504372e-04, 2.6505794e-04, 2.6507206e-04, 2.6508608e-04, 2.6510001e-04, 2.6511384e-04, 2.6512757e-04, 2.6514120e-04, 2.6515475e-04, 2.6516819e-04, 2.6518154e-04, 2.6519480e-04, 2.6520797e-04, 2.6522104e-04, 2.6523402e-04, 2.6524690e-04, 2.6525970e-04, 2.6527240e-04, 2.6528502e-04, 2.6529754e-04, 2.6530998e-04, 2.6532232e-04, 2.6533458e-04, 2.6534675e-04, 2.6535883e-04, 2.6537083e-04, 2.6538274e-04, 2.6539456e-04, 2.6540629e-04, 2.6541794e-04, 2.6542951e-04, 2.6544099e-04, 2.6545239e-04, 2.6546371e-04, 2.6547494e-04, 2.6548609e-04, 2.6549715e-04, 2.6550814e-04, 2.6551904e-04, 2.6552986e-04, 2.6554061e-04, 2.6555127e-04, 2.6556185e-04, 2.6557235e-04, 2.6558277e-04, 2.6559311e-04, 2.6560338e-04, 2.6561356e-04, 2.6562367e-04, 2.6563370e-04, 2.6564366e-04, 2.6565353e-04, 2.6566333e-04, 2.6567306e-04, 2.6568271e-04, 2.6569228e-04, 2.6570178e-04, 2.6571120e-04, 2.6572056e-04, 2.6572983e-04, 2.6573904e-04, 2.6574817e-04, 2.6575723e-04, 2.6576621e-04, 2.6577513e-04, 2.6578397e-04, 2.6579274e-04, 2.6580145e-04, 2.6581008e-04, 2.6581864e-04, 2.6582713e-04, 2.6583556e-04, 2.6584391e-04, 2.6585220e-04, 2.6586042e-04, 2.6586857e-04, 2.6587665e-04, 2.6588467e-04, 2.6589262e-04, 2.6590051e-04, 2.6590832e-04, 2.6591608e-04, 2.6592377e-04, 2.6593139e-04, 2.6593896e-04, 2.6594646e-04, 2.6595389e-04, 2.6596126e-04, 2.6596858e-04, 2.6597583e-04, 2.6598301e-04, 2.6599014e-04, 2.6599721e-04, 2.6600421e-04, 2.6601116e-04, 2.6601805e-04, 2.6602488e-04, 2.6603165e-04, 2.6603836e-04, 2.6604502e-04, 2.6605162e-04, 2.6605816e-04, 2.6606464e-04, 2.6607107e-04, 2.6607745e-04, 2.6608377e-04, 2.6609003e-04, 2.6609624e-04, 2.6610240e-04, 2.6610850e-04, 2.6611455e-04, 2.6612055e-04, 2.6612649e-04, 2.6613238e-04, 2.6613822e-04, 2.6614401e-04, 2.6614975e-04, 2.6615543e-04, 2.6616107e-04, 2.6616666e-04, 2.6617219e-04, 2.6617768e-04, 2.6618312e-04, 2.6618852e-04, 2.6619386e-04, 2.6619916e-04, 2.6620441e-04, 2.6620961e-04, 2.6621476e-04, 2.6621987e-04, 2.6622494e-04, 2.6622996e-04, 2.6623493e-04, 2.6623986e-04, 2.6624474e-04, 2.6624959e-04, 2.6625438e-04, 2.6625914e-04, 2.6626385e-04, 2.6626852e-04, 2.6627314e-04, 2.6627773e-04, 2.6628227e-04, 2.6628677e-04, 2.6629123e-04, 2.6629565e-04, 2.6630003e-04, 2.6630437e-04, 2.6630866e-04, 2.6631292e-04, 2.6631714e-04, 2.6632132e-04, 2.6632546e-04, 2.6632957e-04, 2.6633363e-04, 2.6633766e-04, 2.6634164e-04, 2.6634559e-04, 2.6634951e-04, 2.6635338e-04, 2.6635722e-04, 2.6636102e-04, 2.6636479e-04, 2.6636852e-04, 2.6637221e-04, 2.6637586e-04, 2.6637948e-04, 2.6638307e-04, 2.6638662e-04, 2.6639013e-04, 2.6639361e-04, 2.6639705e-04, 2.6640046e-04, 2.6640384e-04, 2.6640718e-04, 2.6641048e-04, 2.6641376e-04, 2.6641700e-04, 2.6642020e-04, 2.6642337e-04, 2.6642651e-04, 2.6642962e-04, 2.6643269e-04, 2.6643573e-04, 2.6643874e-04, 2.6644171e-04, 2.6644466e-04, 2.6644757e-04, 2.6645045e-04, 2.6645329e-04, 2.6645611e-04, 2.6645889e-04, 2.6646164e-04, 2.6646436e-04, 2.6646705e-04, 2.6646971e-04, 2.6647234e-04, 2.6647494e-04, 2.6647750e-04, 2.6648004e-04, 2.6648254e-04, 2.6648501e-04, 2.6648746e-04, 2.6648987e-04, 2.6649225e-04, 2.6649460e-04, 2.6649692e-04, 2.6649921e-04, 2.6650147e-04, 2.6650371e-04, 2.6650591e-04, 2.6650808e-04, 2.6651022e-04, 2.6651234e-04, 2.6651442e-04, 2.6651648e-04, 2.6651850e-04, 2.6652050e-04, 2.6652247e-04, 2.6652441e-04, 2.6652632e-04, 2.6652820e-04, 2.6653005e-04, 2.6653188e-04, 2.6653368e-04, 2.6653545e-04, 2.6653720e-04}, - // continuous = true, - // nFuture=500, - // nPast=500); - - // // Minimum-phase, ds = 0.5m - // extends Interpolators.StepResponse( - // T = { 0.0000000e+00, 5.0000000e-01, 1.0000000e+00, 1.5000000e+00, 2.0000000e+00, 2.5000000e+00, 3.0000000e+00, 3.5000000e+00, 4.0000000e+00, 4.5000000e+00, 5.0000000e+00, 5.5000000e+00, 6.0000000e+00, 6.5000000e+00, 7.0000000e+00, 7.5000000e+00, 8.0000000e+00, 8.5000000e+00, 9.0000000e+00, 9.5000000e+00, 1.0000000e+01, 1.0500000e+01, 1.1000000e+01, 1.1500000e+01, 1.2000000e+01, 1.2500000e+01, 1.3000000e+01, 1.3500000e+01, 1.4000000e+01, 1.4500000e+01, 1.5000000e+01, 1.5500000e+01, 1.6000000e+01, 1.6500000e+01, 1.7000000e+01, 1.7500000e+01, 1.8000000e+01, 1.8500000e+01, 1.9000000e+01, 1.9500000e+01, 2.0000000e+01, 2.0500000e+01, 2.1000000e+01, 2.1500000e+01, 2.2000000e+01, 2.2500000e+01, 2.3000000e+01, 2.3500000e+01, 2.4000000e+01, 2.4500000e+01, 2.5000000e+01, 2.5500000e+01, 2.6000000e+01, 2.6500000e+01, 2.7000000e+01, 2.7500000e+01, 2.8000000e+01, 2.8500000e+01, 2.9000000e+01, 2.9500000e+01, 3.0000000e+01, 3.0500000e+01, 3.1000000e+01, 3.1500000e+01, 3.2000000e+01, 3.2500000e+01, 3.3000000e+01, 3.3500000e+01, 3.4000000e+01, 3.4500000e+01, 3.5000000e+01, 3.5500000e+01, 3.6000000e+01, 3.6500000e+01, 3.7000000e+01, 3.7500000e+01, 3.8000000e+01, 3.8500000e+01, 3.9000000e+01, 3.9500000e+01, 4.0000000e+01, 4.0500000e+01, 4.1000000e+01, 4.1500000e+01, 4.2000000e+01, 4.2500000e+01, 4.3000000e+01, 4.3500000e+01, 4.4000000e+01, 4.4500000e+01, 4.5000000e+01, 4.5500000e+01, 4.6000000e+01, 4.6500000e+01, 4.7000000e+01, 4.7500000e+01, 4.8000000e+01, 4.8500000e+01, 4.9000000e+01, 4.9500000e+01, 5.0000000e+01, 5.0500000e+01, 5.1000000e+01, 5.1500000e+01, 5.2000000e+01, 5.2500000e+01, 5.3000000e+01, 5.3500000e+01, 5.4000000e+01, 5.4500000e+01, 5.5000000e+01, 5.5500000e+01, 5.6000000e+01, 5.6500000e+01, 5.7000000e+01, 5.7500000e+01, 5.8000000e+01, 5.8500000e+01, 5.9000000e+01, 5.9500000e+01, 6.0000000e+01, 6.0500000e+01, 6.1000000e+01, 6.1500000e+01, 6.2000000e+01, 6.2500000e+01, 6.3000000e+01, 6.3500000e+01, 6.4000000e+01, 6.4500000e+01, 6.5000000e+01, 6.5500000e+01, 6.6000000e+01, 6.6500000e+01, 6.7000000e+01, 6.7500000e+01, 6.8000000e+01, 6.8500000e+01, 6.9000000e+01, 6.9500000e+01, 7.0000000e+01, 7.0500000e+01, 7.1000000e+01, 7.1500000e+01, 7.2000000e+01}, - // step = { 0.0000000e+00, 7.1868479e-06, 1.6368635e-05, 2.5626276e-05, 3.4544335e-05, 4.3138215e-05, 5.1428279e-05, 5.9426080e-05, 6.7136853e-05, 7.4566278e-05, 8.1720887e-05, 8.8612354e-05, 9.5252842e-05, 1.0165097e-04, 1.0781622e-04, 1.1375973e-04, 1.1948896e-04, 1.2500807e-04, 1.3032272e-04, 1.3544167e-04, 1.4037443e-04, 1.4512838e-04, 1.4970838e-04, 1.5411901e-04, 1.5836605e-04, 1.6245613e-04, 1.6639616e-04, 1.7019278e-04, 1.7385149e-04, 1.7737664e-04, 1.8077232e-04, 1.8404307e-04, 1.8719367e-04, 1.9022877e-04, 1.9315268e-04, 1.9596955e-04, 1.9868335e-04, 2.0129751e-04, 2.0381487e-04, 2.0623820e-04, 2.0857059e-04, 2.1081552e-04, 2.1297676e-04, 2.1505814e-04, 2.1706326e-04, 2.1899532e-04, 2.2085712e-04, 2.2265119e-04, 2.2437983e-04, 2.2604499e-04, 2.2764828e-04, 2.2919127e-04, 2.3067577e-04, 2.3210383e-04, 2.3347769e-04, 2.3479971e-04, 2.3607226e-04, 2.3729758e-04, 2.3847769e-04, 2.3961432e-04, 2.4070897e-04, 2.4176297e-04, 2.4277754e-04, 2.4375398e-04, 2.4469364e-04, 2.4559790e-04, 2.4646808e-04, 2.4730544e-04, 2.4811122e-04, 2.4888667e-04, 2.4963299e-04, 2.5035127e-04, 2.5104247e-04, 2.5170748e-04, 2.5234712e-04, 2.5296216e-04, 2.5355339e-04, 2.5412162e-04, 2.5466768e-04, 2.5519246e-04, 2.5569687e-04, 2.5618185e-04, 2.5664833e-04, 2.5709718e-04, 2.5752921e-04, 2.5794519e-04, 2.5834576e-04, 2.5873144e-04, 2.5910263e-04, 2.5945967e-04, 2.5980286e-04, 2.6013258e-04, 2.6044922e-04, 2.6075329e-04, 2.6104527e-04, 2.6132565e-04, 2.6159489e-04, 2.6185341e-04, 2.6210157e-04, 2.6233965e-04, 2.6256791e-04, 2.6278659e-04, 2.6299596e-04, 2.6319629e-04, 2.6338789e-04, 2.6357107e-04, 2.6374622e-04, 2.6391369e-04, 2.6407388e-04, 2.6422714e-04, 2.6437378e-04, 2.6451405e-04, 2.6464817e-04, 2.6477633e-04, 2.6489870e-04, 2.6501545e-04, 2.6512670e-04, 2.6523260e-04, 2.6533328e-04, 2.6542888e-04, 2.6551954e-04, 2.6560542e-04, 2.6568667e-04, 2.6576344e-04, 2.6583585e-04, 2.6590403e-04, 2.6596804e-04, 2.6602795e-04, 2.6608380e-04, 2.6613566e-04, 2.6618362e-04, 2.6622780e-04, 2.6626836e-04, 2.6630548e-04, 2.6633936e-04, 2.6637021e-04, 2.6639823e-04, 2.6642359e-04, 2.6644646e-04, 2.6646694e-04, 2.6648516e-04, 2.6650119e-04, 2.6651513e-04, 2.6652710e-04, 2.6653720e-04}, - // continuous = true, - // nFuture=0, - // nPast=500); - - // // Minimum-phase, ds = 0.1m - // extends Interpolators.StepResponse( - // T = { 0.0000000e+00, 1.0000000e-01, 2.0000000e-01, 3.0000000e-01, 4.0000000e-01, 5.0000000e-01, 6.0000000e-01, 7.0000000e-01, 8.0000000e-01, 9.0000000e-01, 1.0000000e+00, 1.1000000e+00, 1.2000000e+00, 1.3000000e+00, 1.4000000e+00, 1.5000000e+00, 1.6000000e+00, 1.7000000e+00, 1.8000000e+00, 1.9000000e+00, 2.0000000e+00, 2.1000000e+00, 2.2000000e+00, 2.3000000e+00, 2.4000000e+00, 2.5000000e+00, 2.6000000e+00, 2.7000000e+00, 2.8000000e+00, 2.9000000e+00, 3.0000000e+00, 3.1000000e+00, 3.2000000e+00, 3.3000000e+00, 3.4000000e+00, 3.5000000e+00, 3.6000000e+00, 3.7000000e+00, 3.8000000e+00, 3.9000000e+00, 4.0000000e+00, 4.1000000e+00, 4.2000000e+00, 4.3000000e+00, 4.4000000e+00, 4.5000000e+00, 4.6000000e+00, 4.7000000e+00, 4.8000000e+00, 4.9000000e+00, 5.0000000e+00, 5.1000000e+00, 5.2000000e+00, 5.3000000e+00, 5.4000000e+00, 5.5000000e+00, 5.6000000e+00, 5.7000000e+00, 5.8000000e+00, 5.9000000e+00, 6.0000000e+00, 6.1000000e+00, 6.2000000e+00, 6.3000000e+00, 6.4000000e+00, 6.5000000e+00, 6.6000000e+00, 6.7000000e+00, 6.8000000e+00, 6.9000000e+00, 7.0000000e+00, 7.1000000e+00, 7.2000000e+00, 7.3000000e+00, 7.4000000e+00, 7.5000000e+00, 7.6000000e+00, 7.7000000e+00, 7.8000000e+00, 7.9000000e+00, 8.0000000e+00, 8.1000000e+00, 8.2000000e+00, 8.3000000e+00, 8.4000000e+00, 8.5000000e+00, 8.6000000e+00, 8.7000000e+00, 8.8000000e+00, 8.9000000e+00, 9.0000000e+00, 9.1000000e+00, 9.2000000e+00, 9.3000000e+00, 9.4000000e+00, 9.5000000e+00, 9.6000000e+00, 9.7000000e+00, 9.8000000e+00, 9.9000000e+00, 1.0000000e+01, 1.0100000e+01, 1.0200000e+01, 1.0300000e+01, 1.0400000e+01, 1.0500000e+01, 1.0600000e+01, 1.0700000e+01, 1.0800000e+01, 1.0900000e+01, 1.1000000e+01, 1.1100000e+01, 1.1200000e+01, 1.1300000e+01, 1.1400000e+01, 1.1500000e+01, 1.1600000e+01, 1.1700000e+01, 1.1800000e+01, 1.1900000e+01, 1.2000000e+01, 1.2100000e+01, 1.2200000e+01, 1.2300000e+01, 1.2400000e+01, 1.2500000e+01, 1.2600000e+01, 1.2700000e+01, 1.2800000e+01, 1.2900000e+01, 1.3000000e+01, 1.3100000e+01, 1.3200000e+01, 1.3300000e+01, 1.3400000e+01, 1.3500000e+01, 1.3600000e+01, 1.3700000e+01, 1.3800000e+01, 1.3900000e+01, 1.4000000e+01, 1.4100000e+01, 1.4200000e+01, 1.4300000e+01, 1.4400000e+01, 1.4500000e+01, 1.4600000e+01, 1.4700000e+01, 1.4800000e+01, 1.4900000e+01, 1.5000000e+01, 1.5100000e+01, 1.5200000e+01, 1.5300000e+01, 1.5400000e+01, 1.5500000e+01, 1.5600000e+01, 1.5700000e+01, 1.5800000e+01, 1.5900000e+01, 1.6000000e+01, 1.6100000e+01, 1.6200000e+01, 1.6300000e+01, 1.6400000e+01, 1.6500000e+01, 1.6600000e+01, 1.6700000e+01, 1.6800000e+01, 1.6900000e+01, 1.7000000e+01, 1.7100000e+01, 1.7200000e+01, 1.7300000e+01, 1.7400000e+01, 1.7500000e+01, 1.7600000e+01, 1.7700000e+01, 1.7800000e+01, 1.7900000e+01, 1.8000000e+01, 1.8100000e+01, 1.8200000e+01, 1.8300000e+01, 1.8400000e+01, 1.8500000e+01, 1.8600000e+01, 1.8700000e+01, 1.8800000e+01, 1.8900000e+01, 1.9000000e+01, 1.9100000e+01, 1.9200000e+01, 1.9300000e+01, 1.9400000e+01, 1.9500000e+01, 1.9600000e+01, 1.9700000e+01, 1.9800000e+01, 1.9900000e+01, 2.0000000e+01, 2.0100000e+01, 2.0200000e+01, 2.0300000e+01, 2.0400000e+01, 2.0500000e+01, 2.0600000e+01, 2.0700000e+01, 2.0800000e+01, 2.0900000e+01, 2.1000000e+01, 2.1100000e+01, 2.1200000e+01, 2.1300000e+01, 2.1400000e+01, 2.1500000e+01, 2.1600000e+01, 2.1700000e+01, 2.1800000e+01, 2.1900000e+01, 2.2000000e+01, 2.2100000e+01, 2.2200000e+01, 2.2300000e+01, 2.2400000e+01, 2.2500000e+01, 2.2600000e+01, 2.2700000e+01, 2.2800000e+01, 2.2900000e+01, 2.3000000e+01, 2.3100000e+01, 2.3200000e+01, 2.3300000e+01, 2.3400000e+01, 2.3500000e+01, 2.3600000e+01, 2.3700000e+01, 2.3800000e+01, 2.3900000e+01, 2.4000000e+01, 2.4100000e+01, 2.4200000e+01, 2.4300000e+01, 2.4400000e+01, 2.4500000e+01, 2.4600000e+01, 2.4700000e+01, 2.4800000e+01, 2.4900000e+01, 2.5000000e+01, 2.5100000e+01, 2.5200000e+01, 2.5300000e+01, 2.5400000e+01, 2.5500000e+01, 2.5600000e+01, 2.5700000e+01, 2.5800000e+01, 2.5900000e+01, 2.6000000e+01, 2.6100000e+01, 2.6200000e+01, 2.6300000e+01, 2.6400000e+01, 2.6500000e+01, 2.6600000e+01, 2.6700000e+01, 2.6800000e+01, 2.6900000e+01, 2.7000000e+01, 2.7100000e+01, 2.7200000e+01, 2.7300000e+01, 2.7400000e+01, 2.7500000e+01, 2.7600000e+01, 2.7700000e+01, 2.7800000e+01, 2.7900000e+01, 2.8000000e+01, 2.8100000e+01, 2.8200000e+01, 2.8300000e+01, 2.8400000e+01, 2.8500000e+01, 2.8600000e+01, 2.8700000e+01, 2.8800000e+01, 2.8900000e+01, 2.9000000e+01, 2.9100000e+01, 2.9200000e+01, 2.9300000e+01, 2.9400000e+01, 2.9500000e+01, 2.9600000e+01, 2.9700000e+01, 2.9800000e+01, 2.9900000e+01, 3.0000000e+01, 3.0100000e+01, 3.0200000e+01, 3.0300000e+01, 3.0400000e+01, 3.0500000e+01, 3.0600000e+01, 3.0700000e+01, 3.0800000e+01, 3.0900000e+01, 3.1000000e+01, 3.1100000e+01, 3.1200000e+01, 3.1300000e+01, 3.1400000e+01, 3.1500000e+01, 3.1600000e+01, 3.1700000e+01, 3.1800000e+01, 3.1900000e+01, 3.2000000e+01, 3.2100000e+01, 3.2200000e+01, 3.2300000e+01, 3.2400000e+01, 3.2500000e+01, 3.2600000e+01, 3.2700000e+01, 3.2800000e+01, 3.2900000e+01, 3.3000000e+01, 3.3100000e+01, 3.3200000e+01, 3.3300000e+01, 3.3400000e+01, 3.3500000e+01, 3.3600000e+01, 3.3700000e+01, 3.3800000e+01, 3.3900000e+01, 3.4000000e+01, 3.4100000e+01, 3.4200000e+01, 3.4300000e+01, 3.4400000e+01, 3.4500000e+01, 3.4600000e+01, 3.4700000e+01, 3.4800000e+01, 3.4900000e+01, 3.5000000e+01, 3.5100000e+01, 3.5200000e+01, 3.5300000e+01, 3.5400000e+01, 3.5500000e+01, 3.5600000e+01, 3.5700000e+01, 3.5800000e+01, 3.5900000e+01, 3.6000000e+01, 3.6100000e+01, 3.6200000e+01, 3.6300000e+01, 3.6400000e+01, 3.6500000e+01, 3.6600000e+01, 3.6700000e+01, 3.6800000e+01, 3.6900000e+01, 3.7000000e+01, 3.7100000e+01, 3.7200000e+01, 3.7300000e+01, 3.7400000e+01, 3.7500000e+01, 3.7600000e+01, 3.7700000e+01, 3.7800000e+01, 3.7900000e+01, 3.8000000e+01, 3.8100000e+01, 3.8200000e+01, 3.8300000e+01, 3.8400000e+01, 3.8500000e+01, 3.8600000e+01, 3.8700000e+01, 3.8800000e+01, 3.8900000e+01, 3.9000000e+01, 3.9100000e+01, 3.9200000e+01, 3.9300000e+01, 3.9400000e+01, 3.9500000e+01, 3.9600000e+01, 3.9700000e+01, 3.9800000e+01, 3.9900000e+01, 4.0000000e+01, 4.0100000e+01, 4.0200000e+01, 4.0300000e+01, 4.0400000e+01, 4.0500000e+01, 4.0600000e+01, 4.0700000e+01, 4.0800000e+01, 4.0900000e+01, 4.1000000e+01, 4.1100000e+01, 4.1200000e+01, 4.1300000e+01, 4.1400000e+01, 4.1500000e+01, 4.1600000e+01, 4.1700000e+01, 4.1800000e+01, 4.1900000e+01, 4.2000000e+01, 4.2100000e+01, 4.2200000e+01, 4.2300000e+01, 4.2400000e+01, 4.2500000e+01, 4.2600000e+01, 4.2700000e+01, 4.2800000e+01, 4.2900000e+01, 4.3000000e+01, 4.3100000e+01, 4.3200000e+01, 4.3300000e+01, 4.3400000e+01, 4.3500000e+01, 4.3600000e+01, 4.3700000e+01, 4.3800000e+01, 4.3900000e+01, 4.4000000e+01, 4.4100000e+01, 4.4200000e+01, 4.4300000e+01, 4.4400000e+01, 4.4500000e+01, 4.4600000e+01, 4.4700000e+01, 4.4800000e+01, 4.4900000e+01, 4.5000000e+01, 4.5100000e+01, 4.5200000e+01, 4.5300000e+01, 4.5400000e+01, 4.5500000e+01, 4.5600000e+01, 4.5700000e+01, 4.5800000e+01, 4.5900000e+01, 4.6000000e+01, 4.6100000e+01, 4.6200000e+01, 4.6300000e+01, 4.6400000e+01, 4.6500000e+01, 4.6600000e+01, 4.6700000e+01, 4.6800000e+01, 4.6900000e+01, 4.7000000e+01, 4.7100000e+01, 4.7200000e+01, 4.7300000e+01, 4.7400000e+01, 4.7500000e+01, 4.7600000e+01, 4.7700000e+01, 4.7800000e+01, 4.7900000e+01, 4.8000000e+01, 4.8100000e+01, 4.8200000e+01, 4.8300000e+01, 4.8400000e+01, 4.8500000e+01, 4.8600000e+01, 4.8700000e+01, 4.8800000e+01, 4.8900000e+01, 4.9000000e+01, 4.9100000e+01, 4.9200000e+01, 4.9300000e+01, 4.9400000e+01, 4.9500000e+01, 4.9600000e+01, 4.9700000e+01, 4.9800000e+01, 4.9900000e+01, 5.0000000e+01, 5.0100000e+01, 5.0200000e+01, 5.0300000e+01, 5.0400000e+01, 5.0500000e+01, 5.0600000e+01, 5.0700000e+01, 5.0800000e+01, 5.0900000e+01, 5.1000000e+01, 5.1100000e+01, 5.1200000e+01, 5.1300000e+01, 5.1400000e+01, 5.1500000e+01, 5.1600000e+01, 5.1700000e+01, 5.1800000e+01, 5.1900000e+01, 5.2000000e+01, 5.2100000e+01, 5.2200000e+01, 5.2300000e+01, 5.2400000e+01, 5.2500000e+01, 5.2600000e+01, 5.2700000e+01, 5.2800000e+01, 5.2900000e+01, 5.3000000e+01, 5.3100000e+01, 5.3200000e+01, 5.3300000e+01, 5.3400000e+01, 5.3500000e+01, 5.3600000e+01, 5.3700000e+01, 5.3800000e+01, 5.3900000e+01, 5.4000000e+01, 5.4100000e+01, 5.4200000e+01, 5.4300000e+01, 5.4400000e+01, 5.4500000e+01, 5.4600000e+01, 5.4700000e+01, 5.4800000e+01, 5.4900000e+01, 5.5000000e+01, 5.5100000e+01, 5.5200000e+01, 5.5300000e+01, 5.5400000e+01, 5.5500000e+01, 5.5600000e+01, 5.5700000e+01, 5.5800000e+01, 5.5900000e+01, 5.6000000e+01, 5.6100000e+01, 5.6200000e+01, 5.6300000e+01, 5.6400000e+01, 5.6500000e+01, 5.6600000e+01, 5.6700000e+01, 5.6800000e+01, 5.6900000e+01, 5.7000000e+01, 5.7100000e+01, 5.7200000e+01, 5.7300000e+01, 5.7400000e+01, 5.7500000e+01, 5.7600000e+01, 5.7700000e+01, 5.7800000e+01, 5.7900000e+01, 5.8000000e+01, 5.8100000e+01, 5.8200000e+01, 5.8300000e+01, 5.8400000e+01, 5.8500000e+01, 5.8600000e+01, 5.8700000e+01, 5.8800000e+01, 5.8900000e+01, 5.9000000e+01, 5.9100000e+01, 5.9200000e+01, 5.9300000e+01, 5.9400000e+01, 5.9500000e+01, 5.9600000e+01, 5.9700000e+01, 5.9800000e+01, 5.9900000e+01, 6.0000000e+01, 6.0100000e+01, 6.0200000e+01, 6.0300000e+01, 6.0400000e+01, 6.0500000e+01, 6.0600000e+01, 6.0700000e+01, 6.0800000e+01, 6.0900000e+01, 6.1000000e+01, 6.1100000e+01, 6.1200000e+01, 6.1300000e+01, 6.1400000e+01, 6.1500000e+01, 6.1600000e+01, 6.1700000e+01, 6.1800000e+01, 6.1900000e+01, 6.2000000e+01, 6.2100000e+01, 6.2200000e+01, 6.2300000e+01, 6.2400000e+01, 6.2500000e+01, 6.2600000e+01, 6.2700000e+01, 6.2800000e+01, 6.2900000e+01, 6.3000000e+01, 6.3100000e+01, 6.3200000e+01, 6.3300000e+01, 6.3400000e+01, 6.3500000e+01, 6.3600000e+01, 6.3700000e+01, 6.3800000e+01, 6.3900000e+01, 6.4000000e+01, 6.4100000e+01, 6.4200000e+01, 6.4300000e+01, 6.4400000e+01, 6.4500000e+01, 6.4600000e+01, 6.4700000e+01, 6.4800000e+01, 6.4900000e+01, 6.5000000e+01, 6.5100000e+01, 6.5200000e+01, 6.5300000e+01, 6.5400000e+01, 6.5500000e+01, 6.5600000e+01, 6.5700000e+01, 6.5800000e+01, 6.5900000e+01, 6.6000000e+01, 6.6100000e+01, 6.6200000e+01, 6.6300000e+01, 6.6400000e+01, 6.6500000e+01, 6.6600000e+01, 6.6700000e+01, 6.6800000e+01, 6.6900000e+01, 6.7000000e+01, 6.7100000e+01, 6.7200000e+01, 6.7300000e+01, 6.7400000e+01, 6.7500000e+01, 6.7600000e+01, 6.7700000e+01, 6.7800000e+01, 6.7900000e+01, 6.8000000e+01, 6.8100000e+01, 6.8200000e+01, 6.8300000e+01, 6.8400000e+01, 6.8500000e+01, 6.8600000e+01, 6.8700000e+01, 6.8800000e+01, 6.8900000e+01, 6.9000000e+01, 6.9100000e+01, 6.9200000e+01, 6.9300000e+01, 6.9400000e+01, 6.9500000e+01, 6.9600000e+01, 6.9700000e+01, 6.9800000e+01, 6.9900000e+01, 7.0000000e+01, 7.0100000e+01, 7.0200000e+01, 7.0300000e+01, 7.0400000e+01, 7.0500000e+01, 7.0600000e+01, 7.0700000e+01, 7.0800000e+01, 7.0900000e+01, 7.1000000e+01, 7.1100000e+01, 7.1200000e+01, 7.1300000e+01, 7.1400000e+01, 7.1500000e+01, 7.1600000e+01, 7.1700000e+01, 7.1800000e+01, 7.1900000e+01}, - // step = { 0.0000000e+00, 7.2399652e-07, 1.8107331e-06, 3.1282662e-06, 4.6082246e-06, 6.2061729e-06, 7.8890890e-06, 9.6326121e-06, 1.1417863e-05, 1.3230248e-05, 1.5058720e-05, 1.6895120e-05, 1.8733651e-05, 2.0570354e-05, 2.2402332e-05, 2.4227427e-05, 2.6044207e-05, 2.7851617e-05, 2.9648511e-05, 3.1433708e-05, 3.3206498e-05, 3.4966893e-05, 3.6715296e-05, 3.8451937e-05, 4.0176561e-05, 4.1888603e-05, 4.3587645e-05, 4.5273713e-05, 4.6947181e-05, 4.8608491e-05, 5.0257929e-05, 5.1895553e-05, 5.3521235e-05, 5.5134789e-05, 5.6736110e-05, 5.8325216e-05, 5.9902219e-05, 6.1467270e-05, 6.3020538e-05, 6.4562238e-05, 6.6092621e-05, 6.7611906e-05, 6.9120178e-05, 7.0617375e-05, 7.2103377e-05, 7.3578141e-05, 7.5041745e-05, 7.6494342e-05, 7.7936071e-05, 7.9367003e-05, 8.0787146e-05, 8.2196519e-05, 8.3595214e-05, 8.4983415e-05, 8.6361364e-05, 8.7729284e-05, 8.9087323e-05, 9.0435547e-05, 9.1773977e-05, 9.3102624e-05, 9.4421503e-05, 9.5730613e-05, 9.7029950e-05, 9.8319527e-05, 9.9599403e-05, 1.0086968e-04, 1.0213049e-04, 1.0338190e-04, 1.0462399e-04, 1.0585679e-04, 1.0708039e-04, 1.0829489e-04, 1.0950047e-04, 1.1069729e-04, 1.1188546e-04, 1.1306505e-04, 1.1423608e-04, 1.1539854e-04, 1.1655246e-04, 1.1769788e-04, 1.1883484e-04, 1.1996337e-04, 1.2108348e-04, 1.2219519e-04, 1.2329854e-04, 1.2439358e-04, 1.2548035e-04, 1.2655889e-04, 1.2762926e-04, 1.2869153e-04, 1.2974578e-04, 1.3079213e-04, 1.3183066e-04, 1.3286144e-04, 1.3388452e-04, 1.3489995e-04, 1.3590780e-04, 1.3690816e-04, 1.3790116e-04, 1.3888688e-04, 1.3986539e-04, 1.4083674e-04, 1.4180095e-04, 1.4275807e-04, 1.4370813e-04, 1.4465117e-04, 1.4558723e-04, 1.4651633e-04, 1.4743849e-04, 1.4835375e-04, 1.4926214e-04, 1.5016370e-04, 1.5105845e-04, 1.5194643e-04, 1.5282766e-04, 1.5370221e-04, 1.5457014e-04, 1.5543153e-04, 1.5628642e-04, 1.5713487e-04, 1.5797690e-04, 1.5881257e-04, 1.5964193e-04, 1.6046506e-04, 1.6128200e-04, 1.6209283e-04, 1.6289758e-04, 1.6369630e-04, 1.6448905e-04, 1.6527588e-04, 1.6605686e-04, 1.6683205e-04, 1.6760149e-04, 1.6836524e-04, 1.6912336e-04, 1.6987590e-04, 1.7062292e-04, 1.7136444e-04, 1.7210048e-04, 1.7283108e-04, 1.7355626e-04, 1.7427607e-04, 1.7499054e-04, 1.7569971e-04, 1.7640360e-04, 1.7710224e-04, 1.7779565e-04, 1.7848387e-04, 1.7916693e-04, 1.7984487e-04, 1.8051774e-04, 1.8118556e-04, 1.8184837e-04, 1.8250621e-04, 1.8315911e-04, 1.8380712e-04, 1.8445028e-04, 1.8508862e-04, 1.8572218e-04, 1.8635100e-04, 1.8697513e-04, 1.8759461e-04, 1.8820947e-04, 1.8881974e-04, 1.8942547e-04, 1.9002666e-04, 1.9062337e-04, 1.9121564e-04, 1.9180350e-04, 1.9238699e-04, 1.9296612e-04, 1.9354092e-04, 1.9411144e-04, 1.9467770e-04, 1.9523974e-04, 1.9579759e-04, 1.9635130e-04, 1.9690089e-04, 1.9744638e-04, 1.9798782e-04, 1.9852524e-04, 1.9905866e-04, 1.9958810e-04, 2.0011359e-04, 2.0063514e-04, 2.0115278e-04, 2.0166654e-04, 2.0217643e-04, 2.0268247e-04, 2.0318467e-04, 2.0368307e-04, 2.0417767e-04, 2.0466852e-04, 2.0515563e-04, 2.0563902e-04, 2.0611873e-04, 2.0659477e-04, 2.0706716e-04, 2.0753594e-04, 2.0800113e-04, 2.0846276e-04, 2.0892087e-04, 2.0937546e-04, 2.0982658e-04, 2.1027426e-04, 2.1071852e-04, 2.1115940e-04, 2.1159693e-04, 2.1203114e-04, 2.1246205e-04, 2.1288971e-04, 2.1331414e-04, 2.1373538e-04, 2.1415345e-04, 2.1456839e-04, 2.1498022e-04, 2.1538897e-04, 2.1579467e-04, 2.1619735e-04, 2.1659704e-04, 2.1699376e-04, 2.1738753e-04, 2.1777837e-04, 2.1816632e-04, 2.1855140e-04, 2.1893363e-04, 2.1931304e-04, 2.1968963e-04, 2.2006344e-04, 2.2043447e-04, 2.2080276e-04, 2.2116833e-04, 2.2153118e-04, 2.2189135e-04, 2.2224884e-04, 2.2260368e-04, 2.2295589e-04, 2.2330550e-04, 2.2365251e-04, 2.2399694e-04, 2.2433880e-04, 2.2467812e-04, 2.2501491e-04, 2.2534919e-04, 2.2568096e-04, 2.2601024e-04, 2.2633704e-04, 2.2666137e-04, 2.2698324e-04, 2.2730267e-04, 2.2761966e-04, 2.2793424e-04, 2.2824640e-04, 2.2855617e-04, 2.2886356e-04, 2.2916858e-04, 2.2947125e-04, 2.2977158e-04, 2.3006959e-04, 2.3036529e-04, 2.3065871e-04, 2.3094985e-04, 2.3123873e-04, 2.3152538e-04, 2.3180981e-04, 2.3209203e-04, 2.3237206e-04, 2.3264992e-04, 2.3292563e-04, 2.3319922e-04, 2.3347069e-04, 2.3374008e-04, 2.3400738e-04, 2.3427263e-04, 2.3453585e-04, 2.3479705e-04, 2.3505626e-04, 2.3531348e-04, 2.3556875e-04, 2.3582207e-04, 2.3607347e-04, 2.3632296e-04, 2.3657057e-04, 2.3681631e-04, 2.3706020e-04, 2.3730225e-04, 2.3754249e-04, 2.3778092e-04, 2.3801756e-04, 2.3825243e-04, 2.3848554e-04, 2.3871689e-04, 2.3894651e-04, 2.3917441e-04, 2.3940061e-04, 2.3962510e-04, 2.3984792e-04, 2.4006905e-04, 2.4028852e-04, 2.4050634e-04, 2.4072252e-04, 2.4093707e-04, 2.4114999e-04, 2.4136131e-04, 2.4157102e-04, 2.4177915e-04, 2.4198569e-04, 2.4219065e-04, 2.4239406e-04, 2.4259590e-04, 2.4279620e-04, 2.4299497e-04, 2.4319221e-04, 2.4338794e-04, 2.4358217e-04, 2.4377491e-04, 2.4396617e-04, 2.4415596e-04, 2.4434429e-04, 2.4453118e-04, 2.4471663e-04, 2.4490067e-04, 2.4508329e-04, 2.4526450e-04, 2.4544433e-04, 2.4562278e-04, 2.4579985e-04, 2.4597557e-04, 2.4614994e-04, 2.4632297e-04, 2.4649467e-04, 2.4666505e-04, 2.4683412e-04, 2.4700189e-04, 2.4716838e-04, 2.4733357e-04, 2.4749750e-04, 2.4766018e-04, 2.4782160e-04, 2.4798178e-04, 2.4814073e-04, 2.4829846e-04, 2.4845498e-04, 2.4861030e-04, 2.4876443e-04, 2.4891738e-04, 2.4906916e-04, 2.4921978e-04, 2.4936925e-04, 2.4951757e-04, 2.4966476e-04, 2.4981082e-04, 2.4995576e-04, 2.5009960e-04, 2.5024233e-04, 2.5038396e-04, 2.5052451e-04, 2.5066398e-04, 2.5080238e-04, 2.5093971e-04, 2.5107599e-04, 2.5121121e-04, 2.5134539e-04, 2.5147854e-04, 2.5161066e-04, 2.5174175e-04, 2.5187183e-04, 2.5200089e-04, 2.5212895e-04, 2.5225601e-04, 2.5238208e-04, 2.5250716e-04, 2.5263126e-04, 2.5275438e-04, 2.5287654e-04, 2.5299774e-04, 2.5311798e-04, 2.5323727e-04, 2.5335562e-04, 2.5347303e-04, 2.5358951e-04, 2.5370507e-04, 2.5381972e-04, 2.5393345e-04, 2.5404629e-04, 2.5415822e-04, 2.5426926e-04, 2.5437942e-04, 2.5448870e-04, 2.5459711e-04, 2.5470466e-04, 2.5481135e-04, 2.5491719e-04, 2.5502219e-04, 2.5512636e-04, 2.5522969e-04, 2.5533221e-04, 2.5543392e-04, 2.5553482e-04, 2.5563492e-04, 2.5573423e-04, 2.5583276e-04, 2.5593052e-04, 2.5602751e-04, 2.5612374e-04, 2.5621922e-04, 2.5631396e-04, 2.5640796e-04, 2.5650123e-04, 2.5659377e-04, 2.5668561e-04, 2.5677673e-04, 2.5686715e-04, 2.5695687e-04, 2.5704591e-04, 2.5713426e-04, 2.5722194e-04, 2.5730895e-04, 2.5739529e-04, 2.5748097e-04, 2.5756601e-04, 2.5765040e-04, 2.5773415e-04, 2.5781727e-04, 2.5789976e-04, 2.5798162e-04, 2.5806287e-04, 2.5814351e-04, 2.5822354e-04, 2.5830297e-04, 2.5838179e-04, 2.5846002e-04, 2.5853766e-04, 2.5861471e-04, 2.5869117e-04, 2.5876705e-04, 2.5884235e-04, 2.5891708e-04, 2.5899123e-04, 2.5906481e-04, 2.5913782e-04, 2.5921027e-04, 2.5928215e-04, 2.5935348e-04, 2.5942424e-04, 2.5949445e-04, 2.5956410e-04, 2.5963321e-04, 2.5970176e-04, 2.5976977e-04, 2.5983724e-04, 2.5990416e-04, 2.5997055e-04, 2.6003641e-04, 2.6010173e-04, 2.6016653e-04, 2.6023080e-04, 2.6029455e-04, 2.6035779e-04, 2.6042051e-04, 2.6048273e-04, 2.6054443e-04, 2.6060564e-04, 2.6066635e-04, 2.6072657e-04, 2.6078630e-04, 2.6084555e-04, 2.6090431e-04, 2.6096260e-04, 2.6102041e-04, 2.6107776e-04, 2.6113464e-04, 2.6119106e-04, 2.6124702e-04, 2.6130253e-04, 2.6135758e-04, 2.6141219e-04, 2.6146636e-04, 2.6152009e-04, 2.6157338e-04, 2.6162624e-04, 2.6167866e-04, 2.6173066e-04, 2.6178224e-04, 2.6183340e-04, 2.6188415e-04, 2.6193447e-04, 2.6198439e-04, 2.6203390e-04, 2.6208300e-04, 2.6213169e-04, 2.6217999e-04, 2.6222788e-04, 2.6227537e-04, 2.6232247e-04, 2.6236917e-04, 2.6241549e-04, 2.6246141e-04, 2.6250694e-04, 2.6255208e-04, 2.6259684e-04, 2.6264122e-04, 2.6268522e-04, 2.6272883e-04, 2.6277208e-04, 2.6281494e-04, 2.6285743e-04, 2.6289956e-04, 2.6294131e-04, 2.6298270e-04, 2.6302372e-04, 2.6306439e-04, 2.6310469e-04, 2.6314463e-04, 2.6318422e-04, 2.6322346e-04, 2.6326235e-04, 2.6330089e-04, 2.6333908e-04, 2.6337693e-04, 2.6341444e-04, 2.6345162e-04, 2.6348846e-04, 2.6352497e-04, 2.6356114e-04, 2.6359700e-04, 2.6363253e-04, 2.6366774e-04, 2.6370264e-04, 2.6373722e-04, 2.6377149e-04, 2.6380545e-04, 2.6383911e-04, 2.6387247e-04, 2.6390553e-04, 2.6393829e-04, 2.6397076e-04, 2.6400294e-04, 2.6403484e-04, 2.6406645e-04, 2.6409778e-04, 2.6412884e-04, 2.6415962e-04, 2.6419012e-04, 2.6422036e-04, 2.6425033e-04, 2.6428003e-04, 2.6430948e-04, 2.6433866e-04, 2.6436758e-04, 2.6439625e-04, 2.6442466e-04, 2.6445282e-04, 2.6448073e-04, 2.6450839e-04, 2.6453580e-04, 2.6456297e-04, 2.6458989e-04, 2.6461657e-04, 2.6464300e-04, 2.6466920e-04, 2.6469516e-04, 2.6472088e-04, 2.6474637e-04, 2.6477162e-04, 2.6479664e-04, 2.6482143e-04, 2.6484600e-04, 2.6487033e-04, 2.6489443e-04, 2.6491831e-04, 2.6494197e-04, 2.6496540e-04, 2.6498861e-04, 2.6501159e-04, 2.6503436e-04, 2.6505691e-04, 2.6507924e-04, 2.6510135e-04, 2.6512325e-04, 2.6514493e-04, 2.6516640e-04, 2.6518766e-04, 2.6520870e-04, 2.6522953e-04, 2.6525015e-04, 2.6527057e-04, 2.6529078e-04, 2.6531077e-04, 2.6533057e-04, 2.6535016e-04, 2.6536955e-04, 2.6538874e-04, 2.6540772e-04, 2.6542651e-04, 2.6544510e-04, 2.6546349e-04, 2.6548168e-04, 2.6549968e-04, 2.6551749e-04, 2.6553510e-04, 2.6555252e-04, 2.6556975e-04, 2.6558680e-04, 2.6560365e-04, 2.6562032e-04, 2.6563681e-04, 2.6565311e-04, 2.6566923e-04, 2.6568517e-04, 2.6570093e-04, 2.6571650e-04, 2.6573191e-04, 2.6574713e-04, 2.6576218e-04, 2.6577705e-04, 2.6579176e-04, 2.6580628e-04, 2.6582064e-04, 2.6583483e-04, 2.6584884e-04, 2.6586269e-04, 2.6587637e-04, 2.6588988e-04, 2.6590322e-04, 2.6591640e-04, 2.6592941e-04, 2.6594225e-04, 2.6595494e-04, 2.6596745e-04, 2.6597981e-04, 2.6599200e-04, 2.6600402e-04, 2.6601589e-04, 2.6602759e-04, 2.6603913e-04, 2.6605051e-04, 2.6606172e-04, 2.6607278e-04, 2.6608368e-04, 2.6609441e-04, 2.6610499e-04, 2.6611540e-04, 2.6612566e-04, 2.6613576e-04, 2.6614571e-04, 2.6615550e-04, 2.6616513e-04, 2.6617461e-04, 2.6618394e-04, 2.6619311e-04, 2.6620213e-04, 2.6621101e-04, 2.6621973e-04, 2.6622831e-04, 2.6623674e-04, 2.6624503e-04, 2.6625317e-04, 2.6626118e-04, 2.6626904e-04, 2.6627676e-04, 2.6628434e-04, 2.6629179e-04, 2.6629910e-04, 2.6630628e-04, 2.6631332e-04, 2.6632024e-04, 2.6632703e-04, 2.6633369e-04, 2.6634023e-04, 2.6634665e-04, 2.6635294e-04, 2.6635911e-04, 2.6636517e-04, 2.6637111e-04, 2.6637693e-04, 2.6638264e-04, 2.6638824e-04, 2.6639373e-04, 2.6639911e-04, 2.6640439e-04, 2.6640955e-04, 2.6641461e-04, 2.6641957e-04, 2.6642443e-04, 2.6642919e-04, 2.6643384e-04, 2.6643840e-04, 2.6644286e-04, 2.6644722e-04, 2.6645149e-04, 2.6645566e-04, 2.6645974e-04, 2.6646373e-04, 2.6646762e-04, 2.6647142e-04, 2.6647513e-04, 2.6647876e-04, 2.6648229e-04, 2.6648573e-04, 2.6648909e-04, 2.6649236e-04, 2.6649554e-04, 2.6649864e-04, 2.6650165e-04, 2.6650458e-04, 2.6650742e-04, 2.6651018e-04, 2.6651286e-04, 2.6651546e-04, 2.6651798e-04, 2.6652042e-04, 2.6652278e-04, 2.6652507e-04, 2.6652727e-04, 2.6652941e-04, 2.6653146e-04, 2.6653345e-04, 2.6653536e-04, 2.6653720e-04}, - // continuous = true, - // nFuture=0, - // nPast=500); -end RailIrregularities; diff --git a/Noise 1.0 Beta.1/Examples/Utilities/RailIrregularities/package.order b/Noise 1.0 Beta.1/Examples/Utilities/RailIrregularities/package.order deleted file mode 100644 index e69de29b..00000000 diff --git a/Noise 1.0 Beta.1/Examples/Utilities/package.order b/Noise 1.0 Beta.1/Examples/Utilities/package.order deleted file mode 100644 index 58d96b9b..00000000 --- a/Noise 1.0 Beta.1/Examples/Utilities/package.order +++ /dev/null @@ -1 +0,0 @@ -RailIrregularities diff --git a/Noise 1.0 Beta.1/Examples/package.mo b/Noise 1.0 Beta.1/Examples/package.mo deleted file mode 100644 index d0ae4020..00000000 --- a/Noise 1.0 Beta.1/Examples/package.mo +++ /dev/null @@ -1,4 +0,0 @@ -within Noise; -package Examples "Examples for the Noise library" -extends Modelica.Icons.ExamplesPackage; -end Examples; diff --git a/Noise 1.0 Beta.1/Examples/package.order b/Noise 1.0 Beta.1/Examples/package.order deleted file mode 100644 index 09b4ce8b..00000000 --- a/Noise 1.0 Beta.1/Examples/package.order +++ /dev/null @@ -1,8 +0,0 @@ -SignalBasedNoise -SignalInterpolation -FrequencyShaping -Interpolation -Correlations -Derivatives -RailIrregularities -InterpolateRandomNumbers diff --git a/Noise 1.0 Beta.1/Generators/package.mo b/Noise 1.0 Beta.1/Generators/package.mo deleted file mode 100644 index b54070ba..00000000 --- a/Noise 1.0 Beta.1/Generators/package.mo +++ /dev/null @@ -1,9 +0,0 @@ -within Noise; -package Generators "Additional random number generators" - extends Modelica.Icons.Package; - - annotation (Icon(graphics={ Line( - points={{-90,-54},{-50,-54},{-50,54},{50,54},{50,-54},{84,-54}}, - color={0,0,0}, - smooth=Smooth.None)})); -end Generators; diff --git a/Noise 1.0 Beta.1/Generators/package.order b/Noise 1.0 Beta.1/Generators/package.order deleted file mode 100644 index e69de29b..00000000 diff --git a/Noise 1.0 Beta.1/Interpolators/Constant/package.mo b/Noise 1.0 Beta.1/Interpolators/Constant/package.mo deleted file mode 100644 index 43609b4a..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Constant/package.mo +++ /dev/null @@ -1,74 +0,0 @@ -within Noise.Interpolators; -package Constant "Constant interpolation" - extends Utilities.Interfaces.PartialInterpolator( - final continuous=false, - final nFuture=0, - final nPast=0, - final varianceFactor=1, - final smoothness=-1); - - - redeclare function extends interpolate - "Constant interpolation in a buffer of random values" - algorithm - y := buffer[if nBuffer == 1 then 1 else integer(offset) + 1]; - annotation(Inline=true, Documentation(info=" -

Syntax

-
y = Constant.interpolate(buffer,offset);
-

Description

-

Interpolate in buffer by using constant interpolation. Input argument offset is a Real number marking the point at which interpolation shall take place. offset=0 is the first buffer value buffer[1]. offset=size(buffer,1)-1 is the last buffer value buffer[size(buffer,1)]. It is required that 0 ≤ offset < size(buffer,1)-1. If the buffer has length 1, the function always returns y=buffer[1]. Otherwise the function returns y = buffer[integer(offset)+1].

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

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

-This Interpolation package provides constant interpolation in a buffer. -

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-"), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), - graphics={Line( - points={{-78,-48},{-24,-48},{-24,-8},{28,-8},{28,52},{78,52}}, - color={0,0,0}, - smooth=Smooth.None)})); -end Constant; diff --git a/Noise 1.0 Beta.1/Interpolators/Constant/package.order b/Noise 1.0 Beta.1/Interpolators/Constant/package.order deleted file mode 100644 index b5957de2..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Constant/package.order +++ /dev/null @@ -1 +0,0 @@ -interpolate diff --git a/Noise 1.0 Beta.1/Interpolators/FirstOrder/package.mo b/Noise 1.0 Beta.1/Interpolators/FirstOrder/package.mo deleted file mode 100644 index 672b5090..00000000 --- a/Noise 1.0 Beta.1/Interpolators/FirstOrder/package.mo +++ /dev/null @@ -1,57 +0,0 @@ -within Noise.Interpolators; -package FirstOrder "A linear first order filter (k / (Ts + 1))" - extends Utilities.Interfaces.PartialInterpolatorWithKernel(final continuous=true, - final nFuture=0, - nPast=5, - varianceFactor=0.900004539919624, - suggestedSamplePeriod=0.1); - - constant Real k=1 "Gain"; - constant Modelica.SIunits.Period T=0.01 "Time Constant"; - - - redeclare function extends kernel - "Kernel for first-order ideal low pass (k / (Ts + 1))" -protected - Real a; - Real b; - algorithm - - // Transfer function: - // G = k / (Ts + 1) - // = b / ( s + a) => b = k/T, a = 1/T - b := k/T; - a := 1/T; - - // Impulse response: - // h = b * e^(-at) for t >= 0 - // - // Step response: - // h = b/a*(1-e^(-at)) for t >= 0 - h := if t < 0 then 0 else b/a * (1-exp(-a*t)); - - annotation(Inline=true); - end kernel; - - - redeclare function extends der_kernel_offset -protected - function d = der(kernel, t); - algorithm - h := d(t); - end der_kernel_offset; - - - redeclare function extends interpolate - - annotation(Inline=true, - derivative(order=1) = der_interpolate); - end interpolate; - - -annotation (Icon(graphics={ - Line( - points={{-90,-48},{-22,-48},{-22,-48},{6,46},{88,46}}, - color={0,0,0}, - smooth=Smooth.Bezier)})); -end FirstOrder; diff --git a/Noise 1.0 Beta.1/Interpolators/FirstOrder/package.order b/Noise 1.0 Beta.1/Interpolators/FirstOrder/package.order deleted file mode 100644 index 704f26f5..00000000 --- a/Noise 1.0 Beta.1/Interpolators/FirstOrder/package.order +++ /dev/null @@ -1,5 +0,0 @@ -k -T -kernel -der_kernel_offset -interpolate diff --git a/Noise 1.0 Beta.1/Interpolators/Linear/der_interpolate.mo b/Noise 1.0 Beta.1/Interpolators/Linear/der_interpolate.mo deleted file mode 100644 index 8a39ae70..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Linear/der_interpolate.mo +++ /dev/null @@ -1,63 +0,0 @@ -within Noise.Interpolators.Linear; -function der_interpolate - extends Modelica.Icons.Function; - input Real buffer[:] "Buffer of random numbers"; - input Real offset "Offset from buffer start (0..size(buffer)-1"; - input Real samplePeriod = 1 "The sample period of the noise buffer"; - input Real der_buffer[size(buffer,1)] "Derivatives of buffer values"; - input Real der_offset "Derivative of offset value"; - input Real der_samplePeriod "Derivative of samplePeriod (unused)"; - output Real der_y "Interpolated value at position offset"; -protected - Integer ind "Index of buffer element just before offset"; - Real der_y1 "Value of buffer element just before offset"; - Real der_y2 "Value of buffer element just after offset"; - Integer nBuffer = size(buffer,1); -algorithm - // For a general kernel based interpolation: - // y = sum( (K(-o) * b[i]) ) - // y' = sum( (K(-o) * b[i])' ) - // = sum( K(-o)' * b[i] + K(o) * b[i]' ) - // = sum( -dK/do*o'* b[i] + K(o) * b[i]' ) - // = sum( -dK/do * b[i] ) * o' - // + sum( K(o) * b[i]' ) - - // We need to interpolate only between two values - if offset >= nBuffer - nFuture and offset <= (1+1e-6)*(nBuffer - nFuture) then - ind :=nBuffer - 1; - else - assert(offset >= nPast and offset < nBuffer - nFuture, - "offset out of range (offset=" + String(offset) + ", nBuffer="+String(nBuffer)+")"); - ind := integer(offset) + 1; - end if; - der_y1 := der_buffer[ind]; - der_y2 := der_buffer[ind+1]; - der_y := (buffer[ind+1] - buffer[ind]) * der_offset - + der_y1 + (der_y2-der_y1)*(offset-ind+1); - annotation (Documentation(info=" -

Syntax

-
der_y = Linear.der_interpolate(buffer,offset,der_buffer,der_offset);
-

Description

-

Determine the derivative of a signal interpolated linearly in a buffer (see interpolate). Input argument offset is a Real number marking the point at which interpolation shall take place. Input arguments der_buffer and der_offset are the derivatives of the input arguments buffer and offset. This function is used as derivative of the interpolate function. Please see the description there for an introduction to the interpolation method used and specific remerks in the buffer and offset values.

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); -end der_interpolate; diff --git a/Noise 1.0 Beta.1/Interpolators/Linear/package.mo b/Noise 1.0 Beta.1/Interpolators/Linear/package.mo deleted file mode 100644 index eb32e370..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Linear/package.mo +++ /dev/null @@ -1,88 +0,0 @@ -within Noise.Interpolators; -package Linear "Linear interpolation" - extends Utilities.Interfaces.PartialInterpolator( - final continuous=true, - final nFuture=1, - final nPast=0, - final varianceFactor=2/3, - final smoothness=0); - - - redeclare replaceable function extends interpolate - "Linear interpolation in a buffer of random values" -protected - Integer ind "Index of buffer element just before offset"; - Real y1 "Value of buffer element just before offset"; - Real y2 "Value of buffer element just after offset"; - Real offset2; - algorithm - // Ensure that offset is in assumed range - assert(offset >= 0 and offset < nBuffer-1, - "offset out of range (offset=" + String(offset) + ", nBuffer="+String(nBuffer)+")"); - - // We need to interpolate only between two values - ind := integer(offset) + 1; - y1 := buffer[ind]; - y2 := buffer[ind+1]; - y := y1 + (y2-y1)*(offset-ind+1); - - annotation(derivative(order=1) = der_interpolate, Documentation(info=" -

Syntax

-
y = Linear.interpolate(buffer,offset);
-

Description

-

Interpolate in buffer by using linear interpolation. Input argument offset is a Real number marking the point at which interpolation shall take place. offset=0 is the first buffer value buffer[1]. offset=size(buffer,1)-1 is the last buffer value buffer[size(buffer,1)]. It is required that 0 ≤ offset < size(buffer,1)-1. The function returns the lineraly interpolated value. In order to avoid issues at the end of the buffer (where a minimally too large offset value triggers an assert), it is best to make the buffer one element larger as needed. For example, if the buffer is filled with a sample period of 1 ms and every 100 samples an event occurs, then the buffer should have length 102 for the samples 0 ms, 1 ms, 2 ms, ...., 100 ms, 101 ms.

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

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

-This Interpolation package provides linear interpolation in a buffer. -

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-"), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), - graphics={Line( - points={{-86,-48},{-26,-48},{26,46},{92,46}}, - color={0,0,0}, - smooth=Smooth.None)})); -end Linear; diff --git a/Noise 1.0 Beta.1/Interpolators/Linear/package.order b/Noise 1.0 Beta.1/Interpolators/Linear/package.order deleted file mode 100644 index 1144ed34..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Linear/package.order +++ /dev/null @@ -1,2 +0,0 @@ -interpolate -der_interpolate diff --git a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/der_interpolate.mo b/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/der_interpolate.mo deleted file mode 100644 index ba8379d1..00000000 --- a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/der_interpolate.mo +++ /dev/null @@ -1,54 +0,0 @@ -within Noise.Interpolators.SmoothIdealLowPass; -function der_interpolate "Interpolates the buffer using a replaceable kernel" - extends Modelica.Icons.Function; - input Real buffer[:] "Buffer of random numbers"; - input Real offset "Offset from buffer start (0..size(buffer)-1"; - input Real samplePeriod = 1 "The sample period of the noise buffer"; - input Real der_buffer[size(buffer,1)] "Derivatives of buffer values"; - input Real der_offset "Derivative of offset value"; - input Real der_samplePeriod "Derivative of samplePeriod (unused)"; - output Real der_y "Interpolated value at position offset"; -algorithm - // For a general kernel based interpolation: - // y = sum( (K(-o) * b[i]) ) - // y' = sum( (K(-o) * b[i])' ) - // = sum( K(-o)' * b[i] + K(o) * b[i]' ) - // = sum( -dK/do*o'* b[i] + K(o) * b[i]' ) - // = sum( -dK/do * b[i] ) * o' - // + sum( K(o) * b[i]' ) - - // Initialize the convolution algorithm - der_y := 0; - - // Calculate weighted sum over -nPast...nFuture random samples - for i in -nPast:nFuture loop - der_y := der_y + der_kernel_offset(t=mod(offset,1)-i) * buffer[integer(offset)+i+1] * der_offset - + kernel( t=mod(offset,1)-i) * der_buffer[integer(offset)+i+1]; - end for; - annotation (Documentation(info=" -

Syntax

-
der_y = SmoothIdealLowPass.der_interpolate(buffer,offset,der_buffer,der_offset);
-

Description

-

Determine the derivative of a signal interpolated smoothly in a buffer (see interpolate). Input argument offset is a Real number marking the point at which interpolation shall take place. Input arguments der_buffer and der_offset are the derivatives of the input arguments buffer and offset. This function is used as derivative of the interpolate function. Please see the description there for an introduction to the interpolation method used and specific remerks in the buffer and offset values.

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); -end der_interpolate; diff --git a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/der_kernel_offset.mo b/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/der_kernel_offset.mo deleted file mode 100644 index 78de2352..00000000 --- a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/der_kernel_offset.mo +++ /dev/null @@ -1,37 +0,0 @@ -within Noise.Interpolators.SmoothIdealLowPass; -function der_kernel_offset - input Real t "The (scaled) time for sampling period=1"; - input Modelica.SIunits.Frequency f=1/2 "The cut-off frequency of the filter"; - output Real h "The impulse response of the convolution filter"; -protected - function d = der(kernel, t); -algorithm - h := d(t,f); -annotation (Documentation(info=" -

Syntax

-
der_h = SmoothIdealLowPass.der_kernel_offset(offset);
-

Description

-

This function defines the derivative of the kernel of the SmoothIdealLowPass interpolation with respect to its input argument offset. This function is used for determining the derivative of the interpolated signal.

-", - revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); -end der_kernel_offset; diff --git a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/kernel.mo b/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/kernel.mo deleted file mode 100644 index 48512d19..00000000 --- a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/kernel.mo +++ /dev/null @@ -1,37 +0,0 @@ -within Noise.Interpolators.SmoothIdealLowPass; -function kernel "Kernel for ideal low pass (sinc-function)" - import Modelica_Noise.Math.Special.sinc; - import Modelica.Constants.pi; - input Real t "The (scaled) time for sampling period=1"; - input Modelica.SIunits.Frequency f=1/2 "The cut-off frequency of the filter"; - output Real h "The impulse response of the convolution filter"; -algorithm - h := 2*f*sinc(2*pi*f*t); - annotation(Inline=true, Documentation(info=" -

Syntax

-
h = SmoothIdealLowPass.kernel(offset);
-

Description

-

This function defines the kernel of the SmoothIdealLowPass interpolation. It uses the sinc function with a specified cut-off frequency.

-", - revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); -end kernel; diff --git a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/package.mo b/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/package.mo deleted file mode 100644 index 3bf933dd..00000000 --- a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/package.mo +++ /dev/null @@ -1,150 +0,0 @@ -within Noise.Interpolators; -package SmoothIdealLowPass "Smooth interpolation (with sinc function)" - extends Utilities.Interfaces.PartialInterpolator( - final continuous=true, - final nFuture=n - 1, - final nPast=n, - final varianceFactor=0.979776342307764, - final smoothness=1); - constant Integer n = 5 "Number of support points for convolution"; - - - redeclare function extends interpolate - "Smooth interpolation in a buffer of random values (using the sinc-function that approximates an ideal low pass filter)" -protected - Real coefficient "The intermediate container for the kernel evaluations"; - algorithm - // Ensure that offset is in assumed range - assert(offset >= nPast and offset < nBuffer - nFuture, - "offset out of range (offset=" + String(offset) + ", nBuffer="+String(nBuffer)+")"); - - // Initialize the convolution algorithm - y := 0; - - // What is convolution?! - // - // We always carry a kernel function along with our time. - // That means, that the kernel's central point kernel(0) always occurs at - // the current time point! - // Since we are working with an offset instead of the time directly, - // the kernel's central point must occur at the current offset. - // - // See the following diagram: - // (In our offset space, assume that dt=1 and t=offset.) - // - // t-2dt t t+2dt - // + - + - + - + - + - + - + - + - + -> simulation time - // t-3dt t-1dt t+1dt t+3dt - // | - // - // 1 -| ^ kernel(delta_t) - // | / \ - // | _ / \ _ - // | -3/ \-2 -1/ 0 \1 2/ \3 - // 0 -+ - + - + - + - + - + - + - + - + -> phase - // | | | \ / | | \ / | - // | V V - // delta_t/dt <> - // | - // Now, we have some random samples, which are given at discrete points. - // In our offset coordinates, these are given at integer offset values. - // | - // | | | | | | | | dt - // | / - // + + + + + + + +<->+ offset - // -3 -2 -1 0 1 2 3 - // - // states_in _________________^___^___^___^___^___^___^ - // iterations - // until -n +1 +1 +1 +1 +1 +1 - // - // Convolution: filter = sum( signal(time) * Kernel(phase*pi) ) - // time = sample + instance - // phase = sample - delta_t/dt - // sample = -2 .. 3 - // - // Loop over 2n support points for the convolution = sum( random(i)*kernel(offset-i) ) - // The random number is for time = (floor(t/dt) * dt + i * dt) - // The kernel result is for time = t - (floor(t/dt) * dt + i * dt) - // or, if sampled: time = t - ( t_last + i * dt) - - // Calculate weighted sum over -nPast...nFuture random samples - for i in -nPast:nFuture loop - - // We use the kernel in -i direction to enable step response kernels - coefficient := kernel(t=mod( offset,1)-i); - - // We use the kernel in +i direction for the random samples - // The +1 accounts for one-based indizes - y := y + buffer[ integer(offset) +i+1]*coefficient; - - // Modelica.Utilities.Streams.print("i=" + String(i) + ", " - // +"t=" + String(mod(offset,1)+i) + ", " - // +"k=" + String(coefficient)+ ", " - // +"o=" + String(offset)+ ", " - // +"n=" + String(integer(offset)+i)); - end for; - annotation(derivative(order=1) = der_interpolate, Documentation(info=" -

Syntax

-
y = SmoothIdealLowPass.interpolate(buffer,offset);
-

Description

-

Interpolate in buffer by using the sinc function. This is an approximation of an ideal low pass filter that completely blocks frequencies above the cut-off frequency f = 1/T (where T is the sample period with which the buffer was filled). Input argument offset is a Real number marking the point at which interpolation shall take place. offset=0 is the first buffer value buffer[1]. offset=size(buffer,1)-1 is the last buffer value buffer[size(buffer,1)]. It is required that 0 ≤ offset < size(buffer,1)-1. The function returns the interpolated value. The interpolation is continuous with a continuous first derivative. In order to avoid issues at the end of the buffer (where a minimally too large offset value triggers an assert), it is best to make the buffer one element larger as needed. For example, if the buffer is filled with a sample period of 1 ms and every 100 samples an event occurs, then the buffer should have length 102 for the samples 0 ms, 1 ms, 2 ms, ...., 100 ms, 101 ms.

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

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

-This Interpolation package provides smooth interpolation in a buffer -by approximating an ideal low pass filter (with an infinite steep drop of the -frequency response at the cut-off frequency) using an interpolation with -the sinc function over -a finite number of support points (the ideal low pass filter would require -an infinite number of support points). -

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-"), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), - graphics={Line( - points={{-90,-50},{-22,-50},{6,44},{88,44}}, - color={0,0,0}, - smooth=Smooth.Bezier)})); -end SmoothIdealLowPass; diff --git a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/package.order b/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/package.order deleted file mode 100644 index 0043b570..00000000 --- a/Noise 1.0 Beta.1/Interpolators/SmoothIdealLowPass/package.order +++ /dev/null @@ -1,5 +0,0 @@ -n -interpolate -der_interpolate -kernel -der_kernel_offset diff --git a/Noise 1.0 Beta.1/Interpolators/StepResponse/kernelVariance.mo b/Noise 1.0 Beta.1/Interpolators/StepResponse/kernelVariance.mo deleted file mode 100644 index fb1c52cd..00000000 --- a/Noise 1.0 Beta.1/Interpolators/StepResponse/kernelVariance.mo +++ /dev/null @@ -1,6 +0,0 @@ -within Noise.Interpolators.StepResponse; -function kernelVariance "Function to be integrated for the varianceFactor" - extends Utilities.Interfaces.partialKernel; -algorithm - h := (kernel(t) - kernel(t-suggestedSamplePeriod))^2; -end kernelVariance; diff --git a/Noise 1.0 Beta.1/Interpolators/StepResponse/package.mo b/Noise 1.0 Beta.1/Interpolators/StepResponse/package.mo deleted file mode 100644 index 30dfb7fa..00000000 --- a/Noise 1.0 Beta.1/Interpolators/StepResponse/package.mo +++ /dev/null @@ -1,53 +0,0 @@ -within Noise.Interpolators; -package StepResponse "A generic filter using a tabulated step response" - - - extends Utilities.Interfaces.PartialInterpolatorWithKernel( - continuous = true, - smoothness = 0, - suggestedSamplePeriod = (max(T)-min(T)) / (size(T,1)-1), - nPast = integer(max(T) / suggestedSamplePeriod), - nFuture = -integer(min(T) / suggestedSamplePeriod), - varianceFactor = trapz(T, kernelVariance(T)) / suggestedSamplePeriod); - - //t = linspace(0,0.2,101); step = Noise.Interpolators.FirstOrder.kernel(t); plotArray(cat(1,Modelica.Math.Vectors.reverse(-t),t),cat(1,Modelica.Math.Vectors.reverse(-step),step)) - constant Real T[:] = linspace(0, 0.2, 101) "Time vector"; - constant Real step[:] = FirstOrder.kernel(T) "Step response data"; - constant Real dstep[:] = cat(1, {(step[2]-step[1])/(T[2]-T[1])}, (step[3:size(T,1)] - step[1:size(T,1)-2]) ./ (T[3:size(T,1)] - T[1:size(T,1)-2]), {(step[end]-step[end-1])/(T[end]-T[end-1])}); - - - redeclare function extends kernel "Kernel for a tabulated step response" - algorithm - if t <= T[1] then - h := step[1]; - elseif t >= T[end] then - h := step[end]; - else - h := Modelica.Math.Vectors.interpolate(T, step, t); - end if; - annotation(Inline=true); - end kernel; - - - - redeclare function extends der_kernel_offset - "Derivative of kernel for a tabulated step response" - algorithm - if t <= T[1] then - h := 0; - elseif t >= T[end] then - h := 0; - else - h := Modelica.Math.Vectors.interpolate(T, dstep, t); - end if; - annotation(Inline=true); - end der_kernel_offset; - - - -annotation (Icon(graphics={ - Line( - points={{-90,-48},{-22,-48},{-22,-48},{6,46},{88,46}}, - color={0,0,0}, - smooth=Smooth.Bezier)})); -end StepResponse; diff --git a/Noise 1.0 Beta.1/Interpolators/StepResponse/package.order b/Noise 1.0 Beta.1/Interpolators/StepResponse/package.order deleted file mode 100644 index 56e37863..00000000 --- a/Noise 1.0 Beta.1/Interpolators/StepResponse/package.order +++ /dev/null @@ -1,7 +0,0 @@ -T -step -dstep -kernel -kernelVariance -der_kernel_offset -trapz diff --git a/Noise 1.0 Beta.1/Interpolators/StepResponse/trapz.mo b/Noise 1.0 Beta.1/Interpolators/StepResponse/trapz.mo deleted file mode 100644 index 732ffdd9..00000000 --- a/Noise 1.0 Beta.1/Interpolators/StepResponse/trapz.mo +++ /dev/null @@ -1,8 +0,0 @@ -within Noise.Interpolators.StepResponse; -function trapz "Integral of a time signal using trapezium rule" - input Real[:] T "Time vector"; - input Real[size(T,1)] X "Values vector"; - output Real Y "Integral"; -algorithm - Y := 0.5 .* sum((X[2:end] + X[1:(end-1)]) .* (T[2:end] - T[1:(end-1)])); -end trapz; diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolator/package.mo b/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolator/package.mo deleted file mode 100644 index 5597c820..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolator/package.mo +++ /dev/null @@ -1,114 +0,0 @@ -within Noise.Interpolators.Utilities.Interfaces; -partial package PartialInterpolator "Interfaces of an interpolator in a buffer of random numbers" - extends Modelica.Icons.Package; - constant Boolean continuous=false - "=true if interpolation is continuous, otherwise discontinuous"; - constant Integer nFuture(min=0)=0 - "Number of buffer values required in the future (=0 for causal filters)"; - constant Integer nPast(min=0) = 0 - "Number of buffer values required in the past"; - constant Real varianceFactor = 1 - "The factor by which the variance will be scaled, if this interpolation is used"; - constant Integer smoothness = 0 - "The smoothness of the interpolation. =0: continuous, =1: continuous and differentiable, ..."; - - - replaceable partial function interpolate - "Interface of a function to interpolate in a buffer of random numbers" - extends Modelica.Icons.Function; - input Real buffer[:] "Buffer of random numbers"; - input Real offset "Offset from buffer start (0..size(buffer)-1"; - input Real samplePeriod = 1 "The sample period of the noise buffer"; - output Real y "Interpolated value at position offset"; -protected - Integer nBuffer = size(buffer,1) "Size of the buffer"; - annotation (Documentation(info=" -

-This partial function defines the input and output arguments of -the function to interpolate in a buffer of random values. -

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

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

-This partial package defines the elements and function interface of a package -to interpolate in buffer of random values. It is assumed that at one point in -time, a buffer is filled with random values. In order to interpolate in the -buffer, the following constants need to be defined: -

- -
- - - - - - - - - - - - - - - - - - -
Name of constantDescription
continuous= true if interpolation is continuous, otherwise discontinuous
nFuture= Number of buffer values required at the end of the buffer, in order to - interpolate at the last time instant for which the buffer values have - been computed.
nPast= Number of buffer values required at the beginning of the buffer, in order to - interpolate at the first time instant for which the buffer values have - been computed.
varianceFactorA non-constant interpolation is changing the variance of the interpolated - random values. varianceFactor is the factor by which the variance of the underlying - random distribution needs to be multiplied, in order to arrive - at the variance of the interpolated signal.
smoothnessThe smoothness of the interpolation:
- =-1: discontinuous
- = 0: continuous
- = 1: continuous and differentiable
-
-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); -end PartialInterpolator; diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolator/package.order b/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolator/package.order deleted file mode 100644 index 767d5803..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolator/package.order +++ /dev/null @@ -1,6 +0,0 @@ -continuous -nFuture -nPast -varianceFactor -smoothness -interpolate diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/der_interpolate.mo b/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/der_interpolate.mo deleted file mode 100644 index a5b0d69f..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/der_interpolate.mo +++ /dev/null @@ -1,30 +0,0 @@ -within Noise.Interpolators.Utilities.Interfaces.PartialInterpolatorWithKernel; -function der_interpolate "Interpolates the buffer using a replaceable kernel" - extends Modelica.Icons.Function; - input Real buffer[:] "Buffer of random numbers"; - input Real offset "Offset from buffer start (0..size(buffer)-1"; - input Real samplePeriod = 1 "The sample period of the noise buffer"; - input Real der_buffer[size(buffer,1)] "Derivatives of buffer values"; - input Real der_offset "Derivative of offset value"; - input Real der_samplePeriod = 1 "The sample period of the noise buffer"; - output Real der_y "Interpolated value at position offset"; -algorithm - // For a general kernel based interpolation: - // y = sum( (DK(-o*s) * b[i]) ) - // y' = sum( (DK(-o*s) * b[i])' ) - // = sum( DK(-o*s)' * b[i] + DK(-o*s) * b[i]' ) - // = sum( -dDK/do*o'*s* b[i] + DK(-o*s) * b[i]' ) - // = sum( -dDK/do * b[i] ) * o'*s - // + sum( DK(-o*s) * b[i]' ) - - // Initialize the convolution algorithm - der_y := 0; - - // Calculate weighted sum over -nPast...nFuture random samples - for i in -nPast:nFuture loop - der_y := der_y + ( - der_kernel_offset(t=(mod(offset,1)-i-1)*samplePeriod) - + der_kernel_offset(t=(mod(offset,1)-i+0)*samplePeriod)) * buffer[integer(offset)+i+1] * der_offset*samplePeriod - + ( - kernel( t=(mod(offset,1)-i-1)*samplePeriod) - + kernel( t=(mod(offset,1)-i+0)*samplePeriod)) * der_buffer[integer(offset)+i+1]; - end for; -end der_interpolate; diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/package.mo b/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/package.mo deleted file mode 100644 index b5c0b7dc..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/package.mo +++ /dev/null @@ -1,108 +0,0 @@ -within Noise.Interpolators.Utilities.Interfaces; -partial package PartialInterpolatorWithKernel "Generic interpolator interface providing a kernel function" - extends PartialInterpolator; - - constant Real suggestedSamplePeriod = 0 - "The appropriate sample period for this filter"; - - - redeclare replaceable function extends interpolate - "Interpolates the buffer using a replaceable kernel" -protected - Real coefficient "The intermediate container for the kernel evaluations"; - algorithm - // Ensure that offset is in assumed range - assert(offset >= nPast and offset < nBuffer - nFuture, - "offset out of range (offset=" + String(offset) + ", nBuffer="+String(nBuffer)+")"); - - // Initialize the convolution algorithm - y := 0; - - // What is convolution?! - // - // We always carry a kernel function along with our time. - // That means, that the kernel's central point kernel(0) always occurs at - // the current time point! - // Since we are working with an offset instead of the time directly, - // the kernel's central point must occur at the current offset. - // - // See the following diagram: - // (In our offset space, assume that dt=1 and t=offset.) - // - // t-2dt t t+2dt - // + - + - + - + - + - + - + - + - + -> simulation time - // t-3dt t-1dt t+1dt t+3dt - // | - // - // 1 -| ^ kernel(delta_t) - // | / \ - // | _ / \ _ - // | -3/ \-2 -1/ 0 \1 2/ \3 - // 0 -+ - + - + - + - + - + - + - + - + -> phase - // | | | \ / | | \ / | - // | V V - // delta_t/dt <> - // | - // Now, we have some random samples, which are given at discrete points. - // In our offset coordinates, these are given at integer offset values. - // | - // | | | | | | | | dt - // | / - // + + + + + + + +<->+ offset - // -3 -2 -1 0 1 2 3 - // - // states_in _________________^___^___^___^___^___^___^ - // iterations - // until -n +1 +1 +1 +1 +1 +1 - // - // Convolution: filter = sum( signal(time) * Kernel(phase*pi) ) - // time = sample + instance - // phase = sample - delta_t/dt - // sample = -2 .. 3 - // - // Loop over 2n support points for the convolution = sum( random(i)*kernel(offset-i) ) - // The random number is for time = (floor(t/dt) * dt + i * dt) - // The kernel result is for time = t - (floor(t/dt) * dt + i * dt) - // or, if sampled: time = t - ( t_last + i * dt) - - // Calculate weighted sum over -nPast...nFuture random samples - for i in -nPast:nFuture loop - - // We use the kernel in -i direction to enable step response kernels - coefficient := - kernel(t=(mod( offset,1)-i-1)*samplePeriod) - + kernel(t=(mod( offset,1)-i+0)*samplePeriod); - - // We use the kernel in +i direction for the random samples - // The +1 accounts for one-based indizes - y := y + buffer[ integer(offset) +i+1]*coefficient; - - // Modelica.Utilities.Streams.print("i=" + String(i) + ", " - // +"t=" + String(mod(offset,1)+i) + ", " - // +"k=" + String(coefficient)+ ", " - // +"o=" + String(offset)+ ", " - // +"n=" + String(integer(offset)+i)); - end for; - annotation(derivative(order=1) = der_interpolate, Inline=true); - end interpolate; - - - replaceable partial function kernel "Kernel for interpolation" - extends partialKernel; - end kernel; - - - replaceable partial function der_kernel_offset - "Partial derivative of the kernel with respect to the offset" - extends partialKernel; - end der_kernel_offset; - - - annotation (Documentation(info= - " -

-For details of the xorshift64* algorithm see -http://xorshift.di.unimi.it/ . -

-"), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), - graphics)); -end PartialInterpolatorWithKernel; diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/package.order b/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/package.order deleted file mode 100644 index 6cf0d49b..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/PartialInterpolatorWithKernel/package.order +++ /dev/null @@ -1,5 +0,0 @@ -suggestedSamplePeriod -interpolate -der_interpolate -kernel -der_kernel_offset diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/package.mo b/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/package.mo deleted file mode 100644 index 45f5dbfc..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/package.mo +++ /dev/null @@ -1,5 +0,0 @@ -within Noise.Interpolators.Utilities; -package Interfaces "Interfaces package" - extends Modelica.Icons.InterfacesPackage; - -end Interfaces; diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/package.order b/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/package.order deleted file mode 100644 index 4f1ea3e0..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/package.order +++ /dev/null @@ -1,3 +0,0 @@ -PartialInterpolator -PartialInterpolatorWithKernel -partialKernel diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/partialKernel.mo b/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/partialKernel.mo deleted file mode 100644 index 2fb4ccd4..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/Interfaces/partialKernel.mo +++ /dev/null @@ -1,5 +0,0 @@ -within Noise.Interpolators.Utilities.Interfaces; -function partialKernel "Interface for convolution kernels" - input Real t "The (scaled) time for sampling period=1"; - output Real h "The impulse response of the convolution filter"; -end partialKernel; diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/package.mo b/Noise 1.0 Beta.1/Interpolators/Utilities/package.mo deleted file mode 100644 index ce1a26ec..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/package.mo +++ /dev/null @@ -1,4 +0,0 @@ -within Noise.Interpolators; -package Utilities "Utilities for Interpolators" -extends Modelica.Icons.UtilitiesPackage; -end Utilities; diff --git a/Noise 1.0 Beta.1/Interpolators/Utilities/package.order b/Noise 1.0 Beta.1/Interpolators/Utilities/package.order deleted file mode 100644 index 8f81df7f..00000000 --- a/Noise 1.0 Beta.1/Interpolators/Utilities/package.order +++ /dev/null @@ -1 +0,0 @@ -Interfaces diff --git a/Noise 1.0 Beta.1/Interpolators/package.mo b/Noise 1.0 Beta.1/Interpolators/package.mo deleted file mode 100644 index c60030e5..00000000 --- a/Noise 1.0 Beta.1/Interpolators/package.mo +++ /dev/null @@ -1,10 +0,0 @@ -within Noise; -package Interpolators "Additional interpolation packages" - extends Modelica.Icons.Package; - - - annotation (Icon(graphics={ Line( - points={{-92,-32},{-52,-32},{-30,48},{30,48},{50,-32},{94,-32}}, - color={0,0,0}, - smooth=Smooth.Bezier)})); -end Interpolators; diff --git a/Noise 1.0 Beta.1/Interpolators/package.order b/Noise 1.0 Beta.1/Interpolators/package.order deleted file mode 100644 index 1b98c423..00000000 --- a/Noise 1.0 Beta.1/Interpolators/package.order +++ /dev/null @@ -1,6 +0,0 @@ -Constant -Linear -SmoothIdealLowPass -FirstOrder -StepResponse -Utilities diff --git a/Noise 1.0 Beta.1/Math/binomial.mo b/Noise 1.0 Beta.1/Math/binomial.mo deleted file mode 100644 index f256cdd9..00000000 --- a/Noise 1.0 Beta.1/Math/binomial.mo +++ /dev/null @@ -1,11 +0,0 @@ -within Noise.Math; -function binomial "Binomial coefficient" - input Integer n; - input Integer k; - output Real b; -algorithm - b :=(factorial(n)/factorial(n - k)/factorial(k)); - annotation (Documentation(revisions=" -

Developed 2014 at the DLR Institute of System Dynamics and Control

-")); -end binomial; diff --git a/Noise 1.0 Beta.1/Math/factorial.mo b/Noise 1.0 Beta.1/Math/factorial.mo deleted file mode 100644 index b16417de..00000000 --- a/Noise 1.0 Beta.1/Math/factorial.mo +++ /dev/null @@ -1,13 +0,0 @@ -within Noise.Math; -function factorial "The product of all integer <= the input" - input Integer n; - output Integer f; -algorithm - f := 1; - for i in 1:n loop - f := f*i; - end for; - annotation (Documentation(revisions=" -

Developed 2014 at the DLR Institute of System Dynamics and Control

-")); -end factorial; diff --git a/Noise 1.0 Beta.1/Math/package.mo b/Noise 1.0 Beta.1/Math/package.mo deleted file mode 100644 index ef0fb76e..00000000 --- a/Noise 1.0 Beta.1/Math/package.mo +++ /dev/null @@ -1,13 +0,0 @@ -within Noise; -package Math "Mathematical functions use in this library" - extends Modelica.Icons.Package; - - -annotation (Icon(graphics={ Line(points={{-80,0},{-68.7,34.2},{-61.5,53.1}, - {-55.1,66.4},{-49.4,74.6},{-43.8,79.1},{-38.2,79.8},{-32.6,76.6},{ - -26.9,69.7},{-21.3,59.4},{-14.9,44.1},{-6.83,21.2},{10.1,-30.8},{ - 17.3,-50.2},{23.7,-64.2},{29.3,-73.1},{35,-78.4},{40.6,-80},{46.2, - -77.6},{51.9,-71.5},{57.5,-61.9},{63.9,-47.2},{72,-24.8},{80,0}}, - color={ - 0,0,0}, smooth=Smooth.Bezier)})); -end Math; diff --git a/Noise 1.0 Beta.1/Math/package.order b/Noise 1.0 Beta.1/Math/package.order deleted file mode 100644 index e5d1b9db..00000000 --- a/Noise 1.0 Beta.1/Math/package.order +++ /dev/null @@ -1,2 +0,0 @@ -factorial -binomial diff --git a/Noise 1.0 Beta.1/Plots/Distributions/Discrete.mo b/Noise 1.0 Beta.1/Plots/Distributions/Discrete.mo deleted file mode 100644 index 5c47794d..00000000 --- a/Noise 1.0 Beta.1/Plots/Distributions/Discrete.mo +++ /dev/null @@ -1,25 +0,0 @@ -within Noise.Plots.Distributions; -function Discrete "Plot functions Math.Distributions.Discrete" - import Noise.Distributions.Discrete; - input Integer nPoints(min=2) = 1000 "Number of evaluation points"; -protected - Real u[nPoints] = linspace(-5, 5, nPoints); - Real u2[nPoints] = linspace(0, 1, nPoints); - Real y1[nPoints]; - Real y2[nPoints]; - Real y3[nPoints]; -algorithm - y1 := Discrete.cumulative(u); - y2 := Discrete.cumulative(u); - y3 := Discrete.cumulative(u); - plotArrays(u, [y1,y2,y3], title="Cumulative distribution functions of Discrete distribution", - legend={"cumulative(u,-3,3)", "cumulative(u,-1,3)", "cumulative(u,1,3)"},id=2); - - y1 := Discrete.quantile(u2); - y2 := Discrete.quantile(u2); - y3 := Discrete.quantile(u2); - plotArrays(u2, [y1,y2,y3], title="Inverse cumulative distribution function of Discrete distribution", - legend={"quantile(u,-3,3)", "quantile(u,-1,3)", "quantile(u,1,3)"}, id=3); - - annotation(__Dymola_interactive = true); -end Discrete; diff --git a/Noise 1.0 Beta.1/Plots/Distributions/bates.mo b/Noise 1.0 Beta.1/Plots/Distributions/bates.mo deleted file mode 100644 index 9c264c72..00000000 --- a/Noise 1.0 Beta.1/Plots/Distributions/bates.mo +++ /dev/null @@ -1,31 +0,0 @@ -within Noise.Plots.Distributions; -function bates "Plot functions Math.Distributions.Bates" - import Noise.Distributions.Bates; - input Integer nPoints(min=2) = 500 "Number of evaluation points"; -protected - Real u[nPoints] = linspace(-4, 4, nPoints); - Real u2[nPoints] = linspace(0, 1, nPoints); - Real y1[nPoints]; - Real y2[nPoints]; - Real y3[nPoints]; -algorithm - y1 := Bates.density(u, y_min=-3, y_max=3); - y2 := Bates.density(u, y_min=-3, y_max=3, n=6); - y3 := Bates.density(u, y_min=-3, y_max=3, n=2); - plotArrays(u, [y1,y2,y3], title="Densities of Bates distribution with y_min=-3, y_max=3", - legend={"n = 12", "n = 6", "n = 2"},id=10); - - y1 := Bates.cumulative(u, y_min=-3, y_max=3); - y2 := Bates.cumulative(u, y_min=-3, y_max=3, n=6); - y3 := Bates.cumulative(u, y_min=-3, y_max=3, n=2); - plotArrays(u, [y1,y2,y3], title="Cumulative distribution functions of Bates distributionwith y_min=-3, y_max=3", - legend={"n = 12", "n = 6", "n = 2"},id=20); - - y1 := Bates.quantile(u2, y_min=-3, y_max=3); - y2 := Bates.quantile(u2, y_min=-3, y_max=3, n=6); - y3 := Bates.quantile(u2, y_min=-3, y_max=3, n=2); - plotArrays(u2, [y1,y2,y3], title="Inverse cumulative distribution function of Bates distribution with y_min=-3, y_max=3", - legend={"n = 12", "n = 6", "n = 2"}, id=30); - - annotation(__Dymola_interactive = true); -end bates; diff --git a/Noise 1.0 Beta.1/Plots/Distributions/normal.mo b/Noise 1.0 Beta.1/Plots/Distributions/normal.mo deleted file mode 100644 index 32bb1ca0..00000000 --- a/Noise 1.0 Beta.1/Plots/Distributions/normal.mo +++ /dev/null @@ -1,31 +0,0 @@ -within Noise.Plots.Distributions; -function normal "Plot functions Math.Distributions.Normal" - import Modelica_Noise.Math.Distributions.Normal; - input Integer nPoints(min=2) = 1000 "Number of evaluation points"; -protected - Real u[nPoints] = linspace(-3, 3, nPoints); - Real u2[nPoints] = linspace(0.001, 0.999, nPoints); - Real y1[nPoints]; - Real y2[nPoints]; - Real y3[nPoints]; -algorithm - y1 := Normal.density(u); - y2 := Normal.density(u, mu= 1); - y3 := Normal.density(u, mu= 0, sigma= 0.5); - plotArrays(u, [y1,y2,y3], title="Densities of Normal distribution", - legend={"density(u,0,1)", "density(u,1,1)", "density(u,0,0.5)"},id=1); - - y1 := Normal.cumulative(u); - y2 := Normal.cumulative(u, mu=1); - y3 := Normal.cumulative(u, mu=0, sigma= 0.5); - plotArrays(u, [y1,y2,y3], title="Cumulative distribution functions of Normal distribution", - legend={"cumulative(u,0,1)", "cumulative(u,1,1)", "cumulative(u,0,0.5)"}, id=10); - - y1 := Normal.quantile(u2); - y2 := Normal.quantile(u2, mu=1); - y3 := Normal.quantile(u2, mu=0, sigma= 0.5); - plotArrays(u2, [y1,y2,y3], title="Inverse cumulative distribution function of Normal distribution", - legend={"quantile(u,0,1)", "quantile(u,1,1)", "quantile(u,0,0.5)"}, id=20); - - annotation(__Dymola_interactive = true); -end normal; diff --git a/Noise 1.0 Beta.1/Plots/Distributions/package.mo b/Noise 1.0 Beta.1/Plots/Distributions/package.mo deleted file mode 100644 index c794093a..00000000 --- a/Noise 1.0 Beta.1/Plots/Distributions/package.mo +++ /dev/null @@ -1,5 +0,0 @@ -within Noise.Plots; -package Distributions - extends Modelica.Icons.Package; - -end Distributions; diff --git a/Noise 1.0 Beta.1/Plots/Distributions/package.order b/Noise 1.0 Beta.1/Plots/Distributions/package.order deleted file mode 100644 index 65e60eef..00000000 --- a/Noise 1.0 Beta.1/Plots/Distributions/package.order +++ /dev/null @@ -1,5 +0,0 @@ -uniform -normal -weibull -bates -Discrete diff --git a/Noise 1.0 Beta.1/Plots/Distributions/uniform.mo b/Noise 1.0 Beta.1/Plots/Distributions/uniform.mo deleted file mode 100644 index 45366f21..00000000 --- a/Noise 1.0 Beta.1/Plots/Distributions/uniform.mo +++ /dev/null @@ -1,31 +0,0 @@ -within Noise.Plots.Distributions; -function uniform "Plot functions Math.Distributions.Uniform" - import Modelica_Noise.Math.Distributions.Uniform; - input Integer nPoints(min=2) = 1000 "Number of evaluation points"; -protected - Real u[nPoints] = linspace(-5, 5, nPoints); - Real u2[nPoints] = linspace(0, 1, nPoints); - Real y1[nPoints]; - Real y2[nPoints]; - Real y3[nPoints]; -algorithm - y1 := Uniform.density(u, u_min=-3, u_max=3); - y2 := Uniform.density(u, u_min=-1, u_max=3); - y3 := Uniform.density(u, u_min=1, u_max=3); - plotArrays(u, [y1,y2,y3], title="Densities of uniform distribution", - legend={"density(u,-3,3)", "density(u,-1,3)", "density(u,1,3)"},id=1); - - y1 := Uniform.cumulative(u, u_min=-3, u_max=3); - y2 := Uniform.cumulative(u, u_min=-1, u_max=3); - y3 := Uniform.cumulative(u, u_min=1, u_max=3); - plotArrays(u, [y1,y2,y3], title="Cumulative distribution functions of uniform distribution", - legend={"cumulative(u,-3,3)", "cumulative(u,-1,3)", "cumulative(u,1,3)"},id=2); - - y1 := Uniform.quantile(u2, y_min=-3, y_max=3); - y2 := Uniform.quantile(u2, y_min=-1, y_max=3); - y3 := Uniform.quantile(u2, y_min=1, y_max=3); - plotArrays(u2, [y1,y2,y3], title="Inverse cumulative distribution function of uniform distribution", - legend={"quantile(u,-3,3)", "quantile(u,-1,3)", "quantile(u,1,3)"}, id=3); - - annotation(__Dymola_interactive = true); -end uniform; diff --git a/Noise 1.0 Beta.1/Plots/Distributions/weibull.mo b/Noise 1.0 Beta.1/Plots/Distributions/weibull.mo deleted file mode 100644 index ddb207e7..00000000 --- a/Noise 1.0 Beta.1/Plots/Distributions/weibull.mo +++ /dev/null @@ -1,30 +0,0 @@ -within Noise.Plots.Distributions; -function weibull "Plot functions Math.Distributions.Weibull" - import Modelica_Noise.Math.Distributions.Weibull; - input Integer nPoints(min=2) = 1000 "Number of evaluation points"; -protected - Real u[nPoints] = linspace(-1, 3, nPoints); - Real u2[nPoints] = linspace(0.001, 0.999, nPoints); - Real y1[nPoints]; - Real y2[nPoints]; - Real y3[nPoints]; -algorithm - y1 := Weibull.density(u, lambda=1.0, k=1); - y2 := Weibull.density(u, lambda=0.5, k=2); - y3 := Weibull.density(u, lambda=0.5, k=3); - plotArrays(u, [y1,y2,y3], title="Densities of Weibull distribution", - legend={"density(u,1,1)", "density(u,0.5,2)", "density(u,0.5,3)"},id=1); - - y1 := Weibull.cumulative(u, lambda=1.0, k=1); - y2 := Weibull.cumulative(u, lambda=0.5, k=2); - y3 := Weibull.cumulative(u, lambda=0.5, k=3); - plotArrays(u, [y1,y2,y3], title="Cumulative distribution functions of Weibull distribution", - legend={"cumulative(u,1,1)", "cumulative(u,0.5,2)", "cumulative(u,0.5,3)"}, id=10); - - y1 := Weibull.quantile(u2, lambda=1.0, k=1); - y2 := Weibull.quantile(u2, lambda=0.5, k=2); - y3 := Weibull.quantile(u2, lambda=0.5, k=3); - plotArrays(u2, [y1,y2,y3], title="Inverse cumulative distribution function of Weibull distribution", - legend={"quantile(u,1,1)", "quantile(u,0.5,2)", "quantile(u,0.5,3)"}, id=20); - annotation(__Dymola_interactive = true); -end weibull; diff --git a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/normal.mo b/Noise 1.0 Beta.1/Plots/TruncatedDistributions/normal.mo deleted file mode 100644 index b8cd11c0..00000000 --- a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/normal.mo +++ /dev/null @@ -1,28 +0,0 @@ -within Noise.Plots.TruncatedDistributions; -function normal "Plot functions Math.TruncatedDistributions.Normal" - import Modelica_Noise.Math.Distributions.Normal; - import T_Normal = Modelica_Noise.Math.TruncatedDistributions.Normal; - input Integer nPoints(min=2) = 1000 "Number of evaluation points"; -protected - Real u[nPoints] = linspace(-3, 3, nPoints); - Real u2[nPoints] = linspace(0.001, 0.999, nPoints); - Real y1[nPoints]; - Real y2[nPoints]; -algorithm - y1 := Normal.density(u); - y2 := T_Normal.density(u, u_min=-1.5,u_max=1.5); - plotArrays(u, [y1,y2], title="Densities of Normal distribution", - legend={"mu=0, sigma=1", "truncated to u_min=-1.5, u_max=1.5"},id=1); - - y1 := Normal.cumulative(u); - y2 := T_Normal.cumulative(u, u_min=-1.5,u_max=1.5); - plotArrays(u, [y1,y2], title="Cumulative distribution functions of Normal distribution", - legend={"mu=0, sigma=1", "truncated to u_min=-1.5, u_max=1.5"}, id=10); - - y1 := Normal.quantile(u2); - y2 := T_Normal.quantile(u2, y_min=-1.5,y_max=1.5); - plotArrays(u2, [y1,y2], title="Inverse cumulative distribution function of Normal distribution", - legend={"mu=0, sigma=1", "truncated to u_min=-1.5, u_max=1.5"}, id=20); - - annotation(__Dymola_interactive = true); -end normal; diff --git a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/package.mo b/Noise 1.0 Beta.1/Plots/TruncatedDistributions/package.mo deleted file mode 100644 index c947a6ba..00000000 --- a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/package.mo +++ /dev/null @@ -1,8 +0,0 @@ -within Noise.Plots; -package TruncatedDistributions - extends Modelica.Icons.Package; - - - annotation (Documentation(info=" -")); -end TruncatedDistributions; diff --git a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/package.order b/Noise 1.0 Beta.1/Plots/TruncatedDistributions/package.order deleted file mode 100644 index 6213fb3d..00000000 --- a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/package.order +++ /dev/null @@ -1,3 +0,0 @@ -uniform -normal -weibull diff --git a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/uniform.mo b/Noise 1.0 Beta.1/Plots/TruncatedDistributions/uniform.mo deleted file mode 100644 index 33375158..00000000 --- a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/uniform.mo +++ /dev/null @@ -1,31 +0,0 @@ -within Noise.Plots.TruncatedDistributions; -function uniform "Plot functions Math.TruncatedDistributions.Uniform" - import Modelica_Noise.Math.Distributions.Uniform; - input Integer nPoints(min=2) = 1000 "Number of evaluation points"; -protected - Real u[nPoints] = linspace(-5, 5, nPoints); - Real u2[nPoints] = linspace(0, 1, nPoints); - Real y1[nPoints]; - Real y2[nPoints]; - Real y3[nPoints]; -algorithm - y1 := Uniform.density(u, u_min=-3, u_max=3); - y2 := Uniform.density(u, u_min=-1, u_max=3); - y3 := Uniform.density(u, u_min=1, u_max=3); - plotArrays(u, [y1,y2,y3], title="Densities of uniform distribution", - legend={"density(u,-3,3)", "density(u,-1,3)", "density(u,1,3)"},id=1); - - y1 := Uniform.cumulative(u, u_min=-3, u_max=3); - y2 := Uniform.cumulative(u, u_min=-1, u_max=3); - y3 := Uniform.cumulative(u, u_min=1, u_max=3); - plotArrays(u, [y1,y2,y3], title="Cumulative distribution functions of uniform distribution", - legend={"cumulative(u,-3,3)", "cumulative(u,-1,3)", "cumulative(u,1,3)"},id=2); - - y1 := Uniform.quantile(u2, y_min=-3, y_max=3); - y2 := Uniform.quantile(u2, y_min=-1, y_max=3); - y3 := Uniform.quantile(u2, y_min=1, y_max=3); - plotArrays(u2, [y1,y2,y3], title="Inverse cumulative distribution function of uniform distribution", - legend={"quantile(u,-3,3)", "quantile(u,-1,3)", "quantile(u,1,3)"}, id=3); - - annotation(__Dymola_interactive = true); -end uniform; diff --git a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/weibull.mo b/Noise 1.0 Beta.1/Plots/TruncatedDistributions/weibull.mo deleted file mode 100644 index 42e491ff..00000000 --- a/Noise 1.0 Beta.1/Plots/TruncatedDistributions/weibull.mo +++ /dev/null @@ -1,28 +0,0 @@ -within Noise.Plots.TruncatedDistributions; -function weibull "Plot functions Math.TruncatedDistributions.Weibull" - import Modelica_Noise.Math.Distributions.Weibull; - import T_Weibull = Modelica_Noise.Math.TruncatedDistributions.Weibull; - input Integer nPoints(min=2) = 1000 "Number of evaluation points"; -protected - Real u[nPoints] = linspace(-1, 2, nPoints); - Real u2[nPoints] = linspace(0.001, 0.999, nPoints); - Real y1[nPoints]; - Real y2[nPoints]; -algorithm - y1 := Weibull.density(u, lambda=0.5, k=2); - y2 := T_Weibull.density(u,u_max=0.8, lambda=0.5, k=2); - plotArrays(u, [y1,y2], title="Densities of Weibull distribution", - legend={"lambda=0.5, k=2", "truncated to u_min=0, u_max=0.8"},id=1); - - y1 := Weibull.cumulative(u, lambda=0.5, k=2); - y2 := T_Weibull.cumulative(u, u_max=0.8, lambda=0.5, k=2); - plotArrays(u, [y1,y2], title="Cumulative distribution functions of Weibull distribution", - legend={"lambda=0.5, k=2", "truncated to u_min=0, u_max=0.8"}, id=10); - - y1 := Weibull.quantile(u2, lambda=0.5, k=2); - y2 := T_Weibull.quantile(u2, y_max=0.8, lambda=0.5, k=2); - plotArrays(u2, [y1,y2], title="Inverse cumulative distribution function of Weibull distribution", - legend={"lambda=0.5, k=2", "truncated to u_min=0, u_max=0.8"}, id=20); - - annotation(__Dymola_interactive = true); -end weibull; diff --git a/Noise 1.0 Beta.1/Plots/package.mo b/Noise 1.0 Beta.1/Plots/package.mo deleted file mode 100644 index a5b7f4b2..00000000 --- a/Noise 1.0 Beta.1/Plots/package.mo +++ /dev/null @@ -1,7 +0,0 @@ -within Noise; -package Plots "A package of plotting functions" - extends Modelica.Icons.InternalPackage; - - - -end Plots; diff --git a/Noise 1.0 Beta.1/Plots/package.order b/Noise 1.0 Beta.1/Plots/package.order deleted file mode 100644 index 0e7e14ae..00000000 --- a/Noise 1.0 Beta.1/Plots/package.order +++ /dev/null @@ -1,3 +0,0 @@ -special -Distributions -TruncatedDistributions diff --git a/Noise 1.0 Beta.1/Plots/special.mo b/Noise 1.0 Beta.1/Plots/special.mo deleted file mode 100644 index d8febb34..00000000 --- a/Noise 1.0 Beta.1/Plots/special.mo +++ /dev/null @@ -1,35 +0,0 @@ -within Noise.Plots; -function special "Plot functions Math.Special" - import Modelica.Utilities.Streams.print; - import Modelica_Noise.Math.Special; - input Integer nPoints = 1000; - input Real erfRange = 3.0; - input Real sincRange = 20.0; - input Real normalEps = 1e-5; -protected - Real uErf[nPoints] = linspace(-erfRange, erfRange, nPoints); - Real yErf[nPoints]; - Real yErfc[nPoints]; - Real uErfInv[nPoints]; - Real uErfcInv[nPoints]; - Real r[nPoints] = linspace(normalEps, 1-normalEps, nPoints); - Real rn[nPoints]; -algorithm - yErf := Special.erf(uErf); - plotArray(uErf, yErf, legend="y = erf(u)", id=1); - - yErfc := Special.erfc(uErf); - plotArray(uErf, yErfc, legend="y = erfc(u)", id=2); - - uErfInv := Special.erfInv(yErf); - plotArray(yErf, uErfInv, legend="y = erfInv(u)", id=3); - - uErfcInv := Special.erfcInv(yErfc); - plotArray(yErf, uErfInv, legend="y = erfcInv(u)", id=4); - - r :=linspace(-sincRange,sincRange,nPoints); - rn :=Special.sinc(r); - plotArray(r,rn,legend="y=sinc(u)",id=5); - - annotation(__Dymola_interactive = true); -end special; diff --git a/Noise 1.0 Beta.1/Sources/ColoredSignalBasedNoise.mo b/Noise 1.0 Beta.1/Sources/ColoredSignalBasedNoise.mo deleted file mode 100644 index 8dc46251..00000000 --- a/Noise 1.0 Beta.1/Sources/ColoredSignalBasedNoise.mo +++ /dev/null @@ -1,13 +0,0 @@ -within Noise.Sources; -block ColoredSignalBasedNoise - "Implements a filter directly within the (signal-based) noise signal" - extends SignalBasedNoise( - redeclare replaceable package interpolation = - Noise.Interpolators.FirstOrder constrainedby - Noise.Interpolators.Utilities.Interfaces.PartialInterpolatorWithKernel, - redeclare replaceable function distribution = - Modelica_Noise.Math.TruncatedDistributions.Normal.quantile ( - mu = 0, - sigma = 1 / sqrt(samplePeriod)), - samplePeriod = interpolation.suggestedSamplePeriod); -end ColoredSignalBasedNoise; diff --git a/Noise 1.0 Beta.1/Sources/SignalBasedNoise.mo b/Noise 1.0 Beta.1/Sources/SignalBasedNoise.mo deleted file mode 100644 index 51f4003a..00000000 --- a/Noise 1.0 Beta.1/Sources/SignalBasedNoise.mo +++ /dev/null @@ -1,455 +0,0 @@ -within Noise.Sources; -block SignalBasedNoise - "Noise generator for Real numbers associated with the input signal (this block computes always the same (random) output y at the same value of the input signal)" - import Modelica_Noise.Math.Random; - import Modelica.Utilities.Streams.print; - - extends Modelica.Blocks.Interfaces.SO; - - // Main dialog menu - parameter Boolean useTime = true - "= true: u = time otherwise use input connector" - annotation(choices(checkBox=true)); - - parameter Real samplePeriod(start=0.01) - "Period in signal for pseudo-sampling the raw random numbers" - annotation(Dialog(enable=enableNoise)); - parameter Real y_min(start=0.0) "Minimum value of noise" - annotation(Dialog(enable=enableNoise)); - parameter Real y_max(start=1.0) "Maximum value of noise" - annotation(Dialog(enable=enableNoise)); - - // Advanced dialog menu: Noise generation - parameter Boolean enableNoise = true "=true: y = noise, otherwise y = y_off" - annotation(choices(checkBox=true),Dialog(tab="Advanced",group="Noise generation")); - parameter Real y_off = 0.0 "Output if enableNoise=false" - annotation(Dialog(tab="Advanced",group="Noise generation")); - //parameter Integer sampleFactor(min=1)=100 - // "Events only at samplePeriod*sampleFactor if continuous" - // annotation(Evaluate=true,Dialog(tab="Advanced",group="Noise generation", enable=enableNoise)); - final parameter Integer shift = -interpolation.nPast - "Shift noise samples to account for interpolation buffer" - annotation(Dialog(tab="Advanced",group="Noise generation")); - - // Advanced dialog menu: Random number properties - replaceable function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile constrainedby - Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialQuantile( - final y_min=y_min, final y_max=y_max) - "Random number distribution (truncated to y_min..y_max)" - annotation(choicesAllMatching=true, Dialog(tab="Advanced",group="Random number properties",enable=enableNoise), - Documentation(revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); - replaceable package interpolation = - Interpolators.Constant constrainedby - Interpolators.Utilities.Interfaces.PartialInterpolator - "Interpolation method in grid of raw random numbers" - annotation(choicesAllMatching=true, Dialog(tab="Advanced",group="Random number properties",enable=enableNoise), - Documentation(revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); - replaceable package generator = - Modelica_Noise.Math.Random.Generators.Xorshift128plus constrainedby - Modelica_Noise.Math.Random.Interfaces.PartialGenerator - "Random number generator" - annotation(choicesAllMatching=true, Dialog(tab="Advanced",group="Random number properties",enable=enableNoise), - Documentation(revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); - - // Advanced dialog menu: Initialization - parameter Boolean useGlobalSeed = true - "= true: use global seed, otherwise ignore it" - annotation(choices(checkBox=true),Dialog(tab="Advanced",group = "Initialization",enable=enableNoise)); - parameter Boolean useAutomaticLocalSeed = true - "= true: use instance name hash else fixedLocalSeed" - annotation(choices(checkBox=true),Dialog(tab="Advanced",group = "Initialization",enable=enableNoise)); - parameter Integer fixedLocalSeed = 10 - "Local seed if useAutomaticLocalSeed = false" - annotation(Dialog(tab="Advanced",group = "Initialization",enable=enableNoise and not useAutomaticLocalSeed)); - final parameter Integer localSeed = if useAutomaticLocalSeed then Modelica_Noise.Math.Random.Utilities.automaticLocalSeed(getInstanceName()) else - fixedLocalSeed; - parameter Real signalOffset = 0.0 - "Offset in signal for sampling the raw random numbers" - annotation(Dialog(tab="Advanced", group="Initialization",enable=enableNoise)); - - Modelica.Blocks.Interfaces.RealInput u if not useTime - "Input signal (the noise depends on the value of u at the actual time instant" - annotation (Placement(transformation(extent={{-140,-20},{-100,20}}, rotation=0))); - - // Retrieve values from outer global seed -protected - outer Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed - "Definition of global seed via inner/outer"; - parameter Integer actualGlobalSeed = if useGlobalSeed then globalSeed.seed else 0 - "The global seed, which is atually used"; - parameter Boolean generateNoise = enableNoise and globalSeed.enableNoise - "= true if noise shall be generated, otherwise no noise"; - - // Construct sizes - parameter Boolean continuous = interpolation.continuous - "= true, if continuous interpolation"; - //parameter Real actualSamplePeriod = if continuous then sampleFactor*samplePeriod else samplePeriod - // "Sample period of when-clause"; - parameter Integer nFuture = interpolation.nFuture + 1 - "Number of buffer elements to be predicted in the future (+1 for rounding errors)"; - parameter Integer nPast = interpolation.nPast - "Number of buffer elements to be retained from the past"; - //parameter Integer nCopy = nPast + nFuture - // "Number of buffer entries to retain when re-filling buffer"; - parameter Integer nBuffer = nPast+1+nFuture "Size of buffer"; - //parameter Integer nBuffer = if continuous then nPast+sampleFactor+nFuture - // else nPast+ 1 +nFuture - // "Size of buffer"; - - // Declare buffers - //discrete Integer state[generator.nState] - // "Internal state of random number generator"; - Real buffer[nBuffer] "Buffer to hold raw random numbers"; - //discrete Real bufferStartTime "The last time we have filled the buffer"; - Real r[nBuffer] "Uniform random number in the range (0,1]"; - - Modelica.Blocks.Interfaces.RealInput signal - "The input signal to the random number generator"; - Real offset = (signal-signalOffset) / samplePeriod; -equation - if useTime then - signal = time; - else - connect(signal,u); - end if; - - // Continuously fill the buffer with random numbers - for i in 1:nBuffer loop - r[i] = if interpolation.continuous then - zeroDer(generator.random( - initialState(localSeed=localSeed, - globalSeed=actualGlobalSeed, - signal=(noEvent(integer(offset)) + i + shift) * samplePeriod + signalOffset))) else - zeroDer(generator.random( - initialState(localSeed=localSeed, - globalSeed=actualGlobalSeed, - signal=( (integer(offset)) + i + shift) * samplePeriod + signalOffset))); - buffer[i] = distribution(r[i]); - end for; - - // Generate noise, if requested, and make it smooth, if it is - y = if not generateNoise then y_off else - if interpolation.continuous then - smooth(interpolation.smoothness, - interpolation.interpolate(buffer= buffer, - offset= offset - zeroDer(noEvent(integer(offset))) + nPast, - samplePeriod= samplePeriod)) else - interpolation.interpolate(buffer= buffer, - offset= offset - zeroDer(noEvent(integer(offset))) + nPast, - samplePeriod= samplePeriod); - - // We require a few smooth functions for derivatives -protected - function convertRealToIntegers "Casts a double value to two integers" - input Real real "The Real value"; - output Integer[2] int "The Integer values"; - - external "C" ModelicaRandom_convertRealToIntegers(real,int); - - annotation (Include = "#include \"ModelicaRandom.c\"", Documentation(revisions=" -

Developed 2014 at the DLR Institute of System Dynamics and Control

-", info=" -

Syntax

-
-int = convertRealToInteger(real);
-
-

Description

-

-The Real input argument real is mapped to two Integer values int[1] and int[2]. -The function assumes that two Integer values have exactly the same length -as one Real value (e.g. one Integer has a length of 32 bits and one Real -value has a length of 64 bits). -

-")); - end convertRealToIntegers; - - function initialState "Combine Real signal with Integer seeds" - input Integer localSeed "The local seed"; - input Integer globalSeed "the global seed"; - input Real signal "The Real signal"; - output Integer state[generator.nState] - "The initial state of random number generator"; - protected - Integer ints[2] "Real signal casted to integers"; - algorithm - ints := convertRealToIntegers(signal); - state := generator.initialState(localSeed+ints[1], globalSeed+ints[2]); - end initialState; - - function zeroDer "Declare an expression to have zero derivative" - input Real u "Original expression"; - input Real dummy = 0 "Dummy variable to have something to derive (=0)"; - output Real y "=u"; - algorithm - y := u; - annotation(Inline=false,derivative(noDerivative = u) = der_zeroDer); - end zeroDer; - - function der_zeroDer "Zero derivative for zeroDer(expression)" - input Real u "Original expression"; - input Real dummy = 0 "Dummy variable to have somthing to derive (=0)"; - input Real der_dummy = 0 "der(dummy)"; - output Real der_y "der(y) = der(u) = 0"; - algorithm - der_y := 0; - annotation(Inline=true); - end der_zeroDer; - - annotation(Dialog(tab="Advanced",group = "Initialization",enable=enableNoise), - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, - {100,100}}), graphics={ - Polygon( - points={{-76,90},{-84,68},{-68,68},{-76,90}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line(points={{-76,68},{-76,-80}}, color={192,192,192}), - Line(points={{-86,0},{72,0}}, color={192,192,192}), - Polygon( - points={{94,0},{72,8},{72,-8},{94,0}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line(visible = enableNoise, - points={{-75,-13},{-61,-13},{-61,3},{-53,3},{-53,-45},{-45,-45},{-45, - -23},{-37,-23},{-37,61},{-29,61},{-29,29},{-29,29},{-29,-31},{-19, - -31},{-19,-13},{-9,-13},{-9,-41},{1,-41},{1,41},{7,41},{7,55},{13, - 55},{13,-1},{23,-1},{23,11},{29,11},{29,-19},{39,-19},{39,53},{49, - 53},{49,19},{57,19},{57,-47},{67,-47}}, - color={0,0,0}), - Text(visible=enableNoise, - extent={{-150,-110},{150,-150}}, - lineColor={0,0,0}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid, - textString=if useTime then "%samplePeriod s" else "%samplePeriod"), - Line(visible=not enableNoise, - points={{-76,56},{72,56}}, - color={0,0,0}, - smooth=Smooth.None), - Text(visible=not enableNoise, - extent={{-75,50},{95,10}}, - lineColor={0,0,0}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid, - textString="%y_off")}), - Documentation(info=" -

A summary of the properties of the noise blocks is provided in the documentation of package Blocks.Noise. This SignalBasedNoise block generates reproducible noise at its output. The block can only be used if on the same or a higher hierarchical level, model Blocks.Noise.GlobalSeed is dragged to provide global settings for all instances.

-

The generated random numbers of this block are a function of the input signal. Blocks with different input signals produce uncorrelated noise. This can be used to define e.g. the roughness of a railway track. The random values provided at the output of a SignalBasedNoise instance depend (a) on the actual input signal in the current time instant, (b) on the instance name, and (c) on the settings of the respective instance (as well as the seetings in globalSeed, see above and below). By default, two or more instances produce different, uncorrelated noise for the same input signal.

- - -

Parameters that need to be defined

- -

When using this block, at a minimum the following parameters must be defined:

- -
-

- - - - - - - - - - - - - - - - -

Parameter

Description

useTime

If useTime=true, then the input signal is replaced by the current simulation time. This is the default. If useTime=false, then an input connector is used, which defines the ordinate of the random signal. For each value of the input signal, a different random number is generated.

samplePeriod

Random values are drawn on a periodic grid over the input signal. The period of this grid is defined with this parameter. The unit of the samplePeriod corresponds to the unit of the input signal. If useTime=true, then the samplePeriod defines a sample Period in [s]. As a result of this pseudo-sampling, the highest frequency fmax contained in the generated noise is fmax = 1/samplePeriod. By default, no events are generated. In between, the noise is linearly interpolated at the drawn random values.

y_min, y_max

Upper and lower bounds for the noise. With the default setting, uniform noise is generated within these bounds.

-

- -

-As a simple demonstration, see example Blocks.Examples.NoiseExamples.SignalBasedNoise. In the next diagram, a simulation result is shown with a ramped input signal repeated every second. The generated random numbers then also repeat every second!

-
- -

Advanced tab: General settings

-

In the Advanced tab of the parameter menu, further options can be set. The general settings are shown in the next table:

- -

- - - - - - - - - - - - -

Parameter

Description

enableNoise= true, if noise is generated at the output of the block.
= false, if noise generation is switched off and the constant value y_off is provided as output.
y_offIf enableNoise = false, the output of the block instance has the value y_off. Default is y_off = 0.0. Furthermore, if time<startTime, the output of the block is also y_off.
-

- -

Advanced tab: Random number properties

- -

In the group "Random number properties", the properties of the random number generation are defined. By default, uniform random numbers with linear interpolation are used, and the random numbers are drawn with the pseudo random number generator algorithm "xorshift128+". This random number generator has a period of 2^128, has an internal state of 4 Integer elements, and has excellent statistical properties. If the default behavior is not desired, the following parameters can be set:

- -

- - - - - - - - - - - - - - - - -

Parameter

Description

distribution

Defines the random number distribution to map random numbers from the range 0.0 ... 1.0, to the desired range and distribution. Basically, distribution is a replaceable function that provides the truncated quantile (= truncated inverse cumulative distribution function) of a random distribution. More details of truncated distributions can be found in the documentation of package Math.TruncatedDistributions.

interpolation

Defines the type of interpolation between the random values drawn at sample instants. This is a replaceable package. The following interpolation packages are provided in package Math.Random.Utilities.Interpolators:

    -
  • Constant: The random values are held constant between sample instants.
  • Linear: The random values are linearly interpolated between sample instants.
  • SmoothIdealLowPass: The random values are smoothly interpolated with the sinc function. This is an approximation of an ideal low pass filter (that would have an infinite steep drop of the frequency response at the cut-off frequency 1/samplePeriod).
  • -

generator

Defines the pseudo random number generator to be used. This is a replaceable package. The random number generators that are provided in package Math.Random.Generators can be used here. Properties of the various generators are described in the package description of the Generators package.

-

- -

The different interpolation methods are demonstrated with example Examples.NoiseExamples.Interpolation. The example uses the block TimeBasedNoise, but the results also hold for SignalBasedNoise. A simulation result is shown in the next diagram:

-
- -

As can be seen, constant (constantNoise.y) and linear (linearNoise.y) interpolation respect the defined band -1 .. 3. Instead, smooth interpolation with the sinc function (smoothNoise.y) may violate the band slightly in order to be able to smoothly interpolate the random values at the sample instants. In practical applications, this is not an issue because the exact band of the noise is usually not exactly known.

- -

The selected interpolation method does not change the mean value of the noise signal, but it changes its variance with the following factors:

- -

- - - - - - - - - - - - - - - - -

interpolation

variance factor

Constant

1.0

Linear

2/3 (actual variance = 2/3*<variance of constantly interpolated noise>)

SmoothIdealLowPass

0.979776342307764 (actual variance = 0.97..*<variance of constantly interpolated noise>)

-

- -

-The above table holds only if an event is generated at every sample instant, or for very small relative tolerances. Otherwise, the variance depends also slightly on the step-size and the interpolation method of the integrator. Therefore, if the variance of the noise is important for your application, either change the distribution definition to take the factors above into account, or use only constant interpolation.

- - -

Advanced tab: Initialization

- -

The random number generators must be properly initialized, especially that different instances of the noise block generate uncorrelated noise. For this purpose the following parameters can be defined.

- -

- - - - - - - - - - - - - - - - - - - - -

Parameter

Description

useGlobalSeed

= true, if the seed (= Integer number) defined in the "inner GlobalSeed globalSeed" component is used for the initialization of the random number generators. Therefore, whenever the globalSeed defines a different number, the noise at every instance is changing.

= false, if the seed defined by globalSeed is ignored. For example, if aerodynamic turbulence is modelled with a noise block and this turbulence model shall be used for all simulation runs of a Monte Carlo simulation, then useGlobalSeed has to be set to false.

useAutomaticLocalSeed

An Integer number, called local seed, is needed to generate different random signals with every block instance. Instances using the same local seed produce exactly the same random number values (so the same noise, if the other settings of the instances are the same). If useAutomaticLocalSeed = true, the local seed is determined automatically as hash value of the instance name of the noise block. If useAutomaticLocalSeed = false, the local seed is defined explicitly by parameter fixedLocalSeed. This might be useful, if you use the noise block to model the roughness of a road and the road should be the same for every vehicle.

fixedLocalSeed

If useAutomaticLocalSeed = false, the local seed to be used. fixedLocalSeed can be any Integer number (including zero or a negative number). The initialization algorithm produces a meaningful initial state of the random number generator, so subsequently drawing random numbers produces statistically meaningful numbers.

signalOffset

The signalOffset parameter can be used to shift the input signal. This can be used, if you wish the pseudo-sampling (see parameter samplePeriod) to happen at specific values of the input signal.

-

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); -end SignalBasedNoise; diff --git a/Noise 1.0 Beta.1/Sources/TimeBasedNoise.mo b/Noise 1.0 Beta.1/Sources/TimeBasedNoise.mo deleted file mode 100644 index 169591b8..00000000 --- a/Noise 1.0 Beta.1/Sources/TimeBasedNoise.mo +++ /dev/null @@ -1,500 +0,0 @@ -within Noise.Sources; -block TimeBasedNoise - "Noise generator for Real numbers associated with time (this block computes always the same (random) output y at the same time instant)" - import Modelica_Noise.Math.Random; - import Modelica.Utilities.Streams.print; - - extends Modelica.Blocks.Interfaces.SO; - - // Main dialog menu - parameter Modelica.SIunits.Time samplePeriod(start=0.01) - "Period for sampling the raw random numbers" - annotation(Dialog(enable=enableNoise)); - parameter Real y_min(start=0.0) "Minimum value of noise" - annotation(Dialog(enable=enableNoise)); - parameter Real y_max(start=1.0) "Maximum value of noise" - annotation(Dialog(enable=enableNoise)); - - // Advanced dialog menu: Noise generation - parameter Boolean enableNoise = true "=true: y = noise, otherwise y = y_off" - annotation(choices(checkBox=true),Dialog(tab="Advanced",group="Noise generation")); - parameter Real y_off = 0.0 "Output if timeDescription - - Feb. 18, 2015 - - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
- - - -

-")); - replaceable package interpolation = - Interpolators.Constant constrainedby - Interpolators.Utilities.Interfaces.PartialInterpolator - "Interpolation method in grid of raw random numbers" - annotation(choicesAllMatching=true, Dialog(tab="Advanced",group="Random number properties",enable=enableNoise), - Documentation(revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); - replaceable package generator = - Modelica_Noise.Math.Random.Generators.Xorshift128plus constrainedby - Modelica_Noise.Math.Random.Interfaces.PartialGenerator - "Random number generator" - annotation(choicesAllMatching=true, Dialog(tab="Advanced",group="Random number properties",enable=enableNoise), - Documentation(revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); - - // Advanced dialog menu: Initialization - parameter Boolean useGlobalSeed = true - "= true: use global seed, otherwise ignore it" - annotation(choices(checkBox=true),Dialog(tab="Advanced",group = "Initialization",enable=enableNoise)); - parameter Boolean useAutomaticLocalSeed = true - "= true: use instance name hash else fixedLocalSeed" - annotation(choices(checkBox=true),Dialog(tab="Advanced",group = "Initialization",enable=enableNoise)); - parameter Integer fixedLocalSeed = 10 - "Local seed if useAutomaticLocalSeed = false" - annotation(Dialog(tab="Advanced",group = "Initialization",enable=enableNoise and not useAutomaticLocalSeed)); - final parameter Integer localSeed = if useAutomaticLocalSeed then integer(globalSeed.random()*2147483647) else - fixedLocalSeed; - parameter Modelica.SIunits.Time startTime = 0.0 - "Start time for sampling the raw random numbers" - annotation(Dialog(tab="Advanced", group="Initialization",enable=enableNoise)); - - // Retrieve values from outer global seed -protected - outer Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed - "Definition of global seed via inner/outer"; - parameter Integer actualGlobalSeed = if useGlobalSeed then globalSeed.seed else 0 - "The global seed, which is atually used"; - parameter Boolean generateNoise = enableNoise and globalSeed.enableNoise - "= true if noise shall be generated, otherwise no noise"; - - // Construct sizes - parameter Boolean continuous = interpolation.continuous - "= true, if continuous interpolation"; - parameter Real actualSamplePeriod = if continuous then sampleFactor*samplePeriod else samplePeriod - "Sample period of when-clause"; - parameter Integer nFuture = interpolation.nFuture+1 - "Number of buffer elements to be predicted in the future (+1 for crossing sample events)"; - parameter Integer nPast = interpolation.nPast - "Number of buffer elements to be retained from the past"; - parameter Integer nCopy = nPast + nFuture - "Number of buffer entries to retain when re-filling buffer"; - parameter Integer nBuffer = if continuous then nPast+sampleFactor+nFuture - else nPast+ 1 +nFuture - "Size of buffer"; - - // Declare buffers - discrete Integer state[generator.nState] - "Internal state of random number generator"; - discrete Real buffer[nBuffer] "Buffer to hold raw random numbers"; - discrete Real bufferStartTime "The last time we have filled the buffer"; - discrete Real r "Uniform random number in the range (0,1]"; - -algorithm - // During initialization the buffer is filled with random values - when initial() then - state := generator.initialState(localSeed, actualGlobalSeed); - bufferStartTime := time; - for i in 1:shift loop - (r, state) := generator.random(state); - end for; - for i in 1:nBuffer loop - (r, state) := generator.random(state); - buffer[i] := distribution(r); - end for; - - // At the first sample, we simply use the initial buffer - elsewhen generateNoise and time >= startTime then - bufferStartTime := time; - - // At the following samples, we shift the buffer and fill the end up with new random numbers - elsewhen generateNoise and sample(startTime+actualSamplePeriod, actualSamplePeriod) then - bufferStartTime := time; - buffer[1:nCopy] := buffer[nBuffer-nCopy+1:nBuffer]; - for i in nCopy+1:nBuffer loop - (r, state) := generator.random(state); - buffer[i] := distribution(r); - end for; - end when; - -equation - - // Generate noise, if requested, and make it smooth, if it is - y = if not generateNoise or time < startTime then y_off else - if interpolation.continuous then - smooth(interpolation.smoothness, - interpolation.interpolate(buffer= buffer, - offset= (time-bufferStartTime) / samplePeriod + nPast, - samplePeriod= samplePeriod)) else - interpolation.interpolate(buffer= buffer, - offset= (time-bufferStartTime) / samplePeriod + nPast, - samplePeriod= samplePeriod); - - annotation(Dialog(tab="Advanced",group = "Initialization",enable=enableNoise), - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, - {100,100}}), graphics={ - Polygon( - points={{-76,90},{-84,68},{-68,68},{-76,90}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line(points={{-76,68},{-76,-80}}, color={192,192,192}), - Line(points={{-86,0},{72,0}}, color={192,192,192}), - Polygon( - points={{94,0},{72,8},{72,-8},{94,0}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line(visible = enableNoise, - points={{-75,-13},{-61,-13},{-61,3},{-53,3},{-53,-45},{-45,-45},{-45, - -23},{-37,-23},{-37,61},{-29,61},{-29,29},{-29,29},{-29,-31},{-19, - -31},{-19,-13},{-9,-13},{-9,-41},{1,-41},{1,41},{7,41},{7,55},{13, - 55},{13,-1},{23,-1},{23,11},{29,11},{29,-19},{39,-19},{39,53},{49, - 53},{49,19},{57,19},{57,-47},{67,-47}}, - color={0,0,0}), - Text(visible=enableNoise, - extent={{-150,-110},{150,-150}}, - lineColor={0,0,0}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid, - textString="%samplePeriod s"), - Line(visible=not enableNoise, - points={{-76,56},{72,56}}, - color={0,0,0}, - smooth=Smooth.None), - Text(visible=not enableNoise, - extent={{-75,50},{95,10}}, - lineColor={0,0,0}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid, - textString="%y_off")}), - Documentation(info=" -

-A summary of the properties of the noise blocks is provided -in the documentation of package -Blocks.Noise. -This TimeBasedNoise block generates reproducible noise at its output. -The block can only be used if on the same or a higher hierarchical level, -model Blocks.Noise.GlobalSeed -is dragged to provide global settings for all instances. -

- -

-For every block instance, -the internally used pseudo random number generator has its own state, and therefore -the random values computed in different instances of the TimeBasedNoise block are uncorrelated. -The random values provided at the output of a TimeBasedNoise instance depend (a) -on the actual time instant, (b) on the instance name, and (c) on the settings of -the respective instance (as well as the seetings in globalSeed, see above and below). -By default, two or more instances produce different, uncorrelated noise at the same time instant. -

- - -

Parameters that need to be defined

- -

-When using this block, at a minimum the following parameters must be defined: -

- -
-

- - - - - - - - - -
ParameterDescription
samplePeriod Random values are drawn periodically at the sample rate in [s] - defined with this parameter. As a result, the highest frequency fmax - contained in the generated noise is fmax = 1/samplePeriod. - By default, time events are generated only at every 100 sample instant. - In between, the noise is linearly interpolated at the drawn random - values.
y_min, y_max Upper and lower bounds for the noise. With the default setting, - uniform noise is generated within these bounds.
-

- -

-As a simple demonstration, see example Blocks.Examples.NoiseExamples.TimeBasedNoise. -In the next diagram, a simulation result is shown for samplePeriod=0.02 s, y_min=-1, y_max=3: -

-

- -
-

- -

Advanced tab: General settings

-

-In the Advanced tab of the parameter menu, further options can be set. -The general settings are shown in the next table: -

- -
-

- - - - - - - - - - - -
ParameterDescription
enableNoise = true, if noise is generated at the output of the block.
- = false, if noise generation is switched off and the constant value - y_off is provided as output.
y_off If enableNoise = false, the output of the block instance has the - value y_off. Default is y_off = 0.0. - Furthermore, if time<startTime, the output of the block is also - y_off.
sampleFactor If the drawn random numbers are continuously interpolated - (so interpolation ≠ Constant), then a time event is only - generated at every sampleFactor sample instant. At such an event a - buffer is filled with the next sampleFactor random values and - interpolation takes place in this buffer. This approach speeds up the - simulation considerably, in many cases (provided not too small relative - tolerance is selected for the integrator). - If interpolation = Constant, then sampleFactor is ignored and a time - event is generated at every sample instant. If sampleFactor = 1, then - a time event is also generated at every sample instant, independently of - the selected interpolation method (which leads usually to a slow - simulation).
-

- -

Advanced tab: Random number properties

-

-In the group \"Random number properties\", the properties of the random number -generation are defined. By default, uniform random numbers with linear -interpolation are used, and the random numbers are drawn with the pseudo -random number generator algorithm \"xorshift128+\". This random number generator -has a period of 2^128, has an internal state of 4 Integer elements, and has -excellent statistical properties. If the default behavior is not desired, the -following parameters can be set: -

- -
-

- - - - - - - - - - - - - -
ParameterDescription
distribution Defines the random number distribution to map random numbers - from the range 0.0 ... 1.0, to the desired range and distribution. - Basically, distribution is a replaceable function that - provides the truncated quantile (= truncated - inverse cumulative distribution function) of a random distribution. - More details of truncated distributions can be found in the - documentation of package - Math.TruncatedDistributions. -
interpolation Defines the type of interpolation between the random values drawn - at sample instants. This is a replaceable package. - The following interpolation packages are provided in package - Math.Random.Utilities.Interpolators: -
    -
  • Constant: The random values are hold constant between sample instants.
  • -
  • Linear: The random values are linearly interpolated between sample instants.
  • -
  • SmoothIdealLowPass: The random values are smoothly interpolated with the - sinc function. - This is an approximation of an ideal low pass filter - (that would have an infinite steep drop of the frequency response at - the cut-off frequency 1/samplePeriod).
  • -
-
generator Defines the pseudo random number generator to be used. This is - a replaceable package. The random number generators that are provided in - package Math.Random.Generators - can be used here. Properties of the various generators are described in the package - description of the Generators package.
-

- -

-The different interpolation methods are demonstrated with example -Examples.NoiseExamples.Interpolation. -A simulation result is shown in the next diagram: -

- -

- -

- -

-As can be seen, constant (constantNoise.y) and linear (linearNoise.y) interpolation -respects the defined band -1 .. 3. -Instead, smooth interpolation with the sinc function (smoothNoise.y) may violate the band -slightly in order to be able to smoothly interpolate the random values at the sample instants. -In practical applications, this is not an issue because the exact band of the noise -is usually not exactly known. -

- -

-The selected interpolation method does not change the mean value of the -noise signal, but it changes its variance with the following factors: -

- -
-

- - - - - - - - - -
interpolationvariance factor
Constant 1.0
Linear 2/3 (actual variance = 2/3*<variance of constantly interpolated noise>)
SmoothIdealLowPass 0.979776342307764 (actual variance = 0.97..*<variance of constantly interpolated noise>)
-

- -

-The above table holds only if an event is generated at every sample instant -(sampleFactor=1), or for very small relative tolerances. Otherwise, the variance -depends also slightly on the step-size and the interpolation method of the -integrator. Therefore, if the variance of the noise is important for your application, -either change the distribution definition to take the factors above into account, -or use only constant interpolation. -

- -

Advanced tab: Initialization

- -

-The random number generators must be properly initialized, especially that -different instances of the noise block generate uncorrelated noise. -For this purpose the following parameters can be defined. -

- -
-

- - - - - - - - - - - - - - - -
ParameterDescription
useGlobalSeed = true, if the seed (= Integer number) defined in the \"inner GlobalSeed globalSeed\" - component is used for the initialization of the random number generators. - Therefore, whenever the globalSeed defines a different number, the noise at every - instance is changing.
- = false, if the seed defined by globalSeed is ignored. For example, if - aerodynamic turbulence is modelled with a noise block and this turbulence - model shall be used for all simulation runs of a Monte Carlo simulation, then - useGlobalSeed has to be set to false.
useAutomaticLocalSeed An Integer number, called local seed, is needed to initalize the random number - generator for a specific block instance. Instances using the same local seed - produce exactly the same random number values (so the same noise, if the other settings - of the instances are the same). If useAutomaticLocalSeed = true, the - local seed is determined automatically as hash value of the instance name of the - noise block. If useAutomaticLocalSeed = false, the local seed is defined - explicitly by parameter fixedLocalSeed.
fixedLocalSeed If useAutomaticLocalSeed = false, the local seed to be used. - fixedLocalSeed can be any Integer number (including zero or a negative number). - The initialization algorithm produces a meaningful initial state of the random - number generator, so the subsequently drawing of random numbers produce statistically - meaningful numbers
startTime The time instant at which noise shall be generated at the output y. - For time<startTime, y = y_off. In some cases it is meaningful to simulate - a certain duration until an approximate steady-state is reached. In such a case - startTime should be set to a time instant after this duration.
-

-", revisions=" -

- - - - - - -
Date Description
Feb. 18, 2015 - - -
- - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
- DLR Institute of System Dynamics and Control -
-
-

-")); -end TimeBasedNoise; diff --git a/Noise 1.0 Beta.1/Sources/package.mo b/Noise 1.0 Beta.1/Sources/package.mo deleted file mode 100644 index 0212a1b1..00000000 --- a/Noise 1.0 Beta.1/Sources/package.mo +++ /dev/null @@ -1,11 +0,0 @@ -within Noise; -package Sources "More noise sources" -extends Modelica.Icons.Package; - - -annotation (Icon(graphics={ Line( - points={{-84,0},{-54,0},{-54,40},{-24,40},{-24,-70},{6,-70},{6,80},{36,80}, - {36,-20},{66,-20},{66,60}}, - color={0,0,0}, - smooth=Smooth.None)})); -end Sources; diff --git a/Noise 1.0 Beta.1/Sources/package.order b/Noise 1.0 Beta.1/Sources/package.order deleted file mode 100644 index 044dbf1f..00000000 --- a/Noise 1.0 Beta.1/Sources/package.order +++ /dev/null @@ -1,3 +0,0 @@ -TimeBasedNoise -SignalBasedNoise -ColoredSignalBasedNoise diff --git a/Noise 1.0 Beta.1/Statistics/Correlation.mo b/Noise 1.0 Beta.1/Statistics/Correlation.mo deleted file mode 100644 index 49814296..00000000 --- a/Noise 1.0 Beta.1/Statistics/Correlation.mo +++ /dev/null @@ -1,75 +0,0 @@ -within Noise.Statistics; -block Correlation - extends Modelica.Blocks.Interfaces.SI2SO; - -// Parameters -public - parameter Modelica.SIunits.Time delta_t(min=0) = 0.0 - "Time delay for auto-correlation of signal"; - -// The start time of the simulation -public - parameter Real t_0(fixed=false) "Start time of the simulation"; -initial equation - t_0 = time; - -// The local integration time -public - Real t = max(0, time - delta_t - t_0) - "The local integration time (starts only after an offset of delta_t"; - -// The actual signals to correlate -public - Real X = u1 - "The first random variable to calculate the correlation coefficient"; - Real Y = delay(u2,delta_t, delta_t+0.1) - "The second random variable to calculate the correlation coefficient"; - -// Some integrals -public - Real int_X "The integral of X"; - Real int_Y "The integral of Y"; - Real int_X2 "The integral of X^2"; - Real int_Y2 "The integral of Y^2"; - Real int_XY "The integral of X*Y"; -initial equation - int_X = 0; - int_Y = 0; - int_X2 = 0; - int_Y2 = 0; - int_XY = 0; -equation - der(int_X) = if t < 0 then 0 else X; - der(int_Y) = if t < 0 then 0 else Y; - der(int_X2) = if t < 0 then 0 else X^2; - der(int_Y2) = if t < 0 then 0 else Y^2; - der(int_XY) = if t < 0 then 0 else X*Y; - -// The mean values -public - Real mean_X = if t <= 0 then X else int_X / t "The mean value of X"; - Real mean_Y = if t <= 0 then Y else int_Y / t "The mean value of Y"; - -// The variance values -public - Real var_X = if t <= 0 then 0 else (int_X2 - 2*mean_X*int_X + mean_X^2*t) / t - "The variance of X"; - Real var_Y = if t <= 0 then 0 else (int_Y2 - 2*mean_Y*int_Y + mean_Y^2*t) / t - "The variance of Y"; - Real cov_XY = if t <= 0 then 0 else (int_XY - mean_X*int_Y - mean_Y*int_X + mean_X*mean_Y*t) / t - "The co-variance of X and Y"; - -// The actual correlation -public - Real r = noEvent(if var_X <= 0 then 1.0 else - if var_Y <= 0 then 1.0 else - if var_X*var_Y <= cov_XY^2 then 1.0 else cov_XY / sqrt(abs(var_X)) / sqrt(abs(var_Y))) - "The Bravais- or Pearson-Correlation-Coefficient r = cov_XY / std_X / std_Y"; - -equation - y=r; - - annotation ( Documentation(revisions=" -

Developed 2014 at the DLR Institute of SYstem DYnamics and Control

-")); -end Correlation; diff --git a/Noise 1.0 Beta.1/Statistics/CorrelationTest.mo b/Noise 1.0 Beta.1/Statistics/CorrelationTest.mo deleted file mode 100644 index 19491818..00000000 --- a/Noise 1.0 Beta.1/Statistics/CorrelationTest.mo +++ /dev/null @@ -1,59 +0,0 @@ -within Noise.Statistics; -block CorrelationTest - "Tests the null hypothesis that two signals have a given true correlation coefficient" - extends Modelica.Blocks.Interfaces.SI2SO; - -// The start time of the simulation -public - parameter Real t_0(fixed=false) "Start time of the simulation"; - parameter Real t_eps = 0.001 "Start time of the simulation"; -initial equation - t_0 = time; - -// The distribution parameters -public - parameter Real rho = 0.0; - Real sigma = if time-t_0 > t_eps then 1 / sqrt(time-t_0) else 1/sqrt(t_eps); -protected - encapsulated model FisherTransformation - "Transforms a correlation to be approximately normally distributed" - import Modelica; - extends Modelica.Blocks.Interfaces.SISO; - parameter Real r_max = 0.99 "Cut-off for correlation coefficient"; - equation - y = noEvent(if u >= r_max then 0.5 * log( (1+r_max) / (1-r_max)) else - if u <= -r_max then 0.5 * log( (1+r_max) / (1-r_max)) else 0.5 * log(max(1e-8, (1+u) / (1-u)))); - end FisherTransformation; -public - Correlation correlation - annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); - SignificanceTest significanceTest(redeclare function H = - Modelica_Noise.Math.Distributions.Normal.cumulative (mu=rho, sigma=sigma)) - annotation (Placement(transformation(extent={{60,-10},{80,10}}))); - FisherTransformation fisherTransformation - annotation (Placement(transformation(extent={{-20,-10},{0,10}}))); -equation - connect(correlation.u1, u1) annotation (Line( - points={{-82,6},{-100,6},{-100,60},{-120,60}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(correlation.u2, u2) annotation (Line( - points={{-82,-6},{-100,-6},{-100,-60},{-120,-60}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(correlation.y, fisherTransformation.u) annotation (Line( - points={{-59,0},{-22,0}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(fisherTransformation.y, significanceTest.u) annotation (Line( - points={{1,0},{58,0}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(significanceTest.y, y) annotation (Line( - points={{81,0},{110,0}}, - color={0,0,127}, - smooth=Smooth.None)); - - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics)); -end CorrelationTest; diff --git a/Noise 1.0 Beta.1/Statistics/SignificanceTest.mo b/Noise 1.0 Beta.1/Statistics/SignificanceTest.mo deleted file mode 100644 index 04120c63..00000000 --- a/Noise 1.0 Beta.1/Statistics/SignificanceTest.mo +++ /dev/null @@ -1,27 +0,0 @@ -within Noise.Statistics; -model SignificanceTest "Tests the input against a null hypothesis" - extends Modelica.Blocks.Interfaces.SISO; - -// Null hypothesis -public - replaceable function H = - Modelica_Noise.Math.Distributions.Normal.cumulative constrainedby - Modelica_Noise.Math.Distributions.Interfaces.partialCumulative - "Cumulative density function of the null hypothesis" - annotation(choicesAllMatching=true); - -// Parameters -public - parameter Boolean rightTail = true "Calculate Pr(X > u | H)" annotation(choices(checkBox=true)); - parameter Boolean leftTail = true "Calculate Pr(X < u | H)" annotation(choices(checkBox=true)); - -// Calculate p-value -equation - y = if rightTail and leftTail then 2 * min(H(u), 1-H(u)) else - if rightTail then 1-H(u) else - if leftTail then H(u) else 1; - -public - Real l = H(u); - Real r = 1-H(u); -end SignificanceTest; diff --git a/Noise 1.0 Beta.1/Statistics/package.mo b/Noise 1.0 Beta.1/Statistics/package.mo deleted file mode 100644 index 7238f6d1..00000000 --- a/Noise 1.0 Beta.1/Statistics/package.mo +++ /dev/null @@ -1,19 +0,0 @@ -within Noise; -package Statistics - extends Modelica.Icons.Package; - - - - annotation (Icon(graphics={Line( - points={{-70,-63.953},{-66.5,-63.8975},{-63,-63.7852},{-59.5,-63.5674}, - {-56,-63.1631},{-52.5,-62.4442},{-49,-61.2213},{-45.5,-59.2318},{-42, - -56.1385},{-38.5,-51.5468},{-35,-45.0467},{-31.5,-36.2849},{-28,-25.0617}, - {-24.5,-11.4388},{-21,4.1682},{-17.5,20.9428},{-14,37.695},{-10.5, - 52.9771},{-7,65.2797},{-3.5,73.2739},{0,76.047},{3.5,73.2739},{7,65.2797}, - {10.5,52.9771},{14,37.695},{17.5,20.9428},{21,4.1682},{24.5,-11.4388}, - {28,-25.0617},{31.5,-36.2849},{35,-45.0467},{38.5,-51.5468},{42,-56.1385}, - {45.5,-59.2318},{49,-61.2213},{52.5,-62.4442},{56,-63.1631},{59.5, - -63.5674},{63,-63.7852},{66.5,-63.8975},{70,-63.953}}, - color={0,0,0}, - smooth=Smooth.Bezier)})); -end Statistics; diff --git a/Noise 1.0 Beta.1/Statistics/package.order b/Noise 1.0 Beta.1/Statistics/package.order deleted file mode 100644 index c74bfcf0..00000000 --- a/Noise 1.0 Beta.1/Statistics/package.order +++ /dev/null @@ -1,3 +0,0 @@ -Correlation -SignificanceTest -CorrelationTest diff --git a/Noise 1.0 Beta.1/Test/densities.mo b/Noise 1.0 Beta.1/Test/densities.mo deleted file mode 100644 index e536cbe5..00000000 --- a/Noise 1.0 Beta.1/Test/densities.mo +++ /dev/null @@ -1,30 +0,0 @@ -within Noise.Test; -function densities "Test functions Math.Statistics.Densities" - import Modelica.Utilities.Streams.print; - input Integer nPoints = 1000; - input Real u_min=-1; - input Real u_max=4; -protected - Real u[nPoints] = linspace(u_min, u_max, nPoints); - Real y[nPoints]; -algorithm - y := Modelica_Noise.Math.Distributions.Uniform.density( - u, - y_min=1, - y_max=3); - plotArray(u, y, id=1); - - y := Modelica_Noise.Math.Distributions.Normal.density( - u, - mu=0, - sigma=sqrt(0.08)); - plotArray(u, y, id=2); - - y := Modelica_Noise.Math.Distributions.Weibull.density( - u, - lambda=1, - k=5); - plotArray(u, y, id=3); - - annotation(__Dymola_interactive = true); -end densities; diff --git a/Noise 1.0 Beta.1/Test/package.order b/Noise 1.0 Beta.1/Test/package.order deleted file mode 100644 index 78d70186..00000000 --- a/Noise 1.0 Beta.1/Test/package.order +++ /dev/null @@ -1,3 +0,0 @@ -special -quantiles -densities diff --git a/Noise 1.0 Beta.1/Test/quantiles.mo b/Noise 1.0 Beta.1/Test/quantiles.mo deleted file mode 100644 index 8bca9158..00000000 --- a/Noise 1.0 Beta.1/Test/quantiles.mo +++ /dev/null @@ -1,34 +0,0 @@ -within Noise.Test; -function quantiles "Test functions Math.Statistics.Quantiles" - import Modelica.Utilities.Streams.print; - import Modelica_Noise.Math.Random.TruncatedQuantiles; - input Integer nPoints = 1000; - input Real eps = 1e-5; -protected - Real u[nPoints] = linspace(eps, 1-eps, nPoints); - Real y[nPoints]; -algorithm - y := Modelica_Noise.Math.Distributions.Uniform.quantile( - u, - y_min=1, - y_max=3); - plotArray(u, y, id=1); - - y := Modelica_Noise.Math.Distributions.Normal.quantile( - u, - mu=2, - sigma=3); - plotArray(u, y, id=2); - - y := Modelica_Noise.Math.Distributions.Weibull.quantile( - u, - lambda=1, - k=1); - plotArray(u, y, id=3); - - // Truncated quantiles - y :=TruncatedQuantiles.normal(u,y_min=-4,y_max=8,sigma=3); - plotArray(u, y, id=4); - - annotation(__Dymola_interactive = true); -end quantiles; diff --git a/Noise 1.0 Beta.1/Test/special.mo b/Noise 1.0 Beta.1/Test/special.mo deleted file mode 100644 index 3322d345..00000000 --- a/Noise 1.0 Beta.1/Test/special.mo +++ /dev/null @@ -1,35 +0,0 @@ -within Modelica_Noise.Test; -function special "Plot functions Math.Special" - import Modelica.Utilities.Streams.print; - import Modelica_Noise.Math.Special; - input Integer nPoints = 1000; - input Real erfRange = 3.0; - input Real sincRange = 20.0; - input Real normalEps = 1e-5; -protected - Real uErf[nPoints] = linspace(-erfRange, erfRange, nPoints); - Real yErf[nPoints]; - Real yErfc[nPoints]; - Real uErfInv[nPoints]; - Real uErfcInv[nPoints]; - Real r[nPoints] = linspace(normalEps, 1-normalEps, nPoints); - Real rn[nPoints]; -algorithm - yErf := Special.erf(uErf); - plotArray(uErf, yErf, legend="y = erf(u)", id=1); - - yErfc := Special.erfc(uErf); - plotArray(uErf, yErfc, legend="y = erfc(u)", id=2); - - uErfInv := Special.erfInv(yErf); - plotArray(yErf, uErfInv, legend="y = erfInv(u)", id=3); - - uErfcInv := Special.erfcInv(yErfc); - plotArray(yErf, uErfInv, legend="y = erfcInv(u)", id=4); - - r :=linspace(-sincRange,sincRange,nPoints); - rn :=Special.sinc(r); - plotArray(r,rn,legend="y=sinc(u)",id=5); - - annotation(__Dymola_interactive = true); -end special; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/cumulative.mo b/Noise 1.0 Beta.1/TruncatedDistributions/Bates/cumulative.mo deleted file mode 100644 index 79be40af..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/cumulative.mo +++ /dev/null @@ -1,49 +0,0 @@ -within Noise.TruncatedDistributions.Bates; -function cumulative "Cumulative distribution function of Bates distribution" - extends - Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialCumulative; - input Integer n=12 "Number of uniform random values" annotation (Dialog); -algorithm - y := Distributions.Bates.cumulative(u, u_min, u_max, n); - annotation (Inline=true,Documentation(info=" -

Syntax

-
-Bates.cumulative(u, y_min=0, y_max=1, n=12);
-
- -

Description

-

-This function computes the cumulative distribution function -according to a Bates distribution (= mean of n uniform distributions). -The returned value y is in the range: -

- -

-0 ≤ y ≤ 1 -

- -

-Plot of the function: -

- -

- -

- -

-For more details, see -Wikipedia. -

- -

Example

-
-  cumulative(0,-3,3,12) // = 0.5
-
- -

See also

-

-Bates.density, -Bates.quantile. -

-")); -end cumulative; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/density.mo b/Noise 1.0 Beta.1/TruncatedDistributions/Bates/density.mo deleted file mode 100644 index 79ea17b2..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/density.mo +++ /dev/null @@ -1,40 +0,0 @@ -within Noise.TruncatedDistributions.Bates; -function density "Density of Bates distribution" - extends Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialDensity; - input Integer n=12 "Number of uniform random values" annotation (Dialog); -algorithm - y := Distributions.Bates.density(u, u_min, u_max, n); - - annotation (Inline=true,Documentation(info=" -

Syntax

-
-Bates.density(u, y_min=0, y_max=1, n=12);
-
- -

Description

-

-This function computes the probability density function according to a Bates distribution -(= mean of n uniform distributions). Plot of the function: -

- -

- -

- -

-For more details, see -Wikipedia. -

- -

Example

-
-  density(0, -3, 3, 12) // = 4.7271067821068185
-
- -

See also

-

-Bates.cumulative, -Bates.quantile. -

-")); -end density; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/package.mo b/Noise 1.0 Beta.1/TruncatedDistributions/Bates/package.mo deleted file mode 100644 index a1232d11..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/package.mo +++ /dev/null @@ -1,50 +0,0 @@ -within Noise.TruncatedDistributions; -package Bates "Library of Bates distribution functions (= mean of n uniform distributions)" - extends Modelica.Icons.Package; - - -annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ - -100,-100},{100,100}}), graphics={ - Line( - points={{-70,-63.953},{-66.5,-63.8975},{-63,-63.7852},{-59.5,-63.5674}, - {-56,-63.1631},{-52.5,-62.4442},{-49,-61.2213},{-45.5,-59.2318},{-42, - -56.1385},{-38.5,-51.5468},{-35,-45.0467},{-31.5,-36.2849},{-28,-25.0617}, - {-24.5,-11.4388},{-21,4.1682},{-17.5,20.9428},{-14,37.695},{-10.5, - 52.9771},{-7,65.2797},{-3.5,73.2739},{0,76.047},{3.5,73.2739},{7,65.2797}, - {10.5,52.9771},{14,37.695},{17.5,20.9428},{21,4.1682},{24.5,-11.4388}, - {28,-25.0617},{31.5,-36.2849},{35,-45.0467},{38.5,-51.5468},{42,-56.1385}, - {45.5,-59.2318},{49,-61.2213},{52.5,-62.4442},{56,-63.1631},{59.5, - -63.5674},{63,-63.7852},{66.5,-63.8975},{70,-63.953}}, - color={0,0,0}, - smooth=Smooth.Bezier)}), Documentation(info=" -

-This package provides -

-
    -
  • probability density function (= derivative of cumulative distribution function),
  • -
  • cumulative distribution function, and
  • -
  • quantile (= inverse cumulative distribution function).
  • -
-

-of the Bates distribution (= mean of n uniform -distributions). Examples: -

- -

- -

- -

- -

- -

- -

- -

-For more details of this distribution see -Wikipedia. -

-")); -end Bates; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/package.order b/Noise 1.0 Beta.1/TruncatedDistributions/Bates/package.order deleted file mode 100644 index ddc9fbd9..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/package.order +++ /dev/null @@ -1,3 +0,0 @@ -density -cumulative -quantile diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/quantile.mo b/Noise 1.0 Beta.1/TruncatedDistributions/Bates/quantile.mo deleted file mode 100644 index 3b44229c..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Bates/quantile.mo +++ /dev/null @@ -1,59 +0,0 @@ -within Noise.TruncatedDistributions.Bates; -function quantile "Quantile of Bates distribution" - extends Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialQuantile; - input Integer n=12 "Number of uniform random values" annotation (Dialog); -algorithm - y := Distributions.Bates.quantile(u, y_min, y_max, n); - annotation (Inline=true,Documentation(info=" -

Syntax

-
-Bates.quantile(u, y_min=0, y_max=1, n=12);
-
- -

Description

-

-This function computes the inverse cumulative distribution function (= quantile) according to a Bates -distribution (= mean of n uniform distributions). Input argument u must be in the range: -

- -
-

-0 ≤ u ≤ 1 -

-
- -

-The returned number y is in the range: -

- -
-

-y_min ≤ y ≤ y_max -

-
- -

-Plot of the function: -

- -

- -

- -

-For more details, see -Wikipedia. -

- -

Example

-
-  quantile(0.5,-3,3,12) // = -7.450831063238184E-010
-
- -

See also

-

-Bates.density, -Bates.cumulative. -

-")); -end quantile; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/cumulative.mo b/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/cumulative.mo deleted file mode 100644 index f0288248..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/cumulative.mo +++ /dev/null @@ -1,35 +0,0 @@ -within Noise.TruncatedDistributions.Discrete; -function cumulative "Cumulative distribution function of discrete distribution" - extends - Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialCumulative; - input Real x[:] = {0,1} "Discrete values to be chosen from" annotation(Dialog); - input Real p[size(x,1)] = ones(size(x,1))/size(x,1) - "The probabilities of the discrete values" annotation(Dialog); -protected - Real x0[size(x,1)+2]; - Real p0[size(x,1)+2]; -algorithm - x0 := cat(1,x,{u_min,u_max}); - p0 := cat(1,p,{ 0, 0}); - for i in 1:size(x,1) loop - if x[i] < u_min then - p0[end-1] := p0[end-1] + p0[i]; - p0[i] := 0; - elseif x[i] > u_max then - p0[end-0] := p0[end-0] + p0[i]; - p0[i] := 0; - end if; - end for; - Noise.Distributions.Discrete.cumulative(u, x0, p0); - - annotation (Inline=true,Documentation(info=" -

-This function returns the cumulative distribution function according to a uniform distribution in a band. -

- -

-For more details of this distribution see -Wikipedia. -

-")); -end cumulative; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/density.mo b/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/density.mo deleted file mode 100644 index dfcae7d5..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/density.mo +++ /dev/null @@ -1,20 +0,0 @@ -within Noise.TruncatedDistributions.Discrete; -function density "Density of discrete distribution (undefined!)" - extends Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialDensity; - input Real x[:] = {0,1} "Discrete values to be chosen from" annotation(Dialog); - input Real p[size(x,1)] = ones(size(x,1))/size(x,1) - "The probabilities of the discrete values" annotation(Dialog); -algorithm - assert(false, "The density of the discrete distribution is not defined."); - - annotation (Inline=true,Documentation(info=" -

-This function returns the probability density according to a uniform distribution in a band. -

- -

-For more details of this distribution see -Wikipedia. -

-")); -end density; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/package.mo b/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/package.mo deleted file mode 100644 index 2d7d62b2..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/package.mo +++ /dev/null @@ -1,38 +0,0 @@ -within Noise.TruncatedDistributions; -package Discrete "Library of truncated discrete distribution functions" - extends Modelica.Icons.Package; - - -annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ - -100,-100},{100,100}}), graphics={ - Line( - points={{-70,-60},{-50,-60},{-50,40},{-50,-60},{-20,-60},{-20,12},{-20, - -60},{0,-60},{0,80},{0,-60},{30,-60},{30,50},{30,-60},{62,-60},{62, - 14},{62,-60},{70,-60}}, - color={0,0,0}), - Ellipse( - extent={{-54,44},{-46,36}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{-24,18},{-16,10}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{-4,84},{4,76}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{26,54},{34,46}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{58,18},{66,10}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid)})); -end Discrete; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/package.order b/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/package.order deleted file mode 100644 index ddc9fbd9..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/package.order +++ /dev/null @@ -1,3 +0,0 @@ -density -cumulative -quantile diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/quantile.mo b/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/quantile.mo deleted file mode 100644 index 9f433ea9..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/Discrete/quantile.mo +++ /dev/null @@ -1,42 +0,0 @@ -within Noise.TruncatedDistributions.Discrete; -function quantile - "Quantile of discrete distribution (= inverse cumulative distribution function)" - extends Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialQuantile; - input Real x[:] = {0,1} "Discrete values to be chosen from" annotation(Dialog); - input Real p[size(x,1)] = ones(size(x,1))/size(x,1) - "The probabilities of the discrete values" annotation(Dialog); -protected - Real x0[size(x,1)+2]; - Real p0[size(x,1)+2]; -algorithm - x0 := cat(1,x,{y_min,y_max}); - p0 := cat(1,p,{ 0, 0}); - for i in 1:size(x,1) loop - if x[i] < y_min then - p0[end-1] := p0[end-1] + p0[i]; - p0[i] := 0; - elseif x[i] > y_max then - p0[end-0] := p0[end-0] + p0[i]; - p0[i] := 0; - end if; - end for; - Noise.Distributions.Discrete.quantile(u, x0, p0); - - annotation (Inline=true,Documentation(info=" -

-This function returns a number according to a uniform distribution in a band. -This means the returned number is in the range: -

- -
-

-y_min ≤ y ≤ y_max -

-
- -

-For more details of this distribution see -Wikipedia. -

-")); -end quantile; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/package.mo b/Noise 1.0 Beta.1/TruncatedDistributions/package.mo deleted file mode 100644 index 2697c942..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/package.mo +++ /dev/null @@ -1,14 +0,0 @@ -within Noise; -package TruncatedDistributions - extends Modelica.Icons.Package; - - -annotation (Icon(graphics={Line( - points={{-32,-38},{-28,-27.0617},{-24.5,-13.4388},{-21,2.1682},{-17.5, - 18.9428},{-14,35.695},{-10.5,50.9771},{-7,63.2797},{-3.5,71.2739},{ - 0,74.047},{3.5,71.2739},{7,63.2797},{10.5,50.9771},{14,35.695},{ - 17.5,18.9428},{21,2.1682},{24.5,-13.4388},{28,-27.0617},{31.5, - -38.2849},{35,-47.0467}}, - color={0,0,0}, - smooth=Smooth.Bezier)})); -end TruncatedDistributions; diff --git a/Noise 1.0 Beta.1/TruncatedDistributions/package.order b/Noise 1.0 Beta.1/TruncatedDistributions/package.order deleted file mode 100644 index 01c36113..00000000 --- a/Noise 1.0 Beta.1/TruncatedDistributions/package.order +++ /dev/null @@ -1,2 +0,0 @@ -Bates -Discrete diff --git a/Noise 1.0 Beta.1/libraryinfo.mos b/Noise 1.0 Beta.1/libraryinfo.mos deleted file mode 100644 index 417ad663..00000000 --- a/Noise 1.0 Beta.1/libraryinfo.mos +++ /dev/null @@ -1,17 +0,0 @@ -LibraryInfoMenuSeparator( - category="libraries", - pos=100) - -NoiseVersion = "1.0 Beta.1"; - -LibraryInfoMenuCommand( - category="libraries", - text="Noise "+NoiseVersion, - reference="Noise", - version=NoiseVersion, - isModel=true, - description="Additional noise modules for Modelica. Version "+NoiseVersion, - ModelicaVersion="3.2.1", - pos=1500) - -// LibraryInfoPreload(reference="Modelica_LinearSystems2") diff --git a/Noise 1.0 Beta.1/package.mo b/Noise 1.0 Beta.1/package.mo deleted file mode 100644 index e45fc63a..00000000 --- a/Noise 1.0 Beta.1/package.mo +++ /dev/null @@ -1,24 +0,0 @@ -within ; -package Noise "A library with additional noise modules compatible to the Modelica standard library" - extends Modelica.Icons.Package; - - - - - - - - - - - annotation(version = "1.0 Beta.1", - versionDate = "2015-06-22", - versionBuild = 1, - uses(Modelica(version="3.2.1"), Modelica_Noise(version= - "1.0 Beta.1")), - Icon(graphics={ Line( - points={{-84,0},{-54,0},{-54,40},{-24,40},{-24,-70},{6,-70},{6,80},{36,80}, - {36,-20},{66,-20},{66,60}}, - color={0,0,0}, - smooth=Smooth.None)})); -end Noise; diff --git a/Noise 1.0 Beta.1/package.order b/Noise 1.0 Beta.1/package.order deleted file mode 100644 index 67814b3c..00000000 --- a/Noise 1.0 Beta.1/package.order +++ /dev/null @@ -1,9 +0,0 @@ -Examples -Sources -Generators -Distributions -TruncatedDistributions -Interpolators -Math -Statistics -Plots From 510a7d08ee20371e2e5f3bf98ed316ee4263a590 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Sun, 28 Jun 2015 17:15:57 +0200 Subject: [PATCH 05/46] typo --- .../Math/TruncatedDistributions/package.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.mo index 0d39b858..eff7e004 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.mo @@ -91,7 +91,7 @@ cdf_max = Distributions.XXX.cumulative(u_max,...);

For an example of a truncated distribution, see the following -plot of the probabibilty density function of a normal distribution +plot of the probability density function of a normal distribution compared with its truncated distribution:

From febddb6293836f57cbed52534da364e9d4ed5caf Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Wed, 15 Jul 2015 10:07:55 +0200 Subject: [PATCH 06/46] libraryinfo.mos corrected --- Modelica_Noise 1.0 Beta.1/libraryinfo.mos | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/libraryinfo.mos b/Modelica_Noise 1.0 Beta.1/libraryinfo.mos index a032432e..ddb79353 100644 --- a/Modelica_Noise 1.0 Beta.1/libraryinfo.mos +++ b/Modelica_Noise 1.0 Beta.1/libraryinfo.mos @@ -2,16 +2,14 @@ LibraryInfoMenuSeparator( category="libraries", pos=100) -NoiseVersion = "1.0 Beta.1"; - LibraryInfoMenuCommand( category="libraries", text="Modelica_Noise "+NoiseVersion, reference="Modelica_Noise", - version=NoiseVersion, + version="1.0 Beta.1", isModel=true, description="Modelica_Noise modules for the MSL. Version "+NoiseVersion, ModelicaVersion="3.2.1", pos=110) -// LibraryInfoPreload(reference="Modelica_LinearSystems2") +// LibraryInfoPreload(reference="Modelica_Noise") From b60d2aa4aeb7848c10ccbfaa78744b3e127b5e71 Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Wed, 15 Jul 2015 15:41:17 +0200 Subject: [PATCH 07/46] Removed "impure" prefix from 4 functions (in order to be strictly Modelica 3.2 compliant) --- .../Math/Random/Utilities/automaticGlobalSeed.mo | 2 +- .../Math/Random/Utilities/automaticLocalSeed.mo | 2 +- Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo | 2 +- Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo index 148e6d2c..bc06bfd7 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo @@ -1,5 +1,5 @@ within Modelica_Noise.Math.Random.Utilities; -impure function automaticGlobalSeed +function automaticGlobalSeed "Creates an automatic integer seed from the current time and process id (= impure function)" output Integer seed "Automatically generated seed"; protected diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticLocalSeed.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticLocalSeed.mo index 55485b2f..4b4792d7 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticLocalSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticLocalSeed.mo @@ -1,5 +1,5 @@ within Modelica_Noise.Math.Random.Utilities; -impure function automaticLocalSeed +function automaticLocalSeed "Creates an automatic local seed from the instance name" input String path "Full path name of the instance (inquire with getInstanceName())"; diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo b/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo index d1d0965e..d81ac3b9 100644 --- a/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo +++ b/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo @@ -1,5 +1,5 @@ within Modelica_Noise.Utilities.System; -impure function getPid "Retrieves the current process id" +function getPid "Retrieves the current process id" output Integer pid "Process ID"; external "C" pid = ModelicaRandom_getpid() annotation (Include = "#include \"ModelicaRandom.c\""); diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo b/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo index 27bd05d5..ca8a85d2 100644 --- a/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo +++ b/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo @@ -1,5 +1,5 @@ within Modelica_Noise.Utilities.System; -impure function getTime "Retrieves the local time (in the local time zone)" +function getTime "Retrieves the local time (in the local time zone)" output Integer ms "Millisecond"; output Integer sec "Second"; output Integer min "Minute"; From 4c49b6e7b497ed812c4accb36bd2159c103c1124 Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Fri, 17 Jul 2015 09:12:35 +0200 Subject: [PATCH 08/46] Moved images from Resources/Images/Math/TruncatedDistributions to Distributions --- .../TruncatedDistributions/Normal.cumulative.png | Bin 6707 -> 0 bytes .../TruncatedDistributions/Normal.density.png | Bin 7465 -> 0 bytes .../TruncatedDistributions/Normal.quantile.png | Bin 6512 -> 0 bytes .../Weibull.cumulative.png | Bin 6364 -> 0 bytes .../TruncatedDistributions/Weibull.density.png | Bin 6463 -> 0 bytes .../TruncatedDistributions/Weibull.quantile.png | Bin 6887 -> 0 bytes 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Normal.cumulative.png delete mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Normal.density.png delete mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Normal.quantile.png delete mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Weibull.cumulative.png delete mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Weibull.density.png delete mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Weibull.quantile.png diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Normal.cumulative.png b/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Normal.cumulative.png deleted file mode 100644 index 437572b46f70b544dc5f6bd132fe38b9c77e5be3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6707 zcmcI}cU)6lx8?ywih$CT67*FNq)8V+11cS)mrz0zq$vlKkIo`UKkr{v$62A006+I ztD|8G0CafpIn8tmtcm-3C>8u+M(9}k0Ra1_wVn15;kbSHLwwL=m$&Dg{Ahrq8;rB303K|0IV7$8td|9$esJ^J6poaEh(mMph!`m{6Pwi&!6PNlc zS#dk*>qKgiXA?GC#d+3W|JyAp2LByXA07HJersZ5M}IcJnL2zD)_S}u*w3;C%F3tx ztf+~xKX%CLT0OPfMWxte&gs>ay6cl}c@LypcA6pR9k=p@;mws6iikmjD`zl!;R0q! zAZ=o7ZE)(NgawXZQ=T8-@siv0#TxZ}@zN0G3z{q$DjizXKRDr;VE}Etr?7<|tSGCI zG{qtHXf7N|n6LU1eMsf(>du09Qy=|ZJ@B=G8{eO7H_rzdRQf)o6|T1^?-=YzL*fvv zuBm0D2@LCbwLh6&7c<;Aw{DH5mJV$z9U?j02wPLylM68mJHzF>1?j6Xszqx;ft5&xwFUhjdcz485A_M^$vLX^ z=e9!+dNzY6NCt@Qnpv6wwdjmb)Bfn9MqP|Wqnpo%zCe_9ZoN?+h_1YWfmh& zq@07!gHK!+_GY<4zHc1ei*A`1D{m&DySiO%UFVd1ypNvw!=-|85dR*b;d`1zE&KYd zL<}-quocT&H}uv#bW9(*CP}@80jFlEzico*7-wJ0kM>k8x$aRq{&Jt1Ai7dIWvVa4 zc6pFD$yJUgA6@&i+dHXAS+JGLU&bp`ibmR%X&xSsN34YKeY}-0_+k62*XF%xdvV*d zeYNigjjRGhU2_B|y3+Xw4xK|5Hi)+9cQ0_hw%DU_^4I z{MB|8UUaEn5zQ{u0=d-`RXcxaF!AW|pZoYbqF;{2sS=}#1Pq@a8;vkrAu+{-PucoW zUqsq{cekzBW3Bys(!|)`b0#C?EY)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`n9wO6I*(S z(EnXn{Xb~1|8ePb>_54T*yxl0yJuZ_<0j39@MOq95crvrqSJ*J(B15Z%VS16}2 zotF_+w0={ItltLyI*f6 z2@B%{+3~NEE@qOH`%OwN{z%?^GqFTyx~#x zb`XnwJ(cJ#KzGJX^XAkK&Q8V;qGy7j@-&G3Le+RX=bVbPlsWE6HpVRUw56?Z@T{5L zNDPHCy71=TBx(j})4_$){_tu-&9iql&fH>e_`^ohB{*FNVf*R2e=4R-x^o4hq5iEu zhI+Zq@;)cSJ+_Z2<~>_x4q`k; z4Ubt2PBe`{H}D(mVFf0{4=~|$iibrhsmUm#CD!dQ|JuQ-gDWhJv25iBX1V8;P&;(9 z#Oe6BPSw`isx6pQ)36YC?4wqto7L=p{+RB1q7wuk-PQ{x1uR^<`Y&G)=!G{iQ{l@r SVZ=|60Idgl8kK6#BL5$qPIcx0 diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Normal.quantile.png b/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Normal.quantile.png deleted file mode 100644 index 071c6740621ee0974c319f924c3c154dc48b3ba5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6512 zcmbVQc{r49+rP1Ayf3hL?4%Z>3ES6y5yM z#%%iT&E&{j@h;!F?|3Zmk+~mPfMj317X}@jMn3X!Rw>AFbt#eKGN>y!x~J%Fcaq&) zE|=(4S8l^jDw@a<{JugDdGVfuZ%0sBI-0xZ z@uiP^pFk*9c6%ANL#~1Ih>Qu1r;9xoEXNVA7QJigxMM?9*7n5ecW^{6zeeI;IC|V^ z^4p&~WnpinauZp*xTWj8+1ooZ?ul0+BK4cfPCw#s$DH&g8{NKR=}c};dclW79q)*N z*E}Smq$v&c$N}OBqX;IQg_PE~vO7~-3ahQ$*gmnP>0j;ROTDf`6vs4H5cew^`IKg9 zU!Q(g?h8ZbAE{AIWn{eb{i1)au>2T8&Oy^0S7twE>nvSlLw{TDGXFd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UoDj%y!%Nt)y5S|+;ibJO0~<^8ThWdzeC7+X8?xx!7dkl8B2_bmIKX% zW&KB@s$Q?YJAkwy*b|f-&B2M9<$mIbAgS7uV3!yzW_gFw8=&tR1K8(&>*+Db7u&RI rm`z8x2*`l780hqwkNzG6gv%lFn`ruMvS#of5kN~#_fDA#`q6&@bsQUH diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Weibull.quantile.png b/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/TruncatedDistributions/Weibull.quantile.png deleted file mode 100644 index 7c804d74694d656471c459417abb8910bae94d6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6887 zcmb_hc{tQx-~QT@P)f>LA=$GHWvib(OIgMegD}KchC;^PqPMapWUuVQ*oQ&G*efCH z7zR^9VNCX&_p9Htzt8(z?;r16*IaX)Ip=&obI#{;-}kvayJe!sew6np008U;`r2jy zKt~4O97mYJ9${#HANawF)VH|@032mck;NSxuP`!6dkWA4*>BCn?<=9B3RVAAOPHqVtKD)h_`wLQ&EoW1F)>9~#vrH1T< zJD12=j)jm@S?y94&YwYGxB=k9&_PB6_}E3dNH!pXfl&s0>~S0bs9dAa0~FxT&PCDZ z^=OOw=RL5_D^$-%*Y=lbVm@X17Hm2@oKCMS!W;z0Ad?rJPmlR?1uZ`E|G37o zKht~BzO%HRV_YwFwxQjb_38F3nF(Ndmd`7DK*K8X&s1l@x?+h55TC(upUfan+ts|r zt4F;ICs$>7|c}r$X2Aw)M6lLiKSRzLK3> z9J-tvFLhwh5QoOpY*KoAQOF>sus_Bru|14qcdNSM=d4>zhWxyFaqKFw#UDofh7 z66bE4IEOH4&Rb`x>&;n8%<0b0L(umhW&2yzn{J0l78jQcohll;i%|3^KCU`{Fc~@q zcdj};U$i?U(uheaeb)vtL<IUPwRhytqgcGvr|AXJ>jzLpeb8gw*SpobPm02X>k`*g5@n-S0zJui#PAUy>1Rs z%0}}d7o6(y)+Z;w7^NTRooo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N6>~bsX54?47&>^2@6_EykZKfR9`7wn9`_l zN;|CL81+x(==XjxGNAkBxyixRMk+0M#&Z8(SOG>m?vlz}EMJ{U2grhtBGtqv~RL``VQS2F!8Lhf$2=!V=_On(^tf49&k@$;n=OF{kNJrooldSFi;a+ ziJyktQ5scUe(zC#b%{Z%rG1PblXbf_t0s#k5N}IX^ydK+$G9EYN%z?EwAOv0_lQh# zu)}t_{S(q6Y-&Q&7R1N;G%9wAhnT3YFlV*?@cY+r+q1 z+%2Njpz9DCqwB>TZTeQdzYs?0D1ylgmUR=8-)Gz47%R<_r~I#4UeT~P7#-XZdlp>H z;3s)NSoURZg#1`$co;A+;&OA#x|1II3_dAuVa2k= z*N=n0b4j-xmOQmqlxuom*kztVS%JY(ik+$=wIyti@{?RdNi&q$l$xS^0nbckTk2in zb#u*dhkePw7KPIxqLut*Yx64vkT= gBGX^((OpgV9n?-(JUkHm7ZPBgW1?O9hvUQl2J~$dVgLXD From af14eb3c3409dd0f3cf5944c4febc91d97f83b5f Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Fri, 17 Jul 2015 09:13:44 +0200 Subject: [PATCH 09/46] Moved images from TruncatedDistributions to Distributions under Resources/Images/Math --- .../Distributions/TruncatedNormal.cumulative.png | Bin 0 -> 6707 bytes .../Distributions/TruncatedNormal.density.png | Bin 0 -> 7465 bytes .../Distributions/TruncatedNormal.quantile.png | Bin 0 -> 6512 bytes .../TruncatedWeibull.cumulative.png | Bin 0 -> 6364 bytes .../Distributions/TruncatedWeibull.density.png | Bin 0 -> 6463 bytes .../Distributions/TruncatedWeibull.quantile.png | Bin 0 -> 6887 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedNormal.cumulative.png create mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedNormal.density.png create mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedNormal.quantile.png create mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedWeibull.cumulative.png create mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedWeibull.density.png create mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedWeibull.quantile.png diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedNormal.cumulative.png b/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedNormal.cumulative.png new file mode 100644 index 0000000000000000000000000000000000000000..437572b46f70b544dc5f6bd132fe38b9c77e5be3 GIT binary patch literal 6707 zcmcI}cU)6lx8?ywih$CT67*FNq)8V+11cS)mrz0zq$vlKkIo`UKkr{v$62A006+I ztD|8G0CafpIn8tmtcm-3C>8u+M(9}k0Ra1_wVn15;kbSHLwwL=m$&Dg{Ahrq8;rB303K|0IV7$8td|9$esJ^J6poaEh(mMph!`m{6Pwi&!6PNlc zS#dk*>qKgiXA?GC#d+3W|JyAp2LByXA07HJersZ5M}IcJnL2zD)_S}u*w3;C%F3tx ztf+~xKX%CLT0OPfMWxte&gs>ay6cl}c@LypcA6pR9k=p@;mws6iikmjD`zl!;R0q! zAZ=o7ZE)(NgawXZQ=T8-@siv0#TxZ}@zN0G3z{q$DjizXKRDr;VE}Etr?7<|tSGCI zG{qtHXf7N|n6LU1eMsf(>du09Qy=|ZJ@B=G8{eO7H_rzdRQf)o6|T1^?-=YzL*fvv zuBm0D2@LCbwLh6&7c<;Aw{DH5mJV$z9U?j02wPLylM68mJHzF>1?j6Xszqx;ft5&xwFUhjdcz485A_M^$vLX^ z=e9!+dNzY6NCt@Qnpv6wwdjmb)Bfn9MqP|Wqnpo%zCe_9ZoN?+h_1YWfmh& zq@07!gHK!+_GY<4zHc1ei*A`1D{m&DySiO%UFVd1ypNvw!=-|85dR*b;d`1zE&KYd zL<}-quocT&H}uv#bW9(*CP}@80jFlEzico*7-wJ0kM>k8x$a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#`z^pgmuD60eUy9bmV7dx^Lawj~e3EM<(Wa`0IN=aRjIE z2j&SNYH<{Pl63+obVnFsF52@?=pj_DopsYXf)K<$bLhO)s&DcisL*9B)@YZwb>z8T zZC&N(W0coe?Y5IvZ2o-~*q}^|;)@G>dDzA2`j4R#V8g|23n;&9n|Vf=E-{WJ>z$_r z20WUkn~m(H$70356GmJnM{<2S?*RaoSN~Jrfz->T0EA=y-euGU=v)GH`n9wO6I*(S z(EnXn{Xb~1|8ePb>_54T*yxl0yJuZ_<0j39@MOq95crvrqSJ*J(B15Z%VS16}2 zotF_+w0={ItltLyI*f6 z2@B%{+3~NEE@qOH`%OwN{z%?^GqFTyx~#x zb`XnwJ(cJ#KzGJX^XAkK&Q8V;qGy7j@-&G3Le+RX=bVbPlsWE6HpVRUw56?Z@T{5L zNDPHCy71=TBx(j})4_$){_tu-&9iql&fH>e_`^ohB{*FNVf*R2e=4R-x^o4hq5iEu zhI+Zq@;)cSJ+_Z2<~>_x4q`k; z4Ubt2PBe`{H}D(mVFf0{4=~|$iibrhsmUm#CD!dQ|JuQ-gDWhJv25iBX1V8;P&;(9 z#Oe6BPSw`isx6pQ)36YC?4wqto7L=p{+RB1q7wuk-PQ{x1uR^<`Y&G)=!G{iQ{l@r SVZ=|60Idgl8kK6#BL5$qPIcx0 literal 0 HcmV?d00001 diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedNormal.quantile.png b/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedNormal.quantile.png new file mode 100644 index 0000000000000000000000000000000000000000..071c6740621ee0974c319f924c3c154dc48b3ba5 GIT binary patch literal 6512 zcmbVQc{r49+rP1Ayf3hL?4%Z>3ES6y5yM z#%%iT&E&{j@h;!F?|3Zmk+~mPfMj317X}@jMn3X!Rw>AFbt#eKGN>y!x~J%Fcaq&) zE|=(4S8l^jDw@a<{JugDdGVfuZ%0sBI-0xZ z@uiP^pFk*9c6%ANL#~1Ih>Qu1r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}rlF}{_;f%Iy`5daEW|Iv&6wTS?wLr+Bn z@TbuQ`O|SD0kDw2<-`9+!tgVQERAjKD>3zt(ykY)lRMuk3B^MIxXk~KZ$KvOU+(@N zQ4PrS0q6g8D8}Vv&Bx>a~e6OZz0JPbD4* zxV1EPMd?7mIgq+H2dS9Vz`*IT-Q!32j)QBP$Kkbxn|ySu-JaEyYiDLLsWVM5gMo?uVC9$ z*4i{Z3SKhHUoDj%y!%Nt)y5S|+;ibJO0~<^8ThWdzeC7+X8?xx!7dkl8B2_bmIKX% zW&KB@s$Q?YJAkwy*b|f-&B2M9<$mIbAgS7uV3!yzW_gFw8=&tR1K8(&>*+Db7u&RI rm`z8x2*`l780hqwkNzG6gv%lFn`ruMvS#of5kN~#_fDA#`q6&@bsQUH literal 0 HcmV?d00001 diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedWeibull.quantile.png b/Modelica_Noise 1.0 Beta.1/Resources/Images/Math/Distributions/TruncatedWeibull.quantile.png new file mode 100644 index 0000000000000000000000000000000000000000..7c804d74694d656471c459417abb8910bae94d6d GIT binary patch literal 6887 zcmb_hc{tQx-~QT@P)f>LA=$GHWvib(OIgMegD}KchC;^PqPMapWUuVQ*oQ&G*efCH z7zR^9VNCX&_p9Htzt8(z?;r16*IaX)Ip=&obI#{;-}kvayJe!sew6np008U;`r2jy zKt~4O97mYJ9${#HANawF)VH|@032mck;NSxuP`!6dkWA4*>BCn?<=9B3RVAAOPHqVtKD)h_`wLQ&EoW1F)>9~#vrH1T< zJD12=j)jm@S?y94&YwYGxB=k9&_PB6_}E3dNH!pXfl&s0>~S0bs9dAa0~FxT&PCDZ z^=OOw=RL5_D^$-%*Y=lbVm@X17Hm2@oKCMS!W;z0Ad?rJPmlR?1uZ`E|G37o zKht~BzO%HRV_YwFwxQjb_38F3nF(Ndmd`7DK*K8X&s1l@x?+h55TC(upUfan+ts|r zt4F;ICs$>7|c}r$X2Aw)M6lLiKSRzLK3> z9J-tvFL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e(FnK;W*6B`8(gaejCjKt7RyAg73Kq9>|B@feU0*}zr9C=F1U z?d&PMrG212=!J&{MZUEHS2HFtDF1>-C&=lBA=?z)KhtWL0RV}RXZAkV1hEvWuDqi+ zl~&fR)-7-R96mx1Aag32ycLIVcEl>NkHMCBwPD4pj%kc-QUFEJnysOMf$h%UC#}zPe`vXg+&F#)N{uY zL;Fgv9R1GcP$XUB=6&VJKd3@%?zbwVN6>~bsX54?47&>^2@6_EykZKfR9`7wn9`_l zN;|CL81+x(==XjxGNAkBxyixRMk+0M#&Z8(SOG>m?vlz}EMJ{U2grhtBGtqv~RL``VQS2F!8Lhf$2=!V=_On(^tf49&k@$;n=OF{kNJrooldSFi;a+ ziJyktQ5scUe(zC#b%{Z%rG1PblXbf_t0s#k5N}IX^ydK+$G9EYN%z?EwAOv0_lQh# zu)}t_{S(q6Y-&Q&7R1N;G%9wAhnT3YFlV*?@cY+r+q1 z+%2Njpz9DCqwB>TZTeQdzYs?0D1ylgmUR=8-)Gz47%R<_r~I#4UeT~P7#-XZdlp>H z;3s)NSoURZg#1`$co;A+;&OA#x|1II3_dAuVa2k= z*N=n0b4j-xmOQmqlxuom*kztVS%JY(ik+$=wIyti@{?RdNi&q$l$xS^0nbckTk2in zb#u*dhkePw7KPIxqLut*Yx64vkT= gBGX^((OpgV9n?-(JUkHm7ZPBgW1?O9hvUQl2J~$dVgLXD literal 0 HcmV?d00001 From 03c9593c7a2e60a5da0103be0ca8382833c5d152 Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Fri, 17 Jul 2015 09:41:27 +0200 Subject: [PATCH 10/46] Moved package Math.TruncatedDistributions to Math.Distributions and adapted all documentions and images --- .../Examples/NoiseExamples/Distributions.mo | 4 +- .../NoiseExamples/TruncatedDensities.mo | 4 +- .../Blocks/Noise/GenericNoise.mo | 13 +- .../Blocks/Noise/package.mo | 19 +- .../Math/Distributions/Interfaces/package.mo | 3 +- .../Distributions/Interfaces/package.order | 3 + .../Interfaces/partialTruncatedCumulative.mo} | 8 +- .../Interfaces/partialTruncatedDensity.mo} | 8 +- .../Interfaces/partialTruncatedQuantile.mo} | 8 +- .../Math/Distributions/TruncatedNormal.mo | 372 ++++++++++++++++++ .../Math/Distributions/TruncatedWeibull.mo | 360 +++++++++++++++++ .../Math/Distributions/Weibull/package.mo | 2 - .../Math/Distributions/package.mo | 97 +++++ .../Math/Distributions/package.order | 2 + .../Math/Random/package.mo | 3 - .../Interfaces/package.mo | 32 -- .../Interfaces/package.order | 3 - .../Normal/cumulative.mo | 95 ----- .../TruncatedDistributions/Normal/density.mo | 82 ---- .../TruncatedDistributions/Normal/package.mo | 92 ----- .../Normal/package.order | 3 - .../TruncatedDistributions/Normal/quantile.mo | 103 ----- .../Weibull/cumulative.mo | 93 ----- .../TruncatedDistributions/Weibull/density.mo | 80 ---- .../TruncatedDistributions/Weibull/package.mo | 87 ---- .../Weibull/package.order | 3 - .../Weibull/quantile.mo | 102 ----- .../Math/TruncatedDistributions/package.mo | 122 ------ .../Math/TruncatedDistributions/package.order | 3 - Modelica_Noise 1.0 Beta.1/Math/package.mo | 4 - Modelica_Noise 1.0 Beta.1/Math/package.order | 1 - Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo | 45 ++- 32 files changed, 909 insertions(+), 947 deletions(-) rename Modelica_Noise 1.0 Beta.1/Math/{TruncatedDistributions/Interfaces/partialCumulative.mo => Distributions/Interfaces/partialTruncatedCumulative.mo} (82%) rename Modelica_Noise 1.0 Beta.1/Math/{TruncatedDistributions/Interfaces/partialDensity.mo => Distributions/Interfaces/partialTruncatedDensity.mo} (82%) rename Modelica_Noise 1.0 Beta.1/Math/{TruncatedDistributions/Interfaces/partialQuantile.mo => Distributions/Interfaces/partialTruncatedQuantile.mo} (83%) create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/package.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/package.order delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/cumulative.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/density.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/package.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/package.order delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/quantile.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/cumulative.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/density.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/package.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/package.order delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/quantile.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.order diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo index 5ff77892..1605953e 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo @@ -22,7 +22,7 @@ model Distributions "Demonstrates noise with different types of distributions" fixedLocalSeed=1, samplePeriod=samplePeriod, redeclare function distribution = - Modelica_Noise.Math.TruncatedDistributions.Normal.quantile ( + Modelica_Noise.Math.Distributions.TruncatedNormal.quantile ( y_min=y_min, y_max=y_max)) annotation (Placement(transformation(extent={{-60,30},{-40,50}}))); Noise.GenericNoise weibullNoise( @@ -30,7 +30,7 @@ model Distributions "Demonstrates noise with different types of distributions" fixedLocalSeed=1, samplePeriod=samplePeriod, redeclare function distribution = - Modelica_Noise.Math.TruncatedDistributions.Weibull.quantile ( + Modelica_Noise.Math.Distributions.TruncatedWeibull.quantile ( y_min=0, y_max=y_max, k=1)) annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); annotation (experiment(StopTime=2), Diagram(coordinateSystem( diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo index b418c8c7..45be701b 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo @@ -13,14 +13,14 @@ annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{-46,-10},{-26,10}}))); Statistics.Density truncatedNormalDensity(redeclare function distribution = - Modelica_Noise.Math.TruncatedDistributions.Normal.density ( + Modelica_Noise.Math.Distributions.TruncatedNormal.density ( u_min=-3, u_max=3, mu=0, sigma=2)) annotation (Placement(transformation(extent={{10,-10},{30,10}}))); Statistics.Density truncatedWeibullDensity(redeclare function distribution = - Modelica_Noise.Math.TruncatedDistributions.Weibull.density ( + Modelica_Noise.Math.Distributions.TruncatedWeibull.density ( u_min=0.2, u_max=4, k=1.5, diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo index 19838aae..c9d57ebe 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo @@ -151,17 +151,17 @@ When using this block, at a minimum the following parameters must be defined: Basically, distribution is a replaceable function that provides the quantile (= inverse cumulative distribution function) of a random distribution. For simulation models - truncated distributions + truncated distributions are of special interest, because the returned random values are guaranteed to be in a defined band y_min ... y_max. Often used distributions are:
    -
  • Uniform distribution: +
  • Uniform distribution: The random values are mapped uniformly to the band y_min ... y_max.
  • -
  • Truncated normal distribution: +
  • Truncated normal distribution: The random values have a normal distribution that is truncated to y_min ... y_max. Measurement noise has often this distribution form. - By default, the standard parameters of the normal distribution are derived from + By default, the standard parameters of the truncated normal distribution are derived from y_min ... y_max: mean value = (y_max + y_min)/2, standard deviation = (y_max - y_min)/6 (= 99.7 % of the non-truncated normal distribution are within y_min ... y_max).
  • @@ -246,7 +246,10 @@ the desired situation. For this purpose the following parameters can be defined: This is the default. Note, this means that the noise might change if function randomInteger() is called more or less often in the overall model (e.g. because an additional noise block is - introduced or removed).
    + introduced or removed). It is planned to change the automatic local seed function + in a future version of package Modelica, once Modelica Language 3.3 language elements + can be used (by using a hash value of the instance name of the model that is + inquired with the Modelica Language 3.3 function getInstanceName()).
    If useAutomaticLocalSeed = false, the local seed is defined explicitly by parameter fixedLocalSeed. It is then guaranteed that the generated noise remains always the same (provided the other parameter values are the same). diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo index 9c74cb5e..790b5228 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo @@ -90,7 +90,10 @@ to define reproducible noise with the blocks of this sublibrary: The core of the noise generation is the computation of uniform random numbers in the range 0.0 .. 1.0 (and these random numbers are transformed afterwards, see below). This sublibrary uses the xorshift random number generation -suite developed in 2014 by Sebastiano Vigna. These random number generators have excellent +suite developed in 2014 by Sebastiano Vigna (for details see +http://xorshift.di.unimi.it and +Math.Random.Generators). +These random number generators have excellent statistical properties, produce quickly statistically relevant random numbers, even if starting from a bad initial seed, and have a reasonable length of the internal state vector of 2, 4, and 33 Integer elements. The short length state vectors are especially @@ -105,7 +108,7 @@ also user-defined generators.

    -

    Truncated Distributions

    +

    Distributions

    The uniform random numbers in the range 0.0 .. 1.0 are transformed to a desired @@ -116,7 +119,7 @@ compared with its truncated version:

    - +

    @@ -125,7 +128,7 @@ The corresponding inverse cumulative distribution functions are shown in the nex

    - +

    @@ -133,10 +136,12 @@ When providing an x-value between 0.0 .. 1.0 from a random number generator, the inverse cumulative probability density function of a normal distribution transforms this value into the desired band (in the diagram above to the range: -1.5 .. 1.5). Contrary to a standard distribution, truncated distributions have the advantage that the resulting random values are guaranteed -to be in the defined band (whereas a standard normal distribution might also result in very large values, -say, 1e60, which could be very problematic in a simulation). More details of truncated +to be in the defined band (whereas a standard normal distribution might also result in any value; +when modeling noise that is known to be in a particular range, say ± 0.1 Volt, +then with the TruncatedNormal distribution it is guaranted that random values are only +generated in this band). More details of truncated distributions are given in the documentation of package -Math.TruncatedDistributions. +Math.Distributions. In the blocks of this sublibrary, the desired distribution, truncated disribution or also a user-defined distribution can be selected.

    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.mo index a9461763..4f1aee8f 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.mo @@ -6,7 +6,8 @@ package Interfaces "Library of interfaces for distribution functions" annotation (Documentation(info="

    This package contains partial functions that describe the -common interface arguments of the distribution functions. +common interface arguments of the distribution and +truncated distribution functions.

    ", revisions="

    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.order b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.order index a1738f03..954ea1ee 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.order +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.order @@ -1,3 +1,6 @@ partialDensity partialCumulative partialQuantile +partialTruncatedDensity +partialTruncatedCumulative +partialTruncatedQuantile diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/partialCumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedCumulative.mo similarity index 82% rename from Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/partialCumulative.mo rename to Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedCumulative.mo index 960bf925..31d22852 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/partialCumulative.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedCumulative.mo @@ -1,5 +1,5 @@ -within Modelica_Noise.Math.TruncatedDistributions.Interfaces; -partial function partialCumulative +within Modelica_Noise.Math.Distributions.Interfaces; +partial function partialTruncatedCumulative "Common interface of truncated cumulative distribution functions" extends Distributions.Interfaces.partialCumulative; input Real u_min=0 "Lower limit of u" annotation(Dialog); @@ -7,7 +7,7 @@ partial function partialCumulative annotation (Documentation(info="

    A partial function containing the common -arguments of the cumulative distribution functions. +arguments of the cumulative distribution functions for a truncated distribution.

    ", revisions="

    @@ -30,4 +30,4 @@ arguments of the cumulative distribution functions.

    ")); -end partialCumulative; +end partialTruncatedCumulative; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/partialDensity.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedDensity.mo similarity index 82% rename from Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/partialDensity.mo rename to Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedDensity.mo index c802f156..465b235c 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/partialDensity.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedDensity.mo @@ -1,5 +1,5 @@ -within Modelica_Noise.Math.TruncatedDistributions.Interfaces; -partial function partialDensity +within Modelica_Noise.Math.Distributions.Interfaces; +partial function partialTruncatedDensity "Common interface of truncated probability density functions" extends Distributions.Interfaces.partialDensity; input Real u_min=0 "Lower limit of u" annotation(Dialog); @@ -7,7 +7,7 @@ partial function partialDensity annotation (Documentation(info="

    A partial function containing the common -arguments of the probability density functions. +arguments of the probability density functions of truncated distributions.

    ", revisions="

    @@ -30,4 +30,4 @@ arguments of the probability density functions.

    ")); -end partialDensity; +end partialTruncatedDensity; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/partialQuantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedQuantile.mo similarity index 83% rename from Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/partialQuantile.mo rename to Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedQuantile.mo index 346baf4b..6e234626 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/partialQuantile.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedQuantile.mo @@ -1,5 +1,5 @@ -within Modelica_Noise.Math.TruncatedDistributions.Interfaces; -partial function partialQuantile +within Modelica_Noise.Math.Distributions.Interfaces; +partial function partialTruncatedQuantile "Common interface of truncated quantile functions (= inverse cumulative distribution functions)" extends Distributions.Interfaces.partialQuantile; input Real y_min=0 "Lower limit of y" annotation(Dialog); @@ -7,7 +7,7 @@ partial function partialQuantile annotation (Documentation(info="

    A partial function containing the common -arguments of the quantile functions. +arguments of the quantile functions for truncated distributions.

    ", revisions="

    @@ -30,4 +30,4 @@ arguments of the quantile functions.

    ")); -end partialQuantile; +end partialTruncatedQuantile; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo new file mode 100644 index 00000000..93892fcc --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo @@ -0,0 +1,372 @@ +within Modelica_Noise.Math.Distributions; +package TruncatedNormal "Library of truncated normal distribution functions" + extends Modelica.Icons.Package; + + function density "Density of truncated normal distribution" + import Modelica_Noise.Math.Distributions.Normal; + extends + Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedDensity; + input Real mu= (u_max + u_min)/2 + "Expectation (mean) value of the normal distribution" annotation(Dialog); + input Real sigma=(u_max - u_min)/6 + "Standard deviation of the normal distribution" annotation(Dialog); + protected + Real pdf; + Real cdf_min; + Real cdf_max; + algorithm + if u >= u_min and u <= u_max then + pdf :=Normal.density(u,mu,sigma); + cdf_min :=Normal.cumulative(u_min,mu,sigma); + cdf_max :=Normal.cumulative(u_max,mu,sigma); + y := pdf / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); + else + y := 0; + end if; + annotation (Documentation(info=" +

    Syntax

    +
    +Normal.density(u, u_min=0, u_max=1, mu=0, sigma=1);
    +
    + +

    Description

    +

    +This function computes the probability density function according to a +truncated normal distribution with +minimum value u_min, maximmum value u_max, +mean value of original distribution mu and +standard deviation of original distribution sigma (variance = sigma2). +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the normal distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  density(0.5)                // = 1.041828977196953
    +  density(0.5,-1.5,1.5,1,0.9) // = 0.5365495585520803
    +
    + +

    See also

    +

    +TruncatedNormal.cumulative, +TruncatedNormal.quantile. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); + end density; + + function cumulative + "Cumulative distribution function of truncated normal distribution" + import Modelica_Noise.Math.Distributions.Normal; + extends + Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedCumulative; + input Real mu= (u_max + u_min)/2 + "Expectation (mean) value of the normal distribution" annotation(Dialog); + input Real sigma=(u_max - u_min)/6 + "Standard deviation of the normal distribution" annotation(Dialog); + protected + Real cdf; + Real cdf_min; + Real cdf_max; + algorithm + if u <= u_min then + y := 0; + elseif u < u_max then + cdf :=Normal.cumulative(u, mu, sigma); + cdf_min :=Normal.cumulative(u_min, mu, sigma); + cdf_max :=Normal.cumulative(u_max, mu, sigma); + y := (cdf - cdf_min) / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); + else + y := 1; + end if; + + annotation (Documentation(info=" +

    Syntax

    +
    +Normal.cumulative(u, u_min=0, u_max=1, mu=0, sigma=1);
    +
    + +

    Description

    +

    +This function computes the cumulative distribution function according to a +truncated normal distribution with +minimum value u_min, maximmum value u_max, +mean value of original distribution mu and +standard deviation of original distribution sigma (variance = sigma2). +The returned value y is in the range: +

    + +

    +0 ≤ y ≤ 1 +

    + +

    +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the normal distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  cumulative(0.5)                 // = 0.5
    +  cumulative(0.5,-1.5,1.5,1,0.9)  // = 0.4046868865634537
    +
    + +

    See also

    +

    +TruncatedNormal.density, +TruncatedNormal.quantile. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); + end cumulative; + + function quantile "Quantile of truncated normal distribution" + import Modelica_Noise.Math.Distributions.Normal; + extends + Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedQuantile; + input Real mu= (y_max + y_min)/2 + "Expectation (mean) value of the normal distribution" annotation(Dialog); + input Real sigma=(y_max - y_min)/6 + "Standard deviation of the normal distribution" annotation(Dialog); + protected + Real cdf_min = Normal.cumulative(y_min, mu, sigma); + Real cdf_max = Normal.cumulative(y_max, mu, sigma); + algorithm + y := Normal.quantile(cdf_min + u*(cdf_max-cdf_min), mu=mu, sigma=sigma); + + /* Close to u=0 and u=1, large errors in the numerical computation can + occur. The following statement is a guard to still keep the property + that y is within y_min/y_max + */ + y := min(y_max,max(y_min,y)); + + annotation (smoothOrder = 1,Documentation(info=" +

    +

    Syntax

    +
    +Normal.quantile(u, y_min=0, y_max=1, mu=0, sigma=1);
    +
    + +

    Description

    +

    +This function computes the inverse cumulative distribution function (= quantile) according to a +truncated normal distribution with +minimum value u_min, maximmum value u_max, +mean value of original distribution mu and +standard deviation of original distribution sigma (variance = sigma2). +Input argument u must be in the range: +

    + +
    +

    +0 < u < 1 +

    +
    + +

    +Output argument y is in the range: +

    + + +
    +

    +y_min ≤ y ≤ y_max +

    +
    + +

    +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the normal distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
     
    +  quantile(0.001)           // = 0.001087357613043849;
    +  quantile(0.5,0,1,0.5,0.9) // = 0.5
    +
    + +

    See also

    +

    +TruncatedNormal.density, +TruncatedNormal.cumulative. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); + end quantile; + annotation (Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={1,1}), + graphics={ + Line( + points={{-32,-32},{-32,-80}}, + color={0,0,0}, + smooth=Smooth.None), + Line( + points={{-32,-32},{-28,-21.0617},{-24.5,-7.4388},{-21,8.1682},{ + -17.5,24.9428},{-14,41.695},{-10.5,56.9771},{-7,69.2797},{-3.5, + 77.2739},{0,80.047},{3.5,77.2739},{7,69.2797},{10.5,56.9771},{ + 14,41.695},{17.5,24.9428},{21,8.1682},{24.5,-7.4388},{28, + -21.0617},{31.5,-32.2849},{35,-41.0467}}, + color={0,0,0}, + smooth=Smooth.Bezier), + Line( + points={{34.5,-40.5},{34.5,-78.5}}, + color={0,0,0}, + smooth=Smooth.None), + Line( + points={{34.5,-78.5},{70.5,-78.5}}, + color={0,0,0}, + smooth=Smooth.None), + Line( + points={{-68,-79},{-32,-79}}, + color={0,0,0}, + smooth=Smooth.None)}), + Documentation(info=" +

    +This package provides +

    +
      +
    • probability density function (= derivative of cumulative distribution function),
    • +
    • cumulative distribution function, and
    • +
    • quantile (= inverse cumulative distribution function).
    • +
    +

    +of the truncated normal distribution. Examples: +

    + +

    + +

    + +

    + +

    + +

    + +

    + +

    +For more details
    +of the normal distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +"), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={1,1}))); +end TruncatedNormal; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo new file mode 100644 index 00000000..bed768ba --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo @@ -0,0 +1,360 @@ +within Modelica_Noise.Math.Distributions; +package TruncatedWeibull "Library of truncated Weibull distribution functions" + extends Modelica.Icons.Package; + + function density "Density of truncated Weibull distribution" + import Modelica_Noise.Math.Distributions.Weibull; + extends + Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedDensity; + input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); + input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); + protected + Real pdf; + Real cdf_min; + Real cdf_max; + algorithm + if u >= u_min and u <= u_max then + pdf :=Weibull.density(u, lambda=lambda, k=k); + cdf_min :=Weibull.cumulative(u_min, lambda=lambda, k=k); + cdf_max :=Weibull.cumulative(u_max, lambda=lambda, k=k); + y := pdf / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); + else + y := 0; + end if; + annotation (Documentation(info=" +

    Syntax

    +
    +Weibull.density(u, u_min=0, u_max=1, lambda=1, k=1);
    +
    + +

    Description

    +

    +This function computes the probability density function according to a +truncated Weibull distribution with +minimum value u_min, maximmum value u_max, +scale parameter of original distribution lambda and +shape parameter of original distribution k. +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the Weibull distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  density(0.5)             // = 0.9595173756674719
    +  density(0.5,0,0.8,0.5,2) // = 1.5948036466479143
    +
    + +

    See also

    +

    +TruncatedWeibull.cumulative, +TruncatedWeibull.quantile. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); + end density; + + function cumulative + "Cumulative distribution function of truncated Weibull distribution" + import Modelica_Noise.Math.Distributions.Weibull; + extends + Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedCumulative; + input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); + input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); + protected + Real cdf; + Real cdf_min; + Real cdf_max; + algorithm + if u <= u_min then + y := 0; + elseif u < u_max then + cdf :=Weibull.cumulative(u, lambda=lambda, k=k); + cdf_min :=Weibull.cumulative(u_min, lambda=lambda, k=k); + cdf_max :=Weibull.cumulative(u_max, lambda=lambda, k=k); + y := (cdf - cdf_min) / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); + else + y := 1; + end if; + + annotation (Documentation(info=" +

    Syntax

    +
    +Weibull.cumulative(u, u_min=0, u_max=1, lambda=1, k=1);
    +
    + +

    Description

    +

    +This function computes the cumulative distribution function according to a +truncated Weibull distribution with +minimum value u_min, maximmum value u_max, +scale parameter of original distribution lambda and +shape parameter of original distribution k. +The returned value y is in the range: +

    + +

    +0 ≤ y ≤ 1 +

    + +

    +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the Weibull distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  cumulative(0.5)             // = 0.6224593312018546
    +  cumulative(0.5,0,0.8,0.5,2) // = 0.6850805314988328
    +
    + +

    See also

    +

    +TruncatedWeibull.density, +TruncatedWeibull.quantile. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); + end cumulative; + + function quantile "Quantile of truncated Weibull distribution" + import Modelica_Noise.Math.Distributions.Weibull; + extends + Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedQuantile; + input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); + input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); + protected + Real cdf_min = Weibull.cumulative(y_min, lambda=lambda, k=k) + "Value of cdf at y_min"; + Real cdf_max = Weibull.cumulative(y_max, lambda=lambda, k=k) + "Value of cdf at y_max"; + algorithm + y := Weibull.quantile(cdf_min + u*(cdf_max-cdf_min), lambda=lambda,k=k); + + /* Close to u=1, large errors in the numerical computation can + occur. The following statement is a guard to still keep the property + that y is within y_min .. y_max + */ + y := min(y_max,max(y_min,y)); + + annotation (smoothOrder=1,Documentation(info=" +

    +

    Syntax

    +
    +Weibull.quantile(u, y_min=0, y_max=1, lambda=1, k=1);
    +
    + +

    Description

    +

    +This function computes the inverse cumulative distribution function (= quantile) according to a +truncated Weibull distribution with +minimum value u_min, maximmum value u_max, +scale parameter of original distribution lambda and +shape parameter of original distribution k. +Input argument u must be in the range: +

    + +
    +

    +0 ≤ u ≤ 1 +

    +
    + +

    +Output argument y is in the range: +

    + +
    +

    +y_min ≤ y ≤ y_max +

    +
    + +

    +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the Weibull distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
     
    +  quantile(0.001)           // = 0.0006323204312624211;
    +  quantile(0.5,0,1,0.5,0.9) // = 0.256951787882498
    +
    + +

    See also

    +

    +TruncatedWeibull.density, +TruncatedWeibull.cumulative. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); + end quantile; + annotation (Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={1,1}), + graphics={Line( + points={{-72,-62},{-68.5,-62},{-65,-62},{-61.5,-62},{-58,-62},{ + -54.5,-62},{-51,-62},{-47.5,-62},{-44,-62},{-40.5,-62},{-37,-62}, + {-33.5,-62},{-30,-62},{-26.5,-62},{-23,-62},{-19.5,-62},{-16, + -62},{-12.5,-62},{-9,-62},{-5.5,-62},{-2,-62},{1.5,41.1424},{5, + 69.1658},{8.5,78},{12,75.3585},{15.5,65.6645},{19,52.0082},{ + 22.5,36.6157},{26,21.0458},{29.5,6.3239},{33,-6.9424},{36.5, + -18.4596},{40,-28.1579},{43.5,-36.1153}}, + color={0,0,0}, + smooth=Smooth.Bezier), + Line( + points={{43.5,-36},{43.5,-63}}, + color={0,0,0}, + smooth=Smooth.None), + Line( + points={{43.5,-63},{79.5,-63}}, + color={0,0,0}, + smooth=Smooth.None)}), + Documentation(info=" +

    +This package provides +

    +
      +
    • probability density function (= derivative of cumulative distribution function),
    • +
    • cumulative distribution function, and
    • +
    • quantile (= inverse cumulative distribution function).
    • +
    +

    +of the truncated Weibull distribution. Examples: +

    + +

    + +

    + +

    + +

    + +

    + +

    + +

    +For more details
    +of the Weibull distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +"), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={1,1}))); +end TruncatedWeibull; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/package.mo index c5eb2b95..9d759be8 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/package.mo @@ -3,8 +3,6 @@ package Weibull "Library of Weibull distribution functions" extends Modelica.Icons.Package; - - annotation (Icon(graphics={Line( points={{-72,-60},{-68.5,-60},{-65,-60},{-61.5,-60},{-58,-60},{-54.5,-60},{-51,-60},{-47.5, -60},{-44,-60},{-40.5,-60},{-37,-60},{-33.5,-60},{-30,-60},{-26.5,-60},{-23,-60},{-19.5, diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo index b01416a3..ffc354f0 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo @@ -31,6 +31,103 @@ This package provides

    of different distributions.

    + +

    +In particular also truncated distributions are provided (see below). +The main reason to introduce +truncated distributions is to make the modeling of measurement noise easier, in order to +limit the band in which the noise can occur. For example, if a sensor is used and the +sensor signal has a noise of ± 0.1 Volt (e.g. this can be determined by using a reference +value of 0 V and inspecting the measured signal), then the sensor signal will be often the input +to an Analog-Digital converter and this converter limits the signal, say to ± 5 Volt. +Typically, the user would like to model noise within the noise band (say ± 0.1 Volt), +and often uses a normal distribution. But a normal distribution is not limited and +for a small sample time and a long simulation there might be some sample time instants +where the noise values of the normal signal is outside the ± 0.1 Volt range. +For some sensor types this is completely unrealistic (e.g. an angle sensor might +measure ± 0.1 rad, but the sensor will never add, say one revolution (6.28 rad) to it. +However, the noise model with a pure normal distribution could give such a value. +If a modeler would like to guarantee (and not to hope), that the modeled noise is +always between ± 0.1 Volt, then there are two main possibilities: (a) The noise is computed +and the result is then limited to ± 0.1 Volt, or (b) the normal distribution is slightly modified, +so that it is within the band of ± 0.1 Volt. Approach (a) is a brute force method that +changes the statistical properties of the signal in an unknown way. Approach (b) +is a \"clean\" mathematical description. The blocks in package +Blocks.Noise +give the user the freedom to choose: Either compute a normal (unlimited) noise, or +a truncated normal noise (truncated distribution). +

    + +

    +Details of truncated distributions +

    + +

    +Truncated distributions are distributions that are transformed in such a way that +either the input is within a band u_min .. u_max, or the output is within +a band y_min .. y_max. +A truncated distribution is derived from a base +distribution (e.g. from the normal distribution), by truncating its +propability density function to the desired band and adding a constant +value over this band, in order that the integral over the truncated distribution +remains one. All other properties (such as cumulative distribution function) can then be determined +in a straightforward way, provided the properties of the underlying base distribution +are available. +More details can be found, for example, in +Wikipedia +(the equations from the \"Truncated Distribution\" box in the right part +of this Wikipedia article are used for this package). +

    + +

    +When using random numbers according to a given truncated distribution, +the output of the inverse cumulative distribution function (= quantile) is restricted +to the defined band. +

    + +

    +The truncated distribution functions are derived from the underlying distribution +functions in the following way: +

    + +
    +
    +// Original distributions
    +    pdf = Distributions.XXX.density(u,..);
    +    cdf = Distributions.XXX.cumulative(u,...);
    +cdf_min = Distributions.XXX.cumulative(u_min,...);
    +cdf_max = Distributions.XXX.cumulative(u_max,...);
    +
    +// Truncated distributions
    +
    + + + + + + + + + + + + + +
    FunctionTransformation
    density(u,u_min,u_max,...)= if u ≥ u_min and u≤u_max then pdf / (cdf_max - cdf_min) else 0
    cumulative(u,u_min,u_max,...)= if u ≤ u_min then 0 + else if u < u_max then + (cdf - cdf_min))/(cdf_max - cdf_min) + else 1
    quantile(u,u_min,u_max,...)= Distributions.XXX.quantile( cdf_min + u*(cdf_max - cdf_min), ... )
    +
    + +

    +For an example of a truncated distribution, see the following +plot of the probabibilty density function of a normal distribution +compared with its truncated distribution: +

    + +

    + +

    ", revisions="

    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.order b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.order index 31b6f5c3..f01fe97d 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.order +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.order @@ -1,4 +1,6 @@ Uniform Normal +TruncatedNormal Weibull +TruncatedWeibull Interfaces diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/package.mo index 5390d6a1..afced108 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/package.mo @@ -3,9 +3,6 @@ package Random "Library of functions for generating random numbers" extends Modelica.Icons.Package; - - - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={ Ellipse( diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/package.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/package.mo deleted file mode 100644 index ea50cee8..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/package.mo +++ /dev/null @@ -1,32 +0,0 @@ -within Modelica_Noise.Math.TruncatedDistributions; -package Interfaces "Library of interfaces for truncated distribution functions" - extends Modelica.Icons.InterfacesPackage; - - - annotation (Documentation(info=" -

    -This package contains partial functions that describe the -common interface arguments of the truncated distribution functions. -

    -", revisions=" -

    -

    - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end Interfaces; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/package.order b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/package.order deleted file mode 100644 index a1738f03..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Interfaces/package.order +++ /dev/null @@ -1,3 +0,0 @@ -partialDensity -partialCumulative -partialQuantile diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/cumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/cumulative.mo deleted file mode 100644 index e00a6092..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/cumulative.mo +++ /dev/null @@ -1,95 +0,0 @@ -within Modelica_Noise.Math.TruncatedDistributions.Normal; -function cumulative - "Cumulative distribution function of truncated normal distribution" - import Modelica_Noise.Math.Distributions.Normal; - extends - Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialCumulative; - input Real mu= (u_max + u_min)/2 - "Expectation (mean) value of the normal distribution" annotation(Dialog); - input Real sigma=(u_max - u_min)/6 - "Standard deviation of the normal distribution" annotation(Dialog); -protected - Real cdf; - Real cdf_min; - Real cdf_max; -algorithm - if u <= u_min then - y := 0; - elseif u < u_max then - cdf :=Normal.cumulative(u, mu, sigma); - cdf_min :=Normal.cumulative(u_min, mu, sigma); - cdf_max :=Normal.cumulative(u_max, mu, sigma); - y := (cdf - cdf_min) / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); - else - y := 1; - end if; - - annotation (Documentation(info=" -

    Syntax

    -
    -Normal.cumulative(u, u_min=0, u_max=1, mu=0, sigma=1);
    -
    - -

    Description

    -

    -This function computes the cumulative distribution function according to a -truncated normal distribution with -minimum value u_min, maximmum value u_max, -mean value of original distribution mu and -standard deviation of original distribution sigma (variance = sigma2). -The returned value y is in the range: -

    - -

    -0 ≤ y ≤ 1 -

    - -

    -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the normal distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  cumulative(0.5)                 // = 0.5
    -  cumulative(0.5,-1.5,1.5,1,0.9)  // = 0.4046868865634537
    -
    - -

    See also

    -

    -Normal.density, -Normal.quantile. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end cumulative; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/density.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/density.mo deleted file mode 100644 index dc064632..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/density.mo +++ /dev/null @@ -1,82 +0,0 @@ -within Modelica_Noise.Math.TruncatedDistributions.Normal; -function density "Density of truncated normal distribution" - import Modelica_Noise.Math.Distributions.Normal; - extends Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialDensity; - input Real mu= (u_max + u_min)/2 - "Expectation (mean) value of the normal distribution" annotation(Dialog); - input Real sigma=(u_max - u_min)/6 - "Standard deviation of the normal distribution" annotation(Dialog); -protected - Real pdf; - Real cdf_min; - Real cdf_max; -algorithm - if u >= u_min and u <= u_max then - pdf :=Normal.density(u,mu,sigma); - cdf_min :=Normal.cumulative(u_min,mu,sigma); - cdf_max :=Normal.cumulative(u_max,mu,sigma); - y := pdf / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); - else - y := 0; - end if; - annotation (Documentation(info=" -

    Syntax

    -
    -Normal.density(u, u_min=0, u_max=1, mu=0, sigma=1);
    -
    - -

    Description

    -

    -This function computes the probability density function according to a -truncated normal distribution with -minimum value u_min, maximmum value u_max, -mean value of original distribution mu and -standard deviation of original distribution sigma (variance = sigma2). -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the normal distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  density(0.5)                // = 1.041828977196953
    -  density(0.5,-1.5,1.5,1,0.9) // = 0.5365495585520803
    -
    - -

    See also

    -

    -Normal.cumulative, -Normal.quantile. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end density; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/package.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/package.mo deleted file mode 100644 index 5dfdd3fb..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/package.mo +++ /dev/null @@ -1,92 +0,0 @@ -within Modelica_Noise.Math.TruncatedDistributions; -package Normal "Library of truncated normal distribution functions" - extends Modelica.Icons.Package; - - - annotation (Icon(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1}), - graphics={ - Line( - points={{-32,-32},{-32,-80}}, - color={0,0,0}, - smooth=Smooth.None), - Line( - points={{-32,-32},{-28,-21.0617},{-24.5,-7.4388},{-21,8.1682},{ - -17.5,24.9428},{-14,41.695},{-10.5,56.9771},{-7,69.2797},{-3.5, - 77.2739},{0,80.047},{3.5,77.2739},{7,69.2797},{10.5,56.9771},{ - 14,41.695},{17.5,24.9428},{21,8.1682},{24.5,-7.4388},{28, - -21.0617},{31.5,-32.2849},{35,-41.0467}}, - color={0,0,0}, - smooth=Smooth.Bezier), - Line( - points={{34.5,-40.5},{34.5,-78.5}}, - color={0,0,0}, - smooth=Smooth.None), - Line( - points={{34.5,-78.5},{70.5,-78.5}}, - color={0,0,0}, - smooth=Smooth.None), - Line( - points={{-68,-79},{-32,-79}}, - color={0,0,0}, - smooth=Smooth.None)}), - Documentation(info=" -

    -This package provides -

    -
      -
    • probability density function (= derivative of cumulative distribution function),
    • -
    • cumulative distribution function, and
    • -
    • quantile (= inverse cumulative distribution function).
    • -
    -

    -of the truncated normal distribution. Examples: -

    - -

    - -

    - -

    - -

    - -

    - -

    - -

    -For more details
    -of the normal distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -"), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1}))); -end Normal; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/package.order b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/package.order deleted file mode 100644 index ddc9fbd9..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/package.order +++ /dev/null @@ -1,3 +0,0 @@ -density -cumulative -quantile diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/quantile.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/quantile.mo deleted file mode 100644 index 1e88f4e8..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Normal/quantile.mo +++ /dev/null @@ -1,103 +0,0 @@ -within Modelica_Noise.Math.TruncatedDistributions.Normal; -function quantile "Quantile of truncated normal distribution" - import Modelica_Noise.Math.Distributions.Normal; - extends Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialQuantile; - input Real mu= (y_max + y_min)/2 - "Expectation (mean) value of the normal distribution" annotation(Dialog); - input Real sigma=(y_max - y_min)/6 - "Standard deviation of the normal distribution" annotation(Dialog); -protected - Real cdf_min = Normal.cumulative(y_min, mu, sigma); - Real cdf_max = Normal.cumulative(y_max, mu, sigma); -algorithm - y := Normal.quantile(cdf_min + u*(cdf_max-cdf_min), mu=mu, sigma=sigma); - - /* Close to u=0 and u=1, large errors in the numerical computation can - occur. The following statement is a guard to still keep the property - that y is within y_min/y_max - */ - y := min(y_max,max(y_min,y)); - - annotation (smoothOrder = 1,Documentation(info=" -

    -

    Syntax

    -
    -Normal.quantile(u, y_min=0, y_max=1, mu=0, sigma=1);
    -
    - -

    Description

    -

    -This function computes the inverse cumulative distribution function (= quantile) according to a -truncated normal distribution with -minimum value u_min, maximmum value u_max, -mean value of original distribution mu and -standard deviation of original distribution sigma (variance = sigma2). -Input argument u must be in the range: -

    - -
    -

    -0 < u < 1 -

    -
    - -

    -Output argument y is in the range: -

    - - -
    -

    -y_min ≤ y ≤ y_max -

    -
    - -

    -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the normal distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
     
    -  quantile(0.001)           // = 0.001087357613043849;
    -  quantile(0.5,0,1,0.5,0.9) // = 0.5
    -
    - -

    See also

    -

    -Normal.density, -Normal.cumulative. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end quantile; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/cumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/cumulative.mo deleted file mode 100644 index 791d1f30..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/cumulative.mo +++ /dev/null @@ -1,93 +0,0 @@ -within Modelica_Noise.Math.TruncatedDistributions.Weibull; -function cumulative - "Cumulative distribution function of truncated Weibull distribution" - import Modelica_Noise.Math.Distributions.Weibull; - extends - Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialCumulative; - input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); - input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); -protected - Real cdf; - Real cdf_min; - Real cdf_max; -algorithm - if u <= u_min then - y := 0; - elseif u < u_max then - cdf :=Weibull.cumulative(u, lambda=lambda, k=k); - cdf_min :=Weibull.cumulative(u_min, lambda=lambda, k=k); - cdf_max :=Weibull.cumulative(u_max, lambda=lambda, k=k); - y := (cdf - cdf_min) / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); - else - y := 1; - end if; - - annotation (Documentation(info=" -

    Syntax

    -
    -Weibull.cumulative(u, u_min=0, u_max=1, lambda=1, k=1);
    -
    - -

    Description

    -

    -This function computes the cumulative distribution function according to a -truncated Weibull distribution with -minimum value u_min, maximmum value u_max, -scale parameter of original distribution lambda and -shape parameter of original distribution k. -The returned value y is in the range: -

    - -

    -0 ≤ y ≤ 1 -

    - -

    -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the Weibull distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  cumulative(0.5)             // = 0.6224593312018546
    -  cumulative(0.5,0,0.8,0.5,2) // = 0.6850805314988328
    -
    - -

    See also

    -

    -Weibull.density, -Weibull.quantile. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end cumulative; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/density.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/density.mo deleted file mode 100644 index 3f439616..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/density.mo +++ /dev/null @@ -1,80 +0,0 @@ -within Modelica_Noise.Math.TruncatedDistributions.Weibull; -function density "Density of truncated Weibull distribution" - import Modelica_Noise.Math.Distributions.Weibull; - extends Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialDensity; - input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); - input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); -protected - Real pdf; - Real cdf_min; - Real cdf_max; -algorithm - if u >= u_min and u <= u_max then - pdf :=Weibull.density(u, lambda=lambda, k=k); - cdf_min :=Weibull.cumulative(u_min, lambda=lambda, k=k); - cdf_max :=Weibull.cumulative(u_max, lambda=lambda, k=k); - y := pdf / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); - else - y := 0; - end if; - annotation (Documentation(info=" -

    Syntax

    -
    -Weibull.density(u, u_min=0, u_max=1, lambda=1, k=1);
    -
    - -

    Description

    -

    -This function computes the probability density function according to a -truncated Weibull distribution with -minimum value u_min, maximmum value u_max, -scale parameter of original distribution lambda and -shape parameter of original distribution k. -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the Weibull distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  density(0.5)             // = 0.9595173756674719
    -  density(0.5,0,0.8,0.5,2) // = 1.5948036466479143
    -
    - -

    See also

    -

    -Weibull.cumulative, -Weibull.quantile. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end density; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/package.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/package.mo deleted file mode 100644 index 6852f7f2..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/package.mo +++ /dev/null @@ -1,87 +0,0 @@ -within Modelica_Noise.Math.TruncatedDistributions; -package Weibull "Library of truncated Weibull distribution functions" - extends Modelica.Icons.Package; - - - - - annotation (Icon(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1}), - graphics={Line( - points={{-72,-62},{-68.5,-62},{-65,-62},{-61.5,-62},{-58,-62},{ - -54.5,-62},{-51,-62},{-47.5,-62},{-44,-62},{-40.5,-62},{-37,-62}, - {-33.5,-62},{-30,-62},{-26.5,-62},{-23,-62},{-19.5,-62},{-16, - -62},{-12.5,-62},{-9,-62},{-5.5,-62},{-2,-62},{1.5,41.1424},{5, - 69.1658},{8.5,78},{12,75.3585},{15.5,65.6645},{19,52.0082},{ - 22.5,36.6157},{26,21.0458},{29.5,6.3239},{33,-6.9424},{36.5, - -18.4596},{40,-28.1579},{43.5,-36.1153}}, - color={0,0,0}, - smooth=Smooth.Bezier), - Line( - points={{43.5,-36},{43.5,-63}}, - color={0,0,0}, - smooth=Smooth.None), - Line( - points={{43.5,-63},{79.5,-63}}, - color={0,0,0}, - smooth=Smooth.None)}), - Documentation(info=" -

    -This package provides -

    -
      -
    • probability density function (= derivative of cumulative distribution function),
    • -
    • cumulative distribution function, and
    • -
    • quantile (= inverse cumulative distribution function).
    • -
    -

    -of the truncated Weibull distribution. Examples: -

    - -

    - -

    - -

    - -

    - -

    - -

    - -

    -For more details
    -of the Weibull distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -"), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1}))); -end Weibull; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/package.order b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/package.order deleted file mode 100644 index ddc9fbd9..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/package.order +++ /dev/null @@ -1,3 +0,0 @@ -density -cumulative -quantile diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/quantile.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/quantile.mo deleted file mode 100644 index 7840b75e..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/Weibull/quantile.mo +++ /dev/null @@ -1,102 +0,0 @@ -within Modelica_Noise.Math.TruncatedDistributions.Weibull; -function quantile "Quantile of truncated Weibull distribution" - import Modelica_Noise.Math.Distributions.Weibull; - extends Modelica_Noise.Math.TruncatedDistributions.Interfaces.partialQuantile; - input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); - input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); -protected - Real cdf_min = Weibull.cumulative(y_min, lambda=lambda, k=k) - "Value of cdf at y_min"; - Real cdf_max = Weibull.cumulative(y_max, lambda=lambda, k=k) - "Value of cdf at y_max"; -algorithm - y := Weibull.quantile(cdf_min + u*(cdf_max-cdf_min), lambda=lambda,k=k); - - /* Close to u=1, large errors in the numerical computation can - occur. The following statement is a guard to still keep the property - that y is within y_min .. y_max - */ - y := min(y_max,max(y_min,y)); - - annotation (smoothOrder=1,Documentation(info=" -

    -

    Syntax

    -
    -Weibull.quantile(u, y_min=0, y_max=1, lambda=1, k=1);
    -
    - -

    Description

    -

    -This function computes the inverse cumulative distribution function (= quantile) according to a -truncated Weibull distribution with -minimum value u_min, maximmum value u_max, -scale parameter of original distribution lambda and -shape parameter of original distribution k. -Input argument u must be in the range: -

    - -
    -

    -0 ≤ u ≤ 1 -

    -
    - -

    -Output argument y is in the range: -

    - -
    -

    -y_min ≤ y ≤ y_max -

    -
    - -

    -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the Weibull distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
     
    -  quantile(0.001)           // = 0.0006323204312624211;
    -  quantile(0.5,0,1,0.5,0.9) // = 0.256951787882498
    -
    - -

    See also

    -

    -Weibull.density, -Weibull.cumulative. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end quantile; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.mo b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.mo deleted file mode 100644 index 0d39b858..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.mo +++ /dev/null @@ -1,122 +0,0 @@ -within Modelica_Noise.Math; -package TruncatedDistributions "Library of truncated distribution functions" - extends Modelica.Icons.Package; - - - annotation ( - Icon(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1}), graphics={ - Line( - points={{-32,-38},{-28,-27.0617},{-24.5,-13.4388},{-21,2.1682},{-17.5, - 18.9428},{-14,35.695},{-10.5,50.9771},{-7,63.2797},{-3.5,71.2739}, - {0,74.047},{3.5,71.2739},{7,63.2797},{10.5,50.9771},{14,35.695},{ - 17.5,18.9428},{21,2.1682},{24.5,-13.4388},{28,-27.0617},{31.5, - -38.2849},{35,-47.0467}}, - color={0,0,0}, - smooth=Smooth.Bezier), - Line( - points={{-32,-38},{-32,-86}}, - color={0,0,0}, - smooth=Smooth.None), - Line( - points={{35,-46.5},{35,-84.5}}, - color={0,0,0}, - smooth=Smooth.None)}), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1})), - Documentation(info=" -

    -Truncated distributions are distributions that are transformed in such a way that -either the input is within a band u_min .. u_max, or the output is within -a band y_min .. y_max. -A truncated distribution is derived from a base -distribution (e.g. from the normal distribution), by truncating its -propability density function to the desired band and adding a constant -value over this band, in order that the integral over the truncated distribution -remains one. All other properties (such as cumulative distribution function) can then be determined -in a straightforward way, provided the properties of the underlying base distribution -are available. -More details can be found, for example, in -Wikipedia. -

    - -

    -When using random numbers according to a given truncated distribution, -the output of the inverse cumulative distribution function (= quantile) is restricted -to the defined band. This is important for simulations, where a simulation engine -might have difficulties to cope with very large values (say 1e60) that might -be returned by a quantile of a non-truncated distribution -(such as from a normal distribution), although the -probability is very low that this situation occurs. - -

    - -

    -The truncated distribution functions are derived from the underlying distribution -functions in the following way: -

    - -
    -
    -// Original distributions
    -    pdf = Distributions.XXX.density(u,..);
    -    cdf = Distributions.XXX.cumulative(u,...);
    -cdf_min = Distributions.XXX.cumulative(u_min,...);
    -cdf_max = Distributions.XXX.cumulative(u_max,...);
    -
    -// Truncated distributions
    -
    - - - - - - - - - - - - - -
    FunctionTransformation
    density(u,u_min,u_max,...)= if u ≥ u_min and u≤u_max then pdf / (cdf_max - cdf_min) else 0
    cumulative(u,u_min,u_max,...)= if u ≤ u_min then 0 - else if u < u_max then - (cdf - cdf_min))/(cdf_max - cdf_min) - else 1
    quantile(u,u_min,u_max,...)= Distributions.XXX.quantile( cdf_min + u*(cdf_max - cdf_min), ... )
    -
    - -

    -For an example of a truncated distribution, see the following -plot of the probabibilty density function of a normal distribution -compared with its truncated distribution: -

    - -

    - -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end TruncatedDistributions; diff --git a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.order b/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.order deleted file mode 100644 index 8a677e32..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/TruncatedDistributions/package.order +++ /dev/null @@ -1,3 +0,0 @@ -Normal -Weibull -Interfaces diff --git a/Modelica_Noise 1.0 Beta.1/Math/package.mo b/Modelica_Noise 1.0 Beta.1/Math/package.mo index 5333f6b6..fe173999 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/package.mo @@ -1,8 +1,4 @@ within Modelica_Noise; package Math "Additions to Math package of MSL" - - - - end Math; diff --git a/Modelica_Noise 1.0 Beta.1/Math/package.order b/Modelica_Noise 1.0 Beta.1/Math/package.order index 1cd67a55..adc26e93 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/package.order +++ b/Modelica_Noise 1.0 Beta.1/Math/package.order @@ -1,4 +1,3 @@ Random Special Distributions -TruncatedDistributions diff --git a/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo b/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo index 1b2d48a2..2f60b155 100644 --- a/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo +++ b/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo @@ -252,6 +252,7 @@ package ToModelicaTest "Functions to be included in package ModelicaTest" function truncatedDistributions "Test Math.TruncatedDistributions" import Modelica.Utilities.Streams.print; import Modelica_Noise.Math.TruncatedDistributions; + import Modelica_Noise; input Integer nPoints = 1000; input Real erfRange = 3.0; protected @@ -267,29 +268,57 @@ package ToModelicaTest "Functions to be included in package ModelicaTest" print("\n... Check Math.TruncatedDistributions"); // check Normal - y1 := TruncatedDistributions.Normal.density(u,u_min=-1.5,u_max=1.5); - y2 := TruncatedDistributions.Normal.cumulative(u,u_min=-1.5,u_max=1.5); + y1 :=Modelica_Noise.Math.Distributions.TruncatedNormal.density( + u, + u_min=-1.5, + u_max=1.5); + y2 :=Modelica_Noise.Math.Distributions.TruncatedNormal.cumulative( + u, + u_min=-1.5, + u_max=1.5); y3 := Internal.derTwoSided(u,y2); err := max(abs(y1 - y3)); print("Normal.density: err = " + String(err)); assert( err < 0.2, "Normal.density not correctly computed"); - y1 := TruncatedDistributions.Normal.quantile(u1,y_min=-1.5,y_max=1.5); - u2 := TruncatedDistributions.Normal.cumulative(y1,u_min=-1.5,u_max=1.5); + y1 :=Modelica_Noise.Math.Distributions.TruncatedNormal.quantile( + u1, + y_min=-1.5, + y_max=1.5); + u2 :=Modelica_Noise.Math.Distributions.TruncatedNormal.cumulative( + y1, + u_min=-1.5, + u_max=1.5); err :=max(abs(u1 - u2)); print("Normal.cumulative/.quantile: err = " + String(err)); assert( err < 1e-14, "Normal.cumulative or .quantile not correctly computed"); // check Weibull - y1 := TruncatedDistributions.Weibull.density(u,u_max=0.8, lambda=0.5, k=2); - y2 := TruncatedDistributions.Weibull.cumulative(u,u_max=0.8, lambda=0.5, k=2); + y1 :=Modelica_Noise.Math.Distributions.TruncatedWeibull.density( + u, + u_max=0.8, + lambda=0.5, + k=2); + y2 :=Modelica_Noise.Math.Distributions.TruncatedWeibull.cumulative( + u, + u_max=0.8, + lambda=0.5, + k=2); y3 := Internal.derTwoSided(u,y2); err := max(abs(y1 - y3)); print("Weibull.density: err = " + String(err)); assert( err < 0.2, "Weibull.density not correctly computed"); - y1 := TruncatedDistributions.Weibull.quantile(u1,y_max=0.8, lambda=0.5, k=2); - u2 := TruncatedDistributions.Weibull.cumulative(y1,u_max=0.8, lambda=0.5, k=2); + y1 :=Modelica_Noise.Math.Distributions.TruncatedWeibull.quantile( + u1, + y_max=0.8, + lambda=0.5, + k=2); + u2 :=Modelica_Noise.Math.Distributions.TruncatedWeibull.cumulative( + y1, + u_max=0.8, + lambda=0.5, + k=2); err :=max(abs(u1 - u2)); print("Weibull.cumulative/.quantile: err = " + String(err)); assert( err < 1e-14, "Weibull.cumulative or .quantile not correctly computed"); From d29649c3588ace6407abc1169b33b2848b48c2d6 Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Fri, 17 Jul 2015 09:49:10 +0200 Subject: [PATCH 11/46] Added a test function for hashString --- Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo b/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo index 2f60b155..e4750ec2 100644 --- a/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo +++ b/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo @@ -661,4 +661,21 @@ For more details of this distribution see end Internal; end Math; + package Strings + function hashString + "Check function Strings.hashString to compute a hash value from a string" + import Modelica.Utilities.Streams.print; + + protected + Integer hash1; + Integer hash2; + algorithm + print("\n... Demonstrate how to compute a hash value from a string:"); + hash1 :=Modelica_Noise.Utilities.Strings.hashString("this is a test"); + hash2 :=Modelica_Noise.Utilities.Strings.hashString("Controller.noise1"); + print(" hash1 = " + String(hash1) + "\n" + + " hash2 = " + String(hash2)); + + end hashString; + end Strings; end ToModelicaTest; From 6932cc5d840f7b9ec969b2436120d9f08f732a54 Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Fri, 17 Jul 2015 10:00:31 +0200 Subject: [PATCH 12/46] Renamed package Blocks.Statistics to Blocks.Math (so moving the blocks from Statistics to Math). Moving the previous Blocks.Statistics.Density to Blocks.Examples.Noise.Utilities. --- .../Examples/NoiseExamples/Densities.mo | 19 +- .../NoiseExamples/TruncatedDensities.mo | 11 +- .../NoiseExamples/UniformNoiseProperties.mo | 10 +- .../NoiseExamples/Utilities/Density.mo | 106 ++++++ .../NoiseExamples/Utilities/package.order | 1 + .../Blocks/Examples/NoiseExamples/package.mo | 11 - Modelica_Noise 1.0 Beta.1/Blocks/Math.mo | 334 ++++++++++++++++++ .../Blocks/Statistics/package.mo | 42 --- Modelica_Noise 1.0 Beta.1/Blocks/package.mo | 3 - .../Blocks/package.order | 2 +- .../Utilities/package.mo | 2 - Modelica_Noise 1.0 Beta.1/package.mo | 3 - 12 files changed, 460 insertions(+), 84 deletions(-) create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Math.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Statistics/package.mo diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo index 5655ed8d..3e76b5e7 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo @@ -3,23 +3,21 @@ model Densities "Demonstrates how to compute distribution densities (= Probability Density Function)" extends Modelica.Icons.Example; - Statistics.Density uniformDensity(redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.density ( - u_min=-4, - u_max=4)) -annotation (Placement(transformation(extent={{10,20},{30,40}}))); + Utilities.Density uniformDensity(redeclare function distribution = + Modelica_Noise.Math.Distributions.Uniform.density (u_min=-4, u_max=4)) + annotation (Placement(transformation(extent={{10,20},{30,40}}))); Modelica.Blocks.Sources.Clock clock annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); Modelica.Blocks.Sources.Constant const(k=-10) annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{-46,-10},{-26,10}}))); - Statistics.Density normalDensity(redeclare function distribution = + Utilities.Density normalDensity(redeclare function distribution = Modelica_Noise.Math.Distributions.Normal.density (mu=0, sigma=2)) -annotation (Placement(transformation(extent={{10,-10},{30,10}}))); - Statistics.Density weibullDensity(redeclare function distribution = + annotation (Placement(transformation(extent={{10,-10},{30,10}}))); + Utilities.Density weibullDensity(redeclare function distribution = Modelica_Noise.Math.Distributions.Weibull.density (k=1.5, lambda=3)) -annotation (Placement(transformation(extent={{10,-40},{30,-20}}))); + annotation (Placement(transformation(extent={{10,-40},{30,-20}}))); equation connect(clock.y, add.u1) annotation (Line( points={{-59,20},{-53.5,20},{-53.5,6},{-48,6}}, @@ -47,8 +45,7 @@ equation Documentation(info="

    This example demonstrates how to compute the probability density functions (pdfs) of -various distributions, by using the block -Blocks.Statistics.Density. +various distributions. In the following diagram simulations results for the uniform, normal, and Weibull distribution are shown. The outputs of the blocks are the pdfs that are plotted over one of the inputs: diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo index 45be701b..2e781c11 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo @@ -3,23 +3,23 @@ model TruncatedDensities "Demonstrates how to compute truncated probability density functions" extends Modelica.Icons.Example; - Statistics.Density uniformDensity(redeclare function distribution = + Utilities.Density uniformDensity(redeclare function distribution = Modelica_Noise.Math.Distributions.Uniform.density (u_min=-4, u_max=5)) -annotation (Placement(transformation(extent={{10,20},{30,40}}))); + annotation (Placement(transformation(extent={{10,20},{30,40}}))); Modelica.Blocks.Sources.Clock clock annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); Modelica.Blocks.Sources.Constant const(k=-6) annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{-46,-10},{-26,10}}))); - Statistics.Density truncatedNormalDensity(redeclare function distribution = + Utilities.Density truncatedNormalDensity(redeclare function distribution = Modelica_Noise.Math.Distributions.TruncatedNormal.density ( u_min=-3, u_max=3, mu=0, sigma=2)) annotation (Placement(transformation(extent={{10,-10},{30,10}}))); - Statistics.Density truncatedWeibullDensity(redeclare function distribution = + Utilities.Density truncatedWeibullDensity(redeclare function distribution = Modelica_Noise.Math.Distributions.TruncatedWeibull.density ( u_min=0.2, u_max=4, @@ -53,8 +53,7 @@ equation Documentation(info="

    This example demonstrates how to compute the probability density functions (pdfs) of -various truncated distributions, by using the block -Blocks.Statistics.Density. +various truncated distributions. In the following diagram simulations results for the uniform, truncated normal, and truncated Weibull distribution are shown. The outputs of the blocks are the pdfs that are plotted over one of the inputs: diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo index 828ae45b..86992a72 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo @@ -18,10 +18,10 @@ model UniformNoiseProperties y_max), useAutomaticLocalSeed=false) annotation (Placement(transformation(extent={{-80,60},{-60,80}}))); - Statistics.ContinuousMean mean + Math.ContinuousMean mean annotation (Placement(transformation(extent={{-40,60},{-20,80}}))); - Statistics.Variance variance -annotation (Placement(transformation(extent={{-40,0},{-20,20}}))); + Math.Variance variance + annotation (Placement(transformation(extent={{-40,0},{-20,20}}))); Modelica.Blocks.Math.MultiProduct theoreticalVariance(nu=2) annotation (Placement(transformation(extent={{28,-36},{40,-24}}))); Modelica.Blocks.Math.Feedback meanError @@ -32,8 +32,8 @@ annotation (Placement(transformation(extent={{-40,0},{-20,20}}))); annotation (Placement(transformation(extent={{40,0},{60,20}}))); Modelica.Blocks.Sources.Constant theoreticalSigma(k=std) annotation (Placement(transformation(extent={{-10,-40},{10,-20}}))); - Statistics.StandardDeviation standardDeviation -annotation (Placement(transformation(extent={{-40,-80},{-20,-60}}))); + Math.StandardDeviation standardDeviation + annotation (Placement(transformation(extent={{-40,-80},{-20,-60}}))); Modelica.Blocks.Math.Feedback sigmaError annotation (Placement(transformation(extent={{40,-60},{60,-80}}))); equation diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo new file mode 100644 index 00000000..f88bda69 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo @@ -0,0 +1,106 @@ +within Modelica_Noise.Blocks.Examples.NoiseExamples.Utilities; +block Density "Calculates the density of a selected distribution" + extends Modelica.Blocks.Interfaces.BlockIcon; + + replaceable function distribution = + Modelica_Noise.Math.Distributions.Uniform.density constrainedby + Modelica_Noise.Math.Distributions.Interfaces.partialDensity + "Probability density function" + annotation(choicesAllMatching=true, Documentation(info=" +

    This is the probability density function to be used in the Density block.

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); + + Modelica.Blocks.Interfaces.RealInput u "Real input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y + "Density of the input signal according to the selected probability density function" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); +equation + y = distribution(u); + annotation (Icon(graphics={ + Polygon( + points={{0,94},{-8,72},{8,72},{0,94}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line(points={{0,76},{0,-72}}, color={192,192,192}), + Line(points={{-86,-82},{72,-82}}, + color={192,192,192}), + Polygon( + points={{92,-82},{70,-74},{70,-90},{92,-82}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line( points={{-70,-75.953},{-66.5,-75.8975},{-63,-75.7852},{-59.5, + -75.5674},{-56,-75.1631},{-52.5,-74.4442},{-49,-73.2213},{ + -45.5,-71.2318},{-42,-68.1385},{-38.5,-63.5468},{-35,-57.0467}, + {-31.5,-48.2849},{-28,-37.0617},{-24.5,-23.4388},{-21,-7.8318}, + {-17.5,8.9428},{-14,25.695},{-10.5,40.9771},{-7,53.2797},{ + -3.5,61.2739},{0,64.047},{3.5,61.2739},{7,53.2797},{10.5, + 40.9771},{14,25.695},{17.5,8.9428},{21,-7.8318},{24.5, + -23.4388},{28,-37.0617},{31.5,-48.2849},{35,-57.0467},{38.5, + -63.5468},{42,-68.1385},{45.5,-71.2318},{49,-73.2213},{52.5, + -74.4442},{56,-75.1631},{59.5,-75.5674},{63,-75.7852},{66.5, + -75.8975},{70,-75.953}}, + color={0,0,0}, + smooth=Smooth.Bezier)}), Documentation(info=" +

    +This block determines the probability density y of a distribution for the given signal u: +

    + +
    +
    y = density(u)
    +
    + +

    +The actual density function is replaceable and can be chosen from all available +probability density functions extending from +Math.Distributions.Interfaces.partialDensity. +

    + +

    +This block is demonstrated in the examples +Examples.NoiseExamples.Densities and +Examples.NoiseExamples.TruncatedDensities. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end Density; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.order b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.order index 33c723fa..e672682d 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.order +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.order @@ -1,2 +1,3 @@ +Density ImpureRandom Parts diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.mo index a8b883ff..9b595ff4 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.mo @@ -3,17 +3,6 @@ package NoiseExamples "Library of examples to demonstrate the usage of package B extends Modelica.Icons.ExamplesPackage; - - - - - - - - - - - annotation (Documentation(info="

    This package contains various example models that demonstrates how diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo new file mode 100644 index 00000000..07017441 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo @@ -0,0 +1,334 @@ +within Modelica_Noise.Blocks; +package Math "Library of mathematical blocks" + extends Modelica.Icons.Package; + + block ContinuousMean + "Calculates the empirical expectation (mean) value of its input signal" + extends Modelica.Blocks.Interfaces.BlockIcon; + parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 + "Mean value calculation starts at startTime + t_eps" + annotation(Dialog(group="Advanced")); + + Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y + "Expectation (mean) value of the input signal" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + + protected + Real mu "Internal integrator variable"; + parameter Real t_0(fixed=false) "Start time"; + initial equation + t_0 = time; + mu = u; + equation + der(mu) = noEvent(if time >= t_0 + t_eps then (u-mu)/(time-t_0) else 0); + y = noEvent(if time >= t_0 + t_eps then mu else u); + + annotation (Documentation(revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +", info=" +

    This block continuously calculates the mean value of its input signal. It uses the function:

    +
    +
        integral( u over time)
    +y = ----------------------
    +      time - startTime
    +
    +

    This can be used to determine the empirical expectation value of a random signal, such as generated by the Noise blocks.

    +

    The parameter t_eps is used to guard against division by zero (the mean value computation +starts at startTime + t_eps and before that time instant y = u).

    +

    See also the Mean block for a sampled implementation.

    + +

    +This block is demonstrated in the examples +UniformNoiseProperties, +NormalNoiseProperties and +WeibullNoiseProperties. +

    +"), Icon(coordinateSystem( + preserveAspectRatio=false, extent={{-100,-100},{100,100}}), + graphics={ + Polygon( + points={{94,0},{72,8},{72,-8},{94,0}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line(points={{-86,0},{72,0}}, color={192,192,192}), + Line(points={{-76,68},{-76,-80}}, color={192,192,192}), + Polygon( + points={{-76,90},{-84,68},{-68,68},{-76,90}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line( + points={{-76,-31},{-62,-31},{-62,-15},{-54,-15},{-54,-63},{-46,-63}, + {-46,-41},{-38,-41},{-38,43},{-30,43},{-30,11},{-30,11},{-30,-49}, + {-20,-49},{-20,-31},{-10,-31},{-10,-59},{0,-59},{0,23},{6,23},{6, + 37},{12,37},{12,-19},{22,-19},{22,-7},{28,-7},{28,-37},{38,-37}, + {38,35},{48,35},{48,1},{56,1},{56,-65},{66,-65}}, + color={215,215,215}), + Line( + points={{-76,-24},{70,-24}}, + color={0,0,0}, + smooth=Smooth.None)})); + end ContinuousMean; + + block Variance "Calculates the empirical variance of its input signal" + extends Modelica.Blocks.Interfaces.BlockIcon; + parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 + "Variance calculation starts at startTime + t_eps" + annotation(Dialog(group="Advanced")); + + Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y "Variance of the input signal" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + protected + Real mu "Mean value (state variable)"; + Real var "Variance (state variable)"; + parameter Real t_0(fixed=false) "Start time"; + initial equation + t_0 = time; + mu = u; + var = 0; + equation + der(mu) = noEvent(if time >= t_0 + t_eps then (u-mu)/(time-t_0) else 0); + der(var) = noEvent(if time >= t_0 + t_eps then ((u-mu)^2 - var)/(time - t_0) else 0); + y = noEvent(if time >= t_0 + t_eps then max(var,0) else 0); + + annotation (Documentation(revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +", info=" +

    +This block calculates the empirical variance of its input signal. It is based on the formula +(but implemented in a more reliable numerical way): +

    +
    +
    y = mean(  (u - mean(u))^2  )
    +
    + +

    The parameter t_eps is used to guard against division by zero (the variance computation +starts at startTime + t_eps and before that time instant y = 0).

    +

    The variance of a signal is also equal to its mean power.

    + +

    +This block is demonstrated in the examples +UniformNoiseProperties, +NormalNoiseProperties and +WeibullNoiseProperties. +

    +"), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, + 100}}), graphics), + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, + 100}}), graphics={ + Line(points={{-76,68},{-76,-80}}, color={192,192,192}), + Line(points={{-86,0},{72,0}}, color={192,192,192}), + Line( + points={{-76,-13},{-62,-13},{-62,3},{-54,3},{-54,-45},{-46,-45},{-46, + -23},{-38,-23},{-38,61},{-30,61},{-30,29},{-30,29},{-30,-31},{-20, + -31},{-20,-13},{-10,-13},{-10,-41},{0,-41},{0,41},{6,41},{6,55}, + {12,55},{12,-1},{22,-1},{22,11},{28,11},{28,-19},{38,-19},{38,53}, + {48,53},{48,19},{56,19},{56,-47},{66,-47}}, + color={215,215,215}), + Polygon( + points={{94,0},{72,8},{72,-8},{94,0}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line( + points={{-76,66},{70,66}}, + color={215,215,215}, + smooth=Smooth.None), + Line( + points={{-16,0},{-16,48}}, + color={0,0,0}, + smooth=Smooth.None), + Polygon( + points={{-76,90},{-84,68},{-68,68},{-76,90}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-16,66},{-24,44},{-8,44},{-16,66}}, + lineColor={0,0,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid)})); + end Variance; + + block StandardDeviation + "Calculates the empirical standard deviation of its input signal" + extends Modelica.Blocks.Interfaces.BlockIcon; + parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 + "Standard deviation calculation starts at startTime + t_eps" + annotation(Dialog(group="Advanced")); + + Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y + "Standard deviation of the input signal" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + + Variance variance(t_eps=t_eps) + annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); + Modelica.Blocks.Math.Sqrt sqrt1 + annotation (Placement(transformation(extent={{-20,-10},{0,10}}))); + equation + connect(variance.u, u) annotation (Line( + points={{-62,0},{-120,0}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(sqrt1.u, variance.y) annotation (Line( + points={{-22,0},{-39,0}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(sqrt1.y, y) annotation (Line( + points={{1,0},{110,0}}, + color={0,0,127}, + smooth=Smooth.None)); + annotation (Documentation(revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +", info=" +

    This block calculates the standard deviation of its input signal. The standard deviation is the square root of the signal's variance:

    +
    +
    y = sqrt( variance(u) )
    +
    +

    +The Variance block is used to +calculate variance(u). +

    +

    The parameter t_eps is used to guard against division by zero (the computation of the standard deviation +starts at startTime + t_eps and before that time instant y = 0). +

    + +

    +This block is demonstrated in the examples +UniformNoiseProperties, +NormalNoiseProperties and +WeibullNoiseProperties. +

    +"), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, + 100}}), graphics), + Icon(graphics={ + Line(points={{-76,68},{-76,-80}}, color={192,192,192}), + Line(points={{-86,0},{72,0}}, color={192,192,192}), + Line( + points={{-76,-13},{-62,-13},{-62,3},{-54,3},{-54,-45},{-46,-45},{-46, + -23},{-38,-23},{-38,61},{-30,61},{-30,29},{-30,29},{-30,-31},{-20, + -31},{-20,-13},{-10,-13},{-10,-41},{0,-41},{0,41},{6,41},{6,55}, + {12,55},{12,-1},{22,-1},{22,11},{28,11},{28,-19},{38,-19},{38,53}, + {48,53},{48,19},{56,19},{56,-47},{66,-47}}, + color={215,215,215}), + Polygon( + points={{94,0},{72,8},{72,-8},{94,0}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line( + points={{-76,46},{70,46}}, + color={215,215,215}, + smooth=Smooth.None), + Line( + points={{-16,0},{-16,30}}, + color={0,0,0}, + smooth=Smooth.None), + Polygon( + points={{-76,90},{-84,68},{-68,68},{-76,90}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-16,46},{-24,24},{-8,24},{-16,46}}, + lineColor={0,0,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid)})); + end StandardDeviation; + annotation (Icon(graphics={Line( + points={{-72,-63.953},{-68.5,-63.8975},{-65,-63.7852},{-61.5, + -63.5674},{-58,-63.1631},{-54.5,-62.4442},{-51,-61.2213},{-47.5, + -59.2318},{-44,-56.1385},{-40.5,-51.5468},{-37,-45.0467},{-33.5, + -36.2849},{-30,-25.0617},{-26.5,-11.4388},{-23,4.1682},{-19.5, + 20.9428},{-16,37.695},{-12.5,52.9771},{-9,65.2797},{-5.5, + 73.2739},{-2,76.047},{1.5,73.2739},{5,65.2797},{8.5,52.9771},{ + 12,37.695},{15.5,20.9428},{19,4.1682},{22.5,-11.4388},{26, + -25.0617},{29.5,-36.2849},{33,-45.0467},{36.5,-51.5468},{40, + -56.1385},{43.5,-59.2318},{47,-61.2213},{50.5,-62.4442},{54, + -63.1631},{57.5,-63.5674},{61,-63.7852},{64.5,-63.8975},{68, + -63.953}}, + color={0,0,0}, + smooth=Smooth.Bezier)}), Documentation(info=" +

    This sublibrary provides blocks to compute the statistical properties of signals. These e.g. can be used to analyse the random signals generated by the blocks provided in the Noise sublibrary.

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end Math; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/package.mo deleted file mode 100644 index f5d3cd4b..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/package.mo +++ /dev/null @@ -1,42 +0,0 @@ -within Modelica_Noise.Blocks; -package Statistics "Library of statistical blocks" - extends Modelica.Icons.Package; - - - annotation (Icon(graphics={Line( - points={{-72,-63.953},{-68.5,-63.8975},{-65,-63.7852},{-61.5, - -63.5674},{-58,-63.1631},{-54.5,-62.4442},{-51,-61.2213},{-47.5, - -59.2318},{-44,-56.1385},{-40.5,-51.5468},{-37,-45.0467},{-33.5, - -36.2849},{-30,-25.0617},{-26.5,-11.4388},{-23,4.1682},{-19.5, - 20.9428},{-16,37.695},{-12.5,52.9771},{-9,65.2797},{-5.5, - 73.2739},{-2,76.047},{1.5,73.2739},{5,65.2797},{8.5,52.9771},{ - 12,37.695},{15.5,20.9428},{19,4.1682},{22.5,-11.4388},{26, - -25.0617},{29.5,-36.2849},{33,-45.0467},{36.5,-51.5468},{40, - -56.1385},{43.5,-59.2318},{47,-61.2213},{50.5,-62.4442},{54, - -63.1631},{57.5,-63.5674},{61,-63.7852},{64.5,-63.8975},{68, - -63.953}}, - color={0,0,0}, - smooth=Smooth.Bezier)}), Documentation(info=" -

    This sublibrary provides blocks to compute the statistical properties of signals. These e.g. can be used to analyse the random signals generated by the blocks provided in the Noise sublibrary.

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end Statistics; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/package.mo index 2498a094..f50d0f5a 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/package.mo @@ -2,7 +2,4 @@ within Modelica_Noise; package Blocks "Additions to Blocks package of MSL" extends Modelica.Icons.Package; - - - end Blocks; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/package.order b/Modelica_Noise 1.0 Beta.1/Blocks/package.order index 490bb98c..9b3883a5 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/package.order +++ b/Modelica_Noise 1.0 Beta.1/Blocks/package.order @@ -1,3 +1,3 @@ Examples -Statistics +Math Noise diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/package.mo b/Modelica_Noise 1.0 Beta.1/Utilities/package.mo index 5d30fc64..050b0563 100644 --- a/Modelica_Noise 1.0 Beta.1/Utilities/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Utilities/package.mo @@ -1,6 +1,4 @@ within Modelica_Noise; package Utilities "Additions to Utilities package of MSL" - - end Utilities; diff --git a/Modelica_Noise 1.0 Beta.1/package.mo b/Modelica_Noise 1.0 Beta.1/package.mo index 3614d520..4c5879cb 100644 --- a/Modelica_Noise 1.0 Beta.1/package.mo +++ b/Modelica_Noise 1.0 Beta.1/package.mo @@ -2,9 +2,6 @@ within ; package Modelica_Noise "Modelica_Noise version 1.0-Beta.1 (Library for random numbers and noise signals; planned to be included into the Modelica Standard Library)" - - - annotation(preferredView="info", version = "1.0 Beta.1", versionDate = "2015-06-22", From 01cc5c3a9944ea4caba8d14818b67bfc3c714f4a Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Fri, 17 Jul 2015 10:12:04 +0200 Subject: [PATCH 13/46] - Added missing GlobalSeed component to example DrydenContinuousTurbulence.mo - Include the string "fixedSeed = " in the icon of GlobalSeed, in order to make the fixedSeed case more visible. - Added test model for Strings.hashString --- .../NoiseExamples/DrydenContinuousTurbulence.mo | 2 ++ Modelica_Noise 1.0 Beta.1/Blocks/Math.mo | 1 - Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo | 10 ++++++++-- Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo | 9 +++++---- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/DrydenContinuousTurbulence.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/DrydenContinuousTurbulence.mo index fd12c9e0..d8cd831b 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/DrydenContinuousTurbulence.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/DrydenContinuousTurbulence.mo @@ -21,6 +21,8 @@ model DrydenContinuousTurbulence annotation (Placement(transformation(extent={{-60,0},{-40,20}}))); Modelica.Blocks.Math.Gain compareToSpeed(k=1/V) annotation (Placement(transformation(extent={{40,0},{60,20}}))); + inner Noise.GlobalSeed globalSeed + annotation (Placement(transformation(extent={{40,60},{60,80}}))); equation connect(whiteNoise.y, Hw.u) annotation (Line( points={{-39,10},{-12,10}}, diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo index 07017441..9fed3f0a 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo @@ -309,7 +309,6 @@ This block is demonstrated in the examples -63.953}}, color={0,0,0}, smooth=Smooth.Bezier)}), Documentation(info=" -

    This sublibrary provides blocks to compute the statistical properties of signals. These e.g. can be used to analyse the random signals generated by the blocks provided in the Noise sublibrary.

    ", revisions="

    diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo index e8cff0a2..c46fa6c4 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo @@ -48,7 +48,7 @@ into your model and specify the seed. -21},{41,-21},{41,51},{51,51},{51,17},{59,17},{59,-49},{69,-49}}, color={215,215,215}), Text(visible=enableNoise and not useAutomaticSeed, - extent={{-90,8},{88,-18}}, + extent={{-90,-4},{88,-30}}, lineColor={255,0,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, @@ -56,7 +56,13 @@ into your model and specify the seed. Line(visible = not enableNoise, points={{-80,-4},{84,-4}}, color={215,215,215}, - smooth=Smooth.None)}), + smooth=Smooth.None), + Text(visible=enableNoise and not useAutomaticSeed, + extent={{-84,34},{94,8}}, + lineColor={255,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid, + textString="fixedSeed =")}), Documentation(revisions="

    diff --git a/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo b/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo index e4750ec2..03cf1ef7 100644 --- a/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo +++ b/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo @@ -249,10 +249,11 @@ package ToModelicaTest "Functions to be included in package ModelicaTest" ")); end distributions; - function truncatedDistributions "Test Math.TruncatedDistributions" + function truncatedDistributions + "Test truncated distributions in Math.Distributions" import Modelica.Utilities.Streams.print; - import Modelica_Noise.Math.TruncatedDistributions; - import Modelica_Noise; + import Modelica_Noise.Math.Distributions; + import Modelica_Noise; input Integer nPoints = 1000; input Real erfRange = 3.0; protected @@ -265,7 +266,7 @@ package ToModelicaTest "Functions to be included in package ModelicaTest" Real y3[nPoints]; Real err; algorithm - print("\n... Check Math.TruncatedDistributions"); + print("\n... Check Math.Distributions (truncated distributions)"); // check Normal y1 :=Modelica_Noise.Math.Distributions.TruncatedNormal.density( From 77ca1e877630074378a05b4ee4d8cbca1edeba4e Mon Sep 17 00:00:00 2001 From: Martin Otter Date: Fri, 17 Jul 2015 10:31:39 +0200 Subject: [PATCH 14/46] - Removed Statistics directory (since models moved to Math package) - Changed extends clause from Modelica.Blocks.Interfaces.BlockIcon to Modelica.Blocks.Icons.Block at several places --- .../NoiseExamples/Utilities/Density.mo | 2 +- Modelica_Noise 1.0 Beta.1/Blocks/Math.mo | 6 +- .../Blocks/Statistics/ContinuousMean.mo | 88 --------------- .../Blocks/Statistics/Density.mo | 106 ------------------ .../Blocks/Statistics/StandardDeviation.mo | 106 ------------------ .../Blocks/Statistics/Variance.mo | 100 ----------------- .../Blocks/Statistics/package.order | 4 - 7 files changed, 4 insertions(+), 408 deletions(-) delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Statistics/ContinuousMean.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Statistics/Density.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Statistics/StandardDeviation.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Statistics/Variance.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Statistics/package.order diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo index f88bda69..eee67ca4 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo @@ -1,6 +1,6 @@ within Modelica_Noise.Blocks.Examples.NoiseExamples.Utilities; block Density "Calculates the density of a selected distribution" - extends Modelica.Blocks.Interfaces.BlockIcon; + extends Modelica.Blocks.Icons.Block; replaceable function distribution = Modelica_Noise.Math.Distributions.Uniform.density constrainedby diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo index 9fed3f0a..204890c3 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo @@ -4,7 +4,7 @@ package Math "Library of mathematical blocks" block ContinuousMean "Calculates the empirical expectation (mean) value of its input signal" - extends Modelica.Blocks.Interfaces.BlockIcon; + extends Modelica.Blocks.Icons.Block; parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 "Mean value calculation starts at startTime + t_eps" annotation(Dialog(group="Advanced")); @@ -91,7 +91,7 @@ This block is demonstrated in the examples end ContinuousMean; block Variance "Calculates the empirical variance of its input signal" - extends Modelica.Blocks.Interfaces.BlockIcon; + extends Modelica.Blocks.Icons.Block; parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 "Variance calculation starts at startTime + t_eps" annotation(Dialog(group="Advanced")); @@ -192,7 +192,7 @@ This block is demonstrated in the examples block StandardDeviation "Calculates the empirical standard deviation of its input signal" - extends Modelica.Blocks.Interfaces.BlockIcon; + extends Modelica.Blocks.Icons.Block; parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 "Standard deviation calculation starts at startTime + t_eps" annotation(Dialog(group="Advanced")); diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/ContinuousMean.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/ContinuousMean.mo deleted file mode 100644 index a4f0e312..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/ContinuousMean.mo +++ /dev/null @@ -1,88 +0,0 @@ -within Modelica_Noise.Blocks.Statistics; -block ContinuousMean - "Calculates the empirical expectation (mean) value of its input signal" - extends Modelica.Blocks.Interfaces.BlockIcon; - parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 - "Mean value calculation starts at startTime + t_eps" - annotation(Dialog(group="Advanced")); - - Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica.Blocks.Interfaces.RealOutput y - "Expectation (mean) value of the input signal" - annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - -protected - Real mu "Internal integrator variable"; - parameter Real t_0(fixed=false) "Start time"; -initial equation - t_0 = time; - mu = u; -equation - der(mu) = noEvent(if time >= t_0 + t_eps then (u-mu)/(time-t_0) else 0); - y = noEvent(if time >= t_0 + t_eps then mu else u); - - annotation (Documentation(revisions=" -

    -

    - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -", info=" -

    This block continuously calculates the mean value of its input signal. It uses the function:

    -
    -
        integral( u over time)
    -y = ----------------------
    -      time - startTime
    -
    -

    This can be used to determine the empirical expectation value of a random signal, such as generated by the Noise blocks.

    -

    The parameter t_eps is used to guard against division by zero (the mean value computation -starts at startTime + t_eps and before that time instant y = u).

    -

    See also the Mean block for a sampled implementation.

    - -

    -This block is demonstrated in the examples -UniformNoiseProperties, -NormalNoiseProperties and -WeibullNoiseProperties. -

    -"), Icon(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), - graphics={ - Polygon( - points={{94,0},{72,8},{72,-8},{94,0}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line(points={{-86,0},{72,0}}, color={192,192,192}), - Line(points={{-76,68},{-76,-80}}, color={192,192,192}), - Polygon( - points={{-76,90},{-84,68},{-68,68},{-76,90}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line( - points={{-76,-31},{-62,-31},{-62,-15},{-54,-15},{-54,-63},{-46,-63}, - {-46,-41},{-38,-41},{-38,43},{-30,43},{-30,11},{-30,11},{-30,-49}, - {-20,-49},{-20,-31},{-10,-31},{-10,-59},{0,-59},{0,23},{6,23},{6, - 37},{12,37},{12,-19},{22,-19},{22,-7},{28,-7},{28,-37},{38,-37}, - {38,35},{48,35},{48,1},{56,1},{56,-65},{66,-65}}, - color={215,215,215}), - Line( - points={{-76,-24},{70,-24}}, - color={0,0,0}, - smooth=Smooth.None)})); -end ContinuousMean; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/Density.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/Density.mo deleted file mode 100644 index 9db01d1b..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/Density.mo +++ /dev/null @@ -1,106 +0,0 @@ -within Modelica_Noise.Blocks.Statistics; -block Density "Calculates the density of a selected distribution" - extends Modelica.Blocks.Interfaces.BlockIcon; - - replaceable function distribution = - Modelica_Noise.Math.Distributions.Uniform.density constrainedby - Modelica_Noise.Math.Distributions.Interfaces.partialDensity - "Probability density function" - annotation(choicesAllMatching=true, Documentation(info=" -

    This is the probability density function to be used in the Density block.

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - - Modelica.Blocks.Interfaces.RealInput u "Real input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica.Blocks.Interfaces.RealOutput y - "Density of the input signal according to the selected probability density function" - annotation (Placement(transformation(extent={{100,-10},{120,10}}))); -equation - y = distribution(u); - annotation (Icon(graphics={ - Polygon( - points={{0,94},{-8,72},{8,72},{0,94}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line(points={{0,76},{0,-72}}, color={192,192,192}), - Line(points={{-86,-82},{72,-82}}, - color={192,192,192}), - Polygon( - points={{92,-82},{70,-74},{70,-90},{92,-82}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line( points={{-70,-75.953},{-66.5,-75.8975},{-63,-75.7852},{-59.5, - -75.5674},{-56,-75.1631},{-52.5,-74.4442},{-49,-73.2213},{ - -45.5,-71.2318},{-42,-68.1385},{-38.5,-63.5468},{-35,-57.0467}, - {-31.5,-48.2849},{-28,-37.0617},{-24.5,-23.4388},{-21,-7.8318}, - {-17.5,8.9428},{-14,25.695},{-10.5,40.9771},{-7,53.2797},{ - -3.5,61.2739},{0,64.047},{3.5,61.2739},{7,53.2797},{10.5, - 40.9771},{14,25.695},{17.5,8.9428},{21,-7.8318},{24.5, - -23.4388},{28,-37.0617},{31.5,-48.2849},{35,-57.0467},{38.5, - -63.5468},{42,-68.1385},{45.5,-71.2318},{49,-73.2213},{52.5, - -74.4442},{56,-75.1631},{59.5,-75.5674},{63,-75.7852},{66.5, - -75.8975},{70,-75.953}}, - color={0,0,0}, - smooth=Smooth.Bezier)}), Documentation(info=" -

    -This block determines the probability density y of a distribution for the given signal u: -

    - -
    -
    y = density(u)
    -
    - -

    -The actual density function is replaceable and can be chosen from all available -probability density functions extending from -Math.Distributions.Interfaces.partialDensity. -

    - -

    -This block is demonstrated in the examples -Examples.NoiseExamples.Densities and -Examples.NoiseExamples.TruncatedDensities. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end Density; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/StandardDeviation.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/StandardDeviation.mo deleted file mode 100644 index 90e7d439..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/StandardDeviation.mo +++ /dev/null @@ -1,106 +0,0 @@ -within Modelica_Noise.Blocks.Statistics; -block StandardDeviation - "Calculates the empirical standard deviation of its input signal" - extends Modelica.Blocks.Interfaces.BlockIcon; - parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 - "Standard deviation calculation starts at startTime + t_eps" - annotation(Dialog(group="Advanced")); - - Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica.Blocks.Interfaces.RealOutput y - "Standard deviation of the input signal" - annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - - Variance variance(t_eps=t_eps) - annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); - Modelica.Blocks.Math.Sqrt sqrt1 - annotation (Placement(transformation(extent={{-20,-10},{0,10}}))); -equation - connect(variance.u, u) annotation (Line( - points={{-62,0},{-120,0}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(sqrt1.u, variance.y) annotation (Line( - points={{-22,0},{-39,0}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(sqrt1.y, y) annotation (Line( - points={{1,0},{110,0}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (Documentation(revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -", info=" -

    This block calculates the standard deviation of its input signal. The standard deviation is the square root of the signal's variance:

    -
    -
    y = sqrt( variance(u) )
    -
    -

    -The Variance block is used to -calculate variance(u). -

    -

    The parameter t_eps is used to guard against division by zero (the computation of the standard deviation -starts at startTime + t_eps and before that time instant y = 0). -

    - -

    -This block is demonstrated in the examples -UniformNoiseProperties, -NormalNoiseProperties and -WeibullNoiseProperties. -

    -"), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}), graphics), - Icon(graphics={ - Line(points={{-76,68},{-76,-80}}, color={192,192,192}), - Line(points={{-86,0},{72,0}}, color={192,192,192}), - Line( - points={{-76,-13},{-62,-13},{-62,3},{-54,3},{-54,-45},{-46,-45},{-46, - -23},{-38,-23},{-38,61},{-30,61},{-30,29},{-30,29},{-30,-31},{-20, - -31},{-20,-13},{-10,-13},{-10,-41},{0,-41},{0,41},{6,41},{6,55}, - {12,55},{12,-1},{22,-1},{22,11},{28,11},{28,-19},{38,-19},{38,53}, - {48,53},{48,19},{56,19},{56,-47},{66,-47}}, - color={215,215,215}), - Polygon( - points={{94,0},{72,8},{72,-8},{94,0}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line( - points={{-76,46},{70,46}}, - color={215,215,215}, - smooth=Smooth.None), - Line( - points={{-16,0},{-16,30}}, - color={0,0,0}, - smooth=Smooth.None), - Polygon( - points={{-76,90},{-84,68},{-68,68},{-76,90}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-16,46},{-24,24},{-8,24},{-16,46}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid)})); -end StandardDeviation; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/Variance.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/Variance.mo deleted file mode 100644 index d76ce9ca..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/Variance.mo +++ /dev/null @@ -1,100 +0,0 @@ -within Modelica_Noise.Blocks.Statistics; -block Variance "Calculates the empirical variance of its input signal" - extends Modelica.Blocks.Interfaces.BlockIcon; - parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 - "Variance calculation starts at startTime + t_eps" - annotation(Dialog(group="Advanced")); - - Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica.Blocks.Interfaces.RealOutput y "Variance of the input signal" - annotation (Placement(transformation(extent={{100,-10},{120,10}}))); -protected - Real mu "Mean value (state variable)"; - Real var "Variance (state variable)"; - parameter Real t_0(fixed=false) "Start time"; -initial equation - t_0 = time; - mu = u; - var = 0; -equation - der(mu) = noEvent(if time >= t_0 + t_eps then (u-mu)/(time-t_0) else 0); - der(var) = noEvent(if time >= t_0 + t_eps then ((u-mu)^2 - var)/(time - t_0) else 0); - y = noEvent(if time >= t_0 + t_eps then max(var,0) else 0); - - annotation (Documentation(revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -", info=" -

    -This block calculates the empirical variance of its input signal. It is based on the formula -(but implemented in a more reliable numerical way): -

    -
    -
    y = mean(  (u - mean(u))^2  )
    -
    - -

    The parameter t_eps is used to guard against division by zero (the variance computation -starts at startTime + t_eps and before that time instant y = 0).

    -

    The variance of a signal is also equal to its mean power.

    - -

    -This block is demonstrated in the examples -UniformNoiseProperties, -NormalNoiseProperties and -WeibullNoiseProperties. -

    -"), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}), graphics), - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}), graphics={ - Line(points={{-76,68},{-76,-80}}, color={192,192,192}), - Line(points={{-86,0},{72,0}}, color={192,192,192}), - Line( - points={{-76,-13},{-62,-13},{-62,3},{-54,3},{-54,-45},{-46,-45},{-46, - -23},{-38,-23},{-38,61},{-30,61},{-30,29},{-30,29},{-30,-31},{-20, - -31},{-20,-13},{-10,-13},{-10,-41},{0,-41},{0,41},{6,41},{6,55}, - {12,55},{12,-1},{22,-1},{22,11},{28,11},{28,-19},{38,-19},{38,53}, - {48,53},{48,19},{56,19},{56,-47},{66,-47}}, - color={215,215,215}), - Polygon( - points={{94,0},{72,8},{72,-8},{94,0}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line( - points={{-76,66},{70,66}}, - color={215,215,215}, - smooth=Smooth.None), - Line( - points={{-16,0},{-16,48}}, - color={0,0,0}, - smooth=Smooth.None), - Polygon( - points={{-76,90},{-84,68},{-68,68},{-76,90}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-16,66},{-24,44},{-8,44},{-16,66}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid)})); -end Variance; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/package.order b/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/package.order deleted file mode 100644 index 66d54276..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Statistics/package.order +++ /dev/null @@ -1,4 +0,0 @@ -ContinuousMean -Variance -StandardDeviation -Density From b8538cc4670bd92d9a4d32b2e03490cb169f80d9 Mon Sep 17 00:00:00 2001 From: MartinOtter Date: Fri, 17 Jul 2015 13:48:21 +0200 Subject: [PATCH 15/46] Changed file encoding of two files from ASCII to UTF8-without-boom --- .../Blocks/Noise/package.mo | 2 +- .../Math/Distributions/package.mo | 21 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo index 790b5228..c8490bfe 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo @@ -137,7 +137,7 @@ inverse cumulative probability density function of a normal distribution transfo desired band (in the diagram above to the range: -1.5 .. 1.5). Contrary to a standard distribution, truncated distributions have the advantage that the resulting random values are guaranteed to be in the defined band (whereas a standard normal distribution might also result in any value; -when modeling noise that is known to be in a particular range, say ± 0.1 Volt, +when modeling noise that is known to be in a particular range, say ± 0.1 Volt, then with the TruncatedNormal distribution it is guaranted that random values are only generated in this band). More details of truncated distributions are given in the documentation of package diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo index ffc354f0..494f68f5 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo @@ -3,6 +3,11 @@ package Distributions "Library of distribution functions" extends Modelica.Icons.Package; + + + + + annotation (Icon(graphics={Line( points={{-70,-65.953},{-66.5,-65.8975},{-63,-65.7852},{-59.5, -65.5674},{-56,-65.1631},{-52.5,-64.4442},{-49,-63.2213},{-45.5, @@ -37,20 +42,20 @@ In particular also truncated distributions are provided (see be The main reason to introduce truncated distributions is to make the modeling of measurement noise easier, in order to limit the band in which the noise can occur. For example, if a sensor is used and the -sensor signal has a noise of ± 0.1 Volt (e.g. this can be determined by using a reference +sensor signal has a noise of ± 0.1 Volt (e.g. this can be determined by using a reference value of 0 V and inspecting the measured signal), then the sensor signal will be often the input -to an Analog-Digital converter and this converter limits the signal, say to ± 5 Volt. -Typically, the user would like to model noise within the noise band (say ± 0.1 Volt), +to an Analog-Digital converter and this converter limits the signal, say to ± 5 Volt. +Typically, the user would like to model noise within the noise band (say ± 0.1 Volt), and often uses a normal distribution. But a normal distribution is not limited and for a small sample time and a long simulation there might be some sample time instants -where the noise values of the normal signal is outside the ± 0.1 Volt range. +where the noise values of the normal signal is outside the ± 0.1 Volt range. For some sensor types this is completely unrealistic (e.g. an angle sensor might -measure ± 0.1 rad, but the sensor will never add, say one revolution (6.28 rad) to it. +measure ± 0.1 rad, but the sensor will never add, say one revolution (6.28 rad) to it. However, the noise model with a pure normal distribution could give such a value. If a modeler would like to guarantee (and not to hope), that the modeled noise is -always between ± 0.1 Volt, then there are two main possibilities: (a) The noise is computed -and the result is then limited to ± 0.1 Volt, or (b) the normal distribution is slightly modified, -so that it is within the band of ± 0.1 Volt. Approach (a) is a brute force method that +always between ± 0.1 Volt, then there are two main possibilities: (a) The noise is computed +and the result is then limited to ± 0.1 Volt, or (b) the normal distribution is slightly modified, +so that it is within the band of ± 0.1 Volt. Approach (a) is a brute force method that changes the statistical properties of the signal in an unknown way. Approach (b) is a \"clean\" mathematical description. The blocks in package Blocks.Noise From 03dceb2c8c51463a6a95340453781f55052c474a Mon Sep 17 00:00:00 2001 From: akloeckner Date: Wed, 29 Jul 2015 09:58:36 +0200 Subject: [PATCH 16/46] Appears to solve issue #34 as suggested by @tbeu --- Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c index 8afd930e..f000e8a7 100644 --- a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c +++ b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c @@ -137,6 +137,9 @@ static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; /* On Windows systems define a critical section using the single static variable "cs" */ #elif defined(_WIN32) && defined(G_HAS_CONSTRUCTORS) +#if !defined(WIN32_LEAN_AND_MEAN) +#define WIN32_LEAN_AND_MEAN +#endif #include static CRITICAL_SECTION cs; #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA From bfab4a37b1f9bc6d09c8626cecd2c87817ab8f84 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Wed, 29 Jul 2015 10:12:08 +0200 Subject: [PATCH 17/46] Refix libraryinfo.mos --- Modelica_Noise 1.0 Beta.1/libraryinfo.mos | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/libraryinfo.mos b/Modelica_Noise 1.0 Beta.1/libraryinfo.mos index ddb79353..820038e0 100644 --- a/Modelica_Noise 1.0 Beta.1/libraryinfo.mos +++ b/Modelica_Noise 1.0 Beta.1/libraryinfo.mos @@ -4,11 +4,11 @@ LibraryInfoMenuSeparator( LibraryInfoMenuCommand( category="libraries", - text="Modelica_Noise "+NoiseVersion, + text="Modelica_Noise 1.0 Beta.1", reference="Modelica_Noise", version="1.0 Beta.1", isModel=true, - description="Modelica_Noise modules for the MSL. Version "+NoiseVersion, + description="Modelica_Noise modules for the MSL. Version 1.0 Beta.1", ModelicaVersion="3.2.1", pos=110) From 789e375baba10aed759683dcfbf5980068301e6a Mon Sep 17 00:00:00 2001 From: akloeckner Date: Wed, 29 Jul 2015 10:12:50 +0200 Subject: [PATCH 18/46] Save Blocks.Math as directory --- Modelica_Noise 1.0 Beta.1/Blocks/Math.mo | 333 ------------------ .../Blocks/Math/ContinuousMean.mo | 88 +++++ .../Blocks/Math/StandardDeviation.mo | 106 ++++++ .../Blocks/Math/Variance.mo | 100 ++++++ .../Blocks/Math/package.mo | 43 +++ .../Blocks/Math/package.order | 3 + 6 files changed, 340 insertions(+), 333 deletions(-) delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Math.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Math/ContinuousMean.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Math/StandardDeviation.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Math/Variance.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Math/package.order diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo deleted file mode 100644 index 204890c3..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Math.mo +++ /dev/null @@ -1,333 +0,0 @@ -within Modelica_Noise.Blocks; -package Math "Library of mathematical blocks" - extends Modelica.Icons.Package; - - block ContinuousMean - "Calculates the empirical expectation (mean) value of its input signal" - extends Modelica.Blocks.Icons.Block; - parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 - "Mean value calculation starts at startTime + t_eps" - annotation(Dialog(group="Advanced")); - - Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica.Blocks.Interfaces.RealOutput y - "Expectation (mean) value of the input signal" - annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - - protected - Real mu "Internal integrator variable"; - parameter Real t_0(fixed=false) "Start time"; - initial equation - t_0 = time; - mu = u; - equation - der(mu) = noEvent(if time >= t_0 + t_eps then (u-mu)/(time-t_0) else 0); - y = noEvent(if time >= t_0 + t_eps then mu else u); - - annotation (Documentation(revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -", info=" -

    This block continuously calculates the mean value of its input signal. It uses the function:

    -
    -
        integral( u over time)
    -y = ----------------------
    -      time - startTime
    -
    -

    This can be used to determine the empirical expectation value of a random signal, such as generated by the Noise blocks.

    -

    The parameter t_eps is used to guard against division by zero (the mean value computation -starts at startTime + t_eps and before that time instant y = u).

    -

    See also the Mean block for a sampled implementation.

    - -

    -This block is demonstrated in the examples -UniformNoiseProperties, -NormalNoiseProperties and -WeibullNoiseProperties. -

    -"), Icon(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), - graphics={ - Polygon( - points={{94,0},{72,8},{72,-8},{94,0}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line(points={{-86,0},{72,0}}, color={192,192,192}), - Line(points={{-76,68},{-76,-80}}, color={192,192,192}), - Polygon( - points={{-76,90},{-84,68},{-68,68},{-76,90}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line( - points={{-76,-31},{-62,-31},{-62,-15},{-54,-15},{-54,-63},{-46,-63}, - {-46,-41},{-38,-41},{-38,43},{-30,43},{-30,11},{-30,11},{-30,-49}, - {-20,-49},{-20,-31},{-10,-31},{-10,-59},{0,-59},{0,23},{6,23},{6, - 37},{12,37},{12,-19},{22,-19},{22,-7},{28,-7},{28,-37},{38,-37}, - {38,35},{48,35},{48,1},{56,1},{56,-65},{66,-65}}, - color={215,215,215}), - Line( - points={{-76,-24},{70,-24}}, - color={0,0,0}, - smooth=Smooth.None)})); - end ContinuousMean; - - block Variance "Calculates the empirical variance of its input signal" - extends Modelica.Blocks.Icons.Block; - parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 - "Variance calculation starts at startTime + t_eps" - annotation(Dialog(group="Advanced")); - - Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica.Blocks.Interfaces.RealOutput y "Variance of the input signal" - annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - protected - Real mu "Mean value (state variable)"; - Real var "Variance (state variable)"; - parameter Real t_0(fixed=false) "Start time"; - initial equation - t_0 = time; - mu = u; - var = 0; - equation - der(mu) = noEvent(if time >= t_0 + t_eps then (u-mu)/(time-t_0) else 0); - der(var) = noEvent(if time >= t_0 + t_eps then ((u-mu)^2 - var)/(time - t_0) else 0); - y = noEvent(if time >= t_0 + t_eps then max(var,0) else 0); - - annotation (Documentation(revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -", info=" -

    -This block calculates the empirical variance of its input signal. It is based on the formula -(but implemented in a more reliable numerical way): -

    -
    -
    y = mean(  (u - mean(u))^2  )
    -
    - -

    The parameter t_eps is used to guard against division by zero (the variance computation -starts at startTime + t_eps and before that time instant y = 0).

    -

    The variance of a signal is also equal to its mean power.

    - -

    -This block is demonstrated in the examples -UniformNoiseProperties, -NormalNoiseProperties and -WeibullNoiseProperties. -

    -"), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}), graphics), - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}), graphics={ - Line(points={{-76,68},{-76,-80}}, color={192,192,192}), - Line(points={{-86,0},{72,0}}, color={192,192,192}), - Line( - points={{-76,-13},{-62,-13},{-62,3},{-54,3},{-54,-45},{-46,-45},{-46, - -23},{-38,-23},{-38,61},{-30,61},{-30,29},{-30,29},{-30,-31},{-20, - -31},{-20,-13},{-10,-13},{-10,-41},{0,-41},{0,41},{6,41},{6,55}, - {12,55},{12,-1},{22,-1},{22,11},{28,11},{28,-19},{38,-19},{38,53}, - {48,53},{48,19},{56,19},{56,-47},{66,-47}}, - color={215,215,215}), - Polygon( - points={{94,0},{72,8},{72,-8},{94,0}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line( - points={{-76,66},{70,66}}, - color={215,215,215}, - smooth=Smooth.None), - Line( - points={{-16,0},{-16,48}}, - color={0,0,0}, - smooth=Smooth.None), - Polygon( - points={{-76,90},{-84,68},{-68,68},{-76,90}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-16,66},{-24,44},{-8,44},{-16,66}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid)})); - end Variance; - - block StandardDeviation - "Calculates the empirical standard deviation of its input signal" - extends Modelica.Blocks.Icons.Block; - parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 - "Standard deviation calculation starts at startTime + t_eps" - annotation(Dialog(group="Advanced")); - - Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Modelica.Blocks.Interfaces.RealOutput y - "Standard deviation of the input signal" - annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - - Variance variance(t_eps=t_eps) - annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); - Modelica.Blocks.Math.Sqrt sqrt1 - annotation (Placement(transformation(extent={{-20,-10},{0,10}}))); - equation - connect(variance.u, u) annotation (Line( - points={{-62,0},{-120,0}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(sqrt1.u, variance.y) annotation (Line( - points={{-22,0},{-39,0}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(sqrt1.y, y) annotation (Line( - points={{1,0},{110,0}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (Documentation(revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -", info=" -

    This block calculates the standard deviation of its input signal. The standard deviation is the square root of the signal's variance:

    -
    -
    y = sqrt( variance(u) )
    -
    -

    -The Variance block is used to -calculate variance(u). -

    -

    The parameter t_eps is used to guard against division by zero (the computation of the standard deviation -starts at startTime + t_eps and before that time instant y = 0). -

    - -

    -This block is demonstrated in the examples -UniformNoiseProperties, -NormalNoiseProperties and -WeibullNoiseProperties. -

    -"), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}), graphics), - Icon(graphics={ - Line(points={{-76,68},{-76,-80}}, color={192,192,192}), - Line(points={{-86,0},{72,0}}, color={192,192,192}), - Line( - points={{-76,-13},{-62,-13},{-62,3},{-54,3},{-54,-45},{-46,-45},{-46, - -23},{-38,-23},{-38,61},{-30,61},{-30,29},{-30,29},{-30,-31},{-20, - -31},{-20,-13},{-10,-13},{-10,-41},{0,-41},{0,41},{6,41},{6,55}, - {12,55},{12,-1},{22,-1},{22,11},{28,11},{28,-19},{38,-19},{38,53}, - {48,53},{48,19},{56,19},{56,-47},{66,-47}}, - color={215,215,215}), - Polygon( - points={{94,0},{72,8},{72,-8},{94,0}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Line( - points={{-76,46},{70,46}}, - color={215,215,215}, - smooth=Smooth.None), - Line( - points={{-16,0},{-16,30}}, - color={0,0,0}, - smooth=Smooth.None), - Polygon( - points={{-76,90},{-84,68},{-68,68},{-76,90}}, - lineColor={192,192,192}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-16,46},{-24,24},{-8,24},{-16,46}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid)})); - end StandardDeviation; - annotation (Icon(graphics={Line( - points={{-72,-63.953},{-68.5,-63.8975},{-65,-63.7852},{-61.5, - -63.5674},{-58,-63.1631},{-54.5,-62.4442},{-51,-61.2213},{-47.5, - -59.2318},{-44,-56.1385},{-40.5,-51.5468},{-37,-45.0467},{-33.5, - -36.2849},{-30,-25.0617},{-26.5,-11.4388},{-23,4.1682},{-19.5, - 20.9428},{-16,37.695},{-12.5,52.9771},{-9,65.2797},{-5.5, - 73.2739},{-2,76.047},{1.5,73.2739},{5,65.2797},{8.5,52.9771},{ - 12,37.695},{15.5,20.9428},{19,4.1682},{22.5,-11.4388},{26, - -25.0617},{29.5,-36.2849},{33,-45.0467},{36.5,-51.5468},{40, - -56.1385},{43.5,-59.2318},{47,-61.2213},{50.5,-62.4442},{54, - -63.1631},{57.5,-63.5674},{61,-63.7852},{64.5,-63.8975},{68, - -63.953}}, - color={0,0,0}, - smooth=Smooth.Bezier)}), Documentation(info=" -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end Math; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/ContinuousMean.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math/ContinuousMean.mo new file mode 100644 index 00000000..823e3a8e --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/ContinuousMean.mo @@ -0,0 +1,88 @@ +within Modelica_Noise.Blocks.Math; +block ContinuousMean + "Calculates the empirical expectation (mean) value of its input signal" + extends Modelica.Blocks.Icons.Block; + parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 + "Mean value calculation starts at startTime + t_eps" + annotation(Dialog(group="Advanced")); + + Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y + "Expectation (mean) value of the input signal" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + +protected + Real mu "Internal integrator variable"; + parameter Real t_0(fixed=false) "Start time"; +initial equation + t_0 = time; + mu = u; +equation + der(mu) = noEvent(if time >= t_0 + t_eps then (u-mu)/(time-t_0) else 0); + y = noEvent(if time >= t_0 + t_eps then mu else u); + + annotation (Documentation(revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +", info=" +

    This block continuously calculates the mean value of its input signal. It uses the function:

    +
    +
        integral( u over time)
    +y = ----------------------
    +      time - startTime
    +
    +

    This can be used to determine the empirical expectation value of a random signal, such as generated by the Noise blocks.

    +

    The parameter t_eps is used to guard against division by zero (the mean value computation +starts at startTime + t_eps and before that time instant y = u).

    +

    See also the Mean block for a sampled implementation.

    + +

    +This block is demonstrated in the examples +UniformNoiseProperties, +NormalNoiseProperties and +WeibullNoiseProperties. +

    +"), Icon(coordinateSystem( + preserveAspectRatio=false, extent={{-100,-100},{100,100}}), + graphics={ + Polygon( + points={{94,0},{72,8},{72,-8},{94,0}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line(points={{-86,0},{72,0}}, color={192,192,192}), + Line(points={{-76,68},{-76,-80}}, color={192,192,192}), + Polygon( + points={{-76,90},{-84,68},{-68,68},{-76,90}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line( + points={{-76,-31},{-62,-31},{-62,-15},{-54,-15},{-54,-63},{-46,-63}, + {-46,-41},{-38,-41},{-38,43},{-30,43},{-30,11},{-30,11},{-30,-49}, + {-20,-49},{-20,-31},{-10,-31},{-10,-59},{0,-59},{0,23},{6,23},{6, + 37},{12,37},{12,-19},{22,-19},{22,-7},{28,-7},{28,-37},{38,-37}, + {38,35},{48,35},{48,1},{56,1},{56,-65},{66,-65}}, + color={215,215,215}), + Line( + points={{-76,-24},{70,-24}}, + color={0,0,0}, + smooth=Smooth.None)})); +end ContinuousMean; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/StandardDeviation.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math/StandardDeviation.mo new file mode 100644 index 00000000..c7585200 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/StandardDeviation.mo @@ -0,0 +1,106 @@ +within Modelica_Noise.Blocks.Math; +block StandardDeviation + "Calculates the empirical standard deviation of its input signal" + extends Modelica.Blocks.Icons.Block; + parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 + "Standard deviation calculation starts at startTime + t_eps" + annotation(Dialog(group="Advanced")); + + Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y + "Standard deviation of the input signal" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + + Variance variance(t_eps=t_eps) + annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); + Modelica.Blocks.Math.Sqrt sqrt1 + annotation (Placement(transformation(extent={{-20,-10},{0,10}}))); +equation + connect(variance.u, u) annotation (Line( + points={{-62,0},{-120,0}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(sqrt1.u, variance.y) annotation (Line( + points={{-22,0},{-39,0}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(sqrt1.y, y) annotation (Line( + points={{1,0},{110,0}}, + color={0,0,127}, + smooth=Smooth.None)); + annotation (Documentation(revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +", info=" +

    This block calculates the standard deviation of its input signal. The standard deviation is the square root of the signal's variance:

    +
    +
    y = sqrt( variance(u) )
    +
    +

    +The Variance block is used to +calculate variance(u). +

    +

    The parameter t_eps is used to guard against division by zero (the computation of the standard deviation +starts at startTime + t_eps and before that time instant y = 0). +

    + +

    +This block is demonstrated in the examples +UniformNoiseProperties, +NormalNoiseProperties and +WeibullNoiseProperties. +

    +"), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, + 100}}), graphics), + Icon(graphics={ + Line(points={{-76,68},{-76,-80}}, color={192,192,192}), + Line(points={{-86,0},{72,0}}, color={192,192,192}), + Line( + points={{-76,-13},{-62,-13},{-62,3},{-54,3},{-54,-45},{-46,-45},{-46, + -23},{-38,-23},{-38,61},{-30,61},{-30,29},{-30,29},{-30,-31},{-20, + -31},{-20,-13},{-10,-13},{-10,-41},{0,-41},{0,41},{6,41},{6,55}, + {12,55},{12,-1},{22,-1},{22,11},{28,11},{28,-19},{38,-19},{38,53}, + {48,53},{48,19},{56,19},{56,-47},{66,-47}}, + color={215,215,215}), + Polygon( + points={{94,0},{72,8},{72,-8},{94,0}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line( + points={{-76,46},{70,46}}, + color={215,215,215}, + smooth=Smooth.None), + Line( + points={{-16,0},{-16,30}}, + color={0,0,0}, + smooth=Smooth.None), + Polygon( + points={{-76,90},{-84,68},{-68,68},{-76,90}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-16,46},{-24,24},{-8,24},{-16,46}}, + lineColor={0,0,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid)})); +end StandardDeviation; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/Variance.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math/Variance.mo new file mode 100644 index 00000000..b7246b2d --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/Variance.mo @@ -0,0 +1,100 @@ +within Modelica_Noise.Blocks.Math; +block Variance "Calculates the empirical variance of its input signal" + extends Modelica.Blocks.Icons.Block; + parameter Modelica.SIunits.Time t_eps(min=0.0)=1e-7 + "Variance calculation starts at startTime + t_eps" + annotation(Dialog(group="Advanced")); + + Modelica.Blocks.Interfaces.RealInput u "Noisy input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y "Variance of the input signal" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); +protected + Real mu "Mean value (state variable)"; + Real var "Variance (state variable)"; + parameter Real t_0(fixed=false) "Start time"; +initial equation + t_0 = time; + mu = u; + var = 0; +equation + der(mu) = noEvent(if time >= t_0 + t_eps then (u-mu)/(time-t_0) else 0); + der(var) = noEvent(if time >= t_0 + t_eps then ((u-mu)^2 - var)/(time - t_0) else 0); + y = noEvent(if time >= t_0 + t_eps then max(var,0) else 0); + + annotation (Documentation(revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +", info=" +

    +This block calculates the empirical variance of its input signal. It is based on the formula +(but implemented in a more reliable numerical way): +

    +
    +
    y = mean(  (u - mean(u))^2  )
    +
    + +

    The parameter t_eps is used to guard against division by zero (the variance computation +starts at startTime + t_eps and before that time instant y = 0).

    +

    The variance of a signal is also equal to its mean power.

    + +

    +This block is demonstrated in the examples +UniformNoiseProperties, +NormalNoiseProperties and +WeibullNoiseProperties. +

    +"), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, + 100}}), graphics), + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, + 100}}), graphics={ + Line(points={{-76,68},{-76,-80}}, color={192,192,192}), + Line(points={{-86,0},{72,0}}, color={192,192,192}), + Line( + points={{-76,-13},{-62,-13},{-62,3},{-54,3},{-54,-45},{-46,-45},{-46, + -23},{-38,-23},{-38,61},{-30,61},{-30,29},{-30,29},{-30,-31},{-20, + -31},{-20,-13},{-10,-13},{-10,-41},{0,-41},{0,41},{6,41},{6,55}, + {12,55},{12,-1},{22,-1},{22,11},{28,11},{28,-19},{38,-19},{38,53}, + {48,53},{48,19},{56,19},{56,-47},{66,-47}}, + color={215,215,215}), + Polygon( + points={{94,0},{72,8},{72,-8},{94,0}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line( + points={{-76,66},{70,66}}, + color={215,215,215}, + smooth=Smooth.None), + Line( + points={{-16,0},{-16,48}}, + color={0,0,0}, + smooth=Smooth.None), + Polygon( + points={{-76,90},{-84,68},{-68,68},{-76,90}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-16,66},{-24,44},{-8,44},{-16,66}}, + lineColor={0,0,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid)})); +end Variance; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo new file mode 100644 index 00000000..b0b49aa7 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo @@ -0,0 +1,43 @@ +within Modelica_Noise.Blocks; +package Math "Library of mathematical blocks" + extends Modelica.Icons.Package; + + + + + annotation (Icon(graphics={Line( + points={{-72,-63.953},{-68.5,-63.8975},{-65,-63.7852},{-61.5, + -63.5674},{-58,-63.1631},{-54.5,-62.4442},{-51,-61.2213},{-47.5, + -59.2318},{-44,-56.1385},{-40.5,-51.5468},{-37,-45.0467},{-33.5, + -36.2849},{-30,-25.0617},{-26.5,-11.4388},{-23,4.1682},{-19.5, + 20.9428},{-16,37.695},{-12.5,52.9771},{-9,65.2797},{-5.5, + 73.2739},{-2,76.047},{1.5,73.2739},{5,65.2797},{8.5,52.9771},{ + 12,37.695},{15.5,20.9428},{19,4.1682},{22.5,-11.4388},{26, + -25.0617},{29.5,-36.2849},{33,-45.0467},{36.5,-51.5468},{40, + -56.1385},{43.5,-59.2318},{47,-61.2213},{50.5,-62.4442},{54, + -63.1631},{57.5,-63.5674},{61,-63.7852},{64.5,-63.8975},{68, + -63.953}}, + color={0,0,0}, + smooth=Smooth.Bezier)}), Documentation(info=" +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end Math; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.order b/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.order new file mode 100644 index 00000000..d7c17790 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.order @@ -0,0 +1,3 @@ +ContinuousMean +Variance +StandardDeviation From 5f3cb392de4042643e83256593281f4b35c184a0 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Wed, 5 Aug 2015 09:53:24 +0200 Subject: [PATCH 19/46] Re-changed to ANSI encoding (hope, that is ASCII after all) with ± entities as suggested by @dietmarw in comment on b8538cc --- .../Blocks/Noise/package.mo | 2 +- .../Math/Distributions/package.mo | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo index c8490bfe..41158662 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo @@ -137,7 +137,7 @@ inverse cumulative probability density function of a normal distribution transfo desired band (in the diagram above to the range: -1.5 .. 1.5). Contrary to a standard distribution, truncated distributions have the advantage that the resulting random values are guaranteed to be in the defined band (whereas a standard normal distribution might also result in any value; -when modeling noise that is known to be in a particular range, say ± 0.1 Volt, +when modeling noise that is known to be in a particular range, say ± 0.1 Volt, then with the TruncatedNormal distribution it is guaranted that random values are only generated in this band). More details of truncated distributions are given in the documentation of package diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo index 494f68f5..16218334 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo @@ -42,20 +42,20 @@ In particular also truncated distributions are provided (see be The main reason to introduce truncated distributions is to make the modeling of measurement noise easier, in order to limit the band in which the noise can occur. For example, if a sensor is used and the -sensor signal has a noise of ± 0.1 Volt (e.g. this can be determined by using a reference +sensor signal has a noise of ± 0.1 Volt (e.g. this can be determined by using a reference value of 0 V and inspecting the measured signal), then the sensor signal will be often the input -to an Analog-Digital converter and this converter limits the signal, say to ± 5 Volt. -Typically, the user would like to model noise within the noise band (say ± 0.1 Volt), +to an Analog-Digital converter and this converter limits the signal, say to ± 5 Volt. +Typically, the user would like to model noise within the noise band (say ± 0.1 Volt), and often uses a normal distribution. But a normal distribution is not limited and for a small sample time and a long simulation there might be some sample time instants -where the noise values of the normal signal is outside the ± 0.1 Volt range. +where the noise values of the normal signal is outside the ± 0.1 Volt range. For some sensor types this is completely unrealistic (e.g. an angle sensor might -measure ± 0.1 rad, but the sensor will never add, say one revolution (6.28 rad) to it. +measure ± 0.1 rad, but the sensor will never add, say one revolution (6.28 rad) to it. However, the noise model with a pure normal distribution could give such a value. If a modeler would like to guarantee (and not to hope), that the modeled noise is -always between ± 0.1 Volt, then there are two main possibilities: (a) The noise is computed -and the result is then limited to ± 0.1 Volt, or (b) the normal distribution is slightly modified, -so that it is within the band of ± 0.1 Volt. Approach (a) is a brute force method that +always between ± 0.1 Volt, then there are two main possibilities: (a) The noise is computed +and the result is then limited to ± 0.1 Volt, or (b) the normal distribution is slightly modified, +so that it is within the band of ± 0.1 Volt. Approach (a) is a brute force method that changes the statistical properties of the signal in an unknown way. Approach (b) is a \"clean\" mathematical description. The blocks in package Blocks.Noise From ec7556ad5cd2d39b50476814007ed14c7d2a9c63 Mon Sep 17 00:00:00 2001 From: tbeu Date: Mon, 31 Aug 2015 22:26:56 +0200 Subject: [PATCH 20/46] Clean up code * Remove dummy annotations * Remove trailing white space --- .../NoiseExamples/ActuatorWithNoise.mo | 49 ++++------- .../Examples/NoiseExamples/AutomaticSeed.mo | 8 +- .../Examples/NoiseExamples/Densities.mo | 21 ++--- .../Examples/NoiseExamples/Distributions.mo | 8 +- .../DrydenContinuousTurbulence.mo | 15 ++-- .../Examples/NoiseExamples/GenericNoise.mo | 14 ++- .../Examples/NoiseExamples/ImpureGenerator.mo | 8 +- .../NoiseExamples/NormalNoiseProperties.mo | 14 ++- .../NoiseExamples/TruncatedDensities.mo | 21 ++--- .../NoiseExamples/UniformNoiseProperties.mo | 47 ++++------ .../NoiseExamples/Utilities/Density.mo | 9 +- .../NoiseExamples/Utilities/ImpureRandom.mo | 4 +- .../Utilities/Parts/Controller.mo | 34 +++----- .../Parts/MotorWithCurrentControl.mo | 86 ++++++------------- .../NoiseExamples/Utilities/Parts/package.mo | 6 +- .../NoiseExamples/Utilities/package.mo | 4 +- .../NoiseExamples/WeibullNoiseProperties.mo | 12 ++- .../Blocks/Examples/NoiseExamples/package.mo | 4 +- .../Blocks/Examples/package.mo | 6 +- .../Blocks/Math/ContinuousMean.mo | 8 +- .../Blocks/Math/StandardDeviation.mo | 24 ++---- .../Blocks/Math/Variance.mo | 13 +-- .../Blocks/Math/package.mo | 5 +- .../Blocks/Noise/BandLimitedWhiteNoise.mo | 4 +- .../Blocks/Noise/GenericNoise.mo | 45 +++++----- .../Blocks/Noise/GlobalSeed.mo | 13 ++- .../Blocks/Noise/package.mo | 32 ++++--- .../Math/Distributions/Interfaces/package.mo | 6 +- .../Interfaces/partialCumulative.mo | 4 +- .../Interfaces/partialDensity.mo | 4 +- .../Interfaces/partialQuantile.mo | 4 +- .../Interfaces/partialTruncatedCumulative.mo | 4 +- .../Interfaces/partialTruncatedDensity.mo | 4 +- .../Interfaces/partialTruncatedQuantile.mo | 4 +- .../Math/Distributions/Normal/cumulative.mo | 8 +- .../Math/Distributions/Normal/density.mo | 6 +- .../Math/Distributions/Normal/package.mo | 5 +- .../Math/Distributions/Normal/quantile.mo | 8 +- .../Math/Distributions/TruncatedNormal.mo | 47 ++++------ .../Math/Distributions/TruncatedWeibull.mo | 33 +++---- .../Math/Distributions/Uniform/cumulative.mo | 8 +- .../Math/Distributions/Uniform/density.mo | 6 +- .../Math/Distributions/Uniform/package.mo | 8 +- .../Math/Distributions/Uniform/quantile.mo | 6 +- .../Math/Distributions/Weibull/cumulative.mo | 8 +- .../Math/Distributions/Weibull/density.mo | 6 +- .../Math/Distributions/Weibull/package.mo | 5 +- .../Math/Distributions/Weibull/quantile.mo | 8 +- .../Math/Distributions/package.mo | 27 +++--- .../Random/Examples/GenerateRandomNumbers.mo | 4 +- .../Math/Random/Examples/package.mo | 6 +- .../Generators/Xorshift1024star/package.mo | 12 +-- .../Generators/Xorshift128plus/package.mo | 12 +-- .../Generators/Xorshift64star/package.mo | 16 ++-- .../Math/Random/Generators/package.mo | 22 +++-- .../Interfaces/PartialGenerator/package.mo | 12 +-- .../Math/Random/Interfaces/package.mo | 4 +- .../Interpolators/Linear/der_interpolate.mo | 4 +- .../SmoothIdealLowPass/der_interpolate.mo | 4 +- .../SmoothIdealLowPass/der_kernel_offset.mo | 4 +- .../SmoothIdealLowPass/kernel.mo | 4 +- .../Math/Random/Interpolators/package.order | 0 .../Random/Utilities/automaticGlobalSeed.mo | 6 +- .../Random/Utilities/automaticLocalSeed.mo | 12 +-- .../Math/Random/Utilities/impureRandom.mo | 6 +- .../initialStateWithXorshift64star.mo | 4 +- .../Utilities/initializeImpureRandom.mo | 6 +- .../Math/Random/Utilities/package.mo | 4 +- .../Math/Random/package.mo | 4 +- .../Math/Special/Internal.mo | 18 ++-- Modelica_Noise 1.0 Beta.1/Math/Special/erf.mo | 6 +- .../Math/Special/erfInv.mo | 4 +- .../Math/Special/erfc.mo | 8 +- .../Math/Special/erfcInv.mo | 6 +- .../Math/Special/package.mo | 5 +- .../Math/Special/sinc.mo | 6 +- .../Resources/Include/ModelicaRandom.c | 8 +- Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo | 2 +- .../Utilities/Strings/hashString.mo | 4 +- .../Utilities/Strings/package.mo | 6 +- .../Utilities/System/getPid.mo | 4 +- .../Utilities/System/getTime.mo | 6 +- .../Utilities/System/package.mo | 6 +- Modelica_Noise 1.0 Beta.1/package.mo | 4 +- 84 files changed, 410 insertions(+), 562 deletions(-) delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/package.order diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ActuatorWithNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ActuatorWithNoise.mo index 57950b4e..0d872b9c 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ActuatorWithNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ActuatorWithNoise.mo @@ -24,7 +24,6 @@ extends Modelica.Icons.Example; Modelica.Mechanics.Translational.Sources.ConstantForce constantForce( f_constant=10000) annotation (Placement(transformation( extent={{10,-10},{-10,10}}, - rotation=0, origin={86,0}))); Modelica.Blocks.Nonlinear.SlewRateLimiter slewRateLimiter(Rising=50) annotation (Placement(transformation(extent={{-40,66},{-20,86}}))); @@ -40,47 +39,33 @@ extends Modelica.Icons.Example; equation connect(controller.y1, Motor.iq_rms1) annotation (Line( points={{21,70},{30,70},{30,20},{-96,20},{-96,6},{-88,6}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(Motor.phi, controller.positionMeasured) annotation (Line( points={{-71,8},{-66,8},{-66,52},{-12,52},{-12,64},{-2,64},{-2,64}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(Motor.flange, gearbox.flange_a) annotation (Line( - points={{-66,0},{-60,0}}, - color={0,0,0}, - smooth=Smooth.None)); + points={{-66,0},{-60,0}})); connect(gearbox.flange_b, idealGearR2T.flangeR) annotation (Line( - points={{-40,0},{-32,0}}, - color={0,0,0}, - smooth=Smooth.None)); + points={{-40,0},{-32,0}})); connect(constantForce.flange, mass.flange_b) annotation (Line( points={{76,0},{70,0}}, - color={0,127,0}, - smooth=Smooth.None)); + color={0,127,0})); connect(Speed.y, slewRateLimiter.u) annotation (Line( points={{-51,76},{-42,76}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(slewRateLimiter.y, controller.positionReference) annotation (Line( points={{-19,76},{-2,76}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(rodMass.flange_a, idealGearR2T.flangeT) annotation (Line( points={{-4,0},{-12,0}}, - color={0,127,0}, - smooth=Smooth.None)); + color={0,127,0})); connect(rodMass.flange_b, elastoGap.flange_a) annotation (Line( points={{16,0},{22,0}}, - color={0,127,0}, - smooth=Smooth.None)); + color={0,127,0})); connect(elastoGap.flange_b, mass.flange_a) annotation (Line( points={{42,0},{50,0}}, - color={0,127,0}, - smooth=Smooth.None)); + color={0,127,0})); annotation ( - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ - 100,100}}), graphics), experiment(StopTime=8, Interval = 0.01, Tolerance=1e-005), Documentation(info="

    @@ -94,20 +79,20 @@ This example models an actuator with a noisy sensor (which is in the Motor compo

    The drive train consists of a synchronous motor with a current controller (= Motor) and a gear box. -The gearbox drives a rod through a linear translation model. Softly attached to the rod is +The gearbox drives a rod through a linear translation model. Softly attached to the rod is another mass representing the actual actuator (= mass). The actuator is loaded with a constant force.

    -The whole drive is steered by a rate limited speed step command through a controller model. +The whole drive is steered by a rate limited speed step command through a controller model. In the Motor the shaft angle is measured and this measurement signal is modelled by adding additive noise to the Motor angle.

    -In the following figure, the position of the actuator and the Motor output torque are -shown with and without noise. The noise is not very strong, such that it has no visible effect -on the position of the actuator. The effect of the noise can be seen in the Motor torque. +In the following figure, the position of the actuator and the Motor output torque are +shown with and without noise. The noise is not very strong, such that it has no visible effect +on the position of the actuator. The effect of the noise can be seen in the Motor torque.

    @@ -124,12 +109,12 @@ enableNoise = false in the globalSeed component. Date Description June 22, 2015 - + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/AutomaticSeed.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/AutomaticSeed.mo index 088741cc..fd57910d 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/AutomaticSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/AutomaticSeed.mo @@ -58,9 +58,7 @@ model AutomaticSeed Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-1, y_max=3), fixedLocalSeed=3) annotation (Placement(transformation(extent={{0,-60},{20,-40}}))); - annotation (experiment(StopTime=2), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), - Documentation(info=" + annotation (experiment(StopTime=2), Documentation(info="

    This example demonstrates manual and automatic seed selection of GenericNoise blocks, as well @@ -100,12 +98,12 @@ manualSeed2 will produce exactly the same noise.

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo index 3e76b5e7..03775913 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo @@ -21,27 +21,20 @@ annotation (Placement(transformation(extent={{-46,-10},{-26,10}}))); equation connect(clock.y, add.u1) annotation (Line( points={{-59,20},{-53.5,20},{-53.5,6},{-48,6}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(const.y, add.u2) annotation (Line( points={{-59,-20},{-54,-20},{-54,-6},{-48,-6}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(add.y, uniformDensity.u) annotation (Line( points={{-25,0},{-14,0},{-14,30},{8,30}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(add.y, normalDensity.u) annotation (Line( points={{-25,0},{8,0}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(add.y, weibullDensity.u) annotation (Line( points={{-25,0},{-14,0},{-14,-30},{8,-30}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); annotation (experiment(StopTime=20, Interval=2e-2), - Diagram(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}})), Documentation(info="

    This example demonstrates how to compute the probability density functions (pdfs) of @@ -60,12 +53,12 @@ inputs:

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo index 1605953e..cfa61c83 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo @@ -33,9 +33,7 @@ model Distributions "Demonstrates noise with different types of distributions" Modelica_Noise.Math.Distributions.TruncatedWeibull.quantile ( y_min=0, y_max=y_max, k=1)) annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); - annotation (experiment(StopTime=2), Diagram(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics), - Documentation(info=" + annotation (experiment(StopTime=2), Documentation(info="

    This example demonstrates different noise distributions methods that can be selected for a Noise block. All the blocks use samplePeriod = 0.02 s, y_min=-1, y_max=3, and have @@ -60,12 +58,12 @@ and truncated Weibull distribution has no values below zero.

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/DrydenContinuousTurbulence.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/DrydenContinuousTurbulence.mo index d8cd831b..7b11ec97 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/DrydenContinuousTurbulence.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/DrydenContinuousTurbulence.mo @@ -26,15 +26,12 @@ model DrydenContinuousTurbulence equation connect(whiteNoise.y, Hw.u) annotation (Line( points={{-39,10},{-12,10}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(Hw.y, compareToSpeed.u) annotation (Line( points={{11,10},{38,10}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); annotation (experiment(StopTime=100), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), Documentation(info=" + Documentation(info="

    This example shows how to use the BandLimitedWhiteNoise @@ -86,9 +83,9 @@ The input to the filter

    The input to the filter is white noise with a normal distribution, zero mean, and a power spectral density of 1. -That means, for a sampling time of 1s, it is parameterized with mean=0 and variance=1. +That means, for a sampling time of 1s, it is parameterized with mean=0 and variance=1. However, in order to account for the change of noise power due to sampling, the noise must be scaled with sqrt(samplePeriod). -This is done automatically in the +This is done automatically in the BandLimitedWhiteNoise block.

    @@ -104,7 +101,7 @@ Reference
      -
    1. Dryden Wind Turbulence model in US military standard +
    2. Dryden Wind Turbulence model in US military standard MIL-F-8785.
    ")); diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo index c8bd9a9a..42bccc34 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo @@ -9,12 +9,10 @@ model GenericNoise samplePeriod=0.02, redeclare function distribution = Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-1, y_max=3)) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - annotation (experiment(StopTime=2), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), - Documentation(info=" + annotation (experiment(StopTime=2), Documentation(info="

    -This example demonstrates the most simple usage of the -Noise.GenericNoise +This example demonstrates the most simple usage of the +Noise.GenericNoise block:

    @@ -22,7 +20,7 @@ block:
  • globalSeed is the Noise.GlobalSeed block with default options (just dragged from sublibrary Noise).
  • genericNoise is an instance of - Noise.GenericNoise with + Noise.GenericNoise with samplePeriod = 0.02 s and a Uniform distribution with limits y_min=-1, y_max=3.
  • @@ -42,12 +40,12 @@ The result of a simulation is shown in the next diagram:
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ImpureGenerator.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ImpureGenerator.mo index 5c5c34f3..d86c344c 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ImpureGenerator.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ImpureGenerator.mo @@ -7,9 +7,7 @@ model ImpureGenerator NoiseExamples.Utilities.ImpureRandom impureRandom(samplePeriod=0.01) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - annotation (experiment(StopTime=2), Diagram(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics), - Documentation(info=" + annotation (experiment(StopTime=2), Documentation(info="

    This example demonstrates how to use the globalSeed.random() impure function to generate random values at event instants. Typically, this approach is only @@ -27,12 +25,12 @@ generator. Simulation results are shown in the next figure:

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/NormalNoiseProperties.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/NormalNoiseProperties.mo index d047479d..b33d04b9 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/NormalNoiseProperties.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/NormalNoiseProperties.mo @@ -9,16 +9,14 @@ model NormalNoiseProperties parameter Real sigma = 1 "Standard deviation for normal distribution"; annotation (experiment(StopTime=20, Interval=0.4e-2, Tolerance=1e-009), - Diagram(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics), Documentation(info="

    This example demonstrates statistical properties of the Blocks.Noise.GenericNoise block -using a normal random number distribution with mu=3, sigma=1. +using a normal random number distribution with mu=3, sigma=1. From the generated noise the mean and the variance is computed with blocks of package Blocks.Statistics. -Simulation results are shown in the next diagram: +Simulation results are shown in the next diagram:

    @@ -26,8 +24,8 @@ Simulation results are shown in the next diagram:

    -The mean value of a normal noise with mu=3 is 3 and the variance of normal noise -is sigma^2, so 1. The simulation results above show good agreement (after a short initial phase). +The mean value of a normal noise with mu=3 is 3 and the variance of normal noise +is sigma^2, so 1. The simulation results above show good agreement (after a short initial phase). This demonstrates that the random number generator and the mapping to a normal distribution have good statistical properties.

    @@ -37,12 +35,12 @@ distribution have good statistical properties.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo index 2e781c11..437bbf80 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo @@ -29,27 +29,20 @@ annotation (Placement(transformation(extent={{-46,-10},{-26,10}}))); equation connect(clock.y, add.u1) annotation (Line( points={{-59,20},{-53.5,20},{-53.5,6},{-48,6}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(const.y, add.u2) annotation (Line( points={{-59,-20},{-54,-20},{-54,-6},{-48,-6}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(add.y, uniformDensity.u) annotation (Line( points={{-25,0},{-14,0},{-14,30},{8,30}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(add.y, truncatedNormalDensity.u) annotation (Line( points={{-25,0},{8,0}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(add.y, truncatedWeibullDensity.u) annotation (Line( points={{-25,0},{-14,0},{-14,-30},{8,-30}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); annotation (experiment(StopTime=12, Interval=1.2e-2), - Diagram(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics), Documentation(info="

    This example demonstrates how to compute the probability density functions (pdfs) of @@ -69,12 +62,12 @@ inputs:

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo index 86992a72..0a02a488 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo @@ -39,59 +39,46 @@ model UniformNoiseProperties equation connect(noise.y, mean.u) annotation (Line( points={{-59,70},{-42,70}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(noise.y, variance.u) annotation (Line( points={{-59,70},{-52,70},{-52,10},{-42,10}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(mean.y, meanError.u1) annotation (Line( points={{-19,70},{42,70}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(theoreticalMean.y, meanError.u2) annotation (Line( points={{11,50},{50,50},{50,62}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(theoreticalSigma.y, theoreticalVariance.u[1]) annotation (Line( points={{11,-30},{24,-30},{24,-27.9},{28,-27.9}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(theoreticalSigma.y, theoreticalVariance.u[2]) annotation (Line( points={{11,-30},{24,-30},{24,-32.1},{28,-32.1}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(variance.y, varianceError.u1) annotation (Line( points={{-19,10},{42,10}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(theoreticalVariance.y, varianceError.u2) annotation (Line( points={{41.02,-30},{50,-30},{50,2}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(noise.y, standardDeviation.u) annotation (Line( points={{-59,70},{-52,70},{-52,-70},{-42,-70}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(standardDeviation.y, sigmaError.u1) annotation (Line( points={{-19,-70},{42,-70}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(theoreticalSigma.y, sigmaError.u2) annotation (Line( points={{11,-30},{18,-30},{18,-42},{50,-42},{50,-62}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); annotation (experiment(StopTime=20, Interval=0.4e-2, Tolerance=1e-009), - Diagram(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics), Documentation(info="

    This example demonstrates statistical properties of the Blocks.Noise.GenericNoise block -using a uniform random number distribution. +using a uniform random number distribution. Block "noise" defines a band of 0 .. 6 and from the generated noise the mean and the variance is computed with blocks of package Blocks.Statistics. -Simulation results are shown in the next diagram: +Simulation results are shown in the next diagram:

    @@ -99,8 +86,8 @@ Simulation results are shown in the next diagram:

    -The mean value of a uniform noise in the range 0 .. 6 is 3 and its variance is -3 as well. The simulation results above show good agreement (after a short initial phase). +The mean value of a uniform noise in the range 0 .. 6 is 3 and its variance is +3 as well. The simulation results above show good agreement (after a short initial phase). This demonstrates that the random number generator and the mapping to a uniform distribution have good statistical properties.

    @@ -110,12 +97,12 @@ distribution have good statistical properties.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo index eee67ca4..663f8555 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo @@ -14,12 +14,12 @@ block Density "Calculates the density of a selected distribution"
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -61,7 +61,6 @@ equation -63.5468},{42,-68.1385},{45.5,-71.2318},{49,-73.2213},{52.5, -74.4442},{56,-75.1631},{59.5,-75.5674},{63,-75.7852},{66.5, -75.8975},{70,-75.953}}, - color={0,0,0}, smooth=Smooth.Bezier)}), Documentation(info="

    This block determines the probability density y of a distribution for the given signal u: @@ -88,12 +87,12 @@ This block is demonstrated in the examples

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo index e1b8b399..3ddb6444 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo @@ -25,12 +25,12 @@ random number generator. This block is used in the example
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/Controller.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/Controller.mo index dae82275..86fac50e 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/Controller.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/Controller.mo @@ -26,42 +26,32 @@ model Controller "Simple position controller for actuator" equation connect(speedFeedback.y, speed_PI.u) annotation (Line( points={{29,0},{36,0}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(positionFeedback.u2, positionToSpeed.u) annotation (Line( points={{-80,52},{-80,-60},{-62,-60}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(positionReference, positionFeedback.u1) annotation (Line( points={{-120,60},{-88,60}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(positionFeedback.y, position_PI.u) annotation (Line( points={{-71,60},{-62,60}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(position_PI.y, speedFeedback.u1) annotation (Line( points={{-39,60},{0,60},{0,0},{12,0}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(speed_PI.y, busdelay.u) annotation (Line( points={{59,0},{66,0}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(y1, busdelay.y) annotation (Line( points={{110,0},{89,0}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(positionMeasured, positionToSpeed.u) annotation (Line( points={{-120,-60},{-62,-60}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(positionToSpeed.y, speedFeedback.u2) annotation (Line( points={{-39,-60},{20,-60},{20,-8}}, - color={0,0,127}, - smooth=Smooth.None)); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics), Icon(coordinateSystem( + color={0,0,127})); + annotation ( Icon(coordinateSystem( preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ Rectangle(extent={{-100,100},{100,-100}}, lineColor={0,0,255}, fillColor={255,255,255}, @@ -79,12 +69,12 @@ equation
    Date Description
    June 22, 2015 + - -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/MotorWithCurrentControl.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/MotorWithCurrentControl.mo index 44ad5b26..5bd8f159 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/MotorWithCurrentControl.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/MotorWithCurrentControl.mo @@ -42,15 +42,14 @@ model MotorWithCurrentControl alpha20s=smpmData.alpha20s, TrOperational=293.15, alpha20r=smpmData.alpha20r) - annotation (Placement(transformation(extent={{-20,-50},{0,-30}}, rotation=0))); + annotation (Placement(transformation(extent={{-20,-50},{0,-30}}))); Modelica.Electrical.MultiPhase.Sources.SignalCurrent signalCurrent(final m=m) annotation (Placement(transformation( origin={-10,50}, extent={{-10,10},{10,-10}}, rotation=270))); Modelica.Electrical.MultiPhase.Basic.Star star(final m=m) - annotation (Placement(transformation(extent={{-50,80},{-70,100}}, - rotation=0))); + annotation (Placement(transformation(extent={{-50,80},{-70,100}}))); Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement(transformation( origin={-90,90}, @@ -74,7 +73,7 @@ model MotorWithCurrentControl rotation=270))); Modelica.Electrical.Machines.Utilities.TerminalBox terminalBox( terminalConnection="Y") annotation (Placement(transformation(extent={{-20, - -30},{0,-10}}, rotation=0))); + -30},{0,-10}}))); Modelica.Electrical.Machines.Sensors.RotorDisplacementAngle rotorDisplacementAngle(p=smpm.p) annotation (Placement(transformation( origin={20,-40}, @@ -118,7 +117,6 @@ model MotorWithCurrentControl "Absolute angle of flange as output signal" annotation (Placement( transformation( extent={{-10,-10},{10,10}}, - rotation=0, origin={110,80}), iconTransformation(extent={{40,70},{60,90}}))); Modelica.Blocks.Math.Add addNoise annotation (Placement(transformation(extent={{60,70},{80,90}}))); @@ -137,95 +135,67 @@ equation points={{14,-30},{-4,-30}}, color={0,0,255})); connect(terminalBox.plug_sn, smpm.plug_sn) annotation (Line( points={{-16,-30},{-16,-30}}, - color={0,0,255}, - smooth=Smooth.None)); + color={0,0,255})); connect(terminalBox.plug_sp, smpm.plug_sp) annotation (Line( points={{-4,-30},{-4,-30}}, - color={0,0,255}, - smooth=Smooth.None)); + color={0,0,255})); connect(smpm.flange, rotorDisplacementAngle.flange) annotation (Line( - points={{0,-40},{10,-40}}, - color={0,0,0}, - smooth=Smooth.None)); + points={{0,-40},{10,-40}})); connect(signalCurrent.plug_p, star.plug_p) annotation (Line( points={{-10,60},{-10,90},{-50,90}}, - color={0,0,255}, - smooth=Smooth.None)); + color={0,0,255})); connect(angleSensor.flange, rotorDisplacementAngle.flange) annotation (Line( - points={{10,-10},{10,-40}}, - color={0,0,0}, - smooth=Smooth.None)); + points={{10,-10},{10,-40}})); connect(angleSensor.phi, currentController.phi) annotation (Line( points={{10,11},{10,30},{-40,30},{-40,38}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(groundM.p, terminalBox.starpoint) annotation (Line( points={{-70,-28},{-19,-28}}, - color={0,0,255}, - smooth=Smooth.None)); + color={0,0,255})); connect(smpm.flange, torqueSensor.flange_a) annotation (Line( - points={{0,-40},{30,-40},{30,-60}}, - color={0,0,0}, - smooth=Smooth.None)); + points={{0,-40},{30,-40},{30,-60}})); connect(voltageQuasiRMSSensor.plug_p, terminalBox.plugSupply) annotation ( Line( points={{-20,-10},{-10,-10},{-10,-28}}, - color={0,0,255}, - smooth=Smooth.None)); + color={0,0,255})); connect(starM.plug_p, voltageQuasiRMSSensor.plug_n) annotation (Line( points={{-50,-10},{-40,-10}}, - color={0,0,255}, - smooth=Smooth.None)); + color={0,0,255})); connect(starM.pin_n, groundM.p) annotation (Line( points={{-70,-10},{-70,-28}}, - color={0,0,255}, - smooth=Smooth.None)); + color={0,0,255})); connect(currentController.y, signalCurrent.i) annotation (Line( points={{-29,50},{-17,50}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(speedSensor.flange, smpm.flange) annotation (Line( - points={{30,-10},{30,-40},{0,-40}}, - color={0,0,0}, - smooth=Smooth.None)); + points={{30,-10},{30,-40},{0,-40}})); connect(torqueSensor.flange_b, inertiaLoad.flange_a) annotation (Line( - points={{50,-60},{50,-40}}, - color={0,0,0}, - smooth=Smooth.None)); + points={{50,-60},{50,-40}})); connect(signalCurrent.plug_n, currentQuasiRMSSensor.plug_p) annotation ( Line( points={{-10,40},{-10,10}}, - color={0,0,255}, - smooth=Smooth.None)); + color={0,0,255})); connect(currentQuasiRMSSensor.plug_n, voltageQuasiRMSSensor.plug_p) annotation (Line( points={{-10,-10},{-20,-10}}, - color={0,0,255}, - smooth=Smooth.None)); + color={0,0,255})); connect(id.y, currentController.id_rms) annotation (Line( points={{-79,30},{-70,30},{-70,56},{-52,56}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(currentController.iq_rms, iq_rms1) annotation (Line( points={{-52,44},{-76,44},{-76,60},{-120,60}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(inertiaLoad.flange_b, flange) annotation (Line( - points={{70,-40},{86,-40},{86,0},{100,0}}, - color={0,0,0}, - smooth=Smooth.None)); + points={{70,-40},{86,-40},{86,0},{100,0}})); connect(angleSensor.phi, addNoise.u2) annotation (Line( points={{10,11},{10,30},{52,30},{52,74},{58,74}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(addNoise.y, phi) annotation (Line( points={{81,80},{110,80}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(GenericNoise.y, addNoise.u1) annotation (Line( points={{47,86},{58,86}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); annotation ( Documentation(info="

    @@ -253,12 +223,12 @@ actuator example

    Date Description
    June 22, 2015 +
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -268,8 +238,6 @@ actuator example

    "), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ - 100,100}}), graphics), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 100}}), graphics={Rectangle( extent={{40,50},{-100,100}}, diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/package.mo index d784c367..b3cfb7ab 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/package.mo @@ -8,12 +8,12 @@ annotation (Documentation(revisions="
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -24,7 +24,7 @@ annotation (Documentation(revisions="

    ", info="

    -Parts used in the +Parts used in the Examples.NoiseExamples.ActuatorWithNoise actuator example

    diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.mo index a3ef55de..c1ca77b8 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.mo @@ -13,12 +13,12 @@ This package contains utility models that are used for the examples.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/WeibullNoiseProperties.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/WeibullNoiseProperties.mo index aa2bcc78..1dcad660 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/WeibullNoiseProperties.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/WeibullNoiseProperties.mo @@ -12,16 +12,14 @@ model WeibullNoiseProperties parameter Real lambda = 1 "Scale parameter"; annotation (experiment(StopTime=20, Interval=0.4e-2, Tolerance=1e-009), - Diagram(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics), Documentation(info="

    This example demonstrates statistical properties of the Blocks.Noise.GenericNoise block -using a Weibull random number distribution with lambda=1, k=1. +using a Weibull random number distribution with lambda=1, k=1. From the generated noise the mean and the variance is computed with blocks of package Blocks.Statistics. -Simulation results are shown in the next diagram: +Simulation results are shown in the next diagram:

    @@ -30,7 +28,7 @@ Simulation results are shown in the next diagram:

    The mean value of Weibull noise with lambda=1 and k=1 is 1 and the variance is also 1. -The simulation results above show good agreement (after a short initial phase). +The simulation results above show good agreement (after a short initial phase). This demonstrates that the random number generator and the mapping to a Weibull distribution have good statistical properties.

    @@ -40,12 +38,12 @@ distribution have good statistical properties.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.mo index 9b595ff4..eeab1354 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.mo @@ -15,12 +15,12 @@ to utilize the blocks from sublibrary
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/package.mo index 7d4e9aa1..66b8b853 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/package.mo @@ -1,5 +1,5 @@ within Modelica_Noise.Blocks; -package Examples +package Examples extends Modelica.Icons.ExamplesPackage; @@ -9,12 +9,12 @@ annotation (Documentation(revisions="
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/ContinuousMean.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math/ContinuousMean.mo index 823e3a8e..a30df3d4 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Math/ContinuousMean.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/ContinuousMean.mo @@ -27,12 +27,12 @@ equation
    Date Description
    June 22, 2015 +
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -82,7 +82,5 @@ This block is demonstrated in the examples {38,35},{48,35},{48,1},{56,1},{56,-65},{66,-65}}, color={215,215,215}), Line( - points={{-76,-24},{70,-24}}, - color={0,0,0}, - smooth=Smooth.None)})); + points={{-76,-24},{70,-24}})})); end ContinuousMean; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/StandardDeviation.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math/StandardDeviation.mo index c7585200..cc383345 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Math/StandardDeviation.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/StandardDeviation.mo @@ -18,28 +18,25 @@ block StandardDeviation equation connect(variance.u, u) annotation (Line( points={{-62,0},{-120,0}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(sqrt1.u, variance.y) annotation (Line( points={{-22,0},{-39,0}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); connect(sqrt1.y, y) annotation (Line( points={{1,0},{110,0}}, - color={0,0,127}, - smooth=Smooth.None)); + color={0,0,127})); annotation (Documentation(revisions="

    -
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -54,7 +51,7 @@ equation
    y = sqrt( variance(u) )

    -The Variance block is used to +The Variance block is used to calculate variance(u).

    The parameter t_eps is used to guard against division by zero (the computation of the standard deviation @@ -68,8 +65,6 @@ This block is demonstrated in the examples WeibullNoiseProperties.

    "), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}), graphics), Icon(graphics={ Line(points={{-76,68},{-76,-80}}, color={192,192,192}), Line(points={{-86,0},{72,0}}, color={192,192,192}), @@ -87,12 +82,9 @@ This block is demonstrated in the examples fillPattern=FillPattern.Solid), Line( points={{-76,46},{70,46}}, - color={215,215,215}, - smooth=Smooth.None), + color={215,215,215}), Line( - points={{-16,0},{-16,30}}, - color={0,0,0}, - smooth=Smooth.None), + points={{-16,0},{-16,30}}), Polygon( points={{-76,90},{-84,68},{-68,68},{-76,90}}, lineColor={192,192,192}, diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/Variance.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math/Variance.mo index b7246b2d..013344a4 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Math/Variance.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/Variance.mo @@ -27,12 +27,12 @@ equation
    Date Description
    June 22, 2015 + - -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -61,8 +61,6 @@ This block is demonstrated in the examples WeibullNoiseProperties.

    "), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}), graphics), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 100}}), graphics={ Line(points={{-76,68},{-76,-80}}, color={192,192,192}), @@ -81,12 +79,9 @@ This block is demonstrated in the examples fillPattern=FillPattern.Solid), Line( points={{-76,66},{70,66}}, - color={215,215,215}, - smooth=Smooth.None), + color={215,215,215}), Line( - points={{-16,0},{-16,48}}, - color={0,0,0}, - smooth=Smooth.None), + points={{-16,0},{-16,48}}), Polygon( points={{-76,90},{-84,68},{-68,68},{-76,90}}, lineColor={192,192,192}, diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo index b0b49aa7..bbad44db 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo @@ -17,7 +17,6 @@ package Math "Library of mathematical blocks" -56.1385},{43.5,-59.2318},{47,-61.2213},{50.5,-62.4442},{54, -63.1631},{57.5,-63.5674},{61,-63.7852},{64.5,-63.8975},{68, -63.953}}, - color={0,0,0}, smooth=Smooth.Bezier)}), Documentation(info=" ", revisions="

    @@ -25,12 +24,12 @@ package Math "Library of mathematical blocks"

    Date Description
    June 22, 2015 + @@ -210,7 +207,7 @@ as shown in the next table:

    For every block instance, the internally used pseudo random number generator -has its own state. This state must be properly initialized, depending on +has its own state. This state must be properly initialized, depending on the desired situation. For this purpose the following parameters can be defined:

    @@ -226,13 +223,13 @@ the desired situation. For this purpose the following parameters can be defined: instance of block GenericNoise. Therefore, whenever the globalSeed defines a different number, the noise at every instance is changing. This is the default setting and therefore the globalSeed component - defines whether every new simulation run shall provide the same noise + defines whether every new simulation run shall provide the same noise (e.g. for a parameter optimization of controller parameters), or whether every new simulation run shall provide different noise (e.g. for a Monte Carlo simulation).
    = false, if the seed defined by globalSeed is ignored. For example, if aerodynamic turbulence is modelled with a noise block and this turbulence - model shall be used for all simulation runs of a Monte Carlo simulation, then + model shall be used for all simulation runs of a Monte Carlo simulation, then useGlobalSeed has to be set to false. @@ -243,9 +240,9 @@ the desired situation. For this purpose the following parameters can be defined: If useAutomaticLocalSeed = true, the local seed is determined automatically from an impure random number generator that produces Integer random values (= calling function globalSeed.randomInteger()). - This is the default. + This is the default. Note, this means that the noise might change if function randomInteger() is called - more or less often in the overall model (e.g. because an additional noise block is + more or less often in the overall model (e.g. because an additional noise block is introduced or removed). It is planned to change the automatic local seed function in a future version of package Modelica, once Modelica Language 3.3 language elements can be used (by using a hash value of the instance name of the model that is @@ -257,7 +254,7 @@ the desired situation. For this purpose the following parameters can be defined: @@ -273,9 +270,9 @@ the desired situation. For this purpose the following parameters can be defined:

    Advanced tab: Random number generator

    -The (pseudo) random number generator to be used is defined here. +The (pseudo) random number generator to be used is defined here. The default is random number generator algorithm \"xorshift128+\". -This random number generator has a period of 2^128, +This random number generator has a period of 2^128, has an internal state of 4 Integer elements, and has excellent statistical properties. If the default algorithm is not desired, the @@ -290,8 +287,8 @@ following parameter can be set:

    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo index 569ef5f9..30993ac0 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo @@ -8,7 +8,7 @@ block BandLimitedWhiteNoise parameter Real noisePower = 1 "Power of white noise signal"; annotation (Documentation(info="

    -This block configures the GenericNoise block to produce +This block configures the GenericNoise block to produce band-limited white noise. This is performed by using a normal distribution with mu=0 and sigma = sqrt(noisePower/samplePeriod).

    @@ -19,7 +19,7 @@ parameters:

      -
    • The samplePeriod of the block should be much faster (say by a factor of 100) +
    • The samplePeriod of the block should be much faster (say by a factor of 100) than the fastest dynamics of the system fed by the block's outputs.
    • The noisePower of the signal should be set to the expected power per frequency of the white noise. Since many system models assume a noise power of 1, diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo index c9d57ebe..fe131be2 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo @@ -93,8 +93,7 @@ equation -23},{-37,-23},{-37,61},{-29,61},{-29,29},{-29,29},{-29,-31},{-19, -31},{-19,-13},{-9,-13},{-9,-41},{1,-41},{1,41},{7,41},{7,55},{13, 55},{13,-1},{23,-1},{23,11},{29,11},{29,-19},{39,-19},{39,53},{49, - 53},{49,19},{57,19},{57,-47},{67,-47}}, - color={0,0,0}), + 53},{49,19},{57,19},{57,-47},{67,-47}}), Text(visible=enableNoise, extent={{-150,-110},{150,-150}}, lineColor={0,0,0}, @@ -102,9 +101,7 @@ equation fillPattern=FillPattern.Solid, textString="%samplePeriod s"), Line(visible=not enableNoise, - points={{-76,56},{72,56}}, - color={0,0,0}, - smooth=Smooth.None), + points={{-76,56},{72,56}}), Text(visible=not enableNoise, extent={{-75,50},{95,10}}, lineColor={0,0,0}, @@ -142,28 +139,28 @@ When using this block, at a minimum the following parameters must be defined:
    samplePeriod Random values are drawn periodically at the sample rate in [s] - defined with this parameter (time events are generated at the sample instants). + defined with this parameter (time events are generated at the sample instants). Between sample instants, the output y is kept constant.
    distribution Defines the random number distribution to map the drawn random numbers from the range 0.0 ... 1.0, to the desired range and distribution. Basically, distribution is a replaceable function that - provides the quantile (= inverse cumulative distribution function) - of a random distribution. For simulation models + provides the quantile (= inverse cumulative distribution function) + of a random distribution. For simulation models truncated distributions are of special interest, because the returned random values are guaranteed to be in a defined band y_min ... y_max. Often used distributions are:
      -
    • Uniform distribution: +
    • Uniform distribution: The random values are mapped uniformly to the band y_min ... y_max.
    • -
    • Truncated normal distribution: +
    • Truncated normal distribution: The random values have a normal distribution that is truncated to y_min ... y_max. Measurement noise has often this distribution form. By default, the standard parameters of the truncated normal distribution are derived from - y_min ... y_max: mean value = (y_max + y_min)/2, standard deviation - = (y_max - y_min)/6 (= 99.7 % of the non-truncated normal distribution are + y_min ... y_max: mean value = (y_max + y_min)/2, standard deviation + = (y_max - y_min)/6 (= 99.7 % of the non-truncated normal distribution are within y_min ... y_max).
    useAutomaticLocalSeed
    fixedLocalSeed If useAutomaticLocalSeed = false, the local seed to be used. fixedLocalSeed can be any Integer number (including zero or a negative number). - The initialization algorithm produces a meaningful initial state of the random + The initialization algorithm produces a meaningful initial state of the random number generator from fixedLocalSeed and (if useAutomaticGlobalSeed=true) from globalSeed even for bad seeds such as 0 or 1, so the subsequently drawing of random numbers produce always statistically meaningful numbers.
    generator Defines the pseudo random number generator to be used. This is - a replaceable package. Meaningful random number generators are provided in - package Math.Random.Generators. + a replaceable package. Meaningful random number generators are provided in + package Math.Random.Generators. Properties of the various generators are described in the package description of the Generators package.
    @@ -302,12 +299,12 @@ following parameter can be set:
    Date Description
    June 22, 2015 + - -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo index c46fa6c4..f05fba56 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo @@ -55,8 +55,7 @@ into your model and specify the seed. textString="%fixedSeed"), Line(visible = not enableNoise, points={{-80,-4},{84,-4}}, - color={215,215,215}, - smooth=Smooth.None), + color={215,215,215}), Text(visible=enableNoise and not useAutomaticSeed, extent={{-84,34},{94,8}}, lineColor={255,0,0}, @@ -69,12 +68,12 @@ into your model and specify the seed.
    Date Description
    June 22, 2015 + @@ -143,14 +142,14 @@ Additionally, the globalSeed instance provides the following impure functions
    • random():
      This function uses the xorshift1024* - pseudo random number generator to produce random numbers in the range 0 < random numbers ≤ 1. + pseudo random number generator to produce random numbers in the range 0 < random numbers ≤ 1. It is initialized with the global seed defined in globalSeed (so either with parameter fixedSeed, or automatically computed by process ID and local time). Since random() is an impure function, it should only be called in a when-clause (so at an event).
    • randomInteger(imin=1,imax=Modelica.Constants.Integer_inf):
      This function uses the random() pseudo random number generator and maps the returned random value into the Integer range imin ... imax. By default, imin=1 and imax=Modelica.Constants.Integer_inf. - Since randomInteger() is an impure function, it should only be called in a when-clause + Since randomInteger() is an impure function, it should only be called in a when-clause (so at an event).
    diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo index 41158662..556497c7 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo @@ -5,16 +5,14 @@ package Noise "Library of noise blocks" annotation (Icon(graphics={Line( points={{-84,0},{-54,0},{-54,40},{-24,40},{-24,-70},{6,-70},{6,80}, - {36,80},{36,-20},{66,-20},{66,60}}, - color={0,0,0}, - smooth=Smooth.None)}), Documentation(info=" + {36,80},{36,-20},{66,-20},{66,60}})}), Documentation(info="

    This sublibrary contains blocks that generate reproducible noise with pseudo random numbers. Reproducibility is important when designing control systems, either manually or with optimization methods (for example when changing a parameter or a component of a control system and re-simulating, it is important that the noise does not change, because otherwise it is hard to determine whether the changed control system or the differently -computed noise has changed the behaviour of the controlled system). +computed noise has changed the behaviour of the controlled system). Many examples how to use the Noise blocks are provided in sublibrary Blocks.Examples.NoiseExamples.

    @@ -53,7 +51,7 @@ to define reproducible noise with the blocks of this sublibrary: @@ -63,21 +61,21 @@ to define reproducible noise with the blocks of this sublibrary: -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -114,7 +113,7 @@ hierarchical level. The following options can be selected: same fixedSeed exactly the same noise is generated in all instances of the Noise blocks (provided the settings of these blocks are not changed as well).
    This option can be used (a) to design a control system (e.g. by parameter optimization) and keep the same - noise for all simulations, or (b) perform Monte Carlo Simulations where + noise for all simulations, or (b) perform Monte Carlo Simulations where fixedSeed is changed from the environment for every simulation, in order to produce different noise at every simulation run.
    GenericNoise Random values are drawn periodically according to a given distribution (e.g. uniform or normal distribution) at a given sample rate - (time events are generated at the sample instants). + (time events are generated at the sample instants). Between sample instants, the output is kept constant.
    BandLimitedWhiteNoise
    globalSeed.random() Function random() is defined inside the globalSeed component. - On a lower hierarchical level, the function can be called via an + On a lower hierarchical level, the function can be called via an outer globalSeed declaration. For every call of this function, a new - random value is returned in the range 0 ... 1. + random value is returned in the range 0 ... 1. Since this is an impure function, it should only be called in a when-clause, so at an event instant. This is a more traditional random number generator in the seldom cases where it is needed to implement a special block.
    globalSeed.randomInteger(..) Function randomInteger(imin=1,imax=Modelica.Constants.Integer_inf) is + Function randomInteger(imin=1,imax=Modelica.Constants.Integer_inf) is defined inside the globalSeed component. It produces random Integer values in the range imin ... imax. - On a lower hierarchical level, the function can be called via an + On a lower hierarchical level, the function can be called via an outer globalSeed declaration. For every call of this function, a new - Integer random value is returned in the range imin ... imax. + Integer random value is returned in the range imin ... imax. Since this is an impure function, it should only be called in a when-clause, so at an event instant.
    @@ -90,11 +88,11 @@ to define reproducible noise with the blocks of this sublibrary: The core of the noise generation is the computation of uniform random numbers in the range 0.0 .. 1.0 (and these random numbers are transformed afterwards, see below). This sublibrary uses the xorshift random number generation -suite developed in 2014 by Sebastiano Vigna (for details see +suite developed in 2014 by Sebastiano Vigna (for details see http://xorshift.di.unimi.it and -Math.Random.Generators). +Math.Random.Generators). These random number generators have excellent -statistical properties, produce quickly statistically relevant random numbers, even if +statistical properties, produce quickly statistically relevant random numbers, even if starting from a bad initial seed, and have a reasonable length of the internal state vector of 2, 4, and 33 Integer elements. The short length state vectors are especially useful if every block instance has its own internal state vector, as needed for @@ -112,7 +110,7 @@ also user-defined generators.

    The uniform random numbers in the range 0.0 .. 1.0 are transformed to a desired -random number distribution by selecting an appropriate distribution or +random number distribution by selecting an appropriate distribution or truncated distribution. For an example of a truncated distribution, see the following diagram of the probabibilty density function of a normal distribution compared with its truncated version: @@ -125,7 +123,7 @@ compared with its truncated version:

    The corresponding inverse cumulative distribution functions are shown in the next diagram:

    - +

    @@ -151,12 +149,12 @@ a user-defined distribution can be selected.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.mo index 4f1aee8f..d958199e 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/package.mo @@ -6,7 +6,7 @@ package Interfaces "Library of interfaces for distribution functions" annotation (Documentation(info="

    This package contains partial functions that describe the -common interface arguments of the distribution and +common interface arguments of the distribution and truncated distribution functions.

    ", revisions=" @@ -15,12 +15,12 @@ truncated distribution functions.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialCumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialCumulative.mo index 35ea3f20..8adabc08 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialCumulative.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialCumulative.mo @@ -15,12 +15,12 @@ arguments of the cumulative distribution functions.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialDensity.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialDensity.mo index 42e558b1..ed0513c5 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialDensity.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialDensity.mo @@ -15,12 +15,12 @@ arguments of the probability density functions.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialQuantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialQuantile.mo index b5c8bc7f..95257b56 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialQuantile.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialQuantile.mo @@ -16,12 +16,12 @@ arguments of the quantile functions.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedCumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedCumulative.mo index 31d22852..754bed82 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedCumulative.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedCumulative.mo @@ -15,12 +15,12 @@ arguments of the cumulative distribution functions for a truncated distribution.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedDensity.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedDensity.mo index 465b235c..6608531a 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedDensity.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedDensity.mo @@ -15,12 +15,12 @@ arguments of the probability density functions of truncated distributions.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedQuantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedQuantile.mo index 6e234626..b75e853f 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedQuantile.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Interfaces/partialTruncatedQuantile.mo @@ -15,12 +15,12 @@ arguments of the quantile functions for truncated distributions.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/cumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/cumulative.mo index eac1a7fb..d7aa2f0b 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/cumulative.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/cumulative.mo @@ -15,7 +15,7 @@ Normal.cumulative(u, mu=0, sigma=1);

    Description

    -This function computes the cumulative distribution function according to a normal distribution +This function computes the cumulative distribution function according to a normal distribution with mean value mu and standard deviation sigma (variance = sigma2). The returned value y is in the range:

    @@ -33,7 +33,7 @@ Plot of the function:

    -For more details, see +For more details, see Wikipedia.

    @@ -54,12 +54,12 @@ For more details, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/density.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/density.mo index 374405ca..3e6f4d6b 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/density.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/density.mo @@ -24,7 +24,7 @@ Plot of the function:

    -For more details, see +For more details, see Wikipedia.

    @@ -45,12 +45,12 @@ For more details, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/package.mo index d8720d82..1bd9821e 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/package.mo @@ -15,7 +15,6 @@ annotation (Icon(graphics={Line( -51.5468},{42,-56.1385},{45.5,-59.2318},{49,-61.2213},{52.5, -62.4442},{56,-63.1631},{59.5,-63.5674},{63,-63.7852},{66.5, -63.8975},{70,-63.953}}, - color={0,0,0}, smooth=Smooth.Bezier)}), Documentation(info="

    This package provides @@ -51,12 +50,12 @@ For more details of this distribution see

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/quantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/quantile.mo index 749bf4f4..686f4e47 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/quantile.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/quantile.mo @@ -47,12 +47,12 @@ Plot of the function:

    -For more details, see +For more details, see Wikipedia.

    Example

    -
     
    +
       quantile(0.001)     // = -3.090232306167813;
       quantile(0.5,1,0.5) // = 1
     
    @@ -68,12 +68,12 @@ For more details, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo index 93892fcc..a31a7349 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo @@ -34,7 +34,7 @@ Normal.density(u, u_min=0, u_max=1, mu=0, sigma=1); This function computes the probability density function according to a truncated normal distribution with minimum value u_min, maximmum value u_max, -mean value of original distribution mu and +mean value of original distribution mu and standard deviation of original distribution sigma (variance = sigma2). Plot of the function:

    @@ -68,12 +68,12 @@ of truncated distributions, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -121,7 +121,7 @@ Normal.cumulative(u, u_min=0, u_max=1, mu=0, sigma=1); This function computes the cumulative distribution function according to a truncated normal distribution with minimum value u_min, maximmum value u_max, -mean value of original distribution mu and +mean value of original distribution mu and standard deviation of original distribution sigma (variance = sigma2). The returned value y is in the range:

    @@ -163,12 +163,12 @@ of truncated distributions, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -212,7 +212,7 @@ Normal.quantile(u, y_min=0, y_max=1, mu=0, sigma=1); This function computes the inverse cumulative distribution function (= quantile) according to a truncated normal distribution with minimum value u_min, maximmum value u_max, -mean value of original distribution mu and +mean value of original distribution mu and standard deviation of original distribution sigma (variance = sigma2). Input argument u must be in the range:

    @@ -251,7 +251,7 @@ of truncated distributions, see

    Example

    -
     
    +
       quantile(0.001)           // = 0.001087357613043849;
       quantile(0.5,0,1,0.5,0.9) // = 0.5
     
    @@ -267,12 +267,12 @@ of truncated distributions, see
    Date Description
    June 22, 2015 + - -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -289,29 +289,20 @@ of truncated distributions, see grid={1,1}), graphics={ Line( - points={{-32,-32},{-32,-80}}, - color={0,0,0}, - smooth=Smooth.None), + points={{-32,-32},{-32,-80}}), Line( points={{-32,-32},{-28,-21.0617},{-24.5,-7.4388},{-21,8.1682},{ -17.5,24.9428},{-14,41.695},{-10.5,56.9771},{-7,69.2797},{-3.5, 77.2739},{0,80.047},{3.5,77.2739},{7,69.2797},{10.5,56.9771},{ 14,41.695},{17.5,24.9428},{21,8.1682},{24.5,-7.4388},{28, -21.0617},{31.5,-32.2849},{35,-41.0467}}, - color={0,0,0}, smooth=Smooth.Bezier), Line( - points={{34.5,-40.5},{34.5,-78.5}}, - color={0,0,0}, - smooth=Smooth.None), + points={{34.5,-40.5},{34.5,-78.5}}), Line( - points={{34.5,-78.5},{70.5,-78.5}}, - color={0,0,0}, - smooth=Smooth.None), + points={{34.5,-78.5},{70.5,-78.5}}), Line( - points={{-68,-79},{-32,-79}}, - color={0,0,0}, - smooth=Smooth.None)}), + points={{-68,-79},{-32,-79}})}), Documentation(info="

    This package provides @@ -350,12 +341,12 @@ of truncated distributions, see

    Date Description
    June 22, 2015 +
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -364,9 +355,5 @@ of truncated distributions, see

    -"), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1}))); +")); end TruncatedNormal; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo index bed768ba..20fee1c3 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo @@ -66,12 +66,12 @@ of truncated distributions, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -159,12 +159,12 @@ of truncated distributions, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -246,7 +246,7 @@ of truncated distributions, see

    Example

    -
     
    +
       quantile(0.001)           // = 0.0006323204312624211;
       quantile(0.5,0,1,0.5,0.9) // = 0.256951787882498
     
    @@ -262,12 +262,12 @@ of truncated distributions, see
    Date Description
    June 22, 2015 + - -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -290,16 +290,11 @@ of truncated distributions, see 69.1658},{8.5,78},{12,75.3585},{15.5,65.6645},{19,52.0082},{ 22.5,36.6157},{26,21.0458},{29.5,6.3239},{33,-6.9424},{36.5, -18.4596},{40,-28.1579},{43.5,-36.1153}}, - color={0,0,0}, smooth=Smooth.Bezier), Line( - points={{43.5,-36},{43.5,-63}}, - color={0,0,0}, - smooth=Smooth.None), + points={{43.5,-36},{43.5,-63}}), Line( - points={{43.5,-63},{79.5,-63}}, - color={0,0,0}, - smooth=Smooth.None)}), + points={{43.5,-63},{79.5,-63}})}), Documentation(info="

    This package provides @@ -338,12 +333,12 @@ of truncated distributions, see

    Date Description
    June 22, 2015 +
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -352,9 +347,5 @@ of truncated distributions, see

    -"), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1}))); +")); end TruncatedWeibull; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/cumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/cumulative.mo index c33a7152..3034c8e2 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/cumulative.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/cumulative.mo @@ -15,7 +15,7 @@ Uniform.cumulative(u, u_min=0, u_max=1);

    Description

    -This function computes the cumulative distribution function +This function computes the cumulative distribution function according to a uniform distribution in a band. The returned value y is in the range:

    @@ -33,7 +33,7 @@ Plot of the function:

    -For more details, see +For more details, see Wikipedia.

    @@ -54,12 +54,12 @@ For more details, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/density.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/density.mo index 5cf4ecaf..a415d7f8 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/density.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/density.mo @@ -23,7 +23,7 @@ Plot of the function:

    -For more details, see +For more details, see Wikipedia.

    @@ -44,12 +44,12 @@ For more details, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/package.mo index f9c02d74..e76149fc 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/package.mo @@ -5,9 +5,7 @@ package Uniform "Library of uniform distribution functions" annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ -100,-100},{100,100}}), graphics={Line( - points={{-80,-60},{-40,-60},{-40,60},{40,60},{40,-60},{80,-60}}, - color={0,0,0}, - smooth=Smooth.None)}), Documentation(info=" + points={{-80,-60},{-40,-60},{-40,60},{40,60},{40,-60},{80,-60}})}), Documentation(info="

    This package provides

    @@ -42,12 +40,12 @@ For more details of this distribution see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/quantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/quantile.mo index c788c6d5..a5af236f 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/quantile.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Uniform/quantile.mo @@ -42,7 +42,7 @@ Plot of the function:

    -For more details, see +For more details, see Wikipedia.

    @@ -63,12 +63,12 @@ For more details, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/cumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/cumulative.mo index d7df7fda..d7734e5a 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/cumulative.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/cumulative.mo @@ -15,7 +15,7 @@ Weibull.cumulative(u, lambda=1, k=1);

    Description

    -This function computes the cumulative distribution function +This function computes the cumulative distribution function according to a Weibull distribution with scale parameter lambda and shape parameter k. Equation:

    @@ -41,7 +41,7 @@ Plot of the function:

    -For more details, see +For more details, see Wikipedia.

    @@ -62,12 +62,12 @@ For more details, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/density.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/density.mo index e303657f..22acd702 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/density.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/density.mo @@ -32,7 +32,7 @@ Plot of the function:

    -For more details, see +For more details, see Wikipedia.

    @@ -53,12 +53,12 @@ For more details, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/package.mo index 9d759be8..63ee0972 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/package.mo @@ -10,7 +10,6 @@ package Weibull "Library of Weibull distribution functions" 80},{12,77.3585},{15.5,67.6645},{19,54.0082},{22.5,38.6157},{26,23.0458},{29.5,8.32389}, {33,-4.9424},{36.5,-16.4596},{40,-26.1579},{43.5,-34.1153},{47,-40.4975},{50.5,-45.5133}, {54,-49.3832},{57.5,-52.3187},{61,-54.5105},{64.5,-56.123},{68,-57.2928}}, - color={0,0,0}, smooth=Smooth.Bezier)}), Documentation(info="

    This package provides @@ -46,12 +45,12 @@ For more details of this distribution see

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/quantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/quantile.mo index 2085cd93..cc49c11c 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/quantile.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/quantile.mo @@ -42,12 +42,12 @@ Plot of the function:

    -For more details, see +For more details, see Wikipedia.

    Example

    -
     
    +
       quantile(0)         // = 0
       quantile(0.5,1,0.5) // = 0.41627730557884884
     
    @@ -63,12 +63,12 @@ For more details, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo index 16218334..77136bb7 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/package.mo @@ -20,7 +20,6 @@ annotation (Icon(graphics={Line( -58.1385},{45.5,-61.2318},{49,-63.2213},{52.5,-64.4442},{56, -65.1631},{59.5,-65.5674},{63,-65.7852},{66.5,-65.8975},{70, -65.953}}, - color={0,0,0}, smooth=Smooth.Bezier)}), Documentation(info="

    This package provides @@ -40,11 +39,11 @@ of different distributions.

    In particular also truncated distributions are provided (see below). The main reason to introduce -truncated distributions is to make the modeling of measurement noise easier, in order to +truncated distributions is to make the modeling of measurement noise easier, in order to limit the band in which the noise can occur. For example, if a sensor is used and the sensor signal has a noise of ± 0.1 Volt (e.g. this can be determined by using a reference value of 0 V and inspecting the measured signal), then the sensor signal will be often the input -to an Analog-Digital converter and this converter limits the signal, say to ± 5 Volt. +to an Analog-Digital converter and this converter limits the signal, say to ± 5 Volt. Typically, the user would like to model noise within the noise band (say ± 0.1 Volt), and often uses a normal distribution. But a normal distribution is not limited and for a small sample time and a long simulation there might be some sample time instants @@ -52,12 +51,12 @@ where the noise values of the normal signal is outside the ± 0.1 Volt ran For some sensor types this is completely unrealistic (e.g. an angle sensor might measure ± 0.1 rad, but the sensor will never add, say one revolution (6.28 rad) to it. However, the noise model with a pure normal distribution could give such a value. -If a modeler would like to guarantee (and not to hope), that the modeled noise is +If a modeler would like to guarantee (and not to hope), that the modeled noise is always between ± 0.1 Volt, then there are two main possibilities: (a) The noise is computed and the result is then limited to ± 0.1 Volt, or (b) the normal distribution is slightly modified, so that it is within the band of ± 0.1 Volt. Approach (a) is a brute force method that changes the statistical properties of the signal in an unknown way. Approach (b) -is a \"clean\" mathematical description. The blocks in package +is a \"clean\" mathematical description. The blocks in package Blocks.Noise give the user the freedom to choose: Either compute a normal (unlimited) noise, or a truncated normal noise (truncated distribution). @@ -70,7 +69,7 @@ Details of truncated distributions

    Truncated distributions are distributions that are transformed in such a way that either the input is within a band u_min .. u_max, or the output is within -a band y_min .. y_max. +a band y_min .. y_max. A truncated distribution is derived from a base distribution (e.g. from the normal distribution), by truncating its propability density function to the desired band and adding a constant @@ -78,7 +77,7 @@ value over this band, in order that the integral over the truncated distribution remains one. All other properties (such as cumulative distribution function) can then be determined in a straightforward way, provided the properties of the underlying base distribution are available. -More details can be found, for example, in +More details can be found, for example, in Wikipedia (the equations from the \"Truncated Distribution\" box in the right part of this Wikipedia article are used for this package). @@ -87,7 +86,7 @@ of this Wikipedia article are used for this package).

    When using random numbers according to a given truncated distribution, the output of the inverse cumulative distribution function (= quantile) is restricted -to the defined band. +to the defined band.

    @@ -110,16 +109,16 @@ cdf_max = Distributions.XXX.cumulative(u_max,...); - + + else 1 - +
    FunctionTransformation
    density(u,u_min,u_max,...)= if u ≥ u_min and u≤u_max then pdf / (cdf_max - cdf_min) else 0= if u ≥ u_min and u≤u_max then pdf / (cdf_max - cdf_min) else 0
    cumulative(u,u_min,u_max,...) = if u ≤ u_min then 0 - else if u < u_max then + else if u < u_max then (cdf - cdf_min))/(cdf_max - cdf_min) - else 1
    quantile(u,u_min,u_max,...)= Distributions.XXX.quantile( cdf_min + u*(cdf_max - cdf_min), ... )= Distributions.XXX.quantile( cdf_min + u*(cdf_max - cdf_min), ... )
    @@ -139,12 +138,12 @@ compared with its truncated distribution:

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo index 8100bc32..7390e7d8 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo @@ -66,12 +66,12 @@ with a sample period of 0.05 s. Simulations results are shown in the figure belo
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/package.mo index c2dc1d52..ac0d7d68 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/package.mo @@ -6,7 +6,7 @@ package Examples "Examples demonstrating the usage of the functions in package R annotation (Documentation(info="

    This package contains examples demonstrating the usage of the functions in package -Random. +Random.

    ", revisions="

    @@ -14,12 +14,12 @@ This package contains examples demonstrating the usage of the functions in packa

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo index 829fc099..37b03e19 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo @@ -47,12 +47,12 @@ random number generator is used to fill the internal state vector with 64 bit ra
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -108,12 +108,12 @@ same random number r is returned.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -139,12 +139,12 @@ For an overview, comparison with other random number generators, and links to ar
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo index c317c1de..64778779 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo @@ -46,12 +46,12 @@ random number generator is used to fill the internal state vector with 64 bit ra
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -107,12 +107,12 @@ same random number r is returned.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -139,12 +139,12 @@ other random number generators, and links to articles, see
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo index 86d8098f..05cbfafc 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo @@ -9,7 +9,7 @@ protected Real r "Random number not used outside the function"; /* According to http://vigna.di.unimi.it/ftp/papers/xorshift.pdf, the xorshoft* - random number generator generates statistically random numbers from a bad seed + random number generator generates statistically random numbers from a bad seed within one iteration. To be on the safe side, 10 iterations are actually used */ constant Integer p = 10 "The number of iterations to use"; @@ -45,7 +45,7 @@ a reasonable initial state vector with the following strategy:

    If both input arguments are zero, a fixed non-zero value is used internally for localSeed. -According to xorshift.pdf, +According to xorshift.pdf, the xorshift64* random number generator generates statistically random numbers from a bad seed within one iteration. To be on the safe side, actually 10 random numbers are generated and the returned state is the one from the last iteration. @@ -70,12 +70,12 @@ and the returned state is the one from the last iteration.

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -130,12 +130,12 @@ same random number r is returned.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -161,12 +161,12 @@ For an overview, comparison with other random number generators, and links to ar
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo index b1b2bc33..4445ffa4 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo @@ -5,9 +5,7 @@ package Generators "Library of functions generating uniform random numbers in th annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ -100,-100},{100,100}}), graphics={Line( - points={{-90,-54},{-50,-54},{-50,54},{50,54},{50,-54},{84,-54}}, - color={0,0,0}, - smooth=Smooth.None)}), Documentation(info=" + points={{-90,-54},{-50,-54},{-50,54},{50,54},{50,-54},{84,-54}})}), Documentation(info="

    This package contains various pseudo random number generators. A random number generator is a package that is derived from Random.Utilities.Interfaces.PartialGenerator @@ -15,12 +13,12 @@ and consists of the following elements:

    • Integer nState is a constant that defines the length of the internal state vector - (in order that an appropriate Integer vector of this length can be declared, depending on + (in order that an appropriate Integer vector of this length can be declared, depending on the selected random number generator).
    • Function initialState(..) is used to initialize the state of the random number generator by providing Integer seeds and calling the random number generator often enough that statistically relevant random numbers are returned by every call of function random(..).
    • -
    • Function random(..) is used to return a random number of type Real in the range +
    • Function random(..) is used to return a random number of type Real in the range 0.0 < random ≤ 1.0 for every call. Furthermore, the updated (internal) state of the random number generator is returned as well.
    • @@ -42,9 +40,9 @@ articles:

      -Sebastiano Vigna: +Sebastiano Vigna: An experimental exploration of Marsaglia's xorshift generators, scrambled, 2014.
      -Sebastiano Vigna: +Sebastiano Vigna: Further scramblings of Marsaglia's xorshift generators, 2014.

      @@ -115,7 +113,7 @@ Further explanations of the properties above: \"A long period does not imply high quality\" a period of 2^1024 is by far large enough for even massively parallel simulations with huge number of random number computations per simulation. - A period of 2^128 might be not enough for massively parallel simulations. + A period of 2^128 might be not enough for massively parallel simulations.
    • Length of state (# 32 bit integer) defines the number of \"int\" (that is Modelica Integer) elements @@ -125,7 +123,7 @@ Further explanations of the properties above: a huge framework for testing random number generators. According to these tests, the statistical properties of the xorshift random number generators are better than the ones of the Mersenne Twister random number generator.
    • - +
    • Worst case startup means how many calls are needed until getting from a bad seed to random numbers with appropriate statistical properties. Here, the xorshift random number suite has much better properties @@ -162,7 +160,7 @@ The xorshift random number generators are used in the following way in the which in turn is used with Blocks.Noise.GlobalSeed.random. The internal state vector is not exposed. It is updated internally, whenever a new random number - is drawn.
    • + is drawn.

      @@ -175,12 +173,12 @@ These numbers are mapped to the 52 bit mantissa of double numbers in the range 0

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo index 466ecc85..683c5642 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo @@ -23,12 +23,12 @@ initialState(..) function of a random number generator package.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -61,12 +61,12 @@ random(..) function of a random number generator package.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -92,12 +92,12 @@ to the correct length of the state vector.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.mo index c00c3df8..7092152d 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.mo @@ -14,12 +14,12 @@ of functions of the same kind (like random(..) function).
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/Linear/der_interpolate.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/Linear/der_interpolate.mo index f1b75642..a759d4f0 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/Linear/der_interpolate.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/Linear/der_interpolate.mo @@ -45,12 +45,12 @@ algorithm
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/der_interpolate.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/der_interpolate.mo index 0736b734..18042df9 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/der_interpolate.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/der_interpolate.mo @@ -36,12 +36,12 @@ algorithm
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/der_kernel_offset.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/der_kernel_offset.mo index 007f8e9a..65eca344 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/der_kernel_offset.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/der_kernel_offset.mo @@ -19,12 +19,12 @@ annotation (Documentation(info="
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/kernel.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/kernel.mo index 061412eb..b53ddae5 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/kernel.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/SmoothIdealLowPass/kernel.mo @@ -19,12 +19,12 @@ algorithm
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/package.order b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/package.order deleted file mode 100644 index e69de29b..00000000 diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo index bc06bfd7..63af684d 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo @@ -40,7 +40,7 @@ This function should be only called once during initialization.
       parameter Boolean useAutomaticSeed = false;
       parameter Integer fixedSeed = 67867967;
    -  final parameter Integer seed = if useAutomaticSeed then 
    +  final parameter Integer seed = if useAutomaticSeed then
                                         Random.Utilities.automaticGlobalSeed()
                                      else fixedSeed;
     
    @@ -57,12 +57,12 @@ This function should be only called once during initialization.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticLocalSeed.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticLocalSeed.mo index 4b4792d7..8843a65d 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticLocalSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticLocalSeed.mo @@ -29,7 +29,7 @@ seed = Utilities.automaticLocalSeed(path);

    Description

    -Returns an automatically computed seed (Integer) from the hash value of +Returns an automatically computed seed (Integer) from the hash value of the full path name of an instance (has to be inquired in the model or block where this function is called by getInstanceName()). Contrary to automaticGlobalSeed(), this is a pure function, that is, the same seed is returned, if an identical @@ -39,10 +39,10 @@ path is provided.

    Example

     parameter Boolean useAutomaticLocalSeed = true;
    -parameter Integer fixedLocalSeed        = 10; 
    -final parameter Integer localSeed = if useAutomaticLocalSeed then 
    +parameter Integer fixedLocalSeed        = 10;
    +final parameter Integer localSeed = if useAutomaticLocalSeed then
                                            automaticLocalSeed(getInstanceName())
    -                                    else 
    +                                    else
                                            fixedLocalSeed;
     
    @@ -56,12 +56,12 @@ path is provided.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo index f996c5fd..2624f9f4 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo @@ -29,7 +29,7 @@ is returned, so the function is impure. function random = impureRandom (final id=id); protected Integer id; -equation +equation // Initialize the random number generator when initial() then id = initializeImpureRandom(seed); @@ -54,12 +54,12 @@ is returned, so the function is impure.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo index e3a6de54..15876d56 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo @@ -41,12 +41,12 @@ algorithm
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo index 6512a612..d78c36a7 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo @@ -55,7 +55,7 @@ random number generator to fill the internal state vector with 64 bit random num function random = impureRandom (final id=id); protected Integer id; -equation +equation // Initialize the random number generator when initial() then id = initializeImpureRandom(seed); @@ -78,12 +78,12 @@ random number generator to fill the internal state vector with 64 bit random num
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/package.mo index 7455d0a4..72262490 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/package.mo @@ -17,12 +17,12 @@ that are usually of no interested for the user
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/package.mo index afced108..09e8f461 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/package.mo @@ -48,12 +48,12 @@ package Blocks.Noise).
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/Internal.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal.mo index 4a402fbf..a06c4a53 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Special/Internal.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal.mo @@ -22,12 +22,12 @@ Evaluate a polynomial using Horner's scheme.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -143,12 +143,12 @@ Utility function in order to compute part of erf(..) and erfc(..).
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -399,12 +399,12 @@ Utility function in order to compute erfInv(..) and erfcInv(..).
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -417,7 +417,7 @@ Utility function in order to compute erfInv(..) and erfcInv(..). end erfInvUtil; annotation (Documentation(info="

    -This package contains internal utility functions for the computation of +This package contains internal utility functions for the computation of erf, erfc, erfInc and erfcInv. These functions should not be directly used by the user.

    @@ -427,12 +427,12 @@ by the user.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/erf.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/erf.mo index 92417dbb..54c66031 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Special/erf.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/erf.mo @@ -61,7 +61,7 @@ Special.erf(u);

    This function computes the error function erf(u) = 2/sqrt(pi)*Integral_0_u exp(-t^2)*dt numerically with a relative precision of about 1e-15. The implementation utilizes the formulation of the Boost library (53-bit implementation of erf.hpp, -developed by John Maddock). Plot +developed by John Maddock). Plot of the function:

    @@ -92,12 +92,12 @@ For more details, see Wi
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/erfInv.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/erfInv.mo index 6dfb7b7a..1f224582 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Special/erfInv.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/erfInv.mo @@ -69,12 +69,12 @@ For more details, see Wi
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/erfc.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/erfc.mo index d91ee9ae..c30d464e 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Special/erfc.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/erfc.mo @@ -34,7 +34,7 @@ Special.erfc(u);

    This function computes the complementary error function erfc(u) = 1 - erf(u) with a relative precision of about 1e-15. The implementation utilizes the formulation of the Boost library (53-bit implementation of erf.hpp -developed by John Maddock). Plot +developed by John Maddock). Plot of the function:

    @@ -44,7 +44,7 @@ of the function:

    If u is large and erf(u) is subtracted from 1.0, the result is not accurate. -It is then better to use erfc(u). For more details, +It is then better to use erfc(u). For more details, see Wikipedia.

    @@ -67,12 +67,12 @@ see Wikipedia.
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/erfcInv.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/erfcInv.mo index 537a717e..49b0adec 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Special/erfcInv.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/erfcInv.mo @@ -29,7 +29,7 @@ Special.erfInv(u);

    Description

    -This function computes the inverse of the complementary error function +This function computes the inverse of the complementary error function erfc(u) = 1 - erf(u) with a relative precision of about 1e-15. Therefore, u = erfc(erfcInv(u)) and erfcInv(u) = erfInv(1 - u). Input argument u must be in the range (otherwise an assertion is raised): @@ -74,12 +74,12 @@ For more details, see Wi

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/package.mo index 441ffa87..47c700e7 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Special/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/package.mo @@ -5,7 +5,6 @@ package Special "Library of special mathematical functions" annotation (Icon(graphics={Line( points={{-80,-80},{-20,-80},{20,80},{80,80}}, - color={0,0,0}, smooth=Smooth.Bezier)}), Documentation(info="

    This sublibrary contains functions to compute often used mathematical operators that @@ -17,12 +16,12 @@ cannot be expressed analytically.

    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/sinc.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/sinc.mo index 5c9270e3..cb50436c 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Special/sinc.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/sinc.mo @@ -12,12 +12,12 @@ algorithm
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control @@ -35,7 +35,7 @@ Special.sinc(u);

    Description

    This function computes the unnormalized sinc function sinc(u) = sin(u)/u. The implementation utilizes -a Taylor series approximation for small values of u. Plot +a Taylor series approximation for small values of u. Plot of the function:

    diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c index f000e8a7..34e88c14 100644 --- a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c +++ b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c @@ -493,13 +493,13 @@ MODELICA_EXPORT void ModelicaRandom_xorshift1024star(int state_in[], int state_o /* these functions give access to an external random number state you should be very careful about using them... - - The external variables are + + The external variables are - ModelicaRandom_s: The first part of the internal state of xorshift1024* - ModelicaRandom_p: The second part of the internal state of xorshift1024* - ModelicaRandom_id: The check variable used for initializing the state - - We use MUTEX_LOCK() and MUTEX_UNLOCK() as defined above for + + We use MUTEX_LOCK() and MUTEX_UNLOCK() as defined above for thread-safe access to these variables. */ diff --git a/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo b/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo index 03cf1ef7..93641d18 100644 --- a/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo +++ b/Modelica_Noise 1.0 Beta.1/ToModelicaTest.mo @@ -526,7 +526,7 @@ mu-3*sigma ≤ y ≤ mu+3*sigma

    -This function is only for test purposes. It computes the quantile (= inverse cumulative distribution function) of a normal distribution with a reduced precision of about 1e-7. +This function is only for test purposes. It computes the quantile (= inverse cumulative distribution function) of a normal distribution with a reduced precision of about 1e-7.

    diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/Strings/hashString.mo b/Modelica_Noise 1.0 Beta.1/Utilities/Strings/hashString.mo index 59c029e8..fdbeb0cc 100644 --- a/Modelica_Noise 1.0 Beta.1/Utilities/Strings/hashString.mo +++ b/Modelica_Noise 1.0 Beta.1/Utilities/Strings/hashString.mo @@ -26,12 +26,12 @@ Returns an Integer hash value of the provided string

    Date Description
    June 22, 2015 +
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/Strings/package.mo b/Modelica_Noise 1.0 Beta.1/Utilities/Strings/package.mo index fa366d43..bd60af2f 100644 --- a/Modelica_Noise 1.0 Beta.1/Utilities/Strings/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Utilities/Strings/package.mo @@ -1,17 +1,17 @@ within Modelica_Noise.Utilities; -package Strings +package Strings annotation (Documentation(revisions="

    -
    Date Description
    June 22, 2015 + - + + + + +
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo b/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo index d81ac3b9..9cd48dbc 100644 --- a/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo +++ b/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo @@ -27,12 +27,12 @@ getPid() // = 3044
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo b/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo index ca8a85d2..1b9905ca 100644 --- a/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo +++ b/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo @@ -16,7 +16,7 @@ function getTime "Retrieves the local time (in the local time zone)"

    Description

    -Returns the local time at the time instant this function was called. +Returns the local time at the time instant this function was called. All returned values are of type Integer and have the following meaning:

    @@ -62,12 +62,12 @@ All returned values are of type Integer and have the following meaning:
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/System/package.mo b/Modelica_Noise 1.0 Beta.1/Utilities/System/package.mo index e62337fd..81cbe1fe 100644 --- a/Modelica_Noise 1.0 Beta.1/Utilities/System/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Utilities/System/package.mo @@ -1,5 +1,5 @@ within Modelica_Noise.Utilities; -package System +package System annotation (Documentation(revisions=" @@ -8,12 +8,12 @@ annotation (Documentation(revisions="
    Date Description
    June 22, 2015 + -
    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control diff --git a/Modelica_Noise 1.0 Beta.1/package.mo b/Modelica_Noise 1.0 Beta.1/package.mo index 4c5879cb..a6cd2755 100644 --- a/Modelica_Noise 1.0 Beta.1/package.mo +++ b/Modelica_Noise 1.0 Beta.1/package.mo @@ -22,12 +22,12 @@ ModelicaTest library.
    Date Description
    June 22, 2015 + diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo index 4445ffa4..f140bc83 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo @@ -144,18 +144,18 @@ The xorshift random number generators are used in the following way in the Blocks.Noise package:

      -
    1. Xorshift64start (xorshift64*) is used to generate the initial internal state vectors of the +
    2. Xorshift64star (xorshift64*) is used to generate the initial internal state vectors of the other generators from two Integer values, due to the very good startup properties.
    3. -
    4. Xorshit128plus (xorshift128+) is the default random number generator +
    5. Xorshift128plus (xorshift128+) is the default random number generator used by the blocks in Blocks.Noise. Since these blocks hold the internal state vector for every block instance, and the internal state vector is copied whenever a new random number is drawn, it is important that the internal state vector is short (and still has good statistical properties as shown in the table above).
    6. -
    7. Xorshit12024star (xorshift1024*) is the basis of the impure function +
    8. Xorshift1024star (xorshift1024*) is the basis of the impure function Math.Random.Utilities.impureRandom which in turn is used with Blocks.Noise.GlobalSeed.random. diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo index 1edc1283..75b6c78a 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo @@ -44,7 +44,7 @@ dummy Integer number id. This number needs to be passed as input to function in order that the sorting order is correct (so that impureRandom is always called after initializeImpureRandom). The function stores a reasonable initial state vector in a C-static memory by using the -Xorshift64start +Xorshift64star random number generator to fill the internal state vector with 64 bit random numbers.

      From 3326f39c49575c97972f78a3e51c5a1b8f456395 Mon Sep 17 00:00:00 2001 From: tbeu Date: Tue, 6 Oct 2015 22:43:35 +0200 Subject: [PATCH 32/46] Fix quantity of samplePeriod --- .../Blocks/Examples/NoiseExamples/Distributions.mo | 2 +- .../Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo | 2 +- Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo | 2 +- .../Math/Random/Examples/GenerateRandomNumbers.mo | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo index cfa61c83..a88fc9a6 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo @@ -1,7 +1,7 @@ within Modelica_Noise.Blocks.Examples.NoiseExamples; model Distributions "Demonstrates noise with different types of distributions" extends Modelica.Icons.Example; - parameter Modelica.SIunits.Time samplePeriod=0.02 + parameter Modelica.SIunits.Period samplePeriod=0.02 "Sample period of all blocks"; parameter Real y_min = -1 "Minimum value of band for random values"; parameter Real y_max = 3 "Maximum value of band for random values"; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo index 3ddb6444..0c6a9213 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo @@ -3,7 +3,7 @@ block ImpureRandom "Block generating random numbers with the impure random number generator" extends Modelica.Blocks.Interfaces.SO; - parameter Modelica.SIunits.Time samplePeriod + parameter Modelica.SIunits.Period samplePeriod "Sample period for random number generation"; protected diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo index fe131be2..f1cf5f24 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo @@ -4,7 +4,7 @@ block GenericNoise "Noise generator for arbitrary distributions" extends Modelica.Blocks.Interfaces.SO; // Main dialog menu - parameter Modelica.SIunits.Time samplePeriod(start=0.01) + parameter Modelica.SIunits.Period samplePeriod(start=0.01) "Period for sampling the raw random numbers" annotation(Dialog(enable=enableNoise)); replaceable partial function distribution = diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo index 36ae8a64..1098e4f6 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo @@ -4,7 +4,7 @@ model GenerateRandomNumbers extends Modelica.Icons.Example; // Global parameters - parameter Modelica.SIunits.Time samplePeriod = 0.05 + parameter Modelica.SIunits.Period samplePeriod = 0.05 "Sample period for the generation of random numbers"; parameter Integer globalSeed = 30020 "Global seed to initialize random number generator"; From 045e925de67b36962c2f4d25628afe7143be3d8e Mon Sep 17 00:00:00 2001 From: tbeu Date: Tue, 6 Oct 2015 22:45:48 +0200 Subject: [PATCH 33/46] Fix typo --- .../Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo index 3ddb6444..8ceeea5b 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo @@ -15,7 +15,7 @@ equation end when; annotation (Documentation(info="

      -This block demonstrates how to implement a block usign the impure +This block demonstrates how to implement a block using the impure random number generator. This block is used in the example Examples.NoiseExamples.ImpureGenerator.

      From 50bd942c32032601ae8c42a92533c229414815f4 Mon Sep 17 00:00:00 2001 From: tbeu Date: Wed, 7 Oct 2015 20:30:57 +0200 Subject: [PATCH 34/46] Must not display any unit here since user might have chosen different displayUnit --- Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo index f1cf5f24..3e99cfa8 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo @@ -99,7 +99,7 @@ equation lineColor={0,0,0}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, - textString="%samplePeriod s"), + textString="%samplePeriod"), Line(visible=not enableNoise, points={{-76,56},{72,56}}), Text(visible=not enableNoise, From 64a3bb85a6a023eec68fd5c97c9927cdc97e7145 Mon Sep 17 00:00:00 2001 From: tbeu Date: Wed, 7 Oct 2015 21:23:17 +0200 Subject: [PATCH 35/46] Fix typo --- Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo index 30993ac0..8cc33521 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo @@ -23,7 +23,7 @@ parameters: than the fastest dynamics of the system fed by the block's outputs.
    9. The noisePower of the signal should be set to the expected power per frequency of the white noise. Since many system models assume a noise power of 1, - this preset may be a reasonable first choice (= defautl).
    10. + this preset may be a reasonable first choice (= default).

      About sampling frequencies

      From 0252f92fc3e67cec87a3dc9d5fb28cf0158274ba Mon Sep 17 00:00:00 2001 From: akloeckner Date: Thu, 8 Oct 2015 11:32:13 +0200 Subject: [PATCH 36/46] Typo fixes #69 --- Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo index 8cc33521..73ebf5e6 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo @@ -33,7 +33,7 @@ Ideal white noise contains all frequencies, including infinitely high ones. However, these usually cannot be observed in physical systems, since all physical systems in one way or the other contain low-pass filters. It is thus sufficient to generate a limited range of frequency content in the noise signal, as long as it exceeds the frequencies of -the subsequent dynamics by a suffiently high factor (of e.g. 100). +the subsequent dynamics by a sufficiently high factor (of e.g. 100).

      About noise power

      From 40a3a69554cec234d71e5b6c107671102a1d7847 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Thu, 8 Oct 2015 21:29:44 +0200 Subject: [PATCH 37/46] Add hints that only one globalSeed is allowed. See #70 --- Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo | 2 ++ Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo index fa0a276b..c8aab1fa 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo @@ -167,6 +167,8 @@ is used to compute these 33 Integers. This random number generator has a state o is initialized with the global and local seed integers. Afterwards, random values are produced with this random number generator and utilized as values for the internal state of the Xorshift1024star random number generator. +Due to the implementation with an external state vector, this block may only be instantiated once +in a model! So, the block will usually reside on the top level of the model.

      ")); end GlobalSeed; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo index 556497c7..61f3a60b 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo @@ -35,6 +35,9 @@ This block is used to define global options that hold for all Noise block instances (such as a global seed for initializing the random number generators, and a flag to switch off noise). +

      +Please note that only one globalSeed instance may be defined in the model due to the block's implementation! So, the block will usually reside on the top level of the model. +

      Reproducible Noise

      From 0506bb1744b8fb173e48a21fceaf9b0b04203fa2 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Thu, 8 Oct 2015 23:22:41 +0200 Subject: [PATCH 38/46] =?UTF-8?q?Simplify=20generator=20packages=20*=20cre?= =?UTF-8?q?ate=20separate=20function=20interfaces=20in=20order=20to=20avoi?= =?UTF-8?q?d=20=C2=B4=C2=B4redeclare=20function=20extends=20random=C2=B4?= =?UTF-8?q?=C2=B4=20*=20simplify=20name=20lookup=20by=20using=20different?= =?UTF-8?q?=20names=20stateSize=20and=20nState?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Examples/NoiseExamples/GenericNoise.mo | 2 +- .../Generators/Xorshift1024star/package.mo | 8 ++-- .../Generators/Xorshift128plus/package.mo | 8 ++-- .../Generators/Xorshift64star/package.mo | 8 ++-- .../Math/Random/Generators/package.mo | 3 ++ .../Interfaces/PartialGenerator/package.mo | 17 ++------ .../Math/Random/Interfaces/initialState.mo | 37 ++++++++++++++++++ .../Math/Random/Interfaces/package.mo | 2 +- .../Math/Random/Interfaces/package.order | 2 + .../Math/Random/Interfaces/random.mo | 39 +++++++++++++++++++ 10 files changed, 101 insertions(+), 25 deletions(-) create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/initialState.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/random.mo diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo index 42bccc34..0dd25dc5 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo @@ -1,7 +1,7 @@ within Modelica_Noise.Blocks.Examples.NoiseExamples; model GenericNoise "Demonstrates the most simple usage of the GenericNoise block" - extends Modelica.Icons.Example; + extends Modelica.Icons.Example; inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed annotation (Placement(transformation(extent={{-20,40},{0,60}}))); diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo index de44093f..d5965843 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo @@ -1,10 +1,11 @@ within Modelica_Noise.Math.Random.Generators; package Xorshift1024star "Random number generator xorshift1024*" - extends Interfaces.PartialGenerator( final nState=33); + extends Interfaces.PartialGenerator(final nState = 33); - redeclare function extends initialState + redeclare function initialState "Returns an initial state for the xorshift1024* algorithm" + extends Interfaces.initialState(final stateSize=Xorshift1024star.nState); algorithm state := Random.Utilities.initialStateWithXorshift64star(localSeed,globalSeed,size(state, 1)); annotation(Inline=true, Documentation(info=" @@ -65,8 +66,9 @@ random number generator is used to fill the internal state vector with 64 bit ra end initialState; - redeclare function extends random + redeclare function random "Returns a uniform random number with the xorshift1024* algorithm" + extends Interfaces.random(final stateSize=Xorshift1024star.nState); external "C" ModelicaRandom_xorshift1024star(stateIn, stateOut, result) annotation (Include = "#include \"ModelicaRandom.c\""); annotation (Documentation(info=" diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo index 21fa612d..6f17f506 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo @@ -1,10 +1,11 @@ within Modelica_Noise.Math.Random.Generators; package Xorshift128plus "Random number generator xorshift128+" - extends Interfaces.PartialGenerator( final nState=4); + extends Interfaces.PartialGenerator(final nState = 4); - redeclare function extends initialState + redeclare function initialState "Returns an initial state for the xorshift128+ algorithm" + extends Interfaces.initialState(final stateSize=Xorshift128plus.nState); algorithm state := Random.Utilities.initialStateWithXorshift64star(localSeed,globalSeed,size(state, 1)); annotation(Inline=true, Documentation(info=" @@ -64,8 +65,9 @@ random number generator is used to fill the internal state vector with 64 bit ra end initialState; - redeclare function extends random + redeclare function random "Returns a uniform random number with the xorshift128+ algorithm" + extends Interfaces.random(final stateSize=Xorshift128plus.nState); external "C" ModelicaRandom_xorshift128plus(stateIn, stateOut, result) annotation (Include = "#include \"ModelicaRandom.c\""); annotation (Documentation(info=" diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo index 90ffc080..3e8872e2 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo @@ -1,10 +1,11 @@ within Modelica_Noise.Math.Random.Generators; package Xorshift64star "Random number generator xorshift64*" - extends Interfaces.PartialGenerator( final nState=2); + extends Interfaces.PartialGenerator(final nState = 2); - redeclare function extends initialState + redeclare function initialState "Returns an initial state for the xorshift64* algorithm" + extends Interfaces.initialState(final stateSize=Xorshift64star.nState); protected Real r "Random number not used outside the function"; @@ -88,8 +89,9 @@ and the returned state is the one from the last iteration. end initialState; - redeclare function extends random + redeclare function random "Returns a uniform random number with the xorshift64* algorithm" + extends Interfaces.random(final stateSize=Xorshift64star.nState); external "C" ModelicaRandom_xorshift64star(stateIn, stateOut, result) annotation (Include = "#include \"ModelicaRandom.c\""); annotation(Documentation(info=" diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo index f140bc83..3f5a8e4e 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo @@ -3,6 +3,9 @@ package Generators "Library of functions generating uniform random numbers in th extends Modelica.Icons.Package; + + + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ -100,-100},{100,100}}), graphics={Line( points={{-90,-54},{-50,-54},{-50,54},{50,54},{50,-54},{84,-54}})}), Documentation(info=" diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo index 683c5642..986669fb 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo @@ -1,17 +1,12 @@ within Modelica_Noise.Math.Random.Interfaces; partial package PartialGenerator "Interfaces of a uniform random number generator" extends Modelica.Icons.Package; - constant Integer nState=1 "The dimension of the internal state vector"; + constant Integer nState "The dimension of the internal state vector"; replaceable partial function initialState "Return the initial internal states for the uniform random number generator" - extends Modelica.Icons.Function; - input Integer localSeed - "The local seed to be used for generating initial states"; - input Integer globalSeed - "The global seed to be combined with the local seed"; - output Integer[nState] state "The generated initial states"; + extends Interfaces.initialState(final stateSize=nState); annotation (Documentation(info="

      This partial function defines the input and output arguments of an @@ -43,13 +38,7 @@ initialState(..) function of a random number generator package. replaceable partial function random "Return a random number with a uniform distribution in the range 0.0 < result <= 1.0" - extends Modelica.Icons.Function; - input Integer[nState] stateIn - "The internal states for the random number generator"; - output Real result - "A random number with a uniform distribution on the interval (0,1]"; - output Integer[nState] stateOut - "The new internal states of the random number generator"; + extends Interfaces.random(final stateSize=nState); annotation (Documentation(info="

      This partial function defines the input and output arguments of a diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/initialState.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/initialState.mo new file mode 100644 index 00000000..ab17b7af --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/initialState.mo @@ -0,0 +1,37 @@ +within Modelica_Noise.Math.Random.Interfaces; +partial function initialState + "Return the initial internal states for the uniform random number generator" + extends Modelica.Icons.Function; + input Integer localSeed + "The local seed to be used for generating initial states"; + input Integer globalSeed "The global seed to be combined with the local seed"; + input Integer stateSize "The dimension of the internal state vector"; + output Integer[stateSize] state "The generated initial states"; +annotation (Documentation(info=" +

      +This partial function defines the input and output arguments of an +initialState(..) function of a random number generator package. +

      +", + revisions=" +

      +

    - + Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    DLR Institute of System Dynamics and Control From 0fa01c65d3755780a83f403df6f139ddcd6d4d35 Mon Sep 17 00:00:00 2001 From: tbeu Date: Mon, 31 Aug 2015 22:56:52 +0200 Subject: [PATCH 21/46] Add empty package.order again --- Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/package.order | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/package.order diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/package.order b/Modelica_Noise 1.0 Beta.1/Math/Random/Interpolators/package.order new file mode 100644 index 00000000..e69de29b From c8caf6aa8f5bc9218572080152734f8d26f411df Mon Sep 17 00:00:00 2001 From: fvanderlinden Date: Fri, 4 Sep 2015 10:58:30 +0200 Subject: [PATCH 22/46] Updated Licence info of ModelicaRandom --- .../Resources/Include/ModelicaRandom.c | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c index f000e8a7..ae3e54a4 100644 --- a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c +++ b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c @@ -18,10 +18,28 @@ Copyright (C) 2015, Modelica Association and DLR. - The content of this file is free software; it can be redistributed - and/or modified under the terms of the Modelica License 2, see the - license conditions and the accompanying disclaimer in file - Modelica/ModelicaLicense2.html or in Modelica.UsersGuide.ModelicaLicense2. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Modelica Association nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef MODELICARANDOM_H From 800418dedbf8dab3aa0e65b39c1916230909a9e8 Mon Sep 17 00:00:00 2001 From: fvanderlinden Date: Mon, 7 Sep 2015 18:25:53 +0200 Subject: [PATCH 23/46] updated licence --- .../Resources/Include/ModelicaRandom.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c index 603ef333..785ba058 100644 --- a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c +++ b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c @@ -16,19 +16,19 @@ Feb. 17, 2015: by Andreas Klöckner and Martin Otter, DLR-SR. Implemented a first version. - Copyright (C) 2015, Modelica Association and DLR. - + This file is licensed under the BSD 2-Clause License: + + Copyright (C) 2015, DLR. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Modelica Association nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED From ed64dc2d2e64200f250e306cce7bc15c743c4e19 Mon Sep 17 00:00:00 2001 From: fvanderlinden Date: Mon, 7 Sep 2015 18:27:34 +0200 Subject: [PATCH 24/46] added Modelica Association to licence file --- Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c index 785ba058..8a7af5fb 100644 --- a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c +++ b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c @@ -18,7 +18,7 @@ This file is licensed under the BSD 2-Clause License: - Copyright (C) 2015, DLR. + Copyright (C) 2015, DLR and Modelica Association. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: From a5cfb8c19a4cebe00141e2b99ce6daf4a0b1a3a0 Mon Sep 17 00:00:00 2001 From: Franciscus van der Linden Date: Mon, 7 Sep 2015 18:35:35 +0200 Subject: [PATCH 25/46] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6577ce8d..0d001c5b 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,9 @@ Potential applications of the provided elements are: The master branch of this library is currently reviewed for inclusion in the MSL. -## Original release +## Current release -The original version of this library was released after the Modelica conference in 2014: - -Download [Noise 0.2.0 (2014-06-13)](../../archive/v0.2.0.zip) +Download [Noise 0.1 Beta.1 (2015-09-07)](../../archive/v1.0-beta.1.zip) ## License From c28eb1d0961b826585896deb572fd47a30581409 Mon Sep 17 00:00:00 2001 From: Franciscus van der Linden Date: Mon, 7 Sep 2015 18:36:12 +0200 Subject: [PATCH 26/46] Update README.md Typos.... --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d001c5b..ad02a719 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The master branch of this library is currently reviewed for inclusion in the MSL ## Current release -Download [Noise 0.1 Beta.1 (2015-09-07)](../../archive/v1.0-beta.1.zip) +Download [Noise 1.0 Beta.1 (2015-09-07)](../../archive/v1.0-beta.1.zip) ## License From 535a5ea3775c0a4bb0471fe4f0f1dc1e47999694 Mon Sep 17 00:00:00 2001 From: tbeu Date: Sat, 3 Oct 2015 21:14:37 +0200 Subject: [PATCH 27/46] Fix external "C" annotation --- .../Math/Random/Generators/Xorshift1024star/package.mo | 6 +++--- .../Math/Random/Generators/Xorshift128plus/package.mo | 6 +++--- .../Math/Random/Generators/Xorshift64star/package.mo | 5 +++-- .../Math/Random/Utilities/impureRandom.mo | 5 +++-- .../Math/Random/Utilities/initializeImpureRandom.mo | 4 ++-- Modelica_Noise 1.0 Beta.1/Utilities/Strings/hashString.mo | 2 +- Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo | 2 +- Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo | 2 +- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo index 37b03e19..de44093f 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo @@ -67,9 +67,9 @@ random number generator is used to fill the internal state vector with 64 bit ra redeclare function extends random "Returns a uniform random number with the xorshift1024* algorithm" - external "C" ModelicaRandom_xorshift1024star(stateIn, stateOut, result) - annotation (Include = "#include \"ModelicaRandom.c\""); - annotation (Documentation(info=" + external "C" ModelicaRandom_xorshift1024star(stateIn, stateOut, result) + annotation (Include = "#include \"ModelicaRandom.c\""); + annotation (Documentation(info="

    Syntax

     (r, stateOut) = Xorshift128plus.random(stateIn);
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo
    index 64778779..21fa612d 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo	
    @@ -66,9 +66,9 @@ random number generator is used to fill the internal state vector with 64 bit ra
     
       redeclare function extends random
       "Returns a uniform random number with the xorshift128+ algorithm"
    -     external "C" ModelicaRandom_xorshift128plus(stateIn, stateOut, result)
    -       annotation (Include = "#include \"ModelicaRandom.c\"");
    -  annotation (Documentation(info="
    +    external "C" ModelicaRandom_xorshift128plus(stateIn, stateOut, result)
    +      annotation (Include = "#include \"ModelicaRandom.c\"");
    +    annotation (Documentation(info="
     

    Syntax

     (r, stateOut) = Xorshift128plus.random(stateIn);
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo
    index 05cbfafc..90ffc080 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo	
    @@ -90,8 +90,9 @@ and the returned state is the one from the last iteration.
     
       redeclare function extends random
       "Returns a uniform random number with the xorshift64* algorithm"
    -    external "C" ModelicaRandom_xorshift64star(stateIn, stateOut, result);
    -    annotation (Include = "#include \"ModelicaRandom.c\"", Documentation(info="
    +    external "C" ModelicaRandom_xorshift64star(stateIn, stateOut, result)
    +      annotation (Include = "#include \"ModelicaRandom.c\"");
    +    annotation(Documentation(info="
     

    Syntax

     (r, stateOut) = Xorshift64star.random(stateIn);
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo
    index 2624f9f4..66c65f05 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo	
    @@ -5,8 +5,9 @@ function impureRandom
         "Identification number from initializeImpureRandom(..) function (is needed for correct sorting)";
       output Real y
         "A random number with a uniform distribution on the interval (0,1]";
    -  external "C" y = ModelicaRandom_impureRandom_xorshift1024star(id);
    -  annotation (Include = "#include \"ModelicaRandom.c\"", Documentation(info="
    +  external "C" y = ModelicaRandom_impureRandom_xorshift1024star(id)
    +    annotation (Include = "#include \"ModelicaRandom.c\"");
    +  annotation(Documentation(info="
     

    Syntax

     r = impureRandom(id);
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo
    index d78c36a7..1edc1283 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo	
    @@ -15,8 +15,8 @@ protected
         "Stores the given state vector in an external static variable"
         input Integer[33] state "The initial state";
         input Integer id;
    -    external "C" ModelicaRandom_setInternalState_xorshift1024star(state, size(state,1), id);
    -    annotation (Include = "#include \"ModelicaRandom.c\"");
    +    external "C" ModelicaRandom_setInternalState_xorshift1024star(state, size(state,1), id)
    +      annotation (Include = "#include \"ModelicaRandom.c\"");
       end setInternalState;
     
     algorithm
    diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/Strings/hashString.mo b/Modelica_Noise 1.0 Beta.1/Utilities/Strings/hashString.mo
    index fdbeb0cc..9d9da26c 100644
    --- a/Modelica_Noise 1.0 Beta.1/Utilities/Strings/hashString.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Utilities/Strings/hashString.mo	
    @@ -3,7 +3,7 @@ function hashString "Creates a hash value of a String"
       input String string "The string to create a hash from";
       output Integer hash "The hash value of string";
       external "C" hash = ModelicaRandom_hashString(string)
    -      annotation (Include = "#include \"ModelicaRandom.c\"");
    +    annotation (Include = "#include \"ModelicaRandom.c\"");
       annotation (Documentation(info="
     

    Syntax

    diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo b/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo
    index 9cd48dbc..1b5a061c 100644
    --- a/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Utilities/System/getPid.mo	
    @@ -2,7 +2,7 @@ within Modelica_Noise.Utilities.System;
     function getPid "Retrieves the current process id"
       output Integer pid "Process ID";
       external "C" pid = ModelicaRandom_getpid()
    -  annotation (Include = "#include \"ModelicaRandom.c\"");
    +    annotation (Include = "#include \"ModelicaRandom.c\"");
       annotation (Documentation(info="
     

    Syntax

    diff --git a/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo b/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo
    index 1b9905ca..e76bdfe8 100644
    --- a/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Utilities/System/getTime.mo	
    @@ -8,7 +8,7 @@ function getTime "Retrieves the local time (in the local time zone)"
       output Integer mon "Month";
       output Integer year "Year";
       external "C" ModelicaRandom_getTime(ms,sec,min,hour,day,mon,year)
    -  annotation (Include = "#include \"ModelicaRandom.c\"");
    +    annotation (Include = "#include \"ModelicaRandom.c\"");
       annotation (Documentation(info="
     

    Syntax

    
    From 59af661de720ea898120715f65c8906d8e9d8d0e Mon Sep 17 00:00:00 2001
    From: tbeu 
    Date: Sat, 3 Oct 2015 22:18:14 +0200
    Subject: [PATCH 28/46] Add missing each
    
    ---
     .../Math/Random/Examples/GenerateRandomNumbers.mo           | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo
    index 7390e7d8..36ae8a64 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Examples/GenerateRandomNumbers.mo	
    @@ -16,9 +16,9 @@ model GenerateRandomNumbers
       discrete Real r128 "Random number generated with Xorshift128plus";
       discrete Real r1024 "Random number generated with Xorshift1024star";
     protected
    -  discrete Integer state64[2](   each start=0, fixed = true);
    -  discrete Integer state128[4](  each start=0, fixed = true);
    -  discrete Integer state1024[33](each start=0, fixed = true);
    +  discrete Integer state64[2](   each start=0, each fixed = true);
    +  discrete Integer state128[4](  each start=0, each fixed = true);
    +  discrete Integer state1024[33](each start=0, each fixed = true);
     algorithm
       when initial() then
         // Generate initial state from localSeed and globalSeed
    
    From 1263a8e0f9b6f61a23b9b220717d2a8710134df1 Mon Sep 17 00:00:00 2001
    From: tbeu 
    Date: Sat, 3 Oct 2015 22:19:56 +0200
    Subject: [PATCH 29/46] Fix MSVC compiler warning
    
    ```
    warning C4013: 'atexit' undefined; assuming extern returning int
    ```
    ---
     Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c
    index 8a7af5fb..f92df53d 100644
    --- a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c	
    +++ b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c	
    @@ -116,7 +116,7 @@
     
     
     /* USEFUL INCLUDES */
    -
    +#include 
     /* Include some math headers */
     #include 
     #include 
    
    From 7cb5b32608b84e2253ac0ba8838b5c1ecc2478c3 Mon Sep 17 00:00:00 2001
    From: akloeckner 
    Date: Mon, 5 Oct 2015 14:36:01 +0200
    Subject: [PATCH 30/46] Change Umlauts
    
    to circumvent UTF vs ASCII conversion
    ---
     .../Resources/Include/ModelicaRandom.c               | 12 ++++++------
     1 file changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c
    index f92df53d..7c52fcf9 100644
    --- a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c	
    +++ b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c	
    @@ -13,7 +13,7 @@
                            functions shall be visible outside of the DLL
     
        Release Notes:
    -      Feb. 17, 2015: by Andreas Klöckner and Martin Otter, DLR-SR.
    +      Feb. 17, 2015: by Andreas Kloeckner and Martin Otter, DLR-SR.
                          Implemented a first version.
     
        This file is licensed under the BSD 2-Clause License:
    @@ -295,7 +295,7 @@ static int ModelicaRandom_hashString(const char* str) {
     
        See .
     
    -   Adapted by Martin Otter and Andreas Klöckner for use with Modelica:
    +   Adapted by Martin Otter and Andreas Kloeckner for use with Modelica:
        - Inputs and outputs must be int's, that is int32_t.
        - Inputs are casted accordingly.
        - Outputs are casted accordingly.
    @@ -321,7 +321,7 @@ MODELICA_EXPORT void ModelicaRandom_xorshift64star(int state_in[], int state_out
     
             See .
     
    -        Adapted by Martin Otter and Andreas Klöckner (DLR)
    +        Adapted by Martin Otter and Andreas Kloeckner (DLR)
             for the Modelica external function interface.
         */
     
    @@ -373,7 +373,7 @@ MODELICA_EXPORT void ModelicaRandom_xorshift128plus(int state_in[], int state_ou
     
             See .
     
    -        Adapted by Martin Otter and Andreas Klöckner (DLR)
    +        Adapted by Martin Otter and Andreas Kloeckner (DLR)
             for the Modelica external function interface.
         */
     
    @@ -428,7 +428,7 @@ static void ModelicaRandom_xorshift1024star_internal(uint64_t s[], int* p, doubl
     
             See .
     
    -        Adapted by Martin Otter and Andreas Klöckner (DLR)
    +        Adapted by Martin Otter and Andreas Kloeckner (DLR)
             for the Modelica external function interface.
         */
     
    @@ -469,7 +469,7 @@ MODELICA_EXPORT void ModelicaRandom_xorshift1024star(int state_in[], int state_o
     
             This function uses ModelicaRandom_xorshift1024star_internal as generator and adapts inputs and outputs.
     
    -        Adapted by Martin Otter and Andreas Klöckner (DLR)
    +        Adapted by Martin Otter and Andreas Kloeckner (DLR)
             for the Modelica external function interface.
         */
     
    
    From 55a3cb5fe6e2f1633c164fbbae08f5e7a0ffd769 Mon Sep 17 00:00:00 2001
    From: tbeu 
    Date: Tue, 6 Oct 2015 22:31:24 +0200
    Subject: [PATCH 31/46] Fix typos
    
    ---
     Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo        | 2 +-
     Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo | 6 +++---
     .../Math/Random/Utilities/initializeImpureRandom.mo         | 2 +-
     3 files changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo
    index f05fba56..fa0a276b 100644
    --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo	
    @@ -123,7 +123,7 @@ hierarchical level. The following options can be selected:
              simulation takes place and the current local time. As a result, the global seed
              is changed automatically for every new simulation, including parallelized
              simulation runs. This option can be used to perform Monte Carlo Simulations
    -         with minimal effort (just performinng many simulation runs) where
    +         with minimal effort (just performing many simulation runs) where
              every simulation run uses a different noise.
    + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end initialState; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.mo index 7092152d..5ed0cc66 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.mo @@ -5,7 +5,7 @@ package Interfaces "Library of partial packages and functions for the Random pac annotation (Documentation(info="

    -This sub-library contains partial packages and functions that define the interfaces +This sub-library contains partial functions that define the interfaces of functions of the same kind (like random(..) function).

    ", revisions=" diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.order b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.order index 92c379be..bb65a73b 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.order +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.order @@ -1 +1,3 @@ +initialState +random PartialGenerator diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/random.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/random.mo new file mode 100644 index 00000000..c786ab9e --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/random.mo @@ -0,0 +1,39 @@ +within Modelica_Noise.Math.Random.Interfaces; +partial function random + "Return a random number with a uniform distribution in the range 0.0 < result <= 1.0" + extends Modelica.Icons.Function; + input Integer[stateSize] stateIn + "The internal states for the random number generator"; + input Integer stateSize "The dimension of the internal state vector"; + output Real result + "A random number with a uniform distribution on the interval (0,1]"; + output Integer[stateSize] stateOut + "The new internal states of the random number generator"; +annotation (Documentation(info=" +

    +This partial function defines the input and output arguments of a +random(..) function of a random number generator package. +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end random; From 012c65afc187f79241447355678a5d03ad972fc1 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Thu, 8 Oct 2015 23:23:44 +0200 Subject: [PATCH 39/46] clean a space --- Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo index 3f5a8e4e..c4eb0898 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo @@ -1,6 +1,6 @@ within Modelica_Noise.Math.Random; package Generators "Library of functions generating uniform random numbers in the range 0 < random <= 1.0 (with exposed state vectors)" - extends Modelica.Icons.Package; + extends Modelica.Icons.Package; From fa37ee89251beac16dbdb0e216a294efd0c93bb0 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Fri, 9 Oct 2015 09:39:16 +0200 Subject: [PATCH 40/46] Fix unclosed

    by searching for

    (.(?!<\/p>))*

    thanks @dietmarw --- Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo | 4 +++- .../Math/Distributions/Normal/quantile.mo | 2 +- .../Math/Distributions/TruncatedNormal.mo | 2 +- .../Math/Distributions/TruncatedWeibull.mo | 2 +- .../Math/Distributions/Weibull/density.mo | 2 +- .../Math/Distributions/Weibull/quantile.mo | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo index 61f3a60b..3c350ff3 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo @@ -34,16 +34,18 @@ must be dragged resulting in a declaration This block is used to define global options that hold for all Noise block instances (such as a global seed for initializing the random number generators, and a flag to switch off noise). +

    Please note that only one globalSeed instance may be defined in the model due to the block's implementation! So, the block will usually reside on the top level of the model. +

    Reproducible Noise

    In the following table the different ways are summarized to define reproducible noise with the blocks of this sublibrary: -

    +

    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/quantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/quantile.mo index 686f4e47..ec1eba71 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/quantile.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Normal/quantile.mo @@ -8,7 +8,7 @@ algorithm y :=mu + sigma*sqrt(2)*Special.erfInv(2*u-1); annotation (Inline=true, Documentation(info=" -

    +

    Syntax

     Normal.quantile(u, y_min=0, y_max=1);
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo
    index a31a7349..22a99c48 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo	
    @@ -201,7 +201,7 @@ of truncated distributions, see
         y := min(y_max,max(y_min,y));
     
         annotation (smoothOrder = 1,Documentation(info="
    -

    +

    Syntax

     Normal.quantile(u, y_min=0, y_max=1, mu=0, sigma=1);
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo
    index 20fee1c3..e1b99c0d 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo	
    @@ -197,7 +197,7 @@ of truncated distributions, see
         y := min(y_max,max(y_min,y));
     
         annotation (smoothOrder=1,Documentation(info="
    -

    +

    Syntax

     Weibull.quantile(u, y_min=0, y_max=1, lambda=1, k=1);
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/density.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/density.mo
    index 22acd702..6eadbaf2 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/density.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/density.mo	
    @@ -7,7 +7,7 @@ algorithm
       y :=if u >= 0 then (k/lambda)*(u/lambda)^(k - 1)*exp(-(u/lambda)^k) else 0.0;
     
       annotation (Inline=true, Documentation(info="
    -

    +

    Syntax

     Weibull.density(u, lambda=1, k=1);
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/quantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/quantile.mo
    index cc49c11c..f73dd243 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/quantile.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/Weibull/quantile.mo	
    @@ -7,7 +7,7 @@ algorithm
       y := lambda * (-log( 1-u)) ^(1/k);
     
       annotation (Inline=true, Documentation(info="
    -

    +

    Syntax

     Weibull.quantile(u, lambda=1, k=1);
    
    From 17485d84c0d2b458eb382e2f2546e5640a8ba621 Mon Sep 17 00:00:00 2001
    From: akloeckner 
    Date: Tue, 13 Oct 2015 10:14:27 +0200
    Subject: [PATCH 41/46] Even more simplify the Generators We now have NO
     replaceable packages anymore. Instead the generator is imported. Changing the
     generator now means to duplicate the block and change the import statement...
    
    ---
     .../Blocks/Noise/GenericNoise.mo              | 37 +++----
     .../Generators/Xorshift1024star/package.mo    |  8 +-
     .../Generators/Xorshift1024star/package.order |  1 +
     .../Generators/Xorshift128plus/package.mo     |  8 +-
     .../Generators/Xorshift128plus/package.order  |  1 +
     .../Generators/Xorshift64star/package.mo      |  8 +-
     .../Generators/Xorshift64star/package.order   |  1 +
     .../Math/Random/Generators/package.mo         | 10 +-
     .../Interfaces/PartialGenerator/package.mo    | 99 -------------------
     .../Interfaces/PartialGenerator/package.order |  3 -
     .../PartialInterpolator/package.order         |  6 --
     .../Math/Random/Interfaces/package.order      |  1 -
     12 files changed, 32 insertions(+), 151 deletions(-)
     delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo
     delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.order
     delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialInterpolator/package.order
    
    diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo
    index 3e99cfa8..90c334ec 100644
    --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo	
    @@ -1,6 +1,6 @@
     within Modelica_Noise.Blocks.Noise;
     block GenericNoise "Noise generator for arbitrary distributions"
    -  import Modelica_Noise.Math.Random;
    +  import generator = Modelica_Noise.Math.Random.Generators.Xorshift128plus;
       extends Modelica.Blocks.Interfaces.SO;
     
       // Main dialog menu
    @@ -32,13 +32,7 @@ block GenericNoise "Noise generator for arbitrary distributions"
         "Start time for sampling the raw random numbers"
         annotation(Dialog(tab="Advanced", group="Initialization",enable=enableNoise));
     
    -  // Advanced dialog menu: Random number properties
    -  replaceable package generator =
    -      Modelica_Noise.Math.Random.Generators.Xorshift128plus constrainedby
    -    Modelica_Noise.Math.Random.Interfaces.PartialGenerator
    -    "Random number generator"
    -    annotation(choicesAllMatching=true, Dialog(tab="Advanced",group="Random number generator",enable=enableNoise));
    -
    +  // Generate the actually used local seed
       discrete Integer localSeed "The actual localSeed";
     equation
       when initial() then
    @@ -268,31 +262,22 @@ the desired situation. For this purpose the following parameters can be defined:
     

    -

    Advanced tab: Random number generator

    +

    Random number generator

    -The (pseudo) random number generator to be used is defined here. +The (pseudo) random number generator to be used is defined via an import clause at the beginning of this block. The default is random number generator algorithm \"xorshift128+\". This random number generator has a period of 2^128, has an internal state of 4 Integer elements, and has excellent statistical properties. -If the default algorithm is not desired, the -following parameter can be set: +It is a good trade-off between simulation performance and random number quality. +If the default algorithm is not desired, +a new model needs to be created by duplicating this block and exchanging the import clause. +Meaningful random number generators are provided in +package Math.Random.Generators. +Properties of the various generators are described in the package +description of the Generators package.

    -
    -

    - - - - - - -
    ParameterDescription
    generator Defines the pseudo random number generator to be used. This is - a replaceable package. Meaningful random number generators are provided in - package Math.Random.Generators. - Properties of the various generators are described in the package - description of the Generators package.
    -

    ", revisions="

    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo index d5965843..dd5c7357 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo @@ -1,9 +1,11 @@ within Modelica_Noise.Math.Random.Generators; package Xorshift1024star "Random number generator xorshift1024*" - extends Interfaces.PartialGenerator(final nState = 33); + constant Integer nState=33 "The dimension of the internal state vector"; + extends Modelica.Icons.Package; - redeclare function initialState + + function initialState "Returns an initial state for the xorshift1024* algorithm" extends Interfaces.initialState(final stateSize=Xorshift1024star.nState); algorithm @@ -66,7 +68,7 @@ random number generator is used to fill the internal state vector with 64 bit ra end initialState; - redeclare function random + function random "Returns a uniform random number with the xorshift1024* algorithm" extends Interfaces.random(final stateSize=Xorshift1024star.nState); external "C" ModelicaRandom_xorshift1024star(stateIn, stateOut, result) diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.order b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.order index 43553420..ec6510a7 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.order +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.order @@ -1,2 +1,3 @@ +nState initialState random diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo index 6f17f506..c237db84 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo @@ -1,9 +1,11 @@ within Modelica_Noise.Math.Random.Generators; package Xorshift128plus "Random number generator xorshift128+" - extends Interfaces.PartialGenerator(final nState = 4); + constant Integer nState=4 "The dimension of the internal state vector"; + extends Modelica.Icons.Package; - redeclare function initialState + + function initialState "Returns an initial state for the xorshift128+ algorithm" extends Interfaces.initialState(final stateSize=Xorshift128plus.nState); algorithm @@ -65,7 +67,7 @@ random number generator is used to fill the internal state vector with 64 bit ra end initialState; - redeclare function random + function random "Returns a uniform random number with the xorshift128+ algorithm" extends Interfaces.random(final stateSize=Xorshift128plus.nState); external "C" ModelicaRandom_xorshift128plus(stateIn, stateOut, result) diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.order b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.order index 43553420..ec6510a7 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.order +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.order @@ -1,2 +1,3 @@ +nState initialState random diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo index 3e8872e2..3b17fc89 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo @@ -1,9 +1,11 @@ within Modelica_Noise.Math.Random.Generators; package Xorshift64star "Random number generator xorshift64*" - extends Interfaces.PartialGenerator(final nState = 2); + constant Integer nState=2 "The dimension of the internal state vector"; + extends Modelica.Icons.Package; - redeclare function initialState + + function initialState "Returns an initial state for the xorshift64* algorithm" extends Interfaces.initialState(final stateSize=Xorshift64star.nState); protected @@ -89,7 +91,7 @@ and the returned state is the one from the last iteration. end initialState; - redeclare function random + function random "Returns a uniform random number with the xorshift64* algorithm" extends Interfaces.random(final stateSize=Xorshift64star.nState); external "C" ModelicaRandom_xorshift64star(stateIn, stateOut, result) diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.order b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.order index 43553420..ec6510a7 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.order +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.order @@ -1,2 +1,3 @@ +nState initialState random diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo index c4eb0898..e6ad313f 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/package.mo @@ -3,16 +3,12 @@ package Generators "Library of functions generating uniform random numbers in th extends Modelica.Icons.Package; - - - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ -100,-100},{100,100}}), graphics={Line( points={{-90,-54},{-50,-54},{-50,54},{50,54},{50,-54},{84,-54}})}), Documentation(info="

    This package contains various pseudo random number generators. A random number generator is a package -that is derived from Random.Utilities.Interfaces.PartialGenerator -and consists of the following elements: +that consists of the following elements:

    • Integer nState is a constant that defines the length of the internal state vector @@ -28,8 +24,8 @@ and consists of the following elements:

    -A modeler can use a replaceable Generator package in his model, in order to easily select the desired -random number generator from the parameter menu. +In order to have consistent interfaces, the function explained above should be extended from the Interfaces provided in +package Interfaces.

    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo deleted file mode 100644 index 986669fb..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.mo +++ /dev/null @@ -1,99 +0,0 @@ -within Modelica_Noise.Math.Random.Interfaces; -partial package PartialGenerator "Interfaces of a uniform random number generator" - extends Modelica.Icons.Package; - constant Integer nState "The dimension of the internal state vector"; - - - replaceable partial function initialState - "Return the initial internal states for the uniform random number generator" - extends Interfaces.initialState(final stateSize=nState); - annotation (Documentation(info=" -

    -This partial function defines the input and output arguments of an -initialState(..) function of a random number generator package. -

    -", revisions=" -

    -

    - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end initialState; - - - replaceable partial function random - "Return a random number with a uniform distribution in the range 0.0 < result <= 1.0" - extends Interfaces.random(final stateSize=nState); - annotation (Documentation(info=" -

    -This partial function defines the input and output arguments of a -random(..) function of a random number generator package. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

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

    -This partial package defines the elements and function interfaces of a -pseudo random number generator package. A random number generator package must -inherit from this partial package and adapt the constant nState -to the correct length of the state vector. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end PartialGenerator; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.order b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.order deleted file mode 100644 index ec6510a7..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialGenerator/package.order +++ /dev/null @@ -1,3 +0,0 @@ -nState -initialState -random diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialInterpolator/package.order b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialInterpolator/package.order deleted file mode 100644 index 767d5803..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/PartialInterpolator/package.order +++ /dev/null @@ -1,6 +0,0 @@ -continuous -nFuture -nPast -varianceFactor -smoothness -interpolate diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.order b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.order index bb65a73b..43553420 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.order +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Interfaces/package.order @@ -1,3 +1,2 @@ initialState random -PartialGenerator From 93beeb184e287209fc89171b0cfd8a346822da46 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Tue, 13 Oct 2015 10:41:45 +0200 Subject: [PATCH 42/46] Save packages as directories --- .../NoiseExamples/ActuatorWithNoise.mo | 4 +- .../Examples/NoiseExamples/Distributions.mo | 4 +- .../Math/Distributions/TruncatedNormal.mo | 359 -------------- .../TruncatedNormal/cumulative.mo | 95 ++++ .../Distributions/TruncatedNormal/density.mo | 82 ++++ .../Distributions/TruncatedNormal/package.mo | 81 ++++ .../TruncatedNormal/package.order | 3 + .../Distributions/TruncatedNormal/quantile.mo | 103 ++++ .../Math/Distributions/TruncatedWeibull.mo | 351 -------------- .../TruncatedWeibull/cumulative.mo | 93 ++++ .../Distributions/TruncatedWeibull/density.mo | 80 ++++ .../Distributions/TruncatedWeibull/package.mo | 78 +++ .../TruncatedWeibull/package.order | 3 + .../TruncatedWeibull/quantile.mo | 102 ++++ .../Xorshift1024star/initialState.mo | 63 +++ .../Generators/Xorshift1024star/package.mo | 124 +---- .../Generators/Xorshift1024star/random.mo | 62 +++ .../Xorshift128plus/initialState.mo | 61 +++ .../Generators/Xorshift128plus/package.mo | 123 +---- .../Generators/Xorshift128plus/random.mo | 62 +++ .../Generators/Xorshift64star/initialState.mo | 85 ++++ .../Generators/Xorshift64star/package.mo | 147 +----- .../Generators/Xorshift64star/random.mo | 62 +++ .../Math/Special/Internal.mo | 445 ------------------ .../Math/Special/Internal/erfInvUtil.mo | 257 ++++++++++ .../Math/Special/Internal/erfcUtil.mo | 122 +++++ .../Math/Special/Internal/package.mo | 35 ++ .../Math/Special/Internal/package.order | 3 + .../Math/Special/Internal/polyEval.mo | 37 ++ 29 files changed, 1576 insertions(+), 1550 deletions(-) delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/cumulative.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/density.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/package.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/package.order create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/quantile.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/cumulative.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/density.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/package.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/package.order create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/quantile.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/initialState.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/random.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/initialState.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/random.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/initialState.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/random.mo delete mode 100644 Modelica_Noise 1.0 Beta.1/Math/Special/Internal.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Special/Internal/erfInvUtil.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Special/Internal/erfcUtil.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Special/Internal/package.mo create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Special/Internal/package.order create mode 100644 Modelica_Noise 1.0 Beta.1/Math/Special/Internal/polyEval.mo diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ActuatorWithNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ActuatorWithNoise.mo index 0d872b9c..dea1fb6a 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ActuatorWithNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ActuatorWithNoise.mo @@ -2,9 +2,9 @@ within Modelica_Noise.Blocks.Examples.NoiseExamples; model ActuatorWithNoise "Demonstrates how to model measurement noise in an actuator" extends Modelica.Icons.Example; - Blocks.Examples.NoiseExamples.Utilities.Parts.MotorWithCurrentControl Motor + Utilities.Parts.MotorWithCurrentControl Motor annotation (Placement(transformation(extent={{-86,-10},{-66,10}}))); - Blocks.Examples.NoiseExamples.Utilities.Parts.Controller controller + Utilities.Parts.Controller controller annotation (Placement(transformation(extent={{0,60},{20,80}}))); Modelica.Blocks.Sources.Step Speed(startTime=0.5, height=50) annotation (Placement(transformation(extent={{-72,66},{-52,86}}))); diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo index a88fc9a6..a829339f 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo @@ -5,8 +5,8 @@ model Distributions "Demonstrates noise with different types of distributions" "Sample period of all blocks"; parameter Real y_min = -1 "Minimum value of band for random values"; parameter Real y_max = 3 "Maximum value of band for random values"; - inner Blocks.Noise.GlobalSeed globalSeed(useAutomaticSeed=false) - annotation (Placement(transformation(extent={{40,60},{60,80}}))); + inner Noise.GlobalSeed globalSeed(useAutomaticSeed=false) + annotation (Placement(transformation(extent={{40,60},{60,80}}))); Integer n=if time < 0.5 then 12 else 2; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo deleted file mode 100644 index 22a99c48..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal.mo +++ /dev/null @@ -1,359 +0,0 @@ -within Modelica_Noise.Math.Distributions; -package TruncatedNormal "Library of truncated normal distribution functions" - extends Modelica.Icons.Package; - - function density "Density of truncated normal distribution" - import Modelica_Noise.Math.Distributions.Normal; - extends - Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedDensity; - input Real mu= (u_max + u_min)/2 - "Expectation (mean) value of the normal distribution" annotation(Dialog); - input Real sigma=(u_max - u_min)/6 - "Standard deviation of the normal distribution" annotation(Dialog); - protected - Real pdf; - Real cdf_min; - Real cdf_max; - algorithm - if u >= u_min and u <= u_max then - pdf :=Normal.density(u,mu,sigma); - cdf_min :=Normal.cumulative(u_min,mu,sigma); - cdf_max :=Normal.cumulative(u_max,mu,sigma); - y := pdf / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); - else - y := 0; - end if; - annotation (Documentation(info=" -

    Syntax

    -
    -Normal.density(u, u_min=0, u_max=1, mu=0, sigma=1);
    -
    - -

    Description

    -

    -This function computes the probability density function according to a -truncated normal distribution with -minimum value u_min, maximmum value u_max, -mean value of original distribution mu and -standard deviation of original distribution sigma (variance = sigma2). -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the normal distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  density(0.5)                // = 1.041828977196953
    -  density(0.5,-1.5,1.5,1,0.9) // = 0.5365495585520803
    -
    - -

    See also

    -

    -TruncatedNormal.cumulative, -TruncatedNormal.quantile. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end density; - - function cumulative - "Cumulative distribution function of truncated normal distribution" - import Modelica_Noise.Math.Distributions.Normal; - extends - Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedCumulative; - input Real mu= (u_max + u_min)/2 - "Expectation (mean) value of the normal distribution" annotation(Dialog); - input Real sigma=(u_max - u_min)/6 - "Standard deviation of the normal distribution" annotation(Dialog); - protected - Real cdf; - Real cdf_min; - Real cdf_max; - algorithm - if u <= u_min then - y := 0; - elseif u < u_max then - cdf :=Normal.cumulative(u, mu, sigma); - cdf_min :=Normal.cumulative(u_min, mu, sigma); - cdf_max :=Normal.cumulative(u_max, mu, sigma); - y := (cdf - cdf_min) / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); - else - y := 1; - end if; - - annotation (Documentation(info=" -

    Syntax

    -
    -Normal.cumulative(u, u_min=0, u_max=1, mu=0, sigma=1);
    -
    - -

    Description

    -

    -This function computes the cumulative distribution function according to a -truncated normal distribution with -minimum value u_min, maximmum value u_max, -mean value of original distribution mu and -standard deviation of original distribution sigma (variance = sigma2). -The returned value y is in the range: -

    - -

    -0 ≤ y ≤ 1 -

    - -

    -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the normal distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  cumulative(0.5)                 // = 0.5
    -  cumulative(0.5,-1.5,1.5,1,0.9)  // = 0.4046868865634537
    -
    - -

    See also

    -

    -TruncatedNormal.density, -TruncatedNormal.quantile. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end cumulative; - - function quantile "Quantile of truncated normal distribution" - import Modelica_Noise.Math.Distributions.Normal; - extends - Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedQuantile; - input Real mu= (y_max + y_min)/2 - "Expectation (mean) value of the normal distribution" annotation(Dialog); - input Real sigma=(y_max - y_min)/6 - "Standard deviation of the normal distribution" annotation(Dialog); - protected - Real cdf_min = Normal.cumulative(y_min, mu, sigma); - Real cdf_max = Normal.cumulative(y_max, mu, sigma); - algorithm - y := Normal.quantile(cdf_min + u*(cdf_max-cdf_min), mu=mu, sigma=sigma); - - /* Close to u=0 and u=1, large errors in the numerical computation can - occur. The following statement is a guard to still keep the property - that y is within y_min/y_max - */ - y := min(y_max,max(y_min,y)); - - annotation (smoothOrder = 1,Documentation(info=" - -

    Syntax

    -
    -Normal.quantile(u, y_min=0, y_max=1, mu=0, sigma=1);
    -
    - -

    Description

    -

    -This function computes the inverse cumulative distribution function (= quantile) according to a -truncated normal distribution with -minimum value u_min, maximmum value u_max, -mean value of original distribution mu and -standard deviation of original distribution sigma (variance = sigma2). -Input argument u must be in the range: -

    - -
    -

    -0 < u < 1 -

    -
    - -

    -Output argument y is in the range: -

    - - -
    -

    -y_min ≤ y ≤ y_max -

    -
    - -

    -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the normal distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  quantile(0.001)           // = 0.001087357613043849;
    -  quantile(0.5,0,1,0.5,0.9) // = 0.5
    -
    - -

    See also

    -

    -TruncatedNormal.density, -TruncatedNormal.cumulative. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end quantile; - annotation (Icon(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1}), - graphics={ - Line( - points={{-32,-32},{-32,-80}}), - Line( - points={{-32,-32},{-28,-21.0617},{-24.5,-7.4388},{-21,8.1682},{ - -17.5,24.9428},{-14,41.695},{-10.5,56.9771},{-7,69.2797},{-3.5, - 77.2739},{0,80.047},{3.5,77.2739},{7,69.2797},{10.5,56.9771},{ - 14,41.695},{17.5,24.9428},{21,8.1682},{24.5,-7.4388},{28, - -21.0617},{31.5,-32.2849},{35,-41.0467}}, - smooth=Smooth.Bezier), - Line( - points={{34.5,-40.5},{34.5,-78.5}}), - Line( - points={{34.5,-78.5},{70.5,-78.5}}), - Line( - points={{-68,-79},{-32,-79}})}), - Documentation(info=" -

    -This package provides -

    -
      -
    • probability density function (= derivative of cumulative distribution function),
    • -
    • cumulative distribution function, and
    • -
    • quantile (= inverse cumulative distribution function).
    • -
    -

    -of the truncated normal distribution. Examples: -

    - -

    - -

    - -

    - -

    - -

    - -

    - -

    -For more details
    -of the normal distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end TruncatedNormal; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/cumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/cumulative.mo new file mode 100644 index 00000000..3959e7f6 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/cumulative.mo @@ -0,0 +1,95 @@ +within Modelica_Noise.Math.Distributions.TruncatedNormal; +function cumulative + "Cumulative distribution function of truncated normal distribution" + import Modelica_Noise.Math.Distributions.Normal; + extends + Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedCumulative; + input Real mu= (u_max + u_min)/2 + "Expectation (mean) value of the normal distribution" annotation(Dialog); + input Real sigma=(u_max - u_min)/6 + "Standard deviation of the normal distribution" annotation(Dialog); +protected + Real cdf; + Real cdf_min; + Real cdf_max; +algorithm + if u <= u_min then + y := 0; + elseif u < u_max then + cdf :=Normal.cumulative(u, mu, sigma); + cdf_min :=Normal.cumulative(u_min, mu, sigma); + cdf_max :=Normal.cumulative(u_max, mu, sigma); + y := (cdf - cdf_min) / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); + else + y := 1; + end if; + + annotation (Documentation(info=" +

    Syntax

    +
    +Normal.cumulative(u, u_min=0, u_max=1, mu=0, sigma=1);
    +
    + +

    Description

    +

    +This function computes the cumulative distribution function according to a +truncated normal distribution with +minimum value u_min, maximmum value u_max, +mean value of original distribution mu and +standard deviation of original distribution sigma (variance = sigma2). +The returned value y is in the range: +

    + +

    +0 ≤ y ≤ 1 +

    + +

    +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the normal distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  cumulative(0.5)                 // = 0.5
    +  cumulative(0.5,-1.5,1.5,1,0.9)  // = 0.4046868865634537
    +
    + +

    See also

    +

    +TruncatedNormal.density, +TruncatedNormal.quantile. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end cumulative; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/density.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/density.mo new file mode 100644 index 00000000..d6cd1113 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/density.mo @@ -0,0 +1,82 @@ +within Modelica_Noise.Math.Distributions.TruncatedNormal; +function density "Density of truncated normal distribution" + import Modelica_Noise.Math.Distributions.Normal; + extends Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedDensity; + input Real mu= (u_max + u_min)/2 + "Expectation (mean) value of the normal distribution" annotation(Dialog); + input Real sigma=(u_max - u_min)/6 + "Standard deviation of the normal distribution" annotation(Dialog); +protected + Real pdf; + Real cdf_min; + Real cdf_max; +algorithm + if u >= u_min and u <= u_max then + pdf :=Normal.density(u,mu,sigma); + cdf_min :=Normal.cumulative(u_min,mu,sigma); + cdf_max :=Normal.cumulative(u_max,mu,sigma); + y := pdf / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); + else + y := 0; + end if; + annotation (Documentation(info=" +

    Syntax

    +
    +Normal.density(u, u_min=0, u_max=1, mu=0, sigma=1);
    +
    + +

    Description

    +

    +This function computes the probability density function according to a +truncated normal distribution with +minimum value u_min, maximmum value u_max, +mean value of original distribution mu and +standard deviation of original distribution sigma (variance = sigma2). +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the normal distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  density(0.5)                // = 1.041828977196953
    +  density(0.5,-1.5,1.5,1,0.9) // = 0.5365495585520803
    +
    + +

    See also

    +

    +TruncatedNormal.cumulative, +TruncatedNormal.quantile. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end density; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/package.mo new file mode 100644 index 00000000..4231fa3c --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/package.mo @@ -0,0 +1,81 @@ +within Modelica_Noise.Math.Distributions; +package TruncatedNormal "Library of truncated normal distribution functions" + extends Modelica.Icons.Package; + + + + + annotation (Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={1,1}), + graphics={ + Line( + points={{-32,-32},{-32,-80}}), + Line( + points={{-32,-32},{-28,-21.0617},{-24.5,-7.4388},{-21,8.1682},{ + -17.5,24.9428},{-14,41.695},{-10.5,56.9771},{-7,69.2797},{-3.5, + 77.2739},{0,80.047},{3.5,77.2739},{7,69.2797},{10.5,56.9771},{ + 14,41.695},{17.5,24.9428},{21,8.1682},{24.5,-7.4388},{28, + -21.0617},{31.5,-32.2849},{35,-41.0467}}, + smooth=Smooth.Bezier), + Line( + points={{34.5,-40.5},{34.5,-78.5}}), + Line( + points={{34.5,-78.5},{70.5,-78.5}}), + Line( + points={{-68,-79},{-32,-79}})}), + Documentation(info=" +

    +This package provides +

    +
      +
    • probability density function (= derivative of cumulative distribution function),
    • +
    • cumulative distribution function, and
    • +
    • quantile (= inverse cumulative distribution function).
    • +
    +

    +of the truncated normal distribution. Examples: +

    + +

    + +

    + +

    + +

    + +

    + +

    + +

    +For more details
    +of the normal distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end TruncatedNormal; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/package.order b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/package.order new file mode 100644 index 00000000..ddc9fbd9 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/package.order @@ -0,0 +1,3 @@ +density +cumulative +quantile diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/quantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/quantile.mo new file mode 100644 index 00000000..232c9cf5 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedNormal/quantile.mo @@ -0,0 +1,103 @@ +within Modelica_Noise.Math.Distributions.TruncatedNormal; +function quantile "Quantile of truncated normal distribution" + import Modelica_Noise.Math.Distributions.Normal; + extends Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedQuantile; + input Real mu= (y_max + y_min)/2 + "Expectation (mean) value of the normal distribution" annotation(Dialog); + input Real sigma=(y_max - y_min)/6 + "Standard deviation of the normal distribution" annotation(Dialog); +protected + Real cdf_min = Normal.cumulative(y_min, mu, sigma); + Real cdf_max = Normal.cumulative(y_max, mu, sigma); +algorithm + y := Normal.quantile(cdf_min + u*(cdf_max-cdf_min), mu=mu, sigma=sigma); + + /* Close to u=0 and u=1, large errors in the numerical computation can + occur. The following statement is a guard to still keep the property + that y is within y_min/y_max + */ + y := min(y_max,max(y_min,y)); + + annotation (smoothOrder = 1,Documentation(info=" + +

    Syntax

    +
    +Normal.quantile(u, y_min=0, y_max=1, mu=0, sigma=1);
    +
    + +

    Description

    +

    +This function computes the inverse cumulative distribution function (= quantile) according to a +truncated normal distribution with +minimum value u_min, maximmum value u_max, +mean value of original distribution mu and +standard deviation of original distribution sigma (variance = sigma2). +Input argument u must be in the range: +

    + +
    +

    +0 < u < 1 +

    +
    + +

    +Output argument y is in the range: +

    + + +
    +

    +y_min ≤ y ≤ y_max +

    +
    + +

    +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the normal distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  quantile(0.001)           // = 0.001087357613043849;
    +  quantile(0.5,0,1,0.5,0.9) // = 0.5
    +
    + +

    See also

    +

    +TruncatedNormal.density, +TruncatedNormal.cumulative. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end quantile; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo deleted file mode 100644 index e1b99c0d..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull.mo +++ /dev/null @@ -1,351 +0,0 @@ -within Modelica_Noise.Math.Distributions; -package TruncatedWeibull "Library of truncated Weibull distribution functions" - extends Modelica.Icons.Package; - - function density "Density of truncated Weibull distribution" - import Modelica_Noise.Math.Distributions.Weibull; - extends - Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedDensity; - input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); - input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); - protected - Real pdf; - Real cdf_min; - Real cdf_max; - algorithm - if u >= u_min and u <= u_max then - pdf :=Weibull.density(u, lambda=lambda, k=k); - cdf_min :=Weibull.cumulative(u_min, lambda=lambda, k=k); - cdf_max :=Weibull.cumulative(u_max, lambda=lambda, k=k); - y := pdf / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); - else - y := 0; - end if; - annotation (Documentation(info=" -

    Syntax

    -
    -Weibull.density(u, u_min=0, u_max=1, lambda=1, k=1);
    -
    - -

    Description

    -

    -This function computes the probability density function according to a -truncated Weibull distribution with -minimum value u_min, maximmum value u_max, -scale parameter of original distribution lambda and -shape parameter of original distribution k. -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the Weibull distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  density(0.5)             // = 0.9595173756674719
    -  density(0.5,0,0.8,0.5,2) // = 1.5948036466479143
    -
    - -

    See also

    -

    -TruncatedWeibull.cumulative, -TruncatedWeibull.quantile. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end density; - - function cumulative - "Cumulative distribution function of truncated Weibull distribution" - import Modelica_Noise.Math.Distributions.Weibull; - extends - Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedCumulative; - input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); - input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); - protected - Real cdf; - Real cdf_min; - Real cdf_max; - algorithm - if u <= u_min then - y := 0; - elseif u < u_max then - cdf :=Weibull.cumulative(u, lambda=lambda, k=k); - cdf_min :=Weibull.cumulative(u_min, lambda=lambda, k=k); - cdf_max :=Weibull.cumulative(u_max, lambda=lambda, k=k); - y := (cdf - cdf_min) / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); - else - y := 1; - end if; - - annotation (Documentation(info=" -

    Syntax

    -
    -Weibull.cumulative(u, u_min=0, u_max=1, lambda=1, k=1);
    -
    - -

    Description

    -

    -This function computes the cumulative distribution function according to a -truncated Weibull distribution with -minimum value u_min, maximmum value u_max, -scale parameter of original distribution lambda and -shape parameter of original distribution k. -The returned value y is in the range: -

    - -

    -0 ≤ y ≤ 1 -

    - -

    -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the Weibull distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  cumulative(0.5)             // = 0.6224593312018546
    -  cumulative(0.5,0,0.8,0.5,2) // = 0.6850805314988328
    -
    - -

    See also

    -

    -TruncatedWeibull.density, -TruncatedWeibull.quantile. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end cumulative; - - function quantile "Quantile of truncated Weibull distribution" - import Modelica_Noise.Math.Distributions.Weibull; - extends - Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedQuantile; - input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); - input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); - protected - Real cdf_min = Weibull.cumulative(y_min, lambda=lambda, k=k) - "Value of cdf at y_min"; - Real cdf_max = Weibull.cumulative(y_max, lambda=lambda, k=k) - "Value of cdf at y_max"; - algorithm - y := Weibull.quantile(cdf_min + u*(cdf_max-cdf_min), lambda=lambda,k=k); - - /* Close to u=1, large errors in the numerical computation can - occur. The following statement is a guard to still keep the property - that y is within y_min .. y_max - */ - y := min(y_max,max(y_min,y)); - - annotation (smoothOrder=1,Documentation(info=" - -

    Syntax

    -
    -Weibull.quantile(u, y_min=0, y_max=1, lambda=1, k=1);
    -
    - -

    Description

    -

    -This function computes the inverse cumulative distribution function (= quantile) according to a -truncated Weibull distribution with -minimum value u_min, maximmum value u_max, -scale parameter of original distribution lambda and -shape parameter of original distribution k. -Input argument u must be in the range: -

    - -
    -

    -0 ≤ u ≤ 1 -

    -
    - -

    -Output argument y is in the range: -

    - -
    -

    -y_min ≤ y ≤ y_max -

    -
    - -

    -Plot of the function: -

    - -

    - -

    - -

    -For more details
    -of the Weibull distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    - -

    Example

    -
    -  quantile(0.001)           // = 0.0006323204312624211;
    -  quantile(0.5,0,1,0.5,0.9) // = 0.256951787882498
    -
    - -

    See also

    -

    -TruncatedWeibull.density, -TruncatedWeibull.cumulative. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end quantile; - annotation (Icon(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={1,1}), - graphics={Line( - points={{-72,-62},{-68.5,-62},{-65,-62},{-61.5,-62},{-58,-62},{ - -54.5,-62},{-51,-62},{-47.5,-62},{-44,-62},{-40.5,-62},{-37,-62}, - {-33.5,-62},{-30,-62},{-26.5,-62},{-23,-62},{-19.5,-62},{-16, - -62},{-12.5,-62},{-9,-62},{-5.5,-62},{-2,-62},{1.5,41.1424},{5, - 69.1658},{8.5,78},{12,75.3585},{15.5,65.6645},{19,52.0082},{ - 22.5,36.6157},{26,21.0458},{29.5,6.3239},{33,-6.9424},{36.5, - -18.4596},{40,-28.1579},{43.5,-36.1153}}, - smooth=Smooth.Bezier), - Line( - points={{43.5,-36},{43.5,-63}}), - Line( - points={{43.5,-63},{79.5,-63}})}), - Documentation(info=" -

    -This package provides -

    -
      -
    • probability density function (= derivative of cumulative distribution function),
    • -
    • cumulative distribution function, and
    • -
    • quantile (= inverse cumulative distribution function).
    • -
    -

    -of the truncated Weibull distribution. Examples: -

    - -

    - -

    - -

    - -

    - -

    - -

    - -

    -For more details
    -of the Weibull distribution, see -Wikipedia,
    -of truncated distributions, see -Wikipedia. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end TruncatedWeibull; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/cumulative.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/cumulative.mo new file mode 100644 index 00000000..1e9ed586 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/cumulative.mo @@ -0,0 +1,93 @@ +within Modelica_Noise.Math.Distributions.TruncatedWeibull; +function cumulative + "Cumulative distribution function of truncated Weibull distribution" + import Modelica_Noise.Math.Distributions.Weibull; + extends + Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedCumulative; + input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); + input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); +protected + Real cdf; + Real cdf_min; + Real cdf_max; +algorithm + if u <= u_min then + y := 0; + elseif u < u_max then + cdf :=Weibull.cumulative(u, lambda=lambda, k=k); + cdf_min :=Weibull.cumulative(u_min, lambda=lambda, k=k); + cdf_max :=Weibull.cumulative(u_max, lambda=lambda, k=k); + y := (cdf - cdf_min) / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); + else + y := 1; + end if; + + annotation (Documentation(info=" +

    Syntax

    +
    +Weibull.cumulative(u, u_min=0, u_max=1, lambda=1, k=1);
    +
    + +

    Description

    +

    +This function computes the cumulative distribution function according to a +truncated Weibull distribution with +minimum value u_min, maximmum value u_max, +scale parameter of original distribution lambda and +shape parameter of original distribution k. +The returned value y is in the range: +

    + +

    +0 ≤ y ≤ 1 +

    + +

    +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the Weibull distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  cumulative(0.5)             // = 0.6224593312018546
    +  cumulative(0.5,0,0.8,0.5,2) // = 0.6850805314988328
    +
    + +

    See also

    +

    +TruncatedWeibull.density, +TruncatedWeibull.quantile. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end cumulative; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/density.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/density.mo new file mode 100644 index 00000000..c60d9f97 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/density.mo @@ -0,0 +1,80 @@ +within Modelica_Noise.Math.Distributions.TruncatedWeibull; +function density "Density of truncated Weibull distribution" + import Modelica_Noise.Math.Distributions.Weibull; + extends Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedDensity; + input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); + input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); +protected + Real pdf; + Real cdf_min; + Real cdf_max; +algorithm + if u >= u_min and u <= u_max then + pdf :=Weibull.density(u, lambda=lambda, k=k); + cdf_min :=Weibull.cumulative(u_min, lambda=lambda, k=k); + cdf_max :=Weibull.cumulative(u_max, lambda=lambda, k=k); + y := pdf / max(cdf_max - cdf_min, 10*Modelica.Constants.eps); + else + y := 0; + end if; + annotation (Documentation(info=" +

    Syntax

    +
    +Weibull.density(u, u_min=0, u_max=1, lambda=1, k=1);
    +
    + +

    Description

    +

    +This function computes the probability density function according to a +truncated Weibull distribution with +minimum value u_min, maximmum value u_max, +scale parameter of original distribution lambda and +shape parameter of original distribution k. +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the Weibull distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  density(0.5)             // = 0.9595173756674719
    +  density(0.5,0,0.8,0.5,2) // = 1.5948036466479143
    +
    + +

    See also

    +

    +TruncatedWeibull.cumulative, +TruncatedWeibull.quantile. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end density; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/package.mo new file mode 100644 index 00000000..40b16951 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/package.mo @@ -0,0 +1,78 @@ +within Modelica_Noise.Math.Distributions; +package TruncatedWeibull "Library of truncated Weibull distribution functions" + extends Modelica.Icons.Package; + + + + + annotation (Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={1,1}), + graphics={Line( + points={{-72,-62},{-68.5,-62},{-65,-62},{-61.5,-62},{-58,-62},{ + -54.5,-62},{-51,-62},{-47.5,-62},{-44,-62},{-40.5,-62},{-37,-62}, + {-33.5,-62},{-30,-62},{-26.5,-62},{-23,-62},{-19.5,-62},{-16, + -62},{-12.5,-62},{-9,-62},{-5.5,-62},{-2,-62},{1.5,41.1424},{5, + 69.1658},{8.5,78},{12,75.3585},{15.5,65.6645},{19,52.0082},{ + 22.5,36.6157},{26,21.0458},{29.5,6.3239},{33,-6.9424},{36.5, + -18.4596},{40,-28.1579},{43.5,-36.1153}}, + smooth=Smooth.Bezier), + Line( + points={{43.5,-36},{43.5,-63}}), + Line( + points={{43.5,-63},{79.5,-63}})}), + Documentation(info=" +

    +This package provides +

    +
      +
    • probability density function (= derivative of cumulative distribution function),
    • +
    • cumulative distribution function, and
    • +
    • quantile (= inverse cumulative distribution function).
    • +
    +

    +of the truncated Weibull distribution. Examples: +

    + +

    + +

    + +

    + +

    + +

    + +

    + +

    +For more details
    +of the Weibull distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end TruncatedWeibull; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/package.order b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/package.order new file mode 100644 index 00000000..ddc9fbd9 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/package.order @@ -0,0 +1,3 @@ +density +cumulative +quantile diff --git a/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/quantile.mo b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/quantile.mo new file mode 100644 index 00000000..4f28260a --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Distributions/TruncatedWeibull/quantile.mo @@ -0,0 +1,102 @@ +within Modelica_Noise.Math.Distributions.TruncatedWeibull; +function quantile "Quantile of truncated Weibull distribution" + import Modelica_Noise.Math.Distributions.Weibull; + extends Modelica_Noise.Math.Distributions.Interfaces.partialTruncatedQuantile; + input Real lambda(min=0) = 1 "Scale parameter of the Weibull distribution" annotation(Dialog); + input Real k(min=0) "Shape parameter of the Weibull distribution" annotation(Dialog); +protected + Real cdf_min = Weibull.cumulative(y_min, lambda=lambda, k=k) + "Value of cdf at y_min"; + Real cdf_max = Weibull.cumulative(y_max, lambda=lambda, k=k) + "Value of cdf at y_max"; +algorithm + y := Weibull.quantile(cdf_min + u*(cdf_max-cdf_min), lambda=lambda,k=k); + + /* Close to u=1, large errors in the numerical computation can + occur. The following statement is a guard to still keep the property + that y is within y_min .. y_max + */ + y := min(y_max,max(y_min,y)); + + annotation (smoothOrder=1,Documentation(info=" + +

    Syntax

    +
    +Weibull.quantile(u, y_min=0, y_max=1, lambda=1, k=1);
    +
    + +

    Description

    +

    +This function computes the inverse cumulative distribution function (= quantile) according to a +truncated Weibull distribution with +minimum value u_min, maximmum value u_max, +scale parameter of original distribution lambda and +shape parameter of original distribution k. +Input argument u must be in the range: +

    + +
    +

    +0 ≤ u ≤ 1 +

    +
    + +

    +Output argument y is in the range: +

    + +
    +

    +y_min ≤ y ≤ y_max +

    +
    + +

    +Plot of the function: +

    + +

    + +

    + +

    +For more details
    +of the Weibull distribution, see +Wikipedia,
    +of truncated distributions, see +Wikipedia. +

    + +

    Example

    +
    +  quantile(0.001)           // = 0.0006323204312624211;
    +  quantile(0.5,0,1,0.5,0.9) // = 0.256951787882498
    +
    + +

    See also

    +

    +TruncatedWeibull.density, +TruncatedWeibull.cumulative. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end quantile; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/initialState.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/initialState.mo new file mode 100644 index 00000000..d313dc00 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/initialState.mo @@ -0,0 +1,63 @@ +within Modelica_Noise.Math.Random.Generators.Xorshift1024star; +function initialState + "Returns an initial state for the xorshift1024* algorithm" + extends Interfaces.initialState(final stateSize=Xorshift1024star.nState); +algorithm + state := Random.Utilities.initialStateWithXorshift64star(localSeed,globalSeed,size(state, 1)); + annotation(Inline=true, Documentation(info=" +

    Syntax

    +
    +state = Xorshift1024star.initialState(localSeed, globalSeed);
    +
    + +

    Description

    + +

    +Generates an initial state vector for the Xorshift1024star random number generator +(= xorshift1024* algorithm), from +two Integer numbers given as input (arguments localSeed, globalSeed). Any Integer numbers +can be given (including zero or negative number). The function returns +a reasonable initial state vector with the following strategy: +

    + +

    +The Xorshift64star +random number generator is used to fill the internal state vector with 64 bit random numbers. +

    + +

    Example

    +
    +  parameter Integer localSeed;
    +  parameter Integer globalSeed;
    +  Integer state[Xorshift1024star.nState];
    +initial equation
    +  state = initialState(localSeed, globalSeed);
    +
    + +

    See also

    +

    +Random.Generators.Xorshift1024star.random. +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end initialState; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo index dd5c7357..45d5da47 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/package.mo @@ -2,132 +2,10 @@ within Modelica_Noise.Math.Random.Generators; package Xorshift1024star "Random number generator xorshift1024*" constant Integer nState=33 "The dimension of the internal state vector"; - extends Modelica.Icons.Package; - - - function initialState - "Returns an initial state for the xorshift1024* algorithm" - extends Interfaces.initialState(final stateSize=Xorshift1024star.nState); - algorithm - state := Random.Utilities.initialStateWithXorshift64star(localSeed,globalSeed,size(state, 1)); - annotation(Inline=true, Documentation(info=" -

    Syntax

    -
    -state = Xorshift1024star.initialState(localSeed, globalSeed);
    -
    - -

    Description

    - -

    -Generates an initial state vector for the Xorshift1024star random number generator -(= xorshift1024* algorithm), from -two Integer numbers given as input (arguments localSeed, globalSeed). Any Integer numbers -can be given (including zero or negative number). The function returns -a reasonable initial state vector with the following strategy: -

    - -

    -The Xorshift64star -random number generator is used to fill the internal state vector with 64 bit random numbers. -

    - -

    Example

    -
    -  parameter Integer localSeed;
    -  parameter Integer globalSeed;
    -  Integer state[Xorshift1024star.nState];
    -initial equation
    -  state = initialState(localSeed, globalSeed);
    -
    - -

    See also

    -

    -Random.Generators.Xorshift1024star.random. -

    -", revisions=" -

    - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end initialState; - - - function random - "Returns a uniform random number with the xorshift1024* algorithm" - extends Interfaces.random(final stateSize=Xorshift1024star.nState); - external "C" ModelicaRandom_xorshift1024star(stateIn, stateOut, result) - annotation (Include = "#include \"ModelicaRandom.c\""); - annotation (Documentation(info=" -

    Syntax

    -
    -(r, stateOut) = Xorshift128plus.random(stateIn);
    -
    - -

    Description

    -

    -Returns a uniform random number in the range 0 < random ≤ 1 with the xorshift1024* algorithm. -Input argument stateIn is the state vector of the previous call. -Output argument stateOut is the updated state vector. -If the function is called with identical stateIn vectors, exactly the -same random number r is returned. -

    - -

    Example

    -
    -  parameter Integer localSeed;
    -  parameter Integer globalSeed;
    -  Real r;
    -  Integer state[Xorshift1024star.nState];
    -initial equation
    -  state = initialState(localSeed, globalSeed);
    -equation
    -  when sample(0,0.1) then
    -    (r, state) = random(pre(state));
    -  end when;
    -
    - -

    See also

    -

    -Random.Generators.Xorshift1024star.initialState. -

    -", revisions=" -

    - - + extends Modelica.Icons.Package; - - - -
    Date Description
    June 22, 2015 - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end random; annotation (Documentation(info=" diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/random.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/random.mo new file mode 100644 index 00000000..05272a9a --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift1024star/random.mo @@ -0,0 +1,62 @@ +within Modelica_Noise.Math.Random.Generators.Xorshift1024star; +function random + "Returns a uniform random number with the xorshift1024* algorithm" + extends Interfaces.random(final stateSize=Xorshift1024star.nState); + external "C" ModelicaRandom_xorshift1024star(stateIn, stateOut, result) + annotation (Include = "#include \"ModelicaRandom.c\""); + annotation (Documentation(info=" +

    Syntax

    +
    +(r, stateOut) = Xorshift128plus.random(stateIn);
    +
    + +

    Description

    +

    +Returns a uniform random number in the range 0 < random ≤ 1 with the xorshift1024* algorithm. +Input argument stateIn is the state vector of the previous call. +Output argument stateOut is the updated state vector. +If the function is called with identical stateIn vectors, exactly the +same random number r is returned. +

    + +

    Example

    +
    +  parameter Integer localSeed;
    +  parameter Integer globalSeed;
    +  Real r;
    +  Integer state[Xorshift1024star.nState];
    +initial equation
    +  state = initialState(localSeed, globalSeed);
    +equation
    +  when sample(0,0.1) then
    +    (r, state) = random(pre(state));
    +  end when;
    +
    + +

    See also

    +

    +Random.Generators.Xorshift1024star.initialState. +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end random; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/initialState.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/initialState.mo new file mode 100644 index 00000000..e3ee54af --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/initialState.mo @@ -0,0 +1,61 @@ +within Modelica_Noise.Math.Random.Generators.Xorshift128plus; +function initialState "Returns an initial state for the xorshift128+ algorithm" + extends Interfaces.initialState(final stateSize=Xorshift128plus.nState); +algorithm + state := Random.Utilities.initialStateWithXorshift64star(localSeed,globalSeed,size(state, 1)); + annotation(Inline=true, Documentation(info=" +

    Syntax

    +
    +state = Xorshift128plus.initialState(localSeed, globalSeed);
    +
    + +

    Description

    +

    +Generates an initial state vector for the Xorshift128plus random number generator +(= xorshift128+ algorithm), from +two Integer numbers given as input (arguments localSeed, globalSeed). Any Integer numbers +can be given (including zero or negative number). The function returns +a reasonable initial state vector with the following strategy: +

    + +

    +The Xorshift64star +random number generator is used to fill the internal state vector with 64 bit random numbers. +

    + +

    Example

    +
    +  parameter Integer localSeed;
    +  parameter Integer globalSeed;
    +  Integer state[Xorshift128plus.nState];
    +initial equation
    +  state = initialState(localSeed, globalSeed);
    +
    + +

    See also

    +

    +Random.Generators.Xorshift128plus.random. +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end initialState; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo index c237db84..abaa172d 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/package.mo @@ -2,131 +2,10 @@ within Modelica_Noise.Math.Random.Generators; package Xorshift128plus "Random number generator xorshift128+" constant Integer nState=4 "The dimension of the internal state vector"; - extends Modelica.Icons.Package; - - - function initialState - "Returns an initial state for the xorshift128+ algorithm" - extends Interfaces.initialState(final stateSize=Xorshift128plus.nState); - algorithm - state := Random.Utilities.initialStateWithXorshift64star(localSeed,globalSeed,size(state, 1)); - annotation(Inline=true, Documentation(info=" -

    Syntax

    -
    -state = Xorshift128plus.initialState(localSeed, globalSeed);
    -
    - -

    Description

    -

    -Generates an initial state vector for the Xorshift128plus random number generator -(= xorshift128+ algorithm), from -two Integer numbers given as input (arguments localSeed, globalSeed). Any Integer numbers -can be given (including zero or negative number). The function returns -a reasonable initial state vector with the following strategy: -

    - -

    -The Xorshift64star -random number generator is used to fill the internal state vector with 64 bit random numbers. -

    - -

    Example

    -
    -  parameter Integer localSeed;
    -  parameter Integer globalSeed;
    -  Integer state[Xorshift128plus.nState];
    -initial equation
    -  state = initialState(localSeed, globalSeed);
    -
    - -

    See also

    -

    -Random.Generators.Xorshift128plus.random. -

    -", revisions=" -

    - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end initialState; - - - function random - "Returns a uniform random number with the xorshift128+ algorithm" - extends Interfaces.random(final stateSize=Xorshift128plus.nState); - external "C" ModelicaRandom_xorshift128plus(stateIn, stateOut, result) - annotation (Include = "#include \"ModelicaRandom.c\""); - annotation (Documentation(info=" -

    Syntax

    -
    -(r, stateOut) = Xorshift128plus.random(stateIn);
    -
    - -

    Description

    -

    -Returns a uniform random number in the range 0 < random ≤ 1 with the xorshift128+ algorithm. -Input argument stateIn is the state vector of the previous call. -Output argument stateOut is the updated state vector. -If the function is called with identical stateIn vectors, exactly the -same random number r is returned. -

    - -

    Example

    -
    -  parameter Integer localSeed;
    -  parameter Integer globalSeed;
    -  Real r;
    -  Integer state[Xorshift128plus.nState];
    -initial equation
    -  state = initialState(localSeed, globalSeed);
    -equation
    -  when sample(0,0.1) then
    -    (r, state) = random(pre(state));
    -  end when;
    -
    - -

    See also

    -

    -Random.Generators.Xorshift128plus.initialState. -

    -", revisions=" -

    - - + extends Modelica.Icons.Package; - - - -
    Date Description
    June 22, 2015 - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end random; annotation (Documentation(info=" diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/random.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/random.mo new file mode 100644 index 00000000..786376e4 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift128plus/random.mo @@ -0,0 +1,62 @@ +within Modelica_Noise.Math.Random.Generators.Xorshift128plus; +function random + "Returns a uniform random number with the xorshift128+ algorithm" + extends Interfaces.random(final stateSize=Xorshift128plus.nState); + external "C" ModelicaRandom_xorshift128plus(stateIn, stateOut, result) + annotation (Include = "#include \"ModelicaRandom.c\""); + annotation (Documentation(info=" +

    Syntax

    +
    +(r, stateOut) = Xorshift128plus.random(stateIn);
    +
    + +

    Description

    +

    +Returns a uniform random number in the range 0 < random ≤ 1 with the xorshift128+ algorithm. +Input argument stateIn is the state vector of the previous call. +Output argument stateOut is the updated state vector. +If the function is called with identical stateIn vectors, exactly the +same random number r is returned. +

    + +

    Example

    +
    +  parameter Integer localSeed;
    +  parameter Integer globalSeed;
    +  Real r;
    +  Integer state[Xorshift128plus.nState];
    +initial equation
    +  state = initialState(localSeed, globalSeed);
    +equation
    +  when sample(0,0.1) then
    +    (r, state) = random(pre(state));
    +  end when;
    +
    + +

    See also

    +

    +Random.Generators.Xorshift128plus.initialState. +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end random; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/initialState.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/initialState.mo new file mode 100644 index 00000000..2e51392c --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/initialState.mo @@ -0,0 +1,85 @@ +within Modelica_Noise.Math.Random.Generators.Xorshift64star; +function initialState "Returns an initial state for the xorshift64* algorithm" + extends Interfaces.initialState(final stateSize=Xorshift64star.nState); +protected + Real r "Random number not used outside the function"; + + /* According to http://vigna.di.unimi.it/ftp/papers/xorshift.pdf, the xorshoft* + random number generator generates statistically random numbers from a bad seed + within one iteration. To be on the safe side, 10 iterations are actually used + */ + constant Integer p = 10 "The number of iterations to use"; + +algorithm + // If seed=0 use a large prime number as seed (seed must be different from 0). + if localSeed == 0 and globalSeed == 0 then + state := {126247697,globalSeed}; + else + state := {localSeed,globalSeed}; + end if; + + // Generate p-times a random number, in order to get a "good" state + // even if starting from a bad seed. + for i in 1:p loop + (r,state) := random(state); + end for; +annotation (Documentation(info=" +

    Syntax

    +
    +state = Xorshift64star.initialState(localSeed, globalSeed);
    +
    + +

    Description

    +

    +Generates the initial state vector state for the Xorshift64star random number generator +(= xorshift64* algorithm), from +two Integer numbers given as input (arguments localSeed, globalSeed). Any Integer numbers +can be given (including zero or negative number). The function returns +a reasonable initial state vector with the following strategy: +

    + +

    +If both input +arguments are zero, a fixed non-zero value is used internally for localSeed. +According to xorshift.pdf, +the xorshift64* random number generator generates statistically random numbers from a +bad seed within one iteration. To be on the safe side, actually 10 random numbers are generated +and the returned state is the one from the last iteration. +

    + +

    Example

    +
    +  parameter Integer localSeed;
    +  parameter Integer globalSeed;
    +  Integer state[Xorshift64star.nState];
    +initial equation
    +  state = initialState(localSeed, globalSeed);
    +
    + +

    See also

    +

    +Random.Generators.Xorshift64star.random. +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end initialState; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo index 3b17fc89..019a33b8 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/package.mo @@ -2,155 +2,10 @@ within Modelica_Noise.Math.Random.Generators; package Xorshift64star "Random number generator xorshift64*" constant Integer nState=2 "The dimension of the internal state vector"; - extends Modelica.Icons.Package; - - - function initialState - "Returns an initial state for the xorshift64* algorithm" - extends Interfaces.initialState(final stateSize=Xorshift64star.nState); -protected - Real r "Random number not used outside the function"; - - /* According to http://vigna.di.unimi.it/ftp/papers/xorshift.pdf, the xorshoft* - random number generator generates statistically random numbers from a bad seed - within one iteration. To be on the safe side, 10 iterations are actually used - */ - constant Integer p = 10 "The number of iterations to use"; - - algorithm - // If seed=0 use a large prime number as seed (seed must be different from 0). - if localSeed == 0 and globalSeed == 0 then - state := {126247697,globalSeed}; - else - state := {localSeed,globalSeed}; - end if; - - // Generate p-times a random number, in order to get a "good" state - // even if starting from a bad seed. - for i in 1:p loop - (r,state) := random(state); - end for; - annotation (Documentation(info=" -

    Syntax

    -
    -state = Xorshift64star.initialState(localSeed, globalSeed);
    -
    - -

    Description

    -

    -Generates the initial state vector state for the Xorshift64star random number generator -(= xorshift64* algorithm), from -two Integer numbers given as input (arguments localSeed, globalSeed). Any Integer numbers -can be given (including zero or negative number). The function returns -a reasonable initial state vector with the following strategy: -

    - -

    -If both input -arguments are zero, a fixed non-zero value is used internally for localSeed. -According to xorshift.pdf, -the xorshift64* random number generator generates statistically random numbers from a -bad seed within one iteration. To be on the safe side, actually 10 random numbers are generated -and the returned state is the one from the last iteration. -

    - -

    Example

    -
    -  parameter Integer localSeed;
    -  parameter Integer globalSeed;
    -  Integer state[Xorshift64star.nState];
    -initial equation
    -  state = initialState(localSeed, globalSeed);
    -
    - -

    See also

    -

    -Random.Generators.Xorshift64star.random. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end initialState; - - - function random - "Returns a uniform random number with the xorshift64* algorithm" - extends Interfaces.random(final stateSize=Xorshift64star.nState); - external "C" ModelicaRandom_xorshift64star(stateIn, stateOut, result) - annotation (Include = "#include \"ModelicaRandom.c\""); - annotation(Documentation(info=" -

    Syntax

    -
    -(r, stateOut) = Xorshift64star.random(stateIn);
    -
    - -

    Description

    -

    -Returns a uniform random number r in the range 0 < r ≤ 1 with the xorshift64* algorithm. -Input argument stateIn is the state vector of the previous call. -Output argument stateOut is the updated state vector. -If the function is called with identical stateIn vectors, exactly the -same random number r is returned. -

    - -

    Example

    -
    -  parameter Integer localSeed;
    -  parameter Integer globalSeed;
    -  Real r;
    -  Integer state[Xorshift64star.nState];
    -initial equation
    -  state = initialState(localSeed, globalSeed);
    -equation
    -  when sample(0,0.1) then
    -    (r, state) = random(pre(state));
    -  end when;
    -
    - -

    See also

    -

    -Random.Generators.Xorshift64star.initialState. -

    -", revisions=" -

    - - - - -
    Date Description
    June 22, 2015 + extends Modelica.Icons.Package; - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end random; annotation (Documentation(info=" diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/random.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/random.mo new file mode 100644 index 00000000..8504e452 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Generators/Xorshift64star/random.mo @@ -0,0 +1,62 @@ +within Modelica_Noise.Math.Random.Generators.Xorshift64star; +function random + "Returns a uniform random number with the xorshift64* algorithm" + extends Interfaces.random(final stateSize=Xorshift64star.nState); + external "C" ModelicaRandom_xorshift64star(stateIn, stateOut, result) + annotation (Include = "#include \"ModelicaRandom.c\""); + annotation(Documentation(info=" +

    Syntax

    +
    +(r, stateOut) = Xorshift64star.random(stateIn);
    +
    + +

    Description

    +

    +Returns a uniform random number r in the range 0 < r ≤ 1 with the xorshift64* algorithm. +Input argument stateIn is the state vector of the previous call. +Output argument stateOut is the updated state vector. +If the function is called with identical stateIn vectors, exactly the +same random number r is returned. +

    + +

    Example

    +
    +  parameter Integer localSeed;
    +  parameter Integer globalSeed;
    +  Real r;
    +  Integer state[Xorshift64star.nState];
    +initial equation
    +  state = initialState(localSeed, globalSeed);
    +equation
    +  when sample(0,0.1) then
    +    (r, state) = random(pre(state));
    +  end when;
    +
    + +

    See also

    +

    +Random.Generators.Xorshift64star.initialState. +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end random; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/Internal.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal.mo deleted file mode 100644 index a06c4a53..00000000 --- a/Modelica_Noise 1.0 Beta.1/Math/Special/Internal.mo +++ /dev/null @@ -1,445 +0,0 @@ -within Modelica_Noise.Math.Special; -package Internal - "Internal utility functions that should not be directly utilized by the user" - extends Modelica.Icons.InternalPackage; - - function polyEval "Evaluate a polynomial c[1] + c[2]*u + c[3]*u^2 + ...." - input Real c[:] "Polnomial coefficients"; - input Real u "Abscissa value"; - output Real y "= c[1] + u*(c[2] + u*(c[3] + u*(c[4]*u^3 + ...)))"; - algorithm - y := c[size(c,1)]; - for j in size(c, 1)-1:-1:1 loop - y := c[j] + u*y; - end for; - annotation (Documentation(info=" -

    -Evaluate a polynomial using Horner's scheme. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end polyEval; - - function erfcUtil "erfc(z) for 0.5 <= z " - input Real z "Input argument 0.5 <= z required (but not checked)"; - output Real y "erfc(z) for 0.5 <= z"; - protected - constant Real y1 = 0.405935764312744140625; - constant Real P1[6] = {-0.098090592216281240205, - 0.178114665841120341155, - 0.191003695796775433986, - 0.0888900368967884466578, - 0.0195049001251218801359, - 0.00180424538297014223957}; - constant Real Q1[7] = {1, - 1.84759070983002217845, - 1.42628004845511324508, - 0.578052804889902404909, - 0.12385097467900864233, - 0.0113385233577001411017, - 0.337511472483094676155e-5}; - - constant Real y2 = 0.50672817230224609375; - constant Real P2[6] = {-0.0243500476207698441272, - 0.0386540375035707201728, - 0.04394818964209516296, - 0.0175679436311802092299, - 0.00323962406290842133584, - 0.000235839115596880717416}; - constant Real Q2[6] = {1, - 1.53991494948552447182, - 0.982403709157920235114, - 0.325732924782444448493, - 0.0563921837420478160373, - 0.00410369723978904575884}; - - constant Real y3 = 0.5405750274658203125; - constant Real P3[6] = {0.00295276716530971662634, - 0.0137384425896355332126, - 0.00840807615555585383007, - 0.00212825620914618649141, - 0.000250269961544794627958, - 0.113212406648847561139e-4}; - constant Real Q3[6] = {1, - 1.04217814166938418171, - 0.442597659481563127003, - 0.0958492726301061423444, - 0.0105982906484876531489, - 0.000479411269521714493907}; - - constant Real y4 = 0.5579090118408203125; - constant Real P4[7] = {0.00628057170626964891937, - 0.0175389834052493308818, - -0.212652252872804219852, - -0.687717681153649930619, - -2.5518551727311523996, - -3.22729451764143718517, - -2.8175401114513378771}; - constant Real Q4[7] = {1, - 2.79257750980575282228, - 11.0567237927800161565, - 15.930646027911794143, - 22.9367376522880577224, - 13.5064170191802889145, - 5.48409182238641741584}; - - algorithm - if z < 1.5 then - // Maximum Deviation Found: 3.702e-17 - // Expected Error Term: 3.702e-17 - // Maximum Relative Change in Control Points: 2.845e-04 - // Max Error found at double precision = 4.841816e-17 - y :=y1 + polyEval(P1, z - 0.5)/polyEval(Q1, z - 0.5); - - elseif z < 2.5 then - // Max Error found at double precision = 6.599585e-18 - // Maximum Deviation Found: 3.909e-18 - // Expected Error Term: 3.909e-18 - // Maximum Relative Change in Control Points: 9.886e-05 - y :=y2 + polyEval(P2, z - 1.5)/polyEval(Q2, z - 1.5); - - elseif z < 4.5 then - // Maximum Deviation Found: 1.512e-17 - // Expected Error Term: 1.512e-17 - // Maximum Relative Change in Control Points: 2.222e-04 - // Max Error found at double precision = 2.062515e-17 - y :=y3 + polyEval(P3, z - 3.5)/polyEval(Q3, z - 3.5); - - else - // Max Error found at double precision = 2.997958e-17 - // Maximum Deviation Found: 2.860e-17 - // Expected Error Term: 2.859e-17 - // Maximum Relative Change in Control Points: 1.357e-05 - y :=y4 + polyEval(P4, 1/z)/polyEval(Q4, 1/z); - end if; - - y := y*(exp(-z * z) / z); - annotation (Documentation(info=" -

    -Utility function in order to compute part of erf(..) and erfc(..). -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); - end erfcUtil; - - function erfInvUtil "Utility function for erfInv(u) and erfcInv(u)" - input Real p "First input argument"; - input Real q "Second input argument"; - output Real y "Reault value"; - - protected - Real g; - Real r; - Real xs; - Real x; - - constant Real y1 = 0.0891314744949340820313; - constant Real P1[8] = {-0.000508781949658280665617, - -0.00836874819741736770379, - 0.0334806625409744615033, - -0.0126926147662974029034, - -0.0365637971411762664006, - 0.0219878681111168899165, - 0.00822687874676915743155, - -0.00538772965071242932965}; - constant Real Q1[10] = { 1.0, - -0.970005043303290640362, - -1.56574558234175846809, - 1.56221558398423026363, - 0.662328840472002992063, - -0.71228902341542847553, - -0.0527396382340099713954, - 0.0795283687341571680018, - -0.00233393759374190016776, - 0.000886216390456424707504}; - - constant Real y2 = 2.249481201171875; - constant Real P2[9] = {-0.202433508355938759655, - 0.105264680699391713268, - 8.37050328343119927838, - 17.6447298408374015486, - -18.8510648058714251895, - -44.6382324441786960818, - 17.445385985570866523, - 21.1294655448340526258, - -3.67192254707729348546}; - constant Real Q2[9] = {1.0, - 6.24264124854247537712, - 3.9713437953343869095, - -28.6608180499800029974, - -20.1432634680485188801, - 48.5609213108739935468, - 10.8268667355460159008, - -22.6436933413139721736, - 1.72114765761200282724}; - - constant Real y3 = 0.807220458984375; - constant Real P3[11] = {-0.131102781679951906451, - -0.163794047193317060787, - 0.117030156341995252019, - 0.387079738972604337464, - 0.337785538912035898924, - 0.142869534408157156766, - 0.0290157910005329060432, - 0.00214558995388805277169, - -0.679465575181126350155e-6, - 0.285225331782217055858e-7, - -0.681149956853776992068e-9}; - constant Real Q3[8] = { 1.0, - 3.46625407242567245975, - 5.38168345707006855425, - 4.77846592945843778382, - 2.59301921623620271374, - 0.848854343457902036425, - 0.152264338295331783612, - 0.01105924229346489121}; - - constant Real y4 = 0.93995571136474609375; - constant Real P4[9] = {-0.0350353787183177984712, - -0.00222426529213447927281, - 0.0185573306514231072324, - 0.00950804701325919603619, - 0.00187123492819559223345, - 0.000157544617424960554631, - 0.460469890584317994083e-5, - -0.230404776911882601748e-9, - 0.266339227425782031962e-11}; - constant Real Q4[7] = { 1.0, - 1.3653349817554063097, - 0.762059164553623404043, - 0.220091105764131249824, - 0.0341589143670947727934, - 0.00263861676657015992959, - 0.764675292302794483503e-4}; - - constant Real y5 = 0.98362827301025390625; - constant Real P5[9] = {-0.0167431005076633737133, - -0.00112951438745580278863, - 0.00105628862152492910091, - 0.000209386317487588078668, - 0.149624783758342370182e-4, - 0.449696789927706453732e-6, - 0.462596163522878599135e-8, - -0.281128735628831791805e-13, - 0.99055709973310326855e-16}; - constant Real Q5[7] = {1.0, - 0.591429344886417493481, - 0.138151865749083321638, - 0.0160746087093676504695, - 0.000964011807005165528527, - 0.275335474764726041141e-4, - 0.282243172016108031869e-6}; - - constant Real y6 = 0.99714565277099609375; - constant Real P6[8] = {-0.0024978212791898131227, - -0.779190719229053954292e-5, - 0.254723037413027451751e-4, - 0.162397777342510920873e-5, - 0.396341011304801168516e-7, - 0.411632831190944208473e-9, - 0.145596286718675035587e-11, - -0.116765012397184275695e-17}; - constant Real Q6[7] = {1.0, - 0.207123112214422517181, - 0.0169410838120975906478, - 0.000690538265622684595676, - 0.145007359818232637924e-4, - 0.144437756628144157666e-6, - 0.509761276599778486139e-9}; - - constant Real y7 = 0.99941349029541015625; - constant Real P7[8] = {-0.000539042911019078575891, - -0.28398759004727721098e-6, - 0.899465114892291446442e-6, - 0.229345859265920864296e-7, - 0.225561444863500149219e-9, - 0.947846627503022684216e-12, - 0.135880130108924861008e-14, - -0.348890393399948882918e-21}; - constant Real Q7[7] = { 1.0, - 0.0845746234001899436914, - 0.00282092984726264681981, - 0.468292921940894236786e-4, - 0.399968812193862100054e-6, - 0.161809290887904476097e-8, - 0.231558608310259605225e-11}; - algorithm - if p <= 0.5 then - // - // Evaluate inverse erf using the rational approximation: - // - // x = p(p+10)(Y+R(p)) - // - // Where Y is a constant, and R(p) is optimised for a low - // absolute error compared to |Y|. - // - // double: Max error found: 2.001849e-18 - // long double: Max error found: 1.017064e-20 - // Maximum Deviation Found (actual error term at infinite precision) 8.030e-21 - // - g :=p*(p + 10); - r :=polyEval(P1, p)/polyEval(Q1, p); - y :=g*y1 + g*r; - - elseif q >= 0.25 then - // - // Rational approximation for 0.5 > q >= 0.25 - // - // x = sqrt(-2*log(q)) / (Y + R(q)) - // - // Where Y is a constant, and R(q) is optimised for a low - // absolute error compared to Y. - // - // double : Max error found: 7.403372e-17 - // long double : Max error found: 6.084616e-20 - // Maximum Deviation Found (error term) 4.811e-20 - // - g :=sqrt(-2*log(q)); - xs :=q - 0.25; - r :=polyEval(P2, xs)/polyEval(Q2, xs); - y :=g/(y2 + r); - - else - // - // For q < 0.25 we have a series of rational approximations all - // of the general form: - // - // let: x = sqrt(-log(q)) - // - // Then the result is given by: - // - // x(Y+R(x-B)) - // - // where Y is a constant, B is the lowest value of x for which - // the approximation is valid, and R(x-B) is optimised for a low - // absolute error compared to Y. - // - // Note that almost all code will really go through the first - // or maybe second approximation. After than we're dealing with very - // small input values indeed: 80 and 128 bit long double's go all the - // way down to ~ 1e-5000 so the "tail" is rather long... - // - x :=sqrt(-log(q)); - if x < 3 then - // Max error found: 1.089051e-20 - xs :=x - 1.125; - r :=polyEval(P3, xs)/polyEval(Q3, xs); - y :=y3*x + r*x; - - elseif x < 6 then - // Max error found: 8.389174e-21 - xs :=x - 3; - r :=polyEval(P4, xs)/polyEval(Q4, xs); - y :=y4*x + r*x; - - elseif x < 18 then - // Max error found: 1.481312e-19 - xs :=x - 6; - r :=polyEval(P5, xs)/polyEval(Q5, xs); - y :=y5*x + r*x; - - elseif x < 44 then - // Max error found: 5.697761e-20 - xs :=x - 18; - r :=polyEval(P6, xs)/polyEval(Q6, xs); - y :=y6*x + r*x; - - else - // Max error found: 1.279746e-20 - xs :=x - 44; - r :=polyEval(P7, xs)/polyEval(Q7, xs); - y :=y7*x + r*x; - end if; - end if; - annotation (Documentation(info=" -

    -Utility function in order to compute erfInv(..) and erfcInv(..). -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

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

    -This package contains internal utility functions for the computation of -erf, erfc, erfInc and erfcInv. These functions should not be directly used -by the user. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end Internal; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/erfInvUtil.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/erfInvUtil.mo new file mode 100644 index 00000000..f64d5b2a --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/erfInvUtil.mo @@ -0,0 +1,257 @@ +within Modelica_Noise.Math.Special.Internal; +function erfInvUtil "Utility function for erfInv(u) and erfcInv(u)" + input Real p "First input argument"; + input Real q "Second input argument"; + output Real y "Reault value"; + +protected + Real g; + Real r; + Real xs; + Real x; + + constant Real y1 = 0.0891314744949340820313; + constant Real P1[8] = {-0.000508781949658280665617, + -0.00836874819741736770379, + 0.0334806625409744615033, + -0.0126926147662974029034, + -0.0365637971411762664006, + 0.0219878681111168899165, + 0.00822687874676915743155, + -0.00538772965071242932965}; + constant Real Q1[10] = { 1.0, + -0.970005043303290640362, + -1.56574558234175846809, + 1.56221558398423026363, + 0.662328840472002992063, + -0.71228902341542847553, + -0.0527396382340099713954, + 0.0795283687341571680018, + -0.00233393759374190016776, + 0.000886216390456424707504}; + + constant Real y2 = 2.249481201171875; + constant Real P2[9] = {-0.202433508355938759655, + 0.105264680699391713268, + 8.37050328343119927838, + 17.6447298408374015486, + -18.8510648058714251895, + -44.6382324441786960818, + 17.445385985570866523, + 21.1294655448340526258, + -3.67192254707729348546}; + constant Real Q2[9] = {1.0, + 6.24264124854247537712, + 3.9713437953343869095, + -28.6608180499800029974, + -20.1432634680485188801, + 48.5609213108739935468, + 10.8268667355460159008, + -22.6436933413139721736, + 1.72114765761200282724}; + + constant Real y3 = 0.807220458984375; + constant Real P3[11] = {-0.131102781679951906451, + -0.163794047193317060787, + 0.117030156341995252019, + 0.387079738972604337464, + 0.337785538912035898924, + 0.142869534408157156766, + 0.0290157910005329060432, + 0.00214558995388805277169, + -0.679465575181126350155e-6, + 0.285225331782217055858e-7, + -0.681149956853776992068e-9}; + constant Real Q3[8] = { 1.0, + 3.46625407242567245975, + 5.38168345707006855425, + 4.77846592945843778382, + 2.59301921623620271374, + 0.848854343457902036425, + 0.152264338295331783612, + 0.01105924229346489121}; + + constant Real y4 = 0.93995571136474609375; + constant Real P4[9] = {-0.0350353787183177984712, + -0.00222426529213447927281, + 0.0185573306514231072324, + 0.00950804701325919603619, + 0.00187123492819559223345, + 0.000157544617424960554631, + 0.460469890584317994083e-5, + -0.230404776911882601748e-9, + 0.266339227425782031962e-11}; + constant Real Q4[7] = { 1.0, + 1.3653349817554063097, + 0.762059164553623404043, + 0.220091105764131249824, + 0.0341589143670947727934, + 0.00263861676657015992959, + 0.764675292302794483503e-4}; + + constant Real y5 = 0.98362827301025390625; + constant Real P5[9] = {-0.0167431005076633737133, + -0.00112951438745580278863, + 0.00105628862152492910091, + 0.000209386317487588078668, + 0.149624783758342370182e-4, + 0.449696789927706453732e-6, + 0.462596163522878599135e-8, + -0.281128735628831791805e-13, + 0.99055709973310326855e-16}; + constant Real Q5[7] = {1.0, + 0.591429344886417493481, + 0.138151865749083321638, + 0.0160746087093676504695, + 0.000964011807005165528527, + 0.275335474764726041141e-4, + 0.282243172016108031869e-6}; + + constant Real y6 = 0.99714565277099609375; + constant Real P6[8] = {-0.0024978212791898131227, + -0.779190719229053954292e-5, + 0.254723037413027451751e-4, + 0.162397777342510920873e-5, + 0.396341011304801168516e-7, + 0.411632831190944208473e-9, + 0.145596286718675035587e-11, + -0.116765012397184275695e-17}; + constant Real Q6[7] = {1.0, + 0.207123112214422517181, + 0.0169410838120975906478, + 0.000690538265622684595676, + 0.145007359818232637924e-4, + 0.144437756628144157666e-6, + 0.509761276599778486139e-9}; + + constant Real y7 = 0.99941349029541015625; + constant Real P7[8] = {-0.000539042911019078575891, + -0.28398759004727721098e-6, + 0.899465114892291446442e-6, + 0.229345859265920864296e-7, + 0.225561444863500149219e-9, + 0.947846627503022684216e-12, + 0.135880130108924861008e-14, + -0.348890393399948882918e-21}; + constant Real Q7[7] = { 1.0, + 0.0845746234001899436914, + 0.00282092984726264681981, + 0.468292921940894236786e-4, + 0.399968812193862100054e-6, + 0.161809290887904476097e-8, + 0.231558608310259605225e-11}; +algorithm + if p <= 0.5 then + // + // Evaluate inverse erf using the rational approximation: + // + // x = p(p+10)(Y+R(p)) + // + // Where Y is a constant, and R(p) is optimised for a low + // absolute error compared to |Y|. + // + // double: Max error found: 2.001849e-18 + // long double: Max error found: 1.017064e-20 + // Maximum Deviation Found (actual error term at infinite precision) 8.030e-21 + // + g :=p*(p + 10); + r :=polyEval(P1, p)/polyEval(Q1, p); + y :=g*y1 + g*r; + + elseif q >= 0.25 then + // + // Rational approximation for 0.5 > q >= 0.25 + // + // x = sqrt(-2*log(q)) / (Y + R(q)) + // + // Where Y is a constant, and R(q) is optimised for a low + // absolute error compared to Y. + // + // double : Max error found: 7.403372e-17 + // long double : Max error found: 6.084616e-20 + // Maximum Deviation Found (error term) 4.811e-20 + // + g :=sqrt(-2*log(q)); + xs :=q - 0.25; + r :=polyEval(P2, xs)/polyEval(Q2, xs); + y :=g/(y2 + r); + + else + // + // For q < 0.25 we have a series of rational approximations all + // of the general form: + // + // let: x = sqrt(-log(q)) + // + // Then the result is given by: + // + // x(Y+R(x-B)) + // + // where Y is a constant, B is the lowest value of x for which + // the approximation is valid, and R(x-B) is optimised for a low + // absolute error compared to Y. + // + // Note that almost all code will really go through the first + // or maybe second approximation. After than we're dealing with very + // small input values indeed: 80 and 128 bit long double's go all the + // way down to ~ 1e-5000 so the "tail" is rather long... + // + x :=sqrt(-log(q)); + if x < 3 then + // Max error found: 1.089051e-20 + xs :=x - 1.125; + r :=polyEval(P3, xs)/polyEval(Q3, xs); + y :=y3*x + r*x; + + elseif x < 6 then + // Max error found: 8.389174e-21 + xs :=x - 3; + r :=polyEval(P4, xs)/polyEval(Q4, xs); + y :=y4*x + r*x; + + elseif x < 18 then + // Max error found: 1.481312e-19 + xs :=x - 6; + r :=polyEval(P5, xs)/polyEval(Q5, xs); + y :=y5*x + r*x; + + elseif x < 44 then + // Max error found: 5.697761e-20 + xs :=x - 18; + r :=polyEval(P6, xs)/polyEval(Q6, xs); + y :=y6*x + r*x; + + else + // Max error found: 1.279746e-20 + xs :=x - 44; + r :=polyEval(P7, xs)/polyEval(Q7, xs); + y :=y7*x + r*x; + end if; + end if; + annotation (Documentation(info=" +

    +Utility function in order to compute erfInv(..) and erfcInv(..). +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end erfInvUtil; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/erfcUtil.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/erfcUtil.mo new file mode 100644 index 00000000..c8e2f057 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/erfcUtil.mo @@ -0,0 +1,122 @@ +within Modelica_Noise.Math.Special.Internal; +function erfcUtil "erfc(z) for 0.5 <= z " + input Real z "Input argument 0.5 <= z required (but not checked)"; + output Real y "erfc(z) for 0.5 <= z"; +protected + constant Real y1 = 0.405935764312744140625; + constant Real P1[6] = {-0.098090592216281240205, + 0.178114665841120341155, + 0.191003695796775433986, + 0.0888900368967884466578, + 0.0195049001251218801359, + 0.00180424538297014223957}; + constant Real Q1[7] = {1, + 1.84759070983002217845, + 1.42628004845511324508, + 0.578052804889902404909, + 0.12385097467900864233, + 0.0113385233577001411017, + 0.337511472483094676155e-5}; + + constant Real y2 = 0.50672817230224609375; + constant Real P2[6] = {-0.0243500476207698441272, + 0.0386540375035707201728, + 0.04394818964209516296, + 0.0175679436311802092299, + 0.00323962406290842133584, + 0.000235839115596880717416}; + constant Real Q2[6] = {1, + 1.53991494948552447182, + 0.982403709157920235114, + 0.325732924782444448493, + 0.0563921837420478160373, + 0.00410369723978904575884}; + + constant Real y3 = 0.5405750274658203125; + constant Real P3[6] = {0.00295276716530971662634, + 0.0137384425896355332126, + 0.00840807615555585383007, + 0.00212825620914618649141, + 0.000250269961544794627958, + 0.113212406648847561139e-4}; + constant Real Q3[6] = {1, + 1.04217814166938418171, + 0.442597659481563127003, + 0.0958492726301061423444, + 0.0105982906484876531489, + 0.000479411269521714493907}; + + constant Real y4 = 0.5579090118408203125; + constant Real P4[7] = {0.00628057170626964891937, + 0.0175389834052493308818, + -0.212652252872804219852, + -0.687717681153649930619, + -2.5518551727311523996, + -3.22729451764143718517, + -2.8175401114513378771}; + constant Real Q4[7] = {1, + 2.79257750980575282228, + 11.0567237927800161565, + 15.930646027911794143, + 22.9367376522880577224, + 13.5064170191802889145, + 5.48409182238641741584}; + +algorithm + if z < 1.5 then + // Maximum Deviation Found: 3.702e-17 + // Expected Error Term: 3.702e-17 + // Maximum Relative Change in Control Points: 2.845e-04 + // Max Error found at double precision = 4.841816e-17 + y :=y1 + polyEval(P1, z - 0.5)/polyEval(Q1, z - 0.5); + + elseif z < 2.5 then + // Max Error found at double precision = 6.599585e-18 + // Maximum Deviation Found: 3.909e-18 + // Expected Error Term: 3.909e-18 + // Maximum Relative Change in Control Points: 9.886e-05 + y :=y2 + polyEval(P2, z - 1.5)/polyEval(Q2, z - 1.5); + + elseif z < 4.5 then + // Maximum Deviation Found: 1.512e-17 + // Expected Error Term: 1.512e-17 + // Maximum Relative Change in Control Points: 2.222e-04 + // Max Error found at double precision = 2.062515e-17 + y :=y3 + polyEval(P3, z - 3.5)/polyEval(Q3, z - 3.5); + + else + // Max Error found at double precision = 2.997958e-17 + // Maximum Deviation Found: 2.860e-17 + // Expected Error Term: 2.859e-17 + // Maximum Relative Change in Control Points: 1.357e-05 + y :=y4 + polyEval(P4, 1/z)/polyEval(Q4, 1/z); + end if; + + y := y*(exp(-z * z) / z); + annotation (Documentation(info=" +

    +Utility function in order to compute part of erf(..) and erfc(..). +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end erfcUtil; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/package.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/package.mo new file mode 100644 index 00000000..2e406b31 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/package.mo @@ -0,0 +1,35 @@ +within Modelica_Noise.Math.Special; +package Internal "Internal utility functions that should not be directly utilized by the user" + extends Modelica.Icons.InternalPackage; + + + + + annotation (Documentation(info=" +

    +This package contains internal utility functions for the computation of +erf, erfc, erfInc and erfcInv. These functions should not be directly used +by the user. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end Internal; diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/package.order b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/package.order new file mode 100644 index 00000000..bc7cdf20 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/package.order @@ -0,0 +1,3 @@ +polyEval +erfcUtil +erfInvUtil diff --git a/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/polyEval.mo b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/polyEval.mo new file mode 100644 index 00000000..5328099c --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Math/Special/Internal/polyEval.mo @@ -0,0 +1,37 @@ +within Modelica_Noise.Math.Special.Internal; +function polyEval "Evaluate a polynomial c[1] + c[2]*u + c[3]*u^2 + ...." + input Real c[:] "Polnomial coefficients"; + input Real u "Abscissa value"; + output Real y "= c[1] + u*(c[2] + u*(c[3] + u*(c[4]*u^3 + ...)))"; +algorithm + y := c[size(c,1)]; + for j in size(c, 1)-1:-1:1 loop + y := c[j] + u*y; + end for; + annotation (Documentation(info=" +

    +Evaluate a polynomial using Horner's scheme. +

    +", + revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end polyEval; From eb1a076c1f64acf5df744658ef0638af3eae78c5 Mon Sep 17 00:00:00 2001 From: tbeu Date: Tue, 13 Oct 2015 14:30:12 +0200 Subject: [PATCH 43/46] Avoid variable name "state" Variable name "state" is a potential key word and thus inauspicious. --- .../Math/Random/Utilities/initializeImpureRandom.mo | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo index 75b6c78a..ff6ff79b 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo @@ -8,24 +8,24 @@ function initializeImpureRandom protected constant Integer localSeed = 715827883 "Since there is no local seed, a large prime number is used"; - Integer state[33] + Integer rngState[33] "The internal state vector of the impure random number generator"; function setInternalState "Stores the given state vector in an external static variable" - input Integer[33] state "The initial state"; + input Integer[33] rngState "The initial state"; input Integer id; - external "C" ModelicaRandom_setInternalState_xorshift1024star(state, size(state,1), id) + external "C" ModelicaRandom_setInternalState_xorshift1024star(rngState, size(rngState,1), id) annotation (Include = "#include \"ModelicaRandom.c\""); end setInternalState; algorithm // Determine the internal state (several iterations with a generator that quickly generates good numbers - state := Random.Utilities.initialStateWithXorshift64star(localSeed,seed,size(state, 1)); + rngState := Random.Utilities.initialStateWithXorshift64star(localSeed,seed,size(rngState, 1)); id :=localSeed; // Copy the internal state into the internal C static memory - setInternalState(state, id); + setInternalState(rngState, id); annotation (Documentation(info="

    Syntax

    
    From 8c0fbab0f1d62f6e3db517719a0dc78a2e52cd45 Mon Sep 17 00:00:00 2001
    From: akloeckner 
    Date: Wed, 14 Oct 2015 14:12:13 +0200
    Subject: [PATCH 44/46] Some nicer indents
    
    ---
     .../initialStateWithXorshift64star.mo          | 18 +++++++++---------
     1 file changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo
    index 15876d56..685238f3 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initialStateWithXorshift64star.mo	
    @@ -11,28 +11,28 @@ function initialStateWithXorshift64star
     
     protected
       Real r "Random number only used inside function";
    -  Integer aux[2];
    -  Integer nStateEven;
    +  Integer aux[2] "Intermediate container of state integers";
    +  Integer nStateEven "Highest even number <= nState";
     algorithm
       // Set the first 2 states by using the initialState() function
    -  aux :=Xorshift64star.initialState(localSeed, globalSeed);
    +  aux            := Xorshift64star.initialState(localSeed, globalSeed);
       if nState >= 2 then
    -    state[1:2] := aux;
    +    state[1:2]   := aux;
       else
    -    state[1]   := aux[1];
    +    state[1]     := aux[1];
       end if;
     
       // Fill the next elements of the state vector
    -  nStateEven :=2*div(nState, 2);
    +  nStateEven     := 2*div(nState, 2);
       for i in 3:2:nStateEven loop
    -    (r,aux) := Xorshift64star.random(state[i-2:i-1]);
    +    (r,aux)      := Xorshift64star.random(state[i-2:i-1]);
         state[i:i+1] := aux;
       end for;
     
       // If nState is uneven, fill the last element as well
       if nState >= 3 and nState <> nStateEven then
    -    (r,aux) := Xorshift64star.random(state[nState-2:nState-1]);
    -    state[nState] :=aux[1];
    +    (r,aux)       := Xorshift64star.random(state[nState-2:nState-1]);
    +    state[nState] := aux[1];
       end if;
     
       annotation (Documentation(revisions="
    
    From 8f745e1f50e1bab5118d625e0a142501983ac8e3 Mon Sep 17 00:00:00 2001
    From: Martin Otter 
    Date: Wed, 9 Dec 2015 18:37:17 +0100
    Subject: [PATCH 45/46] Restructured package Modelica_Noise.Noise so that
     "replaceable" is no longer used in any of the blocks (in order that all
     Modelica tools are able to support the Noise blocks). In particular this
     means: - The GenericNoise block is replaced by several noise blocks, where
     every block has a specific random distribution. - The examples have been
     adapted.
    
    ---
     .../Examples/NoiseExamples/AutomaticSeed.mo   |  39 +--
     .../Examples/NoiseExamples/Densities.mo       |  12 +-
     .../Examples/NoiseExamples/Distributions.mo   |  34 +-
     .../Examples/NoiseExamples/ImpureGenerator.mo |   3 +-
     .../NoiseExamples/NormalNoiseProperties.mo    |  69 +++-
     .../NoiseExamples/TruncatedDensities.mo       |  80 -----
     .../{GenericNoise.mo => UniformNoise.mo}      |  17 +-
     .../NoiseExamples/UniformNoiseProperties.mo   |   6 +-
     .../NoiseExamples/Utilities/ImpureRandom.mo   |   2 +-
     .../{Density.mo => NormalDensity.mo}          |  58 +---
     .../Parts/MotorWithCurrentControl.mo          |  10 +-
     .../NoiseExamples/Utilities/UniformDensity.mo |  73 +++++
     .../NoiseExamples/Utilities/WeibullDensity.mo |  73 +++++
     .../NoiseExamples/Utilities/package.order     |   4 +-
     .../NoiseExamples/WeibullNoiseProperties.mo   |  56 ----
     .../Examples/NoiseExamples/package.order      |   4 +-
     .../Blocks/Examples/package.mo                |   2 +-
     .../Blocks/Interfaces.mo                      | 135 ++++++++
     .../Blocks/Math/package.mo                    |   2 -
     .../Blocks/Noise/BandLimitedWhiteNoise.mo     |  38 ++-
     .../Blocks/Noise/GenericNoise.mo              | 302 ------------------
     .../Blocks/Noise/GlobalSeed.mo                |  45 +--
     .../Blocks/Noise/NormalNoise.mo               |  65 ++++
     .../Blocks/Noise/TruncatedNormalNoise.mo      |  90 ++++++
     .../Blocks/Noise/UniformNoise.mo              |  68 ++++
     .../Blocks/Noise/package.mo                   | 162 +++++++---
     .../Blocks/Noise/package.order                |   4 +-
     .../Blocks/package.order                      |   1 +
     .../Math/Random/Utilities/impureRandom.mo     |   2 +-
     .../Utilities/initializeImpureRandom.mo       |   2 +-
     .../Examples/NoiseExamples/Distributions.png  | Bin 8544 -> 7231 bytes
     ...nce.PNG => DrydenContinuousTurbulence.png} | Bin
     .../NoiseExamples/TruncatedDensities.png      | Bin 9059 -> 0 bytes
     .../{GenericNoise.png => UniformNoise.png}    | Bin
     .../NoiseExamples/WeibullNoiseProperties1.png | Bin 19429 -> 0 bytes
     35 files changed, 804 insertions(+), 654 deletions(-)
     delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo
     rename Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/{GenericNoise.mo => UniformNoise.mo} (76%)
     rename Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/{Density.mo => NormalDensity.mo} (57%)
     create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/UniformDensity.mo
     create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/WeibullDensity.mo
     delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/WeibullNoiseProperties.mo
     create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Interfaces.mo
     delete mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo
     create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Noise/NormalNoise.mo
     create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Noise/TruncatedNormalNoise.mo
     create mode 100644 Modelica_Noise 1.0 Beta.1/Blocks/Noise/UniformNoise.mo
     rename Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/{DrydenContinuousTurbulence.PNG => DrydenContinuousTurbulence.png} (100%)
     delete mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/TruncatedDensities.png
     rename Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/{GenericNoise.png => UniformNoise.png} (100%)
     delete mode 100644 Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/WeibullNoiseProperties1.png
    
    diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/AutomaticSeed.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/AutomaticSeed.mo
    index fd57910d..e6ffd29d 100644
    --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/AutomaticSeed.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/AutomaticSeed.mo	
    @@ -1,6 +1,6 @@
     within Modelica_Noise.Blocks.Examples.NoiseExamples;
     model AutomaticSeed
    -  "Demonstrates noise with startTime and automatic local seed for GenericNoise"
    +  "Demonstrates noise with startTime and automatic local seed for UniformNoise"
       import Modelica_Noise;
        extends Modelica.Icons.Example;
        parameter Real startTime = 0.5 "Start time of noise";
    @@ -9,59 +9,48 @@ model AutomaticSeed
       inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed(useAutomaticSeed=false, enableNoise=true)
         annotation (Placement(transformation(extent={{60,60},{80,80}})));
     
    -  Modelica_Noise.Blocks.Noise.GenericNoise automaticSeed1(
    +  Modelica_Noise.Blocks.Noise.UniformNoise automaticSeed1(
         samplePeriod=0.01,
         startTime=startTime,
         y_off=y_off,
    -    redeclare function distribution =
    -        Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-1, y_max=3))
    +    y_min=-1, y_max=3)
         annotation (Placement(transformation(extent={{-60,20},{-40,40}})));
    -  Modelica_Noise.Blocks.Noise.GenericNoise automaticSeed2(
    +  Modelica_Noise.Blocks.Noise.UniformNoise automaticSeed2(
         samplePeriod=0.01,
         startTime=startTime,
    -    y_off=y_off,
    -    redeclare function distribution =
    -        Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-1, y_max=3))
    +    y_off=y_off,y_min=-1, y_max=3)
         annotation (Placement(transformation(extent={{-60,-20},{-40,0}})));
    -  Modelica_Noise.Blocks.Noise.GenericNoise automaticSeed3(
    +  Modelica_Noise.Blocks.Noise.UniformNoise automaticSeed3(
         samplePeriod=0.01,
         startTime=startTime,
    -    y_off=y_off,
    -    redeclare function distribution =
    -        Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-1, y_max=3))
    +    y_off=y_off, y_min=-1, y_max=3)
         annotation (Placement(transformation(extent={{-60,-60},{-40,-40}})));
    -  Modelica_Noise.Blocks.Noise.GenericNoise manualSeed1(
    +  Modelica_Noise.Blocks.Noise.UniformNoise manualSeed1(
         samplePeriod=0.01,
         startTime=startTime,
         y_off=y_off,
         useAutomaticLocalSeed=false,
    -    fixedLocalSeed=1,
    -    redeclare function distribution =
    -        Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-1, y_max=3),
    +    fixedLocalSeed=1,y_min=-1, y_max=3,
         enableNoise=true)
         annotation (Placement(transformation(extent={{0,20},{20,40}})));
    -  Modelica_Noise.Blocks.Noise.GenericNoise manualSeed2(
    +  Modelica_Noise.Blocks.Noise.UniformNoise manualSeed2(
         samplePeriod=0.01,
         startTime=startTime,
         y_off=y_off,
         useAutomaticLocalSeed=false,
    -    fixedLocalSeed=2,
    -    redeclare function distribution =
    -        Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-1, y_max=3))
    +    fixedLocalSeed=2,y_min=-1, y_max=3)
         annotation (Placement(transformation(extent={{0,-20},{20,0}})));
    -  Modelica_Noise.Blocks.Noise.GenericNoise manualSeed3(
    +  Modelica_Noise.Blocks.Noise.UniformNoise manualSeed3(
         samplePeriod=0.01,
         startTime=startTime,
         y_off=y_off,
    -    useAutomaticLocalSeed=false,
    -    redeclare function distribution =
    -        Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-1, y_max=3),
    +    useAutomaticLocalSeed=false,y_min=-1, y_max=3,
         fixedLocalSeed=3)
         annotation (Placement(transformation(extent={{0,-60},{20,-40}})));
      annotation (experiment(StopTime=2),    Documentation(info="
     

    This example demonstrates manual and automatic seed selection of -GenericNoise blocks, as well +UniformNoise blocks, as well as starting the noise at startTime = 0.5 s with an output value of y = -1 before this time. All noise blocks in this example generate uniform noise in the band y_min=-1 .. y_max=3 with samplePeriod = 0.01 s. diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo index 03775913..90ebefe9 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Densities.mo @@ -3,8 +3,8 @@ model Densities "Demonstrates how to compute distribution densities (= Probability Density Function)" extends Modelica.Icons.Example; - Utilities.Density uniformDensity(redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.density (u_min=-4, u_max=4)) + Utilities.UniformDensity + uniformDensity(u_min=-4, u_max=4) annotation (Placement(transformation(extent={{10,20},{30,40}}))); Modelica.Blocks.Sources.Clock clock annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); @@ -12,11 +12,11 @@ annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{-46,-10},{-26,10}}))); - Utilities.Density normalDensity(redeclare function distribution = - Modelica_Noise.Math.Distributions.Normal.density (mu=0, sigma=2)) + Utilities.NormalDensity + normalDensity(mu=0, sigma=2) annotation (Placement(transformation(extent={{10,-10},{30,10}}))); - Utilities.Density weibullDensity(redeclare function distribution = - Modelica_Noise.Math.Distributions.Weibull.density (k=1.5, lambda=3)) + Utilities.WeibullDensity + weibullDensity(lambda=3, k=1.5) annotation (Placement(transformation(extent={{10,-40},{30,-20}}))); equation connect(clock.y, add.u1) annotation (Line( diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo index a829339f..acebfaf1 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Distributions.mo @@ -10,36 +10,23 @@ model Distributions "Demonstrates noise with different types of distributions" Integer n=if time < 0.5 then 12 else 2; - Noise.GenericNoise uniformNoise( + Noise.UniformNoise uniformNoise( useAutomaticLocalSeed=false, fixedLocalSeed=1, - samplePeriod=samplePeriod, - redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=y_min, y_max=y_max)) + samplePeriod=samplePeriod,y_min=y_min, y_max=y_max) annotation (Placement(transformation(extent={{-60,70},{-40,90}}))); - Noise.GenericNoise normalNoise( + Noise.TruncatedNormalNoise truncatedNormalNoise( useAutomaticLocalSeed=false, fixedLocalSeed=1, - samplePeriod=samplePeriod, - redeclare function distribution = - Modelica_Noise.Math.Distributions.TruncatedNormal.quantile ( - y_min=y_min, y_max=y_max)) - annotation (Placement(transformation(extent={{-60,30},{-40,50}}))); - Noise.GenericNoise weibullNoise( - useAutomaticLocalSeed=false, - fixedLocalSeed=1, - samplePeriod=samplePeriod, - redeclare function distribution = - Modelica_Noise.Math.Distributions.TruncatedWeibull.quantile ( - y_min=0, y_max=y_max, k=1)) - annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); + samplePeriod=samplePeriod, y_min=y_min, y_max=y_max) + annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); annotation (experiment(StopTime=2), Documentation(info="

    This example demonstrates different noise distributions methods that can be selected -for a Noise block. All the blocks use samplePeriod = 0.02 s, y_min=-1, y_max=3, and have +for a Noise block. Both noise blocks use samplePeriod = 0.02 s, y_min=-1, y_max=3, and have identical fixedLocalSeed. This means that the same random numbers are drawn for the blocks. -However, the random numbers are differently transformed according to the selected -truncated distributions, and therefore the blocks have different output values. +However, the random numbers are differently transformed according to the selected distributions +(uniform and truncated normal distribution), and therefore the blocks have different output values. Simulation results are shown in the next diagram:

    @@ -48,9 +35,8 @@ Simulation results are shown in the next diagram:

    -As can be seen, uniform noise is distributed evenly between -1 and 3, -truncated normal distriution has more values centered around the mean value 1, -and truncated Weibull distribution has no values below zero. +As can be seen, uniform noise is distributed evenly between -1 and 3, and +truncated normal distriution has more values centered around the mean value 1.

    ", revisions="

    diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ImpureGenerator.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ImpureGenerator.mo index d86c344c..ca6deaf9 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ImpureGenerator.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/ImpureGenerator.mo @@ -9,7 +9,8 @@ model ImpureGenerator annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); annotation (experiment(StopTime=2), Documentation(info="

    -This example demonstrates how to use the globalSeed.random() impure function +This example demonstrates how to use the +impureRandom(..) function to generate random values at event instants. Typically, this approach is only used when implementing an own, specialized block that needs a random number generator. Simulation results are shown in the next figure: diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/NormalNoiseProperties.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/NormalNoiseProperties.mo index b33d04b9..b4121b76 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/NormalNoiseProperties.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/NormalNoiseProperties.mo @@ -1,18 +1,75 @@ within Modelica_Noise.Blocks.Examples.NoiseExamples; model NormalNoiseProperties "Demonstrates the computation of properties for normally distributed noise" - extends UniformNoiseProperties(pMean = mu, var = sigma^2, - noise(redeclare function distribution = - Modelica_Noise.Math.Distributions.Normal.quantile(mu=mu,sigma=sigma))); - + extends Modelica.Icons.Example; parameter Real mu = 3 "Mean value for normal distribution"; parameter Real sigma = 1 "Standard deviation for normal distribution"; - + parameter Real pMean = mu "Theoretical mean value of normal distribution"; + parameter Real var = sigma^2 "Theoretical variance of uniform distribution"; + parameter Real std = sigma + "Theoretical standard deviation of normal distribution"; + inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed + annotation (Placement(transformation(extent={{80,60},{100,80}}))); + Noise.NormalNoise noise( + samplePeriod=0.001, mu=mu, sigma=sigma, useAutomaticLocalSeed=false) + annotation (Placement(transformation(extent={{-80,60},{-60,80}}))); + Math.ContinuousMean mean + annotation (Placement(transformation(extent={{-40,60},{-20,80}}))); + Math.Variance variance + annotation (Placement(transformation(extent={{-40,0},{-20,20}}))); + Modelica.Blocks.Math.MultiProduct theoreticalVariance(nu=2) + annotation (Placement(transformation(extent={{28,-36},{40,-24}}))); + Modelica.Blocks.Math.Feedback meanError + annotation (Placement(transformation(extent={{40,60},{60,80}}))); + Modelica.Blocks.Sources.Constant theoreticalMean(k=pMean) + annotation (Placement(transformation(extent={{-10,40},{10,60}}))); + Modelica.Blocks.Math.Feedback varianceError + annotation (Placement(transformation(extent={{40,0},{60,20}}))); + Modelica.Blocks.Sources.Constant theoreticalSigma(k=std) + annotation (Placement(transformation(extent={{-10,-40},{10,-20}}))); + Math.StandardDeviation standardDeviation + annotation (Placement(transformation(extent={{-40,-80},{-20,-60}}))); + Modelica.Blocks.Math.Feedback sigmaError + annotation (Placement(transformation(extent={{40,-60},{60,-80}}))); +equation + connect(noise.y, mean.u) annotation (Line( + points={{-59,70},{-42,70}}, + color={0,0,127})); + connect(noise.y, variance.u) annotation (Line( + points={{-59,70},{-52,70},{-52,10},{-42,10}}, + color={0,0,127})); + connect(mean.y, meanError.u1) annotation (Line( + points={{-19,70},{42,70}}, + color={0,0,127})); + connect(theoreticalMean.y, meanError.u2) annotation (Line( + points={{11,50},{50,50},{50,62}}, + color={0,0,127})); + connect(theoreticalSigma.y, theoreticalVariance.u[1]) annotation (Line( + points={{11,-30},{24,-30},{24,-27.9},{28,-27.9}}, + color={0,0,127})); + connect(theoreticalSigma.y, theoreticalVariance.u[2]) annotation (Line( + points={{11,-30},{24,-30},{24,-32.1},{28,-32.1}}, + color={0,0,127})); + connect(variance.y, varianceError.u1) annotation (Line( + points={{-19,10},{42,10}}, + color={0,0,127})); + connect(theoreticalVariance.y, varianceError.u2) annotation (Line( + points={{41.02,-30},{50,-30},{50,2}}, + color={0,0,127})); + connect(noise.y, standardDeviation.u) annotation (Line( + points={{-59,70},{-52,70},{-52,-70},{-42,-70}}, + color={0,0,127})); + connect(standardDeviation.y, sigmaError.u1) annotation (Line( + points={{-19,-70},{42,-70}}, + color={0,0,127})); + connect(theoreticalSigma.y, sigmaError.u2) annotation (Line( + points={{11,-30},{18,-30},{18,-42},{50,-42},{50,-62}}, + color={0,0,127})); annotation (experiment(StopTime=20, Interval=0.4e-2, Tolerance=1e-009), Documentation(info="

    This example demonstrates statistical properties of the -Blocks.Noise.GenericNoise block +Blocks.Noise.NormalNoise block using a normal random number distribution with mu=3, sigma=1. From the generated noise the mean and the variance is computed with blocks of package Blocks.Statistics. diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo deleted file mode 100644 index 437bbf80..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/TruncatedDensities.mo +++ /dev/null @@ -1,80 +0,0 @@ -within Modelica_Noise.Blocks.Examples.NoiseExamples; -model TruncatedDensities - "Demonstrates how to compute truncated probability density functions" - extends Modelica.Icons.Example; - - Utilities.Density uniformDensity(redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.density (u_min=-4, u_max=5)) - annotation (Placement(transformation(extent={{10,20},{30,40}}))); - Modelica.Blocks.Sources.Clock clock -annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); - Modelica.Blocks.Sources.Constant const(k=-6) -annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); - Modelica.Blocks.Math.Add add -annotation (Placement(transformation(extent={{-46,-10},{-26,10}}))); - Utilities.Density truncatedNormalDensity(redeclare function distribution = - Modelica_Noise.Math.Distributions.TruncatedNormal.density ( - u_min=-3, - u_max=3, - mu=0, - sigma=2)) - annotation (Placement(transformation(extent={{10,-10},{30,10}}))); - Utilities.Density truncatedWeibullDensity(redeclare function distribution = - Modelica_Noise.Math.Distributions.TruncatedWeibull.density ( - u_min=0.2, - u_max=4, - k=1.5, - lambda=3)) - annotation (Placement(transformation(extent={{10,-40},{30,-20}}))); -equation - connect(clock.y, add.u1) annotation (Line( - points={{-59,20},{-53.5,20},{-53.5,6},{-48,6}}, - color={0,0,127})); - connect(const.y, add.u2) annotation (Line( - points={{-59,-20},{-54,-20},{-54,-6},{-48,-6}}, - color={0,0,127})); - connect(add.y, uniformDensity.u) annotation (Line( - points={{-25,0},{-14,0},{-14,30},{8,30}}, - color={0,0,127})); - connect(add.y, truncatedNormalDensity.u) annotation (Line( - points={{-25,0},{8,0}}, - color={0,0,127})); - connect(add.y, truncatedWeibullDensity.u) annotation (Line( - points={{-25,0},{-14,0},{-14,-30},{8,-30}}, - color={0,0,127})); - annotation (experiment(StopTime=12, Interval=1.2e-2), - Documentation(info=" -

    -This example demonstrates how to compute the probability density functions (pdfs) of -various truncated distributions. -In the following diagram simulations results for the uniform, truncated normal, and truncated Weibull distribution -are shown. The outputs of the blocks are the pdfs that are plotted over one of the -inputs: -

    - -

    - -
    -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end TruncatedDensities; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoise.mo similarity index 76% rename from Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo rename to Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoise.mo index 0dd25dc5..a3cdb866 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/GenericNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoise.mo @@ -1,18 +1,17 @@ within Modelica_Noise.Blocks.Examples.NoiseExamples; -model GenericNoise - "Demonstrates the most simple usage of the GenericNoise block" +model UniformNoise + "Demonstrates the most simple usage of the UniformNoise block" extends Modelica.Icons.Example; inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed annotation (Placement(transformation(extent={{-20,40},{0,60}}))); - Modelica_Noise.Blocks.Noise.GenericNoise genericNoise( - samplePeriod=0.02, redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-1, y_max=3)) + Modelica_Noise.Blocks.Noise.UniformNoise uniformNoise( + samplePeriod=0.02, y_min=-1, y_max=3) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); annotation (experiment(StopTime=2), Documentation(info="

    This example demonstrates the most simple usage of the -Noise.GenericNoise +Noise.UniformNoise block:

    @@ -20,7 +19,7 @@ block:
  • globalSeed is the Noise.GlobalSeed block with default options (just dragged from sublibrary Noise).
  • genericNoise is an instance of - Noise.GenericNoise with + Noise.UniformNoise with samplePeriod = 0.02 s and a Uniform distribution with limits y_min=-1, y_max=3.
  • @@ -31,7 +30,7 @@ The result of a simulation is shown in the next diagram:

    - +

    ", revisions=" @@ -55,4 +54,4 @@ The result of a simulation is shown in the next diagram:

    ")); -end GenericNoise; +end UniformNoise; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo index 0a02a488..7a158d72 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/UniformNoiseProperties.mo @@ -12,10 +12,8 @@ model UniformNoiseProperties "Theoretical standard deviation of uniform distribution"; inner Modelica_Noise.Blocks.Noise.GlobalSeed globalSeed annotation (Placement(transformation(extent={{80,60},{100,80}}))); - Noise.GenericNoise noise( - samplePeriod=0.001, redeclare replaceable function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=y_min, y_max= - y_max), + Noise.UniformNoise noise( + samplePeriod=0.001, y_min=y_min, y_max=y_max, useAutomaticLocalSeed=false) annotation (Placement(transformation(extent={{-80,60},{-60,80}}))); Math.ContinuousMean mean diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo index 6e70ee3d..cabb636e 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/ImpureRandom.mo @@ -11,7 +11,7 @@ protected equation when {initial(), sample(samplePeriod,samplePeriod)} then - y = globalSeed.random(); + y = Modelica_Noise.Math.Random.Utilities.impureRandom(globalSeed.id_impure); end when; annotation (Documentation(info="

    diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/NormalDensity.mo similarity index 57% rename from Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo rename to Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/NormalDensity.mo index 663f8555..4da4470f 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Density.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/NormalDensity.mo @@ -1,41 +1,18 @@ within Modelica_Noise.Blocks.Examples.NoiseExamples.Utilities; -block Density "Calculates the density of a selected distribution" +block NormalDensity "Calculates the density of a normal distribution" + import distribution = Modelica_Noise.Math.Distributions.Normal.density; extends Modelica.Blocks.Icons.Block; - replaceable function distribution = - Modelica_Noise.Math.Distributions.Uniform.density constrainedby - Modelica_Noise.Math.Distributions.Interfaces.partialDensity - "Probability density function" - annotation(choicesAllMatching=true, Documentation(info=" -

    This is the probability density function to be used in the Density block.

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); + parameter Real mu "Expectation (mean) value of the normal distribution"; + parameter Real sigma "Standard deviation of the normal distribution"; Modelica.Blocks.Interfaces.RealInput u "Real input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); Modelica.Blocks.Interfaces.RealOutput y - "Density of the input signal according to the selected probability density function" + "Density of the input signal according to the normal probability density function" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); equation - y = distribution(u); + y = distribution(u, mu, sigma); + annotation (Icon(graphics={ Polygon( points={{0,94},{-8,72},{8,72},{0,94}}, @@ -63,23 +40,14 @@ equation -75.8975},{70,-75.953}}, smooth=Smooth.Bezier)}), Documentation(info="

    -This block determines the probability density y of a distribution for the given signal u: -

    - -
    -
    y = density(u)
    -
    - -

    -The actual density function is replaceable and can be chosen from all available -probability density functions extending from -Math.Distributions.Interfaces.partialDensity. +This block determines the probability density y of a normal distribution for the given input signal u +(for details of this density function see +Math.Distributions.Normal.density).

    -This block is demonstrated in the examples -Examples.NoiseExamples.Densities and -Examples.NoiseExamples.TruncatedDensities. +This block is demonstrated in the example +Examples.NoiseExamples.Densities .

    ", revisions="

    @@ -102,4 +70,4 @@ This block is demonstrated in the examples

    ")); -end Density; +end NormalDensity; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/MotorWithCurrentControl.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/MotorWithCurrentControl.mo index 5bd8f159..fd7b00e2 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/MotorWithCurrentControl.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/Parts/MotorWithCurrentControl.mo @@ -120,10 +120,10 @@ model MotorWithCurrentControl origin={110,80}), iconTransformation(extent={{40,70},{60,90}}))); Modelica.Blocks.Math.Add addNoise annotation (Placement(transformation(extent={{60,70},{80,90}}))); - Noise.GenericNoise GenericNoise( - samplePeriod=1/200, redeclare function distribution = - Modelica_Noise.Math.Distributions.Uniform.quantile (y_min=-0.01, y_max= - 0.01)) annotation (Placement(transformation(extent={{26,76},{46,96}}))); + Noise.UniformNoise UniformNoise( + samplePeriod=1/200, + y_min=-0.01, + y_max=0.01) annotation (Placement(transformation(extent={{26,76},{46,96}}))); equation w = speedSensor.w; phi_motor = angleSensor.phi; @@ -193,7 +193,7 @@ equation connect(addNoise.y, phi) annotation (Line( points={{81,80},{110,80}}, color={0,0,127})); - connect(GenericNoise.y, addNoise.u1) annotation (Line( + connect(UniformNoise.y, addNoise.u1) annotation (Line( points={{47,86},{58,86}}, color={0,0,127})); annotation ( diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/UniformDensity.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/UniformDensity.mo new file mode 100644 index 00000000..2657dfac --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/UniformDensity.mo @@ -0,0 +1,73 @@ +within Modelica_Noise.Blocks.Examples.NoiseExamples.Utilities; +block UniformDensity "Calculates the density of a uniform distribution" + import distribution = Modelica_Noise.Math.Distributions.Uniform.density; + extends Modelica.Blocks.Icons.Block; + + parameter Real u_min "Lower limit of u"; + parameter Real u_max "Upper limit of u"; + + Modelica.Blocks.Interfaces.RealInput u "Real input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y + "Density of the input signal according to the uniform probability density function" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); +equation + y = distribution(u, u_min, u_max); + + annotation (Icon(graphics={ + Polygon( + points={{0,94},{-8,72},{8,72},{0,94}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line(points={{0,76},{0,-72}}, color={192,192,192}), + Line(points={{-86,-82},{72,-82}}, + color={192,192,192}), + Polygon( + points={{92,-82},{70,-74},{70,-90},{92,-82}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line( points={{-70,-75.953},{-66.5,-75.8975},{-63,-75.7852},{-59.5, + -75.5674},{-56,-75.1631},{-52.5,-74.4442},{-49,-73.2213},{ + -45.5,-71.2318},{-42,-68.1385},{-38.5,-63.5468},{-35,-57.0467}, + {-31.5,-48.2849},{-28,-37.0617},{-24.5,-23.4388},{-21,-7.8318}, + {-17.5,8.9428},{-14,25.695},{-10.5,40.9771},{-7,53.2797},{ + -3.5,61.2739},{0,64.047},{3.5,61.2739},{7,53.2797},{10.5, + 40.9771},{14,25.695},{17.5,8.9428},{21,-7.8318},{24.5, + -23.4388},{28,-37.0617},{31.5,-48.2849},{35,-57.0467},{38.5, + -63.5468},{42,-68.1385},{45.5,-71.2318},{49,-73.2213},{52.5, + -74.4442},{56,-75.1631},{59.5,-75.5674},{63,-75.7852},{66.5, + -75.8975},{70,-75.953}}, + smooth=Smooth.Bezier)}), Documentation(info=" +

    +This block determines the probability density y of a uniform distribution for the given input signal u +(for details of this density function see +Math.Distributions.Uniform.density). +

    + +

    +This block is demonstrated in the example +Examples.NoiseExamples.Densities . +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end UniformDensity; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/WeibullDensity.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/WeibullDensity.mo new file mode 100644 index 00000000..132f2528 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/WeibullDensity.mo @@ -0,0 +1,73 @@ +within Modelica_Noise.Blocks.Examples.NoiseExamples.Utilities; +block WeibullDensity "Calculates the density of a Weibull distribution" + import distribution = Modelica_Noise.Math.Distributions.Weibull.density; + extends Modelica.Blocks.Icons.Block; + + parameter Real lambda(min=0) "Scale parameter of the Weibull distribution"; + parameter Real k(min=0) "Shape parameter of the Weibull distribution"; + + Modelica.Blocks.Interfaces.RealInput u "Real input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y + "Density of the input signal according to the Weibull probability density function" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); +equation + y = distribution(u, lambda, k); + + annotation (Icon(graphics={ + Polygon( + points={{0,94},{-8,72},{8,72},{0,94}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line(points={{0,76},{0,-72}}, color={192,192,192}), + Line(points={{-86,-82},{72,-82}}, + color={192,192,192}), + Polygon( + points={{92,-82},{70,-74},{70,-90},{92,-82}}, + lineColor={192,192,192}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line( points={{-70,-75.953},{-66.5,-75.8975},{-63,-75.7852},{-59.5, + -75.5674},{-56,-75.1631},{-52.5,-74.4442},{-49,-73.2213},{ + -45.5,-71.2318},{-42,-68.1385},{-38.5,-63.5468},{-35,-57.0467}, + {-31.5,-48.2849},{-28,-37.0617},{-24.5,-23.4388},{-21,-7.8318}, + {-17.5,8.9428},{-14,25.695},{-10.5,40.9771},{-7,53.2797},{ + -3.5,61.2739},{0,64.047},{3.5,61.2739},{7,53.2797},{10.5, + 40.9771},{14,25.695},{17.5,8.9428},{21,-7.8318},{24.5, + -23.4388},{28,-37.0617},{31.5,-48.2849},{35,-57.0467},{38.5, + -63.5468},{42,-68.1385},{45.5,-71.2318},{49,-73.2213},{52.5, + -74.4442},{56,-75.1631},{59.5,-75.5674},{63,-75.7852},{66.5, + -75.8975},{70,-75.953}}, + smooth=Smooth.Bezier)}), Documentation(info=" +

    +This block determines the probability density y of a Weibull distribution for the given input signal u +(for details of this density function see +Math.Distributions.Weibull.density). +

    + +

    +This block is demonstrated in the example +Examples.NoiseExamples.Densities . +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end WeibullDensity; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.order b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.order index e672682d..fd199faa 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.order +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/Utilities/package.order @@ -1,3 +1,5 @@ -Density +UniformDensity +NormalDensity +WeibullDensity ImpureRandom Parts diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/WeibullNoiseProperties.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/WeibullNoiseProperties.mo deleted file mode 100644 index 1dcad660..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/WeibullNoiseProperties.mo +++ /dev/null @@ -1,56 +0,0 @@ -within Modelica_Noise.Blocks.Examples.NoiseExamples; -model WeibullNoiseProperties - "Demonstrates the computation of properties for Weibull distributed noise" - extends UniformNoiseProperties(pMean = 1, var = 1, - noise(redeclare function distribution = - Modelica_Noise.Math.Distributions.Weibull.quantile ( - lambda=lambda, - k=k)), - y_min = 0, y_max = Modelica.Constants.inf); - - parameter Real k = 1 "Shape parameter"; - parameter Real lambda = 1 "Scale parameter"; - - annotation (experiment(StopTime=20, Interval=0.4e-2, Tolerance=1e-009), -Documentation(info=" -

    -This example demonstrates statistical properties of the -Blocks.Noise.GenericNoise block -using a Weibull random number distribution with lambda=1, k=1. -From the generated noise the mean and the variance -is computed with blocks of package Blocks.Statistics. -Simulation results are shown in the next diagram: -

    - -

    - -

    - -

    -The mean value of Weibull noise with lambda=1 and k=1 is 1 and the variance is also 1. -The simulation results above show good agreement (after a short initial phase). -This demonstrates that the random number generator and the mapping to a Weibull -distribution have good statistical properties. -

    -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end WeibullNoiseProperties; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.order b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.order index cf58e73d..b4ba0347 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.order +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/NoiseExamples/package.order @@ -1,11 +1,9 @@ -GenericNoise +UniformNoise AutomaticSeed Distributions UniformNoiseProperties NormalNoiseProperties -WeibullNoiseProperties Densities -TruncatedDensities ImpureGenerator ActuatorWithNoise DrydenContinuousTurbulence diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/package.mo index 66b8b853..1b53da37 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Examples/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Examples/package.mo @@ -1,5 +1,5 @@ within Modelica_Noise.Blocks; -package Examples +package Examples extends Modelica.Icons.ExamplesPackage; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Interfaces.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Interfaces.mo new file mode 100644 index 00000000..fa3e16b4 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Interfaces.mo @@ -0,0 +1,135 @@ +within Modelica_Noise.Blocks; +package Interfaces + + partial block PartialNoise "Partial noise generator" + import generator = Modelica_Noise.Math.Random.Generators.Xorshift128plus; + import Modelica_Noise.Math.Random.Utilities.impureRandomInteger; + extends Modelica.Blocks.Interfaces.SO; + + // Main dialog menu + parameter Modelica.SIunits.Period samplePeriod(start=0.01) + "Period for sampling the raw random numbers" + annotation(Dialog(enable=enableNoise)); + + // Advanced dialog menu: Noise generation + parameter Boolean enableNoise = true + "=true: y = noise, otherwise y = y_off" + annotation(choices(checkBox=true),Dialog(tab="Advanced",group="Noise generation")); + parameter Real y_off = 0.0 + "y = y_off if enableNoise=false (or timeDescription
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); + end PartialNoise; +end Interfaces; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo index bbad44db..120dd745 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Math/package.mo @@ -3,8 +3,6 @@ package Math "Library of mathematical blocks" extends Modelica.Icons.Package; - - annotation (Icon(graphics={Line( points={{-72,-63.953},{-68.5,-63.8975},{-65,-63.7852},{-61.5, -63.5674},{-58,-63.1631},{-54.5,-62.4442},{-51,-61.2213},{-47.5, diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo index 73ebf5e6..a9cf6212 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/BandLimitedWhiteNoise.mo @@ -1,12 +1,38 @@ within Modelica_Noise.Blocks.Noise; block BandLimitedWhiteNoise "Noise generator to produce band-limited white noise with normal distribution" - extends GenericNoise( - redeclare function distribution = - Modelica_Noise.Math.Distributions.Normal.quantile(mu = 0, - sigma = sqrt(noisePower/samplePeriod))); - parameter Real noisePower = 1 "Power of white noise signal"; - annotation (Documentation(info=" + import distribution = Modelica_Noise.Math.Distributions.Normal.quantile; + extends Modelica_Noise.Blocks.Interfaces.PartialNoise; + + // Main dialog menu + parameter Real noisePower = 1 "Power of white noise signal" annotation(Dialog(enable=enableNoise)); + +protected + parameter Real mu=0; + parameter Real sigma=sqrt(noisePower/samplePeriod); + +initial equation + r = distribution(r_raw, mu, sigma); + +equation + // Draw random number at sample times + when generateNoise and sample(startTime, samplePeriod) then + r = distribution(r_raw, mu, sigma); + end when; + annotation(Dialog(enable=enableNoise), Icon( + graphics={Text( + extent={{-70,96},{92,60}}, + lineColor={175,175,175}, + textString="%noisePower"), + Text( + extent={{-96,11},{96,-11}}, + lineColor={175,175,175}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid, + origin={-87,0}, + rotation=90, + textString="white noise")}), + Documentation(info="

    This block configures the GenericNoise block to produce band-limited white noise. This is performed by using a normal distribution with mu=0 and diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo deleted file mode 100644 index 90c334ec..00000000 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GenericNoise.mo +++ /dev/null @@ -1,302 +0,0 @@ -within Modelica_Noise.Blocks.Noise; -block GenericNoise "Noise generator for arbitrary distributions" - import generator = Modelica_Noise.Math.Random.Generators.Xorshift128plus; - extends Modelica.Blocks.Interfaces.SO; - - // Main dialog menu - parameter Modelica.SIunits.Period samplePeriod(start=0.01) - "Period for sampling the raw random numbers" - annotation(Dialog(enable=enableNoise)); - replaceable partial function distribution = - Modelica_Noise.Math.Distributions.Interfaces.partialQuantile - "Random number distribution" - annotation(choicesAllMatching=true, Dialog(enable=enableNoise)); - - // Advanced dialog menu: Noise generation - parameter Boolean enableNoise = true "=true: y = noise, otherwise y = y_off" - annotation(choices(checkBox=true),Dialog(tab="Advanced",group="Noise generation")); - parameter Real y_off = 0.0 - "y = y_off if enableNoise=false (or timeBlocks.Noise. -This GenericNoise block generates reproducible, random noise at its output. -By default, two or more instances produce different, uncorrelated noise at the same time instant. -The block can only be used if on the same or a higher hierarchical level, -model Blocks.Noise.GlobalSeed -is dragged to provide global settings for all instances. -

    - - -

    Parameters that need to be defined

    - -

    -When using this block, at a minimum the following parameters must be defined: -

    - -
    -

    - - - - - - - - - -
    ParameterDescription
    samplePeriod Random values are drawn periodically at the sample rate in [s] - defined with this parameter (time events are generated at the sample instants). - Between sample instants, the output y is kept constant.
    distribution Defines the random number distribution to map the drawn random numbers - from the range 0.0 ... 1.0, to the desired range and distribution. - Basically, distribution is a replaceable function that - provides the quantile (= inverse cumulative distribution function) - of a random distribution. For simulation models - truncated distributions - are of special interest, because the returned random values are guaranteed - to be in a defined band y_min ... y_max. Often used distributions are: -
      -
    • Uniform distribution: - The random values are mapped uniformly to the band - y_min ... y_max.
    • -
    • Truncated normal distribution: - The random values have a normal distribution that - is truncated to y_min ... y_max. Measurement noise has often this distribution form. - By default, the standard parameters of the truncated normal distribution are derived from - y_min ... y_max: mean value = (y_max + y_min)/2, standard deviation - = (y_max - y_min)/6 (= 99.7 % of the non-truncated normal distribution are - within y_min ... y_max).
    • -
    -
    -

    - -

    -As a simple demonstration, see example Blocks.Examples.NoiseExamples.GenericNoise. -In the next diagram, a simulation result is shown for samplePeriod=0.02 s and uniform distribution with -y_min=-1, y_max=3: -

    -

    - -
    -

    - -

    Advanced tab: General settings

    -

    -In the Advanced tab of the parameter menu, further options can be set -as shown in the next table: -

    - -
    -

    - - - - - - - - -
    ParameterDescription
    enableNoise = true, if noise is generated at the output of the block (this is the default).
    - = false, if noise generation is switched off and the constant value - y_off is provided as output.
    y_off If enableNoise = false, the output of the block instance has the - value y_off. Default is y_off = 0.0. - Furthermore, if enableNoise = true and time<startTime, the output of the block is also - y_off (see description of parameter startTime below).
    -

    - - - -

    Advanced tab: Initialization

    - -

    -For every block instance, the internally used pseudo random number generator -has its own state. This state must be properly initialized, depending on -the desired situation. For this purpose the following parameters can be defined: -

    - -
    -

    - - - - - - - - - - - - - - - -
    ParameterDescription
    useGlobalSeed = true, if the seed (= Integer number) defined in the \"inner GlobalSeed globalSeed\" - component is used for the initialization of the random number generator used in this - instance of block GenericNoise. - Therefore, whenever the globalSeed defines a different number, the noise at every - instance is changing. This is the default setting and therefore the globalSeed component - defines whether every new simulation run shall provide the same noise - (e.g. for a parameter optimization of controller parameters), or - whether every new simulation run shall provide different noise - (e.g. for a Monte Carlo simulation).
    - = false, if the seed defined by globalSeed is ignored. For example, if - aerodynamic turbulence is modelled with a noise block and this turbulence - model shall be used for all simulation runs of a Monte Carlo simulation, then - useGlobalSeed has to be set to false.
    useAutomaticLocalSeed An Integer number, called local seed, is needed to initalize the random number - generator for a specific block instance. Instances using the same local seed - produce exactly the same random number values (so the same noise, if the other settings - of the instances are the same).
    - If useAutomaticLocalSeed = true, the - local seed is determined automatically from an impure random number generator that - produces Integer random values (= calling function globalSeed.randomInteger()). - This is the default. - Note, this means that the noise might change if function randomInteger() is called - more or less often in the overall model (e.g. because an additional noise block is - introduced or removed). It is planned to change the automatic local seed function - in a future version of package Modelica, once Modelica Language 3.3 language elements - can be used (by using a hash value of the instance name of the model that is - inquired with the Modelica Language 3.3 function getInstanceName()).
    - If useAutomaticLocalSeed = false, the local seed is defined - explicitly by parameter fixedLocalSeed. It is then guaranteed that the generated noise - remains always the same (provided the other parameter values are the same).
    fixedLocalSeed If useAutomaticLocalSeed = false, the local seed to be used. - fixedLocalSeed can be any Integer number (including zero or a negative number). - The initialization algorithm produces a meaningful initial state of the random - number generator from fixedLocalSeed and (if useAutomaticGlobalSeed=true) from globalSeed even for - bad seeds such as 0 or 1, so the subsequently drawing of random numbers produce always statistically - meaningful numbers.
    startTime The time instant at which noise shall be generated at the output y. The default - startTime = 0. - For time<startTime, y = y_off. In some cases it is meaningful to simulate - a certain duration until an approximate steady-state is reached. In such a case - startTime should be set to a time instant after this duration.
    -

    - -

    Random number generator

    -

    -The (pseudo) random number generator to be used is defined via an import clause at the beginning of this block. -The default is random number generator algorithm \"xorshift128+\". -This random number generator has a period of 2^128, -has an internal state of 4 Integer elements, and has -excellent statistical properties. -It is a good trade-off between simulation performance and random number quality. -If the default algorithm is not desired, -a new model needs to be created by duplicating this block and exchanging the import clause. -Meaningful random number generators are provided in -package Math.Random.Generators. -Properties of the various generators are described in the package -description of the Generators package. -

    - -", revisions=" -

    - - - - - - -
    Date Description
    June 22, 2015 - - -
    - - - Initial version implemented by - A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    - DLR Institute of System Dynamics and Control -
    -
    -

    -")); -end GenericNoise; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo index c8aab1fa..2486a6d1 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/GlobalSeed.mo @@ -13,14 +13,9 @@ model GlobalSeed final parameter Integer seed = if useAutomaticSeed then Modelica_Noise.Math.Random.Utilities.automaticGlobalSeed() else fixedSeed "Actually used global seed"; - function random = Modelica_Noise.Math.Random.Utilities.impureRandom(final id=id_impure) - "Impure random number generator function"; - function randomInteger = - Modelica_Noise.Math.Random.Utilities.impureRandomInteger(final id=id_impure) - "Impure Integer random number generator function"; - -protected - parameter Integer id_impure = Modelica_Noise.Math.Random.Utilities.initializeImpureRandom(seed); + final parameter Integer id_impure = Modelica_Noise.Math.Random.Utilities.initializeImpureRandom(seed) + "ID for impure random number generators Modelica_Noise.Math.Random.Utilities.impureXXX" + annotation(HideResult=true); annotation ( defaultComponentName="globalSeed", @@ -136,23 +131,15 @@ hierarchical level. The following options can be selected:

    -Additionally, the globalSeed instance provides the following impure functions +Additionally, the globalSeed instance calls function +initializeImpureRandom +to initialize the impure random number generators +(impureRandom and +impureRandomInteger). +The return value of this function is stored in parameter id_impure. Whenever one of the impure +random number generators need to be called, \"globalSeed.id_impure\" has to be given as input argument.

    -
      -
    • random():
      - This function uses the xorshift1024* - pseudo random number generator to produce random numbers in the range 0 < random numbers ≤ 1. - It is initialized with the global seed defined in globalSeed - (so either with parameter fixedSeed, or automatically computed by process ID and local time). - Since random() is an impure function, it should only be called in a when-clause (so at an event).
    • -
    • randomInteger(imin=1,imax=Modelica.Constants.Integer_inf):
      - This function uses the random() pseudo random number generator and maps the returned random value - into the Integer range imin ... imax. By default, imin=1 and imax=Modelica.Constants.Integer_inf. - Since randomInteger() is an impure function, it should only be called in a when-clause - (so at an event).
    • -
    -

    Note, the usage of this block is demonstrated with examples AutomaticSeed and @@ -160,15 +147,9 @@ Note, the usage of this block is demonstrated with examples

    -Remark: The \"xorshift1024\" pseudo-random number generator has an internal state of 33 Integers. -This state is initialized in the following way: The pseudo-random number generator -Xorshift64star -is used to compute these 33 Integers. This random number generator has a state of 2 Integers which -is initialized with the global and local seed integers. Afterwards, random values are produced -with this random number generator and utilized as values for the internal state of -the Xorshift1024star random number generator. -Due to the implementation with an external state vector, this block may only be instantiated once -in a model! So, the block will usually reside on the top level of the model. +Please note that only one globalSeed instance may be defined in the model due to the initialization +of the impure random number generators with initializeImpureRandom! +So, the block will usually reside on the top level of the model.

    ")); end GlobalSeed; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/NormalNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/NormalNoise.mo new file mode 100644 index 00000000..e11ae01d --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/NormalNoise.mo @@ -0,0 +1,65 @@ +within Modelica_Noise.Blocks.Noise; +block NormalNoise "Noise generator with normal distribution" + import distribution = Modelica_Noise.Math.Distributions.Normal.quantile; + extends Modelica_Noise.Blocks.Interfaces.PartialNoise; + + // Main dialog menu + parameter Real mu=0 "Expectation (mean) value of the normal distribution" annotation(Dialog(enable=enableNoise)); + parameter Real sigma(start=1) "Standard deviation of the normal distribution" + annotation(Dialog(enable=enableNoise)); + +initial equation + r = distribution(r_raw, mu, sigma); + +equation + // Draw random number at sample times + when generateNoise and sample(startTime, samplePeriod) then + r = distribution(r_raw, mu, sigma); + end when; + + annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}}), graphics={ + Text(visible=enableNoise, + extent={{-66,92},{94,66}}, + lineColor={175,175,175}, + pattern=LinePattern.Dot, + textString="mu=%mu"), + Text(visible=enableNoise, + extent={{-70,-68},{94,-96}}, + lineColor={175,175,175}, + pattern=LinePattern.Dot, + textString="sigma=%sigma")}), + Documentation(info=" +

    +A summary of the common properties of the noise blocks is provided in the documentation of package +Blocks.Noise. +This NormalNoise block generates reproducible, random noise at its output according to a normal distribution. +This means that random values are normally distributed with expectation value mu and standard deviation sigma. +(see example NoiseExamples.NormalNoiseProperties). +By default, two or more instances produce different, uncorrelated noise at the same time instant. +The block can only be used if on the same or a higher hierarchical level, +model Blocks.Noise.GlobalSeed +is dragged to provide global settings for all instances. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end NormalNoise; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/TruncatedNormalNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/TruncatedNormalNoise.mo new file mode 100644 index 00000000..00cb1cde --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/TruncatedNormalNoise.mo @@ -0,0 +1,90 @@ +within Modelica_Noise.Blocks.Noise; +block TruncatedNormalNoise "Noise generator with truncated normal distribution" + import distribution = Modelica_Noise.Math.Distributions.TruncatedNormal.quantile; + extends Modelica_Noise.Blocks.Interfaces.PartialNoise; + + // Main dialog menu + parameter Real y_min(start=0) "Lower limit of y" annotation(Dialog(enable=enableNoise)); + parameter Real y_max(start=1) "Upper limit of y" annotation(Dialog(enable=enableNoise)); + parameter Real mu = (y_max + y_min)/2 + "Expectation (mean) value of the normal distribution" annotation(Dialog(enable=enableNoise,tab="Advanced",group="Noise generation")); + parameter Real sigma = (y_max - y_min)/6 + "Standard deviation of the normal distribution" annotation(Dialog(enable=enableNoise,tab="Advanced",group="Noise generation")); + +initial equation + r = distribution(r_raw, y_min, y_max, mu, sigma); + +equation + // Draw random number at sample times + when generateNoise and sample(startTime, samplePeriod) then + r = distribution(r_raw, y_min, y_max, mu, sigma); + end when; + + annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}}), graphics={ + Line(visible=enableNoise, + points={{-76,60},{78,60}}, color={95,95,95}, + pattern=LinePattern.Dot), + Line(visible=enableNoise, + points={{-76,-60},{78,-60}}, color={95,95,95}, + pattern=LinePattern.Dot), + Text(visible=enableNoise, + extent={{-70,94},{95,64}}, + lineColor={175,175,175}, + textString="%y_max"), + Text(visible=enableNoise, + extent={{-70,-64},{95,-94}}, + lineColor={175,175,175}, + textString="%y_min"), + Text( + extent={{-71,12},{71,-12}}, + lineColor={175,175,175}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid, + origin={-88,-11}, + rotation=90, + textString="normal")}), + Documentation(info=" +

    +A summary of the common properties of the noise blocks is provided in the documentation of package +Blocks.Noise. +This TruncatedNormalNoise block generates reproducible, random noise at its output according to a truncated normal distribution. +This means that normally distributed random values are truncated to the band y_min ... y_max. +Measurement noise has often this distribution form. +By default, the standard parameters of the truncated normal distribution are derived from +y_min ... y_max: +

    +

    +mean value = (y_max + y_min)/2,
    +standard deviation = (y_max - y_min)/6 (= 99.7 % of the non-truncated normal distribution are within y_min ... y_max). +

    + +

    +For an example see NoiseExamples.Distributions. +By default, two or more instances produce different, uncorrelated noise at the same time instant. +The block can only be used if on the same or a higher hierarchical level, +model Blocks.Noise.GlobalSeed +is dragged to provide global settings for all instances. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end TruncatedNormalNoise; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/UniformNoise.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/UniformNoise.mo new file mode 100644 index 00000000..c800c849 --- /dev/null +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/UniformNoise.mo @@ -0,0 +1,68 @@ +within Modelica_Noise.Blocks.Noise; +block UniformNoise "Noise generator with uniform distribution" + import distribution = Modelica_Noise.Math.Distributions.Uniform.quantile; + extends Modelica_Noise.Blocks.Interfaces.PartialNoise; + + // Main dialog menu + parameter Real y_min(start=0) "Lower limit of y" annotation(Dialog(enable=enableNoise)); + parameter Real y_max(start=1) "Upper limit of y" annotation(Dialog(enable=enableNoise)); + +initial equation + r = distribution(r_raw, y_min, y_max); + +equation + // Draw random number at sample times + when generateNoise and sample(startTime, samplePeriod) then + r = distribution(r_raw, y_min, y_max); + end when; + + annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}}), graphics={ + Line(visible=enableNoise, + points={{-76,60},{78,60}}, color={95,95,95}, + pattern=LinePattern.Dot), + Line(visible=enableNoise, + points={{-76,-60},{78,-60}}, color={95,95,95}, + pattern=LinePattern.Dot), + Text(visible=enableNoise, + extent={{-70,94},{95,64}}, + lineColor={175,175,175}, + textString="%y_max"), + Text(visible=enableNoise, + extent={{-70,-64},{95,-94}}, + lineColor={175,175,175}, + textString="%y_min")}), + Documentation(info=" +

    +A summary of the common properties of the noise blocks is provided in the documentation of package +Blocks.Noise. +This UniformNoise block generates reproducible, random noise at its output according to a uniform distribution. +This means that random values are uniformly distributed within the range defined by parameters +y_min and y_max (see example NoiseExamples.UniformNoiseProperties). +By default, two or more instances produce different, uncorrelated noise at the same time instant. +The block can only be used if on the same or a higher hierarchical level, +model Blocks.Noise.GlobalSeed +is dragged to provide global settings for all instances. +

    +", revisions=" +

    + + + + + + +
    Date Description
    June 22, 2015 + + +
    + + + Initial version implemented by + A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
    + DLR Institute of System Dynamics and Control +
    +
    +

    +")); +end UniformNoise; diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo index 3c350ff3..7a22759d 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.mo @@ -33,56 +33,137 @@ must be dragged resulting in a declaration

    This block is used to define global options that hold for all Noise block instances (such as a global seed for initializing the random number generators, -and a flag to switch off noise). +and a flag to switch off noise). Furthermore, the impure random number generator +impureRandom is initialized here.

    -Please note that only one globalSeed instance may be defined in the model due to the block's implementation! So, the block will usually reside on the top level of the model. +Please note that only one globalSeed instance may be defined in the model due to the initialization +of the impureRandom(..) random number generator! So, the block will usually reside on the top level of the model.

    -

    Reproducible Noise

    +

    Parameters that need to be defined

    -In the following table the different ways are summarized -to define reproducible noise with the blocks of this sublibrary: +When using a noise block of this package, at a minimum the following parameters must be defined:

    - + - - + + - - + +
    Name
    Parameter Description
    GenericNoise Random values are drawn periodically according to a given distribution - (e.g. uniform or normal distribution) at a given sample rate - (time events are generated at the sample instants). - Between sample instants, the output is kept constant.
    samplePeriod Random values are drawn periodically at the sample rate in [s] + defined with this parameter (time events are generated at the sample instants). + Between sample instants, the output y is kept constant.
    BandLimitedWhiteNoise Produces band-limited white noise with normal distribution. This noise type - is generated by a GenericNoise instance using a special parameterization. +
    distribution data Every noise block in this package needs additional data to describe the respective + distribution. A random number distribution maps the drawn random numbers + from the range 0.0 ... 1.0, to the desired range and distribution.
    +

    + +

    +As a simple demonstration, see example Blocks.Examples.NoiseExamples.UniformNoise. +In the next diagram, a simulation result is shown for samplePeriod=0.02 s and uniform distribution with +y_min=-1, y_max=3: +

    +

    + +
    +

    + +

    Advanced tab: General settings

    +

    +In the Advanced tab of the parameter menu, further options can be set in the noise blocks +as shown in the next table: +

    + +
    +

    + + + - - - - - + + + + +
    ParameterDescription
    globalSeed.random() Function random() is defined inside the globalSeed component. - On a lower hierarchical level, the function can be called via an - outer globalSeed declaration. For every call of this function, a new - random value is returned in the range 0 ... 1. - Since this is an impure function, it should only - be called in a when-clause, so at an event instant. This is a more - traditional random number generator in the seldom cases where it is needed - to implement a special block.
    globalSeed.randomInteger(..) Function randomInteger(imin=1,imax=Modelica.Constants.Integer_inf) is - defined inside the globalSeed component. It produces random Integer - values in the range imin ... imax. - On a lower hierarchical level, the function can be called via an - outer globalSeed declaration. For every call of this function, a new - Integer random value is returned in the range imin ... imax. - Since this is an impure function, it should only - be called in a when-clause, so at an event instant.
    enableNoise = true, if noise is generated at the output of the block (this is the default).
    + = false, if noise generation is switched off and the constant value + y_off is provided as output.
    y_off If enableNoise = false, the output of the block instance has the + value y_off. Default is y_off = 0.0. + Furthermore, if enableNoise = true and time<startTime, the output of the block is also + y_off (see description of parameter startTime below).
    +

    + + + +

    Advanced tab: Initialization

    + +

    +For every block instance, the internally used pseudo random number generator +has its own state. This state must be properly initialized, depending on +the desired situation. For this purpose the following parameters can be defined: +

    + +
    +

    + + + + + + + + + + + + + + +
    ParameterDescription
    useGlobalSeed = true, if the seed (= Integer number) defined in the \"inner GlobalSeed globalSeed\" + component is used for the initialization of the random number generator used in this + instance of the noise block. + Therefore, whenever the globalSeed defines a different number, the noise at every + instance is changing. This is the default setting and therefore the globalSeed component + defines whether every new simulation run shall provide the same noise + (e.g. for a parameter optimization of controller parameters), or + whether every new simulation run shall provide different noise + (e.g. for a Monte Carlo simulation).
    + = false, if the seed defined by globalSeed is ignored. For example, if + aerodynamic turbulence is modelled with a noise block and this turbulence + model shall be used for all simulation runs of a Monte Carlo simulation, then + useGlobalSeed has to be set to false.
    useAutomaticLocalSeed An Integer number, called local seed, is needed to initalize the random number + generator for a specific block instance. Instances using the same local seed + produce exactly the same random number values (so the same noise, if the other settings + of the instances are the same).
    + If useAutomaticLocalSeed = true, the + local seed is determined automatically from an impure random number generator that + produces Integer random values (impureRandomInteger). This is the default. + Note, this means that the noise might change if function randomInteger() is called + more or less often in the overall model (e.g. because an additional noise block is + introduced or removed). It is planned to change the automatic local seed function + in a future version of package Modelica, once Modelica Language 3.3 language elements + can be used (by using a hash value of the instance name of the model that is + inquired with the Modelica Language 3.3 function getInstanceName()).
    + If useAutomaticLocalSeed = false, the local seed is defined + explicitly by parameter fixedLocalSeed. It is then guaranteed that the generated noise + remains always the same (provided the other parameter values are the same).
    fixedLocalSeed If useAutomaticLocalSeed = false, the local seed to be used. + fixedLocalSeed can be any Integer number (including zero or a negative number). + The initialization algorithm produces a meaningful initial state of the random + number generator from fixedLocalSeed and (if useAutomaticGlobalSeed=true) from globalSeed even for + bad seeds such as 0 or 1, so the subsequently drawing of random numbers produces always statistically + meaningful numbers.
    startTime The time instant at which noise shall be generated at the output y. The default + startTime = 0. + For time<startTime, y = y_off. In some cases it is meaningful to simulate + a certain duration until an approximate steady-state is reached. In such a case + startTime should be set to a time instant after this duration.

    @@ -99,18 +180,17 @@ suite developed in 2014 by Sebastiano Vigna (for details see These random number generators have excellent statistical properties, produce quickly statistically relevant random numbers, even if starting from a bad initial seed, and have a reasonable length of the internal state -vector of 2, 4, and 33 Integer elements. The short length state vectors are especially -useful if every block instance has its own internal state vector, as needed for -reproducible noise blocks. The random number generator with a length of 33 Integer -elements is suited even for massively parallel simulations where every simulation +vector of 2, 4, and 33 Integer elements. The random number generator with an internal +state vector of length 2 is used to initialize the other two random number generators. +The length 4 random number generator is used in the noise blocks of this package, and every +such block has its own internal state vector, as needed for reproducible noise blocks. +The random number generator with a length of 33 Integer is used from the impure random number +generator. It is suited even for massively parallel simulations where every simulation computes a large number of random values. More details of the random number generators are described in the documentation of package Math.Random.Generators. -The blocks in this sublibrary allow to select the desired generator, but -also user-defined generators.

    -

    Distributions

    @@ -145,8 +225,6 @@ then with the TruncatedNormal distribution it is guaranted that random values ar generated in this band). More details of truncated distributions are given in the documentation of package Math.Distributions. -In the blocks of this sublibrary, the desired distribution, truncated disribution or also -a user-defined distribution can be selected.

    ", revisions="

    diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.order b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.order index 097e3fce..3541513e 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.order +++ b/Modelica_Noise 1.0 Beta.1/Blocks/Noise/package.order @@ -1,3 +1,5 @@ GlobalSeed -GenericNoise +UniformNoise +NormalNoise +TruncatedNormalNoise BandLimitedWhiteNoise diff --git a/Modelica_Noise 1.0 Beta.1/Blocks/package.order b/Modelica_Noise 1.0 Beta.1/Blocks/package.order index 9b3883a5..b4eab0dd 100644 --- a/Modelica_Noise 1.0 Beta.1/Blocks/package.order +++ b/Modelica_Noise 1.0 Beta.1/Blocks/package.order @@ -1,3 +1,4 @@ Examples Math Noise +Interfaces diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo index 66c65f05..b2063cd3 100644 --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/impureRandom.mo @@ -27,7 +27,7 @@ is returned, so the function is impure.

       parameter Integer seed;
       Real r;
    -  function random = impureRandom (final id=id);
    +  function random = impureRandom (final id=id);
     protected 
       Integer id;
     equation
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo
    index ff6ff79b..974b7658 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/initializeImpureRandom.mo	
    @@ -52,7 +52,7 @@ random number generator to fill the internal state vector with 64 bit random num
     
       parameter Integer seed;
       Real r;
    -  function random = impureRandom (final id=id);
    +  function random = impureRandom (final id=id);
     protected 
       Integer id;
     equation
    diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/Distributions.png b/Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/Distributions.png
    index 5ad5be0c4fe6d436f5aa2e19415e3f295a656aa4..e0fc31fdf453545434c67ddf8cdaf6ccef709aef 100644
    GIT binary patch
    literal 7231
    zcmch6cTiK^xAp-h}PEUIGBJNm1bTdN!ZWI$+dH4XrPBxzYIr
    zqM0<0>#6ZN>%%cEauuOViWSJjSVbWp(I#OStP|caz2?0~UDi$&)j3HA0P6D*MRMS3
    z-i5;$!K=6b&FGNX@^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`wtKATlg-%S{%IG?B{zQf_fcEWGV?rKJ%j6xo~Da9rX_#2Mgu@CfiOxO$d~p_PmsM
    zk1nM#c-#Iwn>dFOT(#nQCT_re4A#*uqc~z*
    zEI)uuDECX3)XXGjb@hsD3v9M$g7Kg;dUf057+nLh>0QhR$m4urH3%61@1`aHOliy5
    zhvZ22YnKdbo0DwK)O1!B$ZzkCZ{Srf&<5Fz>FJ5qCc1BJ=CZliXU?5cGRIOd4xIf6
    zz@3KgC4I<3wHPbb|CQ28pMSEFD_1c7TR`?dh<+q=H<>aBzPzJ|c1!Qa~jp}WC%5UMf=uHENW)pANhdg9U}J@dPPFE@!AC}ojOr~xmo1xLaMfIa5y
    z$v*y_fo(2cEc4pZNhwnPe!$2~&C8eE&I`A@9C?|~Cw7$SxxwIL_8kiY?e(2YHwU&$
    z!v2w3<-Vw{2W5kl10MA$UVY7ufz?Uk!|0fwq+7K^DRW<}e1!gBOR+A`5A(3ccDZVN
    z%$8tcLWlu09i6uJAS1dO)mHA^ugHC96C^&K6$lPkRm0s
    z#4K)&`nHrt#1LwgeBV{W3NKkHA_oVMxQ9U4qwC_VCp#C80NK*YI5T>kt4{w0(j5C0
    YZv^oQA3u-qp=NKLLl#`N`n0D1EN)&Kwi
    
    diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/GenericNoise.png b/Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/UniformNoise.png
    similarity index 100%
    rename from Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/GenericNoise.png
    rename to Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/UniformNoise.png
    diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/WeibullNoiseProperties1.png b/Modelica_Noise 1.0 Beta.1/Resources/Images/Blocks/Examples/NoiseExamples/WeibullNoiseProperties1.png
    deleted file mode 100644
    index 56f962e534c3fa8feb234abd82fce13d1169462c..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 19429
    zcmeHvcT`hdyC)z>Q9;2%$3_v6PLPfuBGLsxI!F^q=q*5~0x!};KuUm6l-^sUgDAcC
    z4oa_)5=v-ufaLwYduPp^xob^XGxPl+uAQ87_Sw&V>hJmO1ga>>ULm6;!^6Y7BKQ31
    zOFTRR5b)2G#jc^=eZr!kiwl_icEGj%jF~tp}t`EEVRAYdCW#iY19N|!Ya~IX=yt(lzgyYY28a9
    z_rfjNm4t%usw5sh@F$6g;3S>M-jIyswig}&@TcyXmtn)R^Dptd2T87iTlHI~pLBLI
    z-e;@S8`pEtCYT`*nM|*eSZ&L}{2i8>PD^V2I`S)8vaF$yVb54&n9m~-ENQv6zgo%V!*R3O!dERgn
    zGnx|^7iE;@ty0Ey#yQNJc=IojPtI4`N1%U^&e2CYp(o?m5~W0)&}z6fE2$*=5IV$a
    zK4@K3Rr3)tPTlqs{c>`!@aDyIUf1~5&dtBtzmJsVem&zp8BN?q}30ndU8gm
    z%0hcc+4q>c?6^E5EQODJTW7DGifxnBg$BHBFqk>>kV&iaQm6Nwx
    zG<4R%P1}5Hj|+AZqQqP2#aBC-5IfReIi^=OIvEh*deFWnrMFWNk-d<7xOZ=lU+S+X
    zch5Fdr5vxm@v|<`=k$Xp1yFP(%iS%_z=g0A=dFrzPnL>um!gVjRy|4Lgnbn&;)+Q_
    zd!|mXeXK>Yl}e%&s$oR5F~z!6i#)YWuk6BC##05sBbc~0y*4?SS1Jy-XWrZvb8mNgc4MitEvRF~?;PGMp$#TFRXyM%GE$qy
    zw5v=}XM(#b34HGpqMTj-8mF8e@#_CGUweP@Roo0~U!o{FJ|Z2ew)XVuWWCtvbM|U@
    z1dyw2Jj07BeAm#ip@p)yQQ6_+`A9_I^=C|kBNv6{&($A~V3IWQI1Z*)C{GI%7Yn=Y*Rg=JsO8vqI
    zBCZ(oi_7@2EVjp9RgIeO;?gsmvN!cOnVIqR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aoA6uA-zWHJsffi41TG|YY}^YphWD#xw?qO5EB#l<)$=;+b$dd|d6BYWCUvVy0r3j2wOQ|@^#3}ESvu=H1b5Z5Y(
    zo^$SxsAxD5bI~3QGx|YRklD9on7rK|W54`$by5EzW8DO+uetiC`nsm{#L-@`#AI-}
    zWa})2srkej8=}K2m}YbbpxG1T>b-i*Qer8_XI6}DJIFa8zG6;_iD6|x6R6Hy#_`=4
    zH};^(=%eW#8n}}*p9oeRZ2;}EwN{|Oh0SoFsJZ*L0v8f?0f)caxQ)wPZU8=--6xIi
    ffAr=Pri*_?CrkZx-vRh(E<8CIrKfpPhCcrVVbbm#
    
    
    From 5ea42e79582c5e9a94b19c2aea7fb6aad7cbaafb Mon Sep 17 00:00:00 2001
    From: Martin Otter 
    Date: Thu, 10 Dec 2015 09:13:10 +0100
    Subject: [PATCH 46/46] 
     https://github.com/DLR-SR/Noise/issues/74#issuecomment-163358128 fixed:
     Provided automaticGlobalSeed as C-function
    
    ---
     .../Random/Utilities/automaticGlobalSeed.mo   | 21 +++++++-------
     .../Resources/Include/ModelicaRandom.c        | 28 +++++++++++++++++--
     2 files changed, 36 insertions(+), 13 deletions(-)
    
    diff --git a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo
    index 63af684d..3edac856 100644
    --- a/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo	
    +++ b/Modelica_Noise 1.0 Beta.1/Math/Random/Utilities/automaticGlobalSeed.mo	
    @@ -1,15 +1,19 @@
     within Modelica_Noise.Math.Random.Utilities;
     function automaticGlobalSeed
    -  "Creates an automatic integer seed from the current time and process id (= impure function)"
    +  "Creates an automatic integer seed (typically from the current time and process id; this is an impure function)"
       output Integer seed "Automatically generated seed";
    -protected
    +  /*
    +protected 
       Integer ms,sec,min,hour "Current system time";
       Integer pid "Current process ID";
    -algorithm
    +algorithm 
       (ms,sec,min,hour) := Modelica_Noise.Utilities.System.getTime();
       pid := Modelica_Noise.Utilities.System.getPid();
       seed := 1 + ms + 1000*sec + 1000*60*min + 1000*60*60*hour
    -            + 6007*pid;
    +  + 6007*pid;
    +  */
    +  external "C" seed = ModelicaRandom_automaticGlobalSeed()
    +    annotation (Include = "#include \"ModelicaRandom.c\"");
     
      annotation (Documentation(info="
     

    Syntax

    @@ -18,17 +22,14 @@ seed = Utilities.automaticGlobalSeed();

    Description

    -

    Returns an automatically computed seed (Integer) from:

    +

    Returns an automatically computed seed (Integer). Typically, this seed is computed from:

    1. The current localtime by computing the number of milli-seconds up to the current hour
    2. The process id (added to the first part by multiplying it with the prime number 6007).
    -

    Check that worst case combination can be included in an Integer:

    -
    -

    1000*60*60 = 3.6e6 < 2^31 = 2147483648 (2.1e9)

    -

    -Everything is added to 1, in order to guard against the very unlikely case that the sum is zero. +If getTime and getPid functions are not available on the target where this Modelica function +is called, other means to compute a seed may be used.

    diff --git a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c index 7c52fcf9..36594254 100644 --- a/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c +++ b/Modelica_Noise 1.0 Beta.1/Resources/Include/ModelicaRandom.c @@ -17,15 +17,15 @@ Implemented a first version. This file is licensed under the BSD 2-Clause License: - + Copyright (C) 2015, DLR and Modelica Association. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. @@ -588,6 +588,27 @@ MODELICA_EXPORT double ModelicaRandom_impureRandom_xorshift1024star(int id) { +MODELICA_EXPORT int ModelicaRandom_automaticGlobalSeed() { + /* Creates an automatic integer seed (typically from the current time and process id) */ + + + int ms, sec, min, hour, mday, mon, year; + int pid; + int seed; + + ModelicaRandom_getTime(&ms, &sec, &min, &hour, &mday, &mon, &year); + pid = ModelicaRandom_getpid(); + + /* Check that worst case combination can be included in an Integer: + + 1000*60*60 = 3.6e6 < 2^31 = 2147483648 (2.1e9) + + Everything is added to 1, in order to guard against the very unlikely case that the sum is zero. + */ + seed = 1 + ms + 1000*sec + 1000*60*min + 1000*60*60*hour + 6007*pid; + return seed; +} + /* original algorithms */ @@ -605,4 +626,5 @@ MODELICA_EXPORT void ModelicaRandom_convertRealToIntegers(double d, int i[]) { + #endif