Modelica.Electrical.Machines.Utilities

Library with auxiliary models for testing

Information


This package contains utility components for testing examples.

Extends from Modelica.Icons.Library (Icon for library).

Package Content

NameDescription
Modelica.Electrical.Machines.Utilities.VfController VfController Voltage-Frequency-Controller
Modelica.Electrical.Machines.Utilities.SwitchYD SwitchYD Y-D-switch
Modelica.Electrical.Machines.Utilities.TerminalBox TerminalBox terminal box Y/D-connection
Modelica.Electrical.Machines.Utilities.TransformerData TransformerData Calculates Impedances from nominal values


Modelica.Electrical.Machines.Utilities.VfController Modelica.Electrical.Machines.Utilities.VfController

Voltage-Frequency-Controller

Modelica.Electrical.Machines.Utilities.VfController

Information


Simple Voltage-Frequency-Controller.
Amplitude of voltage is linear dependent (VNominal/fNominal) on frequency (input signal "u"), but limited by VNominal (nominal RMS voltage per phase).
m sine-waves with amplitudes as described above are provided as output signal "y".
The sine-waves are intended to feed a m-phase SignalVoltage.
Phase shifts between sine-waves may be choosen by the user; default values are (k-1)/m*pi for k in 1:m.

Extends from Modelica.Blocks.Interfaces.SIMO (Single Input Multiple Output continuous control block).

Parameters

TypeNameDefaultDescription
IntegernoutmNumber of outputs
Integerm3number of phases
VoltageVNominal nominal RMS voltage per phase [V]
FrequencyfNominal nominal frequency [Hz]
AngleBasePhase0common phase shift [rad]

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputy[nout]Connector of Real output signals

Modelica definition

block VfController "Voltage-Frequency-Controller"
  extends Modelica.Blocks.Interfaces.SIMO(final nout=m);
  constant Modelica.SIunits.Angle pi=Modelica.Constants.pi;
  parameter Integer m=3 "number of phases";
  parameter Modelica.SIunits.Voltage VNominal "nominal RMS voltage per phase";
  parameter Modelica.SIunits.Frequency fNominal "nominal frequency";
  parameter Modelica.SIunits.Angle BasePhase=0 "common phase shift";
  output Modelica.SIunits.Angle x(start=0, fixed=true) "integrator state";
  output Modelica.SIunits.Voltage amplitude;
equation 
//amplitude = sqrt(2)*VNominal*min(abs(u)/fNominal, 1);
  amplitude = sqrt(2)*VNominal*(if abs(u)<fNominal then abs(u)/fNominal else 1);
  der(x) = 2*pi*u;
  y = {amplitude*sin(x + BasePhase - (k - 1)*2/m*pi) for k in 1:m};
end VfController;

Modelica.Electrical.Machines.Utilities.SwitchYD Modelica.Electrical.Machines.Utilities.SwitchYD

Y-D-switch

Modelica.Electrical.Machines.Utilities.SwitchYD

Information


Simple Star-Delta-switch.
If control is false, plug_sp and plug_sn are star connected and plug_sp connected to the supply plug.
If control is true, plug_sp and plug_sn are delta connected and they are connected to the supply plug.

Connectors

TypeNameDescription
PositivePlugplugSupply 
PositivePlugplug_sp 
NegativePlugplug_sn 
input BooleanInputcontrol[m] 

Modelica definition

model SwitchYD "Y-D-switch"
  constant Integer m=3 "number of phases";
  Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plugSupply(final m=m);
  Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_sp(final m=m);
  Modelica.Electrical.MultiPhase.Interfaces.NegativePlug plug_sn(final m=m);
  Modelica.Electrical.MultiPhase.Basic.Star star(final m=m);
  Modelica.Electrical.MultiPhase.Basic.Delta delta(final m=m);
  Modelica.Electrical.MultiPhase.Ideal.IdealCommutingSwitch
    idealCommutingSwitch(                                                        final m=m);
  Modelica.Blocks.Interfaces.BooleanInput control[m];
equation 
  connect(delta.plug_p, plugSupply);
  connect(delta.plug_p, plug_sp);
  connect(idealCommutingSwitch.plug_n2, delta.plug_n);
  connect(idealCommutingSwitch.plug_n1, star.plug_p);
  connect(idealCommutingSwitch.plug_p,plug_sn);
  connect(control, idealCommutingSwitch.control);
end SwitchYD;

Modelica.Electrical.Machines.Utilities.TerminalBox Modelica.Electrical.Machines.Utilities.TerminalBox

terminal box Y/D-connection

Modelica.Electrical.Machines.Utilities.TerminalBox

Information


TerminalBox: at the bottom connected to both machine plugs, connect at the top to the grid as usual,
choosing Y-connection (StarDelta=Y) or D-connection (StarDelta=D).

Parameters

TypeNameDefaultDescription
StringterminalConnection choose Y=star/D=delta

Connectors

TypeNameDescription
PositivePlugplug_sp 
NegativePlugplug_sn 
PositivePlugplugSupply 
NegativePinstarpoint 

Modelica definition

model TerminalBox "terminal box Y/D-connection"
  constant Integer m=3 "number of phases";
  parameter String terminalConnection(start="Y") "choose Y=star/D=delta";
  Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_sp(final m=m);
  Modelica.Electrical.MultiPhase.Interfaces.NegativePlug plug_sn(final m=m);
  Modelica.Electrical.MultiPhase.Basic.Star star(final m=m) if (terminalConnection<>"D");
  Modelica.Electrical.MultiPhase.Basic.Delta delta(final m=m) if (terminalConnection=="D");
  Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plugSupply(final m=m);
  Modelica.Electrical.Analog.Interfaces.NegativePin starpoint if (terminalConnection<>"D");
equation 
  connect(plug_sn, star.plug_p);
  connect(plug_sn, delta.plug_n);
  connect(delta.plug_p,plug_sp);
  connect(plug_sp, plugSupply);
  connect(star.pin_n, starpoint);
end TerminalBox;

Modelica.Electrical.Machines.Utilities.TransformerData Modelica.Electrical.Machines.Utilities.TransformerData

Calculates Impedances from nominal values

Information

Extends from Modelica.Icons.Record (Icon for a record).

Parameters

TypeNameDefaultDescription
Frequencyf nominal frequency [Hz]
VoltageV1 primary nominal line-to-line voltage (RMS) [V]
StringC1 choose primary connection
VoltageV2 secondary open circuit line-to-line voltage (RMS) @ primary nominal voltage [V]
StringC2 choose secondary connection
ApparentPowerSNominal nominal apparent power [VA]
Realv_sc impedance voltage drop pu
PowerP_sc short-circuit (copper) losses [W]
Result
RealnV1/V2primary voltage (line-to-line) / secondary voltage (line-to-line)
ResistanceR10.5*P_sc/(3*I1ph^2)warm primary resistance per phase [Ohm]
InductanceL1sigmasqrt(Z1ph^2 - R1^2)/(2*Model...primary stray inductance per phase [H]
ResistanceR20.5*P_sc/(3*I2ph^2)warm secondary resistance per phase [Ohm]
InductanceL2sigmasqrt(Z2ph^2 - R2^2)/(2*Model...secondary stray inductance per phase [H]

Modelica definition

record TransformerData "Calculates Impedances from nominal values"
  extends Modelica.Icons.Record;
  parameter Modelica.SIunits.Frequency f(start=50) "nominal frequency";
  parameter Modelica.SIunits.Voltage V1(start=100) 
    "primary nominal line-to-line voltage (RMS)";
  parameter String C1(start="Y") "choose primary connection";
  parameter Modelica.SIunits.Voltage V2(start=100) 
    "secondary open circuit line-to-line voltage (RMS) @ primary nominal voltage";
  parameter String C2(start="y") "choose secondary connection";
  parameter Modelica.SIunits.ApparentPower SNominal(start=30E3) 
    "nominal apparent power";
  parameter Real v_sc(final min=0, final max=1, start=0.05) 
    "impedance voltage drop pu";
  parameter Modelica.SIunits.Power P_sc(start=300) 
    "short-circuit (copper) losses";

  parameter Real n = V1/V2 
    "primary voltage (line-to-line) / secondary voltage (line-to-line)";
  final parameter Modelica.SIunits.Voltage V1ph = V1/(if C1=="D" then 1 else sqrt(3)) 
    "primary phase voltage (RMS)";
  final parameter Modelica.SIunits.Current I1ph = SNominal/(3*V1ph) 
    "primary phase current (RMS)";
  final parameter Modelica.SIunits.Voltage V2ph = V2/(if C2=="d" then 1 else sqrt(3)) 
    "secondary phase voltage (RMS)";
  final parameter Modelica.SIunits.Current I2ph = SNominal/(3*V2ph) 
    "secondary phase current (RMS)";
  final parameter Modelica.SIunits.Impedance Z1ph = 0.5*v_sc*V1ph/I1ph 
    "primary impedance per phase";
  parameter Modelica.SIunits.Resistance R1= 0.5*P_sc/(3*I1ph^2) 
    "warm primary resistance per phase";
  parameter Modelica.SIunits.Inductance L1sigma= sqrt(Z1ph^2-R1^2)/(2*Modelica.Constants.pi*f) 
    "primary stray inductance per phase";
  final parameter Modelica.SIunits.Impedance Z2ph = 0.5*v_sc*V2ph/I2ph 
    "secondary impedance per phase";
  parameter Modelica.SIunits.Resistance R2= 0.5*P_sc/(3*I2ph^2) 
    "warm secondary resistance per phase";
  parameter Modelica.SIunits.Inductance L2sigma= sqrt(Z2ph^2-R2^2)/(2*Modelica.Constants.pi*f) 
    "secondary stray inductance per phase";
end TransformerData;

HTML-documentation generated by Dymola Sun Jan 17 21:10:56 2010.