Modelica.Electrical.Analog.Basic

Basic electrical components

Information


This package contains very basic analog electrical components such as resistor, conductor, condensator, inductor, and the ground (which is needed in each electrical circuit description. Furthermore, controlled sources, coupling components, and some improved (but nevertheless basic) are in this package.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

NameDescription
Modelica.Electrical.Analog.Basic.Ground Ground Ground node
Modelica.Electrical.Analog.Basic.Resistor Resistor Ideal linear electrical resistor
Modelica.Electrical.Analog.Basic.HeatingResistor HeatingResistor Temperature dependent electrical resistor
Modelica.Electrical.Analog.Basic.Conductor Conductor Ideal linear electrical conductor
Modelica.Electrical.Analog.Basic.Capacitor Capacitor Ideal linear electrical capacitor
Modelica.Electrical.Analog.Basic.Inductor Inductor Ideal linear electrical inductor
Modelica.Electrical.Analog.Basic.SaturatingInductor SaturatingInductor Simple model of an inductor with saturation
Modelica.Electrical.Analog.Basic.Transformer Transformer Transformer with two ports
Modelica.Electrical.Analog.Basic.M_Transformer M_Transformer Generic transformer with free number of inductors
Modelica.Electrical.Analog.Basic.Gyrator Gyrator Gyrator
Modelica.Electrical.Analog.Basic.EMF EMF Electromotoric force (electric/mechanic transformer)
Modelica.Electrical.Analog.Basic.TranslationalEMF TranslationalEMF Electromotoric force (electric/mechanic transformer)
Modelica.Electrical.Analog.Basic.VCV VCV Linear voltage-controlled voltage source
Modelica.Electrical.Analog.Basic.VCC VCC Linear voltage-controlled current source
Modelica.Electrical.Analog.Basic.CCV CCV Linear current-controlled voltage source
Modelica.Electrical.Analog.Basic.CCC CCC Linear current-controlled current source
Modelica.Electrical.Analog.Basic.OpAmp OpAmp Simple nonideal model of an OpAmp with limitation
Modelica.Electrical.Analog.Basic.OpAmpDetailed OpAmpDetailed Detailed model of an operational amplifier
Modelica.Electrical.Analog.Basic.VariableResistor VariableResistor Ideal linear electrical resistor with variable resistance
Modelica.Electrical.Analog.Basic.VariableConductor VariableConductor Ideal linear electrical conductor with variable conductance
Modelica.Electrical.Analog.Basic.VariableCapacitor VariableCapacitor Ideal linear electrical capacitor with variable capacitance
Modelica.Electrical.Analog.Basic.VariableInductor VariableInductor Ideal linear electrical inductor with variable inductance

Modelica.Electrical.Analog.Basic.Ground Modelica.Electrical.Analog.Basic.Ground

Ground node

Information


Ground of an electrical circuit. The potential at the ground node is zero. Every electrical circuit has to contain at least one ground object.

Connectors

NameDescription
p 

Modelica.Electrical.Analog.Basic.Resistor Modelica.Electrical.Analog.Basic.Resistor

Ideal linear electrical resistor

Information


The linear resistor connects the branch voltage v with the branch current i by i*R = v. The Resistance R is allowed to be positive, zero, or negative.

Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n), Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network).

Parameters

NameDescription
RResistance at temperature T_ref [Ohm]
T_refReference temperature [K]
alphaTemperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref)) [1/K]
useHeatPort=true, if HeatPort is enabled
TFixed device temperature if useHeatPort = false [K]

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin
heatPort 

Modelica.Electrical.Analog.Basic.HeatingResistor Modelica.Electrical.Analog.Basic.HeatingResistor

Temperature dependent electrical resistor

Information


This is a model for an electrical resistor where the generated heat is dissipated to the environment via connector heatPort and where the resistance R is temperature dependent according to the following equation:

    R = R_ref*(1 + alpha*(heatPort.T - T_ref))

alpha is the temperature coefficient of resistance, which is often abbreviated as TCR. In resistor catalogues, it is usually defined as X [ppm/K] (parts per million, similarly to percentage) meaning X*1.e-6 [1/K]. Resistors are available for 1 .. 7000 ppm/K, i.e., alpha = 1e-6 .. 7e-3 1/K;

Via parameter useHeatPort the heatPort connector can be enabled and disabled (default = enabled). If it is disabled, the generated heat is transported implicitly to an internal temperature source with a fixed temperature of T_ref.

If the heatPort connector is enabled, it must be connected.

Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n), Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network).

Parameters

NameDescription
R_refResistance at temperature T_ref [Ohm]
T_refReference temperature [K]
alphaTemperature coefficient of resistance (R = R_ref*(1 + alpha*(heatPort.T - T_ref)) [1/K]
useHeatPort=true, if HeatPort is enabled
TFixed device temperature if useHeatPort = false [K]

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin
heatPort 

Modelica.Electrical.Analog.Basic.Conductor Modelica.Electrical.Analog.Basic.Conductor

Ideal linear electrical conductor

Information


The linear conductor connects the branch voltage v with the branch current i by i = v*G. The Conductance G is allowed to be positive, zero, or negative.

Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n), Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network).

Parameters

NameDescription
GConductance at temperature T_ref [S]
T_refReference temperature [K]
alphaTemperature coefficient of conductance (G_actual = G_ref/(1 + alpha*(T_heatPort - T_ref)) [1/K]
useHeatPort=true, if HeatPort is enabled
TFixed device temperature if useHeatPort = false [K]

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin
heatPort 

Modelica.Electrical.Analog.Basic.Capacitor Modelica.Electrical.Analog.Basic.Capacitor

Ideal linear electrical capacitor

Information


The linear capacitor connects the branch voltage v with the branch current i by i = C * dv/dt. The Capacitance C is allowed to be positive or zero.

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

Parameters

NameDescription
CCapacitance [F]

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin

Modelica.Electrical.Analog.Basic.Inductor Modelica.Electrical.Analog.Basic.Inductor

Ideal linear electrical inductor

Information


The linear inductor connects the branch voltage v with the branch current i by v = L * di/dt. The Inductance L is allowed to be positive, or zero.

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

Parameters

NameDescription
LInductance [H]

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin

Modelica.Electrical.Analog.Basic.SaturatingInductor Modelica.Electrical.Analog.Basic.SaturatingInductor

Simple model of an inductor with saturation

Information


This model approximates the behaviour of an inductor with the influence of saturation, i.e., the value of the inductance depends on the current flowing through the inductor. The inductance decreases as current increases.

The parameters are:

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

Parameters

NameDescription
InomNominal current [A]
LnomNominal inductance at Nominal current [H]
LzerInductance near current=0 [H]
LinfInductance at large currents [H]

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin

Modelica.Electrical.Analog.Basic.Transformer Modelica.Electrical.Analog.Basic.Transformer

Transformer with two ports

Information


The transformer is a two port. The left port voltage v1, left port current i1, right port voltage v2 and right port current i2 are connected by the following relation:

         | v1 |         | L1   M  |  | i1'; |
         |    |    =    |         |  |     |
         | v2 |         | M    L2 |  | i2'; |

L1, L2, and M are the primary, secondary, and coupling inductances respectively.

Extends from Interfaces.TwoPort (Component with two electrical ports, including current).

Parameters

NameDescription
L1Primary inductance [H]
L2Secondary inductance [H]
MCoupling inductance [H]

Connectors

NameDescription
p1Positive pin of the left port (potential p1.v > n1.v for positive voltage drop v1)
n1Negative pin of the left port
p2Positive pin of the right port (potential p2.v > n2.v for positive voltage drop v2)
n2Negative pin of the right port

Modelica.Electrical.Analog.Basic.M_Transformer Modelica.Electrical.Analog.Basic.M_Transformer

Generic transformer with free number of inductors

Information


The model M_Transformer is a model of a transformer with the possibility to choose the number of inductors. Inside the model, an inductance matrix is built based on the inductance of the inductors and the coupling inductances between the inductors given as a parameter vector from the user of the model.

An example shows that approach:
The user chooses a model with three inductors, that means the parameter N has to be 3. Then he has to specify the inductances of the three inductors and the three coupling inductances. The coupling inductances are no real existing devices, but effects that occur between two inductors. The inductivities (main diagonal of the inductance matrix) and the coupling inductivities have to be specified in the parameter vector L. The length dimL of the parameter vector is calculated as follows: dimL=(N*(N+1))/2

The following example shows how the parameter vector is used to fill in the inductance matrix. To specify the inductance matrix of a three inductances transformer (N=3):

L_m

the user has to allocate the parameter vector L[6] , since Nv=(N*(N+1))/2=(3*(3+1))/2=6. The parameter vector must be filled like this: L=[1,0.1,0.2,2,0.3,3] .

Inside the model, two loops are used to fill the inductance matrix to guarantee that it is filled in a symmetric way.

Parameters

NameDescription
Nnumber of inductors
L[dimL]inductances and coupling inductances [H]
Lm[N, N][H]

Connectors

NameDescription
p[N]Positive pin
n[N]Negative pin

Modelica.Electrical.Analog.Basic.Gyrator Modelica.Electrical.Analog.Basic.Gyrator

Gyrator

Information


A gyrator is a two-port element defined by the following equations:

    i1 =  G2 * v2
    i2 = -G1 * v1

where the constants G1, G2 are called the gyration conductance.

Extends from Interfaces.TwoPort (Component with two electrical ports, including current).

Parameters

NameDescription
G1Gyration conductance [S]
G2Gyration conductance [S]

Connectors

NameDescription
p1Positive pin of the left port (potential p1.v > n1.v for positive voltage drop v1)
n1Negative pin of the left port
p2Positive pin of the right port (potential p2.v > n2.v for positive voltage drop v2)
n2Negative pin of the right port

Modelica.Electrical.Analog.Basic.EMF Modelica.Electrical.Analog.Basic.EMF

Electromotoric force (electric/mechanic transformer)

Information


EMF transforms electrical energy into rotational mechanical energy. It is used as basic building block of an electrical motor. The mechanical connector flange can be connected to elements of the Modelica.Mechanics.Rotational library. flange.tau is the cut-torque, flange.phi is the angle at the rotational connection.

Parameters

NameDescription
useSupport= true, if support flange enabled, otherwise implicitly grounded
kTransformation coefficient [N.m/A]

Connectors

NameDescription
p 
n 
flange 
supportSupport/housing of emf shaft

Modelica.Electrical.Analog.Basic.TranslationalEMF Modelica.Electrical.Analog.Basic.TranslationalEMF

Electromotoric force (electric/mechanic transformer)

Information


EMF transforms electrical energy into translational mechanical energy. It is used as basic building block of an electrical linear motor. The mechanical connector flange can be connected to elements of the Modelica.Mechanics.Translational library. flange.f is the cut-force, flange.s is the distance at the translational connection.

Parameters

NameDescription
useSupport= true, if support flange enabled, otherwise implicitly grounded
kTransformation coefficient [N/A]

Connectors

NameDescription
p 
n 
flange 
supportSupport/housing

Modelica.Electrical.Analog.Basic.VCV Modelica.Electrical.Analog.Basic.VCV

Linear voltage-controlled voltage source

Information


The linear voltage-controlled voltage source is a TwoPort. The right port voltage v2 is controlled by the left port voltage v1 via

    v2 = v1 * gain. 

The left port current is zero. Any voltage gain can be chosen.

Extends from Interfaces.TwoPort (Component with two electrical ports, including current).

Parameters

NameDescription
gainVoltage gain

Connectors

NameDescription
p1Positive pin of the left port (potential p1.v > n1.v for positive voltage drop v1)
n1Negative pin of the left port
p2Positive pin of the right port (potential p2.v > n2.v for positive voltage drop v2)
n2Negative pin of the right port

Modelica.Electrical.Analog.Basic.VCC Modelica.Electrical.Analog.Basic.VCC

Linear voltage-controlled current source

Information


The linear voltage-controlled current source is a TwoPort. The right port current i2 is controlled by the left port voltage v1 via

    i2 = v1 * transConductance. 

The left port current is zero. Any transConductance can be chosen.

Extends from Interfaces.TwoPort (Component with two electrical ports, including current).

Parameters

NameDescription
transConductanceTransconductance [S]

Connectors

NameDescription
p1Positive pin of the left port (potential p1.v > n1.v for positive voltage drop v1)
n1Negative pin of the left port
p2Positive pin of the right port (potential p2.v > n2.v for positive voltage drop v2)
n2Negative pin of the right port

Modelica.Electrical.Analog.Basic.CCV Modelica.Electrical.Analog.Basic.CCV

Linear current-controlled voltage source

Information


The linear current-controlled voltage source is a TwoPort. The right port voltage v2 is controlled by the left port current i1 via

    v2 = i1 * transResistance. 

The left port voltage is zero. Any transResistance can be chosen.

Extends from Interfaces.TwoPort (Component with two electrical ports, including current).

Parameters

NameDescription
transResistanceTransresistance [Ohm]

Connectors

NameDescription
p1Positive pin of the left port (potential p1.v > n1.v for positive voltage drop v1)
n1Negative pin of the left port
p2Positive pin of the right port (potential p2.v > n2.v for positive voltage drop v2)
n2Negative pin of the right port

Modelica.Electrical.Analog.Basic.CCC Modelica.Electrical.Analog.Basic.CCC

Linear current-controlled current source

Information


The linear current-controlled current source is a TwoPort. The right port current i2 is controlled by the left port current i1 via

    i2 = i1 * gain. 

The left port voltage is zero. Any current gain can be chosen.

Extends from Interfaces.TwoPort (Component with two electrical ports, including current).

Parameters

NameDescription
gainCurrent gain

Connectors

NameDescription
p1Positive pin of the left port (potential p1.v > n1.v for positive voltage drop v1)
n1Negative pin of the left port
p2Positive pin of the right port (potential p2.v > n2.v for positive voltage drop v2)
n2Negative pin of the right port

Modelica.Electrical.Analog.Basic.OpAmp Modelica.Electrical.Analog.Basic.OpAmp

Simple nonideal model of an OpAmp with limitation

Information


The OpAmp is a simple nonideal model with a smooth out.v = f(vin) characteristic, where "vin = in_p.v - in_n.v". The characteristic is limited by VMax.v and VMin.v. Its slope at vin=0 is the parameter Slope, which must be positive. (Therefore, the absolute value of Slope is taken into calculation.)

Parameters

NameDescription
SlopeSlope of the out.v/vin characteristic at vin=0

Connectors

NameDescription
in_pPositive pin of the input port
in_nNegative pin of the input port
outOutput pin
VMaxPositive output voltage limitation
VMinNegative output voltage limitation

Modelica.Electrical.Analog.Basic.OpAmpDetailed Modelica.Electrical.Analog.Basic.OpAmpDetailed

Detailed model of an operational amplifier

Information


The OpAmpDetailed model is a general operational amplifier model. The emphasis is on separating each important data sheet parameter into a sub-circuit independent of the other parameters. The model is broken down into five functional stages input, frequency response, gain, slew rate and an output stage. Each stage contains data sheet parameters to be modeled. This partitioning and the modelling of the separate submodels are based on the description in [CP92].

Using [CP92] Joachim Haase (Fraunhofer Institute for Integrated Circuits, Design Automation Division) transferred 2001 operational amplifier models into VHDL-AMS. Now one of these models, the model "amp(macro)" was transferred into Modelica.

Reference:
[CP92] Conelly, J.A.; Choi, P.: Macromodelling with SPICE. Englewood Cliffs: Prentice-Hall, 1992

Parameters

NameDescription
RdmInput resistance (differential input mode) [Ohm]
RcmInput resistance (common mode) [Ohm]
CinInput capacitance [F]
VosInput offset voltage [V]
IbInput bias current [A]
IosInput offset current [A]
vcpCorrection value for limiting by p_supply [V]
vcmCorrection value for limiting by msupply [V]
Avd0Differential amplifier [dB]
CMRRCommon-mode rejection [dB]
fp1Dominant pole [Hz]
fp2Pole frequency [Hz]
fp3Pole frequency [Hz]
fp4Pole frequency [Hz]
fzZero frequency [Hz]
sr_pSlew rate for increase [V/s]
sr_mSlew rate for decrease [V/s]
RoutOutput resistance [Ohm]
ImaxsoMaximal output current (source current) [A]
ImaxsiMaximal output current (sink current) [A]
Tssampling time [s]

Connectors

NameDescription
pPositive pin of the input port
mNegative pin of the input port
outpOutput pin
p_supplyPositive output voltage limitation
m_supplyNegative output voltage limitation

Modelica.Electrical.Analog.Basic.VariableResistor Modelica.Electrical.Analog.Basic.VariableResistor

Ideal linear electrical resistor with variable resistance

Information


The linear resistor connects the branch voltage v with the branch current i by
i*R = v
The Resistance R is given as input signal.

Attention!!!
It is recommended that the R signal should not cross the zero value. Otherwise depending on the surrounding circuit the probability of singularities is high.

Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n), Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network).

Parameters

NameDescription
T_refReference temperature [K]
alphaTemperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref)) [1/K]
useHeatPort=true, if HeatPort is enabled
TFixed device temperature if useHeatPort = false [K]

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin
heatPort 
R[Ohm]

Modelica.Electrical.Analog.Basic.VariableConductor Modelica.Electrical.Analog.Basic.VariableConductor

Ideal linear electrical conductor with variable conductance

Information


The linear conductor connects the branch voltage v with the branch current i by
i = G*v
The Conductance G is given as input signal.

Attention!!!
It is recommended that the G signal should not cross the zero value. Otherwise depending on the surrounding circuit the probability of singularities is high.

Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n), Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network).

Parameters

NameDescription
T_refReference temperature [K]
alphaTemperature coefficient of conductance (G_actual = G/(1 + alpha*(T_heatPort - T_ref)) [1/K]
useHeatPort=true, if HeatPort is enabled
TFixed device temperature if useHeatPort = false [K]

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin
heatPort 
G[S]

Modelica.Electrical.Analog.Basic.VariableCapacitor Modelica.Electrical.Analog.Basic.VariableCapacitor

Ideal linear electrical capacitor with variable capacitance

Information


The linear capacitor connects the branch voltage v with the branch current i by
i = dQ/dt with Q = C * v.
The capacitance C is given as input signal. It is required that C ≥ 0, otherwise an assertion is raised. To avoid a variable index system, C = Cmin, if 0 ≤ C < Cmin, where Cmin is a parameter with default value Modelica.Constants.eps.


Besides the Cmin parameter the capacitor model has got the two parameters IC and UIC that belong together. With the IC parameter the user can specify an initial value of the voltage over the capacitor, which is defined from positive pin p to negative pin n (v=p.v - n.v).


Hence the capacitor is charged at the beginning of the simulation. The other parameter UIC is of type Boolean. If UIC is true, the simulation tool uses


the IC value at the initial calculation by adding the equation v= IC. If UIC is false, the IC value can be used (but it does not need to!) to calculate the initial values in order to simplify the numerical algorithms of initial calculation.

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

Parameters

NameDescription
Cminlower bound for variable capacitance [F]
ICInitial Value [V]
UIC 

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin
C[F]

Modelica.Electrical.Analog.Basic.VariableInductor Modelica.Electrical.Analog.Basic.VariableInductor

Ideal linear electrical inductor with variable inductance

Information


The linear inductor connects the branch voltage v with the branch current i by
v = d Psi/dt with Psi = L * i .
The inductance L is as input signal. It is required that L ≥ 0, otherwise an assertion is raised. To avoid a variable index system, L = Lmin, if 0 ≤ L < Lmin, where Lmin is a parameter with default value Modelica.Constants.eps.

Besides the Lmin parameter the inductor model has got the two parameters IC and UIC that belong together. With the IC parameter the user can specify an initial value of the current that flows through the inductor.


Hence the inductor has an initial current at the beginning of the simulation. The other parameter UIC is of type Boolean. If UIC is true, the simulation tool uses


the IC value at the initial calculation by adding the equation i= IC. If UIC is false, the IC value can be used (but it does not need to!) to calculate the initial values in order to simplify the numerical algorithms of initial calculation.

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

Parameters

NameDescription
Lminlower bound for variable inductance [H]
ICInitial Value [A]
UIC 

Connectors

NameDescription
pPositive pin (potential p.v > n.v for positive voltage drop v)
nNegative pin
L[H]

Automatically generated Mon Sep 23 17:20:26 2013.