Modelica.Electrical.Analog.Sources

Modelica.Electrical.Analog.Sources.SignalVoltage Modelica.Electrical.Analog.Sources.ConstantVoltage Modelica.Electrical.Analog.Sources.StepVoltage Modelica.Electrical.Analog.Sources.RampVoltage Modelica.Electrical.Analog.Sources.SineVoltage Modelica.Electrical.Analog.Sources.ExpSineVoltage Modelica.Electrical.Analog.Sources.ExponentialsVoltage Modelica.Electrical.Analog.Sources.PulseVoltage Modelica.Electrical.Analog.Sources.SawToothVoltage Modelica.Electrical.Analog.Sources.TrapezoidVoltage Modelica.Electrical.Analog.Sources.TableVoltage Modelica.Electrical.Analog.Sources.SignalCurrent Modelica.Electrical.Analog.Sources.ConstantCurrent Modelica.Electrical.Analog.Sources.StepCurrent Modelica.Electrical.Analog.Sources.RampCurrent Modelica.Electrical.Analog.Sources.SineCurrent Modelica.Electrical.Analog.Sources.ExpSineCurrent Modelica.Electrical.Analog.Sources.ExponentialsCurrent Modelica.Electrical.Analog.Sources.PulseCurrent Modelica.Electrical.Analog.Sources.SawToothCurrent Modelica.Electrical.Analog.Sources.TrapezoidCurrent Modelica.Electrical.Analog.Sources.TableCurrent

Information


This package contains time-dependend and controlled voltage and current sources.

Main Authors:
Christoph Clauß <clauss@eas.iis.fhg.de>
André Schneider <schneider@eas.iis.fhg.de>
Fraunhofer Institute for Integrated Circuits
Design Automation Department
Zeunerstraße 38
D-01069 Dresden

Version:
$Id: Modelica_Electrical_Analog_Sources.html 12 2004-08-18 15:45:34Z Dag $

Copyright:
Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions and the accompanying disclaimer in the documentation of package Modelica in file "Modelica/package.mo".

NameDescription
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
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
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


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

Trapezoidal voltage source

Modelica.Electrical.Analog.Sources.TrapezoidVoltage

Parameters

NameDefaultDescription
V1Amplitude of trapezoid [V]
rising0Rising duration of trapezoid [s]
width0.5Width duration of trapezoid [s]
falling0Falling duration of trapezoid [s]
period1Time for one period [s]
nperiod-1Number of periods (< 0 means infinite number of periods)
offset0Voltage offset [V]
startTime0Time offset [s]

Modelica definition

model TrapezoidVoltage "Trapezoidal voltage source" 
  parameter SI.Voltage V =      1 "Amplitude of trapezoid";
  parameter SI.Time rising(       final min=0) = 0 "Rising duration of trapezoid";
  parameter SI.Time width(       final min=0) = 0.5 "Width duration of trapezoid";
  parameter SI.Time falling(       final min=0) = 0 "Falling duration of trapezoid";
  parameter SI.Time period(       final min=Modelica.Constants.small) = 1 
    "Time for one period";
  parameter Integer nperiod=-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.SineVoltage Modelica.Electrical.Analog.Sources.SineVoltage

Sine voltage source

Modelica.Electrical.Analog.Sources.SineVoltage

Parameters

NameDefaultDescription
V1Amplitude of sine wave [V]
phase0Phase of sine wave [rad]
freqHz1Frequency of sine wave [Hz]
offset0Voltage offset [V]
startTime0Time offset [s]

Modelica definition

model SineVoltage "Sine voltage source" 
  parameter SI.Voltage V =      1 "Amplitude of sine wave";
  parameter SI.Angle phase =      0 "Phase of sine wave";
  parameter SI.Frequency freqHz =      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

Parameters

NameDefaultDescription
V1Amplitude of sine wave [V]
freqHz2Frequency of sine wave [Hz]
phase0Phase of sine wave [rad]
damping1Damping coefficient of sine wave [s-1]
offset0Voltage offset [V]
startTime0Time offset [s]

Modelica definition

model ExpSineVoltage "Exponentially damped sine voltage source" 
  parameter SI.Voltage V =      1 "Amplitude of sine wave";
  parameter SI.Frequency freqHz =      2 "Frequency of sine wave";
  parameter SI.Angle phase =      0 "Phase of sine wave";
  parameter SI.Damping damping =      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.RampVoltage Modelica.Electrical.Analog.Sources.RampVoltage

Ramp voltage source

Modelica.Electrical.Analog.Sources.RampVoltage

Parameters

NameDefaultDescription
V1Height of ramp [V]
duration2Duration of ramp [s]
offset0Voltage offset [V]
startTime0Time offset [s]

Modelica definition

model RampVoltage "Ramp voltage source" 
  parameter SI.Voltage V =      1 "Height of ramp";
  parameter SI.Time duration(       min=Modelica.Constants.small) = 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.RampCurrent Modelica.Electrical.Analog.Sources.RampCurrent

Ramp current source

Modelica.Electrical.Analog.Sources.RampCurrent

Parameters

NameDefaultDescription
I1Height of ramp [A]
duration2Duration of ramp [s]
offset0Current offset [A]
startTime0Time offset [s]

Modelica definition

model RampCurrent "Ramp current source" 
  parameter SI.Current I =      1 "Height of ramp";
  parameter SI.Time duration(       min=Modelica.Constants.small) = 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.SignalCurrent Modelica.Electrical.Analog.Sources.SignalCurrent

Generic current source using the input signal as source current

Modelica.Electrical.Analog.Sources.SignalCurrent

Modelica definition

model SignalCurrent 
  "Generic current source using the input signal as source current" 
  extends Interfaces.OnePort;
  
  Modelica.Blocks.Interfaces.InPort inPort(
                                           final n=1);
equation 
  i = inPort.signal[1];
end SignalCurrent;

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

Modelica definition

model SignalVoltage 
  "Generic voltage source using the input signal as source voltage" 
  extends Interfaces.OnePort;
  
  Modelica.Blocks.Interfaces.InPort inPort(
                                           final n=1);
equation 
  inPort.signal[1] = v;
end SignalVoltage;

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

Source for constant voltage

Modelica.Electrical.Analog.Sources.ConstantVoltage

Parameters

NameDefaultDescription
V1Value of constant voltage [V]

Modelica definition

model ConstantVoltage "Source for constant voltage" 
  parameter SI.Voltage V =      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

Parameters

NameDefaultDescription
V1Height of step [V]
offset0Voltage offset [V]
startTime0Time offset [s]

Modelica definition

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

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

Rising and falling exponential voltage source

Modelica.Electrical.Analog.Sources.ExponentialsVoltage

Parameters

NameDefaultDescription
vMax1Upper bound for rising edge
riseTime0.5Rise time [s]
riseTimeConst0.1Rise time constant [s]
fallTimeConstriseTimeConstFall time constant [s]
offset0Voltage offset [V]
startTime0Time offset [s]

Modelica definition

model ExponentialsVoltage 
  " Rising and falling exponential voltage source" 
  parameter Real vMax=1 "Upper bound for rising edge";
  parameter SI.Time riseTime(       min=0) = 0.5 "Rise time";
  parameter SI.Time riseTimeConst(       min=Modelica.Constants.small) = 0.1 
    "Rise time constant";
  parameter SI.Time fallTimeConst(       min=Modelica.Constants.small) = 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

Parameters

NameDefaultDescription
V1Amplitude of pulse [V]
width50Width of pulse in % of period
period1Time for one period [s]
offset0Voltage offset [V]
startTime0Time offset [s]

Modelica definition

model PulseVoltage "Pulse voltage source" 
  parameter SI.Voltage V =      1 "Amplitude of pulse";
  parameter Real width(
    final min=Modelica.Constants.small,
    final max=100) = 50 "Width of pulse in % of period";
  parameter SI.Time period(       final min=Modelica.Constants.small) = 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

Parameters

NameDefaultDescription
V1Amplitude of saw tooth [V]
period1Time for one period [s]
offset0Voltage offset [V]
startTime0Time offset [s]

Modelica definition

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

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

Parameters

NameDefaultDescription
table[:, :][0, 0; 1, 1; 2, 4]Table matrix (time = first column, voltage = second column)
offset0Voltage offset [V]
startTime0Time offset [s]

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.ConstantCurrent Modelica.Electrical.Analog.Sources.ConstantCurrent

Source for constant current

Modelica.Electrical.Analog.Sources.ConstantCurrent

Parameters

NameDefaultDescription
I1Value of constant current [A]

Modelica definition

model ConstantCurrent "Source for constant current" 
  parameter SI.Current I =      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

Parameters

NameDefaultDescription
I1Height of step [A]
offset0Current offset [A]
startTime0Time offset [s]

Modelica definition

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

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

Sine current source

Modelica.Electrical.Analog.Sources.SineCurrent

Parameters

NameDefaultDescription
I1Amplitude of sine wave [A]
phase0Phase of sine wave [rad]
freqHz1Frequency of sine wave [Hz]
offset0Current offset [A]
startTime0Time offset [s]

Modelica definition

model SineCurrent "Sine current source" 
  parameter SI.Current I =      1 "Amplitude of sine wave";
  parameter SI.Angle phase =      0 "Phase of sine wave";
  parameter SI.Frequency freqHz =      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

Parameters

NameDefaultDescription
I1Amplitude of sine wave
freqHz2Frequency of sine wave [Hz]
phase0Phase of sine wave [rad]
damping1Damping coefficient of sine wave [s-1]
offset0Current offset [A]
startTime0Time offset [s]

Modelica definition

model ExpSineCurrent "Exponentially damped sine current source" 
  parameter Real I=1 "Amplitude of sine wave";
  parameter SI.Frequency freqHz =      2 "Frequency of sine wave";
  parameter SI.Angle phase =      0 "Phase of sine wave";
  parameter SI.Damping damping =      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

Parameters

NameDefaultDescription
iMax1Upper bound for rising edge
riseTime0.5Rise time [s]
riseTimeConst0.1Rise time constant [s]
fallTimeConstriseTimeConstFall time constant [s]
offset0Current offset [A]
startTime0Time offset [s]

Modelica definition

model ExponentialsCurrent 
  " Rising and falling exponential current source" 
  parameter Real iMax=1 "Upper bound for rising edge";
  parameter SI.Time riseTime(       min=0) = 0.5 "Rise time";
  parameter SI.Time riseTimeConst(       min=Modelica.Constants.small) = 0.1 
    "Rise time constant";
  parameter SI.Time fallTimeConst(       min=Modelica.Constants.small) = 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

Parameters

NameDefaultDescription
I1Amplitude of pulse [A]
width50Width of pulse in % of period
period1Time for one period [s]
offset0Current offset [A]
startTime0Time offset [s]

Modelica definition

model PulseCurrent "Pulse current source" 
  parameter SI.Current I =      1 "Amplitude of pulse";
  parameter Real width(
    final min=Modelica.Constants.small,
    final max=100) = 50 "Width of pulse in % of period";
  parameter SI.Time period(       final min=Modelica.Constants.small) = 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

Parameters

NameDefaultDescription
I1Amplitude of saw tooth [A]
period1Time for one period [s]
offset0Current offset [A]
startTime0Time offset [s]

Modelica definition

model SawToothCurrent "Saw tooth current source" 
  parameter SI.Current I =      1 "Amplitude of saw tooth";
  parameter SI.Time period =      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

Parameters

NameDefaultDescription
I1Amplitude of trapezoid [A]
rising0Rising duration of trapezoid [s]
width0.5Width duration of trapezoid [s]
falling0Falling duration of trapezoid [s]
period1Time for one period [s]
nperiod-1Number of periods (< 0 means infinite number of periods)
offset0Current offset [A]
startTime0Time offset [s]

Modelica definition

model TrapezoidCurrent "Trapezoidal current source" 
  parameter SI.Current I =      1 "Amplitude of trapezoid";
  parameter SI.Time rising(       final min=0) = 0 "Rising duration of trapezoid";
  parameter SI.Time width(       final min=0) = 0.5 "Width duration of trapezoid";
  parameter SI.Time falling(       final min=0) = 0 "Falling duration of trapezoid";
  parameter SI.Time period(       final min=Modelica.Constants.small) = 1 
    "Time for one period";
  parameter Integer nperiod=-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 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).

Parameters

NameDefaultDescription
table[:, :][0, 0; 1, 1; 2, 4]Table matrix (time = first column, current = second column)
offset0Current offset [A]
startTime0Time offset [s]

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;

HTML-documentation generated by Dymola Wed Jun 30 17:43:47 2004 .