<?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="pmsm__sim3_8cpp" kind="file">
    <compoundname>pmsm_sim3.cpp</compoundname>
    <includes local="no">itpp/itbase.h</includes>
    <includes refid="libKF_8h" local="no">estim/libKF.h</includes>
    <includes refid="libPF_8h" local="no">estim/libPF.h</includes>
    <includes refid="libFN_8h" local="no">stat/libFN.h</includes>
    <includes refid="pmsm_8h" local="yes">pmsm.h</includes>
    <includes refid="simulator_8h" local="yes">simulator.h</includes>
    <includes local="yes">../simulator_zdenek/ekf_example/ekf_obj.h</includes>
    <includes local="yes">iopom.h</includes>
    <incdepgraph>
      <node id="624">
        <label>../simulator_zdenek/ekf_example/ekf_obj.h</label>
      </node>
      <node id="616">
        <label>libBM.h</label>
        <link refid="libBM_8h"/>
        <childnode refid="613" relation="include">
        </childnode>
      </node>
      <node id="623">
        <label>simulator.h</label>
        <link refid="simulator_8h-source"/>
      </node>
      <node id="622">
        <label>pmsm.h</label>
        <link refid="pmsm_8h-source"/>
        <childnode refid="615" relation="include">
        </childnode>
      </node>
      <node id="625">
        <label>iopom.h</label>
      </node>
      <node id="619">
        <label>../itpp_ext.h</label>
        <link refid="itpp__ext_8h-source"/>
        <childnode refid="613" relation="include">
        </childnode>
      </node>
      <node id="617">
        <label>../stat/libEF.h</label>
        <link refid="libEF_8h"/>
        <childnode refid="613" relation="include">
        </childnode>
        <childnode refid="618" relation="include">
        </childnode>
        <childnode refid="616" relation="include">
        </childnode>
        <childnode refid="619" relation="include">
        </childnode>
      </node>
      <node id="621">
        <label>estim/libPF.h</label>
        <link refid="libPF_8h"/>
        <childnode refid="613" relation="include">
        </childnode>
        <childnode refid="617" relation="include">
        </childnode>
        <childnode refid="618" relation="include">
        </childnode>
      </node>
      <node id="615">
        <label>../stat/libFN.h</label>
        <link refid="libFN_8h-source"/>
        <childnode refid="613" relation="include">
        </childnode>
        <childnode refid="616" relation="include">
        </childnode>
      </node>
      <node id="613">
        <label>itpp/itbase.h</label>
      </node>
      <node id="612">
        <label>work/git/mixpp/pmsm/pmsm_sim3.cpp</label>
        <link refid="pmsm_sim3.cpp"/>
        <childnode refid="613" relation="include">
        </childnode>
        <childnode refid="614" relation="include">
        </childnode>
        <childnode refid="621" relation="include">
        </childnode>
        <childnode refid="615" relation="include">
        </childnode>
        <childnode refid="622" relation="include">
        </childnode>
        <childnode refid="623" relation="include">
        </childnode>
        <childnode refid="624" relation="include">
        </childnode>
        <childnode refid="625" relation="include">
        </childnode>
      </node>
      <node id="620">
        <label>../math/chmat.h</label>
        <link refid="chmat_8h"/>
        <childnode refid="613" relation="include">
        </childnode>
        <childnode refid="618" relation="include">
        </childnode>
        <childnode refid="619" relation="include">
        </childnode>
      </node>
      <node id="614">
        <label>estim/libKF.h</label>
        <link refid="libKF_8h"/>
        <childnode refid="613" relation="include">
        </childnode>
        <childnode refid="615" relation="include">
        </childnode>
        <childnode refid="617" relation="include">
        </childnode>
        <childnode refid="620" relation="include">
        </childnode>
      </node>
      <node id="618">
        <label>../math/libDC.h</label>
        <link refid="libDC_8h"/>
        <childnode refid="613" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="pmsm__sim3_8cpp_1e447b6cc84b8f808272762ff23bc5eaa" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void set_simulator_t</definition>
        <argsstring>(double &amp;Ww)</argsstring>
        <name>set_simulator_t</name>
        <param>
          <type>double &amp;</type>
          <declname>Ww</declname>
        </param>
        <briefdescription>
<para>Extended <ref refid="classKalman" kindref="compound">Kalman</ref> filter with unknown <computeroutput>Q</computeroutput>. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/pmsm_sim3.cpp" line="27" bodyfile="/home/smidl/work/git/mixpp/pmsm/pmsm_sim3.cpp" bodystart="27" bodyend="76"/>
      </memberdef>
      <memberdef kind="function" id="pmsm__sim3_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int main</definition>
        <argsstring>()</argsstring>
        <name>main</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/pmsm_sim3.cpp" line="78" bodyfile="/home/smidl/work/git/mixpp/pmsm/pmsm_sim3.cpp" bodystart="78" bodyend="165"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/><sp/>\file</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/><sp/>\brief<sp/>Models<sp/>for<sp/>synchronous<sp/>electric<sp/>drive<sp/>using<sp/>IT++<sp/>and<sp/>BDM</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/><sp/>\author<sp/>Vaclav<sp/>Smidl.</highlight></codeline>
<codeline lineno="5"><highlight class="comment"></highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/><sp/>-----------------------------------</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/><sp/>BDM++<sp/>-<sp/>C++<sp/>library<sp/>for<sp/>Bayesian<sp/>Decision<sp/>Making<sp/>under<sp/>Uncertainty</highlight></codeline>
<codeline lineno="8"><highlight class="comment"></highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/><sp/>Using<sp/>IT++<sp/>for<sp/>numerical<sp/>operations</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/><sp/>-----------------------------------</highlight></codeline>
<codeline lineno="11"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;itpp/itbase.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="libKF_8h" kindref="compound" tooltip="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions.">estim/libKF.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="libPF_8h" kindref="compound" tooltip="Bayesian Filtering using stochastic sampling (Particle Filters).">estim/libPF.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stat/libFN.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;pmsm.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;simulator.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">#include<sp/>&quot;../simulator_zdenek/ekf_example/ekf_obj.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;iopom.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>set_simulator_t(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>&amp;Ww)<sp/>{</highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t&gt;0.0002)<sp/>x[8]=1.2;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1A<sp/>//0.2ZP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><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="31"><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="32"><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><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="34"><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="35"><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="36"><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="37"><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><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="39"><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="40"><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="41"><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="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><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="44"><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="45"><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="46"><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="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><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="49"><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="50"><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="51"><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="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><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="54"><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="55"><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="56"><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="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><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="59"><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="60"><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="61"><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="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><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="64"><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="65"><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="66"><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="67"><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><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="69"><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="70"><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="71"><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="72"><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="73"><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="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[8]=0.0;</highlight></codeline>
<codeline lineno="76"><highlight class="normal">}</highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight></codeline>
<codeline lineno="78"><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>()<sp/>{</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Kalman<sp/>filter</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Ndat<sp/>=<sp/>90000;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>h<sp/>=<sp/>1e-6;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Nsimstep<sp/>=<sp/>125;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Npart<sp/>=<sp/>100;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="85"><highlight class="normal"></highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>mu0=<sp/></highlight><highlight class="stringliteral">&quot;0.0<sp/>0.0<sp/>0.0<sp/>0.0&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>Qdiag<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;0.05<sp/>0.05<sp/>0.002<sp/>0.001&quot;</highlight><highlight class="normal"><sp/>);<sp/></highlight><highlight class="comment">//zdenek:<sp/>0.01<sp/>0.01<sp/>0.0001<sp/>0.0001</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>Rdiag<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;0.05<sp/>0.05&quot;</highlight><highlight class="normal"><sp/>);<sp/></highlight><highlight class="comment">//var(diff(xth))<sp/>=<sp/>&quot;0.034<sp/>0.034&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>Q<sp/>(<sp/>Qdiag<sp/>);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>R<sp/>(<sp/>Rdiag<sp/>);</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>rQ<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;100&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;{Q}&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;4&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;0&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classEKFfixed" kindref="compound" tooltip="Extended Kalman Filter with full matrices in fixed point arithmetic.">EKFfixed</ref><sp/>KFE<sp/>(<sp/>rx,<sp/>rQ);</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>KFE.init_ekf<sp/>(<sp/>Nsimstep*h);</highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmgamma__fix" kindref="compound" tooltip="Gamma random walk around a fixed point.">mgamma_fix</ref><sp/>evolQ<sp/>(<sp/>rQ,rQ<sp/>);</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classMPF" kindref="compound" tooltip="Marginalized Particle filter.">MPF&lt;EKFfixed&gt;</ref><sp/>M<sp/>(<sp/>rx,rQ,evolQ,evolQ,Npart,KFE<sp/>);</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>initialize</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>evolQ.set_parameters<sp/>(<sp/>10.0<sp/>,Qdiag,<sp/>1.0);<sp/></highlight><highlight class="comment">//sigma<sp/>=<sp/>1/10<sp/>mu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>evolQ.condition<sp/>(<sp/>Qdiag<sp/>);<sp/></highlight><highlight class="comment">//Zdenek<sp/>default</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classepdf" kindref="compound" tooltip="Probability density function with numerical statistics, e.g. posterior density.">epdf</ref>&amp;<sp/>pfinit=evolQ._epdf();</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>M.set_est<sp/>(<sp/>pfinit<sp/>);</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>evolQ.set_parameters<sp/>(<sp/>500000.0,<sp/>Qdiag,<sp/>0.9999<sp/>);</highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classepdf" kindref="compound" tooltip="Probability density function with numerical statistics, e.g. posterior density.">epdf</ref>&amp;<sp/>KFEep<sp/>=<sp/>KFE._epdf();</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classepdf" kindref="compound" tooltip="Probability density function with numerical statistics, e.g. posterior density.">epdf</ref>&amp;<sp/>Mep<sp/>=<sp/>M._epdf();</highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Xt=zeros<sp/>(<sp/>Ndat<sp/>,9<sp/>);<sp/></highlight><highlight class="comment">//true<sp/>state<sp/>from<sp/>simulator</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Dt=zeros<sp/>(<sp/>Ndat,4<sp/>);<sp/></highlight><highlight class="comment">//observation</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>XtE=zeros<sp/>(<sp/>Ndat,<sp/>4<sp/>);</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>XtM=zeros<sp/>(<sp/>Ndat,4+4<sp/>);<sp/></highlight><highlight class="comment">//Q<sp/>+<sp/>x</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>SET<sp/>SIMULATOR</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pmsmsim_set_parameters<sp/>(<sp/>0.28,0.003465,0.1989,0.0,4,1.5,0.04,<sp/>200.,<sp/>3e-6,<sp/>h<sp/>);</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ww=0.0;</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>k_rampa=1;</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>k_rampa_tmp=0;</highlight></codeline>
<codeline lineno="122"><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>dt<sp/>(<sp/>2<sp/>);</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>ut<sp/>(<sp/>2<sp/>);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>tK=1;tK&lt;Ndat;tK++<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Number<sp/>of<sp/>steps<sp/>of<sp/>a<sp/>simulator<sp/>for<sp/>one<sp/>step<sp/>of<sp/>Kalman</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ii=0;<sp/>ii&lt;Nsimstep;ii++<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="129"><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/></highlight><highlight class="comment">//simulator</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><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/>Ww+=k_rampa*2.*M_PI*2e-4;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//1000Hz/s</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><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/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>Ww&gt;2.*M_PI*150.<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="132"><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/>Ww=2.*M_PI*150.;</highlight></codeline>
<codeline lineno="133"><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/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>k_rampa_tmp&lt;500000<sp/>)<sp/>k_rampa_tmp++;</highlight></codeline>
<codeline lineno="134"><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/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{k_rampa=-1;k_rampa_tmp=0;}</highlight></codeline>
<codeline lineno="135"><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/>};</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/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>Ww&lt;-2.*M_PI*150.<sp/>)<sp/>Ww=-2.*M_PI*150.;<sp/></highlight><highlight class="comment">/*<sp/>*/</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/><sp/><sp/><sp/><sp/><sp/><sp/>set_simulator_t(Ww);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><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/>pmsmsim_step<sp/>(<sp/>Ww<sp/>);</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>};</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>collect<sp/>data</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ut<sp/>(<sp/>0<sp/>)<sp/>=<sp/>KalmanObs[0];</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ut<sp/>(<sp/>1<sp/>)<sp/>=<sp/>KalmanObs[1];</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dt<sp/>(<sp/>0<sp/>)<sp/>=<sp/>KalmanObs[2];</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dt<sp/>(<sp/>1<sp/>)<sp/>=<sp/>KalmanObs[3];</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//estimator</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/>KFE.bayes<sp/>(<sp/>concat<sp/>(<sp/>dt,ut<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>M.bayes<sp/>(<sp/>concat<sp/>(<sp/>dt,ut<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Xt.set_row<sp/>(<sp/>tK,vec<sp/>(<sp/>x,9<sp/>)<sp/>);<sp/></highlight><highlight class="comment">//vec<sp/>from<sp/>C-array</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Dt.set_row<sp/>(<sp/>tK,<sp/>concat<sp/>(<sp/>dt,ut));</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>XtE.set_row<sp/>(<sp/>tK,KFEep.<ref refid="classepdf_1bf0a070a8f3e67a93604ca724638b870" kindref="member" tooltip="return expected value">mean</ref>()<sp/>);</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>XtM.set_row<sp/>(<sp/>tK,Mep.<ref refid="classepdf_1bf0a070a8f3e67a93604ca724638b870" kindref="member" tooltip="return expected value">mean</ref>()<sp/>);</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"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>tmpstr[200];</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sprintf(tmpstr,</highlight><highlight class="stringliteral">&quot;%s/%s&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;herez/&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;format&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ofstream<sp/><sp/>form(tmpstr);</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>form<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;#<sp/>Experimetal<sp/>header<sp/>file&quot;</highlight><highlight class="normal">&lt;&lt;<sp/>endl;</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dirfile_write(form,</highlight><highlight class="stringliteral">&quot;herez/&quot;</highlight><highlight class="normal">,Xt,</highlight><highlight class="stringliteral">&quot;X&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;{isa<sp/>isb<sp/>om<sp/>th<sp/>}&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dirfile_write<sp/>(<sp/>form,</highlight><highlight class="stringliteral">&quot;herez&quot;</highlight><highlight class="normal">,XtM,</highlight><highlight class="stringliteral">&quot;XtM&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;{q1<sp/>q2<sp/>q3<sp/>q4<sp/>isa<sp/>isb<sp/>om<sp/>th<sp/>}&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dirfile_write<sp/>(<sp/>form,</highlight><highlight class="stringliteral">&quot;herez&quot;</highlight><highlight class="normal">,XtE,</highlight><highlight class="stringliteral">&quot;XE&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;{isa<sp/>isb<sp/>om<sp/>th<sp/>}&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dirfile_write<sp/>(<sp/>form,</highlight><highlight class="stringliteral">&quot;herez&quot;</highlight><highlight class="normal">,Dt,</highlight><highlight class="stringliteral">&quot;Dt&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;{isa<sp/>isb<sp/>ua<sp/>ub<sp/>}&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="163"><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><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="165"><highlight class="normal">}</highlight></codeline>
<codeline lineno="166"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/pmsm/pmsm_sim3.cpp"/>
  </compounddef>
</doxygen>
