comparison m-toolbox/html_help/help/ug/zdomainfit_content.html @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 <!-- $Id: zdomainfit_content.html,v 1.6 2009/08/27 11:38:58 luigi Exp $ -->
2
3 <!-- ================================================== -->
4 <!-- BEGIN CONTENT FILE -->
5 <!-- ================================================== -->
6 <!-- ===== link box: Begin ===== -->
7 <p>
8 <table border="1" width="80%">
9 <tr>
10 <td>
11 <table border="0" cellpadding="5" class="categorylist" width="100%">
12 <colgroup>
13 <col width="37%"/>
14 <col width="63%"/>
15 </colgroup>
16 <tbody>
17 <tr valign="top">
18 <td>
19 <a href="#description">Description</a>
20 </td>
21 <td>Z-domain system identification in LTPDA.</td>
22 </tr>
23 <tr valign="top">
24 <td>
25 <a href="#algorithm">Algorithm</a>
26 </td>
27 <td>Fit Algorithm.</td>
28 </tr>
29 <tr valign="top">
30 <td>
31 <a href="#examples">Examples</a>
32 </td>
33 <td>Usage example of z-domain system identification tool.</td>
34 </tr>
35 <tr valign="top">
36 <td>
37 <a href="#references">References</a>
38 </td>
39 <td>Bibliographic references.</td>
40 </tr>
41 </tbody>
42 </table>
43 </td>
44 </tr>
45 </table>
46 </p>
47 <!-- ===== link box: End ====== -->
48
49
50
51 <h2><a name="description">Z-domain system identification in LTPDA</a></h2>
52 <p>
53 System identification in z-domain is performed with the function
54 <a href="matlab:doc('ao/zDomainFit')">zDomainFit</a>.
55 It is based on a modeified version of the vector fitting algorithm that was
56 adapted to fit in z-domain. Details on the core agorithm can be found in [1 - 3].
57 </p>
58 <p>
59 If you provide more than one AO as input, they will be fitted
60 together with a common set of poles.
61 Only frequency domain (<a href="matlab:doc('fsdata')">fsdata</a>) data can be
62 fitted. Each non fsdata object is ignored. Input
63 objects must have the same number of elements.
64 </p>
65
66
67 <h2><a name="algorithm">Fit algorithm</a></h2>
68
69 <p>
70 The function performs a fitting loop to automatically identify model
71 order and parameters in z-domain. Output is a z-domain model expanded
72 in partial fractions:
73 </p>
74 <p>
75 <div>
76 <IMG src="images/zdomainfit_1.gif" border="0">
77 </div>
78 </p>
79 <p>
80 Each element of the partial fraction expansion can be seen as a
81 <a href="sigproc_iir.html">miir</a> filter. Therefore the complete expansion
82 is simply a parallel <a href="sigproc_filterbanks.html">filterbank</a> of
83 <a href="sigproc_iir.html">miir</a> filters.
84 Since the function can fit more than one input analysis object at a time
85 with a common set of poles, output filterbank are embedded in a
86 <a href="class_desc_matrix.html">matrix</a> (note that this characteristic
87 will be probably changed becausse of the introduction of the
88 <a href="class_desc_collection.html">collection</a> class).
89 </p>
90 <p>
91 Identification loop stops when the stop condition is reached.
92 Stop criterion is based on three different approaches:
93 <ol>
94 <li> Mean Squared Error and variation <br>
95 Check if the normalized mean squared error is lower than the value specified in
96 <tt>FITTOL</tt> and if the relative variation of the mean squared error is lower
97 than the value specified in <tt>MSEVARTOL</tt>.
98 E.g. <tt>FITTOL = 1e-3</tt>, <tt>MSEVARTOL = 1e-2</tt> search for a fit with
99 normalized meam square error lower than <tt>1e-3</tt> and <tt>MSE</tt> relative
100 variation lower than <tt>1e-2</tt>.
101 </li>
102 <li> Log residuals difference and root mean squared error
103 <ul>
104 <li> Log Residuals difference <br>
105 Check if the minimum of the logarithmic difference between data and
106 residuals is larger than a specified value. ie. if the conditioning
107 value is <tt>2</tt>, the function ensures that the difference between data and
108 residuals is at lest two order of magnitude lower than data itsleves.
109 <li> Root Mean Squared Error <br>
110 Check that the variation of the root mean squared error is lower than
111 <tt>10^(-1*value)</tt>.
112 </ul>
113 </li>
114 <li> Residuals spectral flatness and root mean squared error
115 <ul>
116 <li> Residuals Spectral Flatness <br>
117 In case of a fit on noisy data, the residuals from a good fit are
118 expected to be as much as possible similar to a white noise. This
119 property can be used to test the accuracy of a fit procedure. In
120 particular it can be tested that the spectral flatness coefficient of
121 the residuals is larger than a certain qiantity sf such that <tt>0 < sf < 1</tt>.
122 <li> Root Mean Squared Error <br>
123 Check that the variation of the root mean squared error is lower than
124 <tt>10^(-1*value)</tt>.
125 </ul>
126 </li>
127 </ol>
128 Fitting loop stops when the two stopping conditions are satisfied, in both cases.
129 </p>
130 <p>
131 The function can also perform a single loop without taking care of
132 the stop conditions. This happens when <span class="string">'AUTOSEARCH'</span> parameter is
133 set to <span class="string">'OFF'</span>.
134 </p>
135
136
137
138 <h2><a name="examples">Usage example of z-domain system identification tool</a></h2>
139 <p>
140 In this example we fit a given frequency response to get a stable <tt>miir</tt> filter.
141 For the meaning of any parameter please refer to
142 <a href="matlab:doc('ao')">ao</a> and
143 <a href="matlab:doc('ao/zDomainFit')">zDomainFit</a>
144 documentation pages.
145 </p>
146
147 <div class="fragment"><pre>
148 pl = plist(...
149 <span class="string">'fsfcn'</span>, <span class="string">'(1e-3./(2.*pi.*1i.*f).^2 + 1e3./(0.001+2.*pi.*1i.*f) + 1e5.*(2.*pi.*1i.*f).^2).*1e-10'</span>,...
150 <span class="string">'f1'</span>, 1e-6,...
151 <span class="string">'f2'</span>, 5,...
152 <span class="string">'nf'</span>, 100);
153
154 a = ao(pl);
155 a.setName;
156
157 <span class="comment">% Fit parameter list</span>
158 pl_fit = plist(<span class="string">'FS'</span>,10,...
159 <span class="string">'AutoSearch'</span>,<span class="string">'on'</span>,...
160 <span class="string">'StartPolesOpt'</span>,<span class="string">'clog'</span>,...
161 <span class="string">'maxiter'</span>,50,...
162 <span class="string">'minorder'</span>,15,...
163 <span class="string">'maxorder'</span>,30,...
164 <span class="string">'weightparam'</span>,<span class="string">'abs'</span>,...
165 <span class="string">'CONDTYPE'</span>,<span class="string">'MSE'</span>,...
166 <span class="string">'FITTOL'</span>,1e-2,...
167 <span class="string">'MSEVARTOL'</span>,1e-1,...
168 <span class="string">'Plot'</span>,<span class="string">'on'</span>,...
169 <span class="string">'ForceStability'</span>,<span class="string">'on'</span>);
170
171 <span class="comment">% Do fit</span>
172 mod = zDomainFit(a, pl_fit);
173 </pre></div>
174
175 <p>
176 <tt>mod</tt> is a <tt>matrix</tt> object containing a <tt>filterbank</tt> object.
177 </p>
178
179 <div class="fragment"><pre>
180 >> mod
181 ---- matrix 1 ----
182 name: fit(a)
183 size: 1x1
184 01: filterbank | filterbank(fit(a)(fs=10.00, ntaps=2.00, a=[-1.19e+005 0], b=[1 0.0223]), fit(a)(fs=10.00, ntaps=2.00, a=[1.67e+005 0], b=[1 0.137]), fit(a)(fs=10.00, ntaps=2.00, a=[-5.41e+004 0], b=[1 0.348]), fit(a)(fs=10.00, ntaps=2.00, a=[1.15e+004 0], b=[1 0.603]), fit(a)(fs=10.00, ntaps=2.00, a=[-1.69e+005 0], b=[1 0.639]), fit(a)(fs=10.00, ntaps=2.00, a=[1.6e+005 0], b=[1 0.64]), fit(a)(fs=10.00, ntaps=2.00, a=[9.99e-009 0], b=[1 -1]), fit(a)(fs=10.00, ntaps=2.00, a=[-4.95e-010 0], b=[1 1]), fit(a)(fs=10.00, ntaps=2.00, a=[9.4e+003-i*3.7e+003 0], b=[1 -0.0528-i*0.0424]), fit(a)(fs=10.00, ntaps=2.00, a=[9.4e+003+i*3.7e+003 0], b=[1 -0.0528+i*0.0424]), fit(a)(fs=10.00, ntaps=2.00, a=[1.66e+003-i*1.45e+004 0], b=[1 0.0233-i*0.112]), fit(a)(fs=10.00, ntaps=2.00, a=[1.66e+003+i*1.45e+004 0], b=[1 0.0233+i*0.112]), fit(a)(fs=10.00, ntaps=2.00, a=[-1.67e+004+i*432 0], b=[1 0.171-i*0.14]), fit(a)(fs=10.00, ntaps=2.00, a=[-1.67e+004-i*432 0], b=[1 0.171+i*0.14]), fit(a)(fs=10.00, ntaps=2.00, a=[7.61e+003+i*7.36e+003 0], b=[1 0.378-i*0.112]), fit(a)(fs=10.00, ntaps=2.00, a=[7.61e+003-i*7.36e+003 0], b=[1 0.378+i*0.112]), fit(a)(fs=10.00, ntaps=2.00, a=[3.67e-015-i*4.61e-006 0], b=[1 -1-i*1.08e-010]), fit(a)(fs=10.00, ntaps=2.00, a=[3.67e-015+i*4.61e-006 0], b=[1 -1+i*1.08e-010]))
185 description:
186 UUID: 9274455a-68e8-4bf1-b1ad-db81551f3cd6
187 ------------------
188 </pre></div>
189
190 <p>
191 The <tt>filterbank</tt> object contains a parallel bank of 18 filters.
192 </p>
193
194 <div class="fragment"><pre>
195 >> mod.objs
196 ---- filterbank 1 ----
197 name: fit(a)
198 type: parallel
199 01: fit(a)(fs=10.00, ntaps=2.00, a=[-1.19e+005 0], b=[1 0.0223])
200 02: fit(a)(fs=10.00, ntaps=2.00, a=[1.67e+005 0], b=[1 0.137])
201 03: fit(a)(fs=10.00, ntaps=2.00, a=[-5.41e+004 0], b=[1 0.348])
202 04: fit(a)(fs=10.00, ntaps=2.00, a=[1.15e+004 0], b=[1 0.603])
203 05: fit(a)(fs=10.00, ntaps=2.00, a=[-1.69e+005 0], b=[1 0.639])
204 06: fit(a)(fs=10.00, ntaps=2.00, a=[1.6e+005 0], b=[1 0.64])
205 07: fit(a)(fs=10.00, ntaps=2.00, a=[9.99e-009 0], b=[1 -1])
206 08: fit(a)(fs=10.00, ntaps=2.00, a=[-4.95e-010 0], b=[1 1])
207 09: fit(a)(fs=10.00, ntaps=2.00, a=[9.4e+003-i*3.7e+003 0], b=[1 -0.0528-i*0.0424])
208 10: fit(a)(fs=10.00, ntaps=2.00, a=[9.4e+003+i*3.7e+003 0], b=[1 -0.0528+i*0.0424])
209 11: fit(a)(fs=10.00, ntaps=2.00, a=[1.66e+003-i*1.45e+004 0], b=[1 0.0233-i*0.112])
210 12: fit(a)(fs=10.00, ntaps=2.00, a=[1.66e+003+i*1.45e+004 0], b=[1 0.0233+i*0.112])
211 13: fit(a)(fs=10.00, ntaps=2.00, a=[-1.67e+004+i*432 0], b=[1 0.171-i*0.14])
212 14: fit(a)(fs=10.00, ntaps=2.00, a=[-1.67e+004-i*432 0], b=[1 0.171+i*0.14])
213 15: fit(a)(fs=10.00, ntaps=2.00, a=[7.61e+003+i*7.36e+003 0], b=[1 0.378-i*0.112])
214 16: fit(a)(fs=10.00, ntaps=2.00, a=[7.61e+003-i*7.36e+003 0], b=[1 0.378+i*0.112])
215 17: fit(a)(fs=10.00, ntaps=2.00, a=[3.67e-015-i*4.61e-006 0], b=[1 -1-i*1.08e-010])
216 18: fit(a)(fs=10.00, ntaps=2.00, a=[3.67e-015+i*4.61e-006 0], b=[1 -1+i*1.08e-010])
217 description:
218 UUID: 21af6960-61a8-4351-b504-e6f2b5e55b06
219 ----------------------
220 </pre></div>
221
222 <p>
223 Each object of the <tt>filterbank</tt> is a <tt>miir</tt> filter.
224 </p>
225
226 <div class="fragment"><pre>
227 filt = mod.objs.filters.index(3)
228 ------ miir/1 -------
229 b: [1 0.348484501572296]
230 histin: 0
231 version: $Id: zdomainfit_content.html,v 1.6 2009/08/27 11:38:58 luigi Exp $
232 ntaps: 2
233 fs: 10
234 infile:
235 a: [-54055.7700068032 0]
236 histout: 0
237 iunits: [] [1x1 unit]
238 ounits: [] [1x1 unit]
239 hist: miir.hist [1x1 history]
240 procinfo: (empty-plist) [1x1 plist]
241 plotinfo: (empty-plist) [1x1 plist]
242 name: (fit(a)(3,1))(3)
243 description:
244 mdlfile:
245 UUID: 6e2a1cd8-f17d-4c9d-aea9-4d9a96e41e68
246 ---------------------
247 </pre></div>
248
249
250 <h2><a name="references">References</a></h2>
251 <p>
252 <ol>
253 <li> B. Gustavsen and A. Semlyen, "Rational approximation of frequency
254 domain responses by Vector Fitting", IEEE Trans. Power Delivery
255 vol. 14, no. 3, pp. 1052-1061, July 1999.
256 <li> B. Gustavsen, "Improving the Pole Relocating Properties of Vector
257 Fitting", IEEE Trans. Power Delivery vol. 21, no. 3, pp.
258 1587-1592, July 2006.
259 <li> Y. S. Mekonnen and J. E. Schutt-Aine, "Fast broadband
260 macromodeling technique of sampled time/frequency data using
261 z-domain vector-fitting method", Electronic Components and
262 Technology Conference, 2008. ECTC 2008. 58th 27-30 May 2008 pp.
263 1231 - 1235.
264 </ol>
265 </p>