Skip to content

Commit a4756b6

Browse files
committed
New IEEE Microgrid and new components
The following are the updates: 1) A new example package was created named Microgrids. Inside the package there is a new model named IEEEMicrogrid. 2) The microgrid example contains some models that are new to the library. These are CIM5, CIM6 motor models, variable speed drive power electronics and controller blocks and DEGOV governor.
1 parent 2a6a4b4 commit a4756b6

45 files changed

Lines changed: 2278 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
within OpenIPSL.Electrical.Controls.PSSE.TG;
2+
model DEGOV "DEGOV - Woodward Diesel Governor"
3+
extends BaseClasses.BaseGovernor;
4+
5+
parameter Modelica.Units.SI.Time T1 "Governor Mechanism Time Constant";
6+
parameter Modelica.Units.SI.Time T2 "Turbine Power Time Constant";
7+
parameter Modelica.Units.SI.Time T3 "Turbine Exhaust Temperature Time Constant";
8+
parameter OpenIPSL.Types.PerUnit K "Governor Gain";
9+
parameter Modelica.Units.SI.Time T4 "Governor Lead Time Constant";
10+
parameter Modelica.Units.SI.Time T5 "Governor Lag Time Constant";
11+
parameter Modelica.Units.SI.Time T6 "Actuator Time Constant";
12+
parameter Modelica.Units.SI.Time TD "Engine Time Delay";
13+
parameter OpenIPSL.Types.PerUnit TMAX "Upper Limit";
14+
parameter OpenIPSL.Types.PerUnit TMIN "Lower Limit";
15+
16+
17+
Modelica.Blocks.Continuous.TransferFunction transferFunction(b={-T3,-1}, a={
18+
T2*T1,T1,1},
19+
initType=Modelica.Blocks.Types.Init.InitialOutput,
20+
y_start=0)
21+
annotation (Placement(transformation(extent={{-140,-10},{-120,10}})));
22+
Modelica.Blocks.Continuous.Integrator integrator(k=K, y_start=P0)
23+
annotation (Placement(transformation(extent={{-100,-10},{-80,10}})));
24+
NonElectrical.Continuous.LeadLag leadLag(
25+
K=1,
26+
T1=T4,
27+
T2=T5,
28+
y_start=P0)
29+
annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
30+
NonElectrical.Continuous.SimpleLagLim simpleLagLim(
31+
K=1,
32+
T=T6,
33+
y_start=P0,
34+
outMax=TMAX,
35+
outMin=TMIN)
36+
annotation (Placement(transformation(extent={{-20,-10},{0,10}})));
37+
Modelica.Blocks.Nonlinear.FixedDelay fixedDelay(delayTime=TD)
38+
annotation (Placement(transformation(extent={{20,-10},{40,10}})));
39+
Modelica.Blocks.Math.Product product1
40+
annotation (Placement(transformation(extent={{80,-10},{100,10}})));
41+
Modelica.Blocks.Math.Add add
42+
annotation (Placement(transformation(extent={{-80,-124},{-60,-104}})));
43+
Modelica.Blocks.Sources.Constant Constant(k=1)
44+
annotation (Placement(transformation(extent={{-140,-80},{-120,-60}})));
45+
46+
protected
47+
parameter Types.PerUnit P0(fixed=false) "Power reference of the governor";
48+
initial equation
49+
P0 = PMECH0;
50+
51+
equation
52+
connect(SPEED, transferFunction.u) annotation (Line(points={{-240,-120},{-180,
53+
-120},{-180,0},{-142,0}}, color={0,0,127}));
54+
connect(transferFunction.y, integrator.u)
55+
annotation (Line(points={{-119,0},{-102,0}}, color={0,0,127}));
56+
connect(integrator.y, leadLag.u)
57+
annotation (Line(points={{-79,0},{-62,0}}, color={0,0,127}));
58+
connect(leadLag.y, simpleLagLim.u)
59+
annotation (Line(points={{-39,0},{-22,0}}, color={0,0,127}));
60+
connect(simpleLagLim.y, fixedDelay.u)
61+
annotation (Line(points={{1,0},{18,0}}, color={0,0,127}));
62+
connect(fixedDelay.y, product1.u1)
63+
annotation (Line(points={{41,0},{60,0},{60,6},{78,6}}, color={0,0,127}));
64+
connect(Constant.y, add.u1) annotation (Line(points={{-119,-70},{-94,-70},{-94,
65+
-108},{-82,-108}}, color={0,0,127}));
66+
connect(add.u2, transferFunction.u) annotation (Line(points={{-82,-120},{-180,
67+
-120},{-180,0},{-142,0}}, color={0,0,127}));
68+
connect(add.y, product1.u2) annotation (Line(points={{-59,-114},{70,-114},{70,
69+
-6},{78,-6}}, color={0,0,127}));
70+
connect(product1.y, PMECH)
71+
annotation (Line(points={{101,0},{250,0}}, color={0,0,127}));
72+
annotation (Icon(graphics={
73+
Text(
74+
extent={{-100,160},{100,100}},
75+
lineColor={28,108,200},
76+
textString="DEGOV")}));
77+
end DEGOV;

OpenIPSL/Electrical/Controls/PSSE/TG/package.order

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ConstantPower
2+
DEGOV
23
GAST
34
GGOV1
45
GGOV1DU
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
within OpenIPSL.Electrical.Controls.VariableSpeedDrive.ControllerLogic;
2+
model VoltsHertzController "Volts/Hertz controller model"
3+
extends OpenIPSL.Electrical.Essentials.pfComponent(
4+
final enabledisplayPF=false,
5+
final enablefn=false,
6+
final enableV_b=false,
7+
final enableangle_0=false,
8+
final enablev_0=false,
9+
final enableQ_0=false,
10+
final enableS_b=true);
11+
12+
import Modelica.Constants.pi;
13+
14+
parameter Real f_max = 80 "Maximum input voltage frequency" annotation (Dialog(group="VSD project specifics"));
15+
parameter Real f_min = 40 "Minimum input voltage frequency" annotation (Dialog(group="VSD project specifics"));
16+
parameter Real m0= 0.1 "Initial PWM Modulation Value" annotation (Dialog(group="VSD project specifics"));
17+
18+
Modelica.Blocks.Interfaces.RealInput motor_speed "Motor speed from motor model" annotation (Placement(
19+
transformation(
20+
extent={{-20,-20},{20,20}},
21+
rotation=0,
22+
origin={-120,70}),iconTransformation(
23+
extent={{-20,-20},{20,20}},
24+
rotation=180,
25+
origin={120,40})));
26+
OpenIPSL.NonElectrical.Continuous.SimpleLag Speed_Sensor(K=1, T=Tr,
27+
y_start=Modelica.Constants.eps)
28+
annotation (Placement(transformation(extent={{-38,-22},{-18,-2}})));
29+
parameter OpenIPSL.Types.Time Tr=0.01 "Time constant for speed sensor filter"
30+
annotation (Dialog(group="Control Parameters"));
31+
Modelica.Blocks.Math.Add add(k1=-1)
32+
annotation (Placement(transformation(extent={{-82,-78},{-62,-58}})));
33+
Modelica.Blocks.Nonlinear.Limiter limiter(uMax=we_max, uMin=we_min)
34+
annotation (Placement(transformation(extent={{60,-50},{80,-30}})));
35+
Modelica.Blocks.Math.Gain gain(k=Kp)
36+
annotation (Placement(transformation(extent={{-48,-60},{-28,-40}})));
37+
Modelica.Blocks.Continuous.Integrator integrator(k=Ki,
38+
initType=Modelica.Blocks.Types.Init.InitialState,
39+
y_start=m0*(2*Modelica.Constants.pi*SysData.fn))
40+
annotation (Placement(transformation(extent={{-48,-92},{-28,-72}})));
41+
Modelica.Blocks.Math.Add add1(k1=+1)
42+
annotation (Placement(transformation(extent={{-14,-76},{6,-56}})));
43+
Modelica.Blocks.Math.Add add2(k1=+1)
44+
annotation (Placement(transformation(extent={{18,-50},{38,-30}})));
45+
Modelica.Blocks.Interfaces.RealOutput we(start=0.01*2*Modelica.Constants.pi*
46+
SysData.fn)
47+
"Synchronous speed"
48+
annotation (Placement(transformation(extent={{100,-60},{140,-20}}),
49+
iconTransformation(extent={{100,-60},{140,-20}})));
50+
Modelica.Blocks.Math.Gain gain1(k=1)
51+
annotation (Placement(transformation(extent={{10,-10},{-10,10}},
52+
rotation=0,
53+
origin={70,10})));
54+
Modelica.Blocks.Interfaces.RealOutput m "PWM modulation index"
55+
annotation (Placement(transformation(extent={{-20,-20},{20,20}},
56+
rotation=90,
57+
origin={60,120}), iconTransformation(
58+
extent={{-20,-20},{20,20}},
59+
rotation=90,
60+
origin={60,120})));
61+
Real Kf= 1/(2*pi*fn) "Gain value multiplied with input signal"
62+
annotation (Dialog(group="Control Parameters"));
63+
parameter Real Kp=5 "PI proportional gain"
64+
annotation (Dialog(group="Control Parameters"));
65+
parameter Real Ki=0.1 "PI integrator gain"
66+
annotation (Dialog(group="Control Parameters"));
67+
parameter Real we_max=2*pi*f_max "Maximum Synchronous Speed"
68+
annotation (Dialog(group="Control Parameters"));
69+
parameter Real we_min=2*pi*f_min "Minimum Synchronous Speed"
70+
annotation (Dialog(group="Control Parameters"));
71+
Modelica.Blocks.Interfaces.RealInput Vc "Capacitor voltage value" annotation (Placement(transformation(
72+
extent={{-20,-20},{20,20}},
73+
rotation=270,
74+
origin={-60,120}), iconTransformation(
75+
extent={{-20,-20},{20,20}},
76+
origin={-60,120},
77+
rotation=270)));
78+
Modelica.Blocks.Interfaces.RealInput W_ref "Synchronous speed reference"
79+
annotation (Placement(transformation(extent={{-140,-20},{-100,20}}),
80+
iconTransformation(extent={{-140,-20},{-100,20}})));
81+
Modelica.Blocks.Nonlinear.Limiter limiter1(uMax=1, uMin=0) annotation (
82+
Placement(transformation(
83+
extent={{-10,-10},{10,10}},
84+
rotation=0,
85+
origin={18,40})));
86+
Modelica.Blocks.Math.Gain gain2(k=1/V_b)
87+
annotation (Placement(transformation(extent={{-32,70},{-12,90}})));
88+
Modelica.Blocks.Sources.RealExpression realExpression(y=Kf)
89+
annotation (Placement(transformation(extent={{-72,36},{-52,56}})));
90+
Modelica.Blocks.Math.Product product1
91+
annotation (Placement(transformation(extent={{-30,30},{-10,50}})));
92+
Modelica.Blocks.Continuous.FirstOrder firstOrder(
93+
T=0.01,
94+
initType=Modelica.Blocks.Types.Init.InitialState,
95+
y_start=m0)
96+
annotation (Placement(transformation(extent={{46,30},{66,50}})));
97+
equation
98+
connect(motor_speed, Speed_Sensor.u) annotation (Line(points={{-120,70},{-84,70},
99+
{-84,-12},{-40,-12}},color={0,0,127}));
100+
connect(Speed_Sensor.y, add.u1) annotation (Line(points={{-17,-12},{-12,-12},{
101+
-12,-34},{-88,-34},{-88,-62},{-84,-62}},
102+
color={0,0,127}));
103+
connect(add.y, gain.u) annotation (Line(points={{-61,-68},{-56,-68},{-56,-50},
104+
{-50,-50}},
105+
color={0,0,127}));
106+
connect(integrator.u, gain.u) annotation (Line(points={{-50,-82},{-56,-82},{-56,
107+
-50},{-50,-50}},
108+
color={0,0,127}));
109+
connect(gain.y, add1.u1) annotation (Line(points={{-27,-50},{-24,-50},{-24,-60},
110+
{-16,-60}},
111+
color={0,0,127}));
112+
connect(integrator.y, add1.u2) annotation (Line(points={{-27,-82},{-24,-82},{-24,
113+
-72},{-16,-72}},color={0,0,127}));
114+
connect(add2.u1, Speed_Sensor.y)
115+
annotation (Line(points={{16,-34},{-12,-34},{-12,-12},{-17,-12}},
116+
color={0,0,127}));
117+
connect(add.u2, W_ref) annotation (Line(points={{-84,-74},{-94,-74},{-94,0},{-120,
118+
0}}, color={0,0,127}));
119+
connect(Vc, gain2.u) annotation (Line(points={{-60,120},{-60,80},{-34,80}},
120+
color={0,0,127}));
121+
connect(gain1.u, we) annotation (Line(points={{82,10},{94,10},{94,-40},{120,-40}},
122+
color={0,0,
123+
127}));
124+
connect(add1.y, add2.u2) annotation (Line(points={{7,-66},{16,-66},{16,-46}},
125+
color={0,0,127}));
126+
connect(add2.y, limiter.u)
127+
annotation (Line(points={{39,-40},{58,-40}}, color={0,0,127}));
128+
connect(limiter.y, we) annotation (Line(points={{81,-40},{120,-40}},
129+
color={0,0,127}));
130+
connect(integrator.u, add.y) annotation (Line(points={{-50,-82},{-56,-82},{-56,
131+
-68},{-61,-68}}, color={0,0,127}));
132+
connect(realExpression.y, product1.u1)
133+
annotation (Line(points={{-51,46},{-32,46}}, color={0,0,127}));
134+
connect(gain1.y, product1.u2) annotation (Line(points={{59,10},{-32,10},{-32,34}},
135+
color={0,0,127}));
136+
connect(limiter1.y, firstOrder.u) annotation (Line(points={{29,40},{44,40}},
137+
color={0,0,127}));
138+
connect(firstOrder.y, m) annotation (Line(points={{67,40},{72,40},{72,96},{60,
139+
96},{60,120}}, color={0,0,127}));
140+
connect(product1.y, limiter1.u) annotation (Line(points={{-9,40},{6,40}},
141+
color={0,0,127}));
142+
annotation (preferredView = "info", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},
143+
{100,100}}), graphics={
144+
Rectangle(
145+
extent={{-100,100},{100,-100}},
146+
lineColor={28,108,200}), Text(
147+
extent={{-80,80},{80,-80}},
148+
lineColor={28,108,200},
149+
textString="V/f
150+
Control")}), Diagram(
151+
coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
152+
Documentation(info="<html>
153+
<p>The VoltsHertzController component represents the controller logic for the variable speed drive. The volts hertz control is a simple and widely used method for controlling the speed of an AC induction motor by adjusting the voltage and frequency supplied to the motor at a constant ratio.</p>
154+
<p>The model has three inputs and two output connectors. The W_ref input connector represents the reference synchronous speed that is user defined,
155+
motor_speed input is the motor speed that is generated by the motor model, and the Vc input is the capacitor voltage value from the AC2DCandDC2AC component.
156+
The m output is the PWM modulation index, and the we output is the synchronous speed that is used in the controllable motor model.</p>
157+
<p>The modelling of such devices is based, mainly, on the following reference:</p>
158+
<ul>
159+
<li>Panasetsky: Variable Speed Drive Modeling\"
160+
<a href=\"modelica://OpenIPSL.UsersGuide.References\">[Panasetsky2016]</a>,</li>
161+
</ul>
162+
</html>"));
163+
end VoltsHertzController;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
within OpenIPSL.Electrical.Controls.VariableSpeedDrive;
2+
package ControllerLogic "Controller logic for variable speed drive"
3+
extends Modelica.Icons.Package;
4+
annotation (Documentation(info="<html>
5+
<p>This package contains the controlling logic of the variable speed drive model.</p>
6+
</html>"));
7+
end ControllerLogic;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VoltsHertzController

0 commit comments

Comments
 (0)