modelFunctionCall
Shows how to use the internal random functions
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This example demonstrates, how the internal functions of the PRNG block can also be used in your own models: You need to instatiate the respective function with the neccessary redeclarations and then you can call the functions. Please not, that the sample-based RNGs also need handling of their states!
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | dt | 0.1 | The time step for discrete random numbers |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | r_continuous | my_continuous_random(time) | The time-continuous noise signal |
| Real | r_discrete | my_continuous_random(integer(time/dt)*dt) | The time-discrete noise signal |
| Real | r_sampled | The sampled noise signal | |
| Integer[1] | state | The state of the random number generator |
Contents
| Name | Description |
|---|---|
| my_continuous_random | The state-less random number generator |
| my_sampled_random | The state-less random number generator |
Revisions
Developed 2014 at the DLR Institute of System Dynamics and Control