<?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="ekf__example_2regulace_8cpp" kind="file">
    <compoundname>regulace.cpp</compoundname>
    <includes local="no">math.h</includes>
    <includes refid="ekf__example_2nastaveni__regulatoru__float_8h" local="yes">nastaveni_regulatoru_float.h</includes>
    <includes refid="ekf__example_2regulace_8h" local="yes">regulace.h</includes>
    <incdepgraph>
      <node id="782">
        <label>work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp</label>
        <link refid="ekf_example/regulace.cpp"/>
        <childnode refid="783" relation="include">
        </childnode>
        <childnode refid="784" relation="include">
        </childnode>
        <childnode refid="785" relation="include">
        </childnode>
      </node>
      <node id="783">
        <label>math.h</label>
      </node>
      <node id="785">
        <label>regulace.h</label>
        <link refid="ekf__example_2regulace_8h-source"/>
      </node>
      <node id="784">
        <label>nastaveni_regulatoru_float.h</label>
        <link refid="ekf__example_2nastaveni__regulatoru__float_8h-source"/>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="ekf__example_2regulace_8cpp_1525335710b53cb064ca56b936120431e" prot="public" static="no">
        <name>_USE_MATH_DEFINES</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="15" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="15" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ekf__example_2regulace_8cpp_13176dc16728690b7f1c59d9916369e8a" prot="public" static="no">
        <name>MINud</name>
        <initializer>(-600.)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="17" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/nastaveni_regulatoru_float.h" bodystart="65" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1d326b4d3473dcc30a7320073b1a86411" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double ud</definition>
        <argsstring></argsstring>
        <name>ud</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="32" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="32" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_174352e2af5ca7b52f4e791577b424c37" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double uq</definition>
        <argsstring></argsstring>
        <name>uq</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="32" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="32" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_12c34e6d1341d3ee390071ecaf9411914" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double alfa</definition>
        <argsstring></argsstring>
        <name>alfa</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="32" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="32" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_19424343761f8c4f4c1afe8f5b6bf471b" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double beta</definition>
        <argsstring></argsstring>
        <name>beta</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="32" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="32" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1a6543b2bc53bf16c6be8dbdfa0c5137c" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Sid</definition>
        <argsstring></argsstring>
        <name>Sid</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="33" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1738b424830c2456934492c1f1ebf8248" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Siq</definition>
        <argsstring></argsstring>
        <name>Siq</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="33" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_155885ac468775a6ca90a0f4264404729" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Surm</definition>
        <argsstring></argsstring>
        <name>Surm</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="33" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_172ef72447ed7d41c6029759988e42dc6" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Kiqmax</definition>
        <argsstring></argsstring>
        <name>Kiqmax</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="36" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="36" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_102eeeeb5f00d724a3c82fb1d4ef8e8ed" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Iqwmax</definition>
        <argsstring></argsstring>
        <name>Iqwmax</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="36" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="36" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1d086f926f71e503743270604a5347508" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Iqw_reg</definition>
        <argsstring></argsstring>
        <name>Iqw_reg</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="36" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="36" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_151a59ff927f4ff0f0676c12e5c894a79" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Idw_urm</definition>
        <argsstring></argsstring>
        <name>Idw_urm</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="37" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="37" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_14024474a995bfe339bee8cb04778b27b" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Idw_reg</definition>
        <argsstring></argsstring>
        <name>Idw_reg</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="37" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="37" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1fa36cff2636c989fe0fa5c30e14d8d01" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Sw</definition>
        <argsstring></argsstring>
        <name>Sw</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="40" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="40" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_10400a8bbe686533c9817bebec485fd52" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double MAXw_lim</definition>
        <argsstring></argsstring>
        <name>MAXw_lim</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="40" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="40" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_16adf77edbad3c6c9a69c0f2b7c9ab99a" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double U</definition>
        <argsstring></argsstring>
        <name>U</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="42" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="42" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1861a0366ee90e5e1cf56cafe74ddaabe" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Um</definition>
        <argsstring></argsstring>
        <name>Um</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="43" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="43" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1e490ab2f2d71bb4fbe86fe8a62a60aeb" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Urmf</definition>
        <argsstring></argsstring>
        <name>Urmf</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="43" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="43" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_104c723a40b1200dacfcdcaaf51bbf5a4" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Kodv_ud</definition>
        <argsstring></argsstring>
        <name>Kodv_ud</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="46" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_12a8671331ef13ec24076a290487409d5" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Kodv_uind</definition>
        <argsstring></argsstring>
        <name>Kodv_uind</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="46" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1d900a67bffe289dfbb015b908a2d1685" prot="public" static="yes" 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/regulace.cpp" line="48" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="48" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_11c6d368fcf2a6b1c92e39c124d25d737" prot="public" static="yes" 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/regulace.cpp" line="48" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="48" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1faeae9ee7305d7ca47b2707b9e1823ca" prot="public" static="yes" 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/regulace.cpp" line="48" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="48" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1558972170606cd05054ab130beabad1e" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Fmag</definition>
        <argsstring></argsstring>
        <name>Fmag</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="48" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="48" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_115f09e12710588f190ffb75c32fd70e4" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double moment</definition>
        <argsstring></argsstring>
        <name>moment</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="48" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="48" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1bad4eebf61961d8f4731374800617981" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double K_Fs</definition>
        <argsstring></argsstring>
        <name>K_Fs</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="48" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="48" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_111a8f4d80b873b7ecfe5daf87b96c89a" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double K_moment</definition>
        <argsstring></argsstring>
        <name>K_moment</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="48" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="48" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1549a89c8114ff1e3d28010e2e1d3d862" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Ismaxf2</definition>
        <argsstring></argsstring>
        <name>Ismaxf2</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="49" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1a3378773e6dd84aeb1bcf451ba1d9025" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double tmp_omezeni</definition>
        <argsstring></argsstring>
        <name>tmp_omezeni</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="49" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="49" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_173d804f0e21a12004e8412d267f85add" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double ladeni_regulace[10]</definition>
        <argsstring>[10]</argsstring>
        <name>ladeni_regulace</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="51" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="51" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_18bf8016d7dc5deb088c84616ca363fbc" prot="public" static="no" mutable="no">
        <type>double</type>
        <definition>double Treg</definition>
        <argsstring></argsstring>
        <name>Treg</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="53" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="53" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_19fb1b5a606f3b960eef6e434cff36cf9" prot="public" static="yes" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int start_reg</definition>
        <argsstring></argsstring>
        <name>start_reg</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="55" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="55" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1724e5471347a3b8fc55408582a439303" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Ucf</definition>
        <argsstring></argsstring>
        <name>Ucf</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="56" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="56" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1cffe92c784d4792e909fe0052d3f74cf" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Isdf</definition>
        <argsstring></argsstring>
        <name>Isdf</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="56" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="56" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1ed6ad66b72239b34863a5518da23a713" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Ukomp</definition>
        <argsstring></argsstring>
        <name>Ukomp</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="56" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="56" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_16275120fea7036899961e5bcecfcdecb" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double zbeta</definition>
        <argsstring></argsstring>
        <name>zbeta</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="57" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="57" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_119972859c96879b7a8dbe9f86a079c07" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double zbeta_vyp</definition>
        <argsstring></argsstring>
        <name>zbeta_vyp</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="57" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="57" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1ddfc4ba6e7b71f345676d45a3421ee59" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double zbetaw</definition>
        <argsstring></argsstring>
        <name>zbetaw</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="57" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="57" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_1ae1fb64b97bf1939bcddea50398c1839" prot="public" static="yes" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int ALGORITMUS</definition>
        <argsstring></argsstring>
        <name>ALGORITMUS</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="59" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="59" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_10876bf201aac22bb65ba0060bc309f09" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double Sbeta</definition>
        <argsstring></argsstring>
        <name>Sbeta</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="62" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="62" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_154f4cc65f4ff134bd855fe5602cef6d9" prot="public" static="yes" mutable="no">
        <type>double</type>
        <definition>double SUkomp</definition>
        <argsstring></argsstring>
        <name>SUkomp</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="65" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="65" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ekf__example_2regulace_8cpp_12adf325de9025786052fa6ac5394a1ab" prot="public" static="yes" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int blokace_beta</definition>
        <argsstring></argsstring>
        <name>blokace_beta</name>
        <initializer>0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="68" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="68" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="ekf__example_2regulace_8cpp_1a53473deb0192802d1af2f518f5d3378" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void init_regulace</definition>
        <argsstring>(double *param, double TV)</argsstring>
        <name>init_regulace</name>
        <param>
          <type>double *</type>
          <declname>param</declname>
        </param>
        <param>
          <type>double</type>
          <declname>TV</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="21" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="112" bodyend="165"/>
      </memberdef>
      <memberdef kind="function" id="ekf__example_2regulace_8cpp_171d09500b31dfce56234053b946cbf34" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void vektor_regulace</definition>
        <argsstring>(double Idw, double Iqw, double Urm_max, double Ww, double *u, double Isx, double Isy, double theta, double rychlost, double Ucn_2, double Uc, double Ucn, unsigned int rezim)</argsstring>
        <name>vektor_regulace</name>
        <param>
          <type>double</type>
          <declname>Idw</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Iqw</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Urm_max</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Ww</declname>
        </param>
        <param>
          <type>double *</type>
          <declname>u</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Isx</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Isy</declname>
        </param>
        <param>
          <type>double</type>
          <declname>theta</declname>
        </param>
        <param>
          <type>double</type>
          <declname>rychlost</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Ucn_2</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Uc</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Ucn</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>rezim</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="23"/>
      </memberdef>
      <memberdef kind="function" id="ekf__example_2regulace_8cpp_11531262dc8e2967f7f7fbe649b632e8b" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void reset_regulatoru</definition>
        <argsstring>(void)</argsstring>
        <name>reset_regulatoru</name>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="25" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="372" bodyend="377"/>
      </memberdef>
      <memberdef kind="function" id="ekf__example_2regulace_8cpp_1154c64d72d9a6e1e1d5621c6561372eb" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>double</type>
        <definition>double pi_reg</definition>
        <argsstring>(double epsilon, double Kpf, double Kif, double MAX, double MIN, double *S)</argsstring>
        <name>pi_reg</name>
        <param>
          <type>double</type>
          <declname>epsilon</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Kpf</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Kif</declname>
        </param>
        <param>
          <type>double</type>
          <declname>MAX</declname>
        </param>
        <param>
          <type>double</type>
          <declname>MIN</declname>
        </param>
        <param>
          <type>double *</type>
          <declname>S</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="27" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="88" bodyend="99"/>
      </memberdef>
      <memberdef kind="function" id="ekf__example_2regulace_8cpp_1d52cd3d5f2f7c2561b9d318c3d9e66a8" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>double</type>
        <definition>double uhel</definition>
        <argsstring>(double x, double y)</argsstring>
        <name>uhel</name>
        <param>
          <type>double</type>
          <declname>x</declname>
        </param>
        <param>
          <type>double</type>
          <declname>y</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="28" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="71" bodyend="85"/>
      </memberdef>
      <memberdef kind="function" id="ekf__example_2regulace_8cpp_1355f57120e187949afdadc570d5c5bd6" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void filtr</definition>
        <argsstring>(double U, double *Uf, double kt)</argsstring>
        <name>filtr</name>
        <param>
          <type>double</type>
          <declname>U</declname>
        </param>
        <param>
          <type>double *</type>
          <declname>Uf</declname>
        </param>
        <param>
          <type>double</type>
          <declname>kt</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" line="29" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp" bodystart="101" bodyend="107"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*********************************</highlight></codeline>
<codeline lineno="2"><highlight class="comment"></highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Vektorove<sp/>rizeni</highlight></codeline>
<codeline lineno="4"><highlight class="comment"></highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>regulacni<sp/>struktura<sp/>-<sp/>plovouci<sp/>radova<sp/>carka</highlight></codeline>
<codeline lineno="6"><highlight class="comment"></highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Z.<sp/>Peroutka</highlight></codeline>
<codeline lineno="8"><highlight class="comment"></highlight></codeline>
<codeline lineno="9"><highlight class="comment">Rev.<sp/>15.3.2008</highlight></codeline>
<codeline lineno="10"><highlight class="comment"></highlight></codeline>
<codeline lineno="11"><highlight class="comment">5.6.2007<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Doplnen<sp/>vypocet<sp/>uhlu<sp/>beta,<sp/>ktery<sp/>doplnuje<sp/>regulator<sp/>Isq</highlight></codeline>
<codeline lineno="12"><highlight class="comment"></highlight></codeline>
<codeline lineno="13"><highlight class="comment">**********************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>_USE_MATH_DEFINES</highlight></codeline>
<codeline lineno="16"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#include<sp/>&lt;math.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;nastaveni_regulatoru_float.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></codeline>
<codeline lineno="20"><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>init_regulace(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*param,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>TV);</highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight><highlight class="comment">//void<sp/>vektor_regulace(double<sp/>Idw,<sp/>double<sp/>Iqw,<sp/>double<sp/>Urm_max,<sp/>double<sp/>Ww,<sp/>double<sp/>*u,<sp/>double<sp/>Isx,<sp/>double<sp/>Isy,<sp/>double<sp/>theta,<sp/>double<sp/>rychlost,<sp/>double<sp/>Ucn_2,<sp/>unsigned<sp/>int<sp/>rezim);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>vektor_regulace(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Idw,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Iqw,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Urm_max,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ww,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*u,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isx,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isy,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>theta,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>rychlost,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucn_2,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Uc,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucn,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rezim);</highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>reset_regulatoru(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="26"><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/>pi_reg(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>epsilon,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kpf,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kif,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>MAX,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>MIN,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*S);</highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>uhel(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>x,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>y);</highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>filtr(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>U,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*Uf,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>kt);</highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="comment">//<sp/>regulatory<sp/>proudu</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/>ud,<sp/>uq,<sp/>alfa,<sp/>beta;</highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Sid,<sp/>Siq,<sp/>Surm;</highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="comment">//<sp/>omezeni<sp/>momentu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kiqmax,<sp/>Iqwmax,<sp/>Iqw_reg;</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/>Idw_urm,<sp/>Idw_reg;</highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="comment">//<sp/>regulator<sp/>rychlosti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Sw,<sp/>MAXw_lim;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>U;</highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Um,<sp/>Urmf;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>velikost<sp/>napeti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="comment">//<sp/>odvazbovaci<sp/>obvod<sp/>-<sp/>blok<sp/>vypocet<sp/>napeti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kodv_ud,<sp/>Kodv_uind;</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/>Isd,<sp/>Isq,<sp/>Fs,<sp/>Fmag,<sp/>moment,<sp/>K_Fs,<sp/>K_moment;</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/>Ismaxf2,<sp/>tmp_omezeni;</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>ladeni_regulace[10];</highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Treg;</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">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>start_reg;</highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucf,<sp/>Isdf,<sp/>Ukomp;</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/>zbeta,<sp/>zbeta_vyp,<sp/>zbetaw;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>zatezny<sp/>uhel<sp/>vyhodnoceny<sp/>z<sp/>polohy<sp/>pozadovaneho<sp/>napeti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><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/>ALGORITMUS;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight><highlight class="comment">//<sp/>regulator<sp/>Isq<sp/>pres<sp/>zatezny<sp/>uhel</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Sbeta;</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight><highlight class="comment">//<sp/>regulator<sp/>Isd<sp/>-<sp/>kompenzace<sp/>vypocteneho<sp/>napeti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>SUkomp;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"></highlight><highlight class="comment">//<sp/>pomocne<sp/>promenne</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>blokace_beta=0;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>uhel(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>x,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>y)</highlight></codeline>
<codeline lineno="72"><highlight class="normal">{</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>th;</highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x==0)</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(y==0)<sp/>th=0.;</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(y&gt;0)<sp/>th=M_PI/2.;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>th=-M_PI/2.;</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/>th=atan(y/x);</highlight></codeline>
<codeline lineno="81"><highlight class="normal"></highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x&lt;0)<sp/>th+=M_PI;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>th;</highlight></codeline>
<codeline lineno="85"><highlight class="normal">}</highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>pi_reg(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>epsilon,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kpf,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kif,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>MAX,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>MIN,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*S)</highlight></codeline>
<codeline lineno="89"><highlight class="normal">{</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>out;</highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/>out=Kpf*epsilon+*S;</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(out&gt;MAX)<sp/>out=MAX;</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(out&lt;MIN)<sp/>out=MIN;</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/>*S+=Kif*epsilon;</highlight></codeline>
<codeline lineno="97"><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>out;</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">void</highlight><highlight class="normal"><sp/>filtr(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>U,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*Uf,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>kt)</highlight></codeline>
<codeline lineno="102"><highlight class="normal">{</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ufpom;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/>Ufpom=*Uf;</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/>*Uf=Ufpom+kt*(U-*Uf);</highlight></codeline>
<codeline lineno="107"><highlight class="normal">}</highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>init_regulace(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*param,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>TV)</highlight></codeline>
<codeline lineno="113"><highlight class="normal">{</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Kpd;<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>pomocna<sp/>velicina</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Rs,<sp/>Ls,<sp/>kp,<sp/>p;</highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>parametry<sp/>pro<sp/>odvazbeni</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/>Rs=*(param+0);</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/>Ls=*(param+1);</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/>Fmag=*(param+2);</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/>kp=*(param+5);</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/>p=*(param+4);</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vyhodit<sp/>az<sp/>sem<sp/>v<sp/>DSP<sp/>////////////////////</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal"></highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/>Sid=0;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>nulovani<sp/>integracni<sp/>slozky</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/>Siq=0;</highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulator<sp/>odbuzovani</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Kpd=Kpurm*2.0/Iref;<sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>2.0,<sp/>protoze<sp/>Urm<sp/>je<sp/>ladeno<sp/>v<sp/>pomernych<sp/>hodnotach<sp/>Um*2/Ucn<sp/>a<sp/>tady<sp/>je<sp/>to<sp/>vztazeno<sp/>na<sp/>Ucn</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Kiurmf=prevod((Kpd*TV/Tiurm),Q_Kiurm);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Kt_urm=prevod(TV/Tfurm,Q_Kturm);<sp/><sp/><sp/>//<sp/>casova<sp/>konstanta<sp/>filtru<sp/>Urm</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/>Surm=0;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>nulovani<sp/>integracni<sp/>slozky</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/>Urmf=0;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>filtrovane<sp/>napeti<sp/>Urm</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>omezeni<sp/>momentu<sp/>kvuli<sp/>momentu<sp/>zvratu<sp/>-<sp/>omezeni<sp/>pomoci<sp/>frmax</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/>Ismaxf2=Ismax*Ismax;</highlight></codeline>
<codeline lineno="139"><highlight class="normal"></highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>blok<sp/>VYPOCET<sp/>NAPETI</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/>Kodv_ud=Ls;</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/>Kodv_uind=Fmag;</highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulator<sp/>rychlosti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/>Sw=0;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>modelu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/>K_Fs=Ls;</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/>K_moment=kp*p*Fmag;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/>Treg=TV;</highlight></codeline>
<codeline lineno="152"><highlight class="normal"></highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>pocatecni<sp/>ALGORITMUS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/>ALGORITMUS=0;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>implicitne<sp/>se<sp/>pouzije<sp/>klasicke<sp/>vektorove<sp/>rizeni</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulator<sp/>Isq<sp/>prostrednictvim<sp/>beta</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/>zbeta=0.;</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/>Sbeta=0.;</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulator<sp/>Isd<sp/>-<sp/>kompenzace<sp/>vypocteneho<sp/>napeti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/>SUkomp=0.;</highlight></codeline>
<codeline lineno="162"><highlight class="normal"></highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>start<sp/>regulace</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/>start_reg=1;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>indikace<sp/>1.<sp/>pruchodu<sp/>regulacni<sp/>smyckou<sp/>kvuli<sp/>nastaveni<sp/>spravnych<sp/>hodnot<sp/>filtru<sp/>Uc<sp/>a<sp/>Isd</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal">}</highlight></codeline>
<codeline lineno="166"><highlight class="normal"></highlight></codeline>
<codeline lineno="167"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>vektor_regulace(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Idw,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Iqw,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Urm_max,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ww,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*u,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isx,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Isy,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>theta,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>rychlost,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucn_2,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Uc,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ucn,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rezim)</highlight></codeline>
<codeline lineno="168"><highlight class="normal">{</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>Isd,<sp/>Isq</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/>Isd=Isx*cos(theta)+Isy*sin(theta);</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/>Isq=Isy*cos(theta)-Isx*sin(theta);</highlight></codeline>
<codeline lineno="172"><highlight class="normal"></highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>filtrace<sp/>napeti<sp/>ss<sp/>obvodu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(start_reg==1)</highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/>{<sp/></highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/>Ucf=Uc;</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/>Isdf=Isd;</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/>start_reg=0;</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/>filtr(Uc,&amp;Ucf,Treg/Tfuc);</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/>filtr(Isd,&amp;Isdf,Treg/Tfid);</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/>}<sp/></highlight></codeline>
<codeline lineno="185"><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vyber<sp/>varianty<sp/>regulace</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fabs(rychlost)&gt;prechod_1_2)<sp/>ALGORITMUS=1;<sp/></highlight><highlight class="comment">//<sp/>prechod<sp/>z<sp/>algoritmu<sp/>1<sp/>na<sp/>2</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fabs(rychlost)&lt;prechod_2_1)<sp/>ALGORITMUS=0;<sp/></highlight><highlight class="comment">//<sp/>prechod<sp/>z<sp/>algortimu<sp/>2<sp/>na<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/>ALGORITMUS=0;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>provozovana<sp/>pouze<sp/>definovana<sp/>varianta<sp/>algoritmu<sp/>rizeni</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/>Iqw_reg=pi_reg(Ww-rychlost,Kpw,Kpw*Treg/Tiw,MAXw,-MAXw,&amp;Sw);</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rezim==0)</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/>Iqw_reg=Iqw;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>vyrazeni<sp/>reg.<sp/>rychlosti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rezim==2)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>zkouska<sp/>max.<sp/>momentu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/>Iqw_reg=Iqwmax;<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Iqw<sp/>=<sp/>sqrt(Imax^2-Idw^2)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ALGORITMUS==0)<sp/></highlight></codeline>
<codeline lineno="199"><highlight class="normal">{</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Regulator<sp/>odbuzovani</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/>Idw_urm=pi_reg(Urm_max-Urmf,Kpurm,Kpurm*Treg/Tiurm,0.,MINurm,&amp;Surm);</highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulace<sp/>proudu<sp/>Id,<sp/>Iq</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Idw_urm<sp/>=<sp/>Idw;<sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>vyrazena<sp/>regulace<sp/>Urm</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Idw_urm=0;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/>ud=pi_reg(Idw_urm-Isd,Kpi,Kpi*Treg/Tii,MAXi,-MAXi,&amp;Sid);</highlight></codeline>
<codeline lineno="207"><highlight class="normal"></highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>omezeni<sp/>max.<sp/>momentu<sp/>(resp.<sp/>max.<sp/>Iqw)<sp/>s<sp/>ohledem<sp/>na<sp/>max.<sp/>proud</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/>tmp_omezeni=Ismaxf2-Idw_urm*Idw_urm;</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_omezeni&lt;0)<sp/>Iqwmax=0;</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>Iqwmax=sqrt(tmp_omezeni);</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(MAXw&gt;Iqwmax)<sp/>MAXw_lim=Iqwmax;</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>MAXw_lim=MAXw;</highlight></codeline>
<codeline lineno="213"><highlight class="normal"></highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulace<sp/>rychlosti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Iqw_reg=pi_reg(Ww-rychlost,Kpw,Kpw*Treg/Tiw,MAXw_lim,-MAXw_lim,&amp;Sw);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="216"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>if<sp/>(rezim==0)</highlight></codeline>
<codeline lineno="217"><highlight class="comment"><sp/><sp/><sp/><sp/>Iqw_reg=Iqw;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>vyrazeni<sp/>reg.<sp/>rychlosti</highlight></codeline>
<codeline lineno="218"><highlight class="comment"><sp/><sp/>if<sp/>(rezim==2)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>zkouska<sp/>max.<sp/>momentu</highlight></codeline>
<codeline lineno="219"><highlight class="comment"><sp/><sp/><sp/><sp/>Iqw_reg=Iqwmax;<sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>Iqw<sp/>=<sp/>sqrt(Imax^2-Idw^2)</highlight></codeline>
<codeline lineno="220"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Iqw_reg&gt;Iqwmax)<sp/>Iqw_reg=Iqwmax;</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Iqw_reg&lt;-Iqwmax)<sp/>Iqw_reg=-Iqwmax;</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/>uq=pi_reg(Iqw_reg-Isq,Kpi,Kpi*Treg/Tii,MAXi,-MAXi,&amp;Siq);</highlight></codeline>
<codeline lineno="224"><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/>ud-=Kodv_ud*rychlost*Iqw_reg;</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/>uq+=Kodv_ud*rychlost*Idw_urm+Kodv_uind*rychlost;</highlight></codeline>
<codeline lineno="228"><highlight class="normal"></highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>omezeni<sp/>-<sp/>saturace<sp/>napeti<sp/>-<sp/>stejne<sp/>omezeni<sp/>jako<sp/>u<sp/>reg.<sp/>proudu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ud&gt;MAXi)<sp/>ud=MAXi;</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ud&lt;-MAXi)<sp/>ud=-MAXi;</highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(uq&gt;MAXi)<sp/>uq=MAXi;</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(uq&lt;-MAXi)<sp/>uq=-MAXi;</highlight></codeline>
<codeline lineno="234"><highlight class="normal"></highlight></codeline>
<codeline lineno="236"><highlight class="normal"></highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>velikost<sp/>a<sp/>poloha<sp/>vektoru<sp/>napeti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/>Um=sqrt(ud*ud+uq*uq);</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/>alfa=uhel(ud,uq);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"></highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>zatezneho<sp/>uhlu<sp/>z<sp/>pozadovaneho<sp/>napeti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rychlost&gt;=0)</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/>zbetaw=alfa-M_PI/2.;</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/>{<sp/>zbetaw=alfa+M_PI/2.;</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ud&lt;0)<sp/>zbetaw-=2.*M_PI;</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="248"><highlight class="normal"></highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/>Sbeta=zbetaw;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>inicializace<sp/>regulatoru<sp/>Isq<sp/>prostednictvim<sp/>beta<sp/>-<sp/>sumace<sp/>pri<sp/>prepnuti<sp/>nastavena<sp/>na<sp/>aktualni<sp/>hodnotu<sp/>zatezneho<sp/>uhlu!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="250"><highlight class="normal">}</highlight></codeline>
<codeline lineno="252"><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>(ALGORITMUS<sp/>==<sp/>1)<sp/><sp/><sp/><sp/>...<sp/>regulace<sp/>zatezneho<sp/>uhlu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="253"><highlight class="normal">{</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>omezeni<sp/>max.<sp/>momentu<sp/>(resp.<sp/>max.<sp/>Iqw)<sp/>s<sp/>ohledem<sp/>na<sp/>max.<sp/>proud</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/>tmp_omezeni=Ismaxf2-Isdf*Isdf;</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_omezeni&lt;0)<sp/>Iqwmax=0;</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>Iqwmax=sqrt(tmp_omezeni);</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(MAXw&gt;Iqwmax)<sp/>MAXw_lim=Iqwmax;</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>MAXw_lim=MAXw;</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulace<sp/>rychlosti</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="262"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>Iqw_reg=pi_reg(Ww-rychlost,Kpw,Kpw*Treg/Tiw,MAXw_lim,-MAXw_lim,&amp;Sw);</highlight></codeline>
<codeline lineno="263"><highlight class="comment"><sp/><sp/>if<sp/>(rezim==0)</highlight></codeline>
<codeline lineno="264"><highlight class="comment"><sp/><sp/><sp/><sp/>Iqw_reg=Iqw;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>vyrazeni<sp/>reg.<sp/>rychlosti</highlight></codeline>
<codeline lineno="265"><highlight class="comment"><sp/><sp/>if<sp/>(rezim==2)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>zkouska<sp/>max.<sp/>momentu</highlight></codeline>
<codeline lineno="266"><highlight class="comment"><sp/><sp/><sp/><sp/>Iqw_reg=Iqwmax;<sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>Iqw<sp/>=<sp/>sqrt(Imax^2-Idw^2)</highlight></codeline>
<codeline lineno="267"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Iqw_reg&gt;Iqwmax)<sp/>Iqw_reg=Iqwmax;</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Iqw_reg&lt;-Iqwmax)<sp/>Iqw_reg=-Iqwmax;</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="271"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Iqw_reg=Iqw;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>bez<sp/>omezovani<sp/>Isqw</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>regulace<sp/>Isq<sp/>prostrednictvim<sp/>zatezneho<sp/>uhlu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/>zbeta=pi_reg(Iqw_reg-Isq,Kpib,Kpib*Treg/Tiib,MAXbeta,-MAXbeta,&amp;Sbeta);</highlight></codeline>
<codeline lineno="274"><highlight class="normal"></highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>test<sp/>upravy<sp/>signalu<sp/>beta</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="276"><highlight class="normal"></highlight><highlight class="comment">//if<sp/>((zbeta&gt;73./180.*M_PI)||(blokace_beta==1))<sp/>{zbeta=80./180.*M_PI;<sp/>blokace_beta=1;}</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="277"><highlight class="normal"></highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>napeti<sp/>-<sp/>jednoducha<sp/>varianta<sp/>bez<sp/>uvazovani<sp/>odbuzeni</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/>Um=sqrt(Kodv_uind*Kodv_uind*rychlost*rychlost+Kodv_ud*Kodv_ud*rychlost*rychlost*Iqw_reg*Iqw_reg);<sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>rychlost<sp/>musi<sp/>byt<sp/>v<sp/>kvadratu,<sp/>aby<sp/>se<sp/>eliminoval<sp/>vliv<sp/>znamenka<sp/>rychlosti<sp/>-<sp/>Um<sp/>musi<sp/>byt<sp/>&gt;=0!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="280"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Um=rychlost*sqrt(Kodv_uind*Kodv_uind+Kodv_ud*Kodv_ud*Iqw*Iqw);<sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>neni<sp/>uvazovano<sp/>omezeni<sp/>Isqw</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="281"><highlight class="normal"></highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vylepseny<sp/>vypocet<sp/>napeti<sp/>-<sp/>odvazbovaci<sp/>obvod</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="283"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>ud=Kodv_ud*rychlost*Iqw_reg;</highlight></codeline>
<codeline lineno="284"><highlight class="comment"><sp/><sp/>uq=Kodv_ud*rychlost*Isdf+Kodv_uind*rychlost;</highlight></codeline>
<codeline lineno="285"><highlight class="comment"><sp/><sp/>Um=sqrt(ud*ud+uq*uq);</highlight></codeline>
<codeline lineno="286"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>korece<sp/>napeti<sp/>pomoci<sp/>regulatoru<sp/>Isd</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/>Ukomp=pi_reg(0.-Isd,0,1.*Treg/Tiidb,MAXud,MINud,&amp;SUkomp);<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>do<sp/>zaporu<sp/>neomezovat!!!<sp/><sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/>Um+=Ukomp;</highlight></codeline>
<codeline lineno="291"><highlight class="normal"></highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>zahrnuti<sp/>vlivu<sp/>skutecneho<sp/>napeti<sp/>Uc</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/>Um=Um*Ucn/Ucf;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>v<sp/>pevne<sp/>radove<sp/>carce<sp/>pak:<sp/>Um=(long)Um*Qm/Ucf;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="294"><highlight class="normal"></highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>omezeni<sp/>na<sp/>Urm=1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Um&gt;Ucn_2)<sp/>Um=Ucn_2;</highlight></codeline>
<codeline lineno="297"><highlight class="normal"></highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/>reset_regulatoru();<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>zajistuje<sp/>pripravenost<sp/>reg.<sp/>struktury<sp/>VAR1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="299"><highlight class="normal"></highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>doplneni<sp/>vypoctu<sp/>zatezneho<sp/>uhlu<sp/>...<sp/>zbeta_vyp</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fabs(rychlost*Kodv_ud*Iqw_reg)&gt;=Um)</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Iqw_reg&gt;0)</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rychlost&gt;0)<sp/>zbeta_vyp=M_PI/2.;</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>zbeta_vyp=-M_PI/2.;</highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rychlost&gt;0)<sp/>zbeta_vyp=-M_PI/2.;</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>zbeta_vyp=M_PI/2.;</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/>zbeta_vyp=asin(rychlost*Kodv_ud*Iqw_reg/Um);<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>kontrola,<sp/>zda<sp/>Kodv_ud=Ls!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="310"><highlight class="normal"></highlight></codeline>
<codeline lineno="311"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>zbeta=0;<sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>vyrazeni<sp/>reg.<sp/>Isq</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/>zbeta_vyp=0;<sp/><sp/></highlight><highlight class="comment">//<sp/>vyrazeni<sp/>bloku<sp/>&quot;vypocet<sp/>zatezneho<sp/>uhlu&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>urceni<sp/>pozadovaneho<sp/>zatezneho<sp/>uhlu<sp/>a<sp/>jeho<sp/>omezeni<sp/>na<sp/>&lt;-90st;<sp/>90st.&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rychlost&lt;0)</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/>zbetaw=-zbeta_vyp+zbeta;</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/>zbetaw=zbeta_vyp+zbeta;</highlight></codeline>
<codeline lineno="318"><highlight class="normal"></highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(zbetaw&gt;MAXbeta)</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/>zbetaw=MAXbeta;</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(zbetaw&lt;-MAXbeta)</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/>zbetaw=-MAXbeta;<sp/></highlight></codeline>
<codeline lineno="323"><highlight class="normal"></highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>urceni<sp/>polohy<sp/>vektoru<sp/>napeti<sp/>v<sp/>souradnem<sp/>systemu<sp/>(d,q)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rychlost&lt;0)</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/>alfa=zbetaw-M_PI/2.;</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/>alfa=zbetaw+M_PI/2.;</highlight></codeline>
<codeline lineno="329"><highlight class="normal">}</highlight></codeline>
<codeline lineno="331"><highlight class="normal"></highlight></codeline>
<codeline lineno="332"><highlight class="normal"></highlight><highlight class="comment">//<sp/>KOD<sp/>SPOLECNY<sp/>PRO<sp/>OBE<sp/>REGULACNI<sp/>STRUKTURY</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>polohy<sp/>vektoru<sp/>napeti<sp/>ve<sp/>stojicim<sp/>souradnem<sp/>systemu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/>beta=alfa+theta;</highlight></codeline>
<codeline lineno="335"><highlight class="normal"></highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>Urmf<sp/>pro<sp/>dalsi<sp/>periodu<sp/>vzorkovani</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/>filtr(Um/Ucn_2,&amp;Urmf,Treg/Tfurm);</highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>vypocet<sp/>velikosti<sp/>toku<sp/>a<sp/>momentu</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/>Fs=Fmag+K_Fs*Isd;</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/>moment=K_moment*Isq;</highlight></codeline>
<codeline lineno="342"><highlight class="normal"></highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>test<sp/>filtru<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>-<sp/>umisteni<sp/>filtru<sp/>nema<sp/>vubec<sp/>vliv<sp/>na<sp/>kvalitu<sp/>regulace<sp/>algoritmy<sp/>var.<sp/>2</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="344"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>if<sp/>(start_reg==0)</highlight></codeline>
<codeline lineno="345"><highlight class="comment"><sp/><sp/>{</highlight></codeline>
<codeline lineno="346"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>filtr(Uc,&amp;Ucf,Treg/Tfuc);</highlight></codeline>
<codeline lineno="347"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>filtr(Isd,&amp;Isdf,Treg/Tfid);</highlight></codeline>
<codeline lineno="348"><highlight class="comment"><sp/><sp/>}<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="349"><highlight class="normal"></highlight></codeline>
<codeline lineno="351"><highlight class="normal"></highlight></codeline>
<codeline lineno="352"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Odblokovat<sp/>pri<sp/>pouziti<sp/>PWM_FULL_NEW()</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="353"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>*u=ud*cos(theta)-uq*sin(theta);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="354"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>*(u+1)=ud*sin(theta)+uq*cos(theta);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="355"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Odblokovat<sp/>pri<sp/>pouziti<sp/>PWM_FULL_NEW_3h()</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/>*u=Um;</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/>*(u+1)=beta;</highlight></codeline>
<codeline lineno="358"><highlight class="normal"></highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/>ladeni_regulace[0]=Idw_urm;</highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/>ladeni_regulace[1]=Urmf;</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/>ladeni_regulace[2]=Iqw_reg;</highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/>ladeni_regulace[3]=Um;</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/>ladeni_regulace[4]=Fs;</highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/>ladeni_regulace[5]=moment;</highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/>ladeni_regulace[6]=zbetaw;</highlight></codeline>
<codeline lineno="366"><highlight class="normal"><sp/><sp/>ladeni_regulace[7]=Um/Ucn_2;</highlight></codeline>
<codeline lineno="367"><highlight class="normal"><sp/><sp/>ladeni_regulace[8]=Ukomp;</highlight></codeline>
<codeline lineno="368"><highlight class="normal"><sp/><sp/>ladeni_regulace[9]=ALGORITMUS;</highlight></codeline>
<codeline lineno="369"><highlight class="normal">}</highlight></codeline>
<codeline lineno="370"><highlight class="normal"></highlight></codeline>
<codeline lineno="371"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>reset_regulatoru(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="372"><highlight class="normal">{</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/>Surm=0;</highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/>Sid=0;</highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/>Siq=0;</highlight></codeline>
<codeline lineno="376"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/regulace.cpp"/>
  </compounddef>
</doxygen>
