Modelica.Electrical.Analog.Sources

Time-dependend and controlled voltage and current sources

Information


This package contains time-dependend 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 Content

NameDescription
Modelica.Electrical.Analog.Sources.SignalVoltage SignalVoltage Generic voltage source using the input signal as source voltage
Modelica.Electrical.Analog.Sources.ConstantVoltage ConstantVoltage Source for constant voltage
Modelica.Electrical.Analog.Sources.StepVoltage StepVoltage Step voltage source
Modelica.Electrical.Analog.Sources.RampVoltage RampVoltage Ramp voltage source
Modelica.Electrical.Analog.Sources.SineVoltage SineVoltage Sine voltage source
Modelica.Electrical.Analog.Sources.ExpSineVoltage ExpSineVoltage Exponentially damped sine voltage source
Modelica.Electrical.Analog.Sources.ExponentialsVoltage ExponentialsVoltage Rising and falling exponential voltage source
Modelica.Electrical.Analog.Sources.PulseVoltage PulseVoltage Pulse voltage source
Modelica.Electrical.Analog.Sources.SawToothVoltage SawToothVoltage Saw tooth voltage source
Modelica.Electrical.Analog.Sources.TrapezoidVoltage TrapezoidVoltage Trapezoidal voltage source
Modelica.Electrical.Analog.Sources.TableVoltage TableVoltage Voltage source by linear interpolation in a table
Modelica.Electrical.Analog.Sources.SignalCurrent SignalCurrent Generic current source using the input signal as source current
Modelica.Electrical.Analog.Sources.ConstantCurrent ConstantCurrent Source for constant current
Modelica.Electrical.Analog.Sources.StepCurrent StepCurrent Step current source
Modelica.Electrical.Analog.Sources.RampCurrent RampCurrent Ramp current source
Modelica.Electrical.Analog.Sources.SineCurrent SineCurrent Sine current source
Modelica.Electrical.Analog.Sources.ExpSineCurrent ExpSineCurrent Exponentially damped sine current source
Modelica.Electrical.Analog.Sources.ExponentialsCurrent ExponentialsCurrent Rising and falling exponential current source
Modelica.Electrical.Analog.Sources.PulseCurrent PulseCurrent Pulse current source
Modelica.Electrical.Analog.Sources.SawToothCurrent SawToothCurrent Saw tooth current source
Modelica.Electrical.Analog.Sources.TrapezoidCurrent TrapezoidCurrent Trapezoidal current source
Modelica.Electrical.Analog.Sources.TableCurrent TableCurrent Current source by linear interpolation in a table


Modelica.Electrical.Analog.Sources.SignalVoltage Modelica.Electrical.Analog.Sources.SignalVoltage

Generic voltage source using the input signal as source voltage

Modelica.Electrical.Analog.Sources.SignalVoltage

Information


The signall 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

Modelica definition

model SignalVoltage 
  "Generic voltage source using the input signal as source voltage"

  Interfaces.PositivePin p;
  Interfaces.NegativePin n;
  Modelica.Blocks.Interfaces.RealInput v 
    "Voltage between pin p and n (= p.v - n.v) as input signal";
  SI.Current i "Current flowing from pin p to pin n";
equation 
  v = p.v - n.v;
  0 = p.i + n.i;
  i = p.i;
end SignalVoltage;

Modelica.Electrical.Analog.Sources.ConstantVoltage Modelica.Electrical.Analog.Sources.ConstantVoltage

Source for constant voltage

Modelica.Electrical.Analog.Sources.ConstantVoltage

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

Parameters

TypeNameDefaultDescription
VoltageV Value of constant voltage [V]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model ConstantVoltage "Source for constant voltage"
  parameter SI.Voltage V(start=1) "Value of constant voltage";
  extends Interfaces.OnePort;

equation 
  v = V;
end ConstantVoltage;

Modelica.Electrical.Analog.Sources.StepVoltage Modelica.Electrical.Analog.Sources.StepVoltage

Step voltage source

Modelica.Electrical.Analog.Sources.StepVoltage

Information


This voltage source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
VoltageV Height of step [V]
Voltageoffset0Voltage offset [V]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model StepVoltage "Step voltage source"
  parameter SI.Voltage V(start=1) "Height of step";
  extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Step
      signalSource(height=V));
end StepVoltage;

Modelica.Electrical.Analog.Sources.RampVoltage Modelica.Electrical.Analog.Sources.RampVoltage

Ramp voltage source

Modelica.Electrical.Analog.Sources.RampVoltage

Information


This voltage source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
VoltageV Height of ramp [V]
Timeduration Duration of ramp [s]
Voltageoffset0Voltage offset [V]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model RampVoltage "Ramp voltage source"
  parameter SI.Voltage V(start=1) "Height of ramp";
  parameter SI.Time duration(min=Modelica.Constants.small, start=2) 
    "Duration of ramp";
  extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Ramp
      signalSource( final height=
               V, final duration=duration));
end RampVoltage;

Modelica.Electrical.Analog.Sources.SineVoltage Modelica.Electrical.Analog.Sources.SineVoltage

Sine voltage source

Modelica.Electrical.Analog.Sources.SineVoltage

Information


This voltage source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
VoltageV Amplitude of sine wave [V]
Anglephase0Phase of sine wave [rad]
FrequencyfreqHz Frequency of sine wave [Hz]
Voltageoffset0Voltage offset [V]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model SineVoltage "Sine voltage source"
  parameter SI.Voltage V(start=1) "Amplitude of sine wave";
  parameter SI.Angle phase=0 "Phase of sine wave";
  parameter SI.Frequency freqHz(start=1) "Frequency of sine wave";
  extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Sine
      signalSource(
      amplitude=V,
      freqHz=freqHz,
      phase=phase));

end SineVoltage;

Modelica.Electrical.Analog.Sources.ExpSineVoltage Modelica.Electrical.Analog.Sources.ExpSineVoltage

Exponentially damped sine voltage source

Modelica.Electrical.Analog.Sources.ExpSineVoltage

Information


This voltage source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
VoltageV Amplitude of sine wave [V]
FrequencyfreqHz Frequency of sine wave [Hz]
Anglephase0Phase of sine wave [rad]
Dampingdamping Damping coefficient of sine wave [s-1]
Voltageoffset0Voltage offset [V]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model ExpSineVoltage "Exponentially damped sine voltage source"
  parameter SI.Voltage V(start=1) "Amplitude of sine wave";
  parameter SI.Frequency freqHz(start=2) "Frequency of sine wave";
  parameter SI.Angle phase=0 "Phase of sine wave";
  parameter SI.Damping damping(start=1) "Damping coefficient of sine wave";
  extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.ExpSine
      signalSource(
      amplitude=V,
      freqHz=freqHz,
      phase=phase,
      damping=damping));
end ExpSineVoltage;

Modelica.Electrical.Analog.Sources.ExponentialsVoltage Modelica.Electrical.Analog.Sources.ExponentialsVoltage

Rising and falling exponential voltage source

Modelica.Electrical.Analog.Sources.ExponentialsVoltage

Information


This voltage source uses the coresponding 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).

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model ExponentialsVoltage 
  "Rising and falling exponential voltage source"
  parameter Real vMax(start=1) "Upper bound for rising edge";
  parameter SI.Time riseTime(min=0, start=0.5) "Rise time";
  parameter SI.Time riseTimeConst(min=Modelica.Constants.small, start=0.1) 
    "Rise time constant";
  parameter SI.Time fallTimeConst(min=Modelica.Constants.small, start=riseTimeConst) 
    "Fall time constant";
  extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Exponentials
                                           signalSource(
      outMax=vMax,
      riseTime=riseTime,
      riseTimeConst=riseTimeConst,
      fallTimeConst=fallTimeConst));
end ExponentialsVoltage;

Modelica.Electrical.Analog.Sources.PulseVoltage Modelica.Electrical.Analog.Sources.PulseVoltage

Pulse voltage source

Modelica.Electrical.Analog.Sources.PulseVoltage

Information


This voltage source uses the coresponding 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).

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model PulseVoltage "Pulse voltage source"
  parameter SI.Voltage V(start=1) "Amplitude of pulse";
  parameter Real width(
    final min=Modelica.Constants.small,
    final max=100, start=50) "Width of pulse in % of period";
  parameter SI.Time period(final min=Modelica.Constants.small, start=1) 
    "Time for one period";
  extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Pulse
      signalSource(
      amplitude=V,
      width=width,
      period=period));
end PulseVoltage;

Modelica.Electrical.Analog.Sources.SawToothVoltage Modelica.Electrical.Analog.Sources.SawToothVoltage

Saw tooth voltage source

Modelica.Electrical.Analog.Sources.SawToothVoltage

Information


This voltage source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
VoltageV Amplitude of saw tooth [V]
Timeperiod Time for one period [s]
Voltageoffset0Voltage offset [V]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model SawToothVoltage "Saw tooth voltage source"
  parameter SI.Voltage V(start=1) "Amplitude of saw tooth";
  parameter SI.Time period(start=1) "Time for one period";
  extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.SawTooth
      signalSource(
        amplitude=V, period=period));
end SawToothVoltage;

Modelica.Electrical.Analog.Sources.TrapezoidVoltage Modelica.Electrical.Analog.Sources.TrapezoidVoltage

Trapezoidal voltage source

Modelica.Electrical.Analog.Sources.TrapezoidVoltage

Information


This voltage source uses the coresponding 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).

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model TrapezoidVoltage "Trapezoidal voltage source"
  parameter SI.Voltage V(start=1) "Amplitude of trapezoid";
  parameter SI.Time rising(final min=0, start=0) "Rising duration of trapezoid";
  parameter SI.Time width(final min=0, start=0.5) "Width duration of trapezoid";
  parameter SI.Time falling(final min=0, start=0) 
    "Falling duration of trapezoid";
  parameter SI.Time period(final min=Modelica.Constants.small, start=1) 
    "Time for one period";
  parameter Integer nperiod(start=-1) 
    "Number of periods (< 0 means infinite number of periods)";
  extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Trapezoid
                                        signalSource(
      amplitude=V,
      rising=rising,
      width=width,
      falling=falling,
      period=period,
      nperiod=nperiod));
end TrapezoidVoltage;

Modelica.Electrical.Analog.Sources.TableVoltage Modelica.Electrical.Analog.Sources.TableVoltage

Voltage source by linear interpolation in a table

Modelica.Electrical.Analog.Sources.TableVoltage

Information


This voltage source uses the coresponding 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 proporties:

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

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model TableVoltage 
  "Voltage source by linear interpolation in a table"
  parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] 
    "Table matrix (time = first column, voltage = second column)";
  extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.TimeTable
                                        signalSource(                                       table=
         table));
end TableVoltage;

Modelica.Electrical.Analog.Sources.SignalCurrent Modelica.Electrical.Analog.Sources.SignalCurrent

Generic current source using the input signal as source current

Modelica.Electrical.Analog.Sources.SignalCurrent

Information


The signall current source is a parameterless converter of real valued signals into a the source currrent. 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

Modelica definition

model SignalCurrent 
  "Generic current source using the input signal as source current"

  Interfaces.PositivePin p;
  Interfaces.NegativePin n;
  SI.Voltage v "Voltage drop between the two pins (= p.v - n.v)";
  Modelica.Blocks.Interfaces.RealInput i 
    "Current flowing from pin p to pin n as input signal";
equation 
  v = p.v - n.v;
  0 = p.i + n.i;
  i = p.i;
end SignalCurrent;

Modelica.Electrical.Analog.Sources.ConstantCurrent Modelica.Electrical.Analog.Sources.ConstantCurrent

Source for constant current

Modelica.Electrical.Analog.Sources.ConstantCurrent

Information


The ConstantCurrrent 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, th currend flow will never end.

Extends from Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).

Parameters

TypeNameDefaultDescription
CurrentI Value of constant current [A]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model ConstantCurrent "Source for constant current"
  parameter SI.Current I(start=1) "Value of constant current";
  extends Interfaces.OnePort;
equation 
  i = I;
end ConstantCurrent;

Modelica.Electrical.Analog.Sources.StepCurrent Modelica.Electrical.Analog.Sources.StepCurrent

Step current source

Modelica.Electrical.Analog.Sources.StepCurrent

Information


This current source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
CurrentI Height of step [A]
Currentoffset0Current offset [A]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model StepCurrent "Step current source"
  parameter SI.Current I(start=1) "Height of step";
  extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Step
      signalSource( height=I));
end StepCurrent;

Modelica.Electrical.Analog.Sources.RampCurrent Modelica.Electrical.Analog.Sources.RampCurrent

Ramp current source

Modelica.Electrical.Analog.Sources.RampCurrent

Information


This current source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
CurrentI Height of ramp [A]
Timeduration Duration of ramp [s]
Currentoffset0Current offset [A]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model RampCurrent "Ramp current source"
  parameter SI.Current I(start=1) "Height of ramp";
  parameter SI.Time duration(min=Modelica.Constants.small, start=2) 
    "Duration of ramp";
  extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Ramp
      signalSource(final height=I, final duration=duration));
end RampCurrent;

Modelica.Electrical.Analog.Sources.SineCurrent Modelica.Electrical.Analog.Sources.SineCurrent

Sine current source

Modelica.Electrical.Analog.Sources.SineCurrent

Information


This current source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
CurrentI Amplitude of sine wave [A]
Anglephase0Phase of sine wave [rad]
FrequencyfreqHz Frequency of sine wave [Hz]
Currentoffset0Current offset [A]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model SineCurrent "Sine current source"
  parameter SI.Current I(start=1) "Amplitude of sine wave";
  parameter SI.Angle phase=0 "Phase of sine wave";
  parameter SI.Frequency freqHz(start=1) "Frequency of sine wave";
  extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Sine
      signalSource(
      amplitude=I,
      freqHz=freqHz,
      phase=phase));

end SineCurrent;

Modelica.Electrical.Analog.Sources.ExpSineCurrent Modelica.Electrical.Analog.Sources.ExpSineCurrent

Exponentially damped sine current source

Modelica.Electrical.Analog.Sources.ExpSineCurrent

Information


This current source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
RealI Amplitude of sine wave
FrequencyfreqHz Frequency of sine wave [Hz]
Anglephase0Phase of sine wave [rad]
Dampingdamping Damping coefficient of sine wave [s-1]
Currentoffset0Current offset [A]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model ExpSineCurrent "Exponentially damped sine current source"
  parameter Real I(start=1) "Amplitude of sine wave";
  parameter SI.Frequency freqHz(start=2) "Frequency of sine wave";
  parameter SI.Angle phase=0 "Phase of sine wave";
  parameter SI.Damping damping(start=1) "Damping coefficient of sine wave";
  extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.ExpSine
      signalSource(
      amplitude=I,
      freqHz=freqHz,
      phase=phase,
      damping=damping));
end ExpSineCurrent;

Modelica.Electrical.Analog.Sources.ExponentialsCurrent Modelica.Electrical.Analog.Sources.ExponentialsCurrent

Rising and falling exponential current source

Modelica.Electrical.Analog.Sources.ExponentialsCurrent

Information


This current source uses the coresponding 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).

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model ExponentialsCurrent 
  "Rising and falling exponential current source"
  parameter Real iMax(start=1) "Upper bound for rising edge";
  parameter SI.Time riseTime(min=0, start=0.5) "Rise time";
  parameter SI.Time riseTimeConst(min=Modelica.Constants.small, start=0.1) 
    "Rise time constant";
  parameter SI.Time fallTimeConst(min=Modelica.Constants.small, start=riseTimeConst) 
    "Fall time constant";
  extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Exponentials
                                           signalSource(
      outMax=iMax,
      riseTime=riseTime,
      riseTimeConst=riseTimeConst,
      fallTimeConst=fallTimeConst));
end ExponentialsCurrent;

Modelica.Electrical.Analog.Sources.PulseCurrent Modelica.Electrical.Analog.Sources.PulseCurrent

Pulse current source

Modelica.Electrical.Analog.Sources.PulseCurrent

Information


This current source uses the coresponding 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).

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model PulseCurrent "Pulse current source"
  parameter SI.Current I(start=1) "Amplitude of pulse";
  parameter Real width(
    final min=Modelica.Constants.small,
    final max=100, start=50) "Width of pulse in % of period";
  parameter SI.Time period(final min=Modelica.Constants.small, start=1) 
    "Time for one period";
  extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Pulse
      signalSource(
      amplitude=I,
      width=width,
      period=period));
end PulseCurrent;

Modelica.Electrical.Analog.Sources.SawToothCurrent Modelica.Electrical.Analog.Sources.SawToothCurrent

Saw tooth current source

Modelica.Electrical.Analog.Sources.SawToothCurrent

Information


This current source uses the coresponding 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).

Parameters

TypeNameDefaultDescription
CurrentI Amplitude of saw tooth [A]
Timeperiod Time for one period [s]
Currentoffset0Current offset [A]
TimestartTime0Time offset [s]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model SawToothCurrent "Saw tooth current source"
  parameter SI.Current I(start=1) "Amplitude of saw tooth";
  parameter SI.Time period(start=1) "Time for one period";
  extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.SawTooth
      signalSource(
        amplitude=I, period=period));
end SawToothCurrent;

Modelica.Electrical.Analog.Sources.TrapezoidCurrent Modelica.Electrical.Analog.Sources.TrapezoidCurrent

Trapezoidal current source

Modelica.Electrical.Analog.Sources.TrapezoidCurrent

Information


This current source uses the coresponding 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).

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model TrapezoidCurrent "Trapezoidal current source"
  parameter SI.Current I(start=1) "Amplitude of trapezoid";
  parameter SI.Time rising(final min=0, start=0) "Rising duration of trapezoid";
  parameter SI.Time width(final min=0, start=0.5) "Width duration of trapezoid";
  parameter SI.Time falling(final min=0, start=0) 
    "Falling duration of trapezoid";
  parameter SI.Time period(final min=Modelica.Constants.small, start=1) 
    "Time for one period";
  parameter Integer nperiod(start=-1) 
    "Number of periods (< 0 means infinite number of periods)";
  extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Trapezoid
                                        signalSource(
      amplitude=I,
      rising=rising,
      width=width,
      falling=falling,
      period=period,
      nperiod=nperiod));
end TrapezoidCurrent;

Modelica.Electrical.Analog.Sources.TableCurrent Modelica.Electrical.Analog.Sources.TableCurrent

Current source by linear interpolation in a table

Modelica.Electrical.Analog.Sources.TableCurrent

Information


This current source uses the coresponding 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 proporties:

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

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model TableCurrent 
  "Current source by linear interpolation in a table"
  parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] 
    "Table matrix (time = first column, current = second column)";
  extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.TimeTable
                                        signalSource(
                   table = table));
end TableCurrent;

Automatically generated Fri Nov 12 16:28:19 2010.