0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 <li><a href="#description">Description</a></li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 <li><a href="#call">Call</a></li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 <li><a href="#inputs">Inputs</a></li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 <li><a href="#outputs">Outputs</a></li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 <li><a href="#algorithm">Algorithm</a></li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 <li><a href="#parameters">Parameters</a></li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 <h2><a name="description">Description</a></h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 noisegen2D generates colored noise from withe noise with a
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 given cross spectrum. The coloring filter is constructed by a fitting procedure to the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 models provided. If no model is provided an error is
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 prompted. The cross-spectral matrix is assumed to be
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 frequency by frequency of the type:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 / csd11(f) csd12(f) \
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 CSD(f) = | |
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 \ csd21(f) csd22(f) /
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 Note: The function output colored noise data with one-sided
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 cross spectral density corresponding to the model provided.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 <h2><a name="call">Call</a></h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 <div class="fragment">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 <pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 b = noisegen2D(a, pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 [b1,b2] = noisegen2D(a1, a2, pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 [b1,b2,...,bn] = noisegen2D(a1,a2,...,an, pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 </pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 </div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 <li> Note1: input AOs must come in couples.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 <li> Note2: this method cannot be used as a modifier, the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 call <tt> a.noisegen2D(pl) </tt> is forbidden.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 <h2><a name="inputs">Inputs</a></h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 <li> a is at least a couple of time series analysis objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 <li> pl is a parameter list, see the list of accepted parameters below
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 <h2><a name="outputs">Outputs</a></h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 <li> b are a couple of colored time-series AOs. The coloring
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 filters used are stored in the objects procinfo field under
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 the parameters:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 <li> b(1): 'Filt11' and 'Filt12'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 <li> b(2): 'Filt21' and 'Filt22'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 <h2><a name="algorithm">Algorithm</a></h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 <ol>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 <li> Fit a set of partial fraction z-domain filters using
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 utils.math.psd2tf
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 <li> Convert to bank of mIIR filters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 <li> Filter time-series in parallel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 The filtering process is: <br/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 b(1) = Filt11(a(1)) + Filt12(a(2)) <br/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 b(2) = Filt21(a(1)) + Filt22(a(2))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 </ol>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 <h2><a name="parameters">Parameters</a></h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 <li> 'csd11' - a frequency-series AO describing the model csd11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 <li> 'csd12' - a frequency-series AO describing the model csd12
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 <li> 'csd21' - a frequency-series AO describing the model csd21
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 <li> 'csd22' - a frequency-series AO describing the model csd22
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 <li> 'MaxIter' - Maximum number of iterations in fit routine
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 [default: 30]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 <li> 'PoleType' - Choose the pole type for fitting:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 <li> 1 - use real starting poles.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 <li> 2 - generates complex conjugate poles of the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 type a.*exp(theta*pi*j)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 with theta = linspace(0,pi,N/2+1).
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 <li> 3 - generates complex conjugate poles of the type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 a.*exp(theta*pi*j)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 with theta = linspace(0,pi,N/2+2) [default].
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 </li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 <li> 'MinOrder' - Minimum order to fit with. [default: 2].
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 <li> 'MaxOrder' - Maximum order to fit with. [default: 25]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 <li> 'Weights' - choose weighting for the fit: [default: 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 <li> 1 - equal weights for each point.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 <li> 2 - weight with 1/abs(model).
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 <li> 3 - weight with 1/abs(model).^2.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 <li> 4 - weight with inverse of the square mean spread of the model.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 </li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 <li> 'Plot' - plot results of each fitting step. [default: false]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 <li> 'Disp' - Display the progress of the fitting iteration.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 [default: false]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 <li> 'FitTolerance' - Log Residuals difference check if the minimum
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 of the logarithmic difference between data and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 residuals is larger than a specified value.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 ie. if the conditioning value is 2, the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 function ensures that the difference between
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 data and residuals is at lest 2 order of
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 magnitude lower than data itsleves. [default: 2].
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 <li> 'RMSEVar' - Root Mean Squared Error Variation - Check if the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 variation of the RMS error is smaller than 10^(-b),
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 where b is the value given to the variable. This
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 option is useful for finding the minimum of Chi
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 squared. [default: 7].
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 <li> 'UseSym' - Use symbolic calculation in eigendecomposition. [default: 0]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 <li> 0 - perform double-precision calculation in the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 eigendecomposition procedure to identify 2dim
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 systems and for poles stabilization
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 <li> 1 - uses symbolic math toolbox variable precision
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 arithmetic in the eigendecomposition for 2dim
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 system identification and double-precison for
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 poles stabilization
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 <li> 2 - uses symbolic math toolbox variable precision
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 arithmetic in the eigendecomposition for 2dim
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 system identification and for poles
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 stabilization
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 </li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 </p> |