PVSystems.Control.Assemblies

Block assemblies useful in PV and power electronics

Information

    

Block assemblies useful in PV and power electronics

Extends from Icons.AssembliesPackage (Icon for packages of assemblies).

Package Content

Name Description
PVSystems.Control.Assemblies.Inverter1phCurrentController Inverter1phCurrentController Simple synchronous reference frame PI current controller
PVSystems.Control.Assemblies.Inverter1phCompleteController Inverter1phCompleteController Complete synchronous reference frame inverter controller

PVSystems.Control.Assemblies.Inverter1phCurrentController PVSystems.Control.Assemblies.Inverter1phCurrentController

Simple synchronous reference frame PI current controller

PVSystems.Control.Assemblies.Inverter1phCurrentController

Information

Synchronous reference frame current controller for a 1-phase inverter. It takes the measured and the dq setpoints and calculates the duty cycle, which can be then used as the input to the SignalPWM block in switching models or directly as the input of the switch or converter in averaged models.

The control is performed with two LimPID blocks (one per component) configured as a PI controller.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
Realk0.1PI controllers gain [1]
TimeT0.01PI controllers time constant (T>0 required) [s]
Frequencyfline50AC line frequency [Hz]
RealidMaxModelica.Constants.infMaximum effort for id loop
RealiqMaxModelica.Constants.infMaximum effort for iq loop

Connectors

TypeNameDescription
input RealInputiSensed current
input RealInputidsCurrent d component setpoint
input RealInputiqsCurrent q component setpoint
input RealInputthetaSensed AC voltage phase
input RealInputvdcSensed DC voltage
output RealOutputdDuty cycle output

Modelica definition

block Inverter1phCurrentController "Simple synchronous reference frame PI current controller" extends Modelica.Blocks.Icons.Block; parameter Real k(final unit="1") = 0.1 "PI controllers gain"; parameter Modelica.SIunits.Time T(final min=Modelica.Constants.small) = 0.01 "PI controllers time constant (T>0 required)"; parameter Modelica.SIunits.Frequency fline=50 "AC line frequency"; parameter Real idMax=Modelica.Constants.inf "Maximum effort for id loop"; parameter Real iqMax=Modelica.Constants.inf "Maximum effort for iq loop"; Park park; Modelica.Blocks.Nonlinear.FixedDelay T4Delay(delayTime=1/4/fline); Modelica.Blocks.Continuous.LimPID idPI( k=k, controllerType=Modelica.Blocks.Types.SimpleController.PI, Ti=T, yMax=idMax); Modelica.Blocks.Continuous.LimPID iqPI( k=k, controllerType=Modelica.Blocks.Types.SimpleController.PI, Ti=T, yMax=iqMax); InversePark inversePark; Modelica.Blocks.Sources.Constant dOffset(k=0.5); Modelica.Blocks.Interfaces.RealInput i "Sensed current"; Modelica.Blocks.Interfaces.RealInput ids "Current d component setpoint"; Modelica.Blocks.Interfaces.RealInput iqs "Current q component setpoint"; Modelica.Blocks.Interfaces.RealInput theta "Sensed AC voltage phase"; Modelica.Blocks.Interfaces.RealInput vdc "Sensed DC voltage"; Modelica.Blocks.Interfaces.RealOutput d "Duty cycle output"; Modelica.Blocks.Math.Division dScaling; Modelica.Blocks.Math.Add dCalc; equation // Connections connect(park.beta, T4Delay.y); connect(iqPI.y, inversePark.q); connect(idPI.y, inversePark.d); connect(i, park.alpha); connect(i, T4Delay.u); connect(inversePark.theta, theta); connect(inversePark.alpha, dScaling.u1); connect(vdc, dScaling.u2); connect(dScaling.y, dCalc.u2); connect(dCalc.y, d); connect(theta, park.theta); connect(dOffset.y, dCalc.u1); connect(idPI.u_s, ids); connect(idPI.u_m, park.d); connect(park.q, iqPI.u_m); connect(iqPI.u_s, iqs); end Inverter1phCurrentController;

PVSystems.Control.Assemblies.Inverter1phCompleteController PVSystems.Control.Assemblies.Inverter1phCompleteController

Complete synchronous reference frame inverter controller

PVSystems.Control.Assemblies.Inverter1phCompleteController

Information

An additional LimPID block is used to closed the DC voltage loop around the d component of the AC current, using Inverter1phCurrentController.

Currently, this block doesn't provide control of the q component, which is set to 0.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
Realik0.1Current PI gain
TimeiT0.01Current PI time constant [s]
RealidMaxModelica.Constants.infMaximum effort for id loop
RealiqMaxModelica.Constants.infMaximum effort for iq loop
Realvk0.1Voltage PI gain
TimevT0.01Voltage PI time constant [s]
RealvdcMaxModelica.Constants.infMaximum effort for vdc loop
Frequencyfline50Line frequency [Hz]

Connectors

TypeNameDescription
input RealInputiacAC current sense
input RealInputvacAC voltage sense
input RealInputidcDC current sense
input RealInputvdcDC voltage sense
output RealOutputdDuty cycle

Modelica definition

block Inverter1phCompleteController "Complete synchronous reference frame inverter controller" extends Modelica.Blocks.Icons.Block; // Parameters parameter Real ik=0.1 "Current PI gain"; parameter Modelica.SIunits.Time iT=0.01 "Current PI time constant"; parameter Real idMax=Modelica.Constants.inf "Maximum effort for id loop"; parameter Real iqMax=Modelica.Constants.inf "Maximum effort for iq loop"; parameter Real vk=0.1 "Voltage PI gain"; parameter Modelica.SIunits.Time vT=0.01 "Voltage PI time constant"; parameter Real vdcMax=Modelica.Constants.inf "Maximum effort for vdc loop"; parameter Modelica.SIunits.Frequency fline=50 "Line frequency"; // Interface Modelica.Blocks.Interfaces.RealInput iac "AC current sense"; Modelica.Blocks.Interfaces.RealInput vac "AC voltage sense"; Modelica.Blocks.Interfaces.RealInput idc "DC current sense"; Modelica.Blocks.Interfaces.RealInput vdc "DC voltage sense"; Modelica.Blocks.Interfaces.RealOutput d "Duty cycle"; // Components Modelica.Blocks.Sources.Constant iqs(k=0); PVSystems.Control.MPPTController mppt( sampleTime=1, vrefStep=0.5, pkThreshold=0.5, vrefStart=15); Modelica.Blocks.Continuous.LimPID vdcPI( k=vk, controllerType=Modelica.Blocks.Types.SimpleController.PI, Ti=vT, yMax=vdcMax); Inverter1phCurrentController currentController( k=ik, T=iT, fline=fline, idMax=idMax, iqMax=iqMax); PLL pLL(frequency=fline); Modelica.Blocks.Sources.RealExpression vdcClone(y=vdc); Modelica.Blocks.Math.Gain invertIds(k=-1); equation connect(currentController.d, d); connect(idc, mppt.u2); connect(vdc, mppt.u1); connect(iac, currentController.i); connect(iqs.y, currentController.iqs); connect(vac, pLL.v); connect(pLL.theta, currentController.theta); connect(vdcClone.y, currentController.vdc); connect(mppt.y, vdcPI.u_s); connect(vdc, vdcPI.u_m); connect(vdcPI.y, invertIds.u); connect(invertIds.y, currentController.ids); end Inverter1phCompleteController;

Automatically generated Mon Sep 11 16:11:49 2017.