Digital Signal Processing Reference
In-Depth Information
1.5
Moving window
1
0.5
y
-
axis
0
-0.5
-1
-
axis
x
-1.5
0
1
2
3
4
5
6
7
Time
Figure 3.32 Linear regression over a rectangular moving window
Now the solution for such overdetermined equations in a least-squares sense is
p ¼ A
Þ
1
t
t
ð
A
A
, where our interest is p
ð
1
Þ¼
m. We can derive a closed-form
solution as
0
1
6
N
ð
N
1
Þ
12
N
ð
N
2
¼
@
A
A
m
c
1
Þ
t
t
:
ð
3
:
56
Þ
6
N
ð
N
1
Þ
2
ð
2N
þ
1
Þ
N
ð
N
1
Þ
t
Even though (3.56) looks very complicated, it is only a pair of FIR filters with their
impulse responses given as h
k
¼f
2
; ...g
and h
k
¼f
1
;
4
;
6
;
8
;
1
;
1
;
1
; ...g
. For a six-
point moving linear regressor, the rate is given as
(
"
#
"
#
)
1
6
2
:
ð
6
þ
1
Þ
X
X
6
1
i
¼
0
k
i
6
1
1
_
k
¼
2
ð
i
þ
1
Þ
k
i
ð
3
:
57
Þ
t
1
i
¼
0
This is shown in Figure 3.33, which is a SIMULINK block diagram. In fact, this is a
Kalman filter or a state estimator.
3.12.2 Fitting a Sine Curve
There are many situations where you know the frequency, but unfortunately, by the
time you get the signal, it is corrupted and of the form y
k
¼
sin
ð
2
fk
Þþ
n
k
, where
n
k
is a zero-mean uncorrelated noise. The problem is to get back the original signal.
Immediately what strikes our mind is a high-Q filter. Unfortunately, stability is an
issue for these filters. In situations of this type, we use model-based filtering.
Consider an AR process representing an oscillator (poles on the unit circle):
x
k
¼
px
k
1
x
k
2
where
2
p
2
:
ð
3
:
58
Þ
Search WWH ::
Custom Search