<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6">
  <compounddef id="simulator_8cpp" kind="file">
    <compoundname>simulator.cpp</compoundname>
    <includes local="no">math.h</includes>
    <includes local="no">stdlib.h</includes>
    <includes refid="regulace_8h" local="yes">regulace.h</includes>
    <includes refid="simulator_8h" local="yes">simulator.h</includes>
    <incdepgraph>
      <node id="703">
        <label>regulace.h</label>
        <link refid="regulace_8h-source"/>
      </node>
      <node id="702">
        <label>stdlib.h</label>
      </node>
      <node id="704">
        <label>simulator.h</label>
        <link refid="simulator_8h-source"/>
      </node>
      <node id="701">
        <label>math.h</label>
      </node>
      <node id="700">
        <label>work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp</label>
        <link refid="simulator.cpp"/>
        <childnode refid="701" relation="include">
        </childnode>
        <childnode refid="702" relation="include">
        </childnode>
        <childnode refid="703" relation="include">
        </childnode>
        <childnode refid="704" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="simulator_8cpp_1525335710b53cb064ca56b936120431e" prot="public" static="no">
        <name>_USE_MATH_DEFINES</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="define" id="simulator_8cpp_19cd91cdba17e9621f425b31a3662b484" prot="public" static="no">
        <name>REZIM_REGULACE</name>
        <initializer>1</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="simulator_8cpp_1d64417a28c816d614e4501b01ca36a46" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Rs</definition>
        <argsstring></argsstring>
        <name>Rs</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_176f32b985a9b31650b0d233491b7b7d4" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Ls</definition>
        <argsstring></argsstring>
        <name>Ls</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1558972170606cd05054ab130beabad1e" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Fmag</definition>
        <argsstring></argsstring>
        <name>Fmag</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_197a370d74f3992f74cbf660239146ec1" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Bf</definition>
        <argsstring></argsstring>
        <name>Bf</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1ace2d484b0e3651abd108f04803d316c" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double p</definition>
        <argsstring></argsstring>
        <name>p</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1c6390bc2d074992cc6ca37d132a5262d" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double kp</definition>
        <argsstring></argsstring>
        <name>kp</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1229fe836529a54bc8a7d390148d7a488" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double J</definition>
        <argsstring></argsstring>
        <name>J</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1b3ea1f9133a9fd391d578911a5ff4c35" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Ucn</definition>
        <argsstring></argsstring>
        <name>Ucn</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_16b1aef16f2bb55279eadae60bf2e558a" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Uc</definition>
        <argsstring></argsstring>
        <name>Uc</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_19b78bd462526152199b0e0812eb3fdd7" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double DT</definition>
        <argsstring></argsstring>
        <name>DT</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_15939801e2b84edf0bf428a10c37e8357" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double U_modulace</definition>
        <argsstring></argsstring>
        <name>U_modulace</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1f828dddefd5bf343c700078edbfe976b" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Urm_max</definition>
        <argsstring></argsstring>
        <name>Urm_max</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_18ee9be1b5aa75abae556de3088cba6d9" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double h</definition>
        <argsstring></argsstring>
        <name>h</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1004e965b93a1858dcaf662b220edb147" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double h_reg</definition>
        <argsstring></argsstring>
        <name>h_reg</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_140ad4a109c941bdaa613b68b54107e2e" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double h_reg_real</definition>
        <argsstring></argsstring>
        <name>h_reg_real</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_14cfa9486c77177dfaac93079cc613a88" prot="public" static="no" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int h_reg_counter</definition>
        <argsstring></argsstring>
        <name>h_reg_counter</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_12d36b941b2c32d96c73cd66d0b2a79ba" prot="public" static="no" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int h_reg_counter_mez</definition>
        <argsstring></argsstring>
        <name>h_reg_counter_mez</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1766e9ead6f2e850ae806a6da85590460" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double va_char[16]</definition>
        <argsstring>[16]</argsstring>
        <name>va_char</name>
        <initializer>{0,10,50,100,200,300,500,1000, 0,1,1.8,2.4,3.2,3.8,4.8,6.8}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_144d11750d10193af7944b7dc2eaa2f45" prot="public" static="yes" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int pocet</definition>
        <argsstring></argsstring>
        <name>pocet</name>
        <initializer>8</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1ef96d7e2af821e8829d40ed1d8b0901d" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double x[9]</definition>
        <argsstring>[9]</argsstring>
        <name>x</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1a25c32c8e1605293535ff9baa435b758" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int smer</definition>
        <argsstring></argsstring>
        <name>smer</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1e2040e9b4693cfc54938a3b2d062591c" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int smer2</definition>
        <argsstring></argsstring>
        <name>smer2</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1911020f0c2ee7248d3575189b06398c2" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int citac</definition>
        <argsstring></argsstring>
        <name>citac</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1abf693f6b07594a20f4aa8d02a875399" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int citac2</definition>
        <argsstring></argsstring>
        <name>citac2</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1278b61cc75f0dcbf7685ad230b12b1a4" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int citac_PR</definition>
        <argsstring></argsstring>
        <name>citac_PR</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1881981ba129fc2734322d637926c05bb" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int modulace</definition>
        <argsstring></argsstring>
        <name>modulace</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_121d72fdda90dce70de81cf1fc4630928" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dIsx</definition>
        <argsstring></argsstring>
        <name>dIsx</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_19bf8a92e872ccc3086ffeb0f13b22793" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dIsx1</definition>
        <argsstring></argsstring>
        <name>dIsx1</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1026c9e1de51b90e9955d8ffe75970ab1" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dIsx2</definition>
        <argsstring></argsstring>
        <name>dIsx2</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_19ca03ba7145b078ef8702a53ee741f23" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dIsx3</definition>
        <argsstring></argsstring>
        <name>dIsx3</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_168eab1c82f703bb130282ab4b5322ffd" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dIsy</definition>
        <argsstring></argsstring>
        <name>dIsy</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1f7244346709d521149860600030c0813" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dIsy1</definition>
        <argsstring></argsstring>
        <name>dIsy1</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_194913da6f7cf6d33088846af9bbfae91" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dIsy2</definition>
        <argsstring></argsstring>
        <name>dIsy2</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_14dd39f5275fabf34a4c114e556338aad" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dIsy3</definition>
        <argsstring></argsstring>
        <name>dIsy3</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_15d075d9998ae7bbabcd1eec0c27a4c3d" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dTheta</definition>
        <argsstring></argsstring>
        <name>dTheta</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_14ee05581e5d78f06a138e2f86b6c619c" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dTheta1</definition>
        <argsstring></argsstring>
        <name>dTheta1</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1c6ed9fc65ecf7935a27a0fbacbecab8b" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dTheta2</definition>
        <argsstring></argsstring>
        <name>dTheta2</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_126ccf33b4cb557f30c8a78ce9e20d006" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dTheta3</definition>
        <argsstring></argsstring>
        <name>dTheta3</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1c2a6e8a64aa67c5924cfe6488658065c" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dw</definition>
        <argsstring></argsstring>
        <name>dw</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_13dbeafa64f6523568b739c7c92d656cc" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dw1</definition>
        <argsstring></argsstring>
        <name>dw1</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_12fbe98a006d0a245e64bd0b5626bdbbe" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dw2</definition>
        <argsstring></argsstring>
        <name>dw2</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_10e1c55b73fae10df1cd50e581c01bd5a" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double dw3</definition>
        <argsstring></argsstring>
        <name>dw3</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1639a3957145f3b5dd034811cb4b4cf3f" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Isx</definition>
        <argsstring></argsstring>
        <name>Isx</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_109325d9dd09d541bdd3f9e9ff27a05d5" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Isy</definition>
        <argsstring></argsstring>
        <name>Isy</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1ca81c35c21e3a5f7f3a8d24504e76664" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double theta</definition>
        <argsstring></argsstring>
        <name>theta</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_16dc6e6f3c75c509ce943163afb5dade7" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double speed</definition>
        <argsstring></argsstring>
        <name>speed</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_13ece956ca424ebed99b0796b14a98374" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double u[2]</definition>
        <argsstring>[2]</argsstring>
        <name>u</name>
        <initializer>{0.,0.}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1a99b7cd727bdf0b27735f124f671b5ec" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double us[2]</definition>
        <argsstring>[2]</argsstring>
        <name>us</name>
        <initializer>{0.,0.}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1d132091f393ab3d814ed8b94dba7e921" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double usx_av</definition>
        <argsstring></argsstring>
        <name>usx_av</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1b5064e50303296c6b7087b68cb5cfce1" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double usy_av</definition>
        <argsstring></argsstring>
        <name>usy_av</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_141a02f7232181f728dab2eed888f7640" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double sum_usx_av</definition>
        <argsstring></argsstring>
        <name>sum_usx_av</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_11aef87946db23810c7fb902e36e6f22a" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double sum_usy_av</definition>
        <argsstring></argsstring>
        <name>sum_usy_av</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1b7248c815b06c1b19e3921414a82592d" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double isx_av</definition>
        <argsstring></argsstring>
        <name>isx_av</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_15589570ff775e91e676c3bdb5b187e51" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double isy_av</definition>
        <argsstring></argsstring>
        <name>isy_av</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1f0c349de71b4e8d699c2ea80a98e27fa" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double sum_isx_av</definition>
        <argsstring></argsstring>
        <name>sum_isx_av</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_17b8d05f9d878c78971b9c092913a064c" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double sum_isy_av</definition>
        <argsstring></argsstring>
        <name>sum_isy_av</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1f7ca1db3100387a968d88ab528b26d41" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double usxf</definition>
        <argsstring></argsstring>
        <name>usxf</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_15d42c8ca4bd3e9d84730c1dd6a73dc6e" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double usyf</definition>
        <argsstring></argsstring>
        <name>usyf</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1172eca7b7637b2316126df7e9466d633" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Tf</definition>
        <argsstring></argsstring>
        <name>Tf</name>
        <initializer>0.01</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1c38dc66e76a12774fe9acb5502e7a469" prot="public" static="yes" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int start_filter</definition>
        <argsstring></argsstring>
        <name>start_filter</name>
        <initializer>1</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1f053457859f34ead8e8aee6e370743ac" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double KalmanObs[10]</definition>
        <argsstring>[10]</argsstring>
        <name>KalmanObs</name>
        <initializer>{0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_187accd1af8e0aff4b818d891374f7cec" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double t</definition>
        <argsstring></argsstring>
        <name>t</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_19c8dd5461ff8757d329fffab02f6d574" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double ualfa</definition>
        <argsstring></argsstring>
        <name>ualfa</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="variable" id="simulator_8cpp_1f353c8491ed6feeb8e214a7c90a85c94" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double ubeta</definition>
        <argsstring></argsstring>
        <name>ubeta</name>
        <initializer>0.</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="simulator_8cpp_148bbddff535c313ce90ca6350372f6d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void pmsmsim_set_parameters</definition>
        <argsstring>(double Rs0, double Ls0, double Fmag0, double Bf0, double p0, double kp0, double J0, double Uc0, double DT0, double dt0)</argsstring>
        <name>pmsmsim_set_parameters</name>
        <param>
          <type>double</type>
          <declname>Rs0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Ls0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Fmag0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Bf0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>p0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>kp0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>J0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Uc0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>DT0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>dt0</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="function" id="simulator_8cpp_1cdadda61be3f910910ac31cf4a3c1785" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void pmsmsim_step</definition>
        <argsstring>(double Ww)</argsstring>
        <name>pmsmsim_step</name>
        <param>
          <type>double</type>
          <declname>Ww</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="function" id="simulator_8cpp_1d3b8a39e009e28d49610e94fbc943721" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void pwm</definition>
        <argsstring>(unsigned int mod)</argsstring>
        <name>pwm</name>
        <param>
          <type>unsigned int</type>
          <declname>mod</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="function" id="simulator_8cpp_1ee66e8081eeedb7bc836be175478bc42" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>double</type>
        <definition>static double ubytek</definition>
        <argsstring>(double I)</argsstring>
        <name>ubytek</name>
        <param>
          <type>double</type>
          <declname>I</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      <memberdef kind="function" id="simulator_8cpp_1e6c1e8a2485b12c9991afcf2213dcae8" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void pmsm_model</definition>
        <argsstring>(unsigned int mod)</argsstring>
        <name>pmsm_model</name>
        <param>
          <type>unsigned int</type>
          <declname>mod</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <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"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/><sp/><sp/>Simulator<sp/>of<sp/>Vector<sp/>Controlled<sp/>PMSM<sp/>Drive</highlight></codeline>
<codeline lineno="3"><highlight class="comment"></highlight></codeline>
<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>
<codeline lineno="5"><highlight class="comment"><sp/><sp/><sp/>introduces<sp/>basic<sp/>functions<sp/>...<sp/>set_parameters()<sp/>and<sp/>eval().</highlight></codeline>
<codeline lineno="6"><highlight class="comment"></highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/><sp/><sp/>Z.<sp/>Peroutka</highlight></codeline>
<codeline lineno="8"><highlight class="comment"></highlight></codeline>
<codeline lineno="9"><highlight class="comment">Rev.<sp/>16.3.2008</highlight></codeline>
<codeline lineno="10"><highlight class="comment"></highlight></codeline>
<codeline lineno="11"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>_USE_MATH_DEFINES</highlight></codeline>
<codeline lineno="14"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;math.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdlib.h&gt;</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>
<codeline lineno="17"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;regulace.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;simulator.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="22"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="25"><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight><highlight class="comment">//<sp/>local<sp/>functions</highlight><highlight class="normal"></highlight></codeline>
<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>
<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>
<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>
<codeline lineno="30"><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="comment">//<sp/>simulator<sp/>properties<sp/>///////////////////////</highlight><highlight class="normal"></highlight></codeline>
<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>
<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>
<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>
<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>
<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>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="comment">//<sp/>system<sp/>state</highlight><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<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>
<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>
<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>
<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>
<codeline lineno="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="comment">//<sp/>system<sp/>measures</highlight><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="55"><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight><highlight class="comment">//<sp/>control</highlight><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="59"><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="65"><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight><highlight class="comment">//<sp/>stator<sp/>voltage<sp/>components<sp/>filtering</highlight><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="69"><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="72"><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"></highlight><highlight class="comment">//<sp/>real-time</highlight><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="75"><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="80"><highlight class="normal">{</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>tmp_i;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>simulator<sp/>parameters<sp/>setup</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/>Rs=Rs0;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/>Ls=Ls0;</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/>Fmag=Fmag0;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/>Bf=Bf0;</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/>p=p0;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/>kp=kp0;</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/>J=J0;</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/>Ucn=600.;</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/>Uc=Uc0;</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/>DT=DT0;</highlight></codeline>
<codeline lineno="94"><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>control<sp/>setup</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/>Urm_max=0.95;</highlight></codeline>
<codeline lineno="97"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>h=dt0;</highlight></codeline>
<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>
<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>
<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>
<codeline lineno="103"><highlight class="normal"><sp/><sp/>h_reg_counter=1;</highlight></codeline>
<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>
<codeline lineno="105"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="107"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmp_i=0;tmp_i&lt;9;tmp_i++)</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/>x[tmp_i]=0.;</highlight></codeline>
<codeline lineno="109"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="111"><highlight class="normal"><sp/><sp/>Isx=0.;Isy=0.;theta=x[3];speed=x[2];</highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="114"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>PWM<sp/>init</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/>smer=-1;<sp/>smer2=-1;</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/>citac=0;</highlight></codeline>
<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>
<codeline lineno="118"><highlight class="normal"><sp/><sp/>citac_PR=h_reg_counter_mez;</highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight></codeline>
<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/>=&gt;<sp/>add<sp/>1<sp/>to<sp/>both<sp/>counter<sp/>registers</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/>citac++;smer=1;</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/>citac2--;</highlight></codeline>
<codeline lineno="123"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="125"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(modulace==1)</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/>U_modulace=Ucn/sqrt(3.);</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/>U_modulace=Ucn/2.;</highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>PMSM<sp/>model<sp/>init</highlight><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="132"><highlight class="normal"><sp/><sp/>dTheta=0;dTheta1=0;dTheta2=0;dTheta3=0;</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/>dw=0;dw1=0;dw2=0;dw3=0;</highlight></codeline>
<codeline lineno="134"><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/>init_regulace(Ls,Fmag,kp,p,h_reg_real);</highlight></codeline>
<codeline lineno="136"><highlight class="normal">}</highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="141"><highlight class="normal">{</highlight></codeline>
<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>
<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>
<codeline lineno="144"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dtr[3],dd[3];</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Um,<sp/>beta;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>U3;</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>up,<sp/>up2;</highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/>Um=*u;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/>beta=*(u+1);</highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="153"><highlight class="normal"><sp/><sp/>up=((double)citac/citac_PR-0.5)*Ucn;</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/>up2=((double)citac2/citac_PR-0.5)*Ucn;</highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/>iabc[0]=*x;</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/>iabc[1]=(-*x+sqrt(3.)**(x+1))/2.;</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/>iabc[2]=(-*x-sqrt(3.)**(x+1))/2.;</highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="161"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[0]=Um*cos(beta);</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[1]=Um*cos(beta-2./3.*M_PI);</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[2]=Um*cos(beta+2./3.*M_PI);</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<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>
<codeline lineno="167"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/>U3=0.17*cos(3.*beta);</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[0]=Um*(cos(beta)-U3);</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[1]=Um*(cos(beta-2./3.*M_PI)-U3);</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/>ur[2]=Um*(cos(beta+2./3.*M_PI)-U3);</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i&lt;3;i++)</highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/>{<sp/>dtr[i]=ubytek(fabs(iabc[i]))*0.;</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/>dd[i]=dtr[i]*.73;</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="178"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="180"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i&lt;3;i++)</highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(iabc[i]&gt;=0)</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((ur[i]&gt;up)<sp/>&amp;&amp;<sp/>(ur[i]&gt;up2))</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ustr[i]=Uc/2-dtr[i];</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ustr[i]=-(Uc/2+dd[i]);</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((ur[i]&lt;up)<sp/>&amp;&amp;<sp/>(ur[i]&lt;up2))</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ustr[i]=-(Uc/2-dtr[i]);</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ustr[i]=Uc/2+dd[i];</highlight></codeline>
<codeline lineno="191"><highlight class="normal"></highlight></codeline>
<codeline lineno="192"><highlight class="normal"></highlight><highlight class="comment">//<sp/>phase<sp/>voltages</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/>ua=(2.*ustr[0]-ustr[1]-ustr[2])/3.;</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/>ub=(2.*ustr[1]-ustr[0]-ustr[2])/3.;</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/>uc=(2.*ustr[2]-ustr[0]-ustr[1])/3.;</highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="198"><highlight class="normal"><sp/><sp/>*us=(2.*ua-ub-uc)/3.;</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/>*(us+1)=(ub-uc)/sqrt(3.);</highlight></codeline>
<codeline lineno="200"><highlight class="normal"></highlight></codeline>
<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>
<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>
<codeline lineno="203"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/>smer*=-1;</highlight></codeline>
<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>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/>usx_av=h/h_reg*sum_usx_av;</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/>usy_av=h/h_reg*sum_usy_av;</highlight></codeline>
<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>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/>sum_usx_av=0.;</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/>sum_usy_av=0.;</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<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>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/>isx_av=h/h_reg*sum_isx_av;</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/>isy_av=h/h_reg*sum_isy_av;</highlight></codeline>
<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>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/>sum_isx_av=0.;</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/>sum_isy_av=0.;</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<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>
<codeline lineno="220"><highlight class="normal"><sp/><sp/>citac+=smer;</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/>citac2+=smer2;</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/></highlight></codeline>
<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>
<codeline lineno="224"><highlight class="normal"><sp/><sp/>sum_usx_av+=*us;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/>sum_usy_av+=*(us+1);</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/></highlight></codeline>
<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>
<codeline lineno="228"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//if<sp/>(start_filter==1)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/>usxf+=(*us-usxf)*h/h_reg;</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/>usyf+=(*(us+1)-usyf)*h/h_reg;</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/></highlight></codeline>
<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>
<codeline lineno="233"><highlight class="normal"><sp/><sp/>sum_isx_av+=*x;</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/>sum_isy_av+=*(x+1);</highlight></codeline>
<codeline lineno="235"><highlight class="normal">}</highlight></codeline>
<codeline lineno="236"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="238"><highlight class="normal">{</highlight></codeline>
<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>
<codeline lineno="240"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>delta_u;</highlight></codeline>
<codeline lineno="241"><highlight class="normal"></highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/>ii=0;</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((*(va_char+ii)&lt;I)<sp/>&amp;&amp;<sp/>(ii&lt;(pocet-1)))</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/>ii++;</highlight></codeline>
<codeline lineno="245"><highlight class="normal"></highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ii==(pocet-1))</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/>delta_u=*(va_char+ii+pocet);</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ii==0)</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>delta_u=0;</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="253"><highlight class="normal"></highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>delta_u;</highlight></codeline>
<codeline lineno="255"><highlight class="normal">}</highlight></codeline>
<codeline lineno="256"><highlight class="normal"></highlight></codeline>
<codeline lineno="257"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="259"><highlight class="normal"></highlight><highlight class="comment">//<sp/>mod&lt;5...Euler,<sp/>mod&gt;4<sp/>...<sp/>Adams<sp/>of<sp/>4th<sp/>order</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal">{</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>usx,<sp/>usy;</highlight></codeline>
<codeline lineno="262"><highlight class="normal"></highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/>usx=*us;</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/>usy=*(us+1);</highlight></codeline>
<codeline lineno="265"><highlight class="normal"></highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/>dIsx=-Rs/Ls*x[0]+Fmag/Ls*x[2]*sin(x[3])+usx/Ls;</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/>dIsy=-Rs/Ls*x[1]-Fmag/Ls*x[2]*cos(x[3])+usy/Ls;</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/>dTheta=x[2];</highlight></codeline>
<codeline lineno="269"><highlight class="normal"></highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(J&gt;0)</highlight></codeline>
<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>
<codeline lineno="272"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/>dw=0;</highlight></codeline>
<codeline lineno="274"><highlight class="normal"></highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>integration</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mod&lt;5)<sp/><sp/></highlight><highlight class="comment">//<sp/>Euler</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/>{<sp/>x[0]+=dIsx*h;</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/>x[1]+=dIsy*h;</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/>x[2]+=dw*h;</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/>x[3]+=dTheta*h;</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<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>
<codeline lineno="283"><highlight class="normal"><sp/><sp/>{<sp/>x[0]+=h/24.*(55.*dIsx-59.*dIsx1+37.*dIsx2-9.*dIsx3);</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/>x[1]+=h/24.*(55.*dIsy-59.*dIsy1+37.*dIsy2-9.*dIsy3);</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/>x[2]+=h/24.*(55.*dw-59.*dw1+37.*dw2-9.*dw3);</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/>x[3]+=h/24.*(55.*dTheta-59.*dTheta1+37.*dTheta2-9.*dTheta3);</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="288"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="290"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[3]&gt;M_PI)<sp/>x[3]-=(2*M_PI);</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[3]&lt;-M_PI)<sp/>x[3]+=(2*M_PI);</highlight></codeline>
<codeline lineno="292"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="294"><highlight class="normal"><sp/><sp/>dIsx3=dIsx2;dIsx2=dIsx1;dIsx1=dIsx;</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/>dIsy3=dIsy2;dIsy2=dIsy1;dIsy1=dIsy;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/>dTheta3=dTheta2;dTheta2=dTheta1;dTheta1=dTheta;</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/>dw3=dw2;dw2=dw1;dw1=dw;</highlight></codeline>
<codeline lineno="298"><highlight class="normal"></highlight></codeline>
<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>
<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>
<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>
<codeline lineno="302"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="304"><highlight class="normal"><sp/><sp/>x[5]=Ls*x[6]+Fmag;</highlight></codeline>
<codeline lineno="305"><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Torque</highlight><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="308"><highlight class="normal">}</highlight></codeline>
<codeline lineno="309"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="312"><highlight class="normal">{</highlight></codeline>
<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>
<codeline lineno="314"><highlight class="normal"></highlight></codeline>
<codeline lineno="315"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>while<sp/>(t&lt;=t_end)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/>pwm(modulace);</highlight></codeline>
<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>
<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>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/>pmsm_model(5);</highlight></codeline>
<codeline lineno="321"><highlight class="normal"></highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(h_reg_counter&gt;=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>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<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>
<codeline lineno="333"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/><sp/>KalmanObs[2]=Isx;</highlight></codeline>
<codeline lineno="334"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>KalmanObs[3]=Isy;*/</highlight><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[2]=x[0];</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[3]=x[1];</highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<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>
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[4]=usx_av;</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[5]=usy_av;</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[6]=usxf;</highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[7]=usyf;</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[8]=isx_av;</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>KalmanObs[9]=isy_av;<sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="346"><highlight class="normal"></highlight></codeline>
<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>
<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>
<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>
<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>
<codeline lineno="351"><highlight class="normal"></highlight></codeline>
<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>
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>Umk=*u*Uc/Ucn;</highlight></codeline>
<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>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>ub=Umk*cos(*(u+1)-2./3.*M_PI);</highlight></codeline>
<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>
<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>
<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>
<codeline lineno="359"><highlight class="normal"></highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>h_reg_counter=0;</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="362"><highlight class="normal"></highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/>t+=h;</highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/>h_reg_counter++;</highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="366"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/simulator.cpp"/>
  </compounddef>
</doxygen>
