1 | <?xml version='1.0' encoding='UTF-8' standalone='no'?> |
---|
2 | <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6"> |
---|
3 | <compounddef id="simulator_8cpp" kind="file"> |
---|
4 | <compoundname>simulator.cpp</compoundname> |
---|
5 | <includes local="no">math.h</includes> |
---|
6 | <includes local="no">stdlib.h</includes> |
---|
7 | <includes refid="regulace_8h" local="yes">regulace.h</includes> |
---|
8 | <includes refid="simulator_8h" local="yes">simulator.h</includes> |
---|
9 | <incdepgraph> |
---|
10 | <node id="703"> |
---|
11 | <label>regulace.h</label> |
---|
12 | <link refid="regulace_8h-source"/> |
---|
13 | </node> |
---|
14 | <node id="702"> |
---|
15 | <label>stdlib.h</label> |
---|
16 | </node> |
---|
17 | <node id="704"> |
---|
18 | <label>simulator.h</label> |
---|
19 | <link refid="simulator_8h-source"/> |
---|
20 | </node> |
---|
21 | <node id="701"> |
---|
22 | <label>math.h</label> |
---|
23 | </node> |
---|
24 | <node id="700"> |
---|
25 | <label>work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp</label> |
---|
26 | <link refid="simulator.cpp"/> |
---|
27 | <childnode refid="701" relation="include"> |
---|
28 | </childnode> |
---|
29 | <childnode refid="702" relation="include"> |
---|
30 | </childnode> |
---|
31 | <childnode refid="703" relation="include"> |
---|
32 | </childnode> |
---|
33 | <childnode refid="704" relation="include"> |
---|
34 | </childnode> |
---|
35 | </node> |
---|
36 | </incdepgraph> |
---|
37 | <sectiondef kind="define"> |
---|
38 | <memberdef kind="define" id="simulator_8cpp_1525335710b53cb064ca56b936120431e" prot="public" static="no"> |
---|
39 | <name>_USE_MATH_DEFINES</name> |
---|
40 | <briefdescription> |
---|
41 | </briefdescription> |
---|
42 | <detaileddescription> |
---|
43 | </detaileddescription> |
---|
44 | <inbodydescription> |
---|
45 | </inbodydescription> |
---|
46 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="13" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="13" bodyend="-1"/> |
---|
47 | </memberdef> |
---|
48 | <memberdef kind="define" id="simulator_8cpp_19cd91cdba17e9621f425b31a3662b484" prot="public" static="no"> |
---|
49 | <name>REZIM_REGULACE</name> |
---|
50 | <initializer>1</initializer> |
---|
51 | <briefdescription> |
---|
52 | </briefdescription> |
---|
53 | <detaileddescription> |
---|
54 | </detaileddescription> |
---|
55 | <inbodydescription> |
---|
56 | </inbodydescription> |
---|
57 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="21" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="21" bodyend="-1"/> |
---|
58 | </memberdef> |
---|
59 | </sectiondef> |
---|
60 | <sectiondef kind="var"> |
---|
61 | <memberdef kind="variable" id="simulator_8cpp_1d64417a28c816d614e4501b01ca36a46" prot="public" static="yes" mutable="no"> |
---|
62 | <type>double</type> |
---|
63 | <definition>double Rs</definition> |
---|
64 | <argsstring></argsstring> |
---|
65 | <name>Rs</name> |
---|
66 | <briefdescription> |
---|
67 | </briefdescription> |
---|
68 | <detaileddescription> |
---|
69 | </detaileddescription> |
---|
70 | <inbodydescription> |
---|
71 | </inbodydescription> |
---|
72 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="33" bodyend="-1"/> |
---|
73 | </memberdef> |
---|
74 | <memberdef kind="variable" id="simulator_8cpp_176f32b985a9b31650b0d233491b7b7d4" prot="public" static="yes" mutable="no"> |
---|
75 | <type>double</type> |
---|
76 | <definition>double Ls</definition> |
---|
77 | <argsstring></argsstring> |
---|
78 | <name>Ls</name> |
---|
79 | <briefdescription> |
---|
80 | </briefdescription> |
---|
81 | <detaileddescription> |
---|
82 | </detaileddescription> |
---|
83 | <inbodydescription> |
---|
84 | </inbodydescription> |
---|
85 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="33" bodyend="-1"/> |
---|
86 | </memberdef> |
---|
87 | <memberdef kind="variable" id="simulator_8cpp_1558972170606cd05054ab130beabad1e" prot="public" static="yes" mutable="no"> |
---|
88 | <type>double</type> |
---|
89 | <definition>double Fmag</definition> |
---|
90 | <argsstring></argsstring> |
---|
91 | <name>Fmag</name> |
---|
92 | <briefdescription> |
---|
93 | </briefdescription> |
---|
94 | <detaileddescription> |
---|
95 | </detaileddescription> |
---|
96 | <inbodydescription> |
---|
97 | </inbodydescription> |
---|
98 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="33" bodyend="-1"/> |
---|
99 | </memberdef> |
---|
100 | <memberdef kind="variable" id="simulator_8cpp_197a370d74f3992f74cbf660239146ec1" prot="public" static="yes" mutable="no"> |
---|
101 | <type>double</type> |
---|
102 | <definition>double Bf</definition> |
---|
103 | <argsstring></argsstring> |
---|
104 | <name>Bf</name> |
---|
105 | <briefdescription> |
---|
106 | </briefdescription> |
---|
107 | <detaileddescription> |
---|
108 | </detaileddescription> |
---|
109 | <inbodydescription> |
---|
110 | </inbodydescription> |
---|
111 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="33" bodyend="-1"/> |
---|
112 | </memberdef> |
---|
113 | <memberdef kind="variable" id="simulator_8cpp_1ace2d484b0e3651abd108f04803d316c" prot="public" static="yes" mutable="no"> |
---|
114 | <type>double</type> |
---|
115 | <definition>double p</definition> |
---|
116 | <argsstring></argsstring> |
---|
117 | <name>p</name> |
---|
118 | <briefdescription> |
---|
119 | </briefdescription> |
---|
120 | <detaileddescription> |
---|
121 | </detaileddescription> |
---|
122 | <inbodydescription> |
---|
123 | </inbodydescription> |
---|
124 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="33" bodyend="-1"/> |
---|
125 | </memberdef> |
---|
126 | <memberdef kind="variable" id="simulator_8cpp_1c6390bc2d074992cc6ca37d132a5262d" prot="public" static="yes" mutable="no"> |
---|
127 | <type>double</type> |
---|
128 | <definition>double kp</definition> |
---|
129 | <argsstring></argsstring> |
---|
130 | <name>kp</name> |
---|
131 | <briefdescription> |
---|
132 | </briefdescription> |
---|
133 | <detaileddescription> |
---|
134 | </detaileddescription> |
---|
135 | <inbodydescription> |
---|
136 | </inbodydescription> |
---|
137 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="33" bodyend="-1"/> |
---|
138 | </memberdef> |
---|
139 | <memberdef kind="variable" id="simulator_8cpp_1229fe836529a54bc8a7d390148d7a488" prot="public" static="yes" mutable="no"> |
---|
140 | <type>double</type> |
---|
141 | <definition>double J</definition> |
---|
142 | <argsstring></argsstring> |
---|
143 | <name>J</name> |
---|
144 | <briefdescription> |
---|
145 | </briefdescription> |
---|
146 | <detaileddescription> |
---|
147 | </detaileddescription> |
---|
148 | <inbodydescription> |
---|
149 | </inbodydescription> |
---|
150 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="33" bodyend="-1"/> |
---|
151 | </memberdef> |
---|
152 | <memberdef kind="variable" id="simulator_8cpp_1b3ea1f9133a9fd391d578911a5ff4c35" prot="public" static="yes" mutable="no"> |
---|
153 | <type>double</type> |
---|
154 | <definition>double Ucn</definition> |
---|
155 | <argsstring></argsstring> |
---|
156 | <name>Ucn</name> |
---|
157 | <briefdescription> |
---|
158 | </briefdescription> |
---|
159 | <detaileddescription> |
---|
160 | </detaileddescription> |
---|
161 | <inbodydescription> |
---|
162 | </inbodydescription> |
---|
163 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="34" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="34" bodyend="-1"/> |
---|
164 | </memberdef> |
---|
165 | <memberdef kind="variable" id="simulator_8cpp_16b1aef16f2bb55279eadae60bf2e558a" prot="public" static="yes" mutable="no"> |
---|
166 | <type>double</type> |
---|
167 | <definition>double Uc</definition> |
---|
168 | <argsstring></argsstring> |
---|
169 | <name>Uc</name> |
---|
170 | <briefdescription> |
---|
171 | </briefdescription> |
---|
172 | <detaileddescription> |
---|
173 | </detaileddescription> |
---|
174 | <inbodydescription> |
---|
175 | </inbodydescription> |
---|
176 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="34" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="34" bodyend="-1"/> |
---|
177 | </memberdef> |
---|
178 | <memberdef kind="variable" id="simulator_8cpp_19b78bd462526152199b0e0812eb3fdd7" prot="public" static="yes" mutable="no"> |
---|
179 | <type>double</type> |
---|
180 | <definition>double DT</definition> |
---|
181 | <argsstring></argsstring> |
---|
182 | <name>DT</name> |
---|
183 | <briefdescription> |
---|
184 | </briefdescription> |
---|
185 | <detaileddescription> |
---|
186 | </detaileddescription> |
---|
187 | <inbodydescription> |
---|
188 | </inbodydescription> |
---|
189 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="34" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="34" bodyend="-1"/> |
---|
190 | </memberdef> |
---|
191 | <memberdef kind="variable" id="simulator_8cpp_15939801e2b84edf0bf428a10c37e8357" prot="public" static="yes" mutable="no"> |
---|
192 | <type>double</type> |
---|
193 | <definition>double U_modulace</definition> |
---|
194 | <argsstring></argsstring> |
---|
195 | <name>U_modulace</name> |
---|
196 | <briefdescription> |
---|
197 | </briefdescription> |
---|
198 | <detaileddescription> |
---|
199 | </detaileddescription> |
---|
200 | <inbodydescription> |
---|
201 | </inbodydescription> |
---|
202 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="34" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="34" bodyend="-1"/> |
---|
203 | </memberdef> |
---|
204 | <memberdef kind="variable" id="simulator_8cpp_1f828dddefd5bf343c700078edbfe976b" prot="public" static="yes" mutable="no"> |
---|
205 | <type>double</type> |
---|
206 | <definition>double Urm_max</definition> |
---|
207 | <argsstring></argsstring> |
---|
208 | <name>Urm_max</name> |
---|
209 | <briefdescription> |
---|
210 | </briefdescription> |
---|
211 | <detaileddescription> |
---|
212 | </detaileddescription> |
---|
213 | <inbodydescription> |
---|
214 | </inbodydescription> |
---|
215 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="35" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="35" bodyend="-1"/> |
---|
216 | </memberdef> |
---|
217 | <memberdef kind="variable" id="simulator_8cpp_18ee9be1b5aa75abae556de3088cba6d9" prot="public" static="yes" mutable="no"> |
---|
218 | <type>double</type> |
---|
219 | <definition>double h</definition> |
---|
220 | <argsstring></argsstring> |
---|
221 | <name>h</name> |
---|
222 | <briefdescription> |
---|
223 | </briefdescription> |
---|
224 | <detaileddescription> |
---|
225 | </detaileddescription> |
---|
226 | <inbodydescription> |
---|
227 | </inbodydescription> |
---|
228 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="36" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="36" bodyend="-1"/> |
---|
229 | </memberdef> |
---|
230 | <memberdef kind="variable" id="simulator_8cpp_1004e965b93a1858dcaf662b220edb147" prot="public" static="yes" mutable="no"> |
---|
231 | <type>double</type> |
---|
232 | <definition>double h_reg</definition> |
---|
233 | <argsstring></argsstring> |
---|
234 | <name>h_reg</name> |
---|
235 | <briefdescription> |
---|
236 | </briefdescription> |
---|
237 | <detaileddescription> |
---|
238 | </detaileddescription> |
---|
239 | <inbodydescription> |
---|
240 | </inbodydescription> |
---|
241 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="36" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="36" bodyend="-1"/> |
---|
242 | </memberdef> |
---|
243 | <memberdef kind="variable" id="simulator_8cpp_140ad4a109c941bdaa613b68b54107e2e" prot="public" static="yes" mutable="no"> |
---|
244 | <type>double</type> |
---|
245 | <definition>double h_reg_real</definition> |
---|
246 | <argsstring></argsstring> |
---|
247 | <name>h_reg_real</name> |
---|
248 | <briefdescription> |
---|
249 | </briefdescription> |
---|
250 | <detaileddescription> |
---|
251 | </detaileddescription> |
---|
252 | <inbodydescription> |
---|
253 | </inbodydescription> |
---|
254 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="36" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="36" bodyend="-1"/> |
---|
255 | </memberdef> |
---|
256 | <memberdef kind="variable" id="simulator_8cpp_14cfa9486c77177dfaac93079cc613a88" prot="public" static="no" mutable="no"> |
---|
257 | <type>unsigned int</type> |
---|
258 | <definition>unsigned int h_reg_counter</definition> |
---|
259 | <argsstring></argsstring> |
---|
260 | <name>h_reg_counter</name> |
---|
261 | <briefdescription> |
---|
262 | </briefdescription> |
---|
263 | <detaileddescription> |
---|
264 | </detaileddescription> |
---|
265 | <inbodydescription> |
---|
266 | </inbodydescription> |
---|
267 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="37" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="37" bodyend="-1"/> |
---|
268 | </memberdef> |
---|
269 | <memberdef kind="variable" id="simulator_8cpp_12d36b941b2c32d96c73cd66d0b2a79ba" prot="public" static="no" mutable="no"> |
---|
270 | <type>unsigned int</type> |
---|
271 | <definition>unsigned int h_reg_counter_mez</definition> |
---|
272 | <argsstring></argsstring> |
---|
273 | <name>h_reg_counter_mez</name> |
---|
274 | <briefdescription> |
---|
275 | </briefdescription> |
---|
276 | <detaileddescription> |
---|
277 | </detaileddescription> |
---|
278 | <inbodydescription> |
---|
279 | </inbodydescription> |
---|
280 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="37" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="37" bodyend="-1"/> |
---|
281 | </memberdef> |
---|
282 | <memberdef kind="variable" id="simulator_8cpp_1766e9ead6f2e850ae806a6da85590460" prot="public" static="yes" mutable="no"> |
---|
283 | <type>double</type> |
---|
284 | <definition>double va_char[16]</definition> |
---|
285 | <argsstring>[16]</argsstring> |
---|
286 | <name>va_char</name> |
---|
287 | <initializer>{0,10,50,100,200,300,500,1000, 0,1,1.8,2.4,3.2,3.8,4.8,6.8}</initializer> |
---|
288 | <briefdescription> |
---|
289 | </briefdescription> |
---|
290 | <detaileddescription> |
---|
291 | </detaileddescription> |
---|
292 | <inbodydescription> |
---|
293 | </inbodydescription> |
---|
294 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="39" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="39" bodyend="-1"/> |
---|
295 | </memberdef> |
---|
296 | <memberdef kind="variable" id="simulator_8cpp_144d11750d10193af7944b7dc2eaa2f45" prot="public" static="yes" mutable="no"> |
---|
297 | <type>unsigned int</type> |
---|
298 | <definition>unsigned int pocet</definition> |
---|
299 | <argsstring></argsstring> |
---|
300 | <name>pocet</name> |
---|
301 | <initializer>8</initializer> |
---|
302 | <briefdescription> |
---|
303 | </briefdescription> |
---|
304 | <detaileddescription> |
---|
305 | </detaileddescription> |
---|
306 | <inbodydescription> |
---|
307 | </inbodydescription> |
---|
308 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="40" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="40" bodyend="-1"/> |
---|
309 | </memberdef> |
---|
310 | <memberdef kind="variable" id="simulator_8cpp_1ef96d7e2af821e8829d40ed1d8b0901d" prot="public" static="no" mutable="no"> |
---|
311 | <type>double</type> |
---|
312 | <definition>double x[9]</definition> |
---|
313 | <argsstring>[9]</argsstring> |
---|
314 | <name>x</name> |
---|
315 | <briefdescription> |
---|
316 | </briefdescription> |
---|
317 | <detaileddescription> |
---|
318 | </detaileddescription> |
---|
319 | <inbodydescription> |
---|
320 | </inbodydescription> |
---|
321 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="43" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="43" bodyend="-1"/> |
---|
322 | </memberdef> |
---|
323 | <memberdef kind="variable" id="simulator_8cpp_1a25c32c8e1605293535ff9baa435b758" prot="public" static="yes" mutable="no"> |
---|
324 | <type>int</type> |
---|
325 | <definition>int smer</definition> |
---|
326 | <argsstring></argsstring> |
---|
327 | <name>smer</name> |
---|
328 | <briefdescription> |
---|
329 | </briefdescription> |
---|
330 | <detaileddescription> |
---|
331 | </detaileddescription> |
---|
332 | <inbodydescription> |
---|
333 | </inbodydescription> |
---|
334 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="46" bodyend="-1"/> |
---|
335 | </memberdef> |
---|
336 | <memberdef kind="variable" id="simulator_8cpp_1e2040e9b4693cfc54938a3b2d062591c" prot="public" static="yes" mutable="no"> |
---|
337 | <type>int</type> |
---|
338 | <definition>int smer2</definition> |
---|
339 | <argsstring></argsstring> |
---|
340 | <name>smer2</name> |
---|
341 | <briefdescription> |
---|
342 | </briefdescription> |
---|
343 | <detaileddescription> |
---|
344 | </detaileddescription> |
---|
345 | <inbodydescription> |
---|
346 | </inbodydescription> |
---|
347 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="46" bodyend="-1"/> |
---|
348 | </memberdef> |
---|
349 | <memberdef kind="variable" id="simulator_8cpp_1911020f0c2ee7248d3575189b06398c2" prot="public" static="yes" mutable="no"> |
---|
350 | <type>int</type> |
---|
351 | <definition>int citac</definition> |
---|
352 | <argsstring></argsstring> |
---|
353 | <name>citac</name> |
---|
354 | <briefdescription> |
---|
355 | </briefdescription> |
---|
356 | <detaileddescription> |
---|
357 | </detaileddescription> |
---|
358 | <inbodydescription> |
---|
359 | </inbodydescription> |
---|
360 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="46" bodyend="-1"/> |
---|
361 | </memberdef> |
---|
362 | <memberdef kind="variable" id="simulator_8cpp_1abf693f6b07594a20f4aa8d02a875399" prot="public" static="yes" mutable="no"> |
---|
363 | <type>int</type> |
---|
364 | <definition>int citac2</definition> |
---|
365 | <argsstring></argsstring> |
---|
366 | <name>citac2</name> |
---|
367 | <briefdescription> |
---|
368 | </briefdescription> |
---|
369 | <detaileddescription> |
---|
370 | </detaileddescription> |
---|
371 | <inbodydescription> |
---|
372 | </inbodydescription> |
---|
373 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="46" bodyend="-1"/> |
---|
374 | </memberdef> |
---|
375 | <memberdef kind="variable" id="simulator_8cpp_1278b61cc75f0dcbf7685ad230b12b1a4" prot="public" static="yes" mutable="no"> |
---|
376 | <type>int</type> |
---|
377 | <definition>int citac_PR</definition> |
---|
378 | <argsstring></argsstring> |
---|
379 | <name>citac_PR</name> |
---|
380 | <briefdescription> |
---|
381 | </briefdescription> |
---|
382 | <detaileddescription> |
---|
383 | </detaileddescription> |
---|
384 | <inbodydescription> |
---|
385 | </inbodydescription> |
---|
386 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="46" bodyend="-1"/> |
---|
387 | </memberdef> |
---|
388 | <memberdef kind="variable" id="simulator_8cpp_1881981ba129fc2734322d637926c05bb" prot="public" static="yes" mutable="no"> |
---|
389 | <type>int</type> |
---|
390 | <definition>int modulace</definition> |
---|
391 | <argsstring></argsstring> |
---|
392 | <name>modulace</name> |
---|
393 | <briefdescription> |
---|
394 | </briefdescription> |
---|
395 | <detaileddescription> |
---|
396 | </detaileddescription> |
---|
397 | <inbodydescription> |
---|
398 | </inbodydescription> |
---|
399 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="46" bodyend="-1"/> |
---|
400 | </memberdef> |
---|
401 | <memberdef kind="variable" id="simulator_8cpp_121d72fdda90dce70de81cf1fc4630928" prot="public" static="yes" mutable="no"> |
---|
402 | <type>double</type> |
---|
403 | <definition>double dIsx</definition> |
---|
404 | <argsstring></argsstring> |
---|
405 | <name>dIsx</name> |
---|
406 | <briefdescription> |
---|
407 | </briefdescription> |
---|
408 | <detaileddescription> |
---|
409 | </detaileddescription> |
---|
410 | <inbodydescription> |
---|
411 | </inbodydescription> |
---|
412 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="49" bodyend="-1"/> |
---|
413 | </memberdef> |
---|
414 | <memberdef kind="variable" id="simulator_8cpp_19bf8a92e872ccc3086ffeb0f13b22793" prot="public" static="yes" mutable="no"> |
---|
415 | <type>double</type> |
---|
416 | <definition>double dIsx1</definition> |
---|
417 | <argsstring></argsstring> |
---|
418 | <name>dIsx1</name> |
---|
419 | <briefdescription> |
---|
420 | </briefdescription> |
---|
421 | <detaileddescription> |
---|
422 | </detaileddescription> |
---|
423 | <inbodydescription> |
---|
424 | </inbodydescription> |
---|
425 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="49" bodyend="-1"/> |
---|
426 | </memberdef> |
---|
427 | <memberdef kind="variable" id="simulator_8cpp_1026c9e1de51b90e9955d8ffe75970ab1" prot="public" static="yes" mutable="no"> |
---|
428 | <type>double</type> |
---|
429 | <definition>double dIsx2</definition> |
---|
430 | <argsstring></argsstring> |
---|
431 | <name>dIsx2</name> |
---|
432 | <briefdescription> |
---|
433 | </briefdescription> |
---|
434 | <detaileddescription> |
---|
435 | </detaileddescription> |
---|
436 | <inbodydescription> |
---|
437 | </inbodydescription> |
---|
438 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="49" bodyend="-1"/> |
---|
439 | </memberdef> |
---|
440 | <memberdef kind="variable" id="simulator_8cpp_19ca03ba7145b078ef8702a53ee741f23" prot="public" static="yes" mutable="no"> |
---|
441 | <type>double</type> |
---|
442 | <definition>double dIsx3</definition> |
---|
443 | <argsstring></argsstring> |
---|
444 | <name>dIsx3</name> |
---|
445 | <briefdescription> |
---|
446 | </briefdescription> |
---|
447 | <detaileddescription> |
---|
448 | </detaileddescription> |
---|
449 | <inbodydescription> |
---|
450 | </inbodydescription> |
---|
451 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="49" bodyend="-1"/> |
---|
452 | </memberdef> |
---|
453 | <memberdef kind="variable" id="simulator_8cpp_168eab1c82f703bb130282ab4b5322ffd" prot="public" static="yes" mutable="no"> |
---|
454 | <type>double</type> |
---|
455 | <definition>double dIsy</definition> |
---|
456 | <argsstring></argsstring> |
---|
457 | <name>dIsy</name> |
---|
458 | <briefdescription> |
---|
459 | </briefdescription> |
---|
460 | <detaileddescription> |
---|
461 | </detaileddescription> |
---|
462 | <inbodydescription> |
---|
463 | </inbodydescription> |
---|
464 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="49" bodyend="-1"/> |
---|
465 | </memberdef> |
---|
466 | <memberdef kind="variable" id="simulator_8cpp_1f7244346709d521149860600030c0813" prot="public" static="yes" mutable="no"> |
---|
467 | <type>double</type> |
---|
468 | <definition>double dIsy1</definition> |
---|
469 | <argsstring></argsstring> |
---|
470 | <name>dIsy1</name> |
---|
471 | <briefdescription> |
---|
472 | </briefdescription> |
---|
473 | <detaileddescription> |
---|
474 | </detaileddescription> |
---|
475 | <inbodydescription> |
---|
476 | </inbodydescription> |
---|
477 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="49" bodyend="-1"/> |
---|
478 | </memberdef> |
---|
479 | <memberdef kind="variable" id="simulator_8cpp_194913da6f7cf6d33088846af9bbfae91" prot="public" static="yes" mutable="no"> |
---|
480 | <type>double</type> |
---|
481 | <definition>double dIsy2</definition> |
---|
482 | <argsstring></argsstring> |
---|
483 | <name>dIsy2</name> |
---|
484 | <briefdescription> |
---|
485 | </briefdescription> |
---|
486 | <detaileddescription> |
---|
487 | </detaileddescription> |
---|
488 | <inbodydescription> |
---|
489 | </inbodydescription> |
---|
490 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="49" bodyend="-1"/> |
---|
491 | </memberdef> |
---|
492 | <memberdef kind="variable" id="simulator_8cpp_14dd39f5275fabf34a4c114e556338aad" prot="public" static="yes" mutable="no"> |
---|
493 | <type>double</type> |
---|
494 | <definition>double dIsy3</definition> |
---|
495 | <argsstring></argsstring> |
---|
496 | <name>dIsy3</name> |
---|
497 | <briefdescription> |
---|
498 | </briefdescription> |
---|
499 | <detaileddescription> |
---|
500 | </detaileddescription> |
---|
501 | <inbodydescription> |
---|
502 | </inbodydescription> |
---|
503 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="49" bodyend="-1"/> |
---|
504 | </memberdef> |
---|
505 | <memberdef kind="variable" id="simulator_8cpp_15d075d9998ae7bbabcd1eec0c27a4c3d" prot="public" static="yes" mutable="no"> |
---|
506 | <type>double</type> |
---|
507 | <definition>double dTheta</definition> |
---|
508 | <argsstring></argsstring> |
---|
509 | <name>dTheta</name> |
---|
510 | <briefdescription> |
---|
511 | </briefdescription> |
---|
512 | <detaileddescription> |
---|
513 | </detaileddescription> |
---|
514 | <inbodydescription> |
---|
515 | </inbodydescription> |
---|
516 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="50" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="50" bodyend="-1"/> |
---|
517 | </memberdef> |
---|
518 | <memberdef kind="variable" id="simulator_8cpp_14ee05581e5d78f06a138e2f86b6c619c" prot="public" static="yes" mutable="no"> |
---|
519 | <type>double</type> |
---|
520 | <definition>double dTheta1</definition> |
---|
521 | <argsstring></argsstring> |
---|
522 | <name>dTheta1</name> |
---|
523 | <briefdescription> |
---|
524 | </briefdescription> |
---|
525 | <detaileddescription> |
---|
526 | </detaileddescription> |
---|
527 | <inbodydescription> |
---|
528 | </inbodydescription> |
---|
529 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="50" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="50" bodyend="-1"/> |
---|
530 | </memberdef> |
---|
531 | <memberdef kind="variable" id="simulator_8cpp_1c6ed9fc65ecf7935a27a0fbacbecab8b" prot="public" static="yes" mutable="no"> |
---|
532 | <type>double</type> |
---|
533 | <definition>double dTheta2</definition> |
---|
534 | <argsstring></argsstring> |
---|
535 | <name>dTheta2</name> |
---|
536 | <briefdescription> |
---|
537 | </briefdescription> |
---|
538 | <detaileddescription> |
---|
539 | </detaileddescription> |
---|
540 | <inbodydescription> |
---|
541 | </inbodydescription> |
---|
542 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="50" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="50" bodyend="-1"/> |
---|
543 | </memberdef> |
---|
544 | <memberdef kind="variable" id="simulator_8cpp_126ccf33b4cb557f30c8a78ce9e20d006" prot="public" static="yes" mutable="no"> |
---|
545 | <type>double</type> |
---|
546 | <definition>double dTheta3</definition> |
---|
547 | <argsstring></argsstring> |
---|
548 | <name>dTheta3</name> |
---|
549 | <briefdescription> |
---|
550 | </briefdescription> |
---|
551 | <detaileddescription> |
---|
552 | </detaileddescription> |
---|
553 | <inbodydescription> |
---|
554 | </inbodydescription> |
---|
555 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="50" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="50" bodyend="-1"/> |
---|
556 | </memberdef> |
---|
557 | <memberdef kind="variable" id="simulator_8cpp_1c2a6e8a64aa67c5924cfe6488658065c" prot="public" static="yes" mutable="no"> |
---|
558 | <type>double</type> |
---|
559 | <definition>double dw</definition> |
---|
560 | <argsstring></argsstring> |
---|
561 | <name>dw</name> |
---|
562 | <briefdescription> |
---|
563 | </briefdescription> |
---|
564 | <detaileddescription> |
---|
565 | </detaileddescription> |
---|
566 | <inbodydescription> |
---|
567 | </inbodydescription> |
---|
568 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="51" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="51" bodyend="-1"/> |
---|
569 | </memberdef> |
---|
570 | <memberdef kind="variable" id="simulator_8cpp_13dbeafa64f6523568b739c7c92d656cc" prot="public" static="yes" mutable="no"> |
---|
571 | <type>double</type> |
---|
572 | <definition>double dw1</definition> |
---|
573 | <argsstring></argsstring> |
---|
574 | <name>dw1</name> |
---|
575 | <briefdescription> |
---|
576 | </briefdescription> |
---|
577 | <detaileddescription> |
---|
578 | </detaileddescription> |
---|
579 | <inbodydescription> |
---|
580 | </inbodydescription> |
---|
581 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="51" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="51" bodyend="-1"/> |
---|
582 | </memberdef> |
---|
583 | <memberdef kind="variable" id="simulator_8cpp_12fbe98a006d0a245e64bd0b5626bdbbe" prot="public" static="yes" mutable="no"> |
---|
584 | <type>double</type> |
---|
585 | <definition>double dw2</definition> |
---|
586 | <argsstring></argsstring> |
---|
587 | <name>dw2</name> |
---|
588 | <briefdescription> |
---|
589 | </briefdescription> |
---|
590 | <detaileddescription> |
---|
591 | </detaileddescription> |
---|
592 | <inbodydescription> |
---|
593 | </inbodydescription> |
---|
594 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="51" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="51" bodyend="-1"/> |
---|
595 | </memberdef> |
---|
596 | <memberdef kind="variable" id="simulator_8cpp_10e1c55b73fae10df1cd50e581c01bd5a" prot="public" static="yes" mutable="no"> |
---|
597 | <type>double</type> |
---|
598 | <definition>double dw3</definition> |
---|
599 | <argsstring></argsstring> |
---|
600 | <name>dw3</name> |
---|
601 | <briefdescription> |
---|
602 | </briefdescription> |
---|
603 | <detaileddescription> |
---|
604 | </detaileddescription> |
---|
605 | <inbodydescription> |
---|
606 | </inbodydescription> |
---|
607 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="51" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="51" bodyend="-1"/> |
---|
608 | </memberdef> |
---|
609 | <memberdef kind="variable" id="simulator_8cpp_1639a3957145f3b5dd034811cb4b4cf3f" prot="public" static="yes" mutable="no"> |
---|
610 | <type>double</type> |
---|
611 | <definition>double Isx</definition> |
---|
612 | <argsstring></argsstring> |
---|
613 | <name>Isx</name> |
---|
614 | <briefdescription> |
---|
615 | </briefdescription> |
---|
616 | <detaileddescription> |
---|
617 | </detaileddescription> |
---|
618 | <inbodydescription> |
---|
619 | </inbodydescription> |
---|
620 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="54" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="54" bodyend="-1"/> |
---|
621 | </memberdef> |
---|
622 | <memberdef kind="variable" id="simulator_8cpp_109325d9dd09d541bdd3f9e9ff27a05d5" prot="public" static="yes" mutable="no"> |
---|
623 | <type>double</type> |
---|
624 | <definition>double Isy</definition> |
---|
625 | <argsstring></argsstring> |
---|
626 | <name>Isy</name> |
---|
627 | <briefdescription> |
---|
628 | </briefdescription> |
---|
629 | <detaileddescription> |
---|
630 | </detaileddescription> |
---|
631 | <inbodydescription> |
---|
632 | </inbodydescription> |
---|
633 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="54" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="54" bodyend="-1"/> |
---|
634 | </memberdef> |
---|
635 | <memberdef kind="variable" id="simulator_8cpp_1ca81c35c21e3a5f7f3a8d24504e76664" prot="public" static="yes" mutable="no"> |
---|
636 | <type>double</type> |
---|
637 | <definition>double theta</definition> |
---|
638 | <argsstring></argsstring> |
---|
639 | <name>theta</name> |
---|
640 | <briefdescription> |
---|
641 | </briefdescription> |
---|
642 | <detaileddescription> |
---|
643 | </detaileddescription> |
---|
644 | <inbodydescription> |
---|
645 | </inbodydescription> |
---|
646 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="54" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="54" bodyend="-1"/> |
---|
647 | </memberdef> |
---|
648 | <memberdef kind="variable" id="simulator_8cpp_16dc6e6f3c75c509ce943163afb5dade7" prot="public" static="yes" mutable="no"> |
---|
649 | <type>double</type> |
---|
650 | <definition>double speed</definition> |
---|
651 | <argsstring></argsstring> |
---|
652 | <name>speed</name> |
---|
653 | <briefdescription> |
---|
654 | </briefdescription> |
---|
655 | <detaileddescription> |
---|
656 | </detaileddescription> |
---|
657 | <inbodydescription> |
---|
658 | </inbodydescription> |
---|
659 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="54" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="54" bodyend="-1"/> |
---|
660 | </memberdef> |
---|
661 | <memberdef kind="variable" id="simulator_8cpp_13ece956ca424ebed99b0796b14a98374" prot="public" static="yes" mutable="no"> |
---|
662 | <type>double</type> |
---|
663 | <definition>double u[2]</definition> |
---|
664 | <argsstring>[2]</argsstring> |
---|
665 | <name>u</name> |
---|
666 | <initializer>{0.,0.}</initializer> |
---|
667 | <briefdescription> |
---|
668 | </briefdescription> |
---|
669 | <detaileddescription> |
---|
670 | </detaileddescription> |
---|
671 | <inbodydescription> |
---|
672 | </inbodydescription> |
---|
673 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="57" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="57" bodyend="-1"/> |
---|
674 | </memberdef> |
---|
675 | <memberdef kind="variable" id="simulator_8cpp_1a99b7cd727bdf0b27735f124f671b5ec" prot="public" static="yes" mutable="no"> |
---|
676 | <type>double</type> |
---|
677 | <definition>double us[2]</definition> |
---|
678 | <argsstring>[2]</argsstring> |
---|
679 | <name>us</name> |
---|
680 | <initializer>{0.,0.}</initializer> |
---|
681 | <briefdescription> |
---|
682 | </briefdescription> |
---|
683 | <detaileddescription> |
---|
684 | </detaileddescription> |
---|
685 | <inbodydescription> |
---|
686 | </inbodydescription> |
---|
687 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="58" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="58" bodyend="-1"/> |
---|
688 | </memberdef> |
---|
689 | <memberdef kind="variable" id="simulator_8cpp_1d132091f393ab3d814ed8b94dba7e921" prot="public" static="yes" mutable="no"> |
---|
690 | <type>double</type> |
---|
691 | <definition>double usx_av</definition> |
---|
692 | <argsstring></argsstring> |
---|
693 | <name>usx_av</name> |
---|
694 | <initializer>0.</initializer> |
---|
695 | <briefdescription> |
---|
696 | </briefdescription> |
---|
697 | <detaileddescription> |
---|
698 | </detaileddescription> |
---|
699 | <inbodydescription> |
---|
700 | </inbodydescription> |
---|
701 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="61" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="61" bodyend="-1"/> |
---|
702 | </memberdef> |
---|
703 | <memberdef kind="variable" id="simulator_8cpp_1b5064e50303296c6b7087b68cb5cfce1" prot="public" static="yes" mutable="no"> |
---|
704 | <type>double</type> |
---|
705 | <definition>double usy_av</definition> |
---|
706 | <argsstring></argsstring> |
---|
707 | <name>usy_av</name> |
---|
708 | <initializer>0.</initializer> |
---|
709 | <briefdescription> |
---|
710 | </briefdescription> |
---|
711 | <detaileddescription> |
---|
712 | </detaileddescription> |
---|
713 | <inbodydescription> |
---|
714 | </inbodydescription> |
---|
715 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="61" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="61" bodyend="-1"/> |
---|
716 | </memberdef> |
---|
717 | <memberdef kind="variable" id="simulator_8cpp_141a02f7232181f728dab2eed888f7640" prot="public" static="yes" mutable="no"> |
---|
718 | <type>double</type> |
---|
719 | <definition>double sum_usx_av</definition> |
---|
720 | <argsstring></argsstring> |
---|
721 | <name>sum_usx_av</name> |
---|
722 | <initializer>0.</initializer> |
---|
723 | <briefdescription> |
---|
724 | </briefdescription> |
---|
725 | <detaileddescription> |
---|
726 | </detaileddescription> |
---|
727 | <inbodydescription> |
---|
728 | </inbodydescription> |
---|
729 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="61" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="61" bodyend="-1"/> |
---|
730 | </memberdef> |
---|
731 | <memberdef kind="variable" id="simulator_8cpp_11aef87946db23810c7fb902e36e6f22a" prot="public" static="yes" mutable="no"> |
---|
732 | <type>double</type> |
---|
733 | <definition>double sum_usy_av</definition> |
---|
734 | <argsstring></argsstring> |
---|
735 | <name>sum_usy_av</name> |
---|
736 | <initializer>0.</initializer> |
---|
737 | <briefdescription> |
---|
738 | </briefdescription> |
---|
739 | <detaileddescription> |
---|
740 | </detaileddescription> |
---|
741 | <inbodydescription> |
---|
742 | </inbodydescription> |
---|
743 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="61" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="61" bodyend="-1"/> |
---|
744 | </memberdef> |
---|
745 | <memberdef kind="variable" id="simulator_8cpp_1b7248c815b06c1b19e3921414a82592d" prot="public" static="yes" mutable="no"> |
---|
746 | <type>double</type> |
---|
747 | <definition>double isx_av</definition> |
---|
748 | <argsstring></argsstring> |
---|
749 | <name>isx_av</name> |
---|
750 | <initializer>0.</initializer> |
---|
751 | <briefdescription> |
---|
752 | </briefdescription> |
---|
753 | <detaileddescription> |
---|
754 | </detaileddescription> |
---|
755 | <inbodydescription> |
---|
756 | </inbodydescription> |
---|
757 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="64" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="64" bodyend="-1"/> |
---|
758 | </memberdef> |
---|
759 | <memberdef kind="variable" id="simulator_8cpp_15589570ff775e91e676c3bdb5b187e51" prot="public" static="yes" mutable="no"> |
---|
760 | <type>double</type> |
---|
761 | <definition>double isy_av</definition> |
---|
762 | <argsstring></argsstring> |
---|
763 | <name>isy_av</name> |
---|
764 | <initializer>0.</initializer> |
---|
765 | <briefdescription> |
---|
766 | </briefdescription> |
---|
767 | <detaileddescription> |
---|
768 | </detaileddescription> |
---|
769 | <inbodydescription> |
---|
770 | </inbodydescription> |
---|
771 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="64" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="64" bodyend="-1"/> |
---|
772 | </memberdef> |
---|
773 | <memberdef kind="variable" id="simulator_8cpp_1f0c349de71b4e8d699c2ea80a98e27fa" prot="public" static="yes" mutable="no"> |
---|
774 | <type>double</type> |
---|
775 | <definition>double sum_isx_av</definition> |
---|
776 | <argsstring></argsstring> |
---|
777 | <name>sum_isx_av</name> |
---|
778 | <initializer>0.</initializer> |
---|
779 | <briefdescription> |
---|
780 | </briefdescription> |
---|
781 | <detaileddescription> |
---|
782 | </detaileddescription> |
---|
783 | <inbodydescription> |
---|
784 | </inbodydescription> |
---|
785 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="64" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="64" bodyend="-1"/> |
---|
786 | </memberdef> |
---|
787 | <memberdef kind="variable" id="simulator_8cpp_17b8d05f9d878c78971b9c092913a064c" prot="public" static="yes" mutable="no"> |
---|
788 | <type>double</type> |
---|
789 | <definition>double sum_isy_av</definition> |
---|
790 | <argsstring></argsstring> |
---|
791 | <name>sum_isy_av</name> |
---|
792 | <initializer>0.</initializer> |
---|
793 | <briefdescription> |
---|
794 | </briefdescription> |
---|
795 | <detaileddescription> |
---|
796 | </detaileddescription> |
---|
797 | <inbodydescription> |
---|
798 | </inbodydescription> |
---|
799 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="64" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="64" bodyend="-1"/> |
---|
800 | </memberdef> |
---|
801 | <memberdef kind="variable" id="simulator_8cpp_1f7ca1db3100387a968d88ab528b26d41" prot="public" static="yes" mutable="no"> |
---|
802 | <type>double</type> |
---|
803 | <definition>double usxf</definition> |
---|
804 | <argsstring></argsstring> |
---|
805 | <name>usxf</name> |
---|
806 | <initializer>0.</initializer> |
---|
807 | <briefdescription> |
---|
808 | </briefdescription> |
---|
809 | <detaileddescription> |
---|
810 | </detaileddescription> |
---|
811 | <inbodydescription> |
---|
812 | </inbodydescription> |
---|
813 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="67" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="67" bodyend="-1"/> |
---|
814 | </memberdef> |
---|
815 | <memberdef kind="variable" id="simulator_8cpp_15d42c8ca4bd3e9d84730c1dd6a73dc6e" prot="public" static="yes" mutable="no"> |
---|
816 | <type>double</type> |
---|
817 | <definition>double usyf</definition> |
---|
818 | <argsstring></argsstring> |
---|
819 | <name>usyf</name> |
---|
820 | <initializer>0.</initializer> |
---|
821 | <briefdescription> |
---|
822 | </briefdescription> |
---|
823 | <detaileddescription> |
---|
824 | </detaileddescription> |
---|
825 | <inbodydescription> |
---|
826 | </inbodydescription> |
---|
827 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="67" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="67" bodyend="-1"/> |
---|
828 | </memberdef> |
---|
829 | <memberdef kind="variable" id="simulator_8cpp_1172eca7b7637b2316126df7e9466d633" prot="public" static="yes" mutable="no"> |
---|
830 | <type>double</type> |
---|
831 | <definition>double Tf</definition> |
---|
832 | <argsstring></argsstring> |
---|
833 | <name>Tf</name> |
---|
834 | <initializer>0.01</initializer> |
---|
835 | <briefdescription> |
---|
836 | </briefdescription> |
---|
837 | <detaileddescription> |
---|
838 | </detaileddescription> |
---|
839 | <inbodydescription> |
---|
840 | </inbodydescription> |
---|
841 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="67" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="67" bodyend="-1"/> |
---|
842 | </memberdef> |
---|
843 | <memberdef kind="variable" id="simulator_8cpp_1c38dc66e76a12774fe9acb5502e7a469" prot="public" static="yes" mutable="no"> |
---|
844 | <type>unsigned int</type> |
---|
845 | <definition>unsigned int start_filter</definition> |
---|
846 | <argsstring></argsstring> |
---|
847 | <name>start_filter</name> |
---|
848 | <initializer>1</initializer> |
---|
849 | <briefdescription> |
---|
850 | </briefdescription> |
---|
851 | <detaileddescription> |
---|
852 | </detaileddescription> |
---|
853 | <inbodydescription> |
---|
854 | </inbodydescription> |
---|
855 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="68" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="68" bodyend="-1"/> |
---|
856 | </memberdef> |
---|
857 | <memberdef kind="variable" id="simulator_8cpp_1f053457859f34ead8e8aee6e370743ac" prot="public" static="no" mutable="no"> |
---|
858 | <type>double</type> |
---|
859 | <definition>double KalmanObs[10]</definition> |
---|
860 | <argsstring>[10]</argsstring> |
---|
861 | <name>KalmanObs</name> |
---|
862 | <initializer>{0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}</initializer> |
---|
863 | <briefdescription> |
---|
864 | </briefdescription> |
---|
865 | <detaileddescription> |
---|
866 | </detaileddescription> |
---|
867 | <inbodydescription> |
---|
868 | </inbodydescription> |
---|
869 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="71" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="71" bodyend="-1"/> |
---|
870 | </memberdef> |
---|
871 | <memberdef kind="variable" id="simulator_8cpp_187accd1af8e0aff4b818d891374f7cec" prot="public" static="no" mutable="no"> |
---|
872 | <type>double</type> |
---|
873 | <definition>double t</definition> |
---|
874 | <argsstring></argsstring> |
---|
875 | <name>t</name> |
---|
876 | <initializer>0.</initializer> |
---|
877 | <briefdescription> |
---|
878 | </briefdescription> |
---|
879 | <detaileddescription> |
---|
880 | </detaileddescription> |
---|
881 | <inbodydescription> |
---|
882 | </inbodydescription> |
---|
883 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="74" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="74" bodyend="-1"/> |
---|
884 | </memberdef> |
---|
885 | <memberdef kind="variable" id="simulator_8cpp_19c8dd5461ff8757d329fffab02f6d574" prot="public" static="yes" mutable="no"> |
---|
886 | <type>double</type> |
---|
887 | <definition>double ualfa</definition> |
---|
888 | <argsstring></argsstring> |
---|
889 | <name>ualfa</name> |
---|
890 | <initializer>0.</initializer> |
---|
891 | <briefdescription> |
---|
892 | </briefdescription> |
---|
893 | <detaileddescription> |
---|
894 | </detaileddescription> |
---|
895 | <inbodydescription> |
---|
896 | </inbodydescription> |
---|
897 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="77" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="77" bodyend="-1"/> |
---|
898 | </memberdef> |
---|
899 | <memberdef kind="variable" id="simulator_8cpp_1f353c8491ed6feeb8e214a7c90a85c94" prot="public" static="yes" mutable="no"> |
---|
900 | <type>double</type> |
---|
901 | <definition>double ubeta</definition> |
---|
902 | <argsstring></argsstring> |
---|
903 | <name>ubeta</name> |
---|
904 | <initializer>0.</initializer> |
---|
905 | <briefdescription> |
---|
906 | </briefdescription> |
---|
907 | <detaileddescription> |
---|
908 | </detaileddescription> |
---|
909 | <inbodydescription> |
---|
910 | </inbodydescription> |
---|
911 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="77" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="77" bodyend="-1"/> |
---|
912 | </memberdef> |
---|
913 | </sectiondef> |
---|
914 | <sectiondef kind="func"> |
---|
915 | <memberdef kind="function" id="simulator_8cpp_148bbddff535c313ce90ca6350372f6d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
916 | <type>void</type> |
---|
917 | <definition>void pmsmsim_set_parameters</definition> |
---|
918 | <argsstring>(double Rs0, double Ls0, double Fmag0, double Bf0, double p0, double kp0, double J0, double Uc0, double DT0, double dt0)</argsstring> |
---|
919 | <name>pmsmsim_set_parameters</name> |
---|
920 | <param> |
---|
921 | <type>double</type> |
---|
922 | <declname>Rs0</declname> |
---|
923 | </param> |
---|
924 | <param> |
---|
925 | <type>double</type> |
---|
926 | <declname>Ls0</declname> |
---|
927 | </param> |
---|
928 | <param> |
---|
929 | <type>double</type> |
---|
930 | <declname>Fmag0</declname> |
---|
931 | </param> |
---|
932 | <param> |
---|
933 | <type>double</type> |
---|
934 | <declname>Bf0</declname> |
---|
935 | </param> |
---|
936 | <param> |
---|
937 | <type>double</type> |
---|
938 | <declname>p0</declname> |
---|
939 | </param> |
---|
940 | <param> |
---|
941 | <type>double</type> |
---|
942 | <declname>kp0</declname> |
---|
943 | </param> |
---|
944 | <param> |
---|
945 | <type>double</type> |
---|
946 | <declname>J0</declname> |
---|
947 | </param> |
---|
948 | <param> |
---|
949 | <type>double</type> |
---|
950 | <declname>Uc0</declname> |
---|
951 | </param> |
---|
952 | <param> |
---|
953 | <type>double</type> |
---|
954 | <declname>DT0</declname> |
---|
955 | </param> |
---|
956 | <param> |
---|
957 | <type>double</type> |
---|
958 | <declname>dt0</declname> |
---|
959 | </param> |
---|
960 | <briefdescription> |
---|
961 | </briefdescription> |
---|
962 | <detaileddescription> |
---|
963 | </detaileddescription> |
---|
964 | <inbodydescription> |
---|
965 | </inbodydescription> |
---|
966 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="23" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="79" bodyend="136"/> |
---|
967 | </memberdef> |
---|
968 | <memberdef kind="function" id="simulator_8cpp_1cdadda61be3f910910ac31cf4a3c1785" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
969 | <type>void</type> |
---|
970 | <definition>void pmsmsim_step</definition> |
---|
971 | <argsstring>(double Ww)</argsstring> |
---|
972 | <name>pmsmsim_step</name> |
---|
973 | <param> |
---|
974 | <type>double</type> |
---|
975 | <declname>Ww</declname> |
---|
976 | </param> |
---|
977 | <briefdescription> |
---|
978 | </briefdescription> |
---|
979 | <detaileddescription> |
---|
980 | </detaileddescription> |
---|
981 | <inbodydescription> |
---|
982 | </inbodydescription> |
---|
983 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="24" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="311" bodyend="366"/> |
---|
984 | </memberdef> |
---|
985 | <memberdef kind="function" id="simulator_8cpp_1d3b8a39e009e28d49610e94fbc943721" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
986 | <type>void</type> |
---|
987 | <definition>static void pwm</definition> |
---|
988 | <argsstring>(unsigned int mod)</argsstring> |
---|
989 | <name>pwm</name> |
---|
990 | <param> |
---|
991 | <type>unsigned int</type> |
---|
992 | <declname>mod</declname> |
---|
993 | </param> |
---|
994 | <briefdescription> |
---|
995 | </briefdescription> |
---|
996 | <detaileddescription> |
---|
997 | </detaileddescription> |
---|
998 | <inbodydescription> |
---|
999 | </inbodydescription> |
---|
1000 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="27" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="139" bodyend="235"/> |
---|
1001 | </memberdef> |
---|
1002 | <memberdef kind="function" id="simulator_8cpp_1ee66e8081eeedb7bc836be175478bc42" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
1003 | <type>double</type> |
---|
1004 | <definition>static double ubytek</definition> |
---|
1005 | <argsstring>(double I)</argsstring> |
---|
1006 | <name>ubytek</name> |
---|
1007 | <param> |
---|
1008 | <type>double</type> |
---|
1009 | <declname>I</declname> |
---|
1010 | </param> |
---|
1011 | <briefdescription> |
---|
1012 | </briefdescription> |
---|
1013 | <detaileddescription> |
---|
1014 | </detaileddescription> |
---|
1015 | <inbodydescription> |
---|
1016 | </inbodydescription> |
---|
1017 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="28" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="237" bodyend="255"/> |
---|
1018 | </memberdef> |
---|
1019 | <memberdef kind="function" id="simulator_8cpp_1e6c1e8a2485b12c9991afcf2213dcae8" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
1020 | <type>void</type> |
---|
1021 | <definition>static void pmsm_model</definition> |
---|
1022 | <argsstring>(unsigned int mod)</argsstring> |
---|
1023 | <name>pmsm_model</name> |
---|
1024 | <param> |
---|
1025 | <type>unsigned int</type> |
---|
1026 | <declname>mod</declname> |
---|
1027 | </param> |
---|
1028 | <briefdescription> |
---|
1029 | </briefdescription> |
---|
1030 | <detaileddescription> |
---|
1031 | </detaileddescription> |
---|
1032 | <inbodydescription> |
---|
1033 | </inbodydescription> |
---|
1034 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" line="29" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp" bodystart="258" bodyend="308"/> |
---|
1035 | </memberdef> |
---|
1036 | </sectiondef> |
---|
1037 | <briefdescription> |
---|
1038 | </briefdescription> |
---|
1039 | <detaileddescription> |
---|
1040 | </detaileddescription> |
---|
1041 | <programlisting> |
---|
1042 | <codeline lineno="1"><highlight class="comment">/*</highlight></codeline> |
---|
1043 | <codeline lineno="2"><highlight class="comment"><sp/><sp/><sp/>Simulator<sp/>of<sp/>Vector<sp/>Controlled<sp/>PMSM<sp/>Drive</highlight></codeline> |
---|
1044 | <codeline lineno="3"><highlight class="comment"></highlight></codeline> |
---|
1045 | <codeline lineno="4"><highlight class="comment"><sp/><sp/><sp/>This<sp/>module<sp/>is<sp/>background<sp/>for<sp/>PMSM<sp/>drive<sp/>object<sp/>design<sp/>and</highlight></codeline> |
---|
1046 | <codeline lineno="5"><highlight class="comment"><sp/><sp/><sp/>introduces<sp/>basic<sp/>functions<sp/>...<sp/>set_parameters()<sp/>and<sp/>eval().</highlight></codeline> |
---|
1047 | <codeline lineno="6"><highlight class="comment"></highlight></codeline> |
---|
1048 | <codeline lineno="7"><highlight class="comment"><sp/><sp/><sp/>Z.<sp/>Peroutka</highlight></codeline> |
---|
1049 | <codeline lineno="8"><highlight class="comment"></highlight></codeline> |
---|
1050 | <codeline lineno="9"><highlight class="comment">Rev.<sp/>16.3.2008</highlight></codeline> |
---|
1051 | <codeline lineno="10"><highlight class="comment"></highlight></codeline> |
---|
1052 | <codeline lineno="11"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline> |
---|
1053 | <codeline lineno="12"><highlight class="normal"></highlight></codeline> |
---|
1054 | <codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>_USE_MATH_DEFINES</highlight></codeline> |
---|
1055 | <codeline lineno="14"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> |
---|
1056 | <codeline lineno="15"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><math.h></highlight><highlight class="normal"></highlight></codeline> |
---|
1057 | <codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><stdlib.h></highlight><highlight class="normal"><sp/></highlight><highlight class="comment">//na<sp/>linuxu<sp/>je<sp/>abs<sp/>v<sp/>stdlib</highlight><highlight class="normal"></highlight></codeline> |
---|
1058 | <codeline lineno="17"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"regulace.h"</highlight><highlight class="normal"></highlight></codeline> |
---|
1059 | <codeline lineno="18"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"simulator.h"</highlight><highlight class="normal"></highlight></codeline> |
---|
1060 | <codeline lineno="19"><highlight class="normal"></highlight></codeline> |
---|
1061 | <codeline lineno="20"><highlight class="normal"></highlight></codeline> |
---|
1062 | <codeline lineno="21"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>REZIM_REGULACE<sp/><sp/>1<sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>0...reg.<sp/>momentu,<sp/>1...reg.rychlosti,<sp/>2...<sp/>Isqw=sqrt(Imax^2-Id^2)<sp/>-<sp/>max.<sp/>moment</highlight></codeline> |
---|
1063 | <codeline lineno="22"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> |
---|
1064 | <codeline lineno="23"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>pmsmsim_set_parameters(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Rs0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ls0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Fmag0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Bf0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>p0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>kp0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>J0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Uc0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>DT0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dt0);</highlight></codeline> |
---|
1065 | <codeline lineno="24"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>pmsmsim_step(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ww);</highlight></codeline> |
---|
1066 | <codeline lineno="25"><highlight class="normal"></highlight></codeline> |
---|
1067 | <codeline lineno="26"><highlight class="normal"></highlight><highlight class="comment">//<sp/>local<sp/>functions</highlight><highlight class="normal"></highlight></codeline> |
---|
1068 | <codeline lineno="27"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>pwm(</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>mod);</highlight></codeline> |
---|
1069 | <codeline lineno="28"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>ubytek(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>I);</highlight></codeline> |
---|
1070 | <codeline lineno="29"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>pmsm_model(</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>mod);</highlight></codeline> |
---|
1071 | <codeline lineno="30"><highlight class="normal"></highlight></codeline> |
---|
1072 | <codeline lineno="31"><highlight class="normal"></highlight></codeline> |
---|
1073 | <codeline lineno="32"><highlight class="normal"></highlight><highlight class="comment">//<sp/>simulator<sp/>properties<sp/>///////////////////////</highlight><highlight class="normal"></highlight></codeline> |
---|
1074 | <codeline lineno="33"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Rs,Ls,Fmag,Bf,p,kp,J;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>parameters<sp/>of<sp/>PMSM<sp/>model</highlight><highlight class="normal"></highlight></codeline> |
---|
1075 | <codeline lineno="34"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucn,Uc,DT,U_modulace;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>dc-link<sp/>voltage<sp/>and<sp/>dead-time</highlight><highlight class="normal"></highlight></codeline> |
---|
1076 | <codeline lineno="35"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Urm_max;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>field<sp/>weakening</highlight><highlight class="normal"></highlight></codeline> |
---|
1077 | <codeline lineno="36"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>h,h_reg,h_reg_real;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>simulation<sp/>step<sp/>and<sp/>sampling<sp/>of<sp/>employed<sp/>loops</highlight><highlight class="normal"></highlight></codeline> |
---|
1078 | <codeline lineno="37"><highlight class="normal"></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>h_reg_counter,h_reg_counter_mez;<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>emulation<sp/>of<sp/>DSP<sp/>operation</highlight><highlight class="normal"></highlight></codeline> |
---|
1079 | <codeline lineno="38"><highlight class="normal"></highlight></codeline> |
---|
1080 | <codeline lineno="39"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>va_char[16]={0,10,50,100,200,300,500,1000,<sp/>0,1,1.8,2.4,3.2,3.8,4.8,6.8};<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>ubytky</highlight><highlight class="normal"></highlight></codeline> |
---|
1081 | <codeline lineno="40"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>pocet=8;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>velikost<sp/>VA-charky</highlight><highlight class="normal"></highlight></codeline> |
---|
1082 | <codeline lineno="41"><highlight class="normal"></highlight></codeline> |
---|
1083 | <codeline lineno="42"><highlight class="normal"></highlight><highlight class="comment">//<sp/>system<sp/>state</highlight><highlight class="normal"></highlight></codeline> |
---|
1084 | <codeline lineno="43"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>x[9];<sp/></highlight><highlight class="comment">//<sp/>(isx,isy,wme,theta_e,M,Fsd,Isd,Isq,Mz)</highlight><highlight class="normal"></highlight></codeline> |
---|
1085 | <codeline lineno="44"><highlight class="normal"></highlight></codeline> |
---|
1086 | <codeline lineno="45"><highlight class="normal"></highlight><highlight class="comment">//<sp/>internal<sp/>variables<sp/>of<sp/>PWM<sp/>module</highlight><highlight class="normal"></highlight></codeline> |
---|
1087 | <codeline lineno="46"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>smer,<sp/>smer2,<sp/>citac,<sp/>citac2,<sp/>citac_PR,<sp/>modulace;</highlight></codeline> |
---|
1088 | <codeline lineno="47"><highlight class="normal"></highlight></codeline> |
---|
1089 | <codeline lineno="48"><highlight class="normal"></highlight><highlight class="comment">//<sp/>internal<sp/>variables<sp/>of<sp/>PMSM<sp/>model</highlight><highlight class="normal"></highlight></codeline> |
---|
1090 | <codeline lineno="49"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dIsx,dIsx1,dIsx2,dIsx3,dIsy,dIsy1,dIsy2,dIsy3;</highlight></codeline> |
---|
1091 | <codeline lineno="50"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dTheta,dTheta1,dTheta2,dTheta3;</highlight></codeline> |
---|
1092 | <codeline lineno="51"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dw,dw1,dw2,dw3;</highlight></codeline> |
---|
1093 | <codeline lineno="52"><highlight class="normal"></highlight></codeline> |
---|
1094 | <codeline lineno="53"><highlight class="normal"></highlight><highlight class="comment">//<sp/>system<sp/>measures</highlight><highlight class="normal"></highlight></codeline> |
---|
1095 | <codeline lineno="54"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isx,<sp/>Isy,<sp/>theta,<sp/>speed;</highlight></codeline> |
---|
1096 | <codeline lineno="55"><highlight class="normal"></highlight></codeline> |
---|
1097 | <codeline lineno="56"><highlight class="normal"></highlight><highlight class="comment">//<sp/>control</highlight><highlight class="normal"></highlight></codeline> |
---|
1098 | <codeline lineno="57"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>u[2]={0.,0.};<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>format<sp/>u={Um,<sp/>beta}</highlight><highlight class="normal"></highlight></codeline> |
---|
1099 | <codeline lineno="58"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>us[2]={0.,0.};<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>format<sp/>us={us_alfa,<sp/>us_beta}</highlight><highlight class="normal"></highlight></codeline> |
---|
1100 | <codeline lineno="59"><highlight class="normal"></highlight></codeline> |
---|
1101 | <codeline lineno="60"><highlight class="normal"></highlight><highlight class="comment">//<sp/>variables<sp/>for<sp/>calculation<sp/>of<sp/>mean<sp/>values<sp/>of<sp/>stator<sp/>voltage<sp/>components</highlight><highlight class="normal"></highlight></codeline> |
---|
1102 | <codeline lineno="61"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>usx_av=0.,<sp/>usy_av=0.,sum_usx_av=0.,sum_usy_av=0.;</highlight></codeline> |
---|
1103 | <codeline lineno="62"><highlight class="normal"></highlight></codeline> |
---|
1104 | <codeline lineno="63"><highlight class="normal"></highlight><highlight class="comment">//<sp/>variables<sp/>for<sp/>calculation<sp/>of<sp/>mean<sp/>values<sp/>of<sp/>stator<sp/>current<sp/>components<sp/>-<sp/>(alfa,<sp/>beta)</highlight><highlight class="normal"></highlight></codeline> |
---|
1105 | <codeline lineno="64"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>isx_av=0.,<sp/>isy_av=0.,sum_isx_av=0.,sum_isy_av=0.;</highlight></codeline> |
---|
1106 | <codeline lineno="65"><highlight class="normal"></highlight></codeline> |
---|
1107 | <codeline lineno="66"><highlight class="normal"></highlight><highlight class="comment">//<sp/>stator<sp/>voltage<sp/>components<sp/>filtering</highlight><highlight class="normal"></highlight></codeline> |
---|
1108 | <codeline lineno="67"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>usxf=0.,usyf=0.,Tf=0.01;</highlight></codeline> |
---|
1109 | <codeline lineno="68"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>start_filter=1;</highlight></codeline> |
---|
1110 | <codeline lineno="69"><highlight class="normal"></highlight></codeline> |
---|
1111 | <codeline lineno="70"><highlight class="normal"></highlight><highlight class="comment">//<sp/>output<sp/>for<sp/>EKF<sp/>(voltages<sp/>and<sp/>measured<sp/>currents,<sp/>which<sp/>are<sp/>fed<sp/>to<sp/>KalmanObs)</highlight><highlight class="normal"></highlight></codeline> |
---|
1112 | <codeline lineno="71"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>KalmanObs[10]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};<sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>usx,<sp/>usy,<sp/>Isx,<sp/>Isy,<sp/>usx_av,<sp/>usy_av</highlight><highlight class="normal"></highlight></codeline> |
---|
1113 | <codeline lineno="72"><highlight class="normal"></highlight></codeline> |
---|
1114 | <codeline lineno="73"><highlight class="normal"></highlight><highlight class="comment">//<sp/>real-time</highlight><highlight class="normal"></highlight></codeline> |
---|
1115 | <codeline lineno="74"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>t=0.;<sp/></highlight><highlight class="comment">//VS<sp/>removed<sp/>static<sp/>due<sp/>to<sp/>clash<sp/>with<sp/>export<sp/>in<sp/>.h</highlight><highlight class="normal"></highlight></codeline> |
---|
1116 | <codeline lineno="75"><highlight class="normal"></highlight></codeline> |
---|
1117 | <codeline lineno="76"><highlight class="normal"></highlight><highlight class="comment">//<sp/>stator<sp/>voltage<sp/>components<sp/>in<sp/>alfa<sp/>beta<sp/>(inluding<sp/>impact<sp/>of<sp/>the<sp/>real<sp/>dc-link<sp/>voltage)</highlight><highlight class="normal"></highlight></codeline> |
---|
1118 | <codeline lineno="77"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>ualfa=0.,<sp/>ubeta=0.;</highlight></codeline> |
---|
1119 | <codeline lineno="78"><highlight class="normal"></highlight></codeline> |
---|
1120 | <codeline lineno="79"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>pmsmsim_set_parameters(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Rs0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ls0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Fmag0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Bf0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>p0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>kp0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>J0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Uc0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>DT0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dt0)</highlight></codeline> |
---|
1121 | <codeline lineno="80"><highlight class="normal">{</highlight></codeline> |
---|
1122 | <codeline lineno="81"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>tmp_i;</highlight></codeline> |
---|
1123 | <codeline lineno="82"><highlight class="normal"></highlight></codeline> |
---|
1124 | <codeline lineno="83"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>simulator<sp/>parameters<sp/>setup</highlight><highlight class="normal"></highlight></codeline> |
---|
1125 | <codeline lineno="84"><highlight class="normal"><sp/><sp/>Rs=Rs0;</highlight></codeline> |
---|
1126 | <codeline lineno="85"><highlight class="normal"><sp/><sp/>Ls=Ls0;</highlight></codeline> |
---|
1127 | <codeline lineno="86"><highlight class="normal"><sp/><sp/>Fmag=Fmag0;</highlight></codeline> |
---|
1128 | <codeline lineno="87"><highlight class="normal"><sp/><sp/>Bf=Bf0;</highlight></codeline> |
---|
1129 | <codeline lineno="88"><highlight class="normal"><sp/><sp/>p=p0;</highlight></codeline> |
---|
1130 | <codeline lineno="89"><highlight class="normal"><sp/><sp/>kp=kp0;</highlight></codeline> |
---|
1131 | <codeline lineno="90"><highlight class="normal"><sp/><sp/>J=J0;</highlight></codeline> |
---|
1132 | <codeline lineno="91"><highlight class="normal"><sp/><sp/>Ucn=600.;</highlight></codeline> |
---|
1133 | <codeline lineno="92"><highlight class="normal"><sp/><sp/>Uc=Uc0;</highlight></codeline> |
---|
1134 | <codeline lineno="93"><highlight class="normal"><sp/><sp/>DT=DT0;</highlight></codeline> |
---|
1135 | <codeline lineno="94"><highlight class="normal"></highlight></codeline> |
---|
1136 | <codeline lineno="95"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>control<sp/>setup</highlight><highlight class="normal"></highlight></codeline> |
---|
1137 | <codeline lineno="96"><highlight class="normal"><sp/><sp/>Urm_max=0.95;</highlight></codeline> |
---|
1138 | <codeline lineno="97"><highlight class="normal"></highlight></codeline> |
---|
1139 | <codeline lineno="98"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>simulator<sp/>sampling<sp/>-<sp/>fixed<sp/>setup</highlight><highlight class="normal"></highlight></codeline> |
---|
1140 | <codeline lineno="99"><highlight class="normal"><sp/><sp/>h=dt0;</highlight></codeline> |
---|
1141 | <codeline lineno="100"><highlight class="normal"><sp/><sp/>h_reg=125e-6;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>fpwm<sp/>=<sp/>4kHz</highlight><highlight class="normal"></highlight></codeline> |
---|
1142 | <codeline lineno="101"><highlight class="normal"><sp/><sp/>h_reg_counter_mez=(int)(h_reg/h);<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>emulation<sp/>of<sp/>operation<sp/>of<sp/>DSP<sp/>timer</highlight><highlight class="normal"></highlight></codeline> |
---|
1143 | <codeline lineno="102"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//h_reg_counter=h_reg_counter_mez;</highlight><highlight class="normal"></highlight></codeline> |
---|
1144 | <codeline lineno="103"><highlight class="normal"><sp/><sp/>h_reg_counter=1;</highlight></codeline> |
---|
1145 | <codeline lineno="104"><highlight class="normal"><sp/><sp/>h_reg_real=h_reg_counter_mez*h;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>real<sp/>sampling<sp/>period</highlight><highlight class="normal"></highlight></codeline> |
---|
1146 | <codeline lineno="105"><highlight class="normal"></highlight></codeline> |
---|
1147 | <codeline lineno="106"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>reset<sp/>of<sp/>the<sp/>system<sp/>state<sp/>variables</highlight><highlight class="normal"></highlight></codeline> |
---|
1148 | <codeline lineno="107"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmp_i=0;tmp_i<9;tmp_i++)</highlight></codeline> |
---|
1149 | <codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/>x[tmp_i]=0.;</highlight></codeline> |
---|
1150 | <codeline lineno="109"><highlight class="normal"></highlight></codeline> |
---|
1151 | <codeline lineno="110"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>emulation<sp/>of<sp/>the<sp/>first<sp/>measure</highlight><highlight class="normal"></highlight></codeline> |
---|
1152 | <codeline lineno="111"><highlight class="normal"><sp/><sp/>Isx=0.;Isy=0.;theta=x[3];speed=x[2];</highlight></codeline> |
---|
1153 | <codeline lineno="112"><highlight class="normal"></highlight></codeline> |
---|
1154 | <codeline lineno="113"><highlight class="normal"></highlight><highlight class="comment">//<sp/>===<sp/>init<sp/>of<sp/>particular<sp/>modules<sp/>of<sp/>simulator<sp/>===</highlight><highlight class="normal"></highlight></codeline> |
---|
1155 | <codeline lineno="114"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>PWM<sp/>init</highlight><highlight class="normal"></highlight></codeline> |
---|
1156 | <codeline lineno="115"><highlight class="normal"><sp/><sp/>smer=-1;<sp/>smer2=-1;</highlight></codeline> |
---|
1157 | <codeline lineno="116"><highlight class="normal"><sp/><sp/>citac=0;</highlight></codeline> |
---|
1158 | <codeline lineno="117"><highlight class="normal"><sp/><sp/>citac2=abs(0-(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)(DT/h));<sp/></highlight><highlight class="comment">//VS:<sp/>oprava,<sp/>je<sp/>to<sp/>spravne?</highlight><highlight class="normal"></highlight></codeline> |
---|
1159 | <codeline lineno="118"><highlight class="normal"><sp/><sp/>citac_PR=h_reg_counter_mez;</highlight></codeline> |
---|
1160 | <codeline lineno="119"><highlight class="normal"></highlight></codeline> |
---|
1161 | <codeline lineno="120"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>first<sp/>interrupt<sp/>occur<sp/>after<sp/>first<sp/>period<sp/>match<sp/>=><sp/>add<sp/>1<sp/>to<sp/>both<sp/>counter<sp/>registers</highlight><highlight class="normal"></highlight></codeline> |
---|
1162 | <codeline lineno="121"><highlight class="normal"><sp/><sp/>citac++;smer=1;</highlight></codeline> |
---|
1163 | <codeline lineno="122"><highlight class="normal"><sp/><sp/>citac2--;</highlight></codeline> |
---|
1164 | <codeline lineno="123"><highlight class="normal"></highlight></codeline> |
---|
1165 | <codeline lineno="124"><highlight class="normal"><sp/><sp/>modulace=1;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>THIPWM</highlight><highlight class="normal"></highlight></codeline> |
---|
1166 | <codeline lineno="125"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(modulace==1)</highlight></codeline> |
---|
1167 | <codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/>U_modulace=Ucn/sqrt(3.);</highlight></codeline> |
---|
1168 | <codeline lineno="127"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
1169 | <codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/>U_modulace=Ucn/2.;</highlight></codeline> |
---|
1170 | <codeline lineno="129"><highlight class="normal"></highlight></codeline> |
---|
1171 | <codeline lineno="130"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>PMSM<sp/>model<sp/>init</highlight><highlight class="normal"></highlight></codeline> |
---|
1172 | <codeline lineno="131"><highlight class="normal"><sp/><sp/>dIsx=0;dIsx1=0;dIsx2=0;dIsx3=0;dIsy=0;dIsy1=0;dIsy2=0;dIsy3=0;</highlight></codeline> |
---|
1173 | <codeline lineno="132"><highlight class="normal"><sp/><sp/>dTheta=0;dTheta1=0;dTheta2=0;dTheta3=0;</highlight></codeline> |
---|
1174 | <codeline lineno="133"><highlight class="normal"><sp/><sp/>dw=0;dw1=0;dw2=0;dw3=0;</highlight></codeline> |
---|
1175 | <codeline lineno="134"><highlight class="normal"></highlight></codeline> |
---|
1176 | <codeline lineno="135"><highlight class="normal"><sp/><sp/>init_regulace(Ls,Fmag,kp,p,h_reg_real);</highlight></codeline> |
---|
1177 | <codeline lineno="136"><highlight class="normal">}</highlight></codeline> |
---|
1178 | <codeline lineno="137"><highlight class="normal"></highlight></codeline> |
---|
1179 | <codeline lineno="138"><highlight class="normal"></highlight></codeline> |
---|
1180 | <codeline lineno="139"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>pwm(</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>mod)</highlight></codeline> |
---|
1181 | <codeline lineno="140"><highlight class="normal"></highlight><highlight class="comment">//<sp/>mod<sp/>...<sp/>mod=0<sp/>-<sp/>sinusoidal<sp/>PWM;<sp/>mod=1<sp/>-<sp/>PWM<sp/>with<sp/>injected<sp/>3rd<sp/>harmonic</highlight><highlight class="normal"></highlight></codeline> |
---|
1182 | <codeline lineno="141"><highlight class="normal">{</highlight></codeline> |
---|
1183 | <codeline lineno="142"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline> |
---|
1184 | <codeline lineno="143"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>iabc[3],<sp/>ur[3],ustr[3],ua,ub,uc;</highlight></codeline> |
---|
1185 | <codeline lineno="144"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dtr[3],dd[3];</highlight></codeline> |
---|
1186 | <codeline lineno="145"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Um,<sp/>beta;</highlight></codeline> |
---|
1187 | <codeline lineno="146"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>U3;</highlight></codeline> |
---|
1188 | <codeline lineno="147"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>up,<sp/>up2;</highlight></codeline> |
---|
1189 | <codeline lineno="148"><highlight class="normal"></highlight></codeline> |
---|
1190 | <codeline lineno="149"><highlight class="normal"><sp/><sp/>Um=*u;</highlight></codeline> |
---|
1191 | <codeline lineno="150"><highlight class="normal"><sp/><sp/>beta=*(u+1);</highlight></codeline> |
---|
1192 | <codeline lineno="151"><highlight class="normal"></highlight></codeline> |
---|
1193 | <codeline lineno="152"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>emulation<sp/>of<sp/>carrier<sp/>-<sp/>timer</highlight><highlight class="normal"></highlight></codeline> |
---|
1194 | <codeline lineno="153"><highlight class="normal"><sp/><sp/>up=((double)citac/citac_PR-0.5)*Ucn;</highlight></codeline> |
---|
1195 | <codeline lineno="154"><highlight class="normal"><sp/><sp/>up2=((double)citac2/citac_PR-0.5)*Ucn;</highlight></codeline> |
---|
1196 | <codeline lineno="155"><highlight class="normal"></highlight></codeline> |
---|
1197 | <codeline lineno="156"><highlight class="normal"><sp/><sp/>iabc[0]=*x;</highlight></codeline> |
---|
1198 | <codeline lineno="157"><highlight class="normal"><sp/><sp/>iabc[1]=(-*x+sqrt(3.)**(x+1))/2.;</highlight></codeline> |
---|
1199 | <codeline lineno="158"><highlight class="normal"><sp/><sp/>iabc[2]=(-*x-sqrt(3.)**(x+1))/2.;</highlight></codeline> |
---|
1200 | <codeline lineno="159"><highlight class="normal"></highlight></codeline> |
---|
1201 | <codeline lineno="160"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mod==0)<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>sin.<sp/>PWM</highlight><highlight class="normal"></highlight></codeline> |
---|
1202 | <codeline lineno="161"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
1203 | <codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[0]=Um*cos(beta);</highlight></codeline> |
---|
1204 | <codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[1]=Um*cos(beta-2./3.*M_PI);</highlight></codeline> |
---|
1205 | <codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[2]=Um*cos(beta+2./3.*M_PI);</highlight></codeline> |
---|
1206 | <codeline lineno="165"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
1207 | <codeline lineno="166"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>PWM<sp/>with<sp/>injected<sp/>3rd<sp/>harmonic</highlight><highlight class="normal"></highlight></codeline> |
---|
1208 | <codeline lineno="167"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
1209 | <codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/>U3=0.17*cos(3.*beta);</highlight></codeline> |
---|
1210 | <codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[0]=Um*(cos(beta)-U3);</highlight></codeline> |
---|
1211 | <codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[1]=Um*(cos(beta-2./3.*M_PI)-U3);</highlight></codeline> |
---|
1212 | <codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[2]=Um*(cos(beta+2./3.*M_PI)-U3);</highlight></codeline> |
---|
1213 | <codeline lineno="172"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
1214 | <codeline lineno="173"><highlight class="normal"></highlight></codeline> |
---|
1215 | <codeline lineno="174"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i<3;i++)</highlight></codeline> |
---|
1216 | <codeline lineno="175"><highlight class="normal"><sp/><sp/>{<sp/>dtr[i]=ubytek(fabs(iabc[i]))*0.;</highlight></codeline> |
---|
1217 | <codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/>dd[i]=dtr[i]*.73;</highlight></codeline> |
---|
1218 | <codeline lineno="177"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
1219 | <codeline lineno="178"><highlight class="normal"></highlight></codeline> |
---|
1220 | <codeline lineno="179"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>implementation<sp/>of<sp/>voltage<sp/>drops<sp/>and<sp/>dead-times</highlight><highlight class="normal"></highlight></codeline> |
---|
1221 | <codeline lineno="180"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i<3;i++)</highlight></codeline> |
---|
1222 | <codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(iabc[i]>=0)</highlight></codeline> |
---|
1223 | <codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((ur[i]>up)<sp/>&&<sp/>(ur[i]>up2))</highlight></codeline> |
---|
1224 | <codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ustr[i]=Uc/2-dtr[i];</highlight></codeline> |
---|
1225 | <codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
1226 | <codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ustr[i]=-(Uc/2+dd[i]);</highlight></codeline> |
---|
1227 | <codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
1228 | <codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((ur[i]<up)<sp/>&&<sp/>(ur[i]<up2))</highlight></codeline> |
---|
1229 | <codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ustr[i]=-(Uc/2-dtr[i]);</highlight></codeline> |
---|
1230 | <codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
1231 | <codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ustr[i]=Uc/2+dd[i];</highlight></codeline> |
---|
1232 | <codeline lineno="191"><highlight class="normal"></highlight></codeline> |
---|
1233 | <codeline lineno="192"><highlight class="normal"></highlight><highlight class="comment">//<sp/>phase<sp/>voltages</highlight><highlight class="normal"></highlight></codeline> |
---|
1234 | <codeline lineno="193"><highlight class="normal"><sp/><sp/>ua=(2.*ustr[0]-ustr[1]-ustr[2])/3.;</highlight></codeline> |
---|
1235 | <codeline lineno="194"><highlight class="normal"><sp/><sp/>ub=(2.*ustr[1]-ustr[0]-ustr[2])/3.;</highlight></codeline> |
---|
1236 | <codeline lineno="195"><highlight class="normal"><sp/><sp/>uc=(2.*ustr[2]-ustr[0]-ustr[1])/3.;</highlight></codeline> |
---|
1237 | <codeline lineno="196"><highlight class="normal"></highlight></codeline> |
---|
1238 | <codeline lineno="197"><highlight class="normal"></highlight><highlight class="comment">//<sp/>voltage<sp/>vector<sp/>in<sp/>stationary<sp/>reference<sp/>frame<sp/>(x,y)</highlight><highlight class="normal"></highlight></codeline> |
---|
1239 | <codeline lineno="198"><highlight class="normal"><sp/><sp/>*us=(2.*ua-ub-uc)/3.;</highlight></codeline> |
---|
1240 | <codeline lineno="199"><highlight class="normal"><sp/><sp/>*(us+1)=(ub-uc)/sqrt(3.);</highlight></codeline> |
---|
1241 | <codeline lineno="200"><highlight class="normal"></highlight></codeline> |
---|
1242 | <codeline lineno="201"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>emulation<sp/>of<sp/>DSP<sp/>timers</highlight><highlight class="normal"></highlight></codeline> |
---|
1243 | <codeline lineno="202"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((citac==citac_PR)||(citac==0))</highlight></codeline> |
---|
1244 | <codeline lineno="203"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
1245 | <codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/>smer*=-1;</highlight></codeline> |
---|
1246 | <codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>calculation<sp/>of<sp/>stator<sp/>voltage<sp/>components<sp/>mean<sp/>values</highlight><highlight class="normal"></highlight></codeline> |
---|
1247 | <codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/>usx_av=h/h_reg*sum_usx_av;</highlight></codeline> |
---|
1248 | <codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/>usy_av=h/h_reg*sum_usy_av;</highlight></codeline> |
---|
1249 | <codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>reset<sp/>of<sp/>sum<sp/>accumulators</highlight><highlight class="normal"></highlight></codeline> |
---|
1250 | <codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/>sum_usx_av=0.;</highlight></codeline> |
---|
1251 | <codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/>sum_usy_av=0.;</highlight></codeline> |
---|
1252 | <codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
1253 | <codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>stator<sp/>current<sp/>components<sp/>mean<sp/>values<sp/>-<sp/>reference<sp/>frame<sp/>(alfa,<sp/>beta)</highlight><highlight class="normal"></highlight></codeline> |
---|
1254 | <codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/>isx_av=h/h_reg*sum_isx_av;</highlight></codeline> |
---|
1255 | <codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/>isy_av=h/h_reg*sum_isy_av;</highlight></codeline> |
---|
1256 | <codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>reset<sp/>of<sp/>sum<sp/>accumulators</highlight><highlight class="normal"></highlight></codeline> |
---|
1257 | <codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/>sum_isx_av=0.;</highlight></codeline> |
---|
1258 | <codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/>sum_isy_av=0.;</highlight></codeline> |
---|
1259 | <codeline lineno="218"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
1260 | <codeline lineno="219"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((citac2==citac_PR)||(citac2==0))<sp/>smer2*=-1;</highlight></codeline> |
---|
1261 | <codeline lineno="220"><highlight class="normal"><sp/><sp/>citac+=smer;</highlight></codeline> |
---|
1262 | <codeline lineno="221"><highlight class="normal"><sp/><sp/>citac2+=smer2;</highlight></codeline> |
---|
1263 | <codeline lineno="222"><highlight class="normal"><sp/><sp/></highlight></codeline> |
---|
1264 | <codeline lineno="223"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>calculation<sp/>of<sp/>stator<sp/>voltage<sp/>components<sp/>mean<sp/>values<sp/>-<sp/>sum</highlight><highlight class="normal"></highlight></codeline> |
---|
1265 | <codeline lineno="224"><highlight class="normal"><sp/><sp/>sum_usx_av+=*us;</highlight></codeline> |
---|
1266 | <codeline lineno="225"><highlight class="normal"><sp/><sp/>sum_usy_av+=*(us+1);</highlight></codeline> |
---|
1267 | <codeline lineno="226"><highlight class="normal"><sp/><sp/></highlight></codeline> |
---|
1268 | <codeline lineno="227"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>stator<sp/>voltage<sp/>components<sp/>filtering</highlight><highlight class="normal"></highlight></codeline> |
---|
1269 | <codeline lineno="228"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//if<sp/>(start_filter==1)</highlight><highlight class="normal"></highlight></codeline> |
---|
1270 | <codeline lineno="229"><highlight class="normal"><sp/><sp/>usxf+=(*us-usxf)*h/h_reg;</highlight></codeline> |
---|
1271 | <codeline lineno="230"><highlight class="normal"><sp/><sp/>usyf+=(*(us+1)-usyf)*h/h_reg;</highlight></codeline> |
---|
1272 | <codeline lineno="231"><highlight class="normal"><sp/><sp/></highlight></codeline> |
---|
1273 | <codeline lineno="232"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>stator<sp/>current<sp/>components<sp/>mean<sp/>values<sp/>-<sp/>reference<sp/>frame<sp/>(alfa,<sp/>beta)</highlight><highlight class="normal"></highlight></codeline> |
---|
1274 | <codeline lineno="233"><highlight class="normal"><sp/><sp/>sum_isx_av+=*x;</highlight></codeline> |
---|
1275 | <codeline lineno="234"><highlight class="normal"><sp/><sp/>sum_isy_av+=*(x+1);</highlight></codeline> |
---|
1276 | <codeline lineno="235"><highlight class="normal">}</highlight></codeline> |
---|
1277 | <codeline lineno="236"><highlight class="normal"></highlight></codeline> |
---|
1278 | <codeline lineno="237"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>ubytek(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>I)</highlight></codeline> |
---|
1279 | <codeline lineno="238"><highlight class="normal">{</highlight></codeline> |
---|
1280 | <codeline lineno="239"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ii;</highlight></codeline> |
---|
1281 | <codeline lineno="240"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>delta_u;</highlight></codeline> |
---|
1282 | <codeline lineno="241"><highlight class="normal"></highlight></codeline> |
---|
1283 | <codeline lineno="242"><highlight class="normal"><sp/><sp/>ii=0;</highlight></codeline> |
---|
1284 | <codeline lineno="243"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((*(va_char+ii)<I)<sp/>&&<sp/>(ii<(pocet-1)))</highlight></codeline> |
---|
1285 | <codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/>ii++;</highlight></codeline> |
---|
1286 | <codeline lineno="245"><highlight class="normal"></highlight></codeline> |
---|
1287 | <codeline lineno="246"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ii==(pocet-1))</highlight></codeline> |
---|
1288 | <codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/>delta_u=*(va_char+ii+pocet);</highlight></codeline> |
---|
1289 | <codeline lineno="248"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
1290 | <codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ii==0)</highlight></codeline> |
---|
1291 | <codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>delta_u=0;</highlight></codeline> |
---|
1292 | <codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
1293 | <codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>delta_u=*(va_char+ii-1+pocet)+(I-*(va_char+ii-1))/(*(va_char+ii)-*(va_char+ii-1))*(*(va_char+ii+pocet)-*(va_char+ii-1+pocet));</highlight></codeline> |
---|
1294 | <codeline lineno="253"><highlight class="normal"></highlight></codeline> |
---|
1295 | <codeline lineno="254"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>delta_u;</highlight></codeline> |
---|
1296 | <codeline lineno="255"><highlight class="normal">}</highlight></codeline> |
---|
1297 | <codeline lineno="256"><highlight class="normal"></highlight></codeline> |
---|
1298 | <codeline lineno="257"><highlight class="normal"></highlight></codeline> |
---|
1299 | <codeline lineno="258"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>pmsm_model(</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>mod)</highlight></codeline> |
---|
1300 | <codeline lineno="259"><highlight class="normal"></highlight><highlight class="comment">//<sp/>mod<5...Euler,<sp/>mod>4<sp/>...<sp/>Adams<sp/>of<sp/>4th<sp/>order</highlight><highlight class="normal"></highlight></codeline> |
---|
1301 | <codeline lineno="260"><highlight class="normal">{</highlight></codeline> |
---|
1302 | <codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>usx,<sp/>usy;</highlight></codeline> |
---|
1303 | <codeline lineno="262"><highlight class="normal"></highlight></codeline> |
---|
1304 | <codeline lineno="263"><highlight class="normal"><sp/><sp/>usx=*us;</highlight></codeline> |
---|
1305 | <codeline lineno="264"><highlight class="normal"><sp/><sp/>usy=*(us+1);</highlight></codeline> |
---|
1306 | <codeline lineno="265"><highlight class="normal"></highlight></codeline> |
---|
1307 | <codeline lineno="266"><highlight class="normal"><sp/><sp/>dIsx=-Rs/Ls*x[0]+Fmag/Ls*x[2]*sin(x[3])+usx/Ls;</highlight></codeline> |
---|
1308 | <codeline lineno="267"><highlight class="normal"><sp/><sp/>dIsy=-Rs/Ls*x[1]-Fmag/Ls*x[2]*cos(x[3])+usy/Ls;</highlight></codeline> |
---|
1309 | <codeline lineno="268"><highlight class="normal"><sp/><sp/>dTheta=x[2];</highlight></codeline> |
---|
1310 | <codeline lineno="269"><highlight class="normal"></highlight></codeline> |
---|
1311 | <codeline lineno="270"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(J>0)</highlight></codeline> |
---|
1312 | <codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/>dw=kp*p*p*Fmag/J*(x[1]*cos(x[3])-x[0]*sin(x[3]))-Bf/J*x[2]-p/J*x[8];</highlight></codeline> |
---|
1313 | <codeline lineno="272"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
1314 | <codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/>dw=0;</highlight></codeline> |
---|
1315 | <codeline lineno="274"><highlight class="normal"></highlight></codeline> |
---|
1316 | <codeline lineno="275"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>integration</highlight><highlight class="normal"></highlight></codeline> |
---|
1317 | <codeline lineno="276"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mod<5)<sp/><sp/></highlight><highlight class="comment">//<sp/>Euler</highlight><highlight class="normal"></highlight></codeline> |
---|
1318 | <codeline lineno="277"><highlight class="normal"><sp/><sp/>{<sp/>x[0]+=dIsx*h;</highlight></codeline> |
---|
1319 | <codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/>x[1]+=dIsy*h;</highlight></codeline> |
---|
1320 | <codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/>x[2]+=dw*h;</highlight></codeline> |
---|
1321 | <codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/>x[3]+=dTheta*h;</highlight></codeline> |
---|
1322 | <codeline lineno="281"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
1323 | <codeline lineno="282"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Adams<sp/>(4th<sp/>order)</highlight><highlight class="normal"></highlight></codeline> |
---|
1324 | <codeline lineno="283"><highlight class="normal"><sp/><sp/>{<sp/>x[0]+=h/24.*(55.*dIsx-59.*dIsx1+37.*dIsx2-9.*dIsx3);</highlight></codeline> |
---|
1325 | <codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/>x[1]+=h/24.*(55.*dIsy-59.*dIsy1+37.*dIsy2-9.*dIsy3);</highlight></codeline> |
---|
1326 | <codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/>x[2]+=h/24.*(55.*dw-59.*dw1+37.*dw2-9.*dw3);</highlight></codeline> |
---|
1327 | <codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/>x[3]+=h/24.*(55.*dTheta-59.*dTheta1+37.*dTheta2-9.*dTheta3);</highlight></codeline> |
---|
1328 | <codeline lineno="287"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
1329 | <codeline lineno="288"><highlight class="normal"></highlight></codeline> |
---|
1330 | <codeline lineno="289"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>saturation<sp/>of<sp/>theta<sp/>to<sp/>(-pi,pi)</highlight><highlight class="normal"></highlight></codeline> |
---|
1331 | <codeline lineno="290"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[3]>M_PI)<sp/>x[3]-=(2*M_PI);</highlight></codeline> |
---|
1332 | <codeline lineno="291"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[3]<-M_PI)<sp/>x[3]+=(2*M_PI);</highlight></codeline> |
---|
1333 | <codeline lineno="292"><highlight class="normal"></highlight></codeline> |
---|
1334 | <codeline lineno="293"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>diff.<sp/>shift<sp/>-<sp/>Adams</highlight><highlight class="normal"></highlight></codeline> |
---|
1335 | <codeline lineno="294"><highlight class="normal"><sp/><sp/>dIsx3=dIsx2;dIsx2=dIsx1;dIsx1=dIsx;</highlight></codeline> |
---|
1336 | <codeline lineno="295"><highlight class="normal"><sp/><sp/>dIsy3=dIsy2;dIsy2=dIsy1;dIsy1=dIsy;</highlight></codeline> |
---|
1337 | <codeline lineno="296"><highlight class="normal"><sp/><sp/>dTheta3=dTheta2;dTheta2=dTheta1;dTheta1=dTheta;</highlight></codeline> |
---|
1338 | <codeline lineno="297"><highlight class="normal"><sp/><sp/>dw3=dw2;dw2=dw1;dw1=dw;</highlight></codeline> |
---|
1339 | <codeline lineno="298"><highlight class="normal"></highlight></codeline> |
---|
1340 | <codeline lineno="299"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>calculation<sp/>of<sp/>Isd,<sp/>Isq</highlight><highlight class="normal"></highlight></codeline> |
---|
1341 | <codeline lineno="300"><highlight class="normal"><sp/><sp/>x[6]=x[0]*cos(x[3])+x[1]*sin(x[3]);<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Isd</highlight><highlight class="normal"></highlight></codeline> |
---|
1342 | <codeline lineno="301"><highlight class="normal"><sp/><sp/>x[7]=x[1]*cos(x[3])-x[0]*sin(x[3]);<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Isq</highlight><highlight class="normal"></highlight></codeline> |
---|
1343 | <codeline lineno="302"><highlight class="normal"></highlight></codeline> |
---|
1344 | <codeline lineno="303"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Fsd<sp/>...<sp/>d-component<sp/>of<sp/>stator<sp/>flux</highlight><highlight class="normal"></highlight></codeline> |
---|
1345 | <codeline lineno="304"><highlight class="normal"><sp/><sp/>x[5]=Ls*x[6]+Fmag;</highlight></codeline> |
---|
1346 | <codeline lineno="305"><highlight class="normal"></highlight></codeline> |
---|
1347 | <codeline lineno="306"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Torque</highlight><highlight class="normal"></highlight></codeline> |
---|
1348 | <codeline lineno="307"><highlight class="normal"><sp/><sp/>x[4]=kp*p*Fmag*(x[1]*cos(x[3])-x[0]*sin(x[3]));</highlight></codeline> |
---|
1349 | <codeline lineno="308"><highlight class="normal">}</highlight></codeline> |
---|
1350 | <codeline lineno="309"><highlight class="normal"></highlight></codeline> |
---|
1351 | <codeline lineno="311"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>pmsmsim_step(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ww)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>you<sp/>must<sp/>link<sp/>array<sp/>KalmanObs[]<sp/>to<sp/>EKF<sp/>modul</highlight><highlight class="normal"></highlight></codeline> |
---|
1352 | <codeline lineno="312"><highlight class="normal">{</highlight></codeline> |
---|
1353 | <codeline lineno="313"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Umk,<sp/>ub,<sp/>uc;</highlight></codeline> |
---|
1354 | <codeline lineno="314"><highlight class="normal"></highlight></codeline> |
---|
1355 | <codeline lineno="315"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>while<sp/>(t<=t_end)</highlight><highlight class="normal"></highlight></codeline> |
---|
1356 | <codeline lineno="316"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
1357 | <codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/>pwm(modulace);</highlight></codeline> |
---|
1358 | <codeline lineno="318"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/>*us=KalmanObs[0];<sp/>*(us+1)=KalmanObs[1];</highlight><highlight class="normal"></highlight></codeline> |
---|
1359 | <codeline lineno="319"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/>*us=ualfa;<sp/>*(us+1)=ubeta;</highlight><highlight class="normal"></highlight></codeline> |
---|
1360 | <codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/>pmsm_model(5);</highlight></codeline> |
---|
1361 | <codeline lineno="321"><highlight class="normal"></highlight></codeline> |
---|
1362 | <codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(h_reg_counter>=h_reg_counter_mez)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>pocatek<sp/>ISR</highlight><highlight class="normal"></highlight></codeline> |
---|
1363 | <codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline> |
---|
1364 | <codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>voltages<sp/>and<sp/>measured<sp/>currents<sp/>for<sp/>EKF</highlight><highlight class="normal"></highlight></codeline> |
---|
1365 | <codeline lineno="325"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>Umk=*u*Uc/Ucn;</highlight><highlight class="normal"></highlight></codeline> |
---|
1366 | <codeline lineno="326"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>ualfa=Umk*cos(*(u+1));</highlight><highlight class="normal"></highlight></codeline> |
---|
1367 | <codeline lineno="327"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>ub=Umk*cos(*(u+1)-2./3.*M_PI);</highlight><highlight class="normal"></highlight></codeline> |
---|
1368 | <codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[0]=ualfa;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>usx</highlight><highlight class="normal"></highlight></codeline> |
---|
1369 | <codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//KalmanObs[1]=(ualfa+2.*ub)/sqrt(3.);<sp/><sp/><sp/><sp/>//<sp/>usy</highlight><highlight class="normal"></highlight></codeline> |
---|
1370 | <codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[1]=ubeta;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>usy</highlight><highlight class="normal"></highlight></codeline> |
---|
1371 | <codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
1372 | <codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>real<sp/>sampling<sp/>-<sp/>considered<sp/>transport<sp/>delay<sp/>equal<sp/>to<sp/>the<sp/>sampling<sp/>period</highlight><highlight class="normal"></highlight></codeline> |
---|
1373 | <codeline lineno="333"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/><sp/>KalmanObs[2]=Isx;</highlight></codeline> |
---|
1374 | <codeline lineno="334"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>KalmanObs[3]=Isy;*/</highlight><highlight class="normal"></highlight></codeline> |
---|
1375 | <codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>ideal<sp/>sampling</highlight><highlight class="normal"></highlight></codeline> |
---|
1376 | <codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[2]=x[0];</highlight></codeline> |
---|
1377 | <codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[3]=x[1];</highlight></codeline> |
---|
1378 | <codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
1379 | <codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>diagnostic<sp/>-<sp/>mean<sp/>values<sp/>of<sp/>stator<sp/>voltage<sp/>components<sp/>-<sp/>pwm()</highlight><highlight class="normal"></highlight></codeline> |
---|
1380 | <codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[4]=usx_av;</highlight></codeline> |
---|
1381 | <codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[5]=usy_av;</highlight></codeline> |
---|
1382 | <codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[6]=usxf;</highlight></codeline> |
---|
1383 | <codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[7]=usyf;</highlight></codeline> |
---|
1384 | <codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[8]=isx_av;</highlight></codeline> |
---|
1385 | <codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[9]=isy_av;<sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
1386 | <codeline lineno="346"><highlight class="normal"></highlight></codeline> |
---|
1387 | <codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>vektor_regulace(0,0,Urm_max,Ww,u,Isx,Isy,theta,speed,U_modulace,Uc,Ucn,REZIM_REGULACE);<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>rezim=1<sp/>...<sp/>reg.<sp/>rychlosti,<sp/>rezim=0<sp/>...<sp/>reg.<sp/>momentu</highlight><highlight class="normal"></highlight></codeline> |
---|
1388 | <codeline lineno="348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>rezim=2<sp/>...<sp/>Iqw=sqrt(Imax^2-Idw^2)</highlight><highlight class="normal"></highlight></codeline> |
---|
1389 | <codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>emulation<sp/>of<sp/>the<sp/>real<sp/>sampling<sp/>of<sp/>A/D<sp/>converter</highlight><highlight class="normal"></highlight></codeline> |
---|
1390 | <codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>Isx=x[0];Isy=x[1];speed=x[2];theta=x[3];</highlight></codeline> |
---|
1391 | <codeline lineno="351"><highlight class="normal"></highlight></codeline> |
---|
1392 | <codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>include<sp/>ideal<sp/>commanded<sp/>stator<sp/>voltage<sp/></highlight><highlight class="normal"></highlight></codeline> |
---|
1393 | <codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>Umk=*u*Uc/Ucn;</highlight></codeline> |
---|
1394 | <codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>ualfa=Umk*cos(*(u+1));<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>usx<sp/>=<sp/>usa</highlight><highlight class="normal"></highlight></codeline> |
---|
1395 | <codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>ub=Umk*cos(*(u+1)-2./3.*M_PI);</highlight></codeline> |
---|
1396 | <codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>ubeta=(ualfa+2.*ub)/sqrt(3.);<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>usy</highlight><highlight class="normal"></highlight></codeline> |
---|
1397 | <codeline lineno="357"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>uc=-ualfa-ub;</highlight><highlight class="normal"></highlight></codeline> |
---|
1398 | <codeline lineno="358"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>ubeta=(ub-uc)/sqrt(3.);</highlight><highlight class="normal"></highlight></codeline> |
---|
1399 | <codeline lineno="359"><highlight class="normal"></highlight></codeline> |
---|
1400 | <codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>h_reg_counter=0;</highlight></codeline> |
---|
1401 | <codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
---|
1402 | <codeline lineno="362"><highlight class="normal"></highlight></codeline> |
---|
1403 | <codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/>t+=h;</highlight></codeline> |
---|
1404 | <codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/>h_reg_counter++;</highlight></codeline> |
---|
1405 | <codeline lineno="365"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
1406 | <codeline lineno="366"><highlight class="normal">}</highlight></codeline> |
---|
1407 | </programlisting> |
---|
1408 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp"/> |
---|
1409 | </compounddef> |
---|
1410 | </doxygen> |
---|