<?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="simul_8cpp" kind="file">
    <compoundname>simul.cpp</compoundname>
    <includes local="no">stdio.h</includes>
    <includes local="no">math.h</includes>
    <includes refid="pmsm__mod_8h" local="yes">pmsm_mod.h</includes>
    <includes refid="pwm_8h" local="yes">pwm.h</includes>
    <includes refid="ekf__example_2regulace_8h" local="yes">regulace.h</includes>
    <includes refid="ekf_8h" local="yes">ekf.h</includes>
    <incdepgraph>
      <node id="796">
        <label>pwm.h</label>
        <link refid="pwm_8h-source"/>
      </node>
      <node id="792">
        <label>work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp</label>
        <link refid="simul.cpp"/>
        <childnode refid="793" relation="include">
        </childnode>
        <childnode refid="794" relation="include">
        </childnode>
        <childnode refid="795" relation="include">
        </childnode>
        <childnode refid="796" relation="include">
        </childnode>
        <childnode refid="797" relation="include">
        </childnode>
        <childnode refid="798" relation="include">
        </childnode>
      </node>
      <node id="798">
        <label>ekf.h</label>
        <link refid="ekf_8h-source"/>
      </node>
      <node id="794">
        <label>math.h</label>
      </node>
      <node id="797">
        <label>regulace.h</label>
        <link refid="ekf__example_2regulace_8h-source"/>
      </node>
      <node id="793">
        <label>stdio.h</label>
      </node>
      <node id="795">
        <label>pmsm_mod.h</label>
        <link refid="pmsm__mod_8h-source"/>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="simul_8cpp_1c7349dbe5aa058842fbdb920d3d72573" prot="public" static="no">
        <name>Qm</name>
        <initializer>13</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="21" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="21" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="simul_8cpp_1f83c88e49505c9c48e0aa425fb8dfa65" prot="public" static="no">
        <name>CHYBA_POLOHY</name>
        <initializer>(0./180.*M_PI)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="22" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="22" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="simul_8cpp_1e66bdf1fe9394f2b669d2b51e9ebb938" prot="public" static="no">
        <name>MODULACE</name>
        <initializer>1</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="24" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="24" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="simul_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/ekf_example/simul.cpp" line="25" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="25" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="simul_8cpp_1ec0f886b27a618f9672865d7c877af87" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double param[7]</definition>
        <argsstring>[7]</argsstring>
        <name>param</name>
        <initializer>{0.28,0.003465,0.1989,0.0,4,1.5,0.04}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="27" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="27" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1a3d0fec955d6b30478141693fe43eb1e" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double REL[6]</definition>
        <argsstring>[6]</argsstring>
        <name>REL</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="29" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="29" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1ffc0e5059019bf550a6604abb0835e05" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double REL1[6]</definition>
        <argsstring>[6]</argsstring>
        <name>REL1</name>
        <initializer>{1.,1.,1.,1.,1.,1.}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="29" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="29" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_19b78bd462526152199b0e0812eb3fdd7" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double DT</definition>
        <argsstring></argsstring>
        <name>DT</name>
        <initializer>3e-6</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="31" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="31" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="32" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="32" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="33" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_12277fdb1ab96741cc3888fc395a988db" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Rf</definition>
        <argsstring></argsstring>
        <name>Rf</name>
        <initializer>5e-3</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="37" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="37" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1d7cf8efa01a94a8846945e23f0f82585" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Lf</definition>
        <argsstring></argsstring>
        <name>Lf</name>
        <initializer>1e-3</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="37" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="37" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_17538375d5f06d9915f7c9086b06b0343" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Cf</definition>
        <argsstring></argsstring>
        <name>Cf</name>
        <initializer>1e-3</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="37" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="37" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1456fddf8fd69637dc58ec00271128171" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Ut</definition>
        <argsstring></argsstring>
        <name>Ut</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="39" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="39" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="39" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="39" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="39" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="39" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1c8f8a23612ab040c9f26181e5dbf0c91" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double It</definition>
        <argsstring></argsstring>
        <name>It</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="39" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="39" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1236ba22acc200be1dd1975755a6964bc" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Iz</definition>
        <argsstring></argsstring>
        <name>Iz</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="39" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="39" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1689f18157c425f52c5028d408c365616" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double fc</definition>
        <argsstring></argsstring>
        <name>fc</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="41" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="41" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1841f0181b4aed1cf0428dccfbb4a9b42" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double fr</definition>
        <argsstring></argsstring>
        <name>fr</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="41" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="41" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1c0c69854be0f25918d8cfaaa932feda9" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double fs</definition>
        <argsstring></argsstring>
        <name>fs</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="41" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="41" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_187accd1af8e0aff4b818d891374f7cec" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double t</definition>
        <argsstring></argsstring>
        <name>t</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="43" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="43" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_14b637c5fff609e604a3b2b2787f4a9fa" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double t_end</definition>
        <argsstring></argsstring>
        <name>t_end</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="43" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="43" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1b7ef7ef011d07aaa53569f4e65b7a9c8" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double t_sense</definition>
        <argsstring></argsstring>
        <name>t_sense</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="43" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="43" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_18ee9be1b5aa75abae556de3088cba6d9" prot="public" static="no" 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/ekf_example/simul.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="44" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_109cc6059a12cdba15210ace9262ba0d8" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double hx</definition>
        <argsstring></argsstring>
        <name>hx</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="44" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_18bc096c61a3315b99615d676a67f758e" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double h_disp</definition>
        <argsstring></argsstring>
        <name>h_disp</name>
        <initializer>0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="44" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="44" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1004e965b93a1858dcaf662b220edb147" prot="public" static="no" 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/ekf_example/simul.cpp" line="45" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="45" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1aaf35fca628d0f6267260f545e9af729" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double h_model</definition>
        <argsstring></argsstring>
        <name>h_model</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="45" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="45" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_15676aea66a53119b645c998fb6ff151c" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double hpom</definition>
        <argsstring></argsstring>
        <name>hpom</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="45" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="45" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1a202c44c441c61c1da0105091188e8a3" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double hpom_model</definition>
        <argsstring></argsstring>
        <name>hpom_model</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="45" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="45" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_17b3e5bc332840c0eaed14baa9c75898b" prot="public" static="no" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int h_model_counter</definition>
        <argsstring></argsstring>
        <name>h_model_counter</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="46" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1c2c4cdb6b240bd1c6e53933987a33a27" prot="public" static="no" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int h_model_counter_mez</definition>
        <argsstring></argsstring>
        <name>h_model_counter_mez</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="46" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="48" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="48" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="49" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1d900a67bffe289dfbb015b908a2d1685" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double Isd</definition>
        <argsstring></argsstring>
        <name>Isd</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="50" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="50" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_11c6d368fcf2a6b1c92e39c124d25d737" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double Isq</definition>
        <argsstring></argsstring>
        <name>Isq</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="50" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="50" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_12e4ec74a755b968c3b0fde1843fbf371" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double Fr</definition>
        <argsstring></argsstring>
        <name>Fr</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="50" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="50" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1faeae9ee7305d7ca47b2707b9e1823ca" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double Fs</definition>
        <argsstring></argsstring>
        <name>Fs</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="50" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="50" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1c2a7fbd007ce8428f38711c0197ba84f" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int reg_counter</definition>
        <argsstring></argsstring>
        <name>reg_counter</name>
        <initializer>1</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="52" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="52" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_17e46b90c8a18eff476d6b48039da9604" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int print_counter</definition>
        <argsstring></argsstring>
        <name>print_counter</name>
        <initializer>0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="52" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="52" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1064de958d18436493182e197377134a4" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Idwf</definition>
        <argsstring></argsstring>
        <name>Idwf</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="53" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="53" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_140336490db2f9186be499886926f0e3b" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Iqwf</definition>
        <argsstring></argsstring>
        <name>Iqwf</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="53" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="53" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="53" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="53" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_16aeb156dc0caed63358169c7a12fce45" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Ww</definition>
        <argsstring></argsstring>
        <name>Ww</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="53" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="53" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_18dbbdf63080ba5ad2d5da148ae6fcd9b" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double rychlost</definition>
        <argsstring></argsstring>
        <name>rychlost</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="55" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="55" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="57" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="57" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="57" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="57" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_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/ekf_example/simul.cpp" line="58" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="58" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1de1d5111a11820d46acfc64a452ab2c5" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Uc_mer</definition>
        <argsstring></argsstring>
        <name>Uc_mer</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="59" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="59" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1a730fb3f3d8a7cdb3f85df0db34c5a31" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int k_rampa</definition>
        <argsstring></argsstring>
        <name>k_rampa</name>
        <initializer>1</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="61" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="61" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_149d61e5563ddd4badfa3395bbf7a61a9" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int k_rampa_tmp</definition>
        <argsstring></argsstring>
        <name>k_rampa_tmp</name>
        <initializer>0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="61" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="61" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1cfe22be9f0bdae5786d82ef3af196b96" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double tmp_uhel</definition>
        <argsstring></argsstring>
        <name>tmp_uhel</name>
        <initializer>0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="63" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="63" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_1b6913f657dfd030fb7aa579f91373a56" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double ekf_estim[2]</definition>
        <argsstring>[2]</argsstring>
        <name>ekf_estim</name>
        <initializer>{0.,0.}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="66" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="66" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="simul_8cpp_111ee841a5cbfa0e9d39dc9d7ba004e24" prot="public" static="no" mutable="no">
        <type>FILE *</type>
        <definition>FILE* fw</definition>
        <argsstring></argsstring>
        <name>fw</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="68" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="68" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="simul_8cpp_1800fae1adc0ea6fe215865c3708c4d7a" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void sim_init</definition>
        <argsstring>(void)</argsstring>
        <name>sim_init</name>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="70" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="72" bodyend="99"/>
      </memberdef>
      <memberdef kind="function" id="simul_8cpp_1840291bc02cba5474a4cb46a9b9566fe" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int main</definition>
        <argsstring>(void)</argsstring>
        <name>main</name>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" line="102" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp" bodystart="101" bodyend="268"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*<sp/>Hlavni<sp/>simulacni<sp/>program</highlight></codeline>
<codeline lineno="2"><highlight class="comment"></highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/><sp/><sp/>Simulace<sp/>tramvaje<sp/>s<sp/>PMSM<sp/>v<sp/>plovouci<sp/>radove<sp/>carce</highlight></codeline>
<codeline lineno="4"><highlight class="comment"></highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/><sp/><sp/>Presne<sp/>parametry<sp/>tramvaje<sp/>Skoda<sp/>15T</highlight></codeline>
<codeline lineno="6"><highlight class="comment"></highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/><sp/><sp/>31.5.2007</highlight></codeline>
<codeline lineno="8"><highlight class="comment"></highlight></codeline>
<codeline lineno="9"><highlight class="comment">REV.<sp/><sp/><sp/></highlight></codeline>
<codeline lineno="10"><highlight class="comment">31.5.<sp/>2007<sp/><sp/><sp/><sp/><sp/><sp/>Doplnena<sp/>moznost<sp/>provozu<sp/>PWM<sp/>se<sp/>3.<sp/>harmonickou<sp/>-<sp/>konstanta<sp/>MODULACE<sp/>nastavuje<sp/>typ<sp/>modulace</highlight></codeline>
<codeline lineno="11"><highlight class="comment">25.6.<sp/>2007<sp/><sp/><sp/><sp/><sp/><sp/>Vyrazen<sp/>ss<sp/>obvod<sp/>a<sp/>trolej<sp/>(uvazovano<sp/>konst.<sp/>napeti<sp/>na<sp/>troleji)<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="12"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdio.h&gt;</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/>&quot;pmsm_mod.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;pwm.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;regulace.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;ekf.h&quot;</highlight><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/>Qm<sp/><sp/><sp/><sp/><sp/><sp/>13</highlight></codeline>
<codeline lineno="22"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>CHYBA_POLOHY<sp/><sp/><sp/><sp/>(0./180.*M_PI)<sp/><sp/>//<sp/>chyba<sp/>+/-8<sp/>stupnu<sp/>elektrickych<sp/>pro<sp/>senzorovany<sp/>loziskovy<sp/>stit</highlight></codeline>
<codeline lineno="23"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MODULACE<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>1<sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>0...sinusova<sp/>PWM,<sp/>1...PWM<sp/>se<sp/>3.harmonickou</highlight></codeline>
<codeline lineno="25"><highlight class="preprocessor"></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="26"><highlight class="preprocessor"></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">double</highlight><highlight class="normal"><sp/>param[7]={0.28,0.003465,0.1989,0.0,4,1.5,0.04};</highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="comment">//<sp/>[Rs,<sp/>Ls,<sp/>Fmag,<sp/>Bf,<sp/>p,<sp/>kp,<sp/>J<sp/>=<sp/>0.04?];</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>REL[6],<sp/>REL1[6]={1.,1.,1.,1.,1.,1.};</highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="comment">//<sp/>REL<sp/>=<sp/>[Ur,<sp/>Ir,<sp/>wr,<sp/>thetar,<sp/>Mr,<sp/>Fr];</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>DT=3e-6;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>mrtve<sp/>casy</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>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="33"><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="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="comment">//<sp/>trolejovy<sp/>filtr</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="comment">//static<sp/>double<sp/>Rf=22e-3,Lf=1.8e-3,Cf=10e-3;<sp/><sp/><sp/><sp/>//<sp/>filtr<sp/>VEKTRA</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Rf=5e-3,Lf=1e-3,Cf=1e-3;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>filtr<sp/>15T</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="comment">//<sp/>parametry<sp/>ss<sp/>obvodu</highlight><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/>Ut,Uc,Ucn,It,Iz;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="comment">//<sp/>modulace<sp/>a<sp/>skalarni<sp/>rizeni</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>fc,fr,fs;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>t,<sp/>t_end,<sp/>t_sense;</highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>h,hx,h_disp=0;</highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>h_reg,h_model,hpom,hpom_model;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>h_model_counter,h_model_counter_mez;</highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><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="49"><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="50"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isd,<sp/>Isq,<sp/>Fr,<sp/>Fs;</highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>reg_counter=1,<sp/>print_counter=0;</highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Idwf,Iqwf,Urm_max,Ww;</highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>rychlost;</highlight></codeline>
<codeline lineno="56"><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/>Isx,<sp/>Isy;</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/>theta;</highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Uc_mer;</highlight></codeline>
<codeline lineno="60"><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">int</highlight><highlight class="normal"><sp/>k_rampa=1,<sp/>k_rampa_tmp=0;</highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>tmp_uhel=0;</highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="comment">//<sp/>EKF<sp/>-<sp/>vysledek<sp/>estimace</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>ekf_estim[2]={0.,0.};<sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>w_est,<sp/>theta_est</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal">FILE<sp/>*fw;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>sim_init(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>sim_init(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="73"><highlight class="normal">{</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>parametry<sp/>troleje<sp/>a<sp/>modulator</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/>Ucn=600.;Ut=200.;Uc=Ut;It=0.;Iz=0.;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/>fc=4000.;</highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vzorkovani</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/>h_reg=1./2./fc;</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/>h_model=h_reg;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>hpom=h;hpom_model=h;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vzorkovani<sp/>pomoci<sp/>citacu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/>h_model_counter_mez=(int)(h_model/h);</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/>h_model_counter=h_model_counter_mez;</highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/>fs=0.;<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/>zadani<sp/>primo<sp/>v<sp/>Hz</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>fs=700.1*(param[4]/60.);<sp/><sp/><sp/><sp/>//<sp/>zadani<sp/>pres<sp/>mechanicke<sp/>otacky<sp/>fs=n*pp/60</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>pocatecni<sp/>stav<sp/>motoru</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/>x[0]=0.;x[1]=0.;x[3]=0.;x[4]=0.;x[5]=0.;x[6]=0.;x[7]=0.;x[8]=0.;</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/>x[2]=2.*M_PI*fs;<sp/><sp/></highlight><highlight class="comment">//<sp/>konstantni<sp/>rychlost</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/>x[3]=M_PI/10.;</highlight></codeline>
<codeline lineno="94"><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>REL[0]=600;<sp/>REL[1]=12.0*sqrt(2);<sp/>REL[2]=2*M_PI*200;<sp/>REL[3]=3.14159;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>REL[4]=17.8;REL[5]=1.0;<sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>parametry<sp/>pro<sp/>v�kon<sp/>PMSM<sp/>6kW!!!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/>Isx=0.;Isy=0.;theta=x[3];rychlost=x[2];Uc_mer=Uc;</highlight></codeline>
<codeline lineno="99"><highlight class="normal">}</highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="sim__var_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" kindref="member" tooltip="Extended Kalman filter with unknown Q.">main</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="102"><highlight class="normal">{</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/>h=1e-6;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/>t_end=9.;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>profil<sp/>Isq<sp/>5s,<sp/>rozbeh<sp/>12s,<sp/>rozbeh<sp/>+/-<sp/>20s,<sp/>reverzace<sp/>12s</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/>t_sense=0.0;<sp/></highlight><highlight class="comment">//<sp/>1.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/>t=h;</highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/>sim_init();</highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>pwm_full_new_init(h,fc,DT,0,1,1);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/>pwm_full_new_init_3h(h,fc,DT,0,-1,-1);</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/>init_pmsm(param,<sp/>REL1);</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/>init_regulace(param,h_reg);</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/>init_ekf(h_reg,param);</highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/>fw=fopen(</highlight><highlight class="stringliteral">&quot;data/graf1.txt&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;w&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/>Idwf=0.;</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/>Ww=0.;</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/>Iqwf=0.;</highlight></codeline>
<codeline lineno="122"><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(t&lt;=t_end)</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/>pwm_full_new_3h(us,u,&amp;Iz,Ucn,Uc,x,va_char,pocet,MODULACE);<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>mod=0<sp/>...<sp/>sinusova<sp/>PWM,<sp/>mod=1<sp/>...<sp/>3.<sp/>harmonicka</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/>pmsm_double(*us,*(us+1),h,5);</highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(h_model_counter&gt;=h_model_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="129"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(reg_counter&gt;-1)<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/>reg.<sp/>smycka<sp/>jede<sp/>v<sp/>kazdem<sp/>ISR<sp/>=&gt;<sp/>reg_counter&gt;-1,<sp/>jinak<sp/>jako<sp/>u<sp/>ASM<sp/>reg_counter&gt;1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;.05)<sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>0.05</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>skokova<sp/>zmena<sp/>Isqw</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Iqwf=30.;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><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/>zmena<sp/>Isqw<sp/>po<sp/>rampa<sp/>-<sp/>profil</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Iqwf+=k_rampa*0.0125;<sp/>//<sp/>0.055</highlight></codeline>
<codeline lineno="138"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(Iqwf&gt;30.)<sp/>{Iqwf=30.;<sp/>if<sp/>(k_rampa_tmp&lt;8000)<sp/>k_rampa_tmp++;<sp/>else<sp/>{k_rampa=-1;k_rampa_tmp=0;}}</highlight></codeline>
<codeline lineno="139"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(Iqwf&lt;-30.)<sp/>{Iqwf=-30.;<sp/>if<sp/>(k_rampa_tmp&lt;8000)<sp/>k_rampa_tmp++;<sp/>else<sp/>{k_rampa=1;k_rampa_tmp=0;}}</highlight></codeline>
<codeline lineno="140"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>((t&gt;3.)<sp/>&amp;&amp;<sp/>(Iqwf&gt;0))<sp/>Iqwf=0;<sp/>/*<sp/>konec<sp/>profilu<sp/>Isqw<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="141"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(Iqwf&gt;0)<sp/>Iqwf=0;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(Ww&lt;2.*M_PI*275.)<sp/>Ww+=2.*M_PI*0.0125;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(Ww&gt;-2.*M_PI*275.)<sp/>Ww-=2.*M_PI*0.0125;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="145"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Ww=2.*M_PI*180;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>jednoducha<sp/>reverzace<sp/>-<sp/>cely<sp/>dej<sp/>cca<sp/>11s</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Ww+=k_rampa*2.*M_PI*0.125/2.;<sp/><sp/><sp/><sp/>//1000Hz/s</highlight></codeline>
<codeline lineno="148"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(Ww&gt;2.*M_PI*150.)<sp/>{Ww=2.*M_PI*150.;<sp/>if<sp/>(k_rampa_tmp&lt;8000)<sp/>k_rampa_tmp++;<sp/>else<sp/>{k_rampa=-1;k_rampa_tmp=0;}}</highlight></codeline>
<codeline lineno="149"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(Ww&lt;-2.*M_PI*150.)<sp/>Ww=-2.*M_PI*150.;<sp/><sp/><sp/>/*<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>skokova<sp/>zmena<sp/>napeti<sp/>troleje</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Ut=500;<sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>nutno<sp/>zadat<sp/>konstantni<sp/>Isdw<sp/>pri<sp/>startu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;0.2)<sp/>x[8]=1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;0.4)<sp/>x[8]=10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;0.6)<sp/>x[8]=25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;0.7)<sp/>Ww=2.*M_PI*10.;</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;1.0)<sp/>x[8]=1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;1.2)<sp/>x[8]=10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;1.4)<sp/>x[8]=25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;1.6)<sp/>Ww=2.*M_PI*50.;</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;1.9)<sp/>x[8]=1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;2.1)<sp/>x[8]=10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;2.3)<sp/>x[8]=25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="169"><highlight class="normal"></highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;2.5)<sp/>Ww=2.*M_PI*100;</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;2.8)<sp/>x[8]=1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;3.0)<sp/>x[8]=10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;3.2)<sp/>x[8]=25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="174"><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;3.4)<sp/>Ww=2.*M_PI*150;</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;3.7)<sp/>x[8]=1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;3.9)<sp/>x[8]=10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;4.1)<sp/>x[8]=25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;4.3)<sp/>Ww=2.*M_PI*0;</highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;4.8)<sp/>x[8]=-1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;5.0)<sp/>x[8]=-10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;5.2)<sp/>x[8]=-25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="184"><highlight class="normal"></highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;5.4)<sp/>Ww=2.*M_PI*(-10.);</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;5.7)<sp/>x[8]=-1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;5.9)<sp/>x[8]=-10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;6.1)<sp/>x[8]=-25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;6.3)<sp/>Ww=2.*M_PI*(-50.);</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;6.7)<sp/>x[8]=-1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;6.9)<sp/>x[8]=-10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;7.1)<sp/>x[8]=-25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="194"><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;7.3)<sp/>Ww=2.*M_PI*(-100.);</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;7.7)<sp/>x[8]=-1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;7.9)<sp/>x[8]=-10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;8.1)<sp/>x[8]=-25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;8.3)<sp/>x[8]=10.8;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>9A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;8.5)<sp/>x[8]=25.2;<sp/><sp/></highlight><highlight class="comment">//<sp/>21A</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="201"><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>letmy<sp/>start<sp/>s<sp/>nenulovym<sp/>momentem</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Iqwf=149.*sqrt(2.);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>pomal�<sp/>rozjezd<sp/>10s<sp/>do<sp/>max.<sp/>rychlosti<sp/>700rpm</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="207"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Iqwf=149.*sqrt(2.);<sp/><sp/><sp/><sp/><sp/>//<sp/>konst.<sp/>Isqw<sp/>=<sp/>Imax</highlight></codeline>
<codeline lineno="208"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[2]+=2.*M_PI*0.004;</highlight></codeline>
<codeline lineno="209"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(x[2]&gt;1615)<sp/>x[2]=1615;</highlight></codeline>
<codeline lineno="210"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(x[2]&lt;-1615)<sp/>x[2]=-1615;<sp/><sp/><sp/><sp/><sp/>/*<sp/>osetreni<sp/>pro<sp/>test<sp/>rozjezdu<sp/>do<sp/>zapornych<sp/>otacek<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="211"><highlight class="normal"></highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>rampa<sp/>rozjezd<sp/>5s<sp/>do<sp/>max.<sp/>rychlosti<sp/>700rpm<sp/>a<sp/>10s<sp/>do<sp/>-700rpm</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Iqwf=149.*sqrt(2.);<sp/><sp/><sp/><sp/><sp/>//<sp/>konst.<sp/>Isqw<sp/>=<sp/>Imax</highlight></codeline>
<codeline lineno="214"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[2]+=k_rampa*2.*M_PI*0.008;</highlight></codeline>
<codeline lineno="215"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(x[2]&gt;1615)<sp/>{x[2]=1615;<sp/>if<sp/>(k_rampa_tmp&lt;24000)<sp/>k_rampa_tmp++;<sp/>else<sp/>{k_rampa=-1;k_rampa_tmp=0;}}</highlight></codeline>
<codeline lineno="216"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(x[2]&lt;-1615)<sp/>x[2]=-1615;<sp/><sp/>/**/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="217"><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>KALMAN</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ekf(ekf_estim,*u,*(u+1),Ucn,Uc_mer,Isx,Isy);</highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>vystup<sp/>z<sp/>EKF<sp/>zaveden<sp/>do<sp/>regulatoru</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>rychlost=ekf_estim[0];<sp/>theta=ekf_estim[1];<sp/>//VS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="223"><highlight class="normal"></highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Urm_max=1.0;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>idealni<sp/>vzorkovani<sp/>-<sp/>test<sp/>vlivu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="227"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Isx=x[0];Isy=x[1];rychlost=x[2];theta=x[3];Uc_mer=Uc;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="228"><highlight class="normal"></highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(MODULACE==0)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>sinusova<sp/>PWM</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vektor_regulace(Idwf,Iqwf,Urm_max,Ww,u,Isx,Isy,theta,rychlost,Ucn/2.,Uc_mer,Ucn,REZIM_REGULACE);<sp/><sp/><sp/><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="231"><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/><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="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vektor_regulace(Idwf,Iqwf,Urm_max,Ww,u,Isx,Isy,theta,rychlost,Ucn/sqrt(3.),Uc_mer,Ucn,REZIM_REGULACE);</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="234"><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/><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="235"><highlight class="normal"></highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>reg_counter=0;</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Isx=x[0];Isy=x[1];rychlost=x[2];theta=x[3]+CHYBA_POLOHY;Uc_mer=Uc;<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>re�ln�<sp/>vzorkov�n�</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hpom_model=0;</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>h_model_counter=0;</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>reg_counter++;</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="243"><highlight class="normal"></highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;=t_sense)</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(print_counter&gt;199)</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{<sp/>fprintf(fw,</highlight><highlight class="stringliteral">&quot;%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>%f<sp/>\n&quot;</highlight><highlight class="normal">,t,x[0],x[1],x[6],*ladeni_regulace,x[7],*(ladeni_regulace+2),x[4],x[5],x[3],x[2],Ww,*(ladeni_regulace+1),Urm_max,*(ladeni_regulace+4),*(ladeni_regulace+5),x[10],*(ladeni_regulace+6),Uc,<sp/>*(ladeni_regulace+7),ladeni_pila,ladeni_ur,*(ladeni_regulace+8),*(ladeni_regulace+9),ekf_estim[0],ekf_estim[1]);</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>t,<sp/>Isx,<sp/>Isy,<sp/>Isd,<sp/>Isdw,<sp/>Isq,<sp/>Isqw,<sp/>M,<sp/>Fs,<sp/>poloha,<sp/>rychlost,<sp/>rychlost_w,<sp/>Urm,<sp/>Urm_max,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Fs_model,<sp/>M_model,<sp/>zatezny<sp/>uhel<sp/>(beta),<sp/>zatezny<sp/>uhel<sp/>vypocteny<sp/>z<sp/>napeti<sp/>(zbeta),<sp/>Uc</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>print_counter=0;</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="251"><highlight class="normal"></highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(h_disp&gt;0.2)</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>printf(</highlight><highlight class="stringliteral">&quot;%f<sp/>\n&quot;</highlight><highlight class="normal">,t);</highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>h_disp=0;</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="256"><highlight class="normal"></highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/>t+=h;</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/>hpom+=h;</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/>hpom_model+=h;</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/>h_model_counter++;</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/>h_disp+=h;</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/>print_counter++;</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="264"><highlight class="normal"></highlight></codeline>
<codeline lineno="265"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>printf(&quot;***<sp/>\n\n&quot;);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/>fclose(fw);</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/>}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/simul.cpp"/>
  </compounddef>
</doxygen>
