Package Modelica.​Electrical.​Machines.​Examples.​ControlledDCDrives.​Utilities
Utilities for controlled drives

Information

This package contains utilities for controlled drives

Extends from Modelica.​Icons.​UtilitiesPackage (Icon for utility packages).

Package Contents

NameDescription
BatterySimple battery model
DcdcInverterDC-DC inverter
DriveDataDCPMParameters of a controlled DC permanent magnet drive
IdealDcDcIdeal DC-DC inverter
LimitedPILimited PI-controller with anti-windup and feed-forward
PartialControlledDCPMPartial controlled DC PM drive with H-bridge from battery
SwitchingDcDcSwitching DC-DC inverter

Partial Model Modelica.​Electrical.​Machines.​Examples.​ControlledDCDrives.​Utilities.​PartialControlledDCPM
Partial controlled DC PM drive with H-bridge from battery

Information

This is a partial model of a controlled DC PM drive.

Electrical power is taken from a battery (constant voltage with inner resistance) and fed to the motor via a DC-DC inverter. The level of detail of the DC-DC inverter may be chosen from ideal averaging or switching. The DC-DC inverter is commanded by the current controller. The current controller is parameterized according to the absolute optimum.

Further reading: Tutorial at the Modelica Conference 2017

Extends from Modelica.​Icons.​Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
DriveDataDCPMdriveData  

Record Modelica.​Electrical.​Machines.​Examples.​ControlledDCDrives.​Utilities.​DriveDataDCPM
Parameters of a controlled DC permanent magnet drive

Information

Calculates controller parameters of a DC permanent magnet drive: Current controller according to absolute optimum, speed controller according to symmetric optimum.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
parameter DcPermanentMagnetDatamotorDataMotor data
parameter ResistanceRaArmature resistance at nominal temperature
parameter TimeTaArmature time constant
parameter PowerPNominalNominal mechanical output
parameter TorquetauNominalNominal torque
parameter ElectricalTorqueConstantkPhiTorque constant
parameter AngularVelocityw0No-load speed
parameter FrequencyfSSwitching frequency
parameter VoltageVBatDC no-load voltage
parameter TimeTdDead time of inverter
parameter TimeTmfMeasurement filter time constant
parameter TimeTsigmaSum of small time constants
parameter InertiaJLLoad inertia
parameter VoltageVaMaxMaximum Voltage
parameter CurrentIaMaxMaximum current
parameter TorquetauMaxMaximum torque
parameter AngularVelocitywMaxMaximum speed
parameter AngularAccelerationaMaxMaximum acceleration
parameter RealkpIProportional gain
parameter TimeTiIIntegral time constant
parameter TimeTsubSubstitute time constant
parameter RealkpwProportional gain
parameter TimeTiwIntegral time constant
parameter TimeTfwFilter time constant
parameter RealkpPProportional gain

Block Modelica.​Electrical.​Machines.​Examples.​ControlledDCDrives.​Utilities.​LimitedPI
Limited PI-controller with anti-windup and feed-forward

Information

Proportional - Integral - controller with optional feed-forward and limitation at the output.

The integral part can be switched off to obtain a limited P-controller.

The feed-forward gain can either be constant or given by the optional input kFF.

When the output is limited, the controller cannot bring the control error to zero and the integrator will not stop integrating. To avoid this WindUp - effect, an Anti-WindUp loop is implemented: The difference between unlimited and limited output is fed back to the integrator's input.

Extends from Modelica.​Blocks.​Interfaces.​SISO (Single Input Single Output continuous control block).

Parameters

TypeNameDefaultDescription
Realk1Gain
BooleanuseItruePI else P
TimeTi1Integral time constant (T>0 required)
BooleanuseFFfalseUse feed-forward?
BooleanuseConstantKFFtrueUse constant feed-forward factor?
RealKFF1Feed-forward gain
BooleanconstantLimitstrueUse constant limits?
BooleansymmetricLimitstrueUse symmetric limits?
RealyMaxinfUpper limit of output
RealyMin-yMaxLower limit of output
InitinitTypeModelica.​Blocks.​Types.​Init.​NoInitType of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)
Realx_start0Initial or guess value of state
Realy_start0Initial value of output

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputyConnector of Real output signal
input RealInputu_mConnector of measured signal
input RealInputfeedForwardConnector of feed-forward signal
input RealInputkFFConnector of feed-forward factor
input RealInputyMaxVarConnector of yMax input signal
input RealInputyMinVarConnector of yMin input signal

Model Modelica.​Electrical.​Machines.​Examples.​ControlledDCDrives.​Utilities.​Battery
Simple battery model

Information

This is a simple model of a DC-source resp. battery, consisting of a constant DC-voltage and an inner resistance.

Parameters

TypeNameDefaultDescription
VoltageV0 No-load voltage
CurrentINominal Nominal current
ResistanceRi0.05 * V0 / INominalInner resistance

Connectors

TypeNameDescription
PositivePinpin_p 
NegativePinpin_n 

Model Modelica.​Electrical.​Machines.​Examples.​ControlledDCDrives.​Utilities.​DcdcInverter
DC-DC inverter

Information

This is a model of a DC-DC inverter. The level of detail of the DC-DC inverter may be chosen from ideal averaging or switching.

Reference voltage is limited to actual battery voltage.

Battery voltage and motor current are measured.

Parameters

TypeNameDefaultDescription
BooleanuseIdealInvertertrueUse ideal averaging inverter, otherwise switching inverter
FrequencyfS Switching frequency
TimeTd0.5 / fSDead time
TimeTmf2 / fSMeasurement filter time constant
VoltageVMax Maximum Voltage
TimeTi1e-6Time constant of integral power controller
ResistanceRonT1e-5Transistor closed resistance
ConductanceGoffT1e-5Transistor opened conductance
VoltageVkneeT0Transistor threshold voltage
ResistanceRonD1e-5Diode closed resistance
ConductanceGoffD1e-5Diode opened conductance
VoltageVkneeD0Diode threshold voltage

Connectors

TypeNameDescription
PositivePinpin_pBat 
NegativePinpin_nBat 
PositivePinpin_pMot 
NegativePinpin_nMot 
input RealInputvRef 
output RealOutputvDC 
output RealOutputiDC 
output RealOutputvMot 
output RealOutputiMot 

Model Modelica.​Electrical.​Machines.​Examples.​ControlledDCDrives.​Utilities.​IdealDcDc
Ideal DC-DC inverter

Information

This is a model of an ideal DC-DC inverter based on a power balance achieved by an integral controller.

Parameters

TypeNameDefaultDescription
TimeTd Dead time
TimeTi1e-6Time constant of integral power controller

Connectors

TypeNameDescription
NegativePinpin_nBat 
PositivePinpin_pBat 
NegativePinpin_nMot 
PositivePinpin_pMot 
input RealInputvRef 

Model Modelica.​Electrical.​Machines.​Examples.​ControlledDCDrives.​Utilities.​SwitchingDcDc
Switching DC-DC inverter

Information

This is a model of a switching DC-DC inverter based on a H-bridge.

Parameters

TypeNameDefaultDescription
FrequencyfS Switching frequency
VoltageVMax Maximum Voltage
ResistanceRonT1e-5Transistor closed resistance
ConductanceGoffT1e-5Transistor opened conductance
VoltageVkneeT0Transistor threshold voltage
ResistanceRonD1e-5Diode closed resistance
ConductanceGoffD1e-5Diode opened conductance
VoltageVkneeD0Diode threshold voltage

Connectors

TypeNameDescription
NegativePinpin_nBat 
PositivePinpin_pBat 
PositivePinpin_pMot 
NegativePinpin_nMot 
input RealInputvRef 
input RealInputvMax 

Generated 2018-12-12 12:10:10 EST by MapleSim.