root/doc/latex/classEKF__unQ.tex @ 212

Revision 210, 16.8 kB (checked in by smidl, 16 years ago)

dokumentace

  • Property svn:eol-style set to native
Line 
1\hypertarget{classEKF__unQ}{
2\section{EKF\_\-unQ Class Reference}
3\label{classEKF__unQ}\index{EKF\_\-unQ@{EKF\_\-unQ}}
4}
5Extended \hyperlink{classKalman}{Kalman} filter with unknown {\tt Q}
6
7
8Inheritance diagram for EKF\_\-unQ:\nopagebreak
9\begin{figure}[H]
10\begin{center}
11\leavevmode
12\includegraphics[width=95pt]{classEKF__unQ__inherit__graph}
13\end{center}
14\end{figure}
15Collaboration diagram for EKF\_\-unQ:\nopagebreak
16\begin{figure}[H]
17\begin{center}
18\leavevmode
19\includegraphics[width=400pt]{classEKF__unQ__coll__graph}
20\end{center}
21\end{figure}
22\subsection*{Public Member Functions}
23\begin{CompactItemize}
24\item 
25\hypertarget{classEKF__unQ_159eaaa5a05c5ceecdaa20956a307244}{
26\hyperlink{classEKF__unQ_159eaaa5a05c5ceecdaa20956a307244}{EKF\_\-unQ} (\hyperlink{classRV}{RV} rx, \hyperlink{classRV}{RV} ry, \hyperlink{classRV}{RV} ru, \hyperlink{classRV}{RV} rQ)}
27\label{classEKF__unQ_159eaaa5a05c5ceecdaa20956a307244}
28
29\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
30\hypertarget{classEKF__unQ_cd06a8c662da244cf61bb5bd39688c99}{
31void \hyperlink{classEKF__unQ_cd06a8c662da244cf61bb5bd39688c99}{condition} (const vec \&Q0)}
32\label{classEKF__unQ_cd06a8c662da244cf61bb5bd39688c99}
33
34\begin{CompactList}\small\item\em Substitute {\tt val} for {\tt rvc}. \item\end{CompactList}\item 
35\hypertarget{classEKF__unQ_159eaaa5a05c5ceecdaa20956a307244}{
36\hyperlink{classEKF__unQ_159eaaa5a05c5ceecdaa20956a307244}{EKF\_\-unQ} (\hyperlink{classRV}{RV} rx, \hyperlink{classRV}{RV} ry, \hyperlink{classRV}{RV} ru, \hyperlink{classRV}{RV} rQ)}
37\label{classEKF__unQ_159eaaa5a05c5ceecdaa20956a307244}
38
39\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
40\hypertarget{classEKF__unQ_cd06a8c662da244cf61bb5bd39688c99}{
41void \hyperlink{classEKF__unQ_cd06a8c662da244cf61bb5bd39688c99}{condition} (const vec \&Q0)}
42\label{classEKF__unQ_cd06a8c662da244cf61bb5bd39688c99}
43
44\begin{CompactList}\small\item\em Substitute {\tt val} for {\tt rvc}. \item\end{CompactList}\item 
45\hypertarget{classEKF__unQ_44b49058c8eb27c7910ae31a1dfd3d21}{
46void \textbf{bayes} (const vec dt)}
47\label{classEKF__unQ_44b49058c8eb27c7910ae31a1dfd3d21}
48
49\item 
50\hypertarget{classEKF__unQ_159eaaa5a05c5ceecdaa20956a307244}{
51\hyperlink{classEKF__unQ_159eaaa5a05c5ceecdaa20956a307244}{EKF\_\-unQ} (\hyperlink{classRV}{RV} rx, \hyperlink{classRV}{RV} ry, \hyperlink{classRV}{RV} ru, \hyperlink{classRV}{RV} rQ)}
52\label{classEKF__unQ_159eaaa5a05c5ceecdaa20956a307244}
53
54\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
55\hypertarget{classEKF__unQ_cd06a8c662da244cf61bb5bd39688c99}{
56void \hyperlink{classEKF__unQ_cd06a8c662da244cf61bb5bd39688c99}{condition} (const vec \&Q0)}
57\label{classEKF__unQ_cd06a8c662da244cf61bb5bd39688c99}
58
59\begin{CompactList}\small\item\em Substitute {\tt val} for {\tt rvc}. \item\end{CompactList}\item 
60\hypertarget{classEKFCh_0216bed270df59fe65d0d62d41f8257c}{
61void \hyperlink{classEKFCh_0216bed270df59fe65d0d62d41f8257c}{set\_\-parameters} (\hyperlink{classdiffbifn}{diffbifn} $\ast$pfxu, \hyperlink{classdiffbifn}{diffbifn} $\ast$phxu, const \hyperlink{classchmat}{chmat} Q0, const \hyperlink{classchmat}{chmat} R0)}
62\label{classEKFCh_0216bed270df59fe65d0d62d41f8257c}
63
64\begin{CompactList}\small\item\em Set nonlinear functions for mean values and covariance matrices. \item\end{CompactList}\item 
65\hypertarget{classKalmanCh_92fb227287af05c9f0078d523c7c9793}{
66void \hyperlink{classKalmanCh_92fb227287af05c9f0078d523c7c9793}{set\_\-parameters} (const mat \&A0, const mat \&B0, const mat \&C0, const mat \&D0, const \hyperlink{classchmat}{chmat} \&R0, const \hyperlink{classchmat}{chmat} \&Q0)}
67\label{classKalmanCh_92fb227287af05c9f0078d523c7c9793}
68
69\begin{CompactList}\small\item\em Set parameters with check of relevance. \item\end{CompactList}\item 
70\hypertarget{classEKFCh_96f6edda324a0b7ef8b4e86cc7af60c1}{
71void \hyperlink{classEKFCh_96f6edda324a0b7ef8b4e86cc7af60c1}{bayes} (const vec \&dt)}
72\label{classEKFCh_96f6edda324a0b7ef8b4e86cc7af60c1}
73
74\begin{CompactList}\small\item\em Here dt = \mbox{[}yt;ut\mbox{]} of appropriate dimensions. \item\end{CompactList}\item 
75\hypertarget{classKalmanCh_b261b20f6210d4c85131d33302df0adc}{
76void \hyperlink{classKalmanCh_b261b20f6210d4c85131d33302df0adc}{set\_\-est} (const vec \&mu0, const \hyperlink{classchmat}{chmat} \&P0)}
77\label{classKalmanCh_b261b20f6210d4c85131d33302df0adc}
78
79\begin{CompactList}\small\item\em Set estimate values, used e.g. in initialization. \item\end{CompactList}\item 
80\hypertarget{classKalman_67cccaf1c4dcdcd1df110e15ef326bfe}{
81const \hyperlink{classepdf}{epdf} \& \hyperlink{classKalman_67cccaf1c4dcdcd1df110e15ef326bfe}{\_\-epdf} () const }
82\label{classKalman_67cccaf1c4dcdcd1df110e15ef326bfe}
83
84\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
85\hypertarget{classKalman_11f82ef04e3dbc54bd1d3d89edb6aa07}{
86const \hyperlink{classenorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ $\ast$ \hyperlink{classKalman_11f82ef04e3dbc54bd1d3d89edb6aa07}{\_\-e} () const }
87\label{classKalman_11f82ef04e3dbc54bd1d3d89edb6aa07}
88
89\begin{CompactList}\small\item\em Returns a pointer to the \hyperlink{classepdf}{epdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\item 
90\hypertarget{classKalman_980fcd41c6c548c5da7b8b67c8e6da79}{
91mat \& \hyperlink{classKalman_980fcd41c6c548c5da7b8b67c8e6da79}{\_\-\_\-K} ()}
92\label{classKalman_980fcd41c6c548c5da7b8b67c8e6da79}
93
94\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
95\hypertarget{classKalman_ac9540f3850b74d89a5fe4db6fc358ce}{
96vec \hyperlink{classKalman_ac9540f3850b74d89a5fe4db6fc358ce}{\_\-dP} ()}
97\label{classKalman_ac9540f3850b74d89a5fe4db6fc358ce}
98
99\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
100\hypertarget{classBM_0186270f75189677f390fe088a9947e9}{
101virtual void \hyperlink{classBM_0186270f75189677f390fe088a9947e9}{bayesB} (const mat \&Dt)}
102\label{classBM_0186270f75189677f390fe088a9947e9}
103
104\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
105virtual double \hyperlink{classBM_8a8ce6df431689964c41cc6c849cfd06}{logpred} (const vec \&dt) const
106\item 
107\hypertarget{classBM_cd0660f2a1a344b56ac39802708ff165}{
108vec \hyperlink{classBM_cd0660f2a1a344b56ac39802708ff165}{logpred\_\-m} (const mat \&dt) const }
109\label{classBM_cd0660f2a1a344b56ac39802708ff165}
110
111\begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item 
112\hypertarget{classBM_5594d68ee9aa6fc8c1e79019da5c9d56}{
113virtual \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classBM_5594d68ee9aa6fc8c1e79019da5c9d56}{predictor} (const \hyperlink{classRV}{RV} \&\hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv}) const }
114\label{classBM_5594d68ee9aa6fc8c1e79019da5c9d56}
115
116\begin{CompactList}\small\item\em Constructs a predictive density (marginal density on data). \item\end{CompactList}\item 
117\hypertarget{classBM_126bd2595c48e311fc2a7ab72876092a}{
118const \hyperlink{classRV}{RV} \& \hyperlink{classBM_126bd2595c48e311fc2a7ab72876092a}{\_\-rv} () const }
119\label{classBM_126bd2595c48e311fc2a7ab72876092a}
120
121\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
122\hypertarget{classBM_87f4a547d2c29180be88175e5eab9c88}{
123double \hyperlink{classBM_87f4a547d2c29180be88175e5eab9c88}{\_\-ll} () const }
124\label{classBM_87f4a547d2c29180be88175e5eab9c88}
125
126\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
127\hypertarget{classBM_1ffa9f23669aabecc3760c06c6987522}{
128void \hyperlink{classBM_1ffa9f23669aabecc3760c06c6987522}{set\_\-evalll} (bool evl0)}
129\label{classBM_1ffa9f23669aabecc3760c06c6987522}
130
131\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
132virtual \hyperlink{classBM}{BM} $\ast$ \hyperlink{classBM_eb58c81d6a7b75b05fc6f276eed78887}{\_\-copy\_\-} (bool changerv=false)
133\item 
134\hypertarget{classBMcond_3fa60348b2da6b4208bb95b8d146900a}{
135const \hyperlink{classRV}{RV} \& \hyperlink{classBMcond_3fa60348b2da6b4208bb95b8d146900a}{\_\-rvc} () const }
136\label{classBMcond_3fa60348b2da6b4208bb95b8d146900a}
137
138\begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize}
139\subsection*{Protected Attributes}
140\begin{CompactItemize}
141\item 
142\hypertarget{classKalmanCh_94ee9da75b0e0f632e4a354988ca3798}{
143mat \hyperlink{classKalmanCh_94ee9da75b0e0f632e4a354988ca3798}{preA}}
144\label{classKalmanCh_94ee9da75b0e0f632e4a354988ca3798}
145
146\begin{CompactList}\small\item\em pre array (triangular matrix) \item\end{CompactList}\item 
147\hypertarget{classKalmanCh_0d31a26dc72b5846cfe5af3ccb63ac87}{
148mat \hyperlink{classKalmanCh_0d31a26dc72b5846cfe5af3ccb63ac87}{postA}}
149\label{classKalmanCh_0d31a26dc72b5846cfe5af3ccb63ac87}
150
151\begin{CompactList}\small\item\em post array (triangular matrix) \item\end{CompactList}\item 
152\hypertarget{classKalman_7501230c2fafa3655887d2da23b3184c}{
153\hyperlink{classRV}{RV} \hyperlink{classKalman_7501230c2fafa3655887d2da23b3184c}{rvy}}
154\label{classKalman_7501230c2fafa3655887d2da23b3184c}
155
156\begin{CompactList}\small\item\em Indetifier of output rv. \item\end{CompactList}\item 
157\hypertarget{classKalman_44a16ffd5ac1e6e39bae34fea9e1e498}{
158\hyperlink{classRV}{RV} \hyperlink{classKalman_44a16ffd5ac1e6e39bae34fea9e1e498}{rvu}}
159\label{classKalman_44a16ffd5ac1e6e39bae34fea9e1e498}
160
161\begin{CompactList}\small\item\em Indetifier of exogeneous rv. \item\end{CompactList}\item 
162\hypertarget{classKalman_39c8c403b46fa3b8c7da77cb2e3729eb}{
163int \hyperlink{classKalman_39c8c403b46fa3b8c7da77cb2e3729eb}{dimx}}
164\label{classKalman_39c8c403b46fa3b8c7da77cb2e3729eb}
165
166\begin{CompactList}\small\item\em cache of rv.count() \item\end{CompactList}\item 
167\hypertarget{classKalman_ba17b956df1e38b31fbbc299c8213b6a}{
168int \hyperlink{classKalman_ba17b956df1e38b31fbbc299c8213b6a}{dimy}}
169\label{classKalman_ba17b956df1e38b31fbbc299c8213b6a}
170
171\begin{CompactList}\small\item\em cache of rvy.count() \item\end{CompactList}\item 
172\hypertarget{classKalman_b0153795a1444b6968a86409c778d9ce}{
173int \hyperlink{classKalman_b0153795a1444b6968a86409c778d9ce}{dimu}}
174\label{classKalman_b0153795a1444b6968a86409c778d9ce}
175
176\begin{CompactList}\small\item\em cache of rvu.count() \item\end{CompactList}\item 
177\hypertarget{classKalman_5e02efe86ee91e9c74b93b425fe060b9}{
178mat \hyperlink{classKalman_5e02efe86ee91e9c74b93b425fe060b9}{A}}
179\label{classKalman_5e02efe86ee91e9c74b93b425fe060b9}
180
181\begin{CompactList}\small\item\em Matrix A. \item\end{CompactList}\item 
182\hypertarget{classKalman_dc87704284a6c0bca13bf51f4345a50a}{
183mat \hyperlink{classKalman_dc87704284a6c0bca13bf51f4345a50a}{B}}
184\label{classKalman_dc87704284a6c0bca13bf51f4345a50a}
185
186\begin{CompactList}\small\item\em Matrix B. \item\end{CompactList}\item 
187\hypertarget{classKalman_86a805cd6515872d1132ad0d6eb5dc13}{
188mat \hyperlink{classKalman_86a805cd6515872d1132ad0d6eb5dc13}{C}}
189\label{classKalman_86a805cd6515872d1132ad0d6eb5dc13}
190
191\begin{CompactList}\small\item\em Matrix C. \item\end{CompactList}\item 
192\hypertarget{classKalman_d69f774ba3335c970c1c5b1d182f4dd1}{
193mat \hyperlink{classKalman_d69f774ba3335c970c1c5b1d182f4dd1}{D}}
194\label{classKalman_d69f774ba3335c970c1c5b1d182f4dd1}
195
196\begin{CompactList}\small\item\em Matrix D. \item\end{CompactList}\item 
197\hypertarget{classKalman_9b69015c800eb93f3ee49da23a6f55d9}{
198\hyperlink{classchmat}{chmat} \hyperlink{classKalman_9b69015c800eb93f3ee49da23a6f55d9}{Q}}
199\label{classKalman_9b69015c800eb93f3ee49da23a6f55d9}
200
201\begin{CompactList}\small\item\em Matrix Q in square-root form. \item\end{CompactList}\item 
202\hypertarget{classKalman_11d171dc0e0ab111c56a70f98b97b3ec}{
203\hyperlink{classchmat}{chmat} \hyperlink{classKalman_11d171dc0e0ab111c56a70f98b97b3ec}{R}}
204\label{classKalman_11d171dc0e0ab111c56a70f98b97b3ec}
205
206\begin{CompactList}\small\item\em Matrix R in square-root form. \item\end{CompactList}\item 
207\hypertarget{classKalman_5568c74bac67ae6d3b1061dba60c9424}{
208\hyperlink{classenorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ \hyperlink{classKalman_5568c74bac67ae6d3b1061dba60c9424}{est}}
209\label{classKalman_5568c74bac67ae6d3b1061dba60c9424}
210
211\begin{CompactList}\small\item\em posterior density on \$x\_\-t\$ \item\end{CompactList}\item 
212\hypertarget{classKalman_e580ab06483952bd03f2e651763e184f}{
213\hyperlink{classenorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ \hyperlink{classKalman_e580ab06483952bd03f2e651763e184f}{fy}}
214\label{classKalman_e580ab06483952bd03f2e651763e184f}
215
216\begin{CompactList}\small\item\em preditive density on \$y\_\-t\$ \item\end{CompactList}\item 
217\hypertarget{classKalman_d422f51467c7a06174af2476d2826132}{
218mat \hyperlink{classKalman_d422f51467c7a06174af2476d2826132}{\_\-K}}
219\label{classKalman_d422f51467c7a06174af2476d2826132}
220
221\begin{CompactList}\small\item\em placeholder for \hyperlink{classKalman}{Kalman} gain \item\end{CompactList}\item 
222\hypertarget{classKalman_764bbc95238eda11fc81c5ebd0b1dcfd}{
223vec \& \hyperlink{classKalman_764bbc95238eda11fc81c5ebd0b1dcfd}{\_\-yp}}
224\label{classKalman_764bbc95238eda11fc81c5ebd0b1dcfd}
225
226\begin{CompactList}\small\item\em cache of fy.mu \item\end{CompactList}\item 
227\hypertarget{classKalman_45c9f928d2d62e0c884900fb3380f904}{
228\hyperlink{classchmat}{chmat} \& \hyperlink{classKalman_45c9f928d2d62e0c884900fb3380f904}{\_\-Ry}}
229\label{classKalman_45c9f928d2d62e0c884900fb3380f904}
230
231\begin{CompactList}\small\item\em cache of fy.R \item\end{CompactList}\item 
232\hypertarget{classKalman_fe803a81d2d847b0b1db3c6b29c18061}{
233vec \& \hyperlink{classKalman_fe803a81d2d847b0b1db3c6b29c18061}{\_\-mu}}
234\label{classKalman_fe803a81d2d847b0b1db3c6b29c18061}
235
236\begin{CompactList}\small\item\em cache of est.mu \item\end{CompactList}\item 
237\hypertarget{classKalman_9fb808cc94a4c2652e1fb93be9bb7dcf}{
238\hyperlink{classchmat}{chmat} \& \hyperlink{classKalman_9fb808cc94a4c2652e1fb93be9bb7dcf}{\_\-P}}
239\label{classKalman_9fb808cc94a4c2652e1fb93be9bb7dcf}
240
241\begin{CompactList}\small\item\em cache of est.R \item\end{CompactList}\item 
242\hypertarget{classBM_af00f0612fabe66241dd507188cdbf88}{
243\hyperlink{classRV}{RV} \hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv}}
244\label{classBM_af00f0612fabe66241dd507188cdbf88}
245
246\begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 
247\hypertarget{classBM_5623fef6572a08c2b53b8c87b82dc979}{
248double \hyperlink{classBM_5623fef6572a08c2b53b8c87b82dc979}{ll}}
249\label{classBM_5623fef6572a08c2b53b8c87b82dc979}
250
251\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
252\hypertarget{classBM_bf6fb59b30141074f8ee1e2f43d03129}{
253bool \hyperlink{classBM_bf6fb59b30141074f8ee1e2f43d03129}{evalll}}
254\label{classBM_bf6fb59b30141074f8ee1e2f43d03129}
255
256\begin{CompactList}\small\item\em If true, the filter will compute likelihood of the data record and store it in {\tt ll} . Set to false if you want to save computational time. \item\end{CompactList}\item 
257\hypertarget{classBMcond_9ba793c8ec453f04d372d17195ed8dec}{
258\hyperlink{classRV}{RV} \hyperlink{classBMcond_9ba793c8ec453f04d372d17195ed8dec}{rvc}}
259\label{classBMcond_9ba793c8ec453f04d372d17195ed8dec}
260
261\begin{CompactList}\small\item\em Identificator of the conditioning variable. \item\end{CompactList}\end{CompactItemize}
262
263
264\subsection{Detailed Description}
265Extended \hyperlink{classKalman}{Kalman} filter with unknown {\tt Q}.
266
267\subsection{Member Function Documentation}
268\hypertarget{classBM_8a8ce6df431689964c41cc6c849cfd06}{
269\index{EKF\_\-unQ@{EKF\_\-unQ}!logpred@{logpred}}
270\index{logpred@{logpred}!EKF_unQ@{EKF\_\-unQ}}
271\subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}virtual double BM::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt  \mbox{[}inline, virtual, inherited\mbox{]}}}}
272\label{classBM_8a8ce6df431689964c41cc6c849cfd06}
273
274
275Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
276
277Reimplemented in \hyperlink{classARX_e7f9e7823aec9bf7ddc3b42d9b3304c4}{ARX}, \hyperlink{classMixEF_424ca64f36d4e41de7a7e7ae921d35ea}{MixEF}, and \hyperlink{classmultiBM_13e26a61757278981fd8cac9a7ef91eb}{multiBM}.
278
279Referenced by BM::logpred\_\-m().\hypertarget{classBM_eb58c81d6a7b75b05fc6f276eed78887}{
280\index{EKF\_\-unQ@{EKF\_\-unQ}!\_\-copy\_\-@{\_\-copy\_\-}}
281\index{\_\-copy\_\-@{\_\-copy\_\-}!EKF_unQ@{EKF\_\-unQ}}
282\subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ BM::\_\-copy\_\- (bool {\em changerv} = {\tt false})\hspace{0.3cm}{\tt  \mbox{[}inline, virtual, inherited\mbox{]}}}}
283\label{classBM_eb58c81d6a7b75b05fc6f276eed78887}
284
285
286Copy function required in vectors, Arrays of \hyperlink{classBM}{BM} etc. Have to be DELETED manually! Prototype: BM$\ast$ \hyperlink{classBM_eb58c81d6a7b75b05fc6f276eed78887}{\_\-copy\_\-()}\{\hyperlink{classBM}{BM} Tmp$\ast$=new Tmp(this$\ast$); return Tmp; \} 
287
288Reimplemented in \hyperlink{classARX_5de61fbd4f97fa3216760b1f733f5af0}{ARX}, and \hyperlink{classBMEF_97f5312efe4a5bedb86d2daec59d8651}{BMEF}.
289
290The documentation for this class was generated from the following files:\begin{CompactItemize}
291\item 
292work/git/mixpp/pmsm/pmsm\_\-sim.cpp\item 
293work/git/mixpp/pmsm/pmsm\_\-sim2.cpp\item 
294work/git/mixpp/pmsm/pmsm\_\-unkQpf.cpp\end{CompactItemize}
Note: See TracBrowser for help on using the browser.