Ticket #5620: InvPWM.mo

File InvPWM.mo, 224.5 KB (added by massimo ceraolo, 5 years ago)
Line 
1encapsulated package InvPWM
2 import Modelica;
3 import PowerSystems;
4 import PowerSystems_Control_Modulation_SVPWM;
5 import ElettricoCeraolo;
6 // euro symbol €
7
8 package SinglePhase
9 model OneSQWId "bidirectional switches, one-leg, square wave"
10 Modelica.Electrical.Analog.Basic.Ground ground annotation (
11 Placement(visible = true, transformation(extent = {{-50, -18}, {-30, 2}}, rotation = 0)));
12 Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
13 Placement(visible = true, transformation(extent = {{38, -60}, {58, -40}}, rotation = 0)));
14 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
15 Placement(visible = true, transformation(origin = {-56, 18}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
16 Modelica.Electrical.Analog.Basic.Resistor Load(R = 2) annotation (
17 Placement(visible = true, transformation(origin = {48, -22}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
18 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
19 Placement(visible = true, transformation(origin = {-56, -26}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
20 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWu annotation (
21 Placement(visible = true, transformation(origin = {-20, 32}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
22 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWd annotation (
23 Placement(visible = true, transformation(origin = {-20, -38}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
24 Modelica.Blocks.Sources.BooleanPulse booleanPulse(period = 1 / 50) annotation (
25 Placement(visible = true, transformation(extent = {{36, 36}, {16, 56}}, rotation = 0)));
26 Modelica.Blocks.MathBoolean.Not nor1 annotation (
27 Placement(visible = true, transformation(origin = {0, 22}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
28 Modelica.Electrical.Analog.Basic.Inductor inductor(L = 0.005) annotation (
29 Placement(visible = true, transformation(origin = {48, 6}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
30 equation
31 connect(inductor.n, Load.p) annotation (
32 Line(points = {{48, -4}, {48, -12}}, color = {0, 0, 255}));
33 connect(inductor.p, SWu.n) annotation (
34 Line(points = {{48, 16}, {12, 16}, {12, 4}, {-20, 4}, {-20, 22}}, color = {0, 0, 255}));
35 connect(Load.n, ground1.p) annotation (
36 Line(points = {{48, -32}, {48, -40}}, color = {0, 0, 255}));
37 connect(nor1.u, booleanPulse.y) annotation (
38 Line(points = {{0, 27.6}, {0, 46}, {15, 46}}, color = {255, 0, 255}));
39 connect(nor1.y, SWd.control) annotation (
40 Line(points = {{0, 17.2}, {0, -38}, {-8, -38}}, color = {255, 0, 255}));
41 connect(SWu.p, V1.p) annotation (
42 Line(points = {{-20, 42}, {-20, 58}, {-56, 58}, {-56, 28}}, color = {0, 0, 255}));
43 connect(SWu.n, SWd.p) annotation (
44 Line(points = {{-20, 22}, {-20, -28}}, color = {0, 0, 255}));
45 connect(booleanPulse.y, SWu.control) annotation (
46 Line(points = {{15, 46}, {-10.5, 46}, {-36, 46}, {-36, 32}, {-32, 32}}, color = {255, 0, 255}));
47 connect(SWd.n, V2.n) annotation (
48 Line(points = {{-20, -48}, {-20, -58}, {-56, -58}, {-56, -47}, {-56, -47}, {-56, -36}}, color = {0, 0, 255}));
49 connect(V1.n, V2.p) annotation (
50 Line(points = {{-56, 8}, {-56, -16}, {-56, -16}}, color = {0, 0, 255}));
51 connect(ground.p, V1.n) annotation (
52 Line(points = {{-40, 2}, {-40, 5}, {-40, 5}, {-40, 8}, {-48, 8}, {-48, 8}, {-56, 8}}, color = {0, 0, 255}));
53 annotation (
54 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-80, -60}, {80, 60}})),
55 experiment(StopTime = 0.1, StartTime = 0, Tolerance = 1e-06, Interval = 0.0002),
56 Documentation(info = "<html><head></head><body><p>Il risultato è identico a quello che si ha con interruttori pilotati e diodi in antiparallelo entrambi ideali.</p>
57<p>Questo perché con un controllo senza blanking time i due inverter sono identici.</p>
58<p>Il sistema più fisico è superiore perché consente di valutare anche gli effetti del blanking time.</p>
59</body></html>"),
60 Icon(coordinateSystem(extent = {{-80, -80}, {80, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})),
61 __OpenModelica_commandLineOptions = "");
62 end OneSQWId;
63
64 model OneSQWRe "switch-diode pairs, one leg, square wave"
65 Modelica.Electrical.Analog.Basic.Ground ground annotation (
66 Placement(visible = true, transformation(extent = {{-82, -34}, {-62, -14}}, rotation = 0)));
67 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
68 Placement(visible = true, transformation(origin = {-58, 4}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
69 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
70 Placement(visible = true, transformation(origin = {-58, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
71 Modelica.Blocks.Sources.BooleanPulse booleanPulse(period = 1 / 50) annotation (
72 Placement(visible = true, transformation(extent = {{34, 30}, {14, 50}}, rotation = 0)));
73 Modelica.Blocks.MathBoolean.Not nor1 annotation (
74 Placement(visible = true, transformation(origin = {6, 14}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
75 Modelica.Electrical.Analog.Ideal.IdealDiode uD(Vknee = 0.1) annotation (
76 Placement(visible = true, transformation(origin = {-38, 26}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
77 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW(Vknee = 0.1) annotation (
78 Placement(visible = true, transformation(origin = {-18, 26}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
79 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW(Vknee = 0.1) annotation (
80 Placement(visible = true, transformation(origin = {-18, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
81 Modelica.Electrical.Analog.Ideal.IdealDiode dD(Vknee = 0.1) annotation (
82 Placement(visible = true, transformation(origin = {-38, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
83 Modelica.Electrical.Analog.Basic.Inductor inductor(L = 0.005) annotation (
84 Placement(visible = true, transformation(origin = {24, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
85 Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
86 Placement(visible = true, transformation(extent = {{50, -52}, {70, -32}}, rotation = 0)));
87 Modelica.Electrical.Analog.Basic.Resistor Load(R = 2) annotation (
88 Placement(visible = true, transformation(origin = {60, -16}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
89 equation
90 connect(Load.n, ground1.p) annotation (
91 Line(points = {{60, -26}, {60, -32}}, color = {0, 0, 255}));
92 connect(inductor.n, Load.p) annotation (
93 Line(points = {{34, 0}, {61, 0}, {61, -6}, {60, -6}}, color = {0, 0, 255}));
94 connect(inductor.p, dSW.p) annotation (
95 Line(points = {{14, 0}, {-28, 0}, {-28, -14}, {-18, -14}}, color = {0, 0, 255}));
96 connect(V2.n, dD.p) annotation (
97 Line(points = {{-58, -42}, {-58, -48}, {-38, -48}, {-38, -34}}, color = {0, 0, 255}));
98 connect(dSW.n, dD.p) annotation (
99 Line(points = {{-18, -34}, {-18, -48}, {-38, -48}, {-38, -34}}, color = {0, 0, 255}));
100 connect(dD.n, dSW.p) annotation (
101 Line(points = {{-38, -14}, {-38, -14}, {-18, -14}}, color = {0, 0, 255}));
102 connect(uD.p, dSW.p) annotation (
103 Line(points = {{-38, 16}, {-38, 8}, {-28, 8}, {-28, -14}, {-18, -14}}, color = {0, 0, 255}));
104 connect(nor1.y, dSW.fire) annotation (
105 Line(points = {{6, 9.2}, {6, -34}, {-6, -34}}, color = {255, 0, 255}));
106 connect(uSW.fire, booleanPulse.y) annotation (
107 Line(points = {{-6, 16}, {-6, 40}, {13, 40}}, color = {255, 0, 255}));
108 connect(uD.p, uSW.n) annotation (
109 Line(points = {{-38, 16}, {-38, 8}, {-18, 8}, {-18, 16}}, color = {0, 0, 255}));
110 connect(uSW.p, uD.n) annotation (
111 Line(points = {{-18, 36}, {-18, 36}, {-18, 40}, {-38, 40}, {-38, 36}}, color = {0, 0, 255}));
112 connect(V1.p, uD.n) annotation (
113 Line(points = {{-58, 14}, {-58, 46}, {-28, 46}, {-28, 40}, {-38, 40}, {-38, 36}}, color = {0, 0, 255}));
114 connect(nor1.u, booleanPulse.y) annotation (
115 Line(points = {{6, 19.6}, {6, 40}, {13, 40}}, color = {255, 0, 255}));
116 connect(V1.n, V2.p) annotation (
117 Line(points = {{-58, -6}, {-58, -22}}, color = {0, 0, 255}));
118 connect(ground.p, V1.n) annotation (
119 Line(points = {{-72, -14}, {-72, -8}, {-72, -6}, {-58, -6}, {-58, -6}}, color = {0, 0, 255}));
120 annotation (
121 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-80, -60}, {80, 60}})),
122 experiment(StopTime = 0.1),
123 Documentation(info = "<html><head></head><body><p><br></p>
124</body></html>", revisions = "<html><head></head><body>newInst OK</body></html>"),
125 Icon(coordinateSystem(extent = {{-80, -60}, {80, 60}}, preserveAspectRatio = false)),
126 __OpenModelica_commandLineOptions = "");
127 end OneSQWRe;
128
129 model TwoSQWRe "Switch-diode pais, two-legs, square wave"
130 Modelica.Electrical.Analog.Basic.Ground ground annotation (
131 Placement(visible = true, transformation(extent = {{82, -54}, {102, -34}}, rotation = 0)));
132 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 100) annotation (
133 Placement(visible = true, transformation(origin = {-70, 18}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
134 Modelica.Blocks.Sources.BooleanPulse booleanPulse(period = 1 / 50) annotation (
135 Placement(visible = true, transformation(extent = {{100, 54}, {80, 74}}, rotation = 0)));
136 Modelica.Blocks.MathBoolean.Not nor1 annotation (
137 Placement(visible = true, transformation(origin = {-8, -14}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
138 Modelica.Electrical.Analog.Ideal.IdealDiode uD(Vknee = 0.1) annotation (
139 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 90, origin = {-50, 40})));
140 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW(Vknee = 0.1) annotation (
141 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-30, 40})));
142 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW(Vknee = 0.1) annotation (
143 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-30, -18})));
144 Modelica.Electrical.Analog.Ideal.IdealDiode dD(Vknee = 0.1) annotation (
145 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 90, origin = {-50, -18})));
146 Modelica.Electrical.Analog.Basic.Inductor inductor(L = 0.005) annotation (
147 Placement(visible = true, transformation(origin = {92, 18}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
148 Modelica.Electrical.Analog.Basic.Resistor Load(R = 1) annotation (
149 Placement(visible = true, transformation(origin = {92, -10}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
150 Modelica.Electrical.Analog.Ideal.IdealDiode uD1(Vknee = 0.1) annotation (
151 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 90, origin = {12, 40})));
152 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW1(Vknee = 0.1) annotation (
153 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {32, 40})));
154 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW1(Vknee = 0.1) annotation (
155 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {32, -18})));
156 Modelica.Electrical.Analog.Ideal.IdealDiode dD1(Vknee = 0.1) annotation (
157 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 90, origin = {12, -18})));
158 Modelica.Blocks.MathBoolean.Not nor2 annotation (
159 Placement(visible = true, transformation(origin = {42, 50}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
160 Modelica.Electrical.Analog.Sensors.PowerSensor powerSensor annotation (
161 Placement(transformation(extent = {{62, 24}, {82, 44}})));
162 Modelica.Blocks.Math.Mean meanP(f = 50) annotation (
163 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {64, -30})));
164 equation
165 connect(inductor.n, Load.p) annotation (
166 Line(points = {{92, 8}, {92, 0}}, color = {0, 0, 255}));
167 connect(uSW.p, uD.n) annotation (
168 Line(points = {{-30, 50}, {-30, 54}, {-50, 54}, {-50, 50}}, color = {0, 0, 255}));
169 connect(uD.p, uSW.n) annotation (
170 Line(points = {{-50, 30}, {-50, 22}, {-30, 22}, {-30, 30}}, color = {0, 0, 255}));
171 connect(dD.n, dSW.p) annotation (
172 Line(points = {{-50, -8}, {-30, -8}}, color = {0, 0, 255}));
173 connect(dSW.n, dD.p) annotation (
174 Line(points = {{-30, -28}, {-30, -42}, {-50, -42}, {-50, -28}}, color = {0, 0, 255}));
175 connect(V1.p, uD.n) annotation (
176 Line(points = {{-70, 28}, {-70, 60}, {-40, 60}, {-40, 54}, {-50, 54}, {-50, 50}}, color = {0, 0, 255}));
177 connect(uD.p, dSW.p) annotation (
178 Line(points = {{-50, 30}, {-50, 22}, {-40, 22}, {-40, -8}, {-30, -8}}, color = {0, 0, 255}));
179 connect(uSW1.p, uD1.n) annotation (
180 Line(points = {{32, 50}, {32, 54}, {12, 54}, {12, 50}}, color = {0, 0, 255}));
181 connect(uD1.p, uSW1.n) annotation (
182 Line(points = {{12, 30}, {12, 22}, {32, 22}, {32, 30}}, color = {0, 0, 255}));
183 connect(dD1.n, dSW1.p) annotation (
184 Line(points = {{12, -8}, {32, -8}}, color = {0, 0, 255}));
185 connect(dSW1.n, dD1.p) annotation (
186 Line(points = {{32, -28}, {32, -42}, {12, -42}, {12, -28}}, color = {0, 0, 255}));
187 connect(V1.p, uD1.n) annotation (
188 Line(points = {{-70, 28}, {-70, 60}, {22, 60}, {22, 54}, {12, 54}, {12, 50}}, color = {0, 0, 255}));
189 connect(uD1.p, dSW1.p) annotation (
190 Line(points = {{12, 30}, {12, 22}, {22, 22}, {22, -8}, {32, -8}}, color = {0, 0, 255}));
191 connect(Load.n, dSW1.p) annotation (
192 Line(points = {{92, -20}, {92, -24}, {78, -24}, {78, 2}, {32, 2}, {32, -8}}, color = {0, 0, 255}));
193 connect(ground.p, dSW1.p) annotation (
194 Line(points = {{92, -34}, {92, -24}, {78, -24}, {78, 2}, {32, 2}, {32, -8}}, color = {0, 0, 255}));
195 connect(V1.n, dD.p) annotation (
196 Line(points = {{-70, 8}, {-70, -42}, {-50, -42}, {-50, -28}}, color = {0, 0, 255}));
197 connect(nor1.y, dSW.fire) annotation (
198 Line(points = {{-8, -18.8}, {-8, -28}, {-18, -28}}, color = {255, 0, 255}));
199 connect(nor2.y, uSW1.fire) annotation (
200 Line(points = {{42, 45.2}, {42, 30}, {44, 30}}, color = {255, 0, 255}));
201 connect(booleanPulse.y, nor2.u) annotation (
202 Line(points = {{79, 64}, {42, 64}, {42, 55.6}}, color = {255, 0, 255}));
203 connect(dSW1.fire, nor2.u) annotation (
204 Line(points = {{44, -28}, {50, -28}, {50, 64}, {42, 64}, {42, 55.6}}, color = {255, 0, 255}));
205 connect(uSW.fire, nor2.u) annotation (
206 Line(points = {{-18, 30}, {-14, 30}, {-14, 64}, {42, 64}, {42, 55.6}}, color = {255, 0, 255}));
207 connect(nor1.u, nor2.u) annotation (
208 Line(points = {{-8, -8.4}, {-8, 64}, {42, 64}, {42, 55.6}}, color = {255, 0, 255}));
209 connect(V1.n, dD1.p) annotation (
210 Line(points = {{-70, 8}, {-70, -42}, {12, -42}, {12, -28}}, color = {0, 0, 255}));
211 connect(powerSensor.pv, powerSensor.nc) annotation (
212 Line(points = {{72, 44}, {82, 44}, {82, 34}}, color = {0, 0, 255}));
213 connect(powerSensor.nc, inductor.p) annotation (
214 Line(points = {{82, 34}, {92, 34}, {92, 28}}, color = {0, 0, 255}));
215 connect(powerSensor.pc, dSW.p) annotation (
216 Line(points = {{62, 34}, {62, 16}, {-40, 16}, {-40, -8}, {-30, -8}}, color = {0, 0, 255}));
217 connect(powerSensor.nv, dSW1.p) annotation (
218 Line(points = {{72, 24}, {72, 2}, {32, 2}, {32, -8}}, color = {0, 0, 255}));
219 connect(meanP.u, powerSensor.power) annotation (
220 Line(points = {{64, -18}, {64, 2}, {64, 23}, {62, 23}}, color = {0, 0, 127}));
221 annotation (
222 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-80, -60}, {120, 80}})),
223 experiment(StopTime = 0.1),
224 Documentation(info = "<html><head></head><body><p><br></p>
225</body></html>", revisions = "<html><head></head><body>no newInst</body></html>"),
226 Icon(coordinateSystem(extent = {{-80, -60}, {120, 80}}, preserveAspectRatio = false)));
227 end TwoSQWRe;
228
229 model VCRe "Voltage cancellation scheme"
230 Modelica.Electrical.Analog.Basic.Ground ground annotation (
231 Placement(visible = true, transformation(extent = {{-96, -80}, {-76, -60}}, rotation = 0)));
232 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 100) annotation (
233 Placement(visible = true, transformation(origin = {-86, 4}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
234 Modelica.Blocks.Sources.BooleanPulse basePulse(period = 1 / 50) annotation (
235 Placement(visible = true, transformation(extent = {{96, 34}, {76, 54}}, rotation = 0)));
236 Modelica.Blocks.MathBoolean.Not nor1 annotation (
237 Placement(visible = true, transformation(origin = {-34, -14}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
238 Modelica.Electrical.Analog.Ideal.IdealDiode uD(Vknee = 0.1) annotation (
239 Placement(visible = true, transformation(origin = {-66, 26}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
240 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW(Vknee = 0.1, off(start = false)) annotation (
241 Placement(visible = true, transformation(origin = {-46, 26}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
242 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW(Vknee = 0.1) annotation (
243 Placement(visible = true, transformation(origin = {-46, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
244 Modelica.Electrical.Analog.Ideal.IdealDiode dD(Vknee = 0.1) annotation (
245 Placement(visible = true, transformation(origin = {-66, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
246 Modelica.Electrical.Analog.Basic.Inductor inductor(L = 67.36e-3) annotation (
247 Placement(visible = true, transformation(origin = {84, 4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
248 Modelica.Electrical.Analog.Basic.Resistor Load(R = 42.32) annotation (
249 Placement(visible = true, transformation(origin = {84, -22}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
250 Modelica.Electrical.Analog.Ideal.IdealDiode uD1(Vknee = 0.1) annotation (
251 Placement(visible = true, transformation(origin = {-4, 26}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
252 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW1(Vknee = 0.1) annotation (
253 Placement(visible = true, transformation(origin = {16, 26}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
254 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW1(Vknee = 0.1, off(start = false)) annotation (
255 Placement(visible = true, transformation(origin = {16, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
256 Modelica.Electrical.Analog.Ideal.IdealDiode dD1(Vknee = 0.1) annotation (
257 Placement(visible = true, transformation(origin = {-4, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
258 Modelica.Blocks.MathBoolean.Not nor2 annotation (
259 Placement(visible = true, transformation(origin = {28, -6}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
260 Modelica.Electrical.Analog.Sensors.PowerSensor powerSensor annotation (
261 Placement(visible = true, transformation(extent = {{46, 10}, {66, 30}}, rotation = 0)));
262 Modelica.Blocks.Math.Mean meanP(f = 50) annotation (
263 Placement(visible = true, transformation(origin = {48, -44}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
264 Modelica.Blocks.Sources.BooleanPulse delPulse(period = 1 / 50, startTime = 0.006) annotation (
265 Placement(visible = true, transformation(extent = {{58, 52}, {38, 72}}, rotation = 0)));
266 equation
267 connect(inductor.n, Load.p) annotation (
268 Line(points = {{84, -6}, {84, -12}}, color = {0, 0, 255}));
269 connect(uSW.p, uD.n) annotation (
270 Line(points = {{-46, 36}, {-46, 40}, {-66, 40}, {-66, 36}}, color = {0, 0, 255}));
271 connect(uD.p, uSW.n) annotation (
272 Line(points = {{-66, 16}, {-66, 8}, {-46, 8}, {-46, 16}}, color = {0, 0, 255}));
273 connect(dD.n, dSW.p) annotation (
274 Line(points = {{-66, -22}, {-46, -22}}, color = {0, 0, 255}));
275 connect(dSW.n, dD.p) annotation (
276 Line(points = {{-46, -42}, {-46, -56}, {-66, -56}, {-66, -42}}, color = {0, 0, 255}));
277 connect(V1.p, uD.n) annotation (
278 Line(points = {{-86, 14}, {-86, 46}, {-56, 46}, {-56, 40}, {-66, 40}, {-66, 36}}, color = {0, 0, 255}));
279 connect(uD.p, dSW.p) annotation (
280 Line(points = {{-66, 16}, {-66, 8}, {-56, 8}, {-56, -22}, {-46, -22}}, color = {0, 0, 255}));
281 connect(uSW1.p, uD1.n) annotation (
282 Line(points = {{16, 36}, {16, 40}, {-4, 40}, {-4, 36}}, color = {0, 0, 255}));
283 connect(uD1.p, uSW1.n) annotation (
284 Line(points = {{-4, 16}, {-4, 8}, {16, 8}, {16, 16}}, color = {0, 0, 255}));
285 connect(dD1.n, dSW1.p) annotation (
286 Line(points = {{-4, -22}, {16, -22}}, color = {0, 0, 255}));
287 connect(dSW1.n, dD1.p) annotation (
288 Line(points = {{16, -42}, {16, -56}, {-4, -56}, {-4, -42}}, color = {0, 0, 255}));
289 connect(V1.p, uD1.n) annotation (
290 Line(points = {{-86, 14}, {-86, 46}, {6, 46}, {6, 40}, {-4, 40}, {-4, 36}}, color = {0, 0, 255}));
291 connect(uD1.p, dSW1.p) annotation (
292 Line(points = {{-4, 16}, {-4, 8}, {6, 8}, {6, -22}, {16, -22}}, color = {0, 0, 255}));
293 connect(Load.n, dSW1.p) annotation (
294 Line(points = {{84, -32}, {84, -38}, {68, -38}, {68, -12}, {16, -12}, {16, -22}}, color = {0, 0, 255}));
295 connect(V1.n, dD.p) annotation (
296 Line(points = {{-86, -6}, {-86, -56}, {-66, -56}, {-66, -42}}, color = {0, 0, 255}));
297 connect(V1.n, dD1.p) annotation (
298 Line(points = {{-86, -6}, {-86, -56}, {-4, -56}, {-4, -42}}, color = {0, 0, 255}));
299 connect(powerSensor.pv, powerSensor.nc) annotation (
300 Line(points = {{72, 44}, {82, 44}, {82, 34}}, color = {0, 0, 255}));
301 connect(powerSensor.nc, inductor.p) annotation (
302 Line(points = {{66, 20}, {84, 20}, {84, 14}}, color = {0, 0, 255}));
303 connect(powerSensor.pc, dSW.p) annotation (
304 Line(points = {{46, 20}, {46, 6}, {-56, 6}, {-56, -22}, {-46, -22}}, color = {0, 0, 255}));
305 connect(powerSensor.nv, dSW1.p) annotation (
306 Line(points = {{56, 10}, {56, -12}, {16, -12}, {16, -22}}, color = {0, 0, 255}));
307 connect(meanP.u, powerSensor.power) annotation (
308 Line(points = {{48, -32}, {48, -12}, {48, 9}, {46, 9}}, color = {0, 0, 127}));
309 connect(basePulse.y, uSW.fire) annotation (
310 Line(points = {{75, 44}, {-34, 44}, {-34, 16}}, color = {255, 0, 255}));
311 connect(ground.p, dD.p) annotation (
312 Line(points = {{-86, -60}, {-86, -56}, {-66, -56}, {-66, -42}}, color = {0, 0, 255}));
313 connect(nor1.y, dSW.fire) annotation (
314 Line(points = {{-34, -18.8}, {-34, -42}}, color = {255, 0, 255}));
315 connect(nor1.u, uSW.fire) annotation (
316 Line(points = {{-34, -8.4}, {-34, 16}}, color = {255, 0, 255}));
317 connect(delPulse.y, uSW1.fire) annotation (
318 Line(points = {{37, 62}, {28, 62}, {28, 16}}, color = {255, 0, 255}));
319 connect(uSW1.fire, nor2.u) annotation (
320 Line(points = {{28, 16}, {28, -0.4}}, color = {255, 0, 255}));
321 connect(nor2.y, dSW1.fire) annotation (
322 Line(points = {{28, -10.8}, {28, -42}}, color = {255, 0, 255}));
323 annotation (
324 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -80}, {100, 80}})),
325 experiment(StopTime = 0.04),
326 Documentation(info = "<html>
327<p>Questo inverter ad onda quadra ha la logica &quot;voltage cancellation&quot; di Mohan alla pag. 219.</p>
328<p><br>Il tempo di cancellazione &egrave; mezzo periodo meno il ritardo di delPulse. Se ad es. il ritardo di delPulse &egrave; 6 ms, il tempo di cancellazione &egrave; di 4 e quindi ho un rapporto pieni/vuoti di 3/2.</p>
329<p>L&apos;inverter monofase VC ha importanza in quanto &egrave; uno di quelli usati nella ricarica wireless.</p>
330</html>", revisions = "<html><head></head><body>no newInst</body></html>"),
331 Icon(coordinateSystem(extent = {{-80, -60}, {120, 80}}, preserveAspectRatio = false)));
332 end VCRe;
333
334 model OnePwmId "bidirectional switches, one-leg, PWM"
335 Modelica.Blocks.Sources.Constant ampl(k = 0.7) annotation (
336 Placement(visible = true, transformation(origin = {32, 60}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
337 Modelica.Blocks.Sources.Constant phase(k = 0) annotation (
338 Placement(visible = true, transformation(origin = {58, 40}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
339 Support.PwmPulser pwmPulser annotation (
340 Placement(visible = true, transformation(origin = {-15, 46}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
341 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWd annotation (
342 Placement(visible = true, transformation(origin = {-50, -36}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
343 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWu annotation (
344 Placement(visible = true, transformation(origin = {-52, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
345 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
346 Placement(visible = true, transformation(origin = {-84, -24}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
347 Modelica.Electrical.Analog.Basic.Resistor Load(R = 2) annotation (
348 Placement(visible = true, transformation(origin = {92, -24}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
349 Modelica.Electrical.Analog.Basic.Capacitor Cf(C = 634e-6) annotation (
350 Placement(visible = true, transformation(origin = {64, -28}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
351 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
352 Placement(visible = true, transformation(origin = {-84, 20}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
353 Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
354 Placement(visible = true, transformation(origin = {104, -52}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
355 Modelica.Electrical.Analog.Sensors.PotentialSensor vSens annotation (
356 Placement(visible = true, transformation(origin = {107, 9}, extent = {{-9, -9}, {9, 9}}, rotation = 90)));
357 Modelica.Electrical.Analog.Basic.Ground ground annotation (
358 Placement(visible = true, transformation(origin = {-70, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
359 Modelica.Electrical.Analog.Basic.Inductor Lf(L = 0.001) annotation (
360 Placement(visible = true, transformation(origin = {6, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
361 Modelica.Electrical.Analog.Basic.Resistor Rf(R = 0.05) annotation (
362 Placement(visible = true, transformation(origin = {-22, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
363 Modelica.Electrical.Analog.Sensors.PowerSensor pow annotation (
364 Placement(transformation(extent = {{24, -10}, {44, 10}})));
365 Modelica.Blocks.Math.Mean meanP(f = 100) annotation (
366 Placement(visible = true, transformation(origin = {8, -36}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
367 Modelica.Blocks.Math.RootMeanSquare vRMS(f = 50) annotation (
368 Placement(visible = true, transformation(origin = {106, 42}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
369 equation
370 connect(SWu.n, SWd.p) annotation (
371 Line(points = {{-52, 30}, {-52, -26}, {-50, -26}}, color = {0, 0, 255}));
372 connect(SWu.p, V1.p) annotation (
373 Line(points = {{-52, 50}, {-52, 60}, {-84, 60}, {-84, 30}}, color = {0, 0, 255}));
374 connect(Rf.p, SWu.n) annotation (
375 Line(points = {{-32, 0}, {-52, 0}, {-52, 30}}, color = {0, 0, 255}));
376 connect(pwmPulser.down, SWu.control) annotation (
377 Line(points = {{-29.3, 38.46}, {-40, 38.46}, {-40, 40}, {-40, 40}}, color = {255, 0, 255}));
378 connect(phase.y, pwmPulser.ph_deg) annotation (
379 Line(points = {{47, 40}, {16, 40}, {16, 38.98}, {0.6, 38.98}}, color = {0, 0, 127}));
380 connect(ampl.y, pwmPulser.ampl) annotation (
381 Line(points = {{21, 60}, {12, 60}, {12, 54.32}, {0.6, 54.32}}, color = {0, 0, 127}));
382 connect(pwmPulser.up, SWd.control) annotation (
383 Line(points = {{-29.3, 54.58}, {-36, 54.58}, {-36, -36}, {-38, -36}}, color = {255, 0, 255}));
384 connect(Lf.p, Rf.n) annotation (
385 Line(points = {{-4, 0}, {-10, 0}, {-12, 0}}, color = {0, 0, 255}));
386 connect(ground.p, V1.n) annotation (
387 Line(points = {{-70, 4}, {-70, 10}, {-84, 10}}, color = {0, 0, 255}));
388 connect(vSens.p, Load.p) annotation (
389 Line(points = {{107, 1.77636e-015}, {92, 1.77636e-015}, {92, -14}}, color = {0, 0, 255}));
390 connect(V1.n, V2.p) annotation (
391 Line(points = {{-84, 10}, {-84, -14}, {-84, -14}}, color = {0, 0, 255}));
392 connect(Load.n, Cf.n) annotation (
393 Line(points = {{92, -34}, {92, -50}, {64, -50}, {64, -38}}, color = {0, 0, 255}));
394 connect(SWd.n, V2.n) annotation (
395 Line(points = {{-50, -46}, {-50, -56}, {-84, -56}, {-84, -34}}, color = {0, 0, 255}));
396 connect(Lf.n, pow.pc) annotation (
397 Line(points = {{16, 0}, {24, 0}}, color = {0, 0, 255}));
398 connect(pow.pv, pow.pc) annotation (
399 Line(points = {{34, 10}, {30, 10}, {24, 10}, {24, 0}}, color = {0, 0, 255}));
400 connect(pow.nv, Cf.n) annotation (
401 Line(points = {{34, -10}, {34, -50}, {64, -50}, {64, -38}}, color = {0, 0, 255}));
402 connect(pow.nc, Load.p) annotation (
403 Line(points = {{44, 0}, {92, 0}, {92, -14}}, color = {0, 0, 255}));
404 connect(Cf.p, Load.p) annotation (
405 Line(points = {{64, -18}, {64, 0}, {92, 0}, {92, -14}}, color = {0, 0, 255}));
406 connect(ground1.p, Cf.n) annotation (
407 Line(points = {{104, -42}, {92, -42}, {92, -50}, {64, -50}, {64, -38}}, color = {0, 0, 255}));
408 connect(meanP.u, pow.power) annotation (
409 Line(points = {{8, -24}, {8, -24}, {8, -16}, {24, -16}, {24, -11}}, color = {0, 0, 127}));
410 connect(vRMS.u, vSens.phi) annotation (
411 Line(points = {{106, 30}, {106, 24}, {108, 24}, {108, 18}}, color = {0, 0, 127}));
412 annotation (
413 experiment(StopTime = 0.1),
414 experimentSetupOutput,
415 Documentation(info = "<html><head></head><body><p><br></p>
416</body></html>"),
417 Diagram(coordinateSystem(extent = {{-100, -60}, {120, 80}}, preserveAspectRatio = false)),
418 Icon(coordinateSystem(extent = {{-100, -60}, {120, 80}}, preserveAspectRatio = false)));
419 end OnePwmId;
420
421 model TwoPwmId "Id switches - TwoLegs"
422 Modelica.Blocks.Sources.Constant ampl(k = 0.7) annotation (
423 Placement(visible = true, transformation(origin = {109, 59}, extent = {{-7, 7}, {7, -7}}, rotation = 180)));
424 Modelica.Blocks.Sources.Constant phase(k = 0) annotation (
425 Placement(visible = true, transformation(origin = {87, 45}, extent = {{-7, 7}, {7, -7}}, rotation = 180)));
426 Support.PwmPulser pwmPulser annotation (
427 Placement(visible = true, transformation(origin = {49, 52}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
428 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWd annotation (
429 Placement(visible = true, transformation(origin = {-72, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
430 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWu annotation (
431 Placement(visible = true, transformation(origin = {-72, 42}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
432 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 25) annotation (
433 Placement(visible = true, transformation(origin = {-100, -24}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
434 Modelica.Electrical.Analog.Basic.Resistor Load(R = 2) annotation (
435 Placement(visible = true, transformation(origin = {82, -4}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
436 Modelica.Electrical.Analog.Basic.Capacitor Cf(C = 634e-6) annotation (
437 Placement(visible = true, transformation(origin = {60, -8}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
438 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 25) annotation (
439 Placement(visible = true, transformation(origin = {-100, 20}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
440 Modelica.Electrical.Analog.Basic.Ground ground annotation (
441 Placement(visible = true, transformation(origin = {-116, -18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
442 Modelica.Electrical.Analog.Basic.Inductor Lf(L = 0.001) annotation (
443 Placement(visible = true, transformation(origin = {40, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
444 Modelica.Electrical.Analog.Basic.Resistor Rf(R = 0.05) annotation (
445 Placement(visible = true, transformation(origin = {12, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
446 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWu1 annotation (
447 Placement(visible = true, transformation(origin = {-42, 42}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
448 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWu2 annotation (
449 Placement(visible = true, transformation(origin = {-42, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
450 Modelica.Blocks.Sources.BooleanExpression ul(y = pwmPulser.up) annotation (
451 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {-62, 66})));
452 Modelica.Blocks.Sources.BooleanExpression ur(y = pwmPulser.down) annotation (
453 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {-34, 64})));
454 Modelica.Blocks.Sources.BooleanExpression dl(y = pwmPulser.down) annotation (
455 Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = -90, origin = {-64, -66})));
456 Modelica.Blocks.Sources.BooleanExpression dr(y = pwmPulser.up) annotation (
457 Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = -90, origin = {-32, -64})));
458 Modelica.Electrical.Analog.Sensors.VoltageSensor vInv annotation (
459 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 0, origin = {-58, 4})));
460 Modelica.Electrical.Analog.Sensors.VoltageSensor vLoad annotation (
461 Placement(visible = true, transformation(origin = {108, -2}, extent = {{-10, 10}, {10, -10}}, rotation = -90)));
462 Modelica.Electrical.Analog.Sensors.PowerSensor pow annotation (
463 Placement(transformation(extent = {{-26, 14}, {-6, 34}})));
464 Modelica.Blocks.Math.Mean meanP(f = 100) annotation (
465 Placement(visible = true, transformation(origin = {20, -12}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
466 Modelica.Blocks.Math.RootMeanSquare vRMS(f = 50) annotation (
467 Placement(visible = true, transformation(origin = {128, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
468 equation
469 connect(vLoad.n, Load.n) annotation (
470 Line(points = {{108, -12}, {108, -12}, {108, -30}, {82, -30}, {82, -14}}, color = {0, 0, 255}));
471 connect(vLoad.p, Lf.n) annotation (
472 Line(points = {{108, 8}, {108, 8}, {108, 20}, {50, 20}}, color = {0, 0, 255}));
473 connect(Lf.p, Rf.n) annotation (
474 Line(points = {{30, 20}, {24, 20}, {22, 20}}, color = {0, 0, 255}));
475 connect(Load.p, Lf.n) annotation (
476 Line(points = {{82, 6}, {82, 20}, {50, 20}}, color = {0, 0, 255}));
477 connect(Cf.p, Lf.n) annotation (
478 Line(points = {{60, 2}, {60, 20}, {50, 20}}, color = {0, 0, 255}));
479 connect(ground.p, V1.n) annotation (
480 Line(points = {{-116, -8}, {-116, -4}, {-116, 0}, {-100, 0}, {-100, 10}}, color = {0, 0, 255}));
481 connect(SWu.p, V1.p) annotation (
482 Line(points = {{-72, 52}, {-72, 60}, {-100, 60}, {-100, 30}}, color = {0, 0, 255}));
483 connect(V1.n, V2.p) annotation (
484 Line(points = {{-100, 10}, {-100, 4}, {-100, -14}}, color = {0, 0, 255}));
485 connect(Load.n, Cf.n) annotation (
486 Line(points = {{82, -14}, {82, -30}, {60, -30}, {60, -18}}, color = {0, 0, 255}));
487 connect(SWd.n, V2.n) annotation (
488 Line(points = {{-72, -42}, {-72, -50}, {-100, -50}, {-100, -34}}, color = {0, 0, 255}));
489 connect(SWu.n, SWd.p) annotation (
490 Line(points = {{-72, 32}, {-72, -22}}, color = {0, 0, 255}));
491 connect(SWu1.p, V1.p) annotation (
492 Line(points = {{-42, 52}, {-42, 60}, {-100, 60}, {-100, 30}}, color = {0, 0, 255}));
493 connect(SWu1.n, SWu2.p) annotation (
494 Line(points = {{-42, 32}, {-42, -22}}, color = {0, 0, 255}));
495 connect(SWu2.n, V2.n) annotation (
496 Line(points = {{-42, -42}, {-42, -50}, {-100, -50}, {-100, -34}}, color = {0, 0, 255}));
497 connect(Cf.n, SWu2.p) annotation (
498 Line(points = {{60, -18}, {60, -30}, {0, -30}, {0, -14}, {-42, -14}, {-42, -22}}, color = {0, 0, 255}));
499 connect(SWu.control, ul.y) annotation (
500 Line(points = {{-60, 42}, {-62, 42}, {-62, 55}}, color = {255, 0, 255}));
501 connect(SWu1.control, ur.y) annotation (
502 Line(points = {{-30, 42}, {-34, 42}, {-34, 53}}, color = {255, 0, 255}));
503 connect(dl.y, SWd.control) annotation (
504 Line(points = {{-64, -55}, {-63, -55}, {-63, -32}, {-60, -32}}, color = {255, 0, 255}));
505 connect(dr.y, SWu2.control) annotation (
506 Line(points = {{-32, -53}, {-30, -53}, {-30, -32}}, color = {255, 0, 255}));
507 connect(phase.y, pwmPulser.ph_deg) annotation (
508 Line(points = {{79.3, 45}, {73.65, 45}, {73.65, 44.98}, {64.6, 44.98}}, color = {0, 0, 127}));
509 connect(ampl.y, pwmPulser.ampl) annotation (
510 Line(points = {{101.3, 59}, {85.65, 59}, {85.65, 60.32}, {64.6, 60.32}}, color = {0, 0, 127}));
511 connect(vInv.p, SWd.p) annotation (
512 Line(points = {{-68, 4}, {-72, 4}, {-72, -22}}, color = {0, 0, 255}));
513 connect(vInv.n, SWu2.p) annotation (
514 Line(points = {{-48, 4}, {-42, 4}, {-42, -22}}, color = {0, 0, 255}));
515 connect(pow.nv, SWu2.p) annotation (
516 Line(points = {{-16, 14}, {-16, -14}, {-42, -14}, {-42, -22}}, color = {0, 0, 255}));
517 connect(pow.pv, pow.pc) annotation (
518 Line(points = {{-16, 34}, {-26, 34}, {-26, 24}}, color = {0, 0, 255}));
519 connect(Rf.p, pow.nc) annotation (
520 Line(points = {{2, 20}, {-4, 20}, {-4, 24}, {-6, 24}}, color = {0, 0, 255}));
521 connect(pow.pc, SWd.p) annotation (
522 Line(points = {{-26, 24}, {-52, 24}, {-72, 24}, {-72, -22}}, color = {0, 0, 255}));
523 connect(meanP.u, pow.power) annotation (
524 Line(points = {{20, 0}, {20, 4}, {-26, 4}, {-26, 13}}, color = {0, 0, 127}));
525 connect(vRMS.u, vLoad.v) annotation (
526 Line(points = {{128, -18}, {128, -18}, {128, -2}, {120, -2}, {120, -2}}, color = {0, 0, 127}));
527 annotation (
528 experiment(StopTime = 0.1),
529 experimentSetupOutput,
530 Documentation(info = "<html><head></head><body><p>Il risultato è identico a quello che si ha con interruttori pilotati e diodi in antiparallelo entrambi ideali.</p>
531<p>Questo perché con un controllo senza blanking time i due inverter sono identici.</p>
532<p>Il sistema più fisico è superiore perché consente di valutare anche gli effetti del blanking time.</p>
533</body></html>"),
534 Diagram(coordinateSystem(extent = {{-120, -80}, {140, 80}}, preserveAspectRatio = false, initialScale = 0.1), graphics = {Text(lineColor = {255, 0, 0}, extent = {{14, -52}, {78, -70}}, textString = "Es. proposto: TwoSQW")}),
535 Icon(coordinateSystem(extent = {{-120, -80}, {140, 80}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));
536 end TwoPwmId;
537
538 model TwoPwmRe "Switch-diode pairs, two-legs, square wave"
539 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 225.0) annotation (
540 Placement(visible = true, transformation(origin = {-102, 8}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
541 Modelica.Electrical.Analog.Ideal.IdealDiode uD(Vknee = 0.1) annotation (
542 Placement(visible = true, transformation(origin = {-80, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
543 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW(Vknee = 0.1) annotation (
544 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-64, 36})));
545 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW(Vknee = 0.1) annotation (
546 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-64, -22})));
547 Modelica.Electrical.Analog.Ideal.IdealDiode dD(Vknee = 0.1) annotation (
548 Placement(visible = true, transformation(origin = {-80, -22}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
549 Modelica.Electrical.Analog.Ideal.IdealDiode uD1(Vknee = 0.1) annotation (
550 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 90, origin = {-34, 36})));
551 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW1(Vknee = 0.1) annotation (
552 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-14, 36})));
553 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW1(Vknee = 0.1) annotation (
554 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-14, -22})));
555 Modelica.Electrical.Analog.Ideal.IdealDiode dD1(Vknee = 0.1) annotation (
556 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 90, origin = {-34, -22})));
557 Modelica.Blocks.Sources.Constant ampl(k = 0.7) annotation (
558 Placement(visible = true, transformation(origin = {111, 53}, extent = {{-7, 7}, {7, -7}}, rotation = 180)));
559 Modelica.Blocks.Sources.Constant phase(k = 0) annotation (
560 Placement(visible = true, transformation(origin = {89, 39}, extent = {{-7, 7}, {7, -7}}, rotation = 180)));
561 Support.PwmPulser pwmPulser annotation (
562 Placement(visible = true, transformation(origin = {51, 46}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
563 Modelica.Blocks.Sources.BooleanExpression ul(y = pwmPulser.up) annotation (
564 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {-50, 44})));
565 Modelica.Blocks.Sources.BooleanExpression ur(y = pwmPulser.down) annotation (
566 Placement(visible = true, transformation(origin = {0, 48}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
567 Modelica.Blocks.Sources.BooleanExpression dl(y = pwmPulser.down) annotation (
568 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {-48, -8})));
569 Modelica.Blocks.Sources.BooleanExpression dr(y = pwmPulser.up) annotation (
570 Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = -90, origin = {2, -46})));
571 Modelica.Electrical.Analog.Basic.Resistor Load(R = 2) annotation (
572 Placement(visible = true, transformation(origin = {88, -4}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
573 Modelica.Electrical.Analog.Basic.Capacitor Cf(C = 634e-6) annotation (
574 Placement(visible = true, transformation(origin = {66, -8}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
575 Modelica.Electrical.Analog.Basic.Inductor Lf(L = 0.001) annotation (
576 Placement(visible = true, transformation(origin = {52, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
577 Modelica.Electrical.Analog.Basic.Resistor Rf(R = 0.05) annotation (
578 Placement(visible = true, transformation(origin = {24, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
579 Modelica.Electrical.Analog.Sensors.VoltageSensor vLoad annotation (
580 Placement(visible = true, transformation(origin = {112, -2}, extent = {{-10, 10}, {10, -10}}, rotation = -90)));
581 Modelica.Electrical.Analog.Basic.Ground ground annotation (
582 Placement(visible = true, transformation(origin = {66, -48}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
583 Modelica.Blocks.Math.RootMeanSquare vRMS(f = 50) annotation (
584 Placement(visible = true, transformation(origin = {128, -40}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
585 equation
586 connect(V1.n, dD1.p) annotation (
587 Line(points = {{-102, -2}, {-102, -46}, {-34, -46}, {-34, -32}}, color = {0, 0, 255}));
588 connect(V1.n, dD.p) annotation (
589 Line(points = {{-102, -2}, {-102, -46}, {-80, -46}, {-80, -32}}, color = {0, 0, 255}));
590 connect(V1.p, uD1.n) annotation (
591 Line(points = {{-102, 18}, {-102, 56}, {-24, 56}, {-24, 50}, {-34, 50}, {-34, 46}}, color = {0, 0, 255}));
592 connect(V1.p, uD.n) annotation (
593 Line(points = {{-102, 18}, {-102, 56}, {-74, 56}, {-74, 50}, {-80, 50}, {-80, 46}}, color = {0, 0, 255}));
594 connect(dSW.n, dD.p) annotation (
595 Line(points = {{-64, -32}, {-64, -46}, {-80, -46}, {-80, -32}}, color = {0, 0, 255}));
596 connect(dD.n, dSW.p) annotation (
597 Line(points = {{-80, -12}, {-64, -12}}, color = {0, 0, 255}));
598 connect(uD.p, dSW.p) annotation (
599 Line(points = {{-80, 26}, {-80, 18}, {-74, 18}, {-74, -12}, {-64, -12}}, color = {0, 0, 255}));
600 connect(uD.p, uSW.n) annotation (
601 Line(points = {{-80, 26}, {-80, 18}, {-64, 18}, {-64, 26}}, color = {0, 0, 255}));
602 connect(uSW.p, uD.n) annotation (
603 Line(points = {{-64, 46}, {-64, 50}, {-80, 50}, {-80, 46}}, color = {0, 0, 255}));
604 connect(ur.y, uSW1.fire) annotation (
605 Line(points = {{0, 37}, {0, 26}, {-2, 26}}, color = {255, 0, 255}));
606 connect(ampl.y, pwmPulser.ampl) annotation (
607 Line(points = {{103.3, 53}, {99.3875, 53}, {99.3875, 53}, {99.475, 53}, {99.475, 53}, {87.65, 53}, {87.65, 54.32}, {77.125, 54.32}, {77.125, 54.32}, {66.6, 54.32}}, color = {0, 0, 127}));
608 connect(phase.y, pwmPulser.ph_deg) annotation (
609 Line(points = {{81.3, 39}, {78.475, 39}, {78.475, 39}, {75.65, 39}, {75.65, 38.98}, {66.6, 38.98}}, color = {0, 0, 127}));
610 connect(uSW1.p, uD1.n) annotation (
611 Line(points = {{-14, 46}, {-14, 50}, {-34, 50}, {-34, 46}}, color = {0, 0, 255}));
612 connect(uD1.p, uSW1.n) annotation (
613 Line(points = {{-34, 26}, {-34, 18}, {-14, 18}, {-14, 26}}, color = {0, 0, 255}));
614 connect(dD1.n, dSW1.p) annotation (
615 Line(points = {{-34, -12}, {-14, -12}}, color = {0, 0, 255}));
616 connect(dSW1.n, dD1.p) annotation (
617 Line(points = {{-14, -32}, {-14, -46}, {-34, -46}, {-34, -32}}, color = {0, 0, 255}));
618 connect(uD1.p, dSW1.p) annotation (
619 Line(points = {{-34, 26}, {-34, 18}, {-24, 18}, {-24, -12}, {-14, -12}}, color = {0, 0, 255}));
620 connect(ul.y, uSW.fire) annotation (
621 Line(points = {{-50, 33}, {-50, 26}, {-52, 26}}, color = {255, 0, 255}));
622 connect(dr.y, dSW1.fire) annotation (
623 Line(points = {{2, -35}, {2, -32}, {-2, -32}}, color = {255, 0, 255}));
624 connect(dl.y, dSW.fire) annotation (
625 Line(points = {{-48, -19}, {-48, -32}, {-52, -32}}, color = {255, 0, 255}));
626 connect(vLoad.n, Load.n) annotation (
627 Line(points = {{112, -12}, {112, -30}, {88, -30}, {88, -14}}, color = {0, 0, 255}));
628 connect(vLoad.p, Lf.n) annotation (
629 Line(points = {{112, 8}, {112, 20}, {62, 20}}, color = {0, 0, 255}));
630 connect(Lf.p, Rf.n) annotation (
631 Line(points = {{42, 20}, {34, 20}}, color = {0, 0, 255}));
632 connect(Load.p, Lf.n) annotation (
633 Line(points = {{88, 6}, {88, 20}, {62, 20}}, color = {0, 0, 255}));
634 connect(Cf.p, Lf.n) annotation (
635 Line(points = {{66, 2}, {66, 20}, {62, 20}}, color = {0, 0, 255}));
636 connect(Rf.p, dSW.p) annotation (
637 Line(points = {{14, 20}, {6, 20}, {6, 10}, {-74, 10}, {-74, -12}, {-64, -12}}, color = {0, 0, 255}));
638 connect(Cf.n, dSW1.p) annotation (
639 Line(points = {{66, -18}, {6, -18}, {6, 2}, {-24, 2}, {-24, -12}, {-14, -12}}, color = {0, 0, 255}));
640 connect(Cf.n, Load.n) annotation (
641 Line(points = {{66, -18}, {66, -30}, {88, -30}, {88, -14}}, color = {0, 0, 255}));
642 connect(ground.p, Load.n) annotation (
643 Line(points = {{66, -38}, {66, -30}, {88, -30}, {88, -14}}, color = {0, 0, 255}));
644 connect(vRMS.u, vLoad.v) annotation (
645 Line(points = {{128, -28}, {128, -28}, {128, -2}, {124, -2}, {124, -2}}, color = {0, 0, 127}));
646 annotation (
647 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-120, -60}, {140, 80}}, initialScale = 0.1)),
648 experiment(StopTime = 0.08, StartTime = 0, Tolerance = 1e-06, Interval = 8e-06),
649 Documentation(info = "<html>
650<p>Notare che per avere adeguata precisione occorre scegliere un numero di step corretto.</p>
651<p>Se ad es. si lasciano 500 step, l&apos;algoritmo in realt&agrave; ne metter&agrave; di pi&ugrave; in quanto vi sono molti eventi di swithing, ma insufficienti ad una buona precisione.</p>
652<p>Ad es. la prima armonica della tensione di uscita dell&apos;innerter &egrave; attesa essere pari a 225x0.7=157.5.</p>
653<p>Se si lasciano i 500 step il valore che si misura &egrave; invece pari a 176.3 (picco della prima armonica). Se per&ograve; si selezionano 5000 step il valore viene estremamente prossimo a quello atteso.</p>
654</html>", revisions = "<html><head></head><body>no newInst</body></html>"),
655 Icon(coordinateSystem(extent = {{-120, -60}, {140, 80}}, preserveAspectRatio = false)));
656 end TwoPwmRe;
657
658 model OnePwmNet "Real valves, one leg P-Q measure"
659 Modelica.Electrical.Analog.Sources.SineVoltage E(V = 40, freqHz = 50) annotation (
660 Placement(visible = true, transformation(origin = {90, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
661 InvPWM.Support.QMonoSensor Q annotation (Placement(visible=true,
662 transformation(extent={{62,6},{78,22}}, rotation=0)));
663 Modelica.Electrical.Analog.Sensors.PowerSensor P annotation (
664 Placement(visible = true, transformation(extent = {{38, 6}, {54, 22}}, rotation = 0)));
665 Modelica.Electrical.Analog.Ideal.IdealDiode dD(Vknee = 0.1) annotation (
666 Placement(visible = true, transformation(origin = {-60, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
667 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW(Vknee = 0.1) annotation (
668 Placement(visible = true, transformation(origin = {-40, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
669 Modelica.Electrical.Analog.Ideal.IdealDiode uD(Vknee = 0.1) annotation (
670 Placement(visible = true, transformation(origin = {-66, 62}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
671 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW(Vknee = 0.1) annotation (
672 Placement(visible = true, transformation(origin = {-48, 62}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
673 Modelica.Blocks.Sources.Constant ampl(k = 0.9) annotation (
674 Placement(visible = true, transformation(origin = {69, 43}, extent = {{-7, -7}, {7, 7}}, rotation = 180)));
675 Modelica.Blocks.Sources.Constant phase(k = +10) annotation (
676 Placement(visible = true, transformation(origin = {49, 57}, extent = {{-7, -7}, {7, 7}}, rotation = 180)));
677 InvPWM.Support.PwmPulser pwmPulser annotation (Placement(visible=true,
678 transformation(
679 origin={17,50},
680 extent={{-13,-12},{13,12}},
681 rotation=180)));
682 Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
683 Placement(visible = true, transformation(extent = {{2, -44}, {22, -24}}, rotation = 0)));
684 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
685 Placement(visible = true, transformation(origin = {-84, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
686 Modelica.Electrical.Analog.Basic.Ground ground annotation (
687 Placement(visible = true, transformation(extent = {{-84, -2}, {-64, 18}}, rotation = 0)));
688 Modelica.Electrical.Analog.Basic.Capacitor Cf(C = 634e-6) annotation (
689 Placement(visible = true, transformation(origin = {30, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
690 Modelica.Electrical.Analog.Basic.Inductor Lf(L = 0.001) annotation (
691 Placement(visible = true, transformation(extent = {{-6, 4}, {14, 24}}, rotation = 0)));
692 Modelica.Electrical.Analog.Basic.Resistor Rf(R = 0.125) annotation (
693 Placement(visible = true, transformation(extent = {{-42, 4}, {-22, 24}}, rotation = 0)));
694 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
695 Placement(visible = true, transformation(origin = {-84, 34}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
696 Modelica.Blocks.Math.Mean meanQ(f = 50) annotation (
697 Placement(visible = true, transformation(origin = {74, -40}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
698 Modelica.Blocks.Math.Mean meanP(f = 50) annotation (
699 Placement(visible = true, transformation(origin = {40, -38}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
700 equation
701 connect(uD.n, uSW.p) annotation (
702 Line(points = {{-66, 72}, {-66, 78}, {-48, 78}, {-48, 72}}, color = {0, 0, 255}));
703 connect(uSW.n, uD.p) annotation (
704 Line(points = {{-48, 52}, {-48, 44}, {-66, 44}, {-66, 52}}, color = {0, 0, 255}));
705 connect(uSW.fire, pwmPulser.up) annotation (
706 Line(points = {{-36, 52}, {-20, 52}, {-20, 42.08}, {2.7, 42.08}}, color = {255, 0, 255}));
707 connect(dSW.n, dD.p) annotation (
708 Line(points = {{-40, -34}, {-40, -48}, {-60, -48}, {-60, -34}}, color = {0, 0, 255}));
709 connect(dD.n, dSW.p) annotation (
710 Line(points = {{-60, -14}, {-60, -8}, {-40, -8}, {-40, -14}}, color = {0, 0, 255}));
711 connect(pwmPulser.down, dSW.fire) annotation (
712 Line(points = {{2.7, 56.96}, {-12.3, 56.96}, {-12.3, -30.04}, {-28.3, -30.04}, {-28.3, -34.04}}, color = {255, 0, 255}));
713 connect(V1.p, uD.n) annotation (
714 Line(points = {{-84, 44}, {-84, 78}, {-66, 78}, {-66, 72}}, color = {0, 0, 255}));
715 connect(V1.n, V2.p) annotation (
716 Line(points = {{-84, 24}, {-84, 0}, {-84, 0}}, color = {0, 0, 255}));
717 connect(ground.p, V1.n) annotation (
718 Line(points = {{-74, 18}, {-74, 24}, {-84, 24}}, color = {0, 0, 255}));
719 connect(Rf.p, dD.n) annotation (
720 Line(points = {{-42, 14}, {-60, 14}, {-60, -14}}, color = {0, 0, 255}));
721 connect(Lf.p, Rf.n) annotation (
722 Line(points = {{-6, 14}, {-22, 14}}, color = {0, 0, 255}));
723 connect(P.pc, Lf.n) annotation (
724 Line(points = {{38, 14}, {14, 14}}, color = {0, 0, 255}));
725 connect(P.nv, Cf.n) annotation (
726 Line(points = {{46, 6}, {46, -16}, {30, -16}}, color = {0, 0, 255}));
727 connect(E.n, Cf.n) annotation (
728 Line(points = {{90, -16}, {30, -16}}, color = {0, 0, 255}));
729 connect(Cf.p, P.pc) annotation (
730 Line(points = {{30, 4}, {30, 14}, {38, 14}}, color = {0, 0, 255}));
731 connect(ground1.p, Cf.n) annotation (
732 Line(points = {{12, -24}, {12, -24}, {12, -16}, {30, -16}}, color = {0, 0, 255}));
733 connect(V2.n, dD.p) annotation (
734 Line(points = {{-84, -20}, {-84, -48}, {-60, -48}, {-60, -34}}, color = {0, 0, 255}));
735 connect(ampl.y, pwmPulser.ampl) annotation (
736 Line(points = {{61.3, 43}, {45.65, 43}, {45.65, 42.32}, {32.6, 42.32}}, color = {0, 0, 127}));
737 connect(phase.y, pwmPulser.ph_deg) annotation (
738 Line(points = {{41.3, 57}, {39.65, 57}, {39.65, 56.48}, {32.6, 56.48}}, color = {0, 0, 127}));
739 connect(uD.p, dD.n) annotation (
740 Line(points = {{-66, 52}, {-66, 44}, {-60, 44}, {-60, -14}}, color = {0, 0, 255}));
741 connect(Q.pc, P.nc) annotation (
742 Line(points = {{62, 14}, {62, 14}, {54, 14}}, color = {0, 0, 255}));
743 connect(P.pv, P.nc) annotation (
744 Line(points = {{46, 10}, {54, 10}, {54, 2}}, color = {0, 0, 255}));
745 connect(Q.nv, E.n) annotation (
746 Line(points = {{70, 6}, {70, -16}, {90, -16}}, color = {0, 0, 255}));
747 connect(E.p, Q.nc) annotation (
748 Line(points = {{90, 4}, {90, 14}, {78, 14}}, color = {0, 0, 255}));
749 connect(Q.pv, Q.nc) annotation (
750 Line(points = {{70, 10}, {78, 10}, {78, 2}}, color = {0, 0, 255}));
751 connect(meanP.u, P.power) annotation (
752 Line(points = {{40, -26}, {40, -26}, {40, 5.2}, {38, 5.2}}, color = {0, 0, 127}));
753 connect(meanQ.u, Q.power) annotation (
754 Line(points = {{74, -28}, {74, -28}, {74, -24}, {63.6, -24}, {63.6, 5.2}}, color = {0, 0, 127}));
755 annotation (
756 experiment(StopTime = 0.06, Interval = 5e-005),
757 Documentation(info = "<html><head></head><body><p><br></p>
758</body></html>"),
759 Diagram(coordinateSystem(extent = {{-100, -60}, {100, 80}}, preserveAspectRatio = false, initialScale = 0.1)),
760 Icon(coordinateSystem(extent = {{-100, -80}, {100, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})));
761 end OnePwmNet;
762
763 model TwoPwmDCFilt "Id switches - TwoLegs - DC filter"
764 parameter Real Udir = 0.7;
765 parameter Real LDF = 1e-006;
766 parameter Real Rbat = 0.1;
767 Modelica.Blocks.Sources.Constant ampl(k = 0.7) annotation (
768 Placement(visible = true, transformation(origin = {102, 58}, extent = {{-8, 8}, {8, -8}}, rotation = 180)));
769 Modelica.Blocks.Sources.Constant phase(k = 0) annotation (
770 Placement(visible = true, transformation(origin = {80, 42}, extent = {{-8, 8}, {8, -8}}, rotation = 180)));
771 InvPWM.Support.PwmPulser pwmPulser annotation (Placement(visible=true,
772 transformation(
773 origin={41,50},
774 extent={{-13,13},{13,-13}},
775 rotation=180)));
776 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWd annotation (
777 Placement(visible = true, transformation(origin = {-30, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
778 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWu annotation (
779 Placement(visible = true, transformation(origin = {-30, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
780 Modelica.Electrical.Analog.Basic.Resistor Load(R = 2) annotation (
781 Placement(visible = true, transformation(origin = {104, 0}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
782 Modelica.Electrical.Analog.Basic.Capacitor Cf(C = 634e-6) annotation (
783 Placement(visible = true, transformation(origin = {84, -12}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
784 Modelica.Electrical.Analog.Basic.Inductor Lf(L = 0.001) annotation (
785 Placement(visible = true, transformation(origin = {70, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
786 Modelica.Electrical.Analog.Basic.Resistor Rf(R = 0.05) annotation (
787 Placement(visible = true, transformation(origin = {42, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
788 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWu1 annotation (
789 Placement(visible = true, transformation(origin = {-4, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
790 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SWu2 annotation (
791 Placement(visible = true, transformation(origin = {-4, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
792 Modelica.Blocks.Sources.BooleanExpression ul(y = pwmPulser.up) annotation (
793 Placement(visible = true, transformation(origin = {-20, 66}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
794 Modelica.Blocks.Sources.BooleanExpression ur(y = pwmPulser.down) annotation (
795 Placement(visible = true, transformation(origin = {4, 66}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
796 Modelica.Blocks.Sources.BooleanExpression dl(y = pwmPulser.down) annotation (
797 Placement(visible = true, transformation(origin = {-22, -66}, extent = {{10, -10}, {-10, 10}}, rotation = -90)));
798 Modelica.Blocks.Sources.BooleanExpression dr(y = pwmPulser.up) annotation (
799 Placement(visible = true, transformation(origin = {6, -64}, extent = {{10, -10}, {-10, 10}}, rotation = -90)));
800 Modelica.Electrical.Analog.Basic.Ground ground annotation (
801 Placement(visible = true, transformation(extent = {{48, -60}, {68, -40}}, rotation = 0)));
802 Modelica.Electrical.Analog.Sources.ConstantVoltage VDC(V = 50) annotation (
803 Placement(visible = true, transformation(origin = {-104, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
804 Modelica.Electrical.Analog.Basic.Resistor Rbat1(R = Rbat) annotation (
805 Placement(visible = true, transformation(origin = {-104, 32}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
806 Modelica.Electrical.Analog.Basic.Resistor Rbat2(R = Rbat) annotation (
807 Placement(visible = true, transformation(origin = {-104, -38}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
808 Modelica.Electrical.Analog.Basic.Capacitor dcCap(C = 0.01, v(fixed = true, start = 50)) annotation (
809 Placement(visible = true, transformation(origin = {-62, 0}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
810 Modelica.Electrical.Analog.Basic.Inductor Lf1(L = LDF) annotation (
811 Placement(visible = true, transformation(extent = {{-92, 48}, {-72, 68}}, rotation = 0)));
812 Modelica.Electrical.Analog.Basic.Inductor Lf2(L = LDF) annotation (
813 Placement(visible = true, transformation(extent = {{-94, -72}, {-74, -52}}, rotation = 0)));
814 Modelica.Electrical.Analog.Sensors.CurrentSensor iDc0 annotation (
815 Placement(visible = true, transformation(extent = {{-34, 68}, {-54, 48}}, rotation = 0)));
816 Modelica.Electrical.Analog.Sensors.PowerSensor pow annotation (
817 Placement(visible = true, transformation(extent = {{6, 10}, {26, 30}}, rotation = 0)));
818 Modelica.Blocks.Math.Mean meanP(f = 100) annotation (
819 Placement(visible = true, transformation(origin = {44, -12}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
820 equation
821 connect(phase.y, pwmPulser.ph_deg) annotation (
822 Line(points = {{71.2, 42}, {65.65, 42}, {65.65, 42.98}, {56.6, 42.98}}, color = {0, 0, 127}));
823 connect(ampl.y, pwmPulser.ampl) annotation (
824 Line(points = {{93.2, 58}, {77.65, 58}, {77.65, 58.32}, {56.6, 58.32}}, color = {0, 0, 127}));
825 connect(Lf.p, Rf.n) annotation (
826 Line(points = {{60, 20}, {60, 20}, {52, 20}}, color = {0, 0, 255}));
827 connect(Load.p, Lf.n) annotation (
828 Line(points = {{104, 10}, {104, 20}, {80, 20}}, color = {0, 0, 255}));
829 connect(Cf.p, Lf.n) annotation (
830 Line(points = {{84, -2}, {84, 20}, {80, 20}}, color = {0, 0, 255}));
831 connect(Load.n, Cf.n) annotation (
832 Line(points = {{104, -10}, {104, -30}, {84, -30}, {84, -22}}, color = {0, 0, 255}));
833 connect(SWu.n, SWd.p) annotation (
834 Line(points = {{-30, 30}, {-30, -22}}, color = {0, 0, 255}));
835 connect(SWu1.n, SWu2.p) annotation (
836 Line(points = {{-4, 30}, {-4, 18}, {-4, 4}, {-4, -22}}, color = {0, 0, 255}));
837 connect(Cf.n, SWu2.p) annotation (
838 Line(points = {{84, -22}, {84, -30}, {18, -30}, {18, -14}, {-4, -14}, {-4, -22}}, color = {0, 0, 255}));
839 connect(SWu.control, ul.y) annotation (
840 Line(points = {{-18, 40}, {-20, 40}, {-20, 55}}, color = {255, 0, 255}));
841 connect(SWu1.control, ur.y) annotation (
842 Line(points = {{8, 40}, {4, 40}, {4, 55}}, color = {255, 0, 255}));
843 connect(dl.y, SWd.control) annotation (
844 Line(points = {{-22, -55}, {-21, -55}, {-21, -32}, {-18, -32}}, color = {255, 0, 255}));
845 connect(dr.y, SWu2.control) annotation (
846 Line(points = {{6, -53}, {6, -54}, {6, -32}, {8, -32}}, color = {255, 0, 255}));
847 connect(VDC.n, Rbat2.p) annotation (
848 Line(points = {{-104, -12}, {-104, -28}}, color = {0, 0, 255}));
849 connect(Lf1.p, Rbat1.p) annotation (
850 Line(points = {{-92, 58}, {-104, 58}, {-104, 42}}, color = {0, 0, 255}));
851 connect(Lf2.p, Rbat2.n) annotation (
852 Line(points = {{-94, -62}, {-104, -62}, {-104, -48}}, color = {0, 0, 255}));
853 connect(ground.p, SWu2.p) annotation (
854 Line(points = {{58, -40}, {58, -30}, {18, -30}, {18, -14}, {-4, -14}, {-4, -22}}, color = {0, 0, 255}));
855 connect(SWu.p, SWu1.p) annotation (
856 Line(points = {{-30, 50}, {-4, 50}}, color = {0, 0, 255}));
857 connect(Lf2.n, SWd.n) annotation (
858 Line(points = {{-74, -62}, {-40, -62}, {-40, -42}, {-30, -42}}, color = {0, 0, 255}));
859 connect(SWd.n, SWu2.n) annotation (
860 Line(points = {{-30, -42}, {-4, -42}}, color = {0, 0, 255}));
861 connect(dcCap.n, SWd.n) annotation (
862 Line(points = {{-62, -10}, {-62, -62}, {-40, -62}, {-40, -42}, {-30, -42}}, color = {0, 0, 255}));
863 connect(VDC.p, Rbat1.n) annotation (
864 Line(points = {{-104, 8}, {-104, 22}}, color = {0, 0, 255}));
865 connect(dcCap.p, Lf1.n) annotation (
866 Line(points = {{-62, 10}, {-62, 58}, {-72, 58}}, color = {0, 0, 255}));
867 connect(iDc0.p, SWu.p) annotation (
868 Line(points = {{-34, 58}, {-32, 58}, {-32, 50}, {-30, 50}}, color = {0, 0, 255}));
869 connect(iDc0.n, Lf1.n) annotation (
870 Line(points = {{-54, 58}, {-64, 58}, {-72, 58}}, color = {0, 0, 255}));
871 connect(Rf.p, pow.nc) annotation (
872 Line(points = {{32, 20}, {26, 20}}, color = {0, 0, 255}));
873 connect(pow.nv, SWu2.p) annotation (
874 Line(points = {{16, 10}, {16, -14}, {-4, -14}, {-4, -22}}, color = {0, 0, 255}));
875 connect(pow.pv, pow.nc) annotation (
876 Line(points = {{-8, 30}, {2, 30}, {2, 20}}, color = {0, 0, 255}));
877 connect(pow.pc, SWd.p) annotation (
878 Line(points = {{6, 20}, {-30, 20}, {-30, -22}}, color = {0, 0, 255}));
879 connect(pow.power, meanP.u) annotation (
880 Line(points = {{6, 9}, {8, 9}, {8, 4}, {44, 4}, {44, 0}}, color = {0, 0, 127}));
881 annotation (
882 experiment(StopTime = 0.1),
883 experimentSetupOutput,
884 Documentation(info = "<html><head></head><body><p><br></p>
885</body></html>"),
886 Diagram(coordinateSystem(extent = {{-120, -80}, {120, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})),
887 Icon(coordinateSystem(extent = {{-140, -80}, {120, 80}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));
888 end TwoPwmDCFilt;
889 end SinglePhase;
890
891 package ThreePhase
892 model Id3SQW "Three-phase (multiphase) with bidirectional switches"
893 Modelica.SIunits.Power aronPower;
894 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
895 Placement(visible = true, transformation(origin = {78, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
896 Modelica.Electrical.MultiPhase.Basic.Resistor Rload(R = fill(2, 3)) annotation (
897 Placement(visible = true, transformation(origin = {78, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
898 Modelica.Electrical.MultiPhase.Basic.Capacitor Cf(C = fill(0.000634, 3)) annotation (
899 Placement(visible = true, transformation(origin = {32, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
900 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.001, 3)) annotation (
901 Placement(visible = true, transformation(origin = {16, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
902 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
903 Placement(visible = true, transformation(origin = {-8, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
904 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
905 Placement(visible = true, transformation(origin = {-42, -44}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
906 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
907 Placement(visible = true, transformation(origin = {-42, 56}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
908 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch downSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
909 Placement(visible = true, transformation(origin = {-42, -14}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
910 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch upSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
911 Placement(visible = true, transformation(origin = {-42, 28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
912 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
913 Placement(visible = true, transformation(origin = {-70, -18}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
914 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
915 Placement(visible = true, transformation(origin = {-70, 26}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
916 Modelica.Electrical.Analog.Basic.Ground ground2 annotation (
917 Placement(visible = true, transformation(origin = {-92, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
918 Modelica.Blocks.Sources.BooleanPulse booleanPulse[3](width = fill(50, 3), period = fill(1 / 50, 3), startTime = 1 / 50 * {-1 / 3, 0, 1 / 3}) annotation (
919 Placement(visible = true, transformation(extent = {{16, 40}, {-4, 60}}, rotation = 0)));
920 Modelica.Blocks.MathBoolean.Not myNot[3] annotation (
921 Placement(visible = true, transformation(origin = {-24, 20}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
922 Modelica.Electrical.MultiPhase.Sensors.AronSensor aronSensor1 annotation (
923 Placement(transformation(extent = {{44, -4}, {64, 16}})));
924 equation
925 connect(upSW.plug_p, star.plug_p) annotation (
926 Line(points = {{-42, 38}, {-42, 46}}, color = {0, 0, 255}));
927 connect(V2.p, star.pin_n) annotation (
928 Line(points = {{-70, 36}, {-70, 70}, {-42, 70}, {-42, 66}}, color = {0, 0, 255}));
929 connect(ground2.p, V2.n) annotation (
930 Line(points = {{-92, 0}, {-70, 0}, {-70, 16}}, color = {0, 0, 255}));
931 connect(V2.n, V1.p) annotation (
932 Line(points = {{-70, 16}, {-70, -8}}, color = {0, 0, 255}));
933 connect(V1.n, star1.pin_n) annotation (
934 Line(points = {{-70, -28}, {-70, -54}, {-42, -54}}, color = {0, 0, 255}));
935 connect(upSW.plug_n, downSW.plug_p) annotation (
936 Line(points = {{-42, 18}, {-42, -4}}, color = {0, 0, 255}));
937 connect(Rf.plug_p, downSW.plug_p) annotation (
938 Line(points = {{-18, 6}, {-42, 6}, {-42, -4}}, color = {0, 0, 255}));
939 connect(downSW.plug_n, star1.plug_p) annotation (
940 Line(points = {{-42, -24}, {-42, -34}}, color = {0, 0, 255}));
941 connect(Rf.plug_n, Lf.plug_p) annotation (
942 Line(points = {{2, 6}, {6, 6}}, color = {0, 0, 255}));
943 connect(Cf.plug_p, Lf.plug_n) annotation (
944 Line(points = {{32, 6}, {31, 6}, {31, 6}, {30, 6}, {26, 6}}, color = {0, 0, 255}));
945 connect(Cf.plug_n, Rload.plug_n) annotation (
946 Line(points = {{32, -14}, {78, -14}}, color = {0, 0, 255}));
947 connect(Rload.plug_n, star2.plug_p) annotation (
948 Line(points = {{78, -14}, {78, -20}}, color = {0, 0, 255}));
949 aronPower = Rload.plug_p.pin[1].v * Rload.plug_p.pin[1].i + Rload.plug_p.pin[2].v * Rload.plug_p.pin[2].i + Rload.plug_p.pin[3].v * Rload.plug_p.pin[3].i;
950 connect(booleanPulse.y, upSW.control) annotation (
951 Line(points = {{-5, 50}, {-30, 50}, {-30, 28}}, color = {255, 0, 255}));
952 connect(myNot.u, booleanPulse.y) annotation (
953 Line(points = {{-24, 25.6}, {-24, 50}, {-5, 50}}, color = {255, 0, 255}));
954 connect(myNot.y, downSW.control) annotation (
955 Line(points = {{-24, 15.2}, {-26, 15.2}, {-26, -14}, {-30, -14}}, color = {255, 0, 255}));
956 connect(aronSensor1.plug_p, Cf.plug_p) annotation (
957 Line(points = {{44, 6}, {32, 6}}, color = {0, 0, 255}));
958 connect(aronSensor1.plug_n, Rload.plug_p) annotation (
959 Line(points = {{64, 6}, {78, 6}}, color = {0, 0, 255}));
960 annotation (
961 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -60}, {100, 80}})),
962 experimentSetupOutput,
963 Documentation(info = "<html><head></head><body><p><br></p>
964</body></html>"),
965 experiment(StartTime = 0, StopTime = 0.1, Tolerance = 0.0001, Interval = 0.0002),
966 __OpenModelica_commandLineOptions = "");
967 end Id3SQW;
968
969 model Id3Pwm "Tri-phase multiphase lib with ideal switches"
970 Modelica.SIunits.Power loadPower = Rload.plug_p.pin[1].v * Rload.plug_p.pin[1].i + Rload.plug_p.pin[2].v * Rload.plug_p.pin[2].i + Rload.plug_p.pin[3].v * Rload.plug_p.pin[3].i;
971 Modelica.SIunits.Voltage Uac0 = Rf.plug_p.pin[1].v - Rf.plug_p.pin[2].v;
972 Modelica.SIunits.Voltage Uacf = Rload.plug_p.pin[1].v - Rload.plug_p.pin[2].v;
973 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
974 Placement(visible = true, transformation(origin = {78, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
975 Modelica.Electrical.MultiPhase.Basic.Resistor Rload(R = fill(10, 3)) annotation (
976 Placement(visible = true, transformation(origin = {78, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
977 Modelica.Electrical.MultiPhase.Basic.Capacitor Cf(C = fill(0.000634, 3)) annotation (
978 Placement(visible = true, transformation(origin = {32, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
979 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.001, 3)) annotation (
980 Placement(visible = true, transformation(origin = {16, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
981 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
982 Placement(visible = true, transformation(origin = {-8, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
983 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
984 Placement(visible = true, transformation(origin = {-42, -44}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
985 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
986 Placement(visible = true, transformation(origin = {-42, 56}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
987 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch downSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
988 Placement(visible = true, transformation(origin = {-42, -14}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
989 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch upSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
990 Placement(visible = true, transformation(origin = {-42, 28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
991 Modelica.Blocks.Sources.Constant ampl[3](k = fill(0.7, 3)) annotation (
992 Placement(visible = true, transformation(origin = {80, 50}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
993 Modelica.Blocks.Sources.Constant phase[3](k = {0, -120, 120}) annotation (
994 Placement(visible = true, transformation(origin = {48, 42}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
995 Support.PwmPulser pwmPulser[3](fSig = fill(50, 3), fCar = fill(1000, 3)) annotation (
996 Placement(visible = true, transformation(origin = {5, 50}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
997 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 250) annotation (
998 Placement(visible = true, transformation(origin = {-70, -10}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
999 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 250) annotation (
1000 Placement(visible = true, transformation(origin = {-70, 44}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1001 Modelica.Electrical.Analog.Basic.Ground ground2 annotation (
1002 Placement(visible = true, transformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1003 Modelica.Electrical.Analog.Basic.Resistor Rdc(R = 1e-5) annotation (
1004 Placement(visible = true, transformation(origin = {-90, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1005 equation
1006 connect(Rdc.n, V2.n) annotation (
1007 Line(points = {{-80, 10}, {-70, 10}, {-70, 34}}, color = {0, 0, 255}));
1008 connect(Rdc.p, ground2.p) annotation (
1009 Line(points = {{-100, 10}, {-108, 10}, {-108, 8}}, color = {0, 0, 255}));
1010 connect(phase.y, pwmPulser.ph_deg) annotation (
1011 Line(points = {{37, 42}, {28, 42}, {28, 42.98}, {20.6, 42.98}}, color = {0, 0, 127}));
1012 connect(ampl.y, pwmPulser.ampl) annotation (
1013 Line(points = {{69, 50}, {66, 50}, {66, 58}, {50, 58}, {50, 58.32}, {20.6, 58.32}}, color = {0, 0, 127}));
1014 connect(pwmPulser.down, downSW.control) annotation (
1015 Line(points = {{-9.3, 42.46}, {-26, 42.46}, {-26, -14}, {-30, -14}}, color = {255, 0, 255}));
1016 connect(pwmPulser.up, upSW.control) annotation (
1017 Line(points = {{-9.3, 58.58}, {-20, 58.58}, {-20, 58}, {-30, 58}, {-30, 28}, {-30, 28}}, color = {255, 0, 255}));
1018 connect(V2.p, star.pin_n) annotation (
1019 Line(points = {{-70, 54}, {-70, 70}, {-42, 70}, {-42, 66}}, color = {0, 0, 255}));
1020 connect(V2.n, V1.p) annotation (
1021 Line(points = {{-70, 34}, {-70, 34}, {-70, 0}}, color = {0, 0, 255}));
1022 connect(V1.n, star1.pin_n) annotation (
1023 Line(points = {{-70, -20}, {-70, -54}, {-42, -54}}, color = {0, 0, 255}));
1024 connect(upSW.plug_n, downSW.plug_p) annotation (
1025 Line(points = {{-42, 18}, {-42, -4}}, color = {0, 0, 255}));
1026 connect(upSW.plug_p, star.plug_p) annotation (
1027 Line(points = {{-42, 38}, {-42, 46}}, color = {0, 0, 255}));
1028 connect(Rf.plug_p, downSW.plug_p) annotation (
1029 Line(points = {{-18, 6}, {-42, 6}, {-42, -4}}, color = {0, 0, 255}));
1030 connect(downSW.plug_n, star1.plug_p) annotation (
1031 Line(points = {{-42, -24}, {-42, -34}}, color = {0, 0, 255}));
1032 connect(Rf.plug_n, Lf.plug_p) annotation (
1033 Line(points = {{2, 6}, {6, 6}}, color = {0, 0, 255}));
1034 connect(Cf.plug_p, Lf.plug_n) annotation (
1035 Line(points = {{32, 6}, {31, 6}, {31, 6}, {30, 6}, {26, 6}}, color = {0, 0, 255}));
1036 connect(Cf.plug_n, Rload.plug_n) annotation (
1037 Line(points = {{32, -14}, {78, -14}}, color = {0, 0, 255}));
1038 connect(Rload.plug_n, star2.plug_p) annotation (
1039 Line(points = {{78, -14}, {78, -20}}, color = {0, 0, 255}));
1040 connect(
1041 Cf.plug_p, Rload.plug_p) annotation (
1042 Line(points = {{32, 6}, {78, 6}, {78, 6}, {78, 6}}, color = {0, 0, 255}));
1043 annotation (
1044 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-120, -60}, {100, 80}}, initialScale = 0.1), graphics = {Text(extent = {{-18, -22}, {-18, -22}}, textString = "text"), Text(origin = {9.125, -33.3333}, extent = {{-13.125, 1.33333}, {36.875, -8.66667}}, textString = "Valori Rdc: v. info", fontName = "Arial")}),
1045 experimentSetupOutput,
1046 Documentation(info = "<html><head></head><body><p>Fra Rdc=1e-3 e =1e3 cambiano radicalmente le tensioni stellate sul carico ma poco le concatenate: la componente fondamentale è la stessa</p><p>&nbsp;La sol con Udc isolato dà tensione migliore sul carico</p>
1047 </body></html>", revisions = "<html><head></head><body>non newInst</body></html>"),
1048 experiment(StartTime = 0, StopTime = 0.1, Tolerance = 0.0001, Interval = 2e-05),
1049 __OpenModelica_commandLineOptions = "");
1050 end Id3Pwm;
1051
1052 model Id3PwmOF "Tri-phase multiphase lib with ideal switches"
1053 Modelica.SIunits.Power loadPower = Rload.plug_p.pin[1].v * Rload.plug_p.pin[1].i + Rload.plug_p.pin[2].v * Rload.plug_p.pin[2].i + Rload.plug_p.pin[3].v * Rload.plug_p.pin[3].i;
1054 Modelica.SIunits.Voltage Uac0 = Rf.plug_p.pin[1].v - Rf.plug_p.pin[2].v;
1055 Modelica.SIunits.Voltage Uacf = Rload.plug_p.pin[1].v - Rload.plug_p.pin[2].v;
1056 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
1057 Placement(visible = true, transformation(origin = {78, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
1058 Modelica.Electrical.MultiPhase.Basic.Resistor Rload(R = fill(10, 3)) annotation (
1059 Placement(visible = true, transformation(origin = {78, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1060 Modelica.Electrical.MultiPhase.Basic.Capacitor Cf(C = fill(0.000634, 3)) annotation (
1061 Placement(visible = true, transformation(origin = {32, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1062 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.001, 3)) annotation (
1063 Placement(visible = true, transformation(origin = {16, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1064 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
1065 Placement(visible = true, transformation(origin = {-8, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1066 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
1067 Placement(visible = true, transformation(origin = {-42, -44}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
1068 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
1069 Placement(visible = true, transformation(origin = {-42, 56}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
1070 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch downSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
1071 Placement(visible = true, transformation(origin = {-42, -14}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1072 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch upSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
1073 Placement(visible = true, transformation(origin = {-42, 28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1074 Modelica.Blocks.Sources.Constant ampl[3](k = fill(0.7, 3)) annotation (
1075 Placement(visible = true, transformation(origin = {80, 50}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1076 Modelica.Blocks.Sources.Constant phase[3](k = {0, -120, 120}) annotation (
1077 Placement(visible = true, transformation(origin = {48, 42}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1078 Support.PwmPulser pwmPulser[3](fSig = fill(50, 3), fCar = fill(1000, 3)) annotation (
1079 Placement(visible = true, transformation(origin = {5, 50}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
1080 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 250) annotation (
1081 Placement(visible = true, transformation(origin = {-70, -10}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1082 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 250) annotation (
1083 Placement(visible = true, transformation(origin = {-70, 44}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1084 Modelica.Electrical.Analog.Basic.Ground ground2 annotation (
1085 Placement(visible = true, transformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1086 Modelica.Electrical.MultiPhase.Sensors.AronSensor aronSensor annotation (
1087 Placement(visible = true, transformation(origin = {54, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1088 Modelica.Electrical.Analog.Basic.Resistor Rdc(R = 1e-5) annotation (
1089 Placement(visible = true, transformation(origin = {-90, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1090 equation
1091 connect(Rdc.n, V2.n) annotation (
1092 Line(points = {{-80, 10}, {-70, 10}, {-70, 34}}, color = {0, 0, 255}));
1093 connect(Rdc.p, ground2.p) annotation (
1094 Line(points = {{-100, 10}, {-108, 10}, {-108, 8}}, color = {0, 0, 255}));
1095 connect(aronSensor.plug_n, Rload.plug_p) annotation (
1096 Line(points = {{64, 6}, {78, 6}, {78, 6}, {78, 6}}, color = {0, 0, 255}));
1097 connect(aronSensor.plug_p, Cf.plug_p) annotation (
1098 Line(points = {{44, 6}, {32, 6}, {32, 6}, {32, 6}}, color = {0, 0, 255}));
1099 connect(phase.y, pwmPulser.ph_deg) annotation (
1100 Line(points = {{37, 42}, {28, 42}, {28, 42.98}, {20.6, 42.98}}, color = {0, 0, 127}));
1101 connect(ampl.y, pwmPulser.ampl) annotation (
1102 Line(points = {{69, 50}, {66, 50}, {66, 58}, {50, 58}, {50, 58.32}, {20.6, 58.32}}, color = {0, 0, 127}));
1103 connect(pwmPulser.down, downSW.control) annotation (
1104 Line(points = {{-9.3, 42.46}, {-26, 42.46}, {-26, -14}, {-30, -14}}, color = {255, 0, 255}));
1105 connect(pwmPulser.up, upSW.control) annotation (
1106 Line(points = {{-9.3, 58.58}, {-20, 58.58}, {-20, 58}, {-30, 58}, {-30, 28}, {-30, 28}}, color = {255, 0, 255}));
1107 connect(V2.p, star.pin_n) annotation (
1108 Line(points = {{-70, 54}, {-70, 70}, {-42, 70}, {-42, 66}}, color = {0, 0, 255}));
1109 connect(V2.n, V1.p) annotation (
1110 Line(points = {{-70, 34}, {-70, 34}, {-70, 0}}, color = {0, 0, 255}));
1111 connect(V1.n, star1.pin_n) annotation (
1112 Line(points = {{-70, -20}, {-70, -54}, {-42, -54}}, color = {0, 0, 255}));
1113 connect(upSW.plug_n, downSW.plug_p) annotation (
1114 Line(points = {{-42, 18}, {-42, -4}}, color = {0, 0, 255}));
1115 connect(upSW.plug_p, star.plug_p) annotation (
1116 Line(points = {{-42, 38}, {-42, 46}}, color = {0, 0, 255}));
1117 connect(Rf.plug_p, downSW.plug_p) annotation (
1118 Line(points = {{-18, 6}, {-42, 6}, {-42, -4}}, color = {0, 0, 255}));
1119 connect(downSW.plug_n, star1.plug_p) annotation (
1120 Line(points = {{-42, -24}, {-42, -34}}, color = {0, 0, 255}));
1121 connect(Rf.plug_n, Lf.plug_p) annotation (
1122 Line(points = {{2, 6}, {6, 6}}, color = {0, 0, 255}));
1123 connect(Cf.plug_p, Lf.plug_n) annotation (
1124 Line(points = {{32, 6}, {31, 6}, {31, 6}, {30, 6}, {26, 6}}, color = {0, 0, 255}));
1125 connect(Cf.plug_n, Rload.plug_n) annotation (
1126 Line(points = {{32, -14}, {78, -14}}, color = {0, 0, 255}));
1127 connect(Rload.plug_n, star2.plug_p) annotation (
1128 Line(points = {{78, -14}, {78, -20}}, color = {0, 0, 255}));
1129 annotation (
1130 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-120, -60}, {100, 80}}, initialScale = 0.1), graphics = {Text(extent = {{-18, -22}, {-18, -22}}, textString = "text"), Text(origin = {-2.875, -19.3333}, extent = {{-13.125, 1.33333}, {36.875, -8.66667}}, textString = "Valori Rdc: v. info", fontName = "Arial"), Text(origin = {-8.19, -31.6}, extent = {{-27.81, 1.6}, {78.19, -10.4}}, textString = "Aron non va con NF
1131 (toglierlo e leggere loadPower\n o metterlo a monte del condensatore)", fontName = "Arial")}),
1132 experimentSetupOutput,
1133 Documentation(info = "<html><head></head><body><p>Fra Rdc=1e-3 e =1e3 cambiano radicalmente le tensioni stellate sul carico ma poco le concatenate: la componente fondamentale è la stessa</p><p>&nbsp;La sol con Udc isolato dà tensione migliore sul carico</p>
1134</body></html>", revisions = "<html><head></head><body>non newInst</body></html>"),
1135 experiment(StartTime = 0, StopTime = 0.1, Tolerance = 0.0001, Interval = 2e-05),
1136 __OpenModelica_commandLineOptions = "");
1137 end Id3PwmOF;
1138
1139 model Id3PwmNet "Tri-phase multiphase lib with ideal switches"
1140 parameter Real ampl_ = 0.8;
1141 parameter Real phase_ = 10;
1142 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
1143 Placement(visible = true, transformation(origin = {68, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
1144 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.001, 3)) annotation (
1145 Placement(visible = true, transformation(origin = {16, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1146 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
1147 Placement(visible = true, transformation(origin = {-8, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1148 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
1149 Placement(visible = true, transformation(origin = {-42, -44}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
1150 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
1151 Placement(visible = true, transformation(origin = {-42, 56}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
1152 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch downSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
1153 Placement(visible = true, transformation(origin = {-42, -14}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1154 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch upSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
1155 Placement(visible = true, transformation(origin = {-42, 28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1156 Modelica.Blocks.Sources.Constant ampl[3](k = fill(ampl_, 3)) annotation (
1157 Placement(visible = true, transformation(origin = {89, 71}, extent = {{-7, 7}, {7, -7}}, rotation = 180)));
1158 Modelica.Blocks.Sources.Constant phase0[3](k = {0, -120, 120}) annotation (
1159 Placement(visible = true, transformation(origin = {70, 52}, extent = {{-8, 8}, {8, -8}}, rotation = 180)));
1160 Support.PwmPulser pwmPulser[3](fSig = fill(50, 3), fCar = fill(1050, 3)) annotation (
1161 Placement(visible = true, transformation(origin = {5, 50}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
1162 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
1163 Placement(visible = true, transformation(origin = {-70, -20}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1164 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
1165 Placement(visible = true, transformation(origin = {-70, 40}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1166 Modelica.Electrical.MultiPhase.Sensors.AronSensor aronSensor annotation (
1167 Placement(visible = true, transformation(origin = {44, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1168 Modelica.Electrical.MultiPhase.Sources.SineVoltage sineVoltage(V = fill(40, 3), freqHz = fill(50, 3)) annotation (
1169 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {68, -4})));
1170 Modelica.Blocks.Math.Add add[3] annotation (
1171 Placement(transformation(extent = {{52, 32}, {32, 52}})));
1172 Modelica.Blocks.Sources.Constant phaseOffs[3](k = fill(phase_, 3)) annotation (
1173 Placement(visible = true, transformation(origin = {85, 25}, extent = {{-7, 7}, {7, -7}}, rotation = 180)));
1174 Modelica.Electrical.Analog.Basic.Resistor Rdc(R = 1e-5) annotation (
1175 Placement(visible = true, transformation(origin = {-90, 18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1176 Modelica.Electrical.Analog.Basic.Ground ground2 annotation (
1177 Placement(visible = true, transformation(origin = {-112, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1178 equation
1179 connect(Rdc.n, V2.n) annotation (
1180 Line(points = {{-80, 18}, {-70, 18}, {-70, 30}, {-70, 30}}, color = {0, 0, 255}));
1181 connect(Rdc.p, ground2.p) annotation (
1182 Line(points = {{-100, 18}, {-112, 18}, {-112, 8}, {-112, 8}}, color = {0, 0, 255}));
1183 connect(ampl.y, pwmPulser.ampl) annotation (
1184 Line(points = {{81.3, 71}, {32, 71}, {32, 58}, {26, 58}, {26, 58.32}, {20.6, 58.32}}, color = {0, 0, 127}));
1185 connect(pwmPulser.down, downSW.control) annotation (
1186 Line(points = {{-9.3, 42.46}, {-26, 42.46}, {-26, -14}, {-30, -14}}, color = {255, 0, 255}));
1187 connect(pwmPulser.up, upSW.control) annotation (
1188 Line(points = {{-9.3, 58.58}, {-20, 58.58}, {-20, 58}, {-30, 58}, {-30, 28}, {-30, 28}}, color = {255, 0, 255}));
1189 connect(V2.p, star.pin_n) annotation (
1190 Line(points = {{-70, 50}, {-70, 70}, {-42, 70}, {-42, 66}}, color = {0, 0, 255}));
1191 connect(V2.n, V1.p) annotation (
1192 Line(points = {{-70, 30}, {-70, -10}}, color = {0, 0, 255}));
1193 connect(V1.n, star1.pin_n) annotation (
1194 Line(points = {{-70, -30}, {-70, -54}, {-42, -54}}, color = {0, 0, 255}));
1195 connect(upSW.plug_n, downSW.plug_p) annotation (
1196 Line(points = {{-42, 18}, {-42, -4}}, color = {0, 0, 255}));
1197 connect(upSW.plug_p, star.plug_p) annotation (
1198 Line(points = {{-42, 38}, {-42, 46}}, color = {0, 0, 255}));
1199 connect(Rf.plug_p, downSW.plug_p) annotation (
1200 Line(points = {{-18, 6}, {-42, 6}, {-42, -4}}, color = {0, 0, 255}));
1201 connect(downSW.plug_n, star1.plug_p) annotation (
1202 Line(points = {{-42, -24}, {-42, -34}}, color = {0, 0, 255}));
1203 connect(Rf.plug_n, Lf.plug_p) annotation (
1204 Line(points = {{2, 6}, {6, 6}}, color = {0, 0, 255}));
1205 connect(aronSensor.plug_n, sineVoltage.plug_p) annotation (
1206 Line(points = {{54, 6}, {68, 6}}, color = {0, 0, 255}));
1207 connect(sineVoltage.plug_n, star2.plug_p) annotation (
1208 Line(points = {{68, -14}, {68, -20}}, color = {0, 0, 255}));
1209 connect(add.y, pwmPulser.ph_deg) annotation (
1210 Line(points = {{31, 42}, {28, 42}, {28, 42.98}, {20.6, 42.98}}, color = {0, 0, 127}));
1211 connect(phase0.y, add.u1) annotation (
1212 Line(points = {{61.2, 52}, {60, 52}, {60, 48}, {54, 48}}, color = {0, 0, 127}));
1213 connect(phaseOffs.y, add.u2) annotation (
1214 Line(points = {{77.3, 25}, {69.65, 25}, {69.65, 36}, {54, 36}}, color = {0, 0, 127}));
1215 connect(aronSensor.plug_p, Lf.plug_n) annotation (
1216 Line(points = {{34, 6}, {26, 6}}, color = {0, 0, 255}));
1217 annotation (
1218 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-120, -60}, {100, 80}})),
1219 experimentSetupOutput,
1220 Documentation(info = "<html><head></head><body><p><br></p>
1221</body></html>", revisions = "<html><head></head><body>non newInst</body></html>"),
1222 experiment(StopTime = 0.2, Interval = 2e-05),
1223 __OpenModelica_commandLineOptions = "");
1224 end Id3PwmNet;
1225
1226 model Id3PwmMach "Tri-phase multiphase lib with ideal switches"
1227 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
1228 Placement(visible = true, transformation(origin = {92, -10}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
1229 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
1230 Placement(visible = true, transformation(origin = {-58, -44}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
1231 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
1232 Placement(visible = true, transformation(origin = {-58, 56}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
1233 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch downSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
1234 Placement(visible = true, transformation(origin = {-58, -14}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1235 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch upSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
1236 Placement(visible = true, transformation(origin = {-58, 28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1237 Modelica.Blocks.Sources.Constant ampl(k = 0.95) annotation (
1238 Placement(visible = true, transformation(origin = {49, 65}, extent = {{-7, 7}, {7, -7}}, rotation = 180)));
1239 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 150) annotation (
1240 Placement(visible = true, transformation(origin = {-86, -20}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1241 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 150) annotation (
1242 Placement(visible = true, transformation(origin = {-86, 40}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1243 Modelica.Electrical.Analog.Basic.Ground ground2 annotation (
1244 Placement(visible = true, transformation(origin = {-78, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1245 Modelica.Blocks.Sources.Constant phase(k = 20) annotation (
1246 Placement(visible = true, transformation(origin = {51, 37}, extent = {{-7, 7}, {7, -7}}, rotation = 180)));
1247 Support.PwmPulser3 pwmPulser3 annotation (
1248 Placement(transformation(extent = {{18, 34}, {-2, 54}})));
1249 Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_PermanentMagnet smpm(phiMechanical(fixed = false, start = 1.570796326794897), wMechanical(fixed = false, start = 157.0796326794897)) annotation (
1250 Placement(transformation(extent = {{68, -14}, {48, 6}})));
1251 Modelica.Electrical.MultiPhase.Sensors.PowerSensor powerSensor annotation (
1252 Placement(transformation(extent = {{14, 0}, {34, 20}})));
1253 Modelica.Mechanics.Rotational.Sensors.AngleSensor angleSensor annotation (
1254 Placement(transformation(extent = {{-10, 10}, {10, -10}}, rotation = -90, origin = {40, -24})));
1255 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.005, 3)) annotation (
1256 Placement(visible = true, transformation(origin = {0, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1257 Modelica.Mechanics.Rotational.Sources.ConstantSpeed constantSpeed(w_fixed(displayUnit = "rpm") = 157.07963267949) annotation (
1258 Placement(transformation(extent = {{-4, -28}, {12, -12}})));
1259 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
1260 Placement(visible = true, transformation(origin = {-24, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1261 equation
1262 connect(ground2.p, V2.n) annotation (
1263 Line(points = {{-78, 8}, {-78, 20}, {-86, 20}, {-86, 30}}, color = {0, 0, 255}));
1264 connect(V2.p, star.pin_n) annotation (
1265 Line(points = {{-86, 50}, {-86, 70}, {-58, 70}, {-58, 66}}, color = {0, 0, 255}));
1266 connect(V2.n, V1.p) annotation (
1267 Line(points = {{-86, 30}, {-86, -10}}, color = {0, 0, 255}));
1268 connect(V1.n, star1.pin_n) annotation (
1269 Line(points = {{-86, -30}, {-86, -54}, {-58, -54}}, color = {0, 0, 255}));
1270 connect(upSW.plug_n, downSW.plug_p) annotation (
1271 Line(points = {{-58, 18}, {-58, -4}}, color = {0, 0, 255}));
1272 connect(upSW.plug_p, star.plug_p) annotation (
1273 Line(points = {{-58, 38}, {-58, 46}}, color = {0, 0, 255}));
1274 connect(downSW.plug_n, star1.plug_p) annotation (
1275 Line(points = {{-58, -24}, {-58, -34}}, color = {0, 0, 255}));
1276 connect(phase.y, pwmPulser3.ph_deg) annotation (
1277 Line(points = {{43.3, 37}, {31.65, 37}, {31.65, 38.6}, {20, 38.6}}, color = {0, 0, 127}));
1278 connect(ampl.y, pwmPulser3.ampl) annotation (
1279 Line(points = {{41.3, 65}, {33.65, 65}, {33.65, 50.4}, {20, 50.4}}, color = {0, 0, 127}));
1280 connect(pwmPulser3.up, upSW.control) annotation (
1281 Line(points = {{-3, 50.6}, {-46, 50.6}, {-46, 28}}, color = {255, 0, 255}));
1282 connect(pwmPulser3.down, downSW.control) annotation (
1283 Line(points = {{-3, 38.2}, {-40, 38.2}, {-40, -14}, {-46, -14}}, color = {255, 0, 255}));
1284 connect(powerSensor.pv, powerSensor.pc) annotation (
1285 Line(points = {{24, 20}, {14, 20}, {14, 10}}, color = {0, 0, 255}));
1286 connect(powerSensor.nv, smpm.plug_sn) annotation (
1287 Line(points = {{24, 0}, {42, 0}, {42, 16}, {64, 16}, {64, 6}}, color = {0, 0, 255}));
1288 connect(angleSensor.flange, smpm.flange) annotation (
1289 Line(points = {{40, -14}, {40, -4}, {48, -4}}, color = {0, 0, 0}));
1290 connect(Lf.plug_n, powerSensor.pc) annotation (
1291 Line(points = {{10, 10}, {14, 10}}, color = {0, 0, 255}));
1292 connect(powerSensor.nc, smpm.plug_sp) annotation (
1293 Line(points = {{34, 10}, {52, 10}, {52, 6}}, color = {0, 0, 255}));
1294 connect(constantSpeed.flange, angleSensor.flange) annotation (
1295 Line(points = {{12, -20}, {26, -20}, {26, -14}, {40, -14}}, color = {0, 0, 0}));
1296 connect(smpm.plug_sn, star2.plug_p) annotation (
1297 Line(points = {{64, 6}, {92, 6}, {92, 0}}, color = {0, 0, 255}));
1298 connect(Rf.plug_p, downSW.plug_p) annotation (
1299 Line(points = {{-34, 10}, {-58, 10}, {-58, -4}}, color = {0, 0, 255}));
1300 connect(Rf.plug_n, Lf.plug_p) annotation (
1301 Line(points = {{-14, 10}, {-10, 10}}, color = {0, 0, 255}));
1302 annotation (
1303 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -60}, {100, 80}}, initialScale = 0.1), graphics = {Text(origin = {-12.29, -52}, extent = {{-25.71, 6}, {94.29, -6}}, textString = "Guardare valori iniziali smpm\non va bene con 1.16-dev 648 e OF")}),
1304 experimentSetupOutput,
1305 Documentation(info = "<html>
1306<p>Rispetto a Id2Pwm questo modello &egrave; pi&ugrave; semplice da usare in quanto utilizza un impulsatore trifase. Per&ograve; non consente l&apos;introduzione di tensioni differenti sulle tre fasi.</p>
1307<p>SI pu&ograve; proporre agli studenti come miglioramento del precedente.</p>
1308</html>", revisions = "<html><head></head><body>non newInst</body></html>"),
1309 experiment(StopTime = 0.4, Interval = 5e-06),
1310 __OpenModelica_commandLineOptions = "");
1311 end Id3PwmMach;
1312
1313 model Id3WithFiltDC "With Ideal Switches NO OM 1.9.4-dev-490"
1314 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
1315 Placement(visible = true, transformation(origin = {31, -59}, extent = {{9, -9}, {-9, 9}}, rotation = 90)));
1316 Modelica.Electrical.MultiPhase.Basic.Resistor Rload(R = fill(1, 3)) annotation (
1317 Placement(visible = true, transformation(origin = {32, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1318 Modelica.Electrical.MultiPhase.Basic.Capacitor Cf(C = fill(5e-005, 3)) annotation (
1319 Placement(visible = true, transformation(origin = {0, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1320 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.001, 3)) annotation (
1321 Placement(visible = true, transformation(origin = {24, 16}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1322 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
1323 Placement(visible = true, transformation(origin = {-2, 16}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1324 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
1325 Placement(visible = true, transformation(origin = {-34, -60}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
1326 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
1327 Placement(visible = true, transformation(origin = {-34, 58}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
1328 Modelica.Electrical.MultiPhase.Ideal.IdealOpeningSwitch downSW(Ron = fill(1e-4, 3), Goff = fill(1e-4, 3)) annotation (
1329 Placement(visible = true, transformation(origin = {-34, -30}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1330 Modelica.Electrical.MultiPhase.Ideal.IdealOpeningSwitch upSW(Ron = fill(1e-4, 3), Goff = fill(1e-4, 3)) annotation (
1331 Placement(visible = true, transformation(origin = {-34, 30}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1332 Modelica.Blocks.Sources.Constant ampl[3](k = fill(0.7, 3)) annotation (
1333 Placement(visible = true, transformation(origin = {78, 64}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1334 Modelica.Blocks.Sources.Constant phase[3](k = {0, 120, -120}) annotation (
1335 Placement(visible = true, transformation(origin = {82, 16}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1336 Support.PwmPulser pwmPulser[3](fCar = fill(2000, 3)) annotation (
1337 Placement(visible = true, transformation(origin = {18, 48}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
1338 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
1339 Placement(visible = true, transformation(origin = {-90, 18}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1340 Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
1341 Placement(visible = true, transformation(origin = {-112, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1342 Modelica.Electrical.Analog.Basic.Resistor Rbat(R = 0.2) annotation (
1343 Placement(visible = true, transformation(origin = {-90, 46}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
1344 Modelica.Electrical.Analog.Basic.Inductor Lf1(L = 1e-003) annotation (
1345 Placement(visible = true, transformation(origin = {-72, 68}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1346 Modelica.Electrical.Analog.Basic.Capacitor dcCap(C = 5e-5, v(fixed = true, start = 100)) annotation (
1347 Placement(visible = true, transformation(origin = {-56, 0}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1348 Modelica.Electrical.Analog.Basic.Inductor Lf2(L = 1e-003) annotation (
1349 Placement(visible = true, transformation(origin = {-72, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1350 Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 0.2) annotation (
1351 Placement(visible = true, transformation(origin = {-90, -52}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
1352 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
1353 Placement(visible = true, transformation(origin = {-90, -14}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1354 Modelica.Electrical.MultiPhase.Sensors.AronSensor aronSensor annotation (
1355 Placement(visible = true, transformation(origin = {42, 0}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1356 equation
1357 connect(dcCap.n, star1.pin_n) annotation (
1358 Line(points = {{-56, -10}, {-56, -70}, {-34, -70}}, color = {0, 0, 255}));
1359 connect(dcCap.p, Lf1.n) annotation (
1360 Line(points = {{-56, 10}, {-56, 68}, {-62, 68}}, color = {0, 0, 255}));
1361 connect(downSW.plug_n, star1.plug_p) annotation (
1362 Line(points = {{-34, -40}, {-34, -50}}, color = {0, 0, 255}));
1363 connect(Lf2.n, star1.pin_n) annotation (
1364 Line(points = {{-62, -70}, {-34, -70}, {-34, -70}, {-34, -70}}, color = {0, 0, 255}));
1365 connect(resistor1.n, Lf2.p) annotation (
1366 Line(points = {{-90, -62}, {-90, -62}, {-90, -70}, {-82, -70}, {-82, -70}}, color = {0, 0, 255}));
1367 connect(upSW.plug_p, star.plug_p) annotation (
1368 Line(points = {{-34, 40}, {-34, 48}}, color = {0, 0, 255}));
1369 connect(star.pin_n, Lf1.n) annotation (
1370 Line(points = {{-34, 68}, {-62, 68}}, color = {0, 0, 255}));
1371 connect(Rf.plug_p, downSW.plug_p) annotation (
1372 Line(points = {{-12, 16}, {-34, 16}, {-34, -20}}, color = {0, 0, 255}));
1373 connect(upSW.plug_n, downSW.plug_p) annotation (
1374 Line(points = {{-34, 20}, {-34, -20}}, color = {0, 0, 255}));
1375 connect(pwmPulser.down, downSW.control) annotation (
1376 Line(points = {{3.7, 40.46}, {-18, 40.46}, {-18, -30}, {-27, -30}}, color = {255, 0, 255}));
1377 connect(pwmPulser.up, upSW.control) annotation (
1378 Line(points = {{3.7, 56.58}, {-22, 56.58}, {-22, 30}, {-27, 30}}, color = {255, 0, 255}));
1379 connect(V2.n, resistor1.p) annotation (
1380 Line(points = {{-90, -24}, {-90, -24}, {-90, -42}, {-90, -42}, {-90, -42}}, color = {0, 0, 255}));
1381 connect(ground1.p, V2.p) annotation (
1382 Line(points = {{-112, -14}, {-112, -14}, {-112, -4}, {-90, -4}, {-90, -4}}, color = {0, 0, 255}));
1383 connect(V2.p, V1.n) annotation (
1384 Line(points = {{-90, -4}, {-90, -4}, {-90, 8}, {-90, 8}}, color = {0, 0, 255}));
1385 connect(Lf1.p, Rbat.p) annotation (
1386 Line(points = {{-82, 68}, {-90, 68}, {-90, 56}}, color = {0, 0, 255}));
1387 connect(V1.p, Rbat.n) annotation (
1388 Line(points = {{-90, 28}, {-90, 36}}, color = {0, 0, 255}));
1389 connect(Rload.plug_n, star2.plug_p) annotation (
1390 Line(points = {{32, -36}, {32, -39}, {31, -39}, {31, -50}}, color = {0, 0, 255}));
1391 connect(phase.y, pwmPulser.ph_deg) annotation (
1392 Line(points = {{71, 16}, {60, 16}, {60, 40.98}, {33.6, 40.98}}, color = {0, 0, 127}));
1393 connect(ampl.y, pwmPulser.ampl) annotation (
1394 Line(points = {{67, 64}, {60, 64}, {60, 56.32}, {33.6, 56.32}}, color = {0, 0, 127}));
1395 connect(Rf.plug_n, Lf.plug_p) annotation (
1396 Line(points = {{8, 16}, {14, 16}}, color = {0, 0, 255}));
1397 connect(Cf.plug_p, Rload.plug_p) annotation (
1398 Line(points = {{0, -16}, {32, -16}}, color = {0, 0, 255}));
1399 connect(Cf.plug_n, Rload.plug_n) annotation (
1400 Line(points = {{0, -36}, {32, -36}}, color = {0, 0, 255}));
1401 connect(Lf.plug_n, aronSensor.plug_p) annotation (
1402 Line(points = {{34, 16}, {42, 16}, {42, 10}, {42, 10}, {42, 10}}, color = {0, 0, 255}));
1403 connect(aronSensor.plug_n, Rload.plug_p) annotation (
1404 Line(points = {{42, -10}, {42, -10}, {42, -16}, {32, -16}, {32, -16}}, color = {0, 0, 255}));
1405 annotation (
1406 experimentSetupOutput,
1407 Documentation(info = "<html>
1408 <p>Il risultato &egrave; identico a quello che si ha con interruttori pilotati e dioidi in antiparallelo entrambi iteali.</p>
1409 <p>Questo perch&eacute; con un controllo senza blanking time i due inverter sono identici.</p>
1410 <p>Il sisema pi&ugrave; fisico &egrave; superiore perch&eacute; consente di valutare anche gli effetti del blanking time.</p>
1411 </html>"),
1412 experiment(StopTime = 0.04, Interval = 2e-005),
1413 Icon(coordinateSystem(extent = {{-120, -100}, {100, 100}})),
1414 Diagram(coordinateSystem(extent = {{-120, -80}, {100, 80}}, preserveAspectRatio = false)),
1415 __OpenModelica_commandLineOptions = "");
1416 end Id3WithFiltDC;
1417
1418 model Id3PwmAronMod "Tri-phase multiphase lib with ideal switches"
1419 Modelica.SIunits.Power loadPower = Rload.plug_p.pin[1].v * Rload.plug_p.pin[1].i + Rload.plug_p.pin[2].v * Rload.plug_p.pin[2].i + Rload.plug_p.pin[3].v * Rload.plug_p.pin[3].i;
1420 Modelica.SIunits.Voltage Uac0 = Rf.plug_p.pin[1].v - Rf.plug_p.pin[2].v;
1421 Modelica.SIunits.Voltage Uacf = Rload.plug_p.pin[1].v - Rload.plug_p.pin[2].v;
1422 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
1423 Placement(visible = true, transformation(origin = {78, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
1424 Modelica.Electrical.MultiPhase.Basic.Resistor Rload(R = fill(10, 3)) annotation (
1425 Placement(visible = true, transformation(origin = {78, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1426 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.001, 3)) annotation (
1427 Placement(visible = true, transformation(origin = {16, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1428 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
1429 Placement(visible = true, transformation(origin = {-8, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1430 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
1431 Placement(visible = true, transformation(origin = {-42, -44}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
1432 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
1433 Placement(visible = true, transformation(origin = {-42, 56}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
1434 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch downSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
1435 Placement(visible = true, transformation(origin = {-42, -14}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1436 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch upSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
1437 Placement(visible = true, transformation(origin = {-42, 28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1438 Modelica.Blocks.Sources.Constant ampl[3](k = fill(0.7, 3)) annotation (
1439 Placement(visible = true, transformation(origin = {80, 50}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1440 Modelica.Blocks.Sources.Constant phase[3](k = {0, -120, 120}) annotation (
1441 Placement(visible = true, transformation(origin = {48, 42}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1442 Support.PwmPulser pwmPulser[3](fSig = fill(50, 3), fCar = fill(1000, 3)) annotation (
1443 Placement(visible = true, transformation(origin = {5, 50}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
1444 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 250) annotation (
1445 Placement(visible = true, transformation(origin = {-70, -10}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1446 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 250) annotation (
1447 Placement(visible = true, transformation(origin = {-70, 44}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1448 Modelica.Electrical.Analog.Basic.Ground ground2 annotation (
1449 Placement(visible = true, transformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1450 Modelica.Electrical.MultiPhase.Sensors.AronSensor aronSensor annotation (
1451 Placement(visible = true, transformation(origin = {42, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1452 Modelica.Electrical.Analog.Basic.Resistor Rdc(R = 1e-5) annotation (
1453 Placement(visible = true, transformation(origin = {-90, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
1454 Modelica.Electrical.MultiPhase.Basic.Capacitor Cf(C=fill(0.000634, 3))
1455 annotation (
1456 Placement(visible = true, transformation(origin = {58, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1457 equation
1458 connect(Rdc.n, V2.n) annotation (
1459 Line(points = {{-80, 10}, {-70, 10}, {-70, 34}}, color = {0, 0, 255}));
1460 connect(Rdc.p, ground2.p) annotation (
1461 Line(points = {{-100, 10}, {-108, 10}, {-108, 8}}, color = {0, 0, 255}));
1462 connect(phase.y, pwmPulser.ph_deg) annotation (
1463 Line(points = {{37, 42}, {28, 42}, {28, 42.98}, {20.6, 42.98}}, color = {0, 0, 127}));
1464 connect(ampl.y, pwmPulser.ampl) annotation (
1465 Line(points = {{69, 50}, {66, 50}, {66, 58}, {50, 58}, {50, 58.32}, {20.6, 58.32}}, color = {0, 0, 127}));
1466 connect(pwmPulser.down, downSW.control) annotation (
1467 Line(points = {{-9.3, 42.46}, {-26, 42.46}, {-26, -14}, {-30, -14}}, color = {255, 0, 255}));
1468 connect(pwmPulser.up, upSW.control) annotation (
1469 Line(points = {{-9.3, 58.58}, {-20, 58.58}, {-20, 58}, {-30, 58}, {-30, 28}, {-30, 28}}, color = {255, 0, 255}));
1470 connect(V2.p, star.pin_n) annotation (
1471 Line(points = {{-70, 54}, {-70, 70}, {-42, 70}, {-42, 66}}, color = {0, 0, 255}));
1472 connect(V2.n, V1.p) annotation (
1473 Line(points = {{-70, 34}, {-70, 34}, {-70, 0}}, color = {0, 0, 255}));
1474 connect(V1.n, star1.pin_n) annotation (
1475 Line(points = {{-70, -20}, {-70, -54}, {-42, -54}}, color = {0, 0, 255}));
1476 connect(upSW.plug_n, downSW.plug_p) annotation (
1477 Line(points = {{-42, 18}, {-42, -4}}, color = {0, 0, 255}));
1478 connect(upSW.plug_p, star.plug_p) annotation (
1479 Line(points = {{-42, 38}, {-42, 46}}, color = {0, 0, 255}));
1480 connect(Rf.plug_p, downSW.plug_p) annotation (
1481 Line(points = {{-18, 6}, {-42, 6}, {-42, -4}}, color = {0, 0, 255}));
1482 connect(downSW.plug_n, star1.plug_p) annotation (
1483 Line(points = {{-42, -24}, {-42, -34}}, color = {0, 0, 255}));
1484 connect(Rf.plug_n, Lf.plug_p) annotation (
1485 Line(points = {{2, 6}, {6, 6}}, color = {0, 0, 255}));
1486 connect(
1487 Rload.plug_n, star2.plug_p) annotation (
1488 Line(points = {{78, -14}, {78, -20}}, color = {0, 0, 255}));
1489 connect(
1490 Cf.plug_n, Rload.plug_n) annotation (
1491 Line(points = {{58, -14}, {78, -14}}, color = {0, 0, 255}));
1492 connect(
1493 Lf.plug_n, aronSensor.plug_p) annotation (
1494 Line(points = {{26, 6}, {32, 6}, {32, 6}, {32, 6}}, color = {0, 0, 255}));
1495 connect(
1496 aronSensor.plug_n, Cf.plug_p) annotation (
1497 Line(points = {{52, 6}, {58, 6}, {58, 6}, {58, 6}}, color = {0, 0, 255}));
1498 connect(
1499 Cf.plug_p, Rload.plug_p) annotation (
1500 Line(points = {{58, 6}, {78, 6}, {78, 6}, {78, 6}}, color = {0, 0, 255}));
1501 annotation (
1502 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-120, -60}, {100, 80}}, initialScale = 0.1), graphics = {Text(extent = {{-18, -22}, {-18, -22}}, textString = "text")}),
1503 experimentSetupOutput,
1504 Documentation(info = "<html><head></head><body><p>Fra Rdc=1e-3 e =1e3 cambiano radicalmente le tensioni stellate sul carico ma poco le concatenate: la componente fondamentale è la stessa</p><p>&nbsp;La sol con Udc isolato dà tensione migliore sul carico</p>
1505 </body></html>", revisions = "<html><head></head><body>non newInst</body></html>"),
1506 experiment(StartTime = 0, StopTime = 0.1, Tolerance = 0.0001, Interval = 2e-05),
1507 __OpenModelica_commandLineOptions = "");
1508 end Id3PwmAronMod;
1509 end ThreePhase;
1510
1511 package ThreePhaseMultifilar
1512 model Id3Pwm1 "Trifase con switches ideali individuali"
1513 parameter Modelica.SIunits.Resistance Rf = 0.125;
1514 parameter Modelica.SIunits.Inductance Lf = 0.001;
1515 parameter Modelica.SIunits.Capacitance Cf = 0.000634;
1516 parameter Modelica.SIunits.Resistance Rld = 30.0;
1517 parameter Real Goff = 1e-3;
1518 parameter Real Ron = 1e-3;
1519 Modelica.Electrical.Analog.Basic.Resistor Rld3(R = Rld) annotation (
1520 Placement(visible = true, transformation(origin = {111, -57}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1521 Modelica.Electrical.Analog.Basic.Capacitor Cf3(C = Cf, v(fixed = true, start = 0)) annotation (
1522 Placement(visible = true, transformation(origin = {89, -58}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1523 Modelica.Electrical.Analog.Basic.Inductor Lf3(L = Lf, i(fixed = true)) annotation (
1524 Placement(visible = true, transformation(extent = {{57, -58}, {77, -38}}, rotation = 0)));
1525 Modelica.Electrical.Analog.Basic.Resistor Rf3(R = Rf) annotation (
1526 Placement(visible = true, transformation(extent = {{31, -58}, {51, -38}}, rotation = 0)));
1527 Modelica.Electrical.Analog.Basic.Resistor Rld2(R = Rld) annotation (
1528 Placement(visible = true, transformation(origin = {109, -23}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1529 Modelica.Electrical.Analog.Basic.Capacitor Cf2(C = Cf, v(fixed = true, start = 0)) annotation (
1530 Placement(visible = true, transformation(origin = {87, -24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1531 Modelica.Electrical.Analog.Basic.Inductor Lf2(L = Lf, i(fixed = true)) annotation (
1532 Placement(visible = true, transformation(extent = {{55, -24}, {75, -4}}, rotation = 0)));
1533 Modelica.Electrical.Analog.Basic.Resistor Rf2(R = Rf) annotation (
1534 Placement(visible = true, transformation(extent = {{29, -24}, {49, -4}}, rotation = 0)));
1535 Modelica.Electrical.Analog.Basic.Resistor Rld1(R = Rld) annotation (
1536 Placement(visible = true, transformation(origin = {112, 11}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1537 Modelica.Electrical.Analog.Basic.Capacitor Cf1(C = Cf, v(fixed = true, start = 0)) annotation (
1538 Placement(visible = true, transformation(origin = {90, 10}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1539 Modelica.Electrical.Analog.Basic.Inductor Lf1(L = Lf, i(fixed = true)) annotation (
1540 Placement(visible = true, transformation(extent = {{58, 10}, {78, 30}}, rotation = 0)));
1541 Modelica.Electrical.Analog.Basic.Resistor Rf1(R = Rf) annotation (
1542 Placement(visible = true, transformation(extent = {{32, 10}, {52, 30}}, rotation = 0)));
1543 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S2(Goff = Goff, Ron = Ron) annotation (
1544 Placement(visible = true, transformation(origin = {-6, -24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1545 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S4(Goff = Goff, Ron = Ron) annotation (
1546 Placement(visible = true, transformation(origin = {-46, -24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1547 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
1548 Placement(visible = true, transformation(origin = {-66, 10}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1549 Modelica.Blocks.Sources.Constant phase[3](k = {0, 120, 240}) annotation (
1550 Placement(visible = true, transformation(origin = {89, 45}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1551 Support.PwmPulser pwmPulser[3] annotation (
1552 Placement(visible = true, transformation(origin = {48, 54}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
1553 Modelica.Blocks.Sources.Constant ampl[3](k = {0.7, 0.7, 0.7}) annotation (
1554 Placement(visible = true, transformation(origin = {124, 62}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1555 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S5(Goff = Goff, Ron = Ron) annotation (
1556 Placement(visible = true, transformation(origin = {0, 52}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1557 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S1(Goff = Goff, Ron = Ron) annotation (
1558 Placement(visible = true, transformation(origin = {-46, 54}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1559 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S3(Goff = Goff, Ron = Ron) annotation (
1560 Placement(visible = true, transformation(origin = {-25.5, 54.3333}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1561 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S6(Goff = Goff, Ron = Ron) annotation (
1562 Placement(visible = true, transformation(origin = {-26, -24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1563 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
1564 Placement(visible = true, transformation(origin = {-66, 48}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1565 Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
1566 Placement(visible = true, transformation(extent = {{-98, -11}, {-78, 9}}, rotation = 0)));
1567 equation
1568 connect(ground1.p, V2.n) annotation (
1569 Line(points = {{-88, 9}, {-88, 27}, {-66, 27}, {-66, 38}}, color = {0, 0, 255}));
1570 connect(V2.p, S1.p) annotation (
1571 Line(points = {{-66, 58}, {-66, 58}, {-66, 74}, {-46, 74}, {-46, 64}, {-46, 64}}, color = {0, 0, 255}));
1572 connect(V2.n, V1.p) annotation (
1573 Line(points = {{-66, 38}, {-66, 38}, {-66, 20}, {-66, 20}}, color = {0, 0, 255}));
1574 connect(S3.n, S6.p) annotation (
1575 Line(points = {{-25.5, 44.3333}, {-25.5, 7}, {-26, 7}, {-26, -14}}, color = {0, 0, 255}));
1576 connect(pwmPulser[2].down, S6.control) annotation (
1577 Line(points = {{33.7, 46.46}, {19, 46.46}, {19, -40}, {-14, -40}, {-14, -24}}, color = {255, 0, 255}));
1578 connect(S6.n, S2.n) annotation (
1579 Line(points = {{-26, -34}, {-26, -44}, {-6, -44}, {-6, -34}}, color = {0, 0, 255}));
1580 connect(Rf2.p, S6.p) annotation (
1581 Line(points = {{29, -14}, {14, -14}, {14, 10}, {-26, 10}, {-26, -14}}, color = {0, 0, 255}));
1582 connect(S3.control, pwmPulser[2].up) annotation (
1583 Line(points = {{-13.5, 54.3333}, {-5, 54.3333}, {-5, 60}, {33.7, 60}, {33.7, 62.58}}, color = {255, 0, 255}));
1584 connect(S3.p, S1.p) annotation (
1585 Line(points = {{-25.5, 64.3333}, {-25.5, 75}, {-46, 75}, {-46, 64}}, color = {0, 0, 255}));
1586 connect(pwmPulser[1].up, S1.control) annotation (
1587 Line(points = {{33.7, 62.58}, {-34, 62.58}, {-34, 54}}, color = {255, 0, 255}));
1588 connect(S1.n, S4.p) annotation (
1589 Line(points = {{-46, 44}, {-46, -14}}, color = {0, 0, 255}));
1590 connect(S5.p, S1.p) annotation (
1591 Line(points = {{0, 62}, {0, 75}, {-46, 75}, {-46, 64}}, color = {0, 0, 255}));
1592 connect(S5.control, pwmPulser[3].up) annotation (
1593 Line(points = {{12, 52}, {25, 52}, {25, 52}, {33.7, 52}, {33.7, 62.58}}, color = {255, 0, 255}));
1594 connect(S5.n, S2.p) annotation (
1595 Line(points = {{0, 42}, {0, 16}, {-6, 16}, {-6, -14}}, color = {0, 0, 255}));
1596 connect(ampl.y, pwmPulser.ampl) annotation (
1597 Line(points = {{113, 62}, {63.6, 62}, {63.6, 62.32}}, color = {0, 0, 127}));
1598 connect(phase.y, pwmPulser.ph_deg) annotation (
1599 Line(points = {{78, 45}, {67, 45}, {67, 46.98}, {63.6, 46.98}}, color = {0, 0, 127}));
1600 connect(pwmPulser[1].down, S4.control) annotation (
1601 Line(points = {{33.7, 46.46}, {19, 46.46}, {19, -40}, {-34, -40}, {-34, -24}}, color = {255, 0, 255}));
1602 connect(pwmPulser[3].down, S2.control) annotation (
1603 Line(points = {{33.7, 46.46}, {19, 46.46}, {19, -40}, {6, -40}, {6, -24}}, color = {255, 0, 255}));
1604 connect(V1.n, S4.n) annotation (
1605 Line(points = {{-66, 0}, {-66, 0}, {-66, -44}, {-46, -44}, {-46, -34}, {-46, -34}}, color = {0, 0, 255}));
1606 connect(Rf1.p, S4.p) annotation (
1607 Line(points = {{32, 20}, {32, 20}, {14, 20}, {14, 33}, {-46, 33}, {-46, -14}}, color = {0, 0, 255}));
1608 connect(S4.n, S2.n) annotation (
1609 Line(points = {{-46, -34}, {-46, -44}, {-6, -44}, {-6, -34}}, color = {0, 0, 255}));
1610 connect(Rf3.p, S2.p) annotation (
1611 Line(points = {{31, -48}, {31, -26}, {7, -26}, {7, 0}, {-6, 0}, {-6, -14}}, color = {0, 0, 255}));
1612 connect(Rf1.n, Lf1.p) annotation (
1613 Line(points = {{52, 20}, {58, 20}}, color = {0, 0, 255}));
1614 connect(Lf1.n, Cf1.p) annotation (
1615 Line(points = {{78, 20}, {90, 20}}, color = {0, 0, 255}));
1616 connect(Rld1.p, Cf1.p) annotation (
1617 Line(points = {{112, 21}, {90, 21}, {90, 20}}, color = {0, 0, 255}));
1618 connect(Cf1.n, Rld1.n) annotation (
1619 Line(points = {{90, 0}, {90, 1}, {112, 1}}, color = {0, 0, 255}));
1620 connect(Rld1.n, Rld2.n) annotation (
1621 Line(points = {{112, 1}, {134, 1}, {134, -35}, {109, -35}, {109, -33}}, color = {0, 0, 255}));
1622 connect(Rf2.n, Lf2.p) annotation (
1623 Line(points = {{49, -14}, {55, -14}}, color = {0, 0, 255}));
1624 connect(Lf2.n, Cf2.p) annotation (
1625 Line(points = {{75, -14}, {87, -14}}, color = {0, 0, 255}));
1626 connect(Rld2.p, Cf2.p) annotation (
1627 Line(points = {{109, -13}, {99, -13}, {99, -14}, {87, -14}}, color = {0, 0, 255}));
1628 connect(Rld2.n, Cf2.n) annotation (
1629 Line(points = {{109, -33}, {99, -33}, {99, -34}, {87, -34}}, color = {0, 0, 255}));
1630 connect(Rld3.n, Rld2.n) annotation (
1631 Line(points = {{111, -67}, {133, -67}, {133, -33}, {107, -33}, {107, -33}, {109, -33}}, color = {0, 0, 255}));
1632 connect(Rf3.n, Lf3.p) annotation (
1633 Line(points = {{51, -48}, {57, -48}}, color = {0, 0, 255}));
1634 connect(Lf3.n, Cf3.p) annotation (
1635 Line(points = {{77, -48}, {89, -48}}, color = {0, 0, 255}));
1636 connect(Rld3.p, Cf3.p) annotation (
1637 Line(points = {{111, -47}, {101, -47}, {101, -48}, {89, -48}}, color = {0, 0, 255}));
1638 connect(Rld3.n, Cf3.n) annotation (
1639 Line(points = {{111, -67}, {101, -67}, {101, -68}, {89, -68}}, color = {0, 0, 255}));
1640 annotation (
1641 experimentSetupOutput,
1642 Documentation(info = "<html>
1643<p>Il risultato &egrave; identico a quello che si ha con interruttori pilotati e dioidi in antiparallelo entrambi iteali.</p>
1644<p>Questo perch&eacute; con un controllo senza blanking time i due inverter sono identici.</p>
1645<p>Il sisema pi&ugrave; fisico &egrave; superiore perch&eacute; consente di valutare anche gli effetti del blanking time.</p>
1646</html>"),
1647 experiment(StartTime = 0, StopTime = 0.1, Tolerance = 0.0001),
1648 Diagram(coordinateSystem(extent = {{-100, -80}, {140, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})),
1649 Icon(coordinateSystem(extent = {{-100, -80}, {140, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})));
1650 end Id3Pwm1;
1651
1652 model Id3Pwm1VarAmpl "Trifase con switches ideali individuali OM dev490 BAD"
1653 parameter Modelica.SIunits.Resistance Rf = 0.125;
1654 parameter Modelica.SIunits.Inductance Lf = 0.001;
1655 parameter Modelica.SIunits.Capacitance Cf = 0.000634;
1656 parameter Modelica.SIunits.Resistance Rld = 30.0;
1657 Modelica.Electrical.Analog.Basic.Ground ground annotation (
1658 Placement(visible = true, transformation(extent = {{114, -53}, {134, -33}}, rotation = 0)));
1659 Modelica.Electrical.Analog.Basic.Resistor Rld3(R = Rld) annotation (
1660 Placement(visible = true, transformation(origin = {87, -59}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1661 Modelica.Electrical.Analog.Basic.Capacitor Ff3(C = Cf, v(start = 0)) annotation (
1662 Placement(visible = true, transformation(origin = {65, -60}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1663 Modelica.Electrical.Analog.Basic.Inductor Lf3(L = Lf) annotation (
1664 Placement(visible = true, transformation(extent = {{33, -60}, {53, -40}}, rotation = 0)));
1665 Modelica.Electrical.Analog.Basic.Resistor Rf3(R = Rf) annotation (
1666 Placement(visible = true, transformation(extent = {{7, -60}, {27, -40}}, rotation = 0)));
1667 Modelica.Electrical.Analog.Basic.Resistor Rld2(R = Rld) annotation (
1668 Placement(visible = true, transformation(origin = {85, -25}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1669 Modelica.Electrical.Analog.Basic.Capacitor Ff2(C = Cf, v(start = 0)) annotation (
1670 Placement(visible = true, transformation(origin = {63, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1671 Modelica.Electrical.Analog.Basic.Inductor Lf2(L = Lf) annotation (
1672 Placement(visible = true, transformation(extent = {{31, -26}, {51, -6}}, rotation = 0)));
1673 Modelica.Electrical.Analog.Basic.Resistor Rf2(R = Rf) annotation (
1674 Placement(visible = true, transformation(extent = {{5, -26}, {25, -6}}, rotation = 0)));
1675 Modelica.Electrical.Analog.Basic.Resistor Rld1(R = Rld) annotation (
1676 Placement(visible = true, transformation(origin = {88, 9}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1677 Modelica.Electrical.Analog.Basic.Capacitor Ff1(C = Cf, v(start = 0)) annotation (
1678 Placement(visible = true, transformation(origin = {66, 8}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1679 Modelica.Electrical.Analog.Basic.Inductor Lf1(L = Lf) annotation (
1680 Placement(visible = true, transformation(extent = {{34, 8}, {54, 28}}, rotation = 0)));
1681 Modelica.Electrical.Analog.Basic.Resistor Rf1(R = Rf) annotation (
1682 Placement(visible = true, transformation(extent = {{8, 8}, {28, 28}}, rotation = 0)));
1683 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S2 annotation (
1684 Placement(visible = true, transformation(origin = {-30, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1685 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S4 annotation (
1686 Placement(visible = true, transformation(origin = {-70, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1687 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 100) annotation (
1688 Placement(visible = true, transformation(origin = {-90, 14}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1689 Modelica.Blocks.Sources.Constant phase[3](k = {0, 120, 240}) annotation (
1690 Placement(visible = true, transformation(origin = {63, 39}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1691 Support.PwmPulser pwmPulser[3] annotation (
1692 Placement(visible = true, transformation(origin = {24, 52}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
1693 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S5 annotation (
1694 Placement(visible = true, transformation(origin = {-24, 50}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1695 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S1 annotation (
1696 Placement(visible = true, transformation(origin = {-70, 52}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1697 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S3 annotation (
1698 Placement(visible = true, transformation(origin = {-49.5, 52.3333}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1699 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S6 annotation (
1700 Placement(visible = true, transformation(origin = {-50, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1701 Modelica.Blocks.Sources.Ramp ramp[3](height = fill(0.5, 3), offset = fill(0.5, 3), startTime = fill(0.05, 3), duration = fill(0.2, 3)) annotation (
1702 Placement(transformation(extent = {{112, 50}, {92, 70}})));
1703 equation
1704 connect(Rf2.p, S6.p) annotation (
1705 Line(points = {{5, -16}, {-10, -16}, {-10, 8}, {-50, 8}, {-50, -16}}, color = {0, 0, 255}));
1706 connect(S6.n, S2.n) annotation (
1707 Line(points = {{-50, -36}, {-50, -46}, {-30, -46}, {-30, -36}}, color = {0, 0, 255}));
1708 connect(pwmPulser[2].down, S6.control) annotation (
1709 Line(points = {{9.7, 44.46}, {-5, 44.46}, {-5, -42}, {-43, -42}, {-43, -26}}, color = {255, 0, 255}));
1710 connect(S3.n, S6.p) annotation (
1711 Line(points = {{-49.5, 42.3333}, {-49.5, 5}, {-50, 5}, {-50, -16}}, color = {0, 0, 255}));
1712 connect(S3.p, S1.p) annotation (
1713 Line(points = {{-49.5, 62.3333}, {-49.5, 73}, {-70, 73}, {-70, 62}}, color = {0, 0, 255}));
1714 connect(V1.p, S1.p) annotation (
1715 Line(points = {{-90, 24}, {-90, 74}, {-69, 74}, {-69, 73}, {-70, 73}, {-70, 62}}, color = {0, 0, 255}));
1716 connect(S5.p, S1.p) annotation (
1717 Line(points = {{-24, 60}, {-24, 73}, {-70, 73}, {-70, 62}}, color = {0, 0, 255}));
1718 connect(S1.n, S4.p) annotation (
1719 Line(points = {{-70, 42}, {-70, -16}}, color = {0, 0, 255}));
1720 connect(S5.n, S2.p) annotation (
1721 Line(points = {{-24, 40}, {-24, 14}, {-30, 14}, {-30, -16}}, color = {0, 0, 255}));
1722 connect(pwmPulser[3].down, S2.control) annotation (
1723 Line(points = {{9.7, 44.46}, {-5, 44.46}, {-5, -42}, {-23, -42}, {-23, -26}}, color = {255, 0, 255}));
1724 connect(pwmPulser[1].down, S4.control) annotation (
1725 Line(points = {{9.7, 44.46}, {-5, 44.46}, {-5, -42}, {-63, -42}, {-63, -26}}, color = {255, 0, 255}));
1726 connect(phase.y, pwmPulser.ph_deg) annotation (
1727 Line(points = {{52, 39}, {43, 39}, {43, 44.98}, {39.6, 44.98}}, color = {0, 0, 127}));
1728 connect(V1.n, S2.n) annotation (
1729 Line(points = {{-90, 4}, {-90, -47}, {-69, -47}, {-69, -45}, {-70, -45}, {-70, -46}, {-30, -46}, {-30, -36}}, color = {0, 0, 255}));
1730 connect(S4.n, S2.n) annotation (
1731 Line(points = {{-70, -36}, {-70, -46}, {-30, -46}, {-30, -36}}, color = {0, 0, 255}));
1732 connect(Rf1.p, S4.p) annotation (
1733 Line(points = {{8, 18}, {8, 18}, {-10, 18}, {-10, 31}, {-70, 31}, {-70, -16}}, color = {0, 0, 255}));
1734 connect(Rf3.p, S2.p) annotation (
1735 Line(points = {{7, -50}, {7, -28}, {-17, -28}, {-17, -2}, {-30, -2}, {-30, -16}}, color = {0, 0, 255}));
1736 connect(Rf1.n, Lf1.p) annotation (
1737 Line(points = {{28, 18}, {34, 18}}, color = {0, 0, 255}));
1738 connect(Lf1.n, Ff1.p) annotation (
1739 Line(points = {{54, 18}, {66, 18}}, color = {0, 0, 255}));
1740 connect(Ff1.n, Rld1.n) annotation (
1741 Line(points = {{66, -2}, {66, -1}, {88, -1}}, color = {0, 0, 255}));
1742 connect(Rld1.p, Ff1.p) annotation (
1743 Line(points = {{88, 19}, {66, 19}, {66, 18}}, color = {0, 0, 255}));
1744 connect(ground.p, Rld1.n) annotation (
1745 Line(points = {{124, -33}, {124, -1}, {88, -1}}, color = {0, 0, 255}));
1746 connect(Rf2.n, Lf2.p) annotation (
1747 Line(points = {{25, -16}, {31, -16}}, color = {0, 0, 255}));
1748 connect(Lf2.n, Ff2.p) annotation (
1749 Line(points = {{51, -16}, {63, -16}}, color = {0, 0, 255}));
1750 connect(Rld2.n, Ff2.n) annotation (
1751 Line(points = {{85, -35}, {75, -35}, {75, -36}, {63, -36}}, color = {0, 0, 255}));
1752 connect(Rld2.p, Ff2.p) annotation (
1753 Line(points = {{85, -15}, {75, -15}, {75, -16}, {63, -16}}, color = {0, 0, 255}));
1754 connect(ground.p, Rld2.n) annotation (
1755 Line(points = {{124, -33}, {106, -33}, {106, -35}, {85, -35}}, color = {0, 0, 255}));
1756 connect(Rf3.n, Lf3.p) annotation (
1757 Line(points = {{27, -50}, {33, -50}}, color = {0, 0, 255}));
1758 connect(Lf3.n, Ff3.p) annotation (
1759 Line(points = {{53, -50}, {65, -50}}, color = {0, 0, 255}));
1760 connect(Rld3.n, Ff3.n) annotation (
1761 Line(points = {{87, -69}, {77, -69}, {77, -70}, {65, -70}}, color = {0, 0, 255}));
1762 connect(Rld3.p, Ff3.p) annotation (
1763 Line(points = {{87, -49}, {77, -49}, {77, -50}, {65, -50}}, color = {0, 0, 255}));
1764 connect(ground.p, Rld3.n) annotation (
1765 Line(points = {{124, -33}, {110, -33}, {110, -69}, {87, -69}}, color = {0, 0, 255}));
1766 connect(pwmPulser[1].up, S1.control) annotation (
1767 Line(points = {{9.7, 60.58}, {-63, 60.58}, {-63, 52}}, color = {255, 0, 255}));
1768 connect(S3.control, pwmPulser[2].up) annotation (
1769 Line(points = {{-42.5, 52.3333}, {-34, 52.3333}, {-34, 58}, {9.7, 58}, {9.7, 60.58}}, color = {255, 0, 255}));
1770 connect(S5.control, pwmPulser[3].up) annotation (
1771 Line(points = {{-17, 50}, {-4, 50}, {-4, 50}, {9.7, 50}, {9.7, 60.58}}, color = {255, 0, 255}));
1772 connect(ramp.y, pwmPulser.ampl) annotation (
1773 Line(points = {{91, 60}, {39.6, 60}, {39.6, 60.32}}, color = {0, 0, 127}));
1774 annotation (
1775 experimentSetupOutput,
1776 Documentation(info = "<html>
1777<p>Il risultato &egrave; identico a quello che si ha con interruttori pilotati e dioidi in antiparallelo entrambi iteali.</p>
1778<p>Questo perch&eacute; con un controllo senza blanking time i due inverter sono identici.</p>
1779<p>Il sisema pi&ugrave; fisico &egrave; superiore perch&eacute; consente di valutare anche gli effetti del blanking time.</p>
1780</html>"),
1781 experiment(StopTime = 0.2, __Dymola_NumberOfIntervals = 2500),
1782 Diagram(coordinateSystem(extent = {{-100, -80}, {140, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})),
1783 Icon(coordinateSystem(extent = {{-100, -80}, {140, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})));
1784 end Id3Pwm1VarAmpl;
1785
1786 model Test "Trifase con switches ideali individuali"
1787 parameter Modelica.SIunits.Resistance Rf = 0.125;
1788 parameter Modelica.SIunits.Inductance Lf = 0.001;
1789 parameter Modelica.SIunits.Capacitance Cf = 0.000634;
1790 parameter Modelica.SIunits.Resistance Rld = 30.0;
1791 parameter Real Goff = 1e-3;
1792 parameter Real Ron = 1e-3;
1793 Modelica.Electrical.Analog.Basic.Resistor Rld3(R = Rld) annotation (
1794 Placement(visible = true, transformation(origin = {111, -61}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1795 Modelica.Electrical.Analog.Basic.Inductor Lf3(L = Lf, i(fixed = true)) annotation (
1796 Placement(visible = true, transformation(extent = {{57, -62}, {77, -42}}, rotation = 0)));
1797 Modelica.Electrical.Analog.Basic.Resistor Rld2(R = Rld) annotation (
1798 Placement(visible = true, transformation(origin = {109, -27}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1799 Modelica.Electrical.Analog.Basic.Inductor Lf2(L = Lf, i(fixed = true)) annotation (
1800 Placement(visible = true, transformation(extent = {{55, -28}, {75, -8}}, rotation = 0)));
1801 Modelica.Electrical.Analog.Basic.Resistor Rld1(R = Rld) annotation (
1802 Placement(visible = true, transformation(origin = {112, 7}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1803 Modelica.Electrical.Analog.Basic.Inductor Lf1(L = Lf, i(fixed = true)) annotation (
1804 Placement(visible = true, transformation(extent = {{58, 6}, {78, 26}}, rotation = 0)));
1805 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S2(Goff = Goff, Ron = Ron) annotation (
1806 Placement(visible = true, transformation(origin = {-6, -28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1807 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S4(Goff = Goff, Ron = Ron) annotation (
1808 Placement(visible = true, transformation(origin = {-46, -28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1809 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
1810 Placement(visible = true, transformation(origin = {-66, 6}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1811 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S5(Goff = Goff, Ron = Ron) annotation (
1812 Placement(visible = true, transformation(origin = {0, 48}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1813 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S1(Goff = Goff, Ron = Ron) annotation (
1814 Placement(visible = true, transformation(origin = {-46, 50}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1815 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S3(Goff = Goff, Ron = Ron) annotation (
1816 Placement(visible = true, transformation(origin = {-25.5, 50.3333}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1817 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S6(Goff = Goff, Ron = Ron) annotation (
1818 Placement(visible = true, transformation(origin = {-26, -28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1819 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
1820 Placement(visible = true, transformation(origin = {-66, 44}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1821 Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
1822 Placement(visible = true, transformation(extent = {{-98, -15}, {-78, 5}}, rotation = 0)));
1823 Modelica.Blocks.Sources.BooleanPulse booleanPulse[3](width = fill(50, 3), period = fill(1 / 50, 3), startTime = 1 / 50 * {-1 / 3, 0, 1 / 3}) annotation (
1824 Placement(visible = true, transformation(extent = {{64, 52}, {44, 72}}, rotation = 0)));
1825 Modelica.Blocks.MathBoolean.Not myNot[3] annotation (
1826 Placement(visible = true, transformation(origin = {10, -14}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
1827 equation
1828 connect(ground1.p, V2.n) annotation (
1829 Line(points = {{-88, 5}, {-88, 23}, {-66, 23}, {-66, 34}}, color = {0, 0, 255}));
1830 connect(V2.p, S1.p) annotation (
1831 Line(points = {{-66, 54}, {-66, 70}, {-46, 70}, {-46, 60}}, color = {0, 0, 255}));
1832 connect(V2.n, V1.p) annotation (
1833 Line(points = {{-66, 34}, {-66, 16}}, color = {0, 0, 255}));
1834 connect(S3.n, S6.p) annotation (
1835 Line(points = {{-25.5, 40.3333}, {-25.5, 3}, {-26, 3}, {-26, -18}}, color = {0, 0, 255}));
1836 connect(S6.n, S2.n) annotation (
1837 Line(points = {{-26, -38}, {-26, -48}, {-6, -48}, {-6, -38}}, color = {0, 0, 255}));
1838 connect(S3.p, S1.p) annotation (
1839 Line(points = {{-25.5, 60.3333}, {-25.5, 71}, {-46, 71}, {-46, 60}}, color = {0, 0, 255}));
1840 connect(S1.n, S4.p) annotation (
1841 Line(points = {{-46, 40}, {-46, -18}}, color = {0, 0, 255}));
1842 connect(S5.p, S1.p) annotation (
1843 Line(points = {{0, 58}, {0, 71}, {-46, 71}, {-46, 60}}, color = {0, 0, 255}));
1844 connect(S5.n, S2.p) annotation (
1845 Line(points = {{0, 38}, {0, 12}, {-6, 12}, {-6, -18}}, color = {0, 0, 255}));
1846 connect(V1.n, S4.n) annotation (
1847 Line(points = {{-66, -4}, {-66, -48}, {-46, -48}, {-46, -38}}, color = {0, 0, 255}));
1848 connect(S4.n, S2.n) annotation (
1849 Line(points = {{-46, -38}, {-46, -48}, {-6, -48}, {-6, -38}}, color = {0, 0, 255}));
1850 connect(Rld1.n, Rld2.n) annotation (
1851 Line(points = {{112, -3}, {134, -3}, {134, -39}, {109, -39}, {109, -37}}, color = {0, 0, 255}));
1852 connect(Rld3.n, Rld2.n) annotation (
1853 Line(points = {{111, -71}, {133, -71}, {133, -37}, {109, -37}}, color = {0, 0, 255}));
1854 connect(Lf1.n, Rld1.p) annotation (
1855 Line(points = {{78, 16}, {110, 16}, {110, 17}, {112, 17}}, color = {0, 0, 255}));
1856 connect(Lf2.n, Rld2.p) annotation (
1857 Line(points = {{75, -18}, {108, -18}, {108, -17}, {109, -17}}, color = {0, 0, 255}));
1858 connect(Lf3.n, Rld3.p) annotation (
1859 Line(points = {{77, -52}, {90, -52}, {90, -50}, {111, -50}, {111, -51}}, color = {0, 0, 255}));
1860 connect(Lf1.p, S1.n) annotation (
1861 Line(points = {{58, 16}, {32, 16}, {32, 26}, {-46, 26}, {-46, 40}}, color = {0, 0, 255}));
1862 connect(Lf2.p, S3.n) annotation (
1863 Line(points = {{55, -18}, {36, -18}, {36, 8}, {-26, 8}, {-26, 40.3333}, {-25.5, 40.3333}}, color = {0, 0, 255}));
1864 connect(Lf3.p, S2.p) annotation (
1865 Line(points = {{57, -52}, {24, -52}, {24, -4}, {-6, -4}, {-6, -18}}, color = {0, 0, 255}));
1866 connect(myNot[1].y, S4.control) annotation (
1867 Line(points = {{10, -18.8}, {-12, -18.8}, {-12, -18}, {-39, -18}, {-39, -28}}, color = {255, 0, 255}));
1868 connect(myNot[2].y, S6.control) annotation (
1869 Line(points = {{10, -18.8}, {-4, -18.8}, {-4, -20}, {-19, -20}, {-19, -28}}, color = {255, 0, 255}));
1870 connect(myNot[3].y, S2.control) annotation (
1871 Line(points = {{10, -18.8}, {10, -28}, {1, -28}}, color = {255, 0, 255}));
1872 connect(booleanPulse[1].y, S1.control) annotation (
1873 Line(points = {{43, 62}, {4, 62}, {4, 64}, {-39, 64}, {-39, 50}}, color = {255, 0, 255}));
1874 connect(booleanPulse[2].y, S3.control) annotation (
1875 Line(points = {{43, 62}, {14, 62}, {14, 60}, {-18.5, 60}, {-18.5, 50.3333}}, color = {255, 0, 255}));
1876 connect(booleanPulse[3].y, S5.control) annotation (
1877 Line(points = {{43, 62}, {7, 62}, {7, 48}}, color = {255, 0, 255}));
1878 connect(myNot.u, booleanPulse.y) annotation (
1879 Line(points = {{10, -8.4}, {12, -8.4}, {12, 32}, {36, 32}, {36, 62}, {43, 62}}, color = {255, 0, 255}));
1880 annotation (
1881 experimentSetupOutput,
1882 Documentation(info = "<html>
1883 <p>Il risultato &egrave; identico a quello che si ha con interruttori pilotati e dioidi in antiparallelo entrambi iteali.</p>
1884 <p>Questo perch&eacute; con un controllo senza blanking time i due inverter sono identici.</p>
1885 <p>Il sisema pi&ugrave; fisico &egrave; superiore perch&eacute; consente di valutare anche gli effetti del blanking time.</p>
1886 </html>"),
1887 experiment(StartTime = 0, StopTime = 0.1, Tolerance = 0.0001),
1888 Diagram(coordinateSystem(extent = {{-100, -80}, {140, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})),
1889 Icon(coordinateSystem(extent = {{-100, -80}, {140, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})));
1890 end Test;
1891 annotation (
1892 Icon(coordinateSystem(extent = {{-100, -80}, {100, 80}})));
1893 end ThreePhaseMultifilar;
1894
1895 package SVPWM
1896 import SI = Modelica.SIunits;
1897
1898 model Id3Pwm1SVPWMtotal "Trifase con switches ideali individuali OM dev490 BAD"
1899 parameter Modelica.SIunits.Resistance Rf = 0.125;
1900 parameter Modelica.SIunits.Inductance Lf = 0.001;
1901 parameter Modelica.SIunits.Capacitance Cf = 0.000634;
1902 parameter Modelica.SIunits.Resistance Rld = 30.0;
1903 Modelica.Electrical.Analog.Basic.Ground ground annotation (
1904 Placement(visible = true, transformation(extent = {{114, -53}, {134, -33}}, rotation = 0)));
1905 Modelica.Electrical.Analog.Basic.Resistor Rld3(R = Rld) annotation (
1906 Placement(visible = true, transformation(origin = {87, -59}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1907 Modelica.Electrical.Analog.Basic.Capacitor Ff3(C = Cf, v(start = 0)) annotation (
1908 Placement(visible = true, transformation(origin = {65, -60}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1909 Modelica.Electrical.Analog.Basic.Inductor Lf3(L = Lf) annotation (
1910 Placement(visible = true, transformation(extent = {{33, -60}, {53, -40}}, rotation = 0)));
1911 Modelica.Electrical.Analog.Basic.Resistor Rf3(R = Rf) annotation (
1912 Placement(visible = true, transformation(extent = {{7, -60}, {27, -40}}, rotation = 0)));
1913 Modelica.Electrical.Analog.Basic.Resistor Rld2(R = Rld) annotation (
1914 Placement(visible = true, transformation(origin = {85, -25}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1915 Modelica.Electrical.Analog.Basic.Capacitor Ff2(C = Cf, v(start = 0)) annotation (
1916 Placement(visible = true, transformation(origin = {63, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1917 Modelica.Electrical.Analog.Basic.Inductor Lf2(L = Lf) annotation (
1918 Placement(visible = true, transformation(extent = {{31, -26}, {51, -6}}, rotation = 0)));
1919 Modelica.Electrical.Analog.Basic.Resistor Rf2(R = Rf) annotation (
1920 Placement(visible = true, transformation(extent = {{5, -26}, {25, -6}}, rotation = 0)));
1921 Modelica.Electrical.Analog.Basic.Resistor Rld1(R = Rld) annotation (
1922 Placement(visible = true, transformation(origin = {88, 9}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1923 Modelica.Electrical.Analog.Basic.Capacitor Ff1(C = Cf, v(start = 0)) annotation (
1924 Placement(visible = true, transformation(origin = {66, 8}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1925 Modelica.Electrical.Analog.Basic.Inductor Lf1(L = Lf) annotation (
1926 Placement(visible = true, transformation(extent = {{34, 8}, {54, 28}}, rotation = 0)));
1927 Modelica.Electrical.Analog.Basic.Resistor Rf1(R = Rf) annotation (
1928 Placement(visible = true, transformation(extent = {{8, 8}, {28, 28}}, rotation = 0)));
1929 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S2 annotation (
1930 Placement(visible = true, transformation(origin = {-30, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1931 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S4 annotation (
1932 Placement(visible = true, transformation(origin = {-70, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1933 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 100) annotation (
1934 Placement(visible = true, transformation(origin = {-90, 14}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
1935 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S5 annotation (
1936 Placement(visible = true, transformation(origin = {-24, 52}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1937 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S1 annotation (
1938 Placement(visible = true, transformation(origin = {-70, 58}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1939 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S3 annotation (
1940 Placement(visible = true, transformation(origin = {-49.5, 58.3333}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1941 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch S6 annotation (
1942 Placement(visible = true, transformation(origin = {-50, -26}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
1943 Modelica.Blocks.Sources.Constant ampl(k = 0.7) annotation (
1944 Placement(visible = true, transformation(origin = {104, 68}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1945 Modelica.Blocks.Sources.Constant phase(k = 0) annotation (
1946 Placement(visible = true, transformation(origin = {114, 36}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
1947 Modelica.Blocks.Sources.BooleanExpression g1(y = svpwm.gates[1]) annotation (
1948 Placement(transformation(extent = {{-2, 40}, {-12, 60}})));
1949 Modelica.Blocks.Sources.BooleanExpression g2(y = svpwm.gates[2]) annotation (
1950 Placement(transformation(extent = {{-4, -56}, {-16, -36}})));
1951 Modelica.Blocks.Sources.BooleanExpression g3(y = svpwm.gates[3]) annotation (
1952 Placement(transformation(extent = {{6, -9}, {-6, 9}}, rotation = -90, origin = {-36, 41})));
1953 Modelica.Blocks.Sources.BooleanExpression g4(y = svpwm.gates[4]) annotation (
1954 Placement(transformation(extent = {{-6, -9}, {6, 9}}, rotation = -90, origin = {-42, -9})));
1955 Modelica.Blocks.Sources.BooleanExpression g5(y = svpwm.gates[5]) annotation (
1956 Placement(transformation(extent = {{6, -9}, {-6, 9}}, rotation = -90, origin = {-60, 41})));
1957 Modelica.Blocks.Sources.BooleanExpression g6(y = svpwm.gates[6]) annotation (
1958 Placement(transformation(extent = {{-6, -9}, {6, 9}}, rotation = -90, origin = {-62, -1})));
1959 PowerSystems_Control_Modulation_SVPWM svpwm annotation (
1960 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {30, 42})));
1961 Modelica.Blocks.Sources.RealExpression realExpression(y = 314.15 * time) annotation (
1962 Placement(transformation(extent = {{66, 56}, {46, 76}})));
1963 equation
1964 connect(Rf2.p, S6.p) annotation (
1965 Line(points = {{5, -16}, {-10, -16}, {-10, 8}, {-50, 8}, {-50, -16}}, color = {0, 0, 255}));
1966 connect(S6.n, S2.n) annotation (
1967 Line(points = {{-50, -36}, {-50, -46}, {-30, -46}, {-30, -36}}, color = {0, 0, 255}));
1968 connect(S3.n, S6.p) annotation (
1969 Line(points = {{-49.5, 48.3333}, {-49.5, 5}, {-50, 5}, {-50, -16}}, color = {0, 0, 255}));
1970 connect(S3.p, S1.p) annotation (
1971 Line(points = {{-49.5, 68.3333}, {-49.5, 73}, {-70, 73}, {-70, 68}}, color = {0, 0, 255}));
1972 connect(V1.p, S1.p) annotation (
1973 Line(points = {{-90, 24}, {-90, 74}, {-69, 74}, {-69, 73}, {-70, 73}, {-70, 68}}, color = {0, 0, 255}));
1974 connect(S5.p, S1.p) annotation (
1975 Line(points = {{-24, 62}, {-24, 73}, {-70, 73}, {-70, 68}}, color = {0, 0, 255}));
1976 connect(S1.n, S4.p) annotation (
1977 Line(points = {{-70, 48}, {-70, -16}}, color = {0, 0, 255}));
1978 connect(S5.n, S2.p) annotation (
1979 Line(points = {{-24, 42}, {-24, 14}, {-30, 14}, {-30, -16}}, color = {0, 0, 255}));
1980 connect(V1.n, S2.n) annotation (
1981 Line(points = {{-90, 4}, {-90, -47}, {-69, -47}, {-69, -45}, {-70, -45}, {-70, -46}, {-30, -46}, {-30, -36}}, color = {0, 0, 255}));
1982 connect(S4.n, S2.n) annotation (
1983 Line(points = {{-70, -36}, {-70, -46}, {-30, -46}, {-30, -36}}, color = {0, 0, 255}));
1984 connect(Rf1.p, S4.p) annotation (
1985 Line(points = {{8, 18}, {8, 18}, {-10, 18}, {-10, 31}, {-70, 31}, {-70, -16}}, color = {0, 0, 255}));
1986 connect(Rf3.p, S2.p) annotation (
1987 Line(points = {{7, -50}, {7, -28}, {-17, -28}, {-17, -2}, {-30, -2}, {-30, -16}}, color = {0, 0, 255}));
1988 connect(Rf1.n, Lf1.p) annotation (
1989 Line(points = {{28, 18}, {34, 18}}, color = {0, 0, 255}));
1990 connect(Lf1.n, Ff1.p) annotation (
1991 Line(points = {{54, 18}, {66, 18}}, color = {0, 0, 255}));
1992 connect(Ff1.n, Rld1.n) annotation (
1993 Line(points = {{66, -2}, {66, -1}, {88, -1}}, color = {0, 0, 255}));
1994 connect(Rld1.p, Ff1.p) annotation (
1995 Line(points = {{88, 19}, {66, 19}, {66, 18}}, color = {0, 0, 255}));
1996 connect(ground.p, Rld1.n) annotation (
1997 Line(points = {{124, -33}, {124, -1}, {88, -1}}, color = {0, 0, 255}));
1998 connect(Rf2.n, Lf2.p) annotation (
1999 Line(points = {{25, -16}, {31, -16}}, color = {0, 0, 255}));
2000 connect(Lf2.n, Ff2.p) annotation (
2001 Line(points = {{51, -16}, {63, -16}}, color = {0, 0, 255}));
2002 connect(Rld2.n, Ff2.n) annotation (
2003 Line(points = {{85, -35}, {75, -35}, {75, -36}, {63, -36}}, color = {0, 0, 255}));
2004 connect(Rld2.p, Ff2.p) annotation (
2005 Line(points = {{85, -15}, {75, -15}, {75, -16}, {63, -16}}, color = {0, 0, 255}));
2006 connect(ground.p, Rld2.n) annotation (
2007 Line(points = {{124, -33}, {106, -33}, {106, -35}, {85, -35}}, color = {0, 0, 255}));
2008 connect(Rf3.n, Lf3.p) annotation (
2009 Line(points = {{27, -50}, {33, -50}}, color = {0, 0, 255}));
2010 connect(Lf3.n, Ff3.p) annotation (
2011 Line(points = {{53, -50}, {65, -50}}, color = {0, 0, 255}));
2012 connect(Rld3.n, Ff3.n) annotation (
2013 Line(points = {{87, -69}, {77, -69}, {77, -70}, {65, -70}}, color = {0, 0, 255}));
2014 connect(Rld3.p, Ff3.p) annotation (
2015 Line(points = {{87, -49}, {77, -49}, {77, -50}, {65, -50}}, color = {0, 0, 255}));
2016 connect(ground.p, Rld3.n) annotation (
2017 Line(points = {{124, -33}, {110, -33}, {110, -69}, {87, -69}}, color = {0, 0, 255}));
2018 connect(S5.control, g1.y) annotation (
2019 Line(points = {{-12, 52}, {-14, 52}, {-14, 50}, {-12.5, 50}}, color = {255, 0, 255}));
2020 connect(g2.y, S2.control) annotation (
2021 Line(points = {{-16.6, -46}, {-18, -46}, {-18, -26}}, color = {255, 0, 255}));
2022 connect(g3.y, S3.control) annotation (
2023 Line(points = {{-36, 47.6}, {-36, 58.5}, {-37.5, 58.5}, {-37.5, 58.3333}}, color = {255, 0, 255}));
2024 connect(g5.y, S1.control) annotation (
2025 Line(points = {{-60, 47.6}, {-58, 47.6}, {-58, 58}}, color = {255, 0, 255}));
2026 connect(g6.y, S4.control) annotation (
2027 Line(points = {{-62, -7.6}, {-62, -16}, {-62, -26}, {-58, -26}}, color = {255, 0, 255}));
2028 connect(g4.y, S6.control) annotation (
2029 Line(points = {{-42, -15.6}, {-42, -20}, {-42, -26}, {-38, -26}}, color = {255, 0, 255}));
2030 connect(ampl.y, svpwm.vPhasor[1]) annotation (
2031 Line(points = {{93, 68}, {80, 68}, {80, 36}, {40.5, 36}}, color = {0, 0, 127}));
2032 connect(phase.y, svpwm.vPhasor[2]) annotation (
2033 Line(points = {{103, 36}, {39.5, 36}}, color = {0, 0, 127}));
2034 connect(realExpression.y, svpwm.theta) annotation (
2035 Line(points = {{45, 66}, {42, 66}, {42, 48}, {40, 48}}, color = {0, 0, 127}));
2036 annotation (
2037 experimentSetupOutput,
2038 Documentation(info = "<html>
2039<p>Inverter SV-PWM realizzato utilizzando il blocco SV_PWM della libreria Power Systems.</p>
2040<p>Il modello richiede quindi Power Systems.</p>
2041</html>"),
2042 experiment(StopTime = 0.2, __Dymola_NumberOfIntervals = 2500),
2043 Diagram(coordinateSystem(extent = {{-100, -80}, {140, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2}), graphics = {Text(extent = {{-34, -52}, {-28, -56}}, lineColor = {28, 108, 200}, fillColor = {175, 175, 175}, fillPattern = FillPattern.Solid, textString = "a"), Text(extent = {{-52, -52}, {-46, -56}}, lineColor = {28, 108, 200}, fillColor = {175, 175, 175}, fillPattern = FillPattern.Solid, textString = "b"), Text(extent = {{-72, -52}, {-66, -56}}, lineColor = {28, 108, 200}, fillColor = {175, 175, 175}, fillPattern = FillPattern.Solid, textString = "c")}),
2044 Icon(coordinateSystem(extent = {{-100, -80}, {140, 80}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2})));
2045 end Id3Pwm1SVPWMtotal;
2046
2047 model Id3Pwm3SVPWMTotal "Tri-phase multiphase lib with ideal switches"
2048 Modelica.SIunits.Power aronPower;
2049 Real unFiltered1 = Rf.plug_p.pin[1].v - star2.pin_n.v;
2050 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
2051 Placement(visible = true, transformation(origin = {78, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
2052 Modelica.Electrical.MultiPhase.Basic.Resistor Rload(R = fill(2, 3)) annotation (
2053 Placement(visible = true, transformation(origin = {78, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2054 Modelica.Electrical.MultiPhase.Basic.Capacitor Cf(C = fill(0.000634, 3)) annotation (
2055 Placement(visible = true, transformation(origin = {32, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2056 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.001, 3)) annotation (
2057 Placement(visible = true, transformation(origin = {16, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2058 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
2059 Placement(visible = true, transformation(origin = {-8, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2060 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
2061 Placement(visible = true, transformation(origin = {-42, -44}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
2062 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
2063 Placement(visible = true, transformation(origin = {-42, 56}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
2064 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch downSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
2065 Placement(visible = true, transformation(origin = {-42, -16}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2066 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch upSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
2067 Placement(visible = true, transformation(origin = {-42, 28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2068 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
2069 Placement(visible = true, transformation(origin = {-70, -10}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
2070 AronSensor aronSensor annotation (
2071 Placement(visible = true, transformation(extent = {{46, -4}, {66, 16}}, rotation = 0)));
2072 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
2073 Placement(visible = true, transformation(origin = {-70, 44}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
2074 Modelica.Electrical.Analog.Basic.Ground ground2 annotation (
2075 Placement(visible = true, transformation(origin = {-92, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2076 PowerSystems_Control_Modulation_SVPWM svpwm annotation (
2077 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {-4, 54})));
2078 Modelica.Blocks.Sources.RealExpression realExpression(y = 314.15 * time) annotation (
2079 Placement(transformation(extent = {{36, 56}, {16, 76}})));
2080 Modelica.Blocks.Sources.Constant ampl(k = 0.7) annotation (
2081 Placement(visible = true, transformation(origin = {74, 68}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
2082 Modelica.Blocks.Sources.Constant phase(k = 0) annotation (
2083 Placement(visible = true, transformation(origin = {84, 36}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
2084 Modelica.Blocks.Sources.BooleanExpression g1[3](y = {svpwm.gates[1], svpwm.gates[3], svpwm.gates[5]}) annotation (
2085 Placement(transformation(extent = {{-4, 18}, {-24, 38}})));
2086 Modelica.Blocks.Sources.BooleanExpression g2[3](y = {svpwm.gates[2], svpwm.gates[4], svpwm.gates[6]}) annotation (
2087 Placement(transformation(extent = {{-4, -26}, {-24, -6}})));
2088 equation
2089 connect(ground2.p, V2.n) annotation (
2090 Line(points = {{-92, 8}, {-70, 8}, {-70, 34}}, color = {0, 0, 255}));
2091 connect(V2.p, star.pin_n) annotation (
2092 Line(points = {{-70, 54}, {-70, 70}, {-42, 70}, {-42, 66}}, color = {0, 0, 255}));
2093 connect(V2.n, V1.p) annotation (
2094 Line(points = {{-70, 34}, {-70, 34}, {-70, 0}}, color = {0, 0, 255}));
2095 connect(aronSensor.n, Rload.plug_p) annotation (
2096 Line(points = {{66, 6}, {69, 6}, {72, 6}, {78, 6}}, color = {0, 0, 255}));
2097 connect(aronSensor.p, Cf.plug_p) annotation (
2098 Line(points = {{46, 6}, {39, 6}, {32, 6}}, color = {0, 0, 255}));
2099 connect(V1.n, star1.pin_n) annotation (
2100 Line(points = {{-70, -20}, {-70, -54}, {-42, -54}}, color = {0, 0, 255}));
2101 connect(upSW.plug_n, downSW.plug_p) annotation (
2102 Line(points = {{-42, 18}, {-42, -6}}, color = {0, 0, 255}));
2103 connect(upSW.plug_p, star.plug_p) annotation (
2104 Line(points = {{-42, 38}, {-42, 46}}, color = {0, 0, 255}));
2105 connect(Rf.plug_p, downSW.plug_p) annotation (
2106 Line(points = {{-18, 6}, {-42, 6}, {-42, -6}}, color = {0, 0, 255}));
2107 connect(downSW.plug_n, star1.plug_p) annotation (
2108 Line(points = {{-42, -26}, {-42, -34}}, color = {0, 0, 255}));
2109 connect(Rf.plug_n, Lf.plug_p) annotation (
2110 Line(points = {{2, 6}, {6, 6}}, color = {0, 0, 255}));
2111 connect(Cf.plug_p, Lf.plug_n) annotation (
2112 Line(points = {{32, 6}, {31, 6}, {31, 6}, {30, 6}, {26, 6}}, color = {0, 0, 255}));
2113 connect(Cf.plug_n, Rload.plug_n) annotation (
2114 Line(points = {{32, -14}, {78, -14}}, color = {0, 0, 255}));
2115 connect(Rload.plug_n, star2.plug_p) annotation (
2116 Line(points = {{78, -14}, {78, -20}}, color = {0, 0, 255}));
2117 aronPower = Rload.plug_p.pin[1].v * Rload.plug_p.pin[1].i + Rload.plug_p.pin[2].v * Rload.plug_p.pin[2].i + Rload.plug_p.pin[3].v * Rload.plug_p.pin[3].i;
2118 connect(realExpression.y, svpwm.theta) annotation (
2119 Line(points = {{15, 66}, {12, 66}, {12, 60}, {6, 60}}, color = {0, 0, 127}));
2120 connect(phase.y, svpwm.vPhasor[2]) annotation (
2121 Line(points = {{73, 36}, {42, 36}, {42, 48}, {5.5, 48}}, color = {0, 0, 127}));
2122 connect(ampl.y, svpwm.vPhasor[1]) annotation (
2123 Line(points = {{63, 68}, {36, 68}, {36, 48}, {6.5, 48}}, color = {0, 0, 127}));
2124 connect(g1.y, upSW.control) annotation (
2125 Line(points = {{-25, 28}, {-30, 28}}, color = {255, 0, 255}));
2126 connect(g2.y, downSW.control) annotation (
2127 Line(points = {{-25, -16}, {-30, -16}}, color = {255, 0, 255}));
2128 annotation (
2129 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -60}, {100, 80}})),
2130 experimentSetupOutput,
2131 Documentation(info = "<html><head></head><body><p><br></p>
2132</body></html>", revisions = "<html><head></head><body>non newInst</body></html>"),
2133 experiment(StopTime = 0, Interval = 2e-05),
2134 __OpenModelica_commandLineOptions = "");
2135 end Id3Pwm3SVPWMTotal;
2136
2137 model Id3Pwm3 "Tri-phase multiphase lib with ideal switches"
2138 Modelica.SIunits.Power aronPower;
2139 Real unFiltered1 = Rf.plug_p.pin[1].v - star2.pin_n.v;
2140 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
2141 Placement(visible = true, transformation(origin = {78, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
2142 Modelica.Electrical.MultiPhase.Basic.Resistor Rload(R = fill(2, 3)) annotation (
2143 Placement(visible = true, transformation(origin = {78, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2144 Modelica.Electrical.MultiPhase.Basic.Capacitor Cf(C = fill(0.000634, 3)) annotation (
2145 Placement(visible = true, transformation(origin = {32, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2146 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.001, 3)) annotation (
2147 Placement(visible = true, transformation(origin = {16, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2148 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
2149 Placement(visible = true, transformation(origin = {-8, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2150 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
2151 Placement(visible = true, transformation(origin = {-42, -44}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
2152 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
2153 Placement(visible = true, transformation(origin = {-42, 56}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
2154 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch downSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
2155 Placement(visible = true, transformation(origin = {-42, -14}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2156 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch upSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
2157 Placement(visible = true, transformation(origin = {-42, 28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2158 Modelica.Blocks.Sources.Constant ampl[3](k = fill(0.7, 3)) annotation (
2159 Placement(visible = true, transformation(origin = {80, 50}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
2160 Modelica.Blocks.Sources.Constant phase[3](k = {0, -120, 120}) annotation (
2161 Placement(visible = true, transformation(origin = {48, 42}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
2162 Support.PwmPulser pwmPulser[3](fMod = fill(50, 3), fCar = fill(1000, 3)) annotation (
2163 Placement(visible = true, transformation(origin = {5, 50}, extent = {{-13, 13}, {13, -13}}, rotation = 180)));
2164 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
2165 Placement(visible = true, transformation(origin = {-70, -10}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
2166 AronSensor aronSensor annotation (
2167 Placement(visible = true, transformation(extent = {{46, -4}, {66, 16}}, rotation = 0)));
2168 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
2169 Placement(visible = true, transformation(origin = {-70, 44}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
2170 Modelica.Electrical.Analog.Basic.Ground ground2 annotation (
2171 Placement(visible = true, transformation(origin = {-92, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2172 equation
2173 connect(phase.y, pwmPulser.ph_deg) annotation (
2174 Line(points = {{37, 42}, {28, 42}, {28, 42.98}, {20.6, 42.98}}, color = {0, 0, 127}));
2175 connect(ampl.y, pwmPulser.ampl) annotation (
2176 Line(points = {{69, 50}, {66, 50}, {66, 58}, {50, 58}, {50, 58.32}, {20.6, 58.32}}, color = {0, 0, 127}));
2177 connect(pwmPulser.down, downSW.control) annotation (
2178 Line(points = {{-9.3, 42.46}, {-26, 42.46}, {-26, -14}, {-30, -14}}, color = {255, 0, 255}));
2179 connect(pwmPulser.up, upSW.control) annotation (
2180 Line(points = {{-9.3, 58.58}, {-20, 58.58}, {-20, 58}, {-30, 58}, {-30, 28}, {-30, 28}}, color = {255, 0, 255}));
2181 connect(ground2.p, V2.n) annotation (
2182 Line(points = {{-92, 8}, {-70, 8}, {-70, 34}}, color = {0, 0, 255}));
2183 connect(V2.p, star.pin_n) annotation (
2184 Line(points = {{-70, 54}, {-70, 70}, {-42, 70}, {-42, 66}}, color = {0, 0, 255}));
2185 connect(V2.n, V1.p) annotation (
2186 Line(points = {{-70, 34}, {-70, 34}, {-70, 0}}, color = {0, 0, 255}));
2187 connect(aronSensor.n, Rload.plug_p) annotation (
2188 Line(points = {{66, 6}, {69, 6}, {72, 6}, {78, 6}}, color = {0, 0, 255}));
2189 connect(aronSensor.p, Cf.plug_p) annotation (
2190 Line(points = {{46, 6}, {39, 6}, {32, 6}}, color = {0, 0, 255}));
2191 connect(V1.n, star1.pin_n) annotation (
2192 Line(points = {{-70, -20}, {-70, -54}, {-42, -54}}, color = {0, 0, 255}));
2193 connect(upSW.plug_n, downSW.plug_p) annotation (
2194 Line(points = {{-42, 18}, {-42, -4}}, color = {0, 0, 255}));
2195 connect(upSW.plug_p, star.plug_p) annotation (
2196 Line(points = {{-42, 38}, {-42, 46}}, color = {0, 0, 255}));
2197 connect(Rf.plug_p, downSW.plug_p) annotation (
2198 Line(points = {{-18, 6}, {-42, 6}, {-42, -4}}, color = {0, 0, 255}));
2199 connect(downSW.plug_n, star1.plug_p) annotation (
2200 Line(points = {{-42, -24}, {-42, -34}}, color = {0, 0, 255}));
2201 connect(Rf.plug_n, Lf.plug_p) annotation (
2202 Line(points = {{2, 6}, {6, 6}}, color = {0, 0, 255}));
2203 connect(Cf.plug_p, Lf.plug_n) annotation (
2204 Line(points = {{32, 6}, {31, 6}, {31, 6}, {30, 6}, {26, 6}}, color = {0, 0, 255}));
2205 connect(Cf.plug_n, Rload.plug_n) annotation (
2206 Line(points = {{32, -14}, {78, -14}}, color = {0, 0, 255}));
2207 connect(Rload.plug_n, star2.plug_p) annotation (
2208 Line(points = {{78, -14}, {78, -20}}, color = {0, 0, 255}));
2209 aronPower = Rload.plug_p.pin[1].v * Rload.plug_p.pin[1].i + Rload.plug_p.pin[2].v * Rload.plug_p.pin[2].i + Rload.plug_p.pin[3].v * Rload.plug_p.pin[3].i;
2210 annotation (
2211 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -60}, {100, 80}})),
2212 experimentSetupOutput,
2213 Documentation(info = "<html><head></head><body><p><br></p>
2214</body></html>", revisions = "<html><head></head><body>non newInst</body></html>"),
2215 experiment(StopTime = 0.2, Interval = 2e-05),
2216 __OpenModelica_commandLineOptions = "");
2217 end Id3Pwm3;
2218
2219 model Id3Pwm3SVPWM_PS "Tri-phase multiphase lib with ideal switches"
2220 Modelica.SIunits.Power aronPower;
2221 Real unFiltered1 = Rf.plug_p.pin[1].v - star2.pin_n.v;
2222 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
2223 Placement(visible = true, transformation(origin = {78, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
2224 Modelica.Electrical.MultiPhase.Basic.Resistor Rload(R = fill(2, 3)) annotation (
2225 Placement(visible = true, transformation(origin = {78, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2226 Modelica.Electrical.MultiPhase.Basic.Capacitor Cf(C = fill(0.000634, 3)) annotation (
2227 Placement(visible = true, transformation(origin = {32, -4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2228 Modelica.Electrical.MultiPhase.Basic.Inductor Lf(L = fill(0.001, 3)) annotation (
2229 Placement(visible = true, transformation(origin = {16, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2230 Modelica.Electrical.MultiPhase.Basic.Resistor Rf(R = fill(0.05, 3)) annotation (
2231 Placement(visible = true, transformation(origin = {-8, 6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2232 Modelica.Electrical.MultiPhase.Basic.Star star1 annotation (
2233 Placement(visible = true, transformation(origin = {-42, -44}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
2234 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
2235 Placement(visible = true, transformation(origin = {-42, 56}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
2236 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch downSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
2237 Placement(visible = true, transformation(origin = {-42, -16}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2238 Modelica.Electrical.MultiPhase.Ideal.IdealClosingSwitch upSW(Ron = fill(1e-5, 3), Goff = fill(1e-5, 3)) annotation (
2239 Placement(visible = true, transformation(origin = {-42, 28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2240 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 50) annotation (
2241 Placement(visible = true, transformation(origin = {-70, -10}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
2242 AronSensor aronSensor annotation (
2243 Placement(visible = true, transformation(extent = {{46, -4}, {66, 16}}, rotation = 0)));
2244 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation (
2245 Placement(visible = true, transformation(origin = {-70, 44}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
2246 Modelica.Electrical.Analog.Basic.Ground ground2 annotation (
2247 Placement(visible = true, transformation(origin = {-92, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2248 PowerSystems.Control.Modulation.SVPWM svpwm annotation (
2249 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {-4, 54})));
2250 Modelica.Blocks.Sources.RealExpression realExpression(y = 314.15 * time) annotation (
2251 Placement(transformation(extent = {{36, 56}, {16, 76}})));
2252 Modelica.Blocks.Sources.Constant ampl(k = 0.7) annotation (
2253 Placement(visible = true, transformation(origin = {74, 68}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
2254 Modelica.Blocks.Sources.Constant phase(k = 0) annotation (
2255 Placement(visible = true, transformation(origin = {84, 36}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
2256 Modelica.Blocks.Sources.BooleanExpression g1[3](y = {svpwm.gates[1], svpwm.gates[3], svpwm.gates[5]}) annotation (
2257 Placement(transformation(extent = {{-4, 18}, {-24, 38}})));
2258 Modelica.Blocks.Sources.BooleanExpression g2[3](y = {svpwm.gates[2], svpwm.gates[4], svpwm.gates[6]}) annotation (
2259 Placement(transformation(extent = {{-4, -26}, {-24, -6}})));
2260 equation
2261 connect(ground2.p, V2.n) annotation (
2262 Line(points = {{-92, 8}, {-70, 8}, {-70, 34}}, color = {0, 0, 255}));
2263 connect(V2.p, star.pin_n) annotation (
2264 Line(points = {{-70, 54}, {-70, 70}, {-42, 70}, {-42, 66}}, color = {0, 0, 255}));
2265 connect(V2.n, V1.p) annotation (
2266 Line(points = {{-70, 34}, {-70, 34}, {-70, 0}}, color = {0, 0, 255}));
2267 connect(aronSensor.n, Rload.plug_p) annotation (
2268 Line(points = {{66, 6}, {69, 6}, {72, 6}, {78, 6}}, color = {0, 0, 255}));
2269 connect(aronSensor.p, Cf.plug_p) annotation (
2270 Line(points = {{46, 6}, {39, 6}, {32, 6}}, color = {0, 0, 255}));
2271 connect(V1.n, star1.pin_n) annotation (
2272 Line(points = {{-70, -20}, {-70, -54}, {-42, -54}}, color = {0, 0, 255}));
2273 connect(upSW.plug_n, downSW.plug_p) annotation (
2274 Line(points = {{-42, 18}, {-42, -6}}, color = {0, 0, 255}));
2275 connect(upSW.plug_p, star.plug_p) annotation (
2276 Line(points = {{-42, 38}, {-42, 46}}, color = {0, 0, 255}));
2277 connect(Rf.plug_p, downSW.plug_p) annotation (
2278 Line(points = {{-18, 6}, {-42, 6}, {-42, -6}}, color = {0, 0, 255}));
2279 connect(downSW.plug_n, star1.plug_p) annotation (
2280 Line(points = {{-42, -26}, {-42, -34}}, color = {0, 0, 255}));
2281 connect(Rf.plug_n, Lf.plug_p) annotation (
2282 Line(points = {{2, 6}, {6, 6}}, color = {0, 0, 255}));
2283 connect(Cf.plug_p, Lf.plug_n) annotation (
2284 Line(points = {{32, 6}, {31, 6}, {31, 6}, {30, 6}, {26, 6}}, color = {0, 0, 255}));
2285 connect(Cf.plug_n, Rload.plug_n) annotation (
2286 Line(points = {{32, -14}, {78, -14}}, color = {0, 0, 255}));
2287 connect(Rload.plug_n, star2.plug_p) annotation (
2288 Line(points = {{78, -14}, {78, -20}}, color = {0, 0, 255}));
2289 aronPower = Rload.plug_p.pin[1].v * Rload.plug_p.pin[1].i + Rload.plug_p.pin[2].v * Rload.plug_p.pin[2].i + Rload.plug_p.pin[3].v * Rload.plug_p.pin[3].i;
2290 connect(realExpression.y, svpwm.theta) annotation (
2291 Line(points = {{15, 66}, {12, 66}, {12, 60}, {6, 60}}, color = {0, 0, 127}));
2292 connect(phase.y, svpwm.vPhasor[2]) annotation (
2293 Line(points = {{73, 36}, {42, 36}, {42, 48}, {5.5, 48}}, color = {0, 0, 127}));
2294 connect(ampl.y, svpwm.vPhasor[1]) annotation (
2295 Line(points = {{63, 68}, {36, 68}, {36, 48}, {6.5, 48}}, color = {0, 0, 127}));
2296 connect(g1.y, upSW.control) annotation (
2297 Line(points = {{-25, 28}, {-35, 28}}, color = {255, 0, 255}));
2298 connect(g2.y, downSW.control) annotation (
2299 Line(points = {{-25, -16}, {-35, -16}}, color = {255, 0, 255}));
2300 annotation (
2301 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -60}, {100, 80}})),
2302 experimentSetupOutput,
2303 Documentation(info = "<html><head></head><body><p><br></p>
2304</body></html>", revisions = "<html><head></head><body>non newInst</body></html>"),
2305 experiment(StopTime = 0, Interval = 2e-05),
2306 __OpenModelica_commandLineOptions = "");
2307 end Id3Pwm3SVPWM_PS;
2308 end SVPWM;
2309
2310 package Hyst
2311 model ReTwoHy "Switch-diode pais, two-legs, square wave"
2312 Modelica.Electrical.Analog.Basic.Ground ground annotation (
2313 Placement(visible = true, transformation(extent = {{82, -60}, {102, -40}}, rotation = 0)));
2314 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 225.0) annotation (
2315 Placement(visible = true, transformation(origin = {-70, 12}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
2316 Modelica.Blocks.MathBoolean.Not nor1 annotation (
2317 Placement(visible = true, transformation(origin = {-8, -20}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
2318 Modelica.Electrical.Analog.Ideal.IdealDiode uD(Vknee = 0.1) annotation (
2319 Placement(visible = true, transformation(origin = {-50, 34}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
2320 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW(Vknee = 0.1) annotation (
2321 Placement(visible = true, transformation(origin = {-30, 34}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
2322 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW(Vknee = 0.1) annotation (
2323 Placement(visible = true, transformation(origin = {-30, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
2324 Modelica.Electrical.Analog.Ideal.IdealDiode dD(Vknee = 0.1) annotation (
2325 Placement(visible = true, transformation(origin = {-50, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
2326 Modelica.Electrical.Analog.Basic.Inductor inductor(L = 10e-3) annotation (
2327 Placement(visible = true, transformation(origin = {92, 12}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2328 Modelica.Electrical.Analog.Basic.Resistor Load(R = 10) annotation (
2329 Placement(visible = true, transformation(origin = {92, -16}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
2330 Modelica.Electrical.Analog.Ideal.IdealDiode uD1(Vknee = 0.1) annotation (
2331 Placement(visible = true, transformation(origin = {12, 34}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
2332 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor uSW1(Vknee = 0.1) annotation (
2333 Placement(visible = true, transformation(origin = {32, 34}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
2334 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor dSW1(Vknee = 0.1) annotation (
2335 Placement(visible = true, transformation(origin = {32, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
2336 Modelica.Electrical.Analog.Ideal.IdealDiode dD1(Vknee = 0.1) annotation (
2337 Placement(visible = true, transformation(origin = {12, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
2338 Modelica.Blocks.MathBoolean.Not nor2 annotation (
2339 Placement(visible = true, transformation(origin = {42, 44}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
2340 Modelica.Blocks.Logical.OnOffController onOffContr(bandwidth = 0.5) annotation (
2341 Placement(visible = true, transformation(origin = {72, 60}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
2342 Modelica.Electrical.Analog.Sensors.CurrentSensor currtSens annotation (
2343 Placement(visible = true, transformation(origin = {72, 28}, extent = {{-10, 10}, {10, -10}}, rotation = 0)));
2344 Modelica.Blocks.Sources.Sine sine1(amplitude = 10, freqHz = 50) annotation (
2345 Placement(visible = true, transformation(origin = {108, 62}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
2346 equation
2347 connect(ground.p, dSW1.p) annotation (
2348 Line(points = {{92, -40}, {92, -30}, {78, -30}, {78, -4}, {32, -4}, {32, -14}}, color = {0, 0, 255}));
2349 connect(V1.n, dD1.p) annotation (
2350 Line(points = {{-70, 2}, {-70, -48}, {12, -48}, {12, -34}}, color = {0, 0, 255}));
2351 connect(V1.n, dD.p) annotation (
2352 Line(points = {{-70, 2}, {-70, -48}, {-50, -48}, {-50, -34}}, color = {0, 0, 255}));
2353 connect(V1.p, uD1.n) annotation (
2354 Line(points = {{-70, 22}, {-70, 54}, {22, 54}, {22, 48}, {12, 48}, {12, 44}}, color = {0, 0, 255}));
2355 connect(V1.p, uD.n) annotation (
2356 Line(points = {{-70, 22}, {-70, 54}, {-40, 54}, {-40, 48}, {-50, 48}, {-50, 44}}, color = {0, 0, 255}));
2357 connect(nor1.u, nor2.u) annotation (
2358 Line(points = {{-8, -14.4}, {-8, 58}, {42, 58}, {42, 49.6}}, color = {255, 0, 255}));
2359 connect(nor1.y, dSW.fire) annotation (
2360 Line(points = {{-8, -24.8}, {-8, -34}, {-18, -34}}, color = {255, 0, 255}));
2361 connect(uSW.p, uD.n) annotation (
2362 Line(points = {{-30, 44}, {-30, 48}, {-50, 48}, {-50, 44}}, color = {0, 0, 255}));
2363 connect(uD.p, uSW.n) annotation (
2364 Line(points = {{-50, 24}, {-50, 16}, {-30, 16}, {-30, 24}}, color = {0, 0, 255}));
2365 connect(uD.p, dSW.p) annotation (
2366 Line(points = {{-50, 24}, {-50, 16}, {-40, 16}, {-40, -14}, {-30, -14}}, color = {0, 0, 255}));
2367 connect(currtSens.p, uD.p) annotation (
2368 Line(points = {{62, 28}, {58, 28}, {58, 12}, {-40, 12}, {-40, 16}, {-50, 16}, {-50, 24}}, color = {0, 0, 255}));
2369 connect(uSW.fire, nor2.u) annotation (
2370 Line(points = {{-18, 24}, {-14, 24}, {-14, 58}, {42, 58}, {42, 49.6}}, color = {255, 0, 255}));
2371 connect(dD.n, dSW.p) annotation (
2372 Line(points = {{-50, -14}, {-30, -14}}, color = {0, 0, 255}));
2373 connect(dSW.n, dD.p) annotation (
2374 Line(points = {{-30, -34}, {-30, -48}, {-50, -48}, {-50, -34}}, color = {0, 0, 255}));
2375 connect(inductor.n, Load.p) annotation (
2376 Line(points = {{92, 2}, {92, -6}}, color = {0, 0, 255}));
2377 connect(currtSens.n, inductor.p) annotation (
2378 Line(points = {{82, 28}, {92, 28}, {92, 22}}, color = {0, 0, 255}));
2379 connect(Load.n, dSW1.p) annotation (
2380 Line(points = {{92, -26}, {92, -30}, {78, -30}, {78, -4}, {32, -4}, {32, -14}}, color = {0, 0, 255}));
2381 connect(uSW1.p, uD1.n) annotation (
2382 Line(points = {{32, 44}, {32, 48}, {12, 48}, {12, 44}}, color = {0, 0, 255}));
2383 connect(uD1.p, uSW1.n) annotation (
2384 Line(points = {{12, 24}, {12, 16}, {32, 16}, {32, 24}}, color = {0, 0, 255}));
2385 connect(uD1.p, dSW1.p) annotation (
2386 Line(points = {{12, 24}, {12, 16}, {22, 16}, {22, -14}, {32, -14}}, color = {0, 0, 255}));
2387 connect(nor2.y, uSW1.fire) annotation (
2388 Line(points = {{42, 39.2}, {42, 24}, {44, 24}}, color = {255, 0, 255}));
2389 connect(dD1.n, dSW1.p) annotation (
2390 Line(points = {{12, -14}, {32, -14}}, color = {0, 0, 255}));
2391 connect(dSW1.n, dD1.p) annotation (
2392 Line(points = {{32, -34}, {32, -48}, {12, -48}, {12, -34}}, color = {0, 0, 255}));
2393 connect(dSW1.fire, nor2.u) annotation (
2394 Line(points = {{44, -34}, {50, -34}, {50, 58}, {42, 58}, {42, 49.6}}, color = {255, 0, 255}));
2395 connect(onOffContr.y, nor2.u) annotation (
2396 Line(points = {{61, 60}, {43, 60}, {43, 50}, {43, 50}}, color = {255, 0, 255}));
2397 connect(currtSens.i, onOffContr.u) annotation (
2398 Line(points = {{72, 39}, {72, 41}, {94, 41}, {94, 53}, {84, 53}}, color = {0, 0, 127}));
2399 connect(sine1.y, onOffContr.reference) annotation (
2400 Line(points = {{97, 62}, {91.5, 62}, {91.5, 66}, {84, 66}}, color = {0, 0, 127}));
2401 annotation (
2402 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-80, -60}, {120, 80}})),
2403 experiment(StopTime = 0.1, StartTime = 0, Tolerance = 1e-06, Interval = 2e-05),
2404 Documentation(info = "<html><head></head><body><p><br></p>
2405 </body></html>", revisions = "<html><head></head><body>no newInst</body></html>"),
2406 Icon(coordinateSystem(extent = {{-80, -60}, {120, 80}}, preserveAspectRatio = false)));
2407 end ReTwoHy;
2408
2409 model IdTwoHy "Switch-diode pais, two-legs, square wave"
2410 Modelica.Electrical.Analog.Basic.Ground ground annotation (
2411 Placement(visible = true, transformation(extent = {{64, -50}, {84, -30}}, rotation = 0)));
2412 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 225.0) annotation (
2413 Placement(visible = true, transformation(origin = {-38, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
2414 Modelica.Electrical.Analog.Basic.Inductor inductor(L = 10e-3) annotation (
2415 Placement(visible = true, transformation(origin = {74, 8}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2416 Modelica.Electrical.Analog.Basic.Resistor Load(R = 10) annotation (
2417 Placement(visible = true, transformation(origin = {74, -16}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
2418 Modelica.Blocks.MathBoolean.Not nor2 annotation (
2419 Placement(visible = true, transformation(origin = {24, 48}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
2420 Modelica.Blocks.Logical.OnOffController onOffContr(bandwidth = 0.7) annotation (
2421 Placement(visible = true, transformation(origin = {52, 58}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
2422 Modelica.Electrical.Analog.Sensors.CurrentSensor currtSens annotation (
2423 Placement(visible = true, transformation(origin = {58, 24}, extent = {{-10, 10}, {10, -10}}, rotation = 0)));
2424 Modelica.Blocks.Sources.Sine sine1(amplitude = 10, freqHz = 50) annotation (
2425 Placement(visible = true, transformation(origin = {86, 60}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
2426 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch1 annotation (
2427 Placement(visible = true, transformation(origin = {-22, 40}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2428 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch annotation (
2429 Placement(visible = true, transformation(origin = {-22, -20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2430 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch2 annotation (
2431 Placement(visible = true, transformation(origin = {2, 40}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2432 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch3 annotation (
2433 Placement(visible = true, transformation(origin = {2, -20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2434 equation
2435 connect(Load.n, switch3.p) annotation (
2436 Line(points = {{74, -26}, {40, -26}, {40, 4}, {2, 4}, {2, -10}}, color = {0, 0, 255}));
2437 connect(Load.n, ground.p) annotation (
2438 Line(points = {{74, -26}, {74, -30}}, color = {0, 0, 255}));
2439 connect(inductor.n, Load.p) annotation (
2440 Line(points = {{74, -2}, {74, -6}}, color = {0, 0, 255}));
2441 connect(sine1.y, onOffContr.reference) annotation (
2442 Line(points = {{75, 60}, {73.5, 60}, {73.5, 64}, {64, 64}}, color = {0, 0, 127}));
2443 connect(switch3.control, onOffContr.y) annotation (
2444 Line(points = {{14, -20}, {34, -20}, {34, 58}, {41, 58}}, color = {255, 0, 255}));
2445 connect(switch1.control, onOffContr.y) annotation (
2446 Line(points = {{-10, 40}, {-10, 58}, {41, 58}}, color = {255, 0, 255}));
2447 connect(currtSens.i, onOffContr.u) annotation (
2448 Line(points = {{58, 35}, {58, 37}, {72, 37}, {72, 52}, {64, 52}}, color = {0, 0, 127}));
2449 connect(onOffContr.y, nor2.u) annotation (
2450 Line(points = {{41, 58}, {24, 58}, {24, 54}}, color = {255, 0, 255}));
2451 connect(V1.p, switch1.p) annotation (
2452 Line(points = {{-38, 20}, {-38, 50}, {-22, 50}}, color = {0, 0, 255}));
2453 connect(V1.n, switch.n) annotation (
2454 Line(points = {{-38, 0}, {-38, -30}, {-22, -30}}, color = {0, 0, 255}));
2455 connect(currtSens.p, switch1.n) annotation (
2456 Line(points = {{48, 24}, {-22, 24}, {-22, 30}}, color = {0, 0, 255}));
2457 connect(currtSens.n, inductor.p) annotation (
2458 Line(points = {{68, 24}, {74, 24}, {74, 18}}, color = {0, 0, 255}));
2459 connect(switch.control, nor2.y) annotation (
2460 Line(points = {{-10, -20}, {-4, -20}, {-4, 12}, {24, 12}, {24, 43}}, color = {255, 0, 255}));
2461 connect(nor2.y, switch2.control) annotation (
2462 Line(points = {{24, 43}, {24, 40}, {14, 40}}, color = {255, 0, 255}));
2463 connect(switch.n, switch3.n) annotation (
2464 Line(points = {{-22, -30}, {2, -30}}, color = {0, 0, 255}));
2465 connect(switch2.n, switch3.p) annotation (
2466 Line(points = {{2, 30}, {2, -10}}, color = {0, 0, 255}));
2467 connect(switch1.p, switch2.p) annotation (
2468 Line(points = {{-22, 50}, {2, 50}}, color = {0, 0, 255}));
2469 connect(switch1.n, switch.p) annotation (
2470 Line(points = {{-22, 30}, {-22, 30}, {-22, 32}, {-22, 32}, {-22, -8}, {-22, -8}, {-22, -10}, {-22, -10}}, color = {0, 0, 255}));
2471 annotation (
2472 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-80, -60}, {120, 80}})),
2473 experiment(StopTime = 0.04, StartTime = 0, Tolerance = 1e-06, Interval = 8e-06),
2474 Documentation(info = "<html><head></head><body><p><br></p>
2475 </body></html>", revisions = "<html><head></head><body>no newInst</body></html>"),
2476 Icon(coordinateSystem(extent = {{-80, -60}, {120, 80}}, preserveAspectRatio = false)));
2477 end IdTwoHy;
2478
2479 model IdTwoRLE "Switch-diode pais, two-legs, square wave"
2480 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 100) annotation (
2481 Placement(visible = true, transformation(origin = {-64, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
2482 Modelica.Electrical.Analog.Basic.Inductor inductor(L = 5e-3) annotation (
2483 Placement(visible = true, transformation(origin = {58, 24}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2484 Modelica.Electrical.Analog.Basic.Resistor Load(R = 0.05) annotation (
2485 Placement(visible = true, transformation(origin = {90, 24}, extent = {{-10, 10}, {10, -10}}, rotation = 0)));
2486 Modelica.Blocks.MathBoolean.Not nor2 annotation (
2487 Placement(visible = true, transformation(origin = {-2, 48}, extent = {{-4, -4}, {4, 4}}, rotation = 270)));
2488 Modelica.Blocks.Logical.OnOffController onOffContr(bandwidth = 0.7) annotation (
2489 Placement(visible = true, transformation(origin = {26, 58}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
2490 Modelica.Electrical.Analog.Sensors.CurrentSensor currtSens annotation (
2491 Placement(visible = true, transformation(origin = {32, 24}, extent = {{-10, 10}, {10, -10}}, rotation = 0)));
2492 Modelica.Blocks.Sources.Sine sine1(amplitude = 10, freqHz = 50) annotation (
2493 Placement(visible = true, transformation(origin = {60, 60}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
2494 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch1 annotation (
2495 Placement(visible = true, transformation(origin = {-48, 40}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2496 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch4 annotation (
2497 Placement(visible = true, transformation(origin = {-48, -20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2498 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch2 annotation (
2499 Placement(visible = true, transformation(origin = {-24, 40}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2500 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch3 annotation (
2501 Placement(visible = true, transformation(origin = {-24, -20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2502 Modelica.Electrical.Analog.Sources.SineVoltage fem(V = 90, freqHz = 50) annotation (
2503 Placement(visible = true, transformation(origin = {100, 4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2504 Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
2505 Placement(visible = true, transformation(origin = {100, -22}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2506 equation
2507 connect(fem.n, ground1.p) annotation (
2508 Line(points = {{100, -6}, {100, -6}, {100, -12}, {100, -12}}, color = {0, 0, 255}));
2509 connect(fem.n, switch3.p) annotation (
2510 Line(points = {{100, -6}, {-12, -6}, {-12, 2}, {-24, 2}, {-24, -10}, {-24, -10}}, color = {0, 0, 255}));
2511 connect(fem.p, Load.n) annotation (
2512 Line(points = {{100, 14}, {100, 14}, {100, 24}, {100, 24}}, color = {0, 0, 255}));
2513 connect(currtSens.n, inductor.p) annotation (
2514 Line(points = {{42, 24}, {42, 23}, {48, 23}, {48, 24}}, color = {0, 0, 255}));
2515 connect(inductor.n, Load.p) annotation (
2516 Line(points = {{68, 24}, {80, 24}}, color = {0, 0, 255}));
2517 connect(V1.n, switch4.n) annotation (
2518 Line(points = {{-64, 0}, {-64, -30}, {-48, -30}}, color = {0, 0, 255}));
2519 connect(V1.p, switch1.p) annotation (
2520 Line(points = {{-64, 20}, {-64, 50}, {-48, 50}}, color = {0, 0, 255}));
2521 connect(nor2.y, switch2.control) annotation (
2522 Line(points = {{-2, 43.2}, {-2, 40.2}, {-12, 40.2}}, color = {255, 0, 255}));
2523 connect(switch4.control, nor2.y) annotation (
2524 Line(points = {{-36, -20}, {-30, -20}, {-30, 12}, {-2, 12}, {-2, 43}}, color = {255, 0, 255}));
2525 connect(onOffContr.y, nor2.u) annotation (
2526 Line(points = {{15, 58}, {-2, 58}, {-2, 54}}, color = {255, 0, 255}));
2527 connect(currtSens.i, onOffContr.u) annotation (
2528 Line(points = {{32, 35}, {32, 37}, {46, 37}, {46, 52}, {38, 52}}, color = {0, 0, 127}));
2529 connect(switch1.control, onOffContr.y) annotation (
2530 Line(points = {{-36, 40}, {-36, 58}, {15, 58}}, color = {255, 0, 255}));
2531 connect(switch3.control, onOffContr.y) annotation (
2532 Line(points = {{-12, -20}, {8, -20}, {8, 58}, {15, 58}}, color = {255, 0, 255}));
2533 connect(sine1.y, onOffContr.reference) annotation (
2534 Line(points = {{49, 60}, {47.5, 60}, {47.5, 64}, {38, 64}}, color = {0, 0, 127}));
2535 connect(currtSens.p, switch1.n) annotation (
2536 Line(points = {{22, 24}, {-48, 24}, {-48, 30}}, color = {0, 0, 255}));
2537 connect(switch1.n, switch4.p) annotation (
2538 Line(points = {{-48, 30}, {-48, 30}, {-48, 32}, {-48, 32}, {-48, -8}, {-48, -8}, {-48, -10}, {-48, -10}}, color = {0, 0, 255}));
2539 connect(switch1.p, switch2.p) annotation (
2540 Line(points = {{-48, 50}, {-24, 50}}, color = {0, 0, 255}));
2541 connect(switch4.n, switch3.n) annotation (
2542 Line(points = {{-48, -30}, {-24, -30}}, color = {0, 0, 255}));
2543 connect(switch2.n, switch3.p) annotation (
2544 Line(points = {{-24, 30}, {-24, -10}}, color = {0, 0, 255}));
2545 annotation (
2546 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-80, -60}, {120, 80}})),
2547 experiment(StopTime = 0.1, StartTime = 0, Tolerance = 1e-06, Interval = 2e-05),
2548 Documentation(info = "<html><head></head><body><p><br></p>
2549 </body></html>", revisions = "<html><head></head><body>no newInst</body></html>"),
2550 Icon(coordinateSystem(extent = {{-80, -60}, {120, 80}}, preserveAspectRatio = false)));
2551 end IdTwoRLE;
2552
2553 model WIP "Switch-diode pais, two-legs, square wave"
2554 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 100) annotation (
2555 Placement(visible = true, transformation(origin = {-64, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
2556 Modelica.Electrical.Analog.Basic.Inductor inductor(L = 5e-3) annotation (
2557 Placement(visible = true, transformation(origin = {-4, 24}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2558 Modelica.Electrical.Analog.Basic.Resistor Load(R = 0.05) annotation (
2559 Placement(visible = true, transformation(origin = {22, 24}, extent = {{-10, 10}, {10, -10}}, rotation = 0)));
2560 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch1 annotation (
2561 Placement(visible = true, transformation(origin = {-48, 40}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2562 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch4 annotation (
2563 Placement(visible = true, transformation(origin = {-48, -20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2564 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch2 annotation (
2565 Placement(visible = true, transformation(origin = {-26, 40}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2566 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch switch3 annotation (
2567 Placement(visible = true, transformation(origin = {-26, -20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2568 Modelica.Electrical.Analog.Sources.SineVoltage fem(V = 90, freqHz = 50) annotation (
2569 Placement(visible = true, transformation(origin = {32, 4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
2570 Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
2571 Placement(visible = true, transformation(origin = {32, -22}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2572 equation
2573 connect(fem.n, ground1.p) annotation (
2574 Line(points = {{32, -6}, {32, -6}, {32, -12}, {32, -12}}, color = {0, 0, 255}));
2575 connect(fem.p, Load.n) annotation (
2576 Line(points = {{32, 14}, {32, 14}, {32, 24}, {32, 24}}, color = {0, 0, 255}));
2577 connect(fem.n, switch3.p) annotation (
2578 Line(points = {{32, -6}, {-12, -6}, {-12, 2}, {-26, 2}, {-26, -10}}, color = {0, 0, 255}));
2579 connect(inductor.n, Load.p) annotation (
2580 Line(points = {{6, 24}, {12, 24}}, color = {0, 0, 255}));
2581 connect(switch2.n, switch3.p) annotation (
2582 Line(points = {{-26, 30}, {-26, -10}}, color = {0, 0, 255}));
2583 connect(switch4.n, switch3.n) annotation (
2584 Line(points = {{-48, -30}, {-26, -30}}, color = {0, 0, 255}));
2585 connect(inductor.p, switch1.n) annotation (
2586 Line(points = {{-14, 24}, {-48, 24}, {-48, 30}}, color = {0, 0, 255}));
2587 connect(switch1.p, switch2.p) annotation (
2588 Line(points = {{-48, 50}, {-26, 50}}, color = {0, 0, 255}));
2589 connect(V1.n, switch4.n) annotation (
2590 Line(points = {{-64, 0}, {-64, -30}, {-48, -30}}, color = {0, 0, 255}));
2591 connect(V1.p, switch1.p) annotation (
2592 Line(points = {{-64, 20}, {-64, 50}, {-48, 50}}, color = {0, 0, 255}));
2593 connect(switch1.n, switch4.p) annotation (
2594 Line(points = {{-48, 30}, {-48, 30}, {-48, 32}, {-48, 32}, {-48, -8}, {-48, -8}, {-48, -10}, {-48, -10}}, color = {0, 0, 255}));
2595 annotation (
2596 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-80, -40}, {60, 60}})),
2597 experiment(StopTime = 0.1, StartTime = 0, Tolerance = 1e-06, Interval = 2e-05),
2598 Documentation(info = "<html><head></head><body><p><br></p>
2599 </body></html>", revisions = "<html><head></head><body>no newInst</body></html>"),
2600 Icon(coordinateSystem(extent = {{-80, -60}, {120, 80}}, preserveAspectRatio = false)));
2601 end WIP;
2602 annotation (
2603 Diagram(coordinateSystem(extent = {{-100, -80}, {100, 80}})));
2604 end Hyst;
2605
2606 package Support
2607 model PulseDelay
2608 annotation (
2609 Icon(coordinateSystem(preserveAspectRatio = false)),
2610 Diagram(coordinateSystem(preserveAspectRatio = false)));
2611 end PulseDelay;
2612
2613 model QMonoSensor "Sensor to measure the reactive power"
2614 Modelica.Electrical.Analog.Interfaces.PositivePin pc "Positive pin, current path" annotation (
2615 Placement(transformation(extent = {{-90, -10}, {-110, 10}}, rotation = 0)));
2616 Modelica.Electrical.Analog.Interfaces.NegativePin nc "Negative pin, current path" annotation (
2617 Placement(transformation(extent = {{110, -10}, {90, 10}}, rotation = 0)));
2618 Modelica.Electrical.Analog.Interfaces.PositivePin pv "Positive pin, voltage path" annotation (
2619 Placement(transformation(extent = {{-10, 110}, {10, 90}}, rotation = 0)));
2620 Modelica.Electrical.Analog.Interfaces.NegativePin nv "Negative pin, voltage path" annotation (
2621 Placement(transformation(extent = {{10, -110}, {-10, -90}}, rotation = 0)));
2622 Modelica.Blocks.Interfaces.RealOutput power annotation (
2623 Placement(transformation(origin = {-80, -110}, extent = {{-10, 10}, {10, -10}}, rotation = 270)));
2624 Modelica.Electrical.Analog.Sensors.VoltageSensor voltageSensor annotation (
2625 Placement(transformation(origin = {0, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
2626 Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor annotation (
2627 Placement(transformation(extent = {{-50, -10}, {-30, 10}}, rotation = 0)));
2628 Modelica.Blocks.Math.Product product annotation (
2629 Placement(transformation(origin = {-30, -50}, extent = {{-10, -10}, {10, 10}}, rotation = 270)));
2630 Modelica.Blocks.Nonlinear.VariableDelay variableDelay(delayMax = 1.0) annotation (
2631 Placement(transformation(extent = {{32, -40}, {52, -20}})));
2632 Modelica.Blocks.Sources.Constant const(k = 1 / (50 * 4)) annotation (
2633 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 90, origin = {18, -66})));
2634 equation
2635 connect(pv, voltageSensor.p) annotation (
2636 Line(points = {{0, 100}, {0, -20}, {6.12323e-016, -20}}, color = {0, 0, 255}));
2637 connect(voltageSensor.n, nv) annotation (
2638 Line(points = {{-6.12323e-016, -40}, {-6.12323e-016, -63}, {0, -63}, {0, -100}}, color = {0, 0, 255}));
2639 connect(pc, currentSensor.p) annotation (
2640 Line(points = {{-100, 0}, {-50, 0}}, color = {0, 0, 255}));
2641 connect(currentSensor.n, nc) annotation (
2642 Line(points = {{-30, 0}, {100, 0}}, color = {0, 0, 255}));
2643 connect(currentSensor.i, product.u2) annotation (
2644 Line(points = {{-40, -11}, {-40, -30}, {-36, -30}, {-36, -38}}, color = {0, 0, 127}));
2645 connect(product.y, power) annotation (
2646 Line(points = {{-30, -61}, {-30, -80}, {-80, -80}, {-80, -110}}, color = {0, 0, 127}));
2647 connect(variableDelay.u, voltageSensor.v) annotation (
2648 Line(points = {{30, -30}, {11, -30}}, color = {0, 0, 127}, smooth = Smooth.None));
2649 connect(const.y, variableDelay.delayTime) annotation (
2650 Line(points = {{18, -55}, {18, -36}, {30, -36}}, color = {0, 0, 127}, smooth = Smooth.None));
2651 connect(variableDelay.y, product.u1) annotation (
2652 Line(points = {{53, -30}, {68, -30}, {68, 20}, {-24, 20}, {-24, -38}}, color = {0, 0, 127}, smooth = Smooth.None));
2653 annotation (
2654 Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}, grid = {2, 2}), graphics = {Ellipse(extent = {{-70, 70}, {70, -70}}, lineColor = {0, 0, 0}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Line(points = {{0, 100}, {0, 70}}, color = {0, 0, 255}), Line(points = {{0, -70}, {0, -100}}, color = {0, 0, 255}), Line(points = {{-80, -100}, {-80, 0}}, color = {0, 0, 255}), Line(points = {{-100, 0}, {100, 0}}, color = {0, 0, 255}), Text(extent = {{150, 120}, {-150, 160}}, textString = "%name", lineColor = {0, 0, 255}), Line(points = {{0, 70}, {0, 40}}, color = {0, 0, 0}), Line(points = {{22.9, 32.8}, {40.2, 57.3}}, color = {0, 0, 0}), Line(points = {{-22.9, 32.8}, {-40.2, 57.3}}, color = {0, 0, 0}), Line(points = {{37.6, 13.7}, {65.8, 23.9}}, color = {0, 0, 0}), Line(points = {{-37.6, 13.7}, {-65.8, 23.9}}, color = {0, 0, 0}), Line(points = {{0, 0}, {9.02, 28.6}}, color = {0, 0, 0}), Polygon(points = {{-0.48, 31.6}, {18, 26}, {18, 57.2}, {-0.48, 31.6}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{-5, 5}, {5, -5}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Text(extent = {{-29, -11}, {30, -70}}, lineColor = {0, 0, 0}, textString = "Q")}),
2655 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}, grid = {2, 2}), graphics),
2656 Documentation(info = "<html>
2657<p>This power sensor measures instantaneous electrical power of a singlephase system and has a separated voltage and current path. The pins of the voltage path are pv and nv, the pins of the current path are pc and nc. The internal resistance of the current path is zero, the internal resistance of the voltage path is infinite.</p>
2658</html>", revisions = "<html>
2659<ul>
2660<li><i>January 12, 2006</i> by Anton Haumer implemented</li>
2661</ul>
2662</html>"));
2663 end QMonoSensor;
2664
2665 block PwmPulser
2666 Modelica.Blocks.Interfaces.RealInput ampl annotation (
2667 Placement(transformation(extent = {{-140, 40}, {-100, 80}}), iconTransformation(extent = {{-140, 44}, {-100, 84}})));
2668 Modelica.Blocks.Interfaces.RealInput ph_deg annotation (
2669 Placement(transformation(extent = {{-138, -76}, {-98, -36}}), iconTransformation(extent = {{-140, -74}, {-100, -34}})));
2670 parameter Modelica.SIunits.Frequency fCar = 1050 "Carrier Frequency";
2671 parameter Modelica.SIunits.Time carStartTime = 0 "Carrier start time";
2672 import PI = Modelica.Constants.pi;
2673 protected
2674 Modelica.Blocks.Sources.Trapezoid carrier(rising = 1 / (2 * fCar), width = 0, falling = 1 / (2 * fCar), period = 1 / fCar, amplitude = 2, offset = -1, startTime = carStartTime) annotation (
2675 Placement(transformation(extent = {{14, -56}, {34, -36}})));
2676 Modelica.Blocks.Math.Sin sin annotation (
2677 Placement(transformation(extent = {{-20, -28}, {0, -8}})));
2678 Modelica.Blocks.Continuous.Integrator integrator annotation (
2679 Placement(transformation(extent = {{-50, 16}, {-32, 34}})));
2680 Modelica.Blocks.Sources.RealExpression realExpression(y = 2 * PI * fSig) annotation (
2681 Placement(transformation(extent = {{-90, 14}, {-64, 36}})));
2682 public
2683 Modelica.Blocks.Math.Add add annotation (
2684 Placement(transformation(extent = {{-54, -28}, {-34, -8}})));
2685 Modelica.Blocks.Math.Gain ToRAD(k = PI / 180) annotation (
2686 Placement(transformation(extent = {{-66, -62}, {-54, -50}})));
2687 Modelica.Blocks.Math.Product signal annotation (
2688 Placement(transformation(extent = {{14, -22}, {32, -4}})));
2689 Modelica.Blocks.Interfaces.BooleanOutput up annotation (
2690 Placement(transformation(extent = {{100, 10}, {120, 30}}), iconTransformation(extent = {{100, 56}, {120, 76}})));
2691 Modelica.Blocks.Logical.Greater greater annotation (
2692 Placement(transformation(extent = {{46, -24}, {66, -4}})));
2693 Modelica.Blocks.Interfaces.BooleanOutput down annotation (
2694 Placement(transformation(extent = {{100, -62}, {120, -42}}), iconTransformation(extent = {{100, -68}, {120, -48}})));
2695 Modelica.Blocks.Logical.Not not1 annotation (
2696 Placement(transformation(extent = {{60, -60}, {80, -40}})));
2697 parameter Modelica.SIunits.Frequency fSig = 50 "Signal Frequency";
2698 equation
2699 connect(ToRAD.u, ph_deg) annotation (
2700 Line(points = {{-67.2, -56}, {-118, -56}}, color = {0, 0, 127}, smooth = Smooth.None));
2701 connect(sin.u, add.y) annotation (
2702 Line(points = {{-22, -18}, {-33, -18}}, color = {0, 0, 127}, smooth = Smooth.None));
2703 connect(signal.u2, sin.y) annotation (
2704 Line(points = {{12.2, -18.4}, {14, -18.4}, {14, -18}, {1, -18}}, color = {0, 0, 127}, smooth = Smooth.None));
2705 connect(add.u1, integrator.y) annotation (
2706 Line(points = {{-56, -12}, {-64, -12}, {-64, 2}, {-24, 2}, {-24, 25}, {-31.1, 25}}, color = {0, 0, 127}, smooth = Smooth.None));
2707 connect(signal.u1, ampl) annotation (
2708 Line(points = {{12.2, -7.6}, {12.2, 60}, {-120, 60}}, color = {0, 0, 127}, smooth = Smooth.None));
2709 connect(add.u2, ToRAD.y) annotation (
2710 Line(points = {{-56, -24}, {-64, -24}, {-64, -34}, {-46, -34}, {-46, -56}, {-53.4, -56}}, color = {0, 0, 127}, smooth = Smooth.None));
2711 connect(greater.u1, signal.y) annotation (
2712 Line(points = {{44, -14}, {46.45, -14}, {46.45, -13}, {32.9, -13}}, color = {0, 0, 127}, smooth = Smooth.None));
2713 connect(greater.u2, carrier.y) annotation (
2714 Line(points = {{44, -22}, {44, -46}, {35, -46}}, color = {0, 0, 127}, smooth = Smooth.None));
2715 connect(up, greater.y) annotation (
2716 Line(points = {{110, 20}, {74, 20}, {74, -14}, {67, -14}}, color = {255, 0, 255}, smooth = Smooth.None));
2717 connect(not1.y, down) annotation (
2718 Line(points = {{81, -50}, {84, -50}, {84, -52}, {110, -52}}, color = {255, 0, 255}, smooth = Smooth.None));
2719 connect(not1.u, greater.y) annotation (
2720 Line(points = {{58, -50}, {52, -50}, {52, -32}, {74, -32}, {74, -14}, {67, -14}}, color = {255, 0, 255}, smooth = Smooth.None));
2721 connect(integrator.u, realExpression.y) annotation (
2722 Line(points = {{-51.8, 25}, {-62.7, 25}}, color = {0, 0, 127}, smooth = Smooth.None));
2723 annotation (
2724 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -80}, {100, 80}})),
2725 Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 127}, fillPattern = FillPattern.Solid, fillColor = {255, 255, 255}), Text(extent = {{-98, 88}, {-40, 60}}, lineColor = {0, 0, 127}, textString = "ampl"), Text(extent = {{-98, -62}, {-28, -88}}, lineColor = {0, 0, 127}, textString = "ph(°)"), Text(extent = {{28, 86}, {100, 60}}, lineColor = {255, 0, 255}, textString = "u"), Text(extent = {{42, -62}, {96, -88}}, lineColor = {255, 0, 255}, textString = "d", fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Line(points = {{-60, -60}, {-40, 62}, {-20, -60}, {0, 60}, {20, -62}, {40, 60}, {60, -62}, {80, 58}}, color = {0, 0, 127}, smooth = Smooth.None), Line(points = {{-80, 20}, {-38, 40}, {0, 44}, {42, 40}, {80, 20}}, color = {0, 0, 127}, smooth = Smooth.None, thickness = 0.5), Text(extent = {{-100, 140}, {100, 110}}, lineColor = {0, 0, 255}, textString = "%name")}),
2726 __OpenModelica_commandLineOptions = "");
2727 end PwmPulser;
2728
2729 block PwmPulser3
2730 Modelica.Blocks.Interfaces.RealInput ampl annotation (
2731 Placement(transformation(extent = {{-140, 40}, {-100, 80}}), iconTransformation(extent = {{-140, 44}, {-100, 84}})));
2732 Modelica.Blocks.Interfaces.RealInput ph_deg annotation (
2733 Placement(transformation(extent = {{-138, -76}, {-98, -36}}), iconTransformation(extent = {{-140, -74}, {-100, -34}})));
2734 parameter Modelica.SIunits.Frequency fCar = 1050 "Carrier Frequency";
2735 import PI = Modelica.Constants.pi;
2736 Modelica.Blocks.Interfaces.BooleanOutput up[3] annotation (
2737 Placement(transformation(extent = {{100, 30}, {120, 50}}), iconTransformation(extent = {{100, 56}, {120, 76}})));
2738 Modelica.Blocks.Interfaces.BooleanOutput down[3] annotation (
2739 Placement(transformation(extent = {{100, -50}, {120, -30}}), iconTransformation(extent = {{100, -68}, {120, -48}})));
2740 parameter Modelica.SIunits.Frequency fSig = 50 "Modulating signal Frequency";
2741 PwmPulser pwmPulser[3](fCar = fill(fCar, 3), carStartTime = 3 / fCar * {-1, -2, 0}, fSig = fill(fSig, 3)) annotation (
2742 Placement(transformation(extent = {{36, -10}, {56, 10}})));
2743 Modelica.Blocks.Routing.Replicator replicator(nout = 3) annotation (
2744 Placement(transformation(extent = {{-58, 0}, {-38, 20}})));
2745 Modelica.Blocks.Routing.Replicator replicator1(nout = 3) annotation (
2746 Placement(transformation(extent = {{-88, -66}, {-68, -46}})));
2747 Modelica.Blocks.Math.Add add[3] annotation (
2748 Placement(transformation(extent = {{-10, -60}, {10, -40}})));
2749 Modelica.Blocks.Sources.Constant const[3](k = {0, -120, 120}) annotation (
2750 Placement(transformation(extent = {{-52, -38}, {-32, -18}})));
2751 equation
2752 connect(replicator.u, ampl) annotation (
2753 Line(points = {{-60, 10}, {-80, 10}, {-80, 60}, {-120, 60}}, color = {0, 0, 127}));
2754 connect(replicator.y, pwmPulser.ampl) annotation (
2755 Line(points = {{-37, 10}, {-26, 10}, {-26, 6.4}, {34, 6.4}}, color = {0, 0, 127}));
2756 connect(replicator1.u, ph_deg) annotation (
2757 Line(points = {{-90, -56}, {-118, -56}}, color = {0, 0, 127}));
2758 connect(add.u2, replicator1.y) annotation (
2759 Line(points = {{-12, -56}, {-67, -56}}, color = {0, 0, 127}));
2760 connect(const.y, add.u1) annotation (
2761 Line(points = {{-31, -28}, {-20, -28}, {-20, -44}, {-12, -44}}, color = {0, 0, 127}));
2762 connect(pwmPulser.ph_deg, add.y) annotation (
2763 Line(points = {{34, -5.4}, {28, -5.4}, {28, -6}, {22, -6}, {22, -50}, {11, -50}}, color = {0, 0, 127}));
2764 connect(pwmPulser.up, up) annotation (
2765 Line(points = {{57, 6.6}, {72, 6.6}, {72, 40}, {110, 40}}, color = {255, 0, 255}));
2766 connect(down, pwmPulser.down) annotation (
2767 Line(points = {{110, -40}, {66, -40}, {66, -5.8}, {57, -5.8}}, color = {255, 0, 255}));
2768 annotation (
2769 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -80}, {100, 80}})),
2770 Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 127}, fillPattern = FillPattern.Solid, fillColor = {255, 255, 255}), Text(extent = {{-98, 88}, {-40, 60}}, lineColor = {0, 0, 127}, textString = "ampl"), Text(extent = {{-98, -62}, {-28, -88}}, lineColor = {0, 0, 127}, textString = "ph(°)"), Text(extent = {{48, 88}, {104, 62}}, lineColor = {255, 0, 255}, textString = "u"), Text(extent = {{56, -60}, {100, -86}}, lineColor = {255, 0, 255}, textString = "d", fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Line(points = {{-60, -60}, {-40, 62}, {-20, -60}, {0, 60}, {20, -62}, {40, 60}, {60, -62}, {80, 58}}, color = {0, 0, 127}, smooth = Smooth.None), Line(points = {{-80, 20}, {-38, 40}, {0, 44}, {42, 40}, {80, 20}}, color = {0, 0, 127}, smooth = Smooth.None, thickness = 0.5), Text(extent = {{-100, 140}, {100, 110}}, lineColor = {0, 0, 255}, textString = "%name"), Text(extent = {{-26, 50}, {34, -54}}, lineColor = {238, 46, 47}, textString = "3")}),
2771 __OpenModelica_commandLineOptions = "");
2772 end PwmPulser3;
2773
2774 model ToPark "Semplice PMM con modello funzionale inverter"
2775 parameter Integer p "number of pole pairs";
2776 Modelica.Electrical.Machines.SpacePhasors.Blocks.Rotator rotator annotation (
2777 Placement(transformation(extent = {{0, 0}, {20, 20}})));
2778 Modelica.Blocks.Interfaces.RealOutput y[2] annotation (
2779 Placement(transformation(extent = {{100, -10}, {120, 10}}), iconTransformation(extent = {{100, -10}, {120, 10}})));
2780 Modelica.Blocks.Interfaces.RealInput X[3] annotation (
2781 Placement(transformation(extent = {{-140, -20}, {-100, 20}}), iconTransformation(extent = {{-140, -20}, {-100, 20}})));
2782 Modelica.Blocks.Interfaces.RealInput phi annotation (
2783 Placement(transformation(extent = {{-20, -20}, {20, 20}}, rotation = 90, origin = {10, -110}), iconTransformation(extent = {{-20, -20}, {20, 20}}, rotation = 90, origin = {0, -120})));
2784 Modelica.Electrical.Machines.SpacePhasors.Blocks.ToSpacePhasor toSpacePhasor annotation (
2785 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 0, origin = {-30, 10})));
2786 Modelica.Blocks.Math.Gain gain(k = p) annotation (
2787 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 90, origin = {10, -42})));
2788 equation
2789 connect(toSpacePhasor.y, rotator.u) annotation (
2790 Line(points = {{-19, 10}, {-2, 10}}, color = {0, 0, 127}, smooth = Smooth.None));
2791 connect(rotator.y, y) annotation (
2792 Line(points = {{21, 10}, {66, 10}, {66, 0}, {110, 0}}, color = {0, 0, 127}, smooth = Smooth.None));
2793 connect(toSpacePhasor.u, X) annotation (
2794 Line(points = {{-42, 10}, {-82, 10}, {-82, 0}, {-120, 0}}, color = {0, 0, 127}, smooth = Smooth.None));
2795 connect(gain.y, rotator.angle) annotation (
2796 Line(points = {{10, -31}, {10, -2}}, color = {0, 0, 127}, smooth = Smooth.None));
2797 connect(gain.u, phi) annotation (
2798 Line(points = {{10, -54}, {10, -110}}, color = {0, 0, 127}, smooth = Smooth.None));
2799 annotation (
2800 Diagram(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics),
2801 experiment(StopTime = 5, Interval = 0.001),
2802 Documentation(info = "<html>
2803<p>Converts variables phase quantities into Park&apos;s</p>
2804</html>"),
2805 __Dymola_experimentSetupOutput,
2806 Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Text(extent = {{-96, 32}, {96, -22}}, lineColor = {0, 0, 127}, textString = "=>P"), Text(extent = {{-106, 144}, {104, 106}}, lineColor = {0, 0, 255}, textString = "%name")}));
2807 end ToPark;
2808 end Support;
2809
2810 package Misc
2811 model acFiltQS
2812 import PI = Modelica.Constants.pi;
2813 parameter Real f0 = 200;
2814 final parameter Real W0 = 2 * PI * f0;
2815 final parameter Real X0 = W0 * Lf.L;
2816 Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Resistor Rf(R_ref = 0.05) annotation (
2817 Placement(transformation(extent = {{-38, 30}, {-18, 50}})));
2818 Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Inductor Lf(L = 0.001) annotation (
2819 Placement(transformation(extent = {{-2, 30}, {18, 50}})));
2820 Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Capacitor capacitor(C = 1 / (W0 ^ 2 * Lf.L)) annotation (
2821 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {24, 16})));
2822 Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Resistor loadR(R_ref = 2.0) annotation (
2823 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {54, 16})));
2824 Modelica.Electrical.QuasiStationary.SinglePhase.Sources.VariableVoltageSource variableVoltageSource annotation (
2825 Placement(visible = true, transformation(origin = {-56, 14}, extent = {{-10, 10}, {10, -10}}, rotation = -90)));
2826 Modelica.ComplexBlocks.Sources.ComplexConstant const annotation (
2827 Placement(transformation(extent = {{-98, 36}, {-78, 56}})));
2828 Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Ground ground annotation (
2829 Placement(transformation(extent = {{-30, -34}, {-10, -14}})));
2830 Modelica.Blocks.Sources.RealExpression time_(y = time) annotation (
2831 Placement(visible = true, transformation(origin = {-88, -14}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2832 equation
2833 connect(variableVoltageSource.f, time_.y) annotation (
2834 Line(points = {{-68, 8}, {-72, 8}, {-72, -14}, {-80, -14}, {-80, -16}, {-78, -16}, {-78, -14}, {-77, -14}}, color = {0, 0, 127}));
2835 connect(ground.pin, variableVoltageSource.pin_n) annotation (
2836 Line(points = {{-20, -14}, {-20, -8}, {-56, -8}, {-56, 4}}, color = {85, 170, 255}));
2837 connect(loadR.pin_n, variableVoltageSource.pin_n) annotation (
2838 Line(points = {{54, 6}, {54, -8}, {-56, -8}, {-56, 4}}, color = {85, 170, 255}));
2839 connect(capacitor.pin_n, variableVoltageSource.pin_n) annotation (
2840 Line(points = {{24, 6}, {24, -8}, {-56, -8}, {-56, 4}}, color = {85, 170, 255}));
2841 connect(variableVoltageSource.pin_p, Rf.pin_p) annotation (
2842 Line(points = {{-56, 24}, {-56, 40}, {-38, 40}}, color = {85, 170, 255}));
2843 connect(const.y, variableVoltageSource.V) annotation (
2844 Line(points = {{-77, 46}, {-68, 46}, {-68, 20}}, color = {85, 170, 255}));
2845 connect(Rf.pin_n, Lf.pin_p) annotation (
2846 Line(points = {{-18, 40}, {-2, 40}}, color = {85, 170, 255}));
2847 connect(Lf.pin_n, capacitor.pin_p) annotation (
2848 Line(points = {{18, 40}, {24, 40}, {24, 26}}, color = {85, 170, 255}));
2849 connect(loadR.pin_p, capacitor.pin_p) annotation (
2850 Line(points = {{54, 26}, {54, 40}, {24, 40}, {24, 26}}, color = {85, 170, 255}));
2851 annotation (
2852 Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -40}, {80, 60}})),
2853 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -40}, {80, 60}}), graphics = {Text(extent = {{16, 76}, {58, 62}}, lineColor = {28, 108, 200}, textString = "cut-off f0=%f0 Hz
2854W0=%W0 ohm")}),
2855 experiment(StopTime = 1000));
2856 end acFiltQS;
2857
2858 model AronPow "bidirectional switches, one-leg, PWM"
2859 Modelica.Electrical.MultiPhase.Basic.Resistor resistor(R = {1, 1, 1}) annotation (
2860 Placement(transformation(extent = {{22, -10}, {42, 10}})));
2861 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
2862 Placement(transformation(extent = {{-40, -10}, {-60, 10}})));
2863 Modelica.Electrical.Analog.Basic.Ground ground annotation (
2864 Placement(transformation(extent = {{-80, -20}, {-60, 0}})));
2865 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
2866 Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 90, origin = {58, -10})));
2867 Modelica.Electrical.MultiPhase.Sources.SineVoltage sineVoltage(V = fill(100, 3), freqHz = fill(50, 3)) annotation (
2868 Placement(transformation(extent = {{-32, -10}, {-12, 10}})));
2869 Modelica.Electrical.MultiPhase.Sensors.AronSensor aronSensor annotation (
2870 Placement(transformation(extent = {{-4, -10}, {16, 10}})));
2871 equation
2872 connect(star.pin_n, ground.p) annotation (
2873 Line(points = {{-60, 0}, {-70, 0}}, color = {0, 0, 255}));
2874 connect(resistor.plug_n, star2.plug_p) annotation (
2875 Line(points = {{42, 0}, {50, 0}, {58, 0}}, color = {0, 0, 255}));
2876 connect(star.plug_p, sineVoltage.plug_p) annotation (
2877 Line(points = {{-40, 0}, {-32, 0}}, color = {0, 0, 255}));
2878 connect(aronSensor.plug_p, sineVoltage.plug_n) annotation (
2879 Line(points = {{-4, 0}, {-12, 0}}, color = {0, 0, 255}));
2880 connect(aronSensor.plug_n, resistor.plug_p) annotation (
2881 Line(points = {{16, 0}, {22, 0}}, color = {0, 0, 255}));
2882 annotation (
2883 experiment(StopTime = 0.1),
2884 experimentSetupOutput,
2885 Documentation(info = "<html><head></head><body><p><br></p>
2886</body></html>"),
2887 Diagram(coordinateSystem(extent = {{-80, -40}, {80, 40}}, preserveAspectRatio = false)),
2888 Icon(coordinateSystem(extent = {{-80, -40}, {80, 40}}, preserveAspectRatio = false)));
2889 end AronPow;
2890
2891 model MFPower "bidirectional switches, one-leg, PWM"
2892 Modelica.Electrical.MultiPhase.Sensors.PowerSensor powerSensor annotation (
2893 Placement(visible = true, transformation(extent = {{-10, -10}, {10, 10}}, rotation = 0)));
2894 Modelica.Electrical.MultiPhase.Basic.Resistor resistor(R = {1, 1, 1}) annotation (
2895 Placement(visible = true, transformation(extent = {{16, -10}, {36, 10}}, rotation = 0)));
2896 Modelica.Electrical.MultiPhase.Basic.Star star annotation (
2897 Placement(visible = true, transformation(extent = {{-46, -10}, {-66, 10}}, rotation = 0)));
2898 Modelica.Electrical.Analog.Basic.Ground ground annotation (
2899 Placement(visible = true, transformation(extent = {{-86, -20}, {-66, 0}}, rotation = 0)));
2900 Modelica.Electrical.MultiPhase.Basic.Star star2 annotation (
2901 Placement(visible = true, transformation(origin = {52, -10}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
2902 Modelica.Electrical.MultiPhase.Sources.SineVoltage sineVoltage(V = fill(100, 3), freqHz = fill(50, 3)) annotation (
2903 Placement(visible = true, transformation(extent = {{-36, -10}, {-16, 10}}, rotation = 0)));
2904 equation
2905 connect(sineVoltage.plug_p, powerSensor.nv) annotation (
2906 Line(points = {{-36, 0}, {-36, -28}, {0, -28}, {0, -10}}, color = {0, 0, 255}));
2907 connect(star.plug_p, sineVoltage.plug_p) annotation (
2908 Line(points = {{-46, 0}, {-42, 0}, {-36, 0}}, color = {0, 0, 255}));
2909 connect(powerSensor.pc, sineVoltage.plug_n) annotation (
2910 Line(points = {{-10, 0}, {-12, 0}, {-12, 0}, {-14, 0}, {-16, 0}}, color = {0, 0, 255}));
2911 connect(resistor.plug_n, star2.plug_p) annotation (
2912 Line(points = {{36, 0}, {40, 0}, {44, 0}, {48, 0}, {52, 0}}, color = {0, 0, 255}));
2913 connect(star.pin_n, ground.p) annotation (
2914 Line(points = {{-66, 0}, {-76, 0}}, color = {0, 0, 255}));
2915 connect(powerSensor.nc, resistor.plug_p) annotation (
2916 Line(points = {{10, 0}, {16, 0}}, color = {0, 0, 255}));
2917 connect(powerSensor.pv, powerSensor.pc) annotation (
2918 Line(points = {{0, 10}, {-2.5, 10}, {-2.5, 10}, {-5, 10}, {-5, 10}, {-10, 10}, {-10, 5}, {-10, 5}, {-10, 0}}, color = {0, 0, 255}));
2919 annotation (
2920 experiment(StopTime = 0.1),
2921 experimentSetupOutput,
2922 Documentation(info = "<html><head></head><body><p><br></p>
2923</body></html>"),
2924 Diagram(coordinateSystem(extent = {{-100, -40}, {100, 40}}, preserveAspectRatio = false)),
2925 Icon(coordinateSystem(extent = {{-100, -20}, {100, 60}}, preserveAspectRatio = false)),
2926 __OpenModelica_commandLineOptions = "");
2927 end MFPower;
2928 end Misc;
2929 annotation (
2930 uses(Modelica(version = "3.2.3"), PowerSystems(version = "0.6.0")),
2931 Documentation(info = "<html><head></head><body><p><font size=\"4\">Inverter reference data:</font></p>
2932<p><font size=\"4\">Total DC voltage 100 V</font></p>
2933<p><font size=\"4\">When a passive load is fed: resistance 1 ohm, inductance 5mH</font></p>
2934<p><font size=\"4\">Filter resistance 0.05 ohm</font></p>
2935</body></html>"));
2936end InvPWM;