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="regulace_8cpp" kind="file"> |
---|
4 | <compoundname>regulace.cpp</compoundname> |
---|
5 | <includes local="no">math.h</includes> |
---|
6 | <includes refid="nastaveni__regulatoru__float_8h" local="yes">nastaveni_regulatoru_float.h</includes> |
---|
7 | <includes refid="regulace_8h" local="yes">regulace.h</includes> |
---|
8 | <incdepgraph> |
---|
9 | <node id="790"> |
---|
10 | <label>regulace.h</label> |
---|
11 | <link refid="regulace_8h-source"/> |
---|
12 | </node> |
---|
13 | <node id="787"> |
---|
14 | <label>work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp</label> |
---|
15 | <link refid="regulace.cpp"/> |
---|
16 | <childnode refid="788" relation="include"> |
---|
17 | </childnode> |
---|
18 | <childnode refid="789" relation="include"> |
---|
19 | </childnode> |
---|
20 | <childnode refid="790" relation="include"> |
---|
21 | </childnode> |
---|
22 | </node> |
---|
23 | <node id="789"> |
---|
24 | <label>nastaveni_regulatoru_float.h</label> |
---|
25 | <link refid="nastaveni__regulatoru__float_8h-source"/> |
---|
26 | </node> |
---|
27 | <node id="788"> |
---|
28 | <label>math.h</label> |
---|
29 | </node> |
---|
30 | </incdepgraph> |
---|
31 | <sectiondef kind="define"> |
---|
32 | <memberdef kind="define" id="regulace_8cpp_1525335710b53cb064ca56b936120431e" prot="public" static="no"> |
---|
33 | <name>_USE_MATH_DEFINES</name> |
---|
34 | <briefdescription> |
---|
35 | </briefdescription> |
---|
36 | <detaileddescription> |
---|
37 | </detaileddescription> |
---|
38 | <inbodydescription> |
---|
39 | </inbodydescription> |
---|
40 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="13" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="13" bodyend="-1"/> |
---|
41 | </memberdef> |
---|
42 | </sectiondef> |
---|
43 | <sectiondef kind="var"> |
---|
44 | <memberdef kind="variable" id="regulace_8cpp_1d326b4d3473dcc30a7320073b1a86411" prot="public" static="yes" mutable="no"> |
---|
45 | <type>double</type> |
---|
46 | <definition>double ud</definition> |
---|
47 | <argsstring></argsstring> |
---|
48 | <name>ud</name> |
---|
49 | <briefdescription> |
---|
50 | </briefdescription> |
---|
51 | <detaileddescription> |
---|
52 | </detaileddescription> |
---|
53 | <inbodydescription> |
---|
54 | </inbodydescription> |
---|
55 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="28" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="28" bodyend="-1"/> |
---|
56 | </memberdef> |
---|
57 | <memberdef kind="variable" id="regulace_8cpp_174352e2af5ca7b52f4e791577b424c37" prot="public" static="yes" mutable="no"> |
---|
58 | <type>double</type> |
---|
59 | <definition>double uq</definition> |
---|
60 | <argsstring></argsstring> |
---|
61 | <name>uq</name> |
---|
62 | <briefdescription> |
---|
63 | </briefdescription> |
---|
64 | <detaileddescription> |
---|
65 | </detaileddescription> |
---|
66 | <inbodydescription> |
---|
67 | </inbodydescription> |
---|
68 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="28" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="28" bodyend="-1"/> |
---|
69 | </memberdef> |
---|
70 | <memberdef kind="variable" id="regulace_8cpp_12c34e6d1341d3ee390071ecaf9411914" prot="public" static="yes" mutable="no"> |
---|
71 | <type>double</type> |
---|
72 | <definition>double alfa</definition> |
---|
73 | <argsstring></argsstring> |
---|
74 | <name>alfa</name> |
---|
75 | <briefdescription> |
---|
76 | </briefdescription> |
---|
77 | <detaileddescription> |
---|
78 | </detaileddescription> |
---|
79 | <inbodydescription> |
---|
80 | </inbodydescription> |
---|
81 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="28" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="28" bodyend="-1"/> |
---|
82 | </memberdef> |
---|
83 | <memberdef kind="variable" id="regulace_8cpp_19424343761f8c4f4c1afe8f5b6bf471b" prot="public" static="yes" mutable="no"> |
---|
84 | <type>double</type> |
---|
85 | <definition>double beta</definition> |
---|
86 | <argsstring></argsstring> |
---|
87 | <name>beta</name> |
---|
88 | <briefdescription> |
---|
89 | </briefdescription> |
---|
90 | <detaileddescription> |
---|
91 | </detaileddescription> |
---|
92 | <inbodydescription> |
---|
93 | </inbodydescription> |
---|
94 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="28" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="28" bodyend="-1"/> |
---|
95 | </memberdef> |
---|
96 | <memberdef kind="variable" id="regulace_8cpp_1a6543b2bc53bf16c6be8dbdfa0c5137c" prot="public" static="yes" mutable="no"> |
---|
97 | <type>double</type> |
---|
98 | <definition>double Sid</definition> |
---|
99 | <argsstring></argsstring> |
---|
100 | <name>Sid</name> |
---|
101 | <briefdescription> |
---|
102 | </briefdescription> |
---|
103 | <detaileddescription> |
---|
104 | </detaileddescription> |
---|
105 | <inbodydescription> |
---|
106 | </inbodydescription> |
---|
107 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="29" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="29" bodyend="-1"/> |
---|
108 | </memberdef> |
---|
109 | <memberdef kind="variable" id="regulace_8cpp_1738b424830c2456934492c1f1ebf8248" prot="public" static="yes" mutable="no"> |
---|
110 | <type>double</type> |
---|
111 | <definition>double Siq</definition> |
---|
112 | <argsstring></argsstring> |
---|
113 | <name>Siq</name> |
---|
114 | <briefdescription> |
---|
115 | </briefdescription> |
---|
116 | <detaileddescription> |
---|
117 | </detaileddescription> |
---|
118 | <inbodydescription> |
---|
119 | </inbodydescription> |
---|
120 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="29" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="29" bodyend="-1"/> |
---|
121 | </memberdef> |
---|
122 | <memberdef kind="variable" id="regulace_8cpp_155885ac468775a6ca90a0f4264404729" prot="public" static="yes" mutable="no"> |
---|
123 | <type>double</type> |
---|
124 | <definition>double Surm</definition> |
---|
125 | <argsstring></argsstring> |
---|
126 | <name>Surm</name> |
---|
127 | <briefdescription> |
---|
128 | </briefdescription> |
---|
129 | <detaileddescription> |
---|
130 | </detaileddescription> |
---|
131 | <inbodydescription> |
---|
132 | </inbodydescription> |
---|
133 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="29" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="29" bodyend="-1"/> |
---|
134 | </memberdef> |
---|
135 | <memberdef kind="variable" id="regulace_8cpp_102eeeeb5f00d724a3c82fb1d4ef8e8ed" prot="public" static="yes" mutable="no"> |
---|
136 | <type>double</type> |
---|
137 | <definition>double Iqwmax</definition> |
---|
138 | <argsstring></argsstring> |
---|
139 | <name>Iqwmax</name> |
---|
140 | <briefdescription> |
---|
141 | </briefdescription> |
---|
142 | <detaileddescription> |
---|
143 | </detaileddescription> |
---|
144 | <inbodydescription> |
---|
145 | </inbodydescription> |
---|
146 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="32" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="32" bodyend="-1"/> |
---|
147 | </memberdef> |
---|
148 | <memberdef kind="variable" id="regulace_8cpp_1d086f926f71e503743270604a5347508" prot="public" static="yes" mutable="no"> |
---|
149 | <type>double</type> |
---|
150 | <definition>double Iqw_reg</definition> |
---|
151 | <argsstring></argsstring> |
---|
152 | <name>Iqw_reg</name> |
---|
153 | <briefdescription> |
---|
154 | </briefdescription> |
---|
155 | <detaileddescription> |
---|
156 | </detaileddescription> |
---|
157 | <inbodydescription> |
---|
158 | </inbodydescription> |
---|
159 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="32" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="32" bodyend="-1"/> |
---|
160 | </memberdef> |
---|
161 | <memberdef kind="variable" id="regulace_8cpp_151a59ff927f4ff0f0676c12e5c894a79" prot="public" static="yes" mutable="no"> |
---|
162 | <type>double</type> |
---|
163 | <definition>double Idw_urm</definition> |
---|
164 | <argsstring></argsstring> |
---|
165 | <name>Idw_urm</name> |
---|
166 | <briefdescription> |
---|
167 | </briefdescription> |
---|
168 | <detaileddescription> |
---|
169 | </detaileddescription> |
---|
170 | <inbodydescription> |
---|
171 | </inbodydescription> |
---|
172 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="33" bodyend="-1"/> |
---|
173 | </memberdef> |
---|
174 | <memberdef kind="variable" id="regulace_8cpp_1fa36cff2636c989fe0fa5c30e14d8d01" prot="public" static="yes" mutable="no"> |
---|
175 | <type>double</type> |
---|
176 | <definition>double Sw</definition> |
---|
177 | <argsstring></argsstring> |
---|
178 | <name>Sw</name> |
---|
179 | <briefdescription> |
---|
180 | </briefdescription> |
---|
181 | <detaileddescription> |
---|
182 | </detaileddescription> |
---|
183 | <inbodydescription> |
---|
184 | </inbodydescription> |
---|
185 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="36" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="36" bodyend="-1"/> |
---|
186 | </memberdef> |
---|
187 | <memberdef kind="variable" id="regulace_8cpp_16adf77edbad3c6c9a69c0f2b7c9ab99a" prot="public" static="yes" mutable="no"> |
---|
188 | <type>double</type> |
---|
189 | <definition>double U</definition> |
---|
190 | <argsstring></argsstring> |
---|
191 | <name>U</name> |
---|
192 | <briefdescription> |
---|
193 | </briefdescription> |
---|
194 | <detaileddescription> |
---|
195 | </detaileddescription> |
---|
196 | <inbodydescription> |
---|
197 | </inbodydescription> |
---|
198 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="38" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="38" bodyend="-1"/> |
---|
199 | </memberdef> |
---|
200 | <memberdef kind="variable" id="regulace_8cpp_1861a0366ee90e5e1cf56cafe74ddaabe" prot="public" static="yes" mutable="no"> |
---|
201 | <type>double</type> |
---|
202 | <definition>double Um</definition> |
---|
203 | <argsstring></argsstring> |
---|
204 | <name>Um</name> |
---|
205 | <briefdescription> |
---|
206 | </briefdescription> |
---|
207 | <detaileddescription> |
---|
208 | </detaileddescription> |
---|
209 | <inbodydescription> |
---|
210 | </inbodydescription> |
---|
211 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="39" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="39" bodyend="-1"/> |
---|
212 | </memberdef> |
---|
213 | <memberdef kind="variable" id="regulace_8cpp_1e490ab2f2d71bb4fbe86fe8a62a60aeb" prot="public" static="yes" mutable="no"> |
---|
214 | <type>double</type> |
---|
215 | <definition>double Urmf</definition> |
---|
216 | <argsstring></argsstring> |
---|
217 | <name>Urmf</name> |
---|
218 | <briefdescription> |
---|
219 | </briefdescription> |
---|
220 | <detaileddescription> |
---|
221 | </detaileddescription> |
---|
222 | <inbodydescription> |
---|
223 | </inbodydescription> |
---|
224 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="39" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="39" bodyend="-1"/> |
---|
225 | </memberdef> |
---|
226 | <memberdef kind="variable" id="regulace_8cpp_104c723a40b1200dacfcdcaaf51bbf5a4" prot="public" static="yes" mutable="no"> |
---|
227 | <type>double</type> |
---|
228 | <definition>double Kodv_ud</definition> |
---|
229 | <argsstring></argsstring> |
---|
230 | <name>Kodv_ud</name> |
---|
231 | <briefdescription> |
---|
232 | </briefdescription> |
---|
233 | <detaileddescription> |
---|
234 | </detaileddescription> |
---|
235 | <inbodydescription> |
---|
236 | </inbodydescription> |
---|
237 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="42" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="42" bodyend="-1"/> |
---|
238 | </memberdef> |
---|
239 | <memberdef kind="variable" id="regulace_8cpp_12a8671331ef13ec24076a290487409d5" prot="public" static="yes" mutable="no"> |
---|
240 | <type>double</type> |
---|
241 | <definition>double Kodv_uind</definition> |
---|
242 | <argsstring></argsstring> |
---|
243 | <name>Kodv_uind</name> |
---|
244 | <briefdescription> |
---|
245 | </briefdescription> |
---|
246 | <detaileddescription> |
---|
247 | </detaileddescription> |
---|
248 | <inbodydescription> |
---|
249 | </inbodydescription> |
---|
250 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="42" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="42" bodyend="-1"/> |
---|
251 | </memberdef> |
---|
252 | <memberdef kind="variable" id="regulace_8cpp_1d900a67bffe289dfbb015b908a2d1685" prot="public" static="yes" mutable="no"> |
---|
253 | <type>double</type> |
---|
254 | <definition>double Isd</definition> |
---|
255 | <argsstring></argsstring> |
---|
256 | <name>Isd</name> |
---|
257 | <briefdescription> |
---|
258 | </briefdescription> |
---|
259 | <detaileddescription> |
---|
260 | </detaileddescription> |
---|
261 | <inbodydescription> |
---|
262 | </inbodydescription> |
---|
263 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="44" bodyend="-1"/> |
---|
264 | </memberdef> |
---|
265 | <memberdef kind="variable" id="regulace_8cpp_11c6d368fcf2a6b1c92e39c124d25d737" prot="public" static="yes" mutable="no"> |
---|
266 | <type>double</type> |
---|
267 | <definition>double Isq</definition> |
---|
268 | <argsstring></argsstring> |
---|
269 | <name>Isq</name> |
---|
270 | <briefdescription> |
---|
271 | </briefdescription> |
---|
272 | <detaileddescription> |
---|
273 | </detaileddescription> |
---|
274 | <inbodydescription> |
---|
275 | </inbodydescription> |
---|
276 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="44" bodyend="-1"/> |
---|
277 | </memberdef> |
---|
278 | <memberdef kind="variable" id="regulace_8cpp_1faeae9ee7305d7ca47b2707b9e1823ca" prot="public" static="yes" mutable="no"> |
---|
279 | <type>double</type> |
---|
280 | <definition>double Fs</definition> |
---|
281 | <argsstring></argsstring> |
---|
282 | <name>Fs</name> |
---|
283 | <briefdescription> |
---|
284 | </briefdescription> |
---|
285 | <detaileddescription> |
---|
286 | </detaileddescription> |
---|
287 | <inbodydescription> |
---|
288 | </inbodydescription> |
---|
289 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="44" bodyend="-1"/> |
---|
290 | </memberdef> |
---|
291 | <memberdef kind="variable" id="regulace_8cpp_1558972170606cd05054ab130beabad1e" prot="public" static="yes" mutable="no"> |
---|
292 | <type>double</type> |
---|
293 | <definition>double Fmag</definition> |
---|
294 | <argsstring></argsstring> |
---|
295 | <name>Fmag</name> |
---|
296 | <briefdescription> |
---|
297 | </briefdescription> |
---|
298 | <detaileddescription> |
---|
299 | </detaileddescription> |
---|
300 | <inbodydescription> |
---|
301 | </inbodydescription> |
---|
302 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="44" bodyend="-1"/> |
---|
303 | </memberdef> |
---|
304 | <memberdef kind="variable" id="regulace_8cpp_115f09e12710588f190ffb75c32fd70e4" prot="public" static="yes" mutable="no"> |
---|
305 | <type>double</type> |
---|
306 | <definition>double moment</definition> |
---|
307 | <argsstring></argsstring> |
---|
308 | <name>moment</name> |
---|
309 | <briefdescription> |
---|
310 | </briefdescription> |
---|
311 | <detaileddescription> |
---|
312 | </detaileddescription> |
---|
313 | <inbodydescription> |
---|
314 | </inbodydescription> |
---|
315 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="44" bodyend="-1"/> |
---|
316 | </memberdef> |
---|
317 | <memberdef kind="variable" id="regulace_8cpp_1bad4eebf61961d8f4731374800617981" prot="public" static="yes" mutable="no"> |
---|
318 | <type>double</type> |
---|
319 | <definition>double K_Fs</definition> |
---|
320 | <argsstring></argsstring> |
---|
321 | <name>K_Fs</name> |
---|
322 | <briefdescription> |
---|
323 | </briefdescription> |
---|
324 | <detaileddescription> |
---|
325 | </detaileddescription> |
---|
326 | <inbodydescription> |
---|
327 | </inbodydescription> |
---|
328 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="44" bodyend="-1"/> |
---|
329 | </memberdef> |
---|
330 | <memberdef kind="variable" id="regulace_8cpp_111a8f4d80b873b7ecfe5daf87b96c89a" prot="public" static="yes" mutable="no"> |
---|
331 | <type>double</type> |
---|
332 | <definition>double K_moment</definition> |
---|
333 | <argsstring></argsstring> |
---|
334 | <name>K_moment</name> |
---|
335 | <briefdescription> |
---|
336 | </briefdescription> |
---|
337 | <detaileddescription> |
---|
338 | </detaileddescription> |
---|
339 | <inbodydescription> |
---|
340 | </inbodydescription> |
---|
341 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="44" bodyend="-1"/> |
---|
342 | </memberdef> |
---|
343 | <memberdef kind="variable" id="regulace_8cpp_1549a89c8114ff1e3d28010e2e1d3d862" prot="public" static="yes" mutable="no"> |
---|
344 | <type>double</type> |
---|
345 | <definition>double Ismaxf2</definition> |
---|
346 | <argsstring></argsstring> |
---|
347 | <name>Ismaxf2</name> |
---|
348 | <briefdescription> |
---|
349 | </briefdescription> |
---|
350 | <detaileddescription> |
---|
351 | </detaileddescription> |
---|
352 | <inbodydescription> |
---|
353 | </inbodydescription> |
---|
354 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="45" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="45" bodyend="-1"/> |
---|
355 | </memberdef> |
---|
356 | <memberdef kind="variable" id="regulace_8cpp_1a3378773e6dd84aeb1bcf451ba1d9025" prot="public" static="yes" mutable="no"> |
---|
357 | <type>double</type> |
---|
358 | <definition>double tmp_omezeni</definition> |
---|
359 | <argsstring></argsstring> |
---|
360 | <name>tmp_omezeni</name> |
---|
361 | <briefdescription> |
---|
362 | </briefdescription> |
---|
363 | <detaileddescription> |
---|
364 | </detaileddescription> |
---|
365 | <inbodydescription> |
---|
366 | </inbodydescription> |
---|
367 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="45" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="45" bodyend="-1"/> |
---|
368 | </memberdef> |
---|
369 | <memberdef kind="variable" id="regulace_8cpp_18bf8016d7dc5deb088c84616ca363fbc" prot="public" static="no" mutable="no"> |
---|
370 | <type>double</type> |
---|
371 | <definition>double Treg</definition> |
---|
372 | <argsstring></argsstring> |
---|
373 | <name>Treg</name> |
---|
374 | <briefdescription> |
---|
375 | </briefdescription> |
---|
376 | <detaileddescription> |
---|
377 | </detaileddescription> |
---|
378 | <inbodydescription> |
---|
379 | </inbodydescription> |
---|
380 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="47" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="47" bodyend="-1"/> |
---|
381 | </memberdef> |
---|
382 | </sectiondef> |
---|
383 | <sectiondef kind="func"> |
---|
384 | <memberdef kind="function" id="regulace_8cpp_1f1ab9d3fe7fb20fb6b2e7585725e72ea" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
385 | <type>void</type> |
---|
386 | <definition>void init_regulace</definition> |
---|
387 | <argsstring>(double Ls, double Fpm, double kp, double p, double TV)</argsstring> |
---|
388 | <name>init_regulace</name> |
---|
389 | <param> |
---|
390 | <type>double</type> |
---|
391 | <declname>Ls</declname> |
---|
392 | </param> |
---|
393 | <param> |
---|
394 | <type>double</type> |
---|
395 | <declname>Fpm</declname> |
---|
396 | </param> |
---|
397 | <param> |
---|
398 | <type>double</type> |
---|
399 | <declname>kp</declname> |
---|
400 | </param> |
---|
401 | <param> |
---|
402 | <type>double</type> |
---|
403 | <declname>p</declname> |
---|
404 | </param> |
---|
405 | <param> |
---|
406 | <type>double</type> |
---|
407 | <declname>TV</declname> |
---|
408 | </param> |
---|
409 | <briefdescription> |
---|
410 | </briefdescription> |
---|
411 | <detaileddescription> |
---|
412 | </detaileddescription> |
---|
413 | <inbodydescription> |
---|
414 | </inbodydescription> |
---|
415 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="20"/> |
---|
416 | </memberdef> |
---|
417 | <memberdef kind="function" id="regulace_8cpp_171d09500b31dfce56234053b946cbf34" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
418 | <type>void</type> |
---|
419 | <definition>void vektor_regulace</definition> |
---|
420 | <argsstring>(double Idw, double Iqw, double Urm_max, double Ww, double *u, double Isx, double Isy, double theta, double rychlost, double Ucn_2, double Uc, double Ucn, unsigned int rezim)</argsstring> |
---|
421 | <name>vektor_regulace</name> |
---|
422 | <param> |
---|
423 | <type>double</type> |
---|
424 | <declname>Idw</declname> |
---|
425 | </param> |
---|
426 | <param> |
---|
427 | <type>double</type> |
---|
428 | <declname>Iqw</declname> |
---|
429 | </param> |
---|
430 | <param> |
---|
431 | <type>double</type> |
---|
432 | <declname>Urm_max</declname> |
---|
433 | </param> |
---|
434 | <param> |
---|
435 | <type>double</type> |
---|
436 | <declname>Ww</declname> |
---|
437 | </param> |
---|
438 | <param> |
---|
439 | <type>double *</type> |
---|
440 | <declname>u</declname> |
---|
441 | </param> |
---|
442 | <param> |
---|
443 | <type>double</type> |
---|
444 | <declname>Isx</declname> |
---|
445 | </param> |
---|
446 | <param> |
---|
447 | <type>double</type> |
---|
448 | <declname>Isy</declname> |
---|
449 | </param> |
---|
450 | <param> |
---|
451 | <type>double</type> |
---|
452 | <declname>theta</declname> |
---|
453 | </param> |
---|
454 | <param> |
---|
455 | <type>double</type> |
---|
456 | <declname>rychlost</declname> |
---|
457 | </param> |
---|
458 | <param> |
---|
459 | <type>double</type> |
---|
460 | <declname>Ucn_2</declname> |
---|
461 | </param> |
---|
462 | <param> |
---|
463 | <type>double</type> |
---|
464 | <declname>Uc</declname> |
---|
465 | </param> |
---|
466 | <param> |
---|
467 | <type>double</type> |
---|
468 | <declname>Ucn</declname> |
---|
469 | </param> |
---|
470 | <param> |
---|
471 | <type>unsigned int</type> |
---|
472 | <declname>rezim</declname> |
---|
473 | </param> |
---|
474 | <briefdescription> |
---|
475 | </briefdescription> |
---|
476 | <detaileddescription> |
---|
477 | </detaileddescription> |
---|
478 | <inbodydescription> |
---|
479 | </inbodydescription> |
---|
480 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="21"/> |
---|
481 | </memberdef> |
---|
482 | <memberdef kind="function" id="regulace_8cpp_1154c64d72d9a6e1e1d5621c6561372eb" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
483 | <type>double</type> |
---|
484 | <definition>double pi_reg</definition> |
---|
485 | <argsstring>(double epsilon, double Kpf, double Kif, double MAX, double MIN, double *S)</argsstring> |
---|
486 | <name>pi_reg</name> |
---|
487 | <param> |
---|
488 | <type>double</type> |
---|
489 | <declname>epsilon</declname> |
---|
490 | </param> |
---|
491 | <param> |
---|
492 | <type>double</type> |
---|
493 | <declname>Kpf</declname> |
---|
494 | </param> |
---|
495 | <param> |
---|
496 | <type>double</type> |
---|
497 | <declname>Kif</declname> |
---|
498 | </param> |
---|
499 | <param> |
---|
500 | <type>double</type> |
---|
501 | <declname>MAX</declname> |
---|
502 | </param> |
---|
503 | <param> |
---|
504 | <type>double</type> |
---|
505 | <declname>MIN</declname> |
---|
506 | </param> |
---|
507 | <param> |
---|
508 | <type>double *</type> |
---|
509 | <declname>S</declname> |
---|
510 | </param> |
---|
511 | <briefdescription> |
---|
512 | </briefdescription> |
---|
513 | <detaileddescription> |
---|
514 | </detaileddescription> |
---|
515 | <inbodydescription> |
---|
516 | </inbodydescription> |
---|
517 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="23" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="67" bodyend="78"/> |
---|
518 | </memberdef> |
---|
519 | <memberdef kind="function" id="regulace_8cpp_1d52cd3d5f2f7c2561b9d318c3d9e66a8" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
520 | <type>double</type> |
---|
521 | <definition>double uhel</definition> |
---|
522 | <argsstring>(double x, double y)</argsstring> |
---|
523 | <name>uhel</name> |
---|
524 | <param> |
---|
525 | <type>double</type> |
---|
526 | <declname>x</declname> |
---|
527 | </param> |
---|
528 | <param> |
---|
529 | <type>double</type> |
---|
530 | <declname>y</declname> |
---|
531 | </param> |
---|
532 | <briefdescription> |
---|
533 | </briefdescription> |
---|
534 | <detaileddescription> |
---|
535 | </detaileddescription> |
---|
536 | <inbodydescription> |
---|
537 | </inbodydescription> |
---|
538 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="24" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="50" bodyend="64"/> |
---|
539 | </memberdef> |
---|
540 | <memberdef kind="function" id="regulace_8cpp_1355f57120e187949afdadc570d5c5bd6" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
541 | <type>void</type> |
---|
542 | <definition>void filtr</definition> |
---|
543 | <argsstring>(double U, double *Uf, double kt)</argsstring> |
---|
544 | <name>filtr</name> |
---|
545 | <param> |
---|
546 | <type>double</type> |
---|
547 | <declname>U</declname> |
---|
548 | </param> |
---|
549 | <param> |
---|
550 | <type>double *</type> |
---|
551 | <declname>Uf</declname> |
---|
552 | </param> |
---|
553 | <param> |
---|
554 | <type>double</type> |
---|
555 | <declname>kt</declname> |
---|
556 | </param> |
---|
557 | <briefdescription> |
---|
558 | </briefdescription> |
---|
559 | <detaileddescription> |
---|
560 | </detaileddescription> |
---|
561 | <inbodydescription> |
---|
562 | </inbodydescription> |
---|
563 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" line="25" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp" bodystart="80" bodyend="86"/> |
---|
564 | </memberdef> |
---|
565 | </sectiondef> |
---|
566 | <briefdescription> |
---|
567 | </briefdescription> |
---|
568 | <detaileddescription> |
---|
569 | </detaileddescription> |
---|
570 | <programlisting> |
---|
571 | <codeline lineno="1"><highlight class="comment">/********************************************</highlight></codeline> |
---|
572 | <codeline lineno="2"><highlight class="comment"></highlight></codeline> |
---|
573 | <codeline lineno="3"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Vector<sp/>control<sp/>of<sp/>PMSM<sp/>Drive</highlight></codeline> |
---|
574 | <codeline lineno="4"><highlight class="comment"></highlight></codeline> |
---|
575 | <codeline lineno="5"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Control<sp/>-<sp/>floating<sp/>point</highlight></codeline> |
---|
576 | <codeline lineno="6"><highlight class="comment"></highlight></codeline> |
---|
577 | <codeline lineno="7"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Z.<sp/>Peroutka</highlight></codeline> |
---|
578 | <codeline lineno="8"><highlight class="comment"></highlight></codeline> |
---|
579 | <codeline lineno="9"><highlight class="comment">Rev.<sp/>16.3.2008</highlight></codeline> |
---|
580 | <codeline lineno="10"><highlight class="comment"></highlight></codeline> |
---|
581 | <codeline lineno="11"><highlight class="comment">*********************************************/</highlight><highlight class="normal"></highlight></codeline> |
---|
582 | <codeline lineno="12"><highlight class="normal"></highlight></codeline> |
---|
583 | <codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>_USE_MATH_DEFINES</highlight></codeline> |
---|
584 | <codeline lineno="14"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> |
---|
585 | <codeline lineno="15"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><math.h></highlight><highlight class="normal"></highlight></codeline> |
---|
586 | <codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"nastaveni_regulatoru_float.h"</highlight><highlight class="normal"></highlight></codeline> |
---|
587 | <codeline lineno="17"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"regulace.h"</highlight><highlight class="normal"></highlight></codeline> |
---|
588 | <codeline lineno="18"><highlight class="normal"></highlight></codeline> |
---|
589 | <codeline lineno="19"><highlight class="normal"></highlight></codeline> |
---|
590 | <codeline lineno="20"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>init_regulace(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ls,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Fpm,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>kp,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>p,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>TV);</highlight></codeline> |
---|
591 | <codeline lineno="21"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>vektor_regulace(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Idw,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Iqw,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Urm_max,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ww,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*u,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isx,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isy,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>theta,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>rychlost,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucn_2,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Uc,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucn,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rezim);</highlight></codeline> |
---|
592 | <codeline lineno="22"><highlight class="normal"></highlight></codeline> |
---|
593 | <codeline lineno="23"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>pi_reg(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>epsilon,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kpf,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kif,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>MAX,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>MIN,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*S);</highlight></codeline> |
---|
594 | <codeline lineno="24"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>uhel(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>x,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>y);</highlight></codeline> |
---|
595 | <codeline lineno="25"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>filtr(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>U,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*Uf,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>kt);</highlight></codeline> |
---|
596 | <codeline lineno="26"><highlight class="normal"></highlight></codeline> |
---|
597 | <codeline lineno="27"><highlight class="normal"></highlight><highlight class="comment">//<sp/>regulatory<sp/>proudu</highlight><highlight class="normal"></highlight></codeline> |
---|
598 | <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/>ud,<sp/>uq,<sp/>alfa,<sp/>beta;</highlight></codeline> |
---|
599 | <codeline lineno="29"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Sid,<sp/>Siq,<sp/>Surm;</highlight></codeline> |
---|
600 | <codeline lineno="30"><highlight class="normal"></highlight></codeline> |
---|
601 | <codeline lineno="31"><highlight class="normal"></highlight><highlight class="comment">//<sp/>omezeni<sp/>momentu</highlight><highlight class="normal"></highlight></codeline> |
---|
602 | <codeline lineno="32"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Iqwmax,<sp/>Iqw_reg;</highlight></codeline> |
---|
603 | <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/>Idw_urm;</highlight></codeline> |
---|
604 | <codeline lineno="34"><highlight class="normal"></highlight></codeline> |
---|
605 | <codeline lineno="35"><highlight class="normal"></highlight><highlight class="comment">//<sp/>regulator<sp/>rychlosti</highlight><highlight class="normal"></highlight></codeline> |
---|
606 | <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/>Sw;</highlight></codeline> |
---|
607 | <codeline lineno="37"><highlight class="normal"></highlight></codeline> |
---|
608 | <codeline lineno="38"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>U;</highlight></codeline> |
---|
609 | <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/>Um,<sp/>Urmf;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>velikost<sp/>napeti</highlight><highlight class="normal"></highlight></codeline> |
---|
610 | <codeline lineno="40"><highlight class="normal"></highlight></codeline> |
---|
611 | <codeline lineno="41"><highlight class="normal"></highlight><highlight class="comment">//<sp/>odvazbovaci<sp/>obvod<sp/>-<sp/>blok<sp/>vypocet<sp/>napeti</highlight><highlight class="normal"></highlight></codeline> |
---|
612 | <codeline lineno="42"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kodv_ud,<sp/>Kodv_uind;</highlight></codeline> |
---|
613 | <codeline lineno="43"><highlight class="normal"></highlight></codeline> |
---|
614 | <codeline lineno="44"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isd,<sp/>Isq,<sp/>Fs,<sp/>Fmag,<sp/>moment,<sp/>K_Fs,<sp/>K_moment;</highlight></codeline> |
---|
615 | <codeline lineno="45"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ismaxf2,<sp/>tmp_omezeni;</highlight></codeline> |
---|
616 | <codeline lineno="46"><highlight class="normal"></highlight></codeline> |
---|
617 | <codeline lineno="47"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Treg;</highlight></codeline> |
---|
618 | <codeline lineno="48"><highlight class="normal"></highlight></codeline> |
---|
619 | <codeline lineno="50"><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>uhel(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>x,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>y)</highlight></codeline> |
---|
620 | <codeline lineno="51"><highlight class="normal">{</highlight></codeline> |
---|
621 | <codeline lineno="52"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>th;</highlight></codeline> |
---|
622 | <codeline lineno="53"><highlight class="normal"></highlight></codeline> |
---|
623 | <codeline lineno="54"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x==0)</highlight></codeline> |
---|
624 | <codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(y==0)<sp/>th=0.;</highlight></codeline> |
---|
625 | <codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(y>0)<sp/>th=M_PI/2.;</highlight></codeline> |
---|
626 | <codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>th=-M_PI/2.;</highlight></codeline> |
---|
627 | <codeline lineno="58"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
628 | <codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/>th=atan(y/x);</highlight></codeline> |
---|
629 | <codeline lineno="60"><highlight class="normal"></highlight></codeline> |
---|
630 | <codeline lineno="61"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x<0)<sp/>th+=M_PI;</highlight></codeline> |
---|
631 | <codeline lineno="62"><highlight class="normal"></highlight></codeline> |
---|
632 | <codeline lineno="63"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>th;</highlight></codeline> |
---|
633 | <codeline lineno="64"><highlight class="normal">}</highlight></codeline> |
---|
634 | <codeline lineno="65"><highlight class="normal"></highlight></codeline> |
---|
635 | <codeline lineno="66"><highlight class="normal"></highlight></codeline> |
---|
636 | <codeline lineno="67"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>pi_reg(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>epsilon,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kpf,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kif,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>MAX,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>MIN,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*S)</highlight></codeline> |
---|
637 | <codeline lineno="68"><highlight class="normal">{</highlight></codeline> |
---|
638 | <codeline lineno="69"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>out;</highlight></codeline> |
---|
639 | <codeline lineno="70"><highlight class="normal"></highlight></codeline> |
---|
640 | <codeline lineno="71"><highlight class="normal"><sp/><sp/>out=Kpf*epsilon+*S;</highlight></codeline> |
---|
641 | <codeline lineno="72"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(out>MAX)<sp/>out=MAX;</highlight></codeline> |
---|
642 | <codeline lineno="73"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(out<MIN)<sp/>out=MIN;</highlight></codeline> |
---|
643 | <codeline lineno="74"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
644 | <codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/>*S+=Kif*epsilon;</highlight></codeline> |
---|
645 | <codeline lineno="76"><highlight class="normal"></highlight></codeline> |
---|
646 | <codeline lineno="77"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>out;</highlight></codeline> |
---|
647 | <codeline lineno="78"><highlight class="normal">}</highlight></codeline> |
---|
648 | <codeline lineno="79"><highlight class="normal"></highlight></codeline> |
---|
649 | <codeline lineno="80"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>filtr(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>U,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*Uf,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>kt)</highlight></codeline> |
---|
650 | <codeline lineno="81"><highlight class="normal">{</highlight></codeline> |
---|
651 | <codeline lineno="82"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ufpom;</highlight></codeline> |
---|
652 | <codeline lineno="83"><highlight class="normal"></highlight></codeline> |
---|
653 | <codeline lineno="84"><highlight class="normal"><sp/><sp/>Ufpom=*Uf;</highlight></codeline> |
---|
654 | <codeline lineno="85"><highlight class="normal"><sp/><sp/>*Uf=Ufpom+kt*(U-*Uf);</highlight></codeline> |
---|
655 | <codeline lineno="86"><highlight class="normal">}</highlight></codeline> |
---|
656 | <codeline lineno="87"><highlight class="normal"></highlight></codeline> |
---|
657 | <codeline lineno="89"><highlight class="normal"></highlight></codeline> |
---|
658 | <codeline lineno="90"><highlight class="normal"></highlight></codeline> |
---|
659 | <codeline lineno="91"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>init_regulace(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ls,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Fpm,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>kp,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>p,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>TV)</highlight></codeline> |
---|
660 | <codeline lineno="92"><highlight class="normal">{</highlight></codeline> |
---|
661 | <codeline lineno="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kpd;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>pomocna<sp/>velicina</highlight><highlight class="normal"></highlight></codeline> |
---|
662 | <codeline lineno="94"><highlight class="normal"></highlight></codeline> |
---|
663 | <codeline lineno="95"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>parametry<sp/>pro<sp/>odvazbeni</highlight><highlight class="normal"></highlight></codeline> |
---|
664 | <codeline lineno="96"><highlight class="normal"><sp/><sp/>Fmag=Fpm;</highlight></codeline> |
---|
665 | <codeline lineno="97"><highlight class="normal"></highlight></codeline> |
---|
666 | <codeline lineno="98"><highlight class="normal"><sp/><sp/>Sid=0;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>nulovani<sp/>integracni<sp/>slozky</highlight><highlight class="normal"></highlight></codeline> |
---|
667 | <codeline lineno="99"><highlight class="normal"><sp/><sp/>Siq=0;</highlight></codeline> |
---|
668 | <codeline lineno="100"><highlight class="normal"></highlight></codeline> |
---|
669 | <codeline lineno="101"><highlight class="normal"><sp/><sp/>Surm=0;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>nulovani<sp/>integracni<sp/>slozky</highlight><highlight class="normal"></highlight></codeline> |
---|
670 | <codeline lineno="102"><highlight class="normal"><sp/><sp/>Urmf=0;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>filtrovane<sp/>napeti<sp/>Urm</highlight><highlight class="normal"></highlight></codeline> |
---|
671 | <codeline lineno="103"><highlight class="normal"></highlight></codeline> |
---|
672 | <codeline lineno="104"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>omezeni<sp/>momentu<sp/>kvuli<sp/>momentu<sp/>zvratu<sp/>-<sp/>omezeni<sp/>pomoci<sp/>frmax</highlight><highlight class="normal"></highlight></codeline> |
---|
673 | <codeline lineno="105"><highlight class="normal"><sp/><sp/>Ismaxf2=Ismax*Ismax;</highlight></codeline> |
---|
674 | <codeline lineno="106"><highlight class="normal"></highlight></codeline> |
---|
675 | <codeline lineno="107"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>blok<sp/>VYPOCET<sp/>NAPETI</highlight><highlight class="normal"></highlight></codeline> |
---|
676 | <codeline lineno="108"><highlight class="normal"><sp/><sp/>Kodv_ud=Ls;</highlight></codeline> |
---|
677 | <codeline lineno="109"><highlight class="normal"><sp/><sp/>Kodv_uind=Fmag;</highlight></codeline> |
---|
678 | <codeline lineno="110"><highlight class="normal"></highlight></codeline> |
---|
679 | <codeline lineno="111"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulator<sp/>rychlosti</highlight><highlight class="normal"></highlight></codeline> |
---|
680 | <codeline lineno="112"><highlight class="normal"><sp/><sp/>Sw=0;</highlight></codeline> |
---|
681 | <codeline lineno="113"><highlight class="normal"></highlight></codeline> |
---|
682 | <codeline lineno="114"><highlight class="normal"><sp/><sp/>Treg=TV;</highlight></codeline> |
---|
683 | <codeline lineno="115"><highlight class="normal">}</highlight></codeline> |
---|
684 | <codeline lineno="116"><highlight class="normal"></highlight></codeline> |
---|
685 | <codeline lineno="117"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>vektor_regulace(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Idw,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Iqw,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Urm_max,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ww,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*u,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isx,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isy,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>theta,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>rychlost,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucn_2,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Uc,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucn,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rezim)</highlight></codeline> |
---|
686 | <codeline lineno="118"><highlight class="normal">{</highlight></codeline> |
---|
687 | <codeline lineno="119"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>Isd,<sp/>Isq</highlight><highlight class="normal"></highlight></codeline> |
---|
688 | <codeline lineno="120"><highlight class="normal"><sp/><sp/>Isd=Isx*cos(theta)+Isy*sin(theta);</highlight></codeline> |
---|
689 | <codeline lineno="121"><highlight class="normal"><sp/><sp/>Isq=Isy*cos(theta)-Isx*sin(theta);</highlight></codeline> |
---|
690 | <codeline lineno="122"><highlight class="normal"></highlight></codeline> |
---|
691 | <codeline lineno="123"><highlight class="normal"><sp/><sp/>Iqw_reg=pi_reg(Ww-rychlost,Kpw,Kpw*Treg/Tiw,MAXw,-MAXw,&Sw);</highlight></codeline> |
---|
692 | <codeline lineno="124"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rezim==0)</highlight></codeline> |
---|
693 | <codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/>Iqw_reg=Iqw;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>vyrazeni<sp/>reg.<sp/>rychlosti</highlight><highlight class="normal"></highlight></codeline> |
---|
694 | <codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rezim==2)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>zkouska<sp/>max.<sp/>momentu</highlight><highlight class="normal"></highlight></codeline> |
---|
695 | <codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/>Iqw_reg=Iqwmax;<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Iqw<sp/>=<sp/>sqrt(Imax^2-Idw^2)</highlight><highlight class="normal"></highlight></codeline> |
---|
696 | <codeline lineno="128"><highlight class="normal"></highlight></codeline> |
---|
697 | <codeline lineno="129"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Regulator<sp/>odbuzovani</highlight><highlight class="normal"></highlight></codeline> |
---|
698 | <codeline lineno="130"><highlight class="normal"><sp/><sp/>Idw_urm=pi_reg(Urm_max-Urmf,Kpurm,Kpurm*Treg/Tiurm,0.,MINurm,&Surm);</highlight></codeline> |
---|
699 | <codeline lineno="131"><highlight class="normal"></highlight></codeline> |
---|
700 | <codeline lineno="132"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulace<sp/>proudu<sp/>Id,<sp/>Iq</highlight><highlight class="normal"></highlight></codeline> |
---|
701 | <codeline lineno="133"><highlight class="normal"><sp/><sp/>ud=pi_reg(Idw_urm-Isd,Kpi,Kpi*Treg/Tii,MAXi,-MAXi,&Sid);</highlight></codeline> |
---|
702 | <codeline lineno="134"><highlight class="normal"></highlight></codeline> |
---|
703 | <codeline lineno="135"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>omezeni<sp/>max.<sp/>momentu<sp/>(resp.<sp/>max.<sp/>Iqw)<sp/>s<sp/>ohledem<sp/>na<sp/>max.<sp/>proud</highlight><highlight class="normal"></highlight></codeline> |
---|
704 | <codeline lineno="136"><highlight class="normal"><sp/><sp/>tmp_omezeni=Ismaxf2-Idw_urm*Idw_urm;</highlight></codeline> |
---|
705 | <codeline lineno="137"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_omezeni<0)<sp/>Iqwmax=0;</highlight></codeline> |
---|
706 | <codeline lineno="138"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>Iqwmax=sqrt(tmp_omezeni);</highlight></codeline> |
---|
707 | <codeline lineno="139"><highlight class="normal"></highlight></codeline> |
---|
708 | <codeline lineno="140"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Iqw_reg>Iqwmax)<sp/>Iqw_reg=Iqwmax;</highlight></codeline> |
---|
709 | <codeline lineno="141"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Iqw_reg<-Iqwmax)<sp/>Iqw_reg=-Iqwmax;</highlight></codeline> |
---|
710 | <codeline lineno="142"><highlight class="normal"><sp/><sp/>uq=pi_reg(Iqw_reg-Isq,Kpi,Kpi*Treg/Tii,MAXi,-MAXi,&Siq);</highlight></codeline> |
---|
711 | <codeline lineno="143"><highlight class="normal"></highlight></codeline> |
---|
712 | <codeline lineno="145"><highlight class="normal"><sp/><sp/>ud-=Kodv_ud*rychlost*Iqw_reg;</highlight></codeline> |
---|
713 | <codeline lineno="146"><highlight class="normal"><sp/><sp/>uq+=Kodv_ud*rychlost*Idw_urm+Kodv_uind*rychlost;</highlight></codeline> |
---|
714 | <codeline lineno="147"><highlight class="normal"></highlight></codeline> |
---|
715 | <codeline lineno="148"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>omezeni<sp/>-<sp/>saturace<sp/>napeti<sp/>-<sp/>stejne<sp/>omezeni<sp/>jako<sp/>u<sp/>reg.<sp/>proudu</highlight><highlight class="normal"></highlight></codeline> |
---|
716 | <codeline lineno="149"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ud>MAXi)<sp/>ud=MAXi;</highlight></codeline> |
---|
717 | <codeline lineno="150"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ud<-MAXi)<sp/>ud=-MAXi;</highlight></codeline> |
---|
718 | <codeline lineno="151"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(uq>MAXi)<sp/>uq=MAXi;</highlight></codeline> |
---|
719 | <codeline lineno="152"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(uq<-MAXi)<sp/>uq=-MAXi;</highlight></codeline> |
---|
720 | <codeline lineno="153"><highlight class="normal"></highlight></codeline> |
---|
721 | <codeline lineno="155"><highlight class="normal"></highlight></codeline> |
---|
722 | <codeline lineno="156"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>velikost<sp/>a<sp/>poloha<sp/>vektoru<sp/>napeti</highlight><highlight class="normal"></highlight></codeline> |
---|
723 | <codeline lineno="157"><highlight class="normal"><sp/><sp/>Um=sqrt(ud*ud+uq*uq);</highlight></codeline> |
---|
724 | <codeline lineno="158"><highlight class="normal"><sp/><sp/>alfa=uhel(ud,uq);</highlight></codeline> |
---|
725 | <codeline lineno="159"><highlight class="normal"></highlight></codeline> |
---|
726 | <codeline lineno="160"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>polohy<sp/>vektoru<sp/>napeti<sp/>ve<sp/>stojicim<sp/>souradnem<sp/>systemu</highlight><highlight class="normal"></highlight></codeline> |
---|
727 | <codeline lineno="161"><highlight class="normal"><sp/><sp/>beta=alfa+theta;</highlight></codeline> |
---|
728 | <codeline lineno="162"><highlight class="normal"></highlight></codeline> |
---|
729 | <codeline lineno="163"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>Urmf<sp/>pro<sp/>dalsi<sp/>periodu<sp/>vzorkovani</highlight><highlight class="normal"></highlight></codeline> |
---|
730 | <codeline lineno="164"><highlight class="normal"><sp/><sp/>filtr(Um/Ucn_2,&Urmf,Treg/Tfurm);</highlight></codeline> |
---|
731 | <codeline lineno="165"><highlight class="normal"></highlight></codeline> |
---|
732 | <codeline lineno="166"><highlight class="normal"></highlight><highlight class="comment">//<sp/>saturation<sp/>of<sp/>modulation<sp/>depth<sp/>going<sp/>to<sp/>PWM</highlight><highlight class="normal"></highlight></codeline> |
---|
733 | <codeline lineno="167"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Um>Ucn_2*Urm_max)<sp/>Um=Ucn_2*Urm_max;<sp/><sp/></highlight><highlight class="comment">//<sp/>linear<sp/>modulation<sp/>area<sp/>only<sp/>-<sp/>ensure<sp/>max.<sp/>modulation<sp/>depth</highlight><highlight class="normal"></highlight></codeline> |
---|
734 | <codeline lineno="168"><highlight class="normal"></highlight></codeline> |
---|
735 | <codeline lineno="170"><highlight class="normal"><sp/><sp/>*u=Um;</highlight></codeline> |
---|
736 | <codeline lineno="171"><highlight class="normal"><sp/><sp/>*(u+1)=beta;</highlight></codeline> |
---|
737 | <codeline lineno="172"><highlight class="normal"></highlight></codeline> |
---|
738 | <codeline lineno="173"><highlight class="normal">}</highlight></codeline> |
---|
739 | <codeline lineno="174"><highlight class="normal"></highlight></codeline> |
---|
740 | </programlisting> |
---|
741 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/regulace.cpp"/> |
---|
742 | </compounddef> |
---|
743 | </doxygen> |
---|