11within OpenIPSL.Electrical.Renewables.PSSE;
22model Wind "Framework for a wind plant including controllers"
3+ parameter Types.ApparentPower M_b=RenewableGenerator.SysData.S_b "Machine base power" annotation(Dialog(group= "Power flow data" ));
34extends OpenIPSL.Electrical.Essentials.pfComponent(
45 final enablefn= false ,
56 final enableV_b= false ,
@@ -17,6 +18,7 @@ extends OpenIPSL.Electrical.Essentials.pfComponent(
1718 replaceable
1819 OpenIPSL.Electrical.Renewables.PSSE.InverterInterface.BaseClasses.BaseREGC
1920 RenewableGenerator(
21+ M_b= M_b,
2022 P_0= P_0,
2123 Q_0= Q_0,
2224 v_0= v_0,
@@ -35,6 +37,7 @@ extends OpenIPSL.Electrical.Essentials.pfComponent(
3537 replaceable
3638 OpenIPSL.Electrical.Renewables.PSSE.PlantController.BaseClasses.BaseREPC
3739 PlantController(
40+ M_b= M_b,
3841 P_0= P_0,
3942 Q_0= Q_0,
4043 v_0= v_0,
@@ -59,7 +62,8 @@ extends OpenIPSL.Electrical.Essentials.pfComponent(
5962 Modelica.Blocks.Interfaces.RealInput FREQ if QFunctionality > = 4 "Connection Point Frequency"
6063 annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
6164
62- replaceable WindDriveTrain.BaseClasses.BaseWTDT DriveTrain annotation (
65+ replaceable WindDriveTrain.BaseClasses.BaseWTDT DriveTrain(W0= W0)
66+ annotation (
6367 choicesAllMatching=true, Placement(transformation(extent={{-72,-80},{-52,
6468 -60}})));
6569 Modelica.Blocks.Sources.Constant w0(k= W0)
@@ -107,36 +111,39 @@ protected
107111 parameter Boolean pflag = (if TOscillation == 1 then true else false );
108112
109113equation
110- connect (gain1.u, RenewableGenerator.q_0) annotation (Line(points={{51.2,-64},{58.5714,-64},{58.5714,-21.4286}},
114+ connect (gain1.u, RenewableGenerator.q_0) annotation (Line(points={{51.2,-64},
115+ {58.5714,-64},{58.5714,-21.4286}},
111116 color={0,0,127}));
112117 connect (freq_ref.y, PlantController.Freq_ref) annotation (Line(points={{-84.5,
113118 -41},{-88,-41},{-88,-12},{-80,-12}}, color={0,0,127}));
114119 connect (PlantController.Plant_pref, RenewableGenerator.p_0) annotation (Line(
115- points={{-80,4},{-96,4},{-96,-96},{66,-96},{66,-58},{67.1429,-58},{67.1429,-21.4286}},
120+ points={{-80,4},{-96,4},{-96,-96},{66,-96},{66,-58},{67.1429,-58},{
121+ 67.1429,-21.4286}},
116122 color={0,0,127}));
117- connect (PlantController.Qref, RenewableGenerator.q_0) annotation (Line(points={{-80,12},{-98,12},{-98,-98},{58.5714,-98},{58.5714,-21.4286}},
118- color={
123+ connect (PlantController.Qref, RenewableGenerator.q_0) annotation (Line(points={{-80,12},
124+ {-98,12},{-98,-98},{58.5714,-98},{58.5714,-21.4286}}, color={
119125 0,0,127}));
120126 connect (RenewableGenerator.p, pwPin)
121127 annotation (Line(points={{70,0},{100,0}}, color={0,0,255}));
122128 connect (PlantController.Freq, FREQ) annotation (Line(points={{-80,-4},{-92,-4},{-92,0},{-120,0}},
123129 color={0,0,127}));
124130 connect (RenewableController.Iqcmd, RenewableGenerator.Iqcmd)
125- annotation (Line(points={{20.6667,11.3333},{22,11.3333},{22,11.4286},{27.1429,11.4286}},
126- color={0,0,127}));
131+ annotation (Line(points={{20.6667,11.3333},{22,11.3333},{22,11.4286},{
132+ 27.1429,11.4286}}, color={0,0,127}));
127133 connect (RenewableController.Ipcmd, RenewableGenerator.Ipcmd)
128- annotation (Line(points={{20.6667,-11.3333},{22,-11.3333},{22,-11.4286},{27.1429,-11.4286}},
129- color={0,0,127}));
134+ annotation (Line(points={{20.6667,-11.3333},{22,-11.3333},{22,-11.4286},{
135+ 27.1429,-11.4286}}, color={0,0,127}));
130136 connect (RenewableGenerator.V_t, RenewableController.Vt) annotation (Line(
131- points={{38.5714,21.4286},{38.5714,28},{-28,28},{-28,13.3333},{-21.3333,13.3333}},
132- color={0,0,127}));
137+ points={{38.5714,21.4286},{38.5714,28},{-28,28},{-28,13.3333},{-21.3333,
138+ 13.3333}}, color={0,0,127}));
133139 connect (RenewableGenerator.Pgen, RenewableController.Pe) annotation (Line(
134140 points={{50,21.4286},{50,30},{-30,30},{-30,8},{-21.3333,8}}, color={0,0,
135141 127}));
136142 connect (RenewableGenerator.Qgen, RenewableController.Qgen) annotation (Line(
137- points={{61.4286,21.4286},{61.4286,32},{-32,32},{-32,2.66667},{-21.3333,2.66667}},
138- color={0,0,127}));
139- connect (gain.u, RenewableGenerator.p_0) annotation (Line(points={{51.2,-44},{67.1429,-44},{67.1429,-21.4286}},
143+ points={{61.4286,21.4286},{61.4286,32},{-32,32},{-32,2.66667},{-21.3333,
144+ 2.66667}}, color={0,0,127}));
145+ connect (gain.u, RenewableGenerator.p_0) annotation (Line(points={{51.2,-44},{
146+ 67.1429,-44},{67.1429,-21.4286}},
140147 color={0,0,127}));
141148 connect (RenewableGenerator.IQ0, RenewableController.iq0) annotation (Line(
142149 points={{32.8571,-21.4286},{32.8571,-26},{16,-26},{16,-21.3333}},
@@ -152,31 +159,38 @@ equation
152159 connect (RenewableController.p0, RenewableGenerator.p_0) annotation (Line(
153160 points={{-16,-21.3333},{-16,-34},{67.1429,-34},{67.1429,-21.4286}},
154161 color={0,0,127}));
155- connect (gain.y, RenewableController.Pref) annotation (Line(points={{37.4,-44},{-28,-44},{-28,-8},{-21.3333,-8}},
156- color={0,0,127}));
157- connect (gain1.y, RenewableController.Qext) annotation (Line(points={{37.4,-64},{-30,-64},{-30,-2.66667},{-21.3333,-2.66667}},
158- color={0,0,127}));
162+ connect (gain.y, RenewableController.Pref) annotation (Line(points={{37.4,-44},
163+ {-28,-44},{-28,-8},{-21.3333,-8}}, color={0,0,127}));
164+ connect (gain1.y, RenewableController.Qext) annotation (Line(points={{37.4,-64},
165+ {-30,-64},{-30,-2.66667},{-21.3333,-2.66667}}, color={0,0,127}));
159166 connect (PlantController.Qext, RenewableController.Qext) annotation (Line(
160167 points={{-37,10},{-34,10},{-34,-2.66667},{-21.3333,-2.66667}}, color={0,
161168 0,127}));
162169 connect (PlantController.Pref, RenewableController.Pref) annotation (Line(
163170 points={{-37,-10},{-21.3333,-10},{-21.3333,-8}}, color={0,0,127}));
164- connect (PlantController.q0, RenewableController.q0) annotation (Line(points={{-46,-22},{-46,-32},{-8,-32},{-8,-21.3333}},
165- color={0,0,127}));
166- connect (PlantController.v0, RenewableController.v0) annotation (Line(points={{-58,-22},{-58,-30},{0,-30},{0,-21.3333}},
167- color={0,0,127}));
168- connect (PlantController.p0, RenewableController.p0) annotation (Line(points={{-70,-22},{-70,-34},{-16,-34},{-16,-21.3333}},
169- color={0,0,127}));
170- connect (DriveTrain.wg, RenewableController.Wg) annotation (Line(points={{-51.1667,-75},{-32,-75},{-32,-13.3333},{-21.3333,-13.3333}},
171+ connect (PlantController.q0, RenewableController.q0) annotation (Line(points={{-46,-22},
172+ {-46,-32},{-8,-32},{-8,-21.3333}}, color={0,0,127}));
173+ connect (PlantController.v0, RenewableController.v0) annotation (Line(points={{-58,-22},
174+ {-58,-30},{0,-30},{0,-21.3333}}, color={0,0,127}));
175+ connect (PlantController.p0, RenewableController.p0) annotation (Line(points={{-70,-22},
176+ {-70,-34},{-16,-34},{-16,-21.3333}}, color={0,0,127}));
177+ connect (DriveTrain.wg, RenewableController.Wg) annotation (Line(points={{
178+ -51.1667,-75},{-32,-75},{-32,-13.3333},{-21.3333,-13.3333}},
171179 color={0,0,127}));
172- connect (DriveTrain.Pe, RenewableGenerator.Pgen) annotation (Line(points={{-73.6667,-75},{-80,-75},{-80,-94},{80,-94},{80,30},{50,30},{50,21.4286}},
180+ connect (DriveTrain.Pe, RenewableGenerator.Pgen) annotation (Line(points={{
181+ -73.6667,-75},{-80,-75},{-80,-94},{80,-94},{80,30},{50,30},{50,
182+ 21.4286}},
173183 color={0,0,127}));
174- connect (DriveTrain.Pm, RenewableGenerator.p_0) annotation (Line(points={{-73.6667,-65},{-88,-65},{-88,-96},{66,-96},{66,-58},{67.1429,-58},{67.1429,-21.4286}},
175- color={0,0,
184+ connect (DriveTrain.Pm, RenewableGenerator.p_0) annotation (Line(points={{
185+ -73.6667,-65},{-88,-65},{-88,-96},{66,-96},{66,-58},{67.1429,-58},{
186+ 67.1429,-21.4286}}, color={0,0,
176187 127}));
177- connect (DriveTrain.P0, RenewableGenerator.p_0) annotation (Line(points={{-57,-81.6667},{-57,-86},{-18,-86},{-18,-34},{67.1429,-34},{67.1429,-21.4286}},
188+ connect (DriveTrain.P0, RenewableGenerator.p_0) annotation (Line(points={{-57,
189+ -81.6667},{-57,-86},{-18,-86},{-18,-34},{67.1429,-34},{67.1429,
190+ -21.4286}},
178191 color={0,0,127}));
179- connect (w0.y, DriveTrain.W_0) annotation (Line(points={{-0.5,-85},{-8,-85},{-8,-90},{-67,-90},{-67,-81.6667}},
192+ connect (w0.y, DriveTrain.W_0) annotation (Line(points={{-0.5,-85},{-8,-85},{
193+ -8,-90},{-67,-90},{-67,-81.6667}},
180194 color={0,0,127}));
181195 connect (PlantController.branch_ii, branch_ii) annotation (Line(points={{-62,
182196 22},{-62,58},{-30,58},{-30,80}}, color={0,0,127}));
0 commit comments