Time dependent SPICE3 voltage and current sources
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).
Name | Description |
---|---|
V_constant | Constant independent voltage sources |
V_sin | Sinusoidal voltage source |
V_exp | Exponential voltage source |
V_pulse | Pulse voltage source |
V_pwl | Piece-wise linear voltage source |
V_sffm | Single-frequency FM voltage source |
I_constant | Constant independent current sources |
I_sin | Sinusoidal current source |
I_exp | Exponential current source |
I_pulse | Pulse current source |
I_pwl | Piece-wise linear current source |
I_sffm | Single-frequency FM current source |
Constant independent voltage sources
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).
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 |
Sinusoidal voltage source
Damped sinusoidal source
Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
VO | Offset [V] |
VA | Amplitude [V] |
FREQ | Frequency [Hz] |
TD | Delay [s] |
THETA | Damping factor [s-1] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Exponential voltage source
Rising and falling exponential source.
Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
V1 | Initial value [V] |
V2 | Pulsed value [V] |
TD1 | Rise delay time [s] |
TAU1 | Rise time constant [s] |
TD2 | Fall delay time [s] |
TAU2 | Fall time constant [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Pulse voltage source
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 |
Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
V1 | Initial value [V] |
V2 | Pulsed value [V] |
TD | Delay time [s] |
TR | Rise time [s] |
TF | Fall time [s] |
PW | Pulse width [s] |
PER | Period [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Piece-wise linear voltage source
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).
Name | Description |
---|---|
table[:, :] | Table matrix (time = first column, voltage = second column) |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Single-frequency FM voltage source
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.
Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
VO | Offset [V] |
VA | Amplitude [V] |
FC | Carrier frequency [Hz] |
MDI | Modulation index |
FS | Signal frequency [Hz] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Constant independent current sources
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).
Name | Description |
---|---|
I | Value of constant voltage [A] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Sinusoidal current source
Damped sinusoidal source
Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
IO | Offset [A] |
IA | Amplitude [A] |
FREQ | Frequency [Hz] |
TD | Delay [s] |
THETA | Damping factor [s-1] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Exponential current source
Rising and falling exponential source.
Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
I1 | Initial value [A] |
I2 | Pulsed value [A] |
TD1 | Rise delay time [s] |
TAU1 | Rise time constant [s] |
TD2 | Fall delay time [s] |
TAU2 | Fall time constant [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Pulse current source
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 |
Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
I1 | Initial value [A] |
I2 | Pulsed value [A] |
TD | Delay time [s] |
TR | Rise time [s] |
TF | Fall time [s] |
PW | Pulse width [s] |
PER | Period [s] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Piece-wise linear current source
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).
Name | Description |
---|---|
table[:, :] | Table matrix (time = first column, voltage = second column) |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |
Single-frequency FM current source
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.
Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Name | Description |
---|---|
IO | Offset [A] |
IA | Amplitude [A] |
FC | Carrier frequency [Hz] |
MDI | Modulation index |
FS | Signal frequency [Hz] |
Name | Description |
---|---|
p | Positive pin (potential p.v > n.v for positive voltage drop v) |
n | Negative pin |