1 | <?xml version='1.0' encoding='UTF-8' standalone='no'?> |
---|
2 | <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6"> |
---|
3 | <compounddef id="testbidiff_8cpp" kind="file"> |
---|
4 | <compoundname>testbidiff.cpp</compoundname> |
---|
5 | <includes local="no">itpp/itbase.h</includes> |
---|
6 | <includes refid="libBM_8h" local="yes">../bdm/stat/libBM.h</includes> |
---|
7 | <includes refid="pmsm_8h" local="yes">pmsm.h</includes> |
---|
8 | <incdepgraph> |
---|
9 | <node id="800"> |
---|
10 | <label>work/git/mixpp/pmsm/testbidiff.cpp</label> |
---|
11 | <link refid="testbidiff.cpp"/> |
---|
12 | <childnode refid="801" relation="include"> |
---|
13 | </childnode> |
---|
14 | <childnode refid="802" relation="include"> |
---|
15 | </childnode> |
---|
16 | <childnode refid="803" relation="include"> |
---|
17 | </childnode> |
---|
18 | </node> |
---|
19 | <node id="802"> |
---|
20 | <label>../bdm/stat/libBM.h</label> |
---|
21 | <link refid="libBM_8h"/> |
---|
22 | <childnode refid="801" relation="include"> |
---|
23 | </childnode> |
---|
24 | </node> |
---|
25 | <node id="803"> |
---|
26 | <label>pmsm.h</label> |
---|
27 | <link refid="pmsm_8h-source"/> |
---|
28 | <childnode refid="804" relation="include"> |
---|
29 | </childnode> |
---|
30 | </node> |
---|
31 | <node id="804"> |
---|
32 | <label>stat/libFN.h</label> |
---|
33 | <link refid="libFN_8h-source"/> |
---|
34 | <childnode refid="801" relation="include"> |
---|
35 | </childnode> |
---|
36 | <childnode refid="802" relation="include"> |
---|
37 | </childnode> |
---|
38 | </node> |
---|
39 | <node id="801"> |
---|
40 | <label>itpp/itbase.h</label> |
---|
41 | </node> |
---|
42 | </incdepgraph> |
---|
43 | <sectiondef kind="func"> |
---|
44 | <memberdef kind="function" id="testbidiff_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
45 | <type>int</type> |
---|
46 | <definition>int main</definition> |
---|
47 | <argsstring>()</argsstring> |
---|
48 | <name>main</name> |
---|
49 | <briefdescription> |
---|
50 | </briefdescription> |
---|
51 | <detaileddescription> |
---|
52 | </detaileddescription> |
---|
53 | <inbodydescription> |
---|
54 | </inbodydescription> |
---|
55 | <location file="/home/smidl/work/git/mixpp/pmsm/testbidiff.cpp" line="13" bodyfile="/home/smidl/work/git/mixpp/pmsm/testbidiff.cpp" bodystart="12" bodyend="37"/> |
---|
56 | </memberdef> |
---|
57 | </sectiondef> |
---|
58 | <briefdescription> |
---|
59 | </briefdescription> |
---|
60 | <detaileddescription> |
---|
61 | </detaileddescription> |
---|
62 | <programlisting> |
---|
63 | <codeline lineno="1"><highlight class="preprocessor">#include<sp/><itpp/itbase.h></highlight><highlight class="normal"></highlight></codeline> |
---|
64 | <codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"../bdm/stat/libBM.h"</highlight><highlight class="normal"></highlight></codeline> |
---|
65 | <codeline lineno="3"><highlight class="normal"></highlight></codeline> |
---|
66 | <codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"pmsm.h"</highlight><highlight class="normal"></highlight></codeline> |
---|
67 | <codeline lineno="5"><highlight class="normal"></highlight></codeline> |
---|
68 | <codeline lineno="6"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline> |
---|
69 | <codeline lineno="7"><highlight class="normal"></highlight></codeline> |
---|
70 | <codeline lineno="8"><highlight class="normal"></highlight><highlight class="comment">//These<sp/>lines<sp/>are<sp/>needed<sp/>for<sp/>use<sp/>of<sp/>cout<sp/>and<sp/>endl</highlight><highlight class="normal"></highlight></codeline> |
---|
71 | <codeline lineno="9"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::cout;</highlight></codeline> |
---|
72 | <codeline lineno="10"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::endl;</highlight></codeline> |
---|
73 | <codeline lineno="11"><highlight class="normal"></highlight></codeline> |
---|
74 | <codeline lineno="12"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="sim__var_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" kindref="member" tooltip="Extended Kalman filter with unknown Q.">main</ref>()</highlight></codeline> |
---|
75 | <codeline lineno="13"><highlight class="normal">{</highlight></codeline> |
---|
76 | <codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>x0<sp/>=<sp/></highlight><highlight class="stringliteral">"100<sp/>120<sp/>100<sp/>2"</highlight><highlight class="normal">;</highlight></codeline> |
---|
77 | <codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>u0<sp/>=<sp/></highlight><highlight class="stringliteral">"1<sp/>1"</highlight><highlight class="normal">;</highlight></codeline> |
---|
78 | <codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>h=1e-6;</highlight></codeline> |
---|
79 | <codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
80 | <codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classIMpmsm" kindref="compound" tooltip="State evolution model for a PMSM drive and its derivative with respect to $.">IMpmsm</ref><sp/>I;</highlight></codeline> |
---|
81 | <codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>I.<ref refid="classIMpmsm_142818f3426d99fecb7e97be8ffe2e228" kindref="member" tooltip="Set mechanical and electrical variables.">set_parameters</ref><sp/>(<sp/>0.28,<sp/>0.003465,<sp/>h,<sp/>0.1989,<sp/><sp/><sp/>1.5<sp/>,4.0,<sp/>0.04,<sp/>0.0<sp/>);</highlight></codeline> |
---|
82 | <codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
83 | <codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>x(x0);<sp/><sp/><sp/><sp/><sp/><sp/>x(0)<sp/>+=<sp/>h;</highlight></codeline> |
---|
84 | <codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/><<<sp/>(I.<ref refid="classIMpmsm_145785869d978dda42828a072ec2caebe" kindref="member" tooltip="Evaluates .">eval</ref>(x,u0)-I.<ref refid="classIMpmsm_145785869d978dda42828a072ec2caebe" kindref="member" tooltip="Evaluates .">eval</ref>(x0,u0))/h<sp/><<endl;</highlight></codeline> |
---|
85 | <codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x=x0;<sp/><sp/><sp/>x(1)<sp/>+=<sp/>h;</highlight></codeline> |
---|
86 | <codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/><<<sp/>(I.<ref refid="classIMpmsm_145785869d978dda42828a072ec2caebe" kindref="member" tooltip="Evaluates .">eval</ref>(x,u0)-I.<ref refid="classIMpmsm_145785869d978dda42828a072ec2caebe" kindref="member" tooltip="Evaluates .">eval</ref>(x0,u0))/h<sp/><<endl;</highlight></codeline> |
---|
87 | <codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x=x0;<sp/><sp/><sp/>x(2)<sp/>+=<sp/>h;</highlight></codeline> |
---|
88 | <codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/><<<sp/>(I.<ref refid="classIMpmsm_145785869d978dda42828a072ec2caebe" kindref="member" tooltip="Evaluates .">eval</ref>(x,u0)-I.<ref refid="classIMpmsm_145785869d978dda42828a072ec2caebe" kindref="member" tooltip="Evaluates .">eval</ref>(x0,u0))/h<sp/><<endl;</highlight></codeline> |
---|
89 | <codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x=x0;<sp/><sp/><sp/>x(3)<sp/>+=<sp/>h;</highlight></codeline> |
---|
90 | <codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/><<<sp/>(I.<ref refid="classIMpmsm_145785869d978dda42828a072ec2caebe" kindref="member" tooltip="Evaluates .">eval</ref>(x,u0)-I.<ref refid="classIMpmsm_145785869d978dda42828a072ec2caebe" kindref="member" tooltip="Evaluates .">eval</ref>(x0,u0))/h<sp/><<endl;</highlight></codeline> |
---|
91 | <codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/><<<sp/>endl;</highlight></codeline> |
---|
92 | <codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>A(4,4);</highlight></codeline> |
---|
93 | <codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>I.<ref refid="classIMpmsm_1b4378b5d3bf64c683e4cf5c5f1cd56f1" kindref="member" tooltip="Evaluates and writes result into A .">dfdx_cond</ref>(x0,u0,A);</highlight></codeline> |
---|
94 | <codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
95 | <codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/><<A.T()<sp/><<<sp/>endl;</highlight></codeline> |
---|
96 | <codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Exit<sp/>program:</highlight><highlight class="normal"></highlight></codeline> |
---|
97 | <codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline> |
---|
98 | <codeline lineno="36"><highlight class="normal"></highlight></codeline> |
---|
99 | <codeline lineno="37"><highlight class="normal">}</highlight></codeline> |
---|
100 | </programlisting> |
---|
101 | <location file="/home/smidl/work/git/mixpp/pmsm/testbidiff.cpp"/> |
---|
102 | </compounddef> |
---|
103 | </doxygen> |
---|