Time-dependent and controlled voltage and current sources
This package contains time-dependent and controlled voltage and current sources. Most of the sources use the behavior modeled in the Modelica.Blocks.Sources package. All sources are ideal in the sense that no internal resistances are included.
Extends from Modelica.Icons.SourcesPackage (Icon for packages containing sources).
Name | Description |
---|---|
SignalVoltage | Generic voltage source using the input signal as source voltage |
ConstantVoltage | Source for constant voltage |
StepVoltage | Step voltage source |
RampVoltage | Ramp voltage source |
SineVoltage | Sine voltage source |
CosineVoltage | Cosine voltage source |
ExpSineVoltage | Exponentially damped sine voltage source |
ExponentialsVoltage | Rising and falling exponential voltage source |
PulseVoltage | Pulse voltage source |
SawToothVoltage | Saw tooth voltage source |
TrapezoidVoltage | Trapezoidal voltage source |
TableVoltage | Voltage source by linear interpolation in a table |
SignalCurrent | Generic current source using the input signal as source current |
ConstantCurrent | Source for constant current |
StepCurrent | Step current source |
RampCurrent | Ramp current source |
SineCurrent | Sine current source |
CosineCurrent | Cosine current source |
ExpSineCurrent | Exponentially damped sine current source |
ExponentialsCurrent | Rising and falling exponential current source |
PulseCurrent | Pulse current source |
SawToothCurrent | Saw tooth current source |
TrapezoidCurrent | Trapezoidal current source |
TableCurrent | Current source by linear interpolation in a table |
SupplyVoltage | Supply voltage (positive and negative) |
Generic voltage source using the input signal as source voltage
The signal voltage source is a parameterless converter of real valued signals into a the source voltage. No further effects are modeled. The real valued signal has to be provided by components of the blocks library. It can be regarded as the "Opposite" of a voltage sensor.
Name | Description |
---|---|
p | |
n | |
v | Voltage between pin p and n (= p.v - n.v) as input signal [V] |
Source for constant voltage
The ConstantVoltage source is a simple source for an ideal constant voltage which is provided by a parameter. There is no internal resistance modeled. If it is used instead of a battery model it is not very realistic: This battery will never be unloaded.
Extends from Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
V | Value of constant voltage [V] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Step voltage source
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
V | Height of step [V] |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Ramp voltage source
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
V | Height of ramp [V] |
duration | Duration of ramp [s] |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Sine voltage source
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
V | Amplitude of sine wave [V] |
phase | Phase of sine wave [rad] |
freqHz | Frequency of sine wave [Hz] |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Cosine voltage source
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
V | Amplitude of cosine wave [V] |
phase | Phase of cosine wave [rad] |
freqHz | Frequency of cosine wave [Hz] |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Exponentially damped sine voltage source
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
V | Amplitude of sine wave [V] |
freqHz | Frequency of sine wave [Hz] |
phase | Phase of sine wave [rad] |
damping | Damping coefficient of sine wave [s-1] |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Rising and falling exponential voltage source
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
vMax | Upper bound for rising edge |
riseTime | Rise time [s] |
riseTimeConst | Rise time constant [s] |
fallTimeConst | Fall time constant [s] |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Pulse voltage source
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
V | Amplitude of pulse [V] |
width | Width of pulse in % of period |
period | Time for one period [s] |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Saw tooth voltage source
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
V | Amplitude of saw tooth [V] |
period | Time for one period [s] |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Trapezoidal voltage source
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
V | Amplitude of trapezoid [V] |
rising | Rising duration of trapezoid [s] |
width | Width duration of trapezoid [s] |
falling | Falling duration of trapezoid [s] |
period | Time for one period [s] |
nperiod | Number of periods (< 0 means infinite number of periods) |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Voltage source by linear interpolation in a table
This voltage source uses the corresponding signal source of the Modelica.Blocks.Sources package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
This block generates a voltage source by linear interpolation in a table. The time points and voltage values are stored in a matrix table[i,j], where the first column table[:,1] contains the time points and the second column contains the voltage to be interpolated. The table interpolation has the following properties:
Example:
table = [0 0 1 0 1 1 2 4 3 9 4 16] If, e.g., time = 1.0, the voltage v = 0.0 (before event), 1.0 (after event) e.g., time = 1.5, the voltage v = 2.5, e.g., time = 2.0, the voltage v = 4.0, e.g., time = 5.0, the voltage v = 23.0 (i.e., extrapolation).
Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.VoltageSource (Interface for voltage sources).
Name | Description |
---|---|
table[:, :] | Table matrix (time = first column, voltage = second column) |
offset | Voltage offset [V] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Generic current source using the input signal as source current
The signal current source is a parameterless converter of real valued signals into a the source current. No further effects are modeled. The real valued signal has to be provided by components of the blocks library. It can be regarded as the "Opposite" of a current sensor.
Name | Description |
---|---|
p | |
n | |
i | Current flowing from pin p to pin n as input signal [A] |
Source for constant current
The ConstantCurrent source is a simple source for an ideal constant current which is provided by a parameter. There is no internal resistance modeled. No further effects are modeled. Especially, the current flow will never end.
Extends from Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
I | Value of constant current [A] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Step current source
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
I | Height of step [A] |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Ramp current source
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
I | Height of ramp [A] |
duration | Duration of ramp [s] |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Sine current source
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
I | Amplitude of sine wave [A] |
phase | Phase of sine wave [rad] |
freqHz | Frequency of sine wave [Hz] |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Cosine current source
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
I | Amplitude of cosine wave [A] |
phase | Phase of cosine wave [rad] |
freqHz | Frequency of cosine wave [Hz] |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Exponentially damped sine current source
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
I | Amplitude of sine wave |
freqHz | Frequency of sine wave [Hz] |
phase | Phase of sine wave [rad] |
damping | Damping coefficient of sine wave [s-1] |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Rising and falling exponential current source
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
iMax | Upper bound for rising edge |
riseTime | Rise time [s] |
riseTimeConst | Rise time constant [s] |
fallTimeConst | Fall time constant [s] |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Pulse current source
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
I | Amplitude of pulse [A] |
width | Width of pulse in % of period |
period | Time for one period [s] |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Saw tooth current source
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
I | Amplitude of saw tooth [A] |
period | Time for one period [s] |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Trapezoidal current source
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Care for the meaning of the parameters in the Blocks package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
I | Amplitude of trapezoid [A] |
rising | Rising duration of trapezoid [s] |
width | Width duration of trapezoid [s] |
falling | Falling duration of trapezoid [s] |
period | Time for one period [s] |
nperiod | Number of periods (< 0 means infinite number of periods) |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Current source by linear interpolation in a table
This current source uses the corresponding signal source of the Modelica.Blocks.Sources package. Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
This block generates a current source by linear interpolation in a table. The time points and current values are stored in a matrix table[i,j], where the first column table[:,1] contains the time points and the second column contains the current to be interpolated. The table interpolation has the following properties:
Example:
table = [0 0 1 0 1 1 2 4 3 9 4 16] If, e.g., time = 1.0, the current i = 0.0 (before event), 1.0 (after event) e.g., time = 1.5, the current i = 2.5, e.g., time = 2.0, the current i = 4.0, e.g., time = 5.0, the current i = 23.0 (i.e., extrapolation).
Furthermore, an offset parameter is introduced, which is added to the value calculated by the blocks source. The startTime parameter allows to shift the blocks source behavior on the time axis.
Extends from Interfaces.CurrentSource (Interface for current sources).
Name | Description |
---|---|
table[:, :] | Table matrix (time = first column, current = second column) |
offset | Current offset [A] |
startTime | Time offset [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Supply voltage (positive and negative)
This is a simple model of a constant supply voltage with positive and negative supply, the potential between positive and negative supply is accessible.
Name | Description |
---|---|
Vps | Positive supply [V] |
Vns | Negative supply [V] |
Name | Description |
---|---|
pin_p | |
pin_n | |
ground |