Inverter

Inverter Simulation Library

Inverter.SwitchedCurrent Inverter.SwitchedVCVS Inverter.ModulatedSine Inverter.OneShot Inverter.Dlossy Inverter.DlossyThermal Inverter.NewIdealSwitch Inverter.Buck Inverter.Boost Inverter.Halfbridge Inverter.Sixpack Inverter.FETbridge

Information

Inverter Simulation Library
Copyright 2003-2004 by Jonathan Kimball

This library contains a number of useful blocks for simulation of
motor control inverters, or other similar topologies.  See paper in
COMPEL'04 for more details.  The basic building blocks are in the
buck and boost libraries.  These are used to build halfbridges, which
are used to build sixpacks.  Dlossy is a diode with a given forward
voltage and on-state resistance, with proper translation so that the
I-V characteristic passes through the origin.  SwitchedVCVS and 
SwitchedCurrent are used to build the buck and boost circuits.  OneShot
emulates 555 monostable operation with no state variables.
ModulatedSine takes frequency and magnitude inputs and generates a 
smooth sinusoid.

Work extended for PESC'05 (digest submitted 10/27/04) to include
MOSFETs.  Assumes a symmetric bridge.

NameDescription
SwitchedCurrent Current Source with Boolean Pulsing
SwitchedVCVS Voltage Source with Control Voltage and Boolean Pulsing
ModulatedSine Sine Wave Source with Controllable Amplitude and Frequency
OneShot Boolean One-Shot Triggered on RisingEdge
Dlossy Lossy Diode (conduction loss model)
DlossyThermal Lossy Diode with Thermal Port
NewIdealSwitch  
Buck Buck-derived Switch Models (Controlled Upper, FWD Lower)
Boost Boost-derived Switch Models (Controlled Lower, FWD Upper)
Halfbridge Half Bridge Models Built from Buck/Boost Models
Sixpack Hex bridge (three-phase bridge) circuits
FETbridge  


Inverter.SwitchedCurrent Inverter.SwitchedCurrent

Current Source with Boolean Pulsing

Inverter.SwitchedCurrent

Information

Switched current source.  Current through the device
is zero for Boolean FALSE, Ion for Boolean TRUE.
Building block, to be used in switching models.

Parameters

NameDefaultDescription
Ion Current when on [A]

Modelica definition

model SwitchedCurrent "Current Source with Boolean Pulsing" 
  extends Modelica.Electrical.Analog.Interfaces.OnePort;
  
  parameter Modelica.SIunits.Current Ion "Current when on";
  Modelica.Blocks.Interfaces.BooleanInPort TurnOn;
equation 
  
  if TurnOn.signal[1] then
    i = Ion;
  else
    i = 0;
  end if;
end SwitchedCurrent;

Inverter.SwitchedVCVS Inverter.SwitchedVCVS

Voltage Source with Control Voltage and Boolean Pulsing

Inverter.SwitchedVCVS

Information

Switched voltage-controlled voltage source.  Voltage across the
device is zero for Boolean FALSE, k*control for Boolean TRUE.
Building block, to be used in switching models.

Parameters

NameDefaultDescription
k1Voltage Control Gain

Modelica definition

model SwitchedVCVS 
  "Voltage Source with Control Voltage and Boolean Pulsing" 
  extends Modelica.Electrical.Analog.Interfaces.OnePort;
  
  parameter Real k=1 "Voltage Control Gain";
  Modelica.Electrical.Analog.Interfaces.PositivePin ControlP;
  Modelica.Electrical.Analog.Interfaces.NegativePin ControlN;
  Modelica.Blocks.Interfaces.BooleanInPort TurnOn;
  
  Modelica.SIunits.Voltage control=
                                   ControlP.v - ControlN.v;
equation 
  ControlP.i = 0;
  ControlN.i = 0;
  if TurnOn.signal[1] then
    v = k*control;
  else
    v = 0;
  end if;
end SwitchedVCVS;

Inverter.ModulatedSine Inverter.ModulatedSine

Sine Wave Source with Controllable Amplitude and Frequency

Inverter.ModulatedSine

Information

Modulated Sine Wave
Inputs are Magnitude and Frequency
Parameters allow for generating "n" phase sine waves
with arbitrary phase relationships.  Also allow for DC
offset, as is necessary when comparing to a ramp from
0 to 1.

Parameters

NameDefaultDescription
noutputs1Number of Outputs
phase[:]{0}Phase Angles of Outputs [rad]
offset0Offset

Modelica definition

model ModulatedSine 
  "Sine Wave Source with Controllable Amplitude and Frequency" 
  parameter Integer noutputs=1 "Number of Outputs";
  parameter Modelica.SIunits.Angle phase[       :]={0} "Phase Angles of Outputs";
  parameter Real offset=0 "Offset";
  
  extends Modelica.Blocks.Interfaces.MO(final nout=noutputs);
  Modelica.Blocks.Interfaces.InPort Amplitude;
  Modelica.Blocks.Interfaces.InPort Frequency;
  
protected 
  constant Real pi=Modelica.Constants.pi;
  parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase[
      1] else phase);
  Real theta(start=0);
equation 
  
  der(theta) = 2*pi*Frequency.signal[1];
  for i in 1:nout loop
    outPort.signal[i] = offset + Amplitude.signal[1]*Modelica.Math.sin(theta
       + p_phase[i]);
  end for;
end ModulatedSine;

Inverter.OneShot Inverter.OneShot

Boolean One-Shot Triggered on RisingEdge

Inverter.OneShot

Information

One-shot emulates 555 operation in a Boolean framework with no state variables.
On each rising edge of the input, the output generates a pulse with width equal
to parameter pw.  Output is high only if input is high, so input pulse should be
wider than output pulse.  This is a useful building block.

Parameters

NameDefaultDescription
pw1Pulse Width in Seconds [s]

Modelica definition

model OneShot "Boolean One-Shot Triggered on RisingEdge" 
  parameter Modelica.SIunits.Time pw =      1 "Pulse Width in Seconds";
  Modelica.SIunits.Time T0[
                           1](final start={0});
  extends Modelica.Blocks.Interfaces.BooleanSISO;
equation 
  
  when edge(u) then
    T0[1] = time;
  end when;
  y = time >= T0[1] and time < T0[1] + pw and u and T0[1] > 0;
end OneShot;

Inverter.Dlossy Inverter.Dlossy

Lossy Diode (conduction loss model)

Inverter.Dlossy

Information

Diode model based on Modelica.Electrical.Analog.Ideal.IdealDiode.  Translates corner
point to Von, Ion where Ion=Von*Goff.

Parameters

NameDefaultDescription
Von0.320On-state Voltage [V]
Ron0.106On-state Resistance [Ohm]
Goff1e-6Open diode conductance [S]

Modelica definition

model Dlossy "Lossy Diode (conduction loss model)" 
  extends Modelica.Electrical.Analog.Interfaces.OnePort;
  parameter Modelica.SIunits.Voltage Von =      0.320 "On-state Voltage";
  parameter Modelica.SIunits.Resistance Ron =      0.106 "On-state Resistance";
  //default parameters are for 1N5819 diode, measured 26 September 2003
  parameter Modelica.SIunits.Conductance Goff(       final min=0) = 1e-6 
    "Open diode conductance";
  Boolean off(start=true) "Switching state of diode";
  
  Modelica.SIunits.Power Pdiss "Power Dissipation";
protected 
  Real s "Auxiliary variable";
equation 
  
  off = s < 0;
  (v - Von) = s*(if off then 1 else Ron);
  (i - Von*Goff) = s*(if off then Goff else 1);
  Pdiss = v*i;
end Dlossy;

Inverter.DlossyThermal Inverter.DlossyThermal

Lossy Diode with Thermal Port

Inverter.DlossyThermal

Information

Similar to Dlossy, with added thermal port.

Parameters

NameDefaultDescription
Von0.320On-state Voltage [V]
Ron0.106On-state Resistance [Ohm]
Goff1e-6Open diode conductance [S]

Modelica definition

model DlossyThermal "Lossy Diode with Thermal Port" 
  extends Dlossy;
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b Junction;
equation 
  Junction.Q_dot = -Pdiss;
end DlossyThermal;

Inverter.NewIdealSwitch Inverter.NewIdealSwitch

Inverter.NewIdealSwitch

Information

Ideal switch with finite on-state resistance and zero off-state
conductance.  Switch is "on" when input is "true", which is different
from Modelica library.

Parameters

NameDefaultDescription
Ron1e-5On-State Resistance [Ohm]

Modelica definition

model NewIdealSwitch 
  extends Modelica.Electrical.Analog.Interfaces.OnePort;
  parameter Modelica.SIunits.Resistance Ron =      1e-5 "On-State Resistance";
  
  Modelica.Blocks.Interfaces.BooleanInPort s;
equation 
  
  i = if s.signal[1] then v/Ron else 0;
  
end NewIdealSwitch;

HTML-documentation generated by Dymola Wed Oct 27 16:20:16 2004 .