Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/sigproc_iir_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 <p> | |
2 Infinite Impulse Response filters are those filters present a non-zero infinite length response when excited with a very brief (ideally an infinite peak) input signal. A linear causal IIR filter can be described by the following difference equation | |
3 </p> | |
4 <div align="center"> | |
5 <IMG src="images/sigproc_7.png" width="283" height="56" align="middle" border="0"> | |
6 </div> | |
7 <p> | |
8 This operation describe a recursive system, i.e. a system that depends on current and past samples of the input x[n], but also on the output data stream y[n]. | |
9 </p> | |
10 <h2><a name="IIRbuild">Creating a IIR filter in the LTPDA</a></h2> | |
11 | |
12 The LTPDA Toolbox allows the implementation of IIR filters by means of the <a href="pzmodel_filter.html"> miir class</a>. | |
13 | |
14 <h2><a name="IIRplist">Creating from a plist</a></h2> | |
15 <p> | |
16 The following example creates an order 1 highpass filter with high frequency gain 2. Filter is designed for 10 Hz sampled data and has a cut-off frequency of 0.2 Hz. | |
17 </p> | |
18 <div class="fragment"><pre> | |
19 | |
20 pl = plist(<span class="string">'type'</span>, <span class="string">'highpass'</span>, ... | |
21 <span class="string">'order'</span>, 1, ... | |
22 <span class="string">'gain'</span>, 2.0, ... | |
23 <span class="string">'fs'</span>, 10, ... | |
24 <span class="string">'fc'</span>, 0.2); | |
25 f = miir(pl) | |
26 </pre></div> | |
27 | |
28 <h2><a name="IIRpzmodel">Creating from a pzmodel</a></h2> | |
29 <p> | |
30 IIR filters can also be <a href="pzmodel_filter.html"> created from a pzmodel </a>. | |
31 </p> | |
32 <h2><a name="IIRdiff">Creating from a difference equation</a></h2> | |
33 <p> | |
34 Alternatively, the filter can be defined in terms of two vectors specifying the coefficients of the filter and the sampling frequency. The following example creates a IIR filter with sampling frequency 1 Hz and the following recursive equation: | |
35 </p> | |
36 | |
37 <div align="center"> | |
38 <IMG src="images/sigproc_9.png" width="299" height="28" align="middle" border="0"> | |
39 </div> | |
40 | |
41 <p><br></p> | |
42 | |
43 <div class="fragment"><pre> | |
44 | |
45 a = [0.5 -0.01]; | |
46 b = [1 0.1]; | |
47 fs = 1; | |
48 f = miir(a,b,fs) | |
49 </pre></div> | |
50 | |
51 <p> | |
52 <br> | |
53 Notice that the convetion used in this function is the one described in the <a href="sigproc_dfilt.html"> Digital filters classification</a> section | |
54 </p> | |
55 | |
56 <h2><a name="IIRimport">Importing an existing model</a></h2> | |
57 <p> | |
58 The miir constructor also accepts as an input existing models in different formats: | |
59 </p> | |
60 <li> | |
61 <li><p>LISO files:<p> | |
62 <div class="fragment"><pre> | |
63 f = miir(<span class="string">'foo_iir.fil'</span>) | |
64 </pre></div> | |
65 </li> | |
66 <li><p>XML files:</p> | |
67 <div class="fragment"><pre> | |
68 f = miir(<span class="string">'foo_iir.xml'</span>) | |
69 </pre></div> | |
70 <li><p>MAT files:</p> | |
71 <div class="fragment"><pre> | |
72 f = miir(<span class="string">'foo_iir.mat'</span>) | |
73 </pre></div> | |
74 </li> | |
75 <li><p>From repository:</p> | |
76 <div class="fragment"><pre> | |
77 f = miir(plist(<span class="string">'hostname'</span>, <span class="string">'localhost'</span>, <span class="string">'database'</span>, <span class="string">'ltpda'</span>, <span class="string">'ID'</span>, [])) | |
78 </pre></div> | |
79 </li> | |
80 </ul> | |
81 |