Non-Linear Least Squares: in General We Are Not Lucky Enough To Have A Linear Problem. in This Case
Non-Linear Least Squares: in General We Are Not Lucky Enough To Have A Linear Problem. in This Case
purpose minimizer.
Third, especially if we need to do it many times (e.g. signal
H(z) =
B(z)
b[0] + b[1]z1 + + b[q]zq
=
A(z)
1 + a[1]z1 + + a[p]zp
1
Historically, G.R. de Prony invented the method as early as 1795. The goal was then to decompose a signal into
a finite set of damped sinusoids. The idea is very close to that of the Fourier transform, which was published in 1822.
filter is given by
h[n] =
0,
Pp
k=1 a[k]h[n
k] +
Pq
k=0 b[k][n
k], n > 0
n<0
N1
X
n=0
N1
X
n=0
where
hdf [n] =
p
X
k=0
a[k]hd [n k]
Jf =
p
N1
X X
n=0
a[k]hd [n k] b[n]
2
k=0
hd [0]
hd [1]
h= .
..
hd [q]
0
hd [0]
H0 = hd [1]
..
.
hd [q 1]
and
0
0
hd [0]
..
.
hd [q 2]
..
.
..
.
hd [q p]
N1
X
hd [n]
n=q+1
k=1
T
= (x Ha) (x Ha),
where
p
X
!2
a[k]hd [n k]
hd [q + 1]
hd [q + 2]
x=
..
.
hd [N 1]
hd [q]
hd [q + 1]
h [q + 2]
H = d
..
.
hd [N 2]
and
hd [q 1]
hd [q]
hd [q + 1]
..
.
hd [N 3]
a = (HT H)1 HT x
In summary:
a = (HT H)1 HT x
b = h + H0 a
..
.
hd [q p + 1]
hd [q p + 2]
hd [q p + 3]
..
.
hd [N 1 p]
Hd (e2jf ) =
1,
0,
if |f| < fc
if |f| > fc
n = 0, 1, . . . , N 1
response n0 samples:
hd [n] = 2fc sinc(2fc (n n0 )),
n = 0, 1, . . . , N 1
N = 51, n0 = b N
2 c and p = q = 10 are shown in the figures
below.
Amplitude
0.15
0.1
0.05
0
0.05
10
15
20
25
n (samples)
30
35
40
45
50
0.1
0.05
0
0.05
0.1
0.15
10
20
30
40
50
n (samples)
60
70
80
90
100
Magnitude (dB)
0
20
40
60
80
100
120
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency ( rad/sample)
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency ( rad/sample)
0.8
0.9
Phase (degrees)
200
400
600
800
1000
1200
20
20
40
60
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency ( rad/sample)
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency ( rad/sample)
0.8
0.9
Phase (degrees)
200
400
600
800
1000
Method of Moments
Method of Moments
The Method of Moments is another estimation technique that
Method of Moments
Assume that the k-th moment k = E(xk [n]) depends
= h1 (k ).
We replace the theoretical moment by its sample estimator
1 X k
k =
x [n]
N
N1
n=0
Method of Moments
We obtain
1 N1
X
= h1
xk [n] .
N
n=0
problem.
Suppose x[n] = A + w[n], for n = 0, 1, . . . , N 1, where
x2 [n] (1 )1 (x[n]) + 2 (x[n]) dx[n]
Z
Z
2
x2 [n]2 (x[n]) dx[n]
(1 )
x [n]1 (x[n]) dx[n] +
(1 )21 + 22
equation:
E(x2 [n]) = (1 )21 + 22
E(x2 [n]) = 21 21 + 22
E(x2 [n]) = 21 + (22 21 )
E(x2 [n]) 21 = (22 21 )
E(x2 [n]) 21
=
22 21
=
N1
P
1 PN1 2
n=0 x [n]:
N
x2 [n] 21
n=0
22
21
1
2
..
.
= h1 (1 , 2 , . . . , p )
= h2 (1 , 2 , . . . , p )
..
..
.
.
p = hp (1 , 2 , . . . , p )
= h1 (),
where
1 PN1
NP n=0 x[n]
1 N1 x2 [n]
N n=0
..
.
1 PN1 p
n=0 x [n]
N
Example
zero. Thus, lets use the three first even moments that can
be shown to be
2 = E(x2 [n]) = (1 )21 + 22
4 = E(x4 [n]) = 3(1 )41 + 342
6 = E(x6 [n]) = 15(1 )61 + 1562
Example
equations:
21
22 =
=
u+
v
21
u2 4v
2
2 21
22 21
Example
where
6 54 2
54 1522
4
v = 2 u
3
u =
Example
Example
The results are shown below.
21: Mean = 28.8234, true value = 29.9011, variance = 50.4606. Failed: 0.59%
4000
2000
20
40
60
80
100
120
4000
2000
10
15
20
25
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Example
Example
Example
21: Mean = 11.6936, true value = 11.8698, variance = 2.7965. Failed: 65.21%
1000
500
10
15
20
25
30
300
200
100
0
50
100
150
200
250
300
350
400
450
500
0.9
500
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
Example
http://www.cs.tut.fi/courses/SGN-2607/Mixture.m.
n = 0, 1, . . . , N 1
U(0, 2).
This way s[n] = A cos(2f0 n + ) can be viewed as a
definition,
rss [k] = E [s[n]s[n + k]]
= E [A cos(2f0 n + ) A cos(2f0 (n + k) + )]]
= A2 E [cos(2f0 n + ) cos(2f0 (n + k) + )]
This can be simplified using the cosine product formula2 :
1
1
rss [k] = A2 E
cos(2f0 k) + cos(4f0 n + 2f0 k + 2)
2
2
=
2
A2
A2
E [cos(2f0 k)] +
E [cos(4f0 n + 2f0 k + 2)]
2
2
1
[sin(4f0 n + 2f0 k + 4) sin(4f0 n + 2f0 k + 0)]
=
4
= 0,
because sine is 2-periodic.
rss [k] =
A2
A2
E[cos(2f0 k)] =
cos(2f0 k)
2
2
A2
cos(2f0 k) + 2 [k]
2
A2
cos(2f0 ),
2
1
f0 =
arccos
2
2rxx [1]
A2
1
f0 =
arccos
2
PN2
x[n]x[n + 1]
(N 1)A2
n=0
below.
The Box plot3 shows that the estimates converge towards
3
Box plot shows the smallest observation, lower quartile (Q1), median, upper quartile (Q3), and largest
observation; Matlab: boxplot.
0.2
0.1619
Estimate of f0
0.15
0.1
0.05
0
100
200
300
400
500
600
it.
In a similar manner we can derive a MoM estimator for A2 ,