Digital Signal Processing Reference
In-Depth Information
rcnew ¼ e[0]; /* Send the error signal*/
AIC23_data.channel[LEFT] ¼ (short) lcnew;
AIC23_data.channel[RIGHT] ¼ (short) rcnew;
output_sample(AIC23_data.combo);
}
With the advantage of the stereo input and output channels, we can conduct system modeling for an
unknown analog system illustrated in Figure 10.23 , where RCI is used to feed the unknown analog
system output to the DSK. The program segment is listed in Program 10.5.
Program 10.5. Program segment for modeling an analog system.
float x[40]
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; /*Reference input buffer*/
float w[40] ¼ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; /*Adaptive filter coefficients*/
float d[1] ¼ {0.0}; /*Unknown system output */
float y[1] ¼ {0,0}; /*Adaptive filter output */
float e[1] ¼ {0.0}; /*Error signal */
float mu ¼ 0.000000000002; /*Adaptive filter convergence factor*/
interrupt void c_int11()
{
¼
float lc; /*left channel input */
float rc; /*right channel input */
float lcnew; /*left channel output */
float rcnew; /*right channel output */
int i;
//Left channel and right channel inputs
AIC23_data.combo ¼ input_sample();
lc ¼ (float) (AIC23_data.channel[LEFT]);
rc ¼ (float) (AIC23_data.channel[RIGHT]);
// Insert DSP algorithm below
for(i ¼ 39;i>0;i--) /*Update the input buffer*/
{ x[i]
¼
x[i-1]; }
dt
()
Unknown
Analog system
xn
()
yn
()
Signal
Generator
Left Line In
(LCI)
Left Line Out
(LCO)
TI TMS320C6713
DSP Board
Oscilloscope
Right Line In
(RCI)
Right Line Out
(RCO)
dn
()
en
()
FIGURE 10.23
System modeling using an LMS adaptive filter.
 
Search WWH ::




Custom Search