modelVaryingResistance
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This example shows a purely electric circuit containing a VariableResistor component (R3).
The resistance of R3 is determined depending on time function of component Ramp.
It starts at a very small value (0.01 Ohm) and reaches 5 Ohm after 10 s.
Using this example, we would like to give an idea how one can decide if the system
is in a quasi-stationary mode or not.
The main (and only) time constant of the system reads T = L*(R2+R3)/(R2*R3).
It is well-known for first-order components that, after a step-like change of an
input signal, the output signal reaches 95 % of �ts final value after a time period
of 3*T.
This time period is called decayTime.
Checking the difference between decayTime and the time interval of the
simulation experiment yields the information if the system is in a quasi-stationary
mode.
Because of variable resistor R3, it is necessary to calculate decayTime
during the simulation experiment according to decayTime = 3*L*(R2+R3)/(R2*R3).
The Boolean quasiStationaryOk tests if decayTime is smaller than
the simulation interval tInterval (which is necessary for quasi-stationary
mode).
Hence in the first part of the simulation (Time < 2.4 s), the system is
not in a quasi-stationary mode and the appropriate points in time of the
result curves represent only a series of steady states without any correlation with time.
In the second part of the simulation (Time > 2.4 s), the system is
quasi-stationary and the result curves reflect a correct relationship with time.
Simulate until 10 s.
Plot in seperate windows- V.v, R2.v, and L.v versus "Time"
- L.vRe and L.vIm versus "Time"
- quasiStationaryOk versus "Time"
Fraunhofer IIS/EAS, Dresden
email: olaf.enge@eas.iis.fraunhofer.de
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | tInterval | 10/500 | 10 seconds devided into 500 intervals |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| ComplexLib.SinglePhase.Basic.Ground | ground | ||
| ComplexLib.SinglePhase.Sources.SineVoltage | V | ||
| ComplexLib.SinglePhase.Basic.Resistor | R2 | ||
| ComplexLib.SinglePhase.Basic.Inductor | L | ||
| ComplexLib.SinglePhase.Basic.VariableResistor | R3 | ||
| Modelica.Blocks.Sources.Ramp | Ramp | ||
| Real | decayTime | ||
| Boolean | quasiStationaryOk |