Package Modelica.​Electrical.​Analog.​Sources
Time-dependent and controlled voltage and current sources

Information

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).

Package Contents

NameDescription
ConstantCurrentSource for constant current
ConstantVoltageSource for constant voltage
CosineCurrentCosine current source
CosineVoltageCosine voltage source
ExponentialsCurrentRising and falling exponential current source
ExponentialsVoltageRising and falling exponential voltage source
ExpSineCurrentExponentially damped sine current source
ExpSineVoltageExponentially damped sine voltage source
PulseCurrentPulse current source
PulseVoltagePulse voltage source
RampCurrentRamp current source
RampVoltageRamp voltage source
SawToothCurrentSaw tooth current source
SawToothVoltageSaw tooth voltage source
SignalCurrentGeneric current source using the input signal as source current
SignalVoltageGeneric voltage source using the input signal as source voltage
SineCurrentSine current source
SineVoltageSine voltage source
StepCurrentStep current source
StepVoltageStep voltage source
SupplyVoltageSupply voltage (positive and negative)
TableCurrentCurrent source by linear interpolation in a table
TableVoltageVoltage source by linear interpolation in a table
TrapezoidCurrentTrapezoidal current source
TrapezoidVoltageTrapezoidal voltage source

Model Modelica.​Electrical.​Analog.​Sources.​SignalVoltage
Generic voltage source using the input signal as source voltage

Information

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.

Connectors

TypeNameDescription
PositivePinp 
NegativePinn 
input RealInputvVoltage between pin p and n (= p.v - n.v) as input signal

Model Modelica.​Electrical.​Analog.​Sources.​ConstantVoltage
Source for constant voltage

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​OnePort (Component with two electrical pins p and n and current i from p to n).

Parameters

TypeNameDefaultDescription
VoltageV Value of constant voltage

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​StepVoltage
Step voltage source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
VoltageV Height of step
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​RampVoltage
Ramp voltage source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
VoltageV Height of ramp
Timeduration Duration of ramp
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​SineVoltage
Sine voltage source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
VoltageV Amplitude of sine wave
Anglephase0Phase of sine wave
FrequencyfreqHz Frequency of sine wave
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​CosineVoltage
Cosine voltage source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
VoltageV Amplitude of cosine wave
Anglephase0Phase of cosine wave
FrequencyfreqHz Frequency of cosine wave
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​ExpSineVoltage
Exponentially damped sine voltage source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
VoltageV Amplitude of sine wave
FrequencyfreqHz Frequency of sine wave
Anglephase0Phase of sine wave
Dampingdamping Damping coefficient of sine wave
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​ExponentialsVoltage
Rising and falling exponential voltage source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
RealvMax Upper bound for rising edge
TimeriseTime Rise time
TimeriseTimeConst Rise time constant
TimefallTimeConst Fall time constant
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​PulseVoltage
Pulse voltage source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
VoltageV Amplitude of pulse
Realwidth Width of pulse in % of period
Timeperiod Time for one period
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​SawToothVoltage
Saw tooth voltage source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
VoltageV Amplitude of saw tooth
Timeperiod Time for one period
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​TrapezoidVoltage
Trapezoidal voltage source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
VoltageV Amplitude of trapezoid
Timerising Rising duration of trapezoid
Timewidth Width duration of trapezoid
Timefalling Falling duration of trapezoid
Timeperiod Time for one period
Integernperiod Number of periods (< 0 means infinite number of periods)
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​TableVoltage
Voltage source by linear interpolation in a table

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​VoltageSource (Interface for voltage sources).

Parameters

TypeNameDefaultDescription
Realtable[:,:][0,0; 1,1; 2,4]Table matrix (time = first column, voltage = second column)
Voltageoffset0Voltage offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​SignalCurrent
Generic current source using the input signal as source current

Information

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.

Connectors

TypeNameDescription
PositivePinp 
NegativePinn 
input RealInputiCurrent flowing from pin p to pin n as input signal

Model Modelica.​Electrical.​Analog.​Sources.​ConstantCurrent
Source for constant current

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​OnePort (Component with two electrical pins p and n and current i from p to n).

Parameters

TypeNameDefaultDescription
CurrentI Value of constant current

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​StepCurrent
Step current source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
CurrentI Height of step
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​RampCurrent
Ramp current source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
CurrentI Height of ramp
Timeduration Duration of ramp
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​SineCurrent
Sine current source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
CurrentI Amplitude of sine wave
Anglephase0Phase of sine wave
FrequencyfreqHz Frequency of sine wave
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​CosineCurrent
Cosine current source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
CurrentI Amplitude of cosine wave
Anglephase0Phase of cosine wave
FrequencyfreqHz Frequency of cosine wave
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​ExpSineCurrent
Exponentially damped sine current source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
RealI Amplitude of sine wave
FrequencyfreqHz Frequency of sine wave
Anglephase0Phase of sine wave
Dampingdamping Damping coefficient of sine wave
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​ExponentialsCurrent
Rising and falling exponential current source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
RealiMax Upper bound for rising edge
TimeriseTime Rise time
TimeriseTimeConst Rise time constant
TimefallTimeConst Fall time constant
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​PulseCurrent
Pulse current source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
CurrentI Amplitude of pulse
Realwidth Width of pulse in % of period
Timeperiod Time for one period
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​SawToothCurrent
Saw tooth current source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
CurrentI Amplitude of saw tooth
Timeperiod Time for one period
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​TrapezoidCurrent
Trapezoidal current source

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
CurrentI Amplitude of trapezoid
Timerising Rising duration of trapezoid
Timewidth Width duration of trapezoid
Timefalling Falling duration of trapezoid
Timeperiod Time for one period
Integernperiod Number of periods (< 0 means infinite number of periods)
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​TableCurrent
Current source by linear interpolation in a table

Information

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 Modelica.​Electrical.​Analog.​Interfaces.​CurrentSource (Interface for current sources).

Parameters

TypeNameDefaultDescription
Realtable[:,:][0,0; 1,1; 2,4]Table matrix (time = first column, current = second column)
Currentoffset0Current offset
TimestartTime0Time offset

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Analog.​Sources.​SupplyVoltage
Supply voltage (positive and negative)

Information

This is a simple model of a constant supply voltage with positive and negative supply, the potential between positive and negative supply is accessible.

Parameters

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply

Connectors

TypeNameDescription
PositivePinpin_p 
NegativePinpin_n 
NegativePinground