Package Modelica.​Electrical.​Spice3.​Sources
Time dependent SPICE3 voltage and current sources

Information

This package contains the SPICE sources.

Note: There are differences between SPICE3 and Modelica concerning the default values of the parameter. Therefore it is recommended to specify all parameters of the source.

Extends from Modelica.​Icons.​SourcesPackage (Icon for packages containing sources).

Package Contents

NameDescription
I_constantConstant independent current sources
I_expExponential current source
I_pulsePulse current source
I_pwlPiece-wise linear current source
I_sffmSingle-frequency FM current source
I_sinSinusoidal current source
V_constantConstant independent voltage sources
V_expExponential voltage source
V_pulsePulse voltage source
V_pwlPiece-wise linear voltage source
V_sffmSingle-frequency FM voltage source
V_sinSinusoidal voltage source

Model Modelica.​Electrical.​Spice3.​Sources.​V_constant
Constant independent voltage sources

Information

The V_constant source is a source is a simple constant voltage source for an ideal constant voltage which is provided by a parameter.

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

Parameters

TypeNameDefaultDescription
VoltageV1Value of constant voltage

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​V_sin
Sinusoidal voltage source

Information

Damped sinusoidal source

Note:

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

Parameters

TypeNameDefaultDescription
VoltageVO0Offset
VoltageVA0Amplitude
FrequencyFREQ Frequency
TimeTD0Delay
DampingTHETA0Damping factor

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​V_exp
Exponential voltage source

Information

Rising and falling exponential source.

Note:

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

Parameters

TypeNameDefaultDescription
VoltageV10Initial value
VoltageV20Pulsed value
TimeTD10Rise delay time
TimeTAU11Rise time constant
TimeTD21Fall delay time
TimeTAU21Fall time constant

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​V_pulse
Pulse voltage source

Information

Periodic pulse source with not limited number of periods.

A single pulse is described by the following table:

time

value

0

V1

TD

V1

TD+TR

V2

TD+TR+PW

V2

TD+TR+PW+TF

V1

TSTOP

V1

Intermediate points are determined by linear interpolation.

A pulse it looks like a saw tooth, use this parameters e.g.:

Parameter

Value

V1

0

V2

1

TD

0

TR

1

TF

1

PW

2

PER

1

Note:

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

Parameters

TypeNameDefaultDescription
VoltageV10Initial value
VoltageV20Pulsed value
TimeTD0Delay time
TimeTR Rise time
TimeTFTRFall time
TimePWModelica.​Constants.​infPulse width
TimePERModelica.​Constants.​infPeriod

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​V_pwl
Piece-wise linear voltage source

Information

This model generates a voltage by linear interpolation in a given 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).

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

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​V_sffm
Single-frequency FM voltage source

Information

The single-frequency frequency modulation source generates a carrier signal of the frequency FC. This signal is modulated by the signal frequency FS. See the formula in the Modelica text.

Attention:

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

Parameters

TypeNameDefaultDescription
VoltageVO0Offset
VoltageVA0Amplitude
FrequencyFC Carrier frequency
RealMDI0Modulation index
FrequencyFSFCSignal frequency

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​I_constant
Constant independent current sources

Information

The I_constant source is a simple constant current source for an ideal constant current which is provided by a parameter.

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

Parameters

TypeNameDefaultDescription
CurrentI1Value of constant voltage

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​I_sin
Sinusoidal current source

Information

Damped sinusoidal source

Note:

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

Parameters

TypeNameDefaultDescription
CurrentIO0Offset
CurrentIA0Amplitude
FrequencyFREQ Frequency
TimeTD0Delay
DampingTHETA0Damping factor

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​I_exp
Exponential current source

Information

Rising and falling exponential source.

Note:

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

Parameters

TypeNameDefaultDescription
CurrentI10Initial value
CurrentI20Pulsed value
TimeTD10Rise delay time
TimeTAU11Rise time constant
TimeTD22Fall delay time
TimeTAU21Fall time constant

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​I_pulse
Pulse current source

Information

Periodic pulse source with not limited number of periods.

A single pulse is described by the following table:

time

value

0

I1

TD

I1

TD+TR

I2

TD+TR+PW

I2

TD+TR+PW+TF

I1

TSTOP

I1

Intermediate points are determined by linear interpolation.

A pulse it looks like a saw tooth, use this parameters e.g.:

Parameter

Value

I1

0

I2

1

TD

0

TR

1

TF

1

PW

2

PER

1

Note:

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

Parameters

TypeNameDefaultDescription
CurrentI10Initial value
CurrentI20Pulsed value
TimeTD0Delay time
TimeTR Rise time
TimeTFTRFall time
TimePWModelica.​Constants.​infPulse width
TimePERModelica.​Constants.​infPeriod

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​I_pwl
Piece-wise linear current source

Information

This model generates a current by linear interpolation in a given 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).

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

Parameters

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

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin

Model Modelica.​Electrical.​Spice3.​Sources.​I_sffm
Single-frequency FM current source

Information

The single-frequency frequency modulation source generates a carrier signal of the frequency FC. This signal is modulated by the signal frequency FS. See the formula in the Modelica text.

Note:

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

Parameters

TypeNameDefaultDescription
CurrentIO0Offset
CurrentIA0Amplitude
FrequencyFC Carrier frequency
RealMDI0Modulation index
FrequencyFSFCSignal frequency

Connectors

TypeNameDescription
PositivePinpPositive electrical pin
NegativePinnNegative electrical pin