Digital Signal Processing Reference
In-Depth Information
t
H k ¼ðH k 1 = k Þþ ð H k 1 = k Þ g k g
k ðH k 1 = k Þ
;
ð 5
:
57 Þ
t
1 þ g
k ðH k 1 = k Þg k
t
k 1
J k ¼ J k g k p
;
ð 5
:
58 Þ
p k ¼ H k g k
J k
t
¼
½
^
a 1 ; ^
a 2 ; v
;
ð 5
:
59 Þ
p k þ 1 ¼ p k þ
p k ;
ð 5
:
60 Þ
^
x k ¼ s k 1 ^
a 1 þ s k 2 ^
a 2 ;
ð 5
:
61 Þ
x k ¼
x k þ
^
x k ;
ð 5
:
62 Þ
^
^
k ¼
k 1 0
:
9995 þ 0
:
0005
:
ð 5
:
63 Þ
5.7.2 Algorithm to Code
The above algorithm was first implemented in MATLAB and then a C code was
written for easy implementation on the Motorola DSP5630X. Both the MATLAB
code and the corresponding C code are given in the appendix. Figure 5.13(a) shows
the input and the estimated output using the MREM algorithm presented as above.
In Figure 5.13(b) we can see the convergence of the parameters. A quick
observation shows that a 2 is almost one whereas a 1 is representative of the
frequency.
1
2
Output
1.5
0.5
a1
1
0
0.5
−0.5
0
a2
1
0.5
Input
−1
−1.5
0
500
1000
1500
200
800
810
820
830
840
850
Iterations
Iterations
(b)
(a)
Figure 5.13
Implementation on a DSP5630X
5.8 FPGA Implementation of a Kalman Filter
In this section we implement the algorithm developed in Section 3.11.1. The
algorithm is focused on reducing complexity to two FIR filters. Algorithm develop-
ment is the most critical part of any implementation. In this case the critical aspect
is reducing the complex calculations to FIR filters for ease of implementation on
field-programable gate arrays (FPGAs). FPGAs are combinatorial circuits which
Search WWH ::




Custom Search