22.09.2015 Views

of Microprocessors

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

394 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

12-11 showed that the roll<strong>of</strong>f is about 4 dB for 100% width and less than 1<br />

dB for 50% width at one-half the sample frequency. With reasonably good<br />

filters, this would amount to no more than 2 dB <strong>of</strong> loss at the top <strong>of</strong> the<br />

frequency range. For the utmost in fidelity, it may be desirable to<br />

compensate for the roll<strong>of</strong>f, particularly if the pulse width is equal to the<br />

sample period (stairstep DAC output). Correction for this effect can best be<br />

accomplished in the low-pass filter. Although it is mathematically possible to<br />

design a filter with other than flat passbands, it is a very involved process.<br />

If a Butterworth filter is being used, a slight rise in response just before<br />

cut<strong>of</strong>f can be effected by raising the Qs <strong>of</strong> the lowest Q stages. This action<br />

does not have much effect on the cut<strong>of</strong>f characteristics and in fact can be<br />

expected to raise the 50-dB cut<strong>of</strong>f point no more than a couple <strong>of</strong> decibels.<br />

Correcting a Chebyshev or elliptical filter is best accomplished by adding<br />

another re$onant low-pass section with a resonant frequency somewhat beyond<br />

the main filter cut<strong>of</strong>f frequency. Q factors in the range <strong>of</strong> 1 to 2 for the<br />

added section will provide a gentle but accelerating rise in the otherwise flat<br />

passband, which then abruptly cuts <strong>of</strong>f as before. Any resonant peak in the<br />

extra section will occur so far into the main filter stopband that its effect will<br />

be completely insignificant.<br />

Figure 12-22A shows the typical performance <strong>of</strong> such a compensation<br />

stage. The frequency scale has been normalized so that 1. 0 represents the<br />

cut<strong>of</strong>f frequency <strong>of</strong> the main low-pass filter; thus, compensation accuracy<br />

above 1. 0 is <strong>of</strong> no concern. Curve A shows the amplitude response <strong>of</strong> a DAC<br />

with stair-step output (100% pulse width) at a sample rate 2.5 times the<br />

main filter cut<strong>of</strong>ffrequency and followed by a deglitcher with a time constant<br />

that is 10% <strong>of</strong> the sample period. Since a finite deglitcher time constant also<br />

represents a slight high frequency loss, it is appropriate to compensate for it<br />

at the same time. Curve B is the amplitude response <strong>of</strong> the compensation<br />

stage, and curve C is the composite, compensated response.<br />

The short BASIC program in Fig. 12-22B can be used to iteratively<br />

design compensation filters. The variables FO and QO are the frequency and Q<br />

parameters <strong>of</strong> the compensation filter normalized to the main filter cut<strong>of</strong>f<br />

frequency. FI is the sample rate, also normalized. TO is the DAC output<br />

pulse width, and TI is the time constant <strong>of</strong> the deglitcher, both as fractions<br />

<strong>of</strong> the sample period. For track-and-ground deglitchers, set T1 to zero. To<br />

use the program, set the FI, TO, and TI variables to match the DAC<br />

operating conditions and "guess" at values for FO and QO. Then run the<br />

program and note the shape <strong>of</strong> the compensated curve either by manually<br />

plotting it or adding plotting statements to the program. The goal is<br />

accurate compensation up to 1.0 with a gradual roll<strong>of</strong>f for higher frequencies<br />

as in Fig. 12-22A. Good starting values are those used to produce the curves<br />

in A; PI = 2.5, TO = 1.0, T1 = 0.1, FO = 1.58, and QO = 1.45.<br />

Fig. 12-22. (A) Two-pole sin(X)/X compensator performance. (B)<br />

program to evaluate compensation filters.<br />

BASIC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!