THE APPLICATION OF SIGMA DELTA D/A CONVERTER IN THE SIMPLE TESTING DUAL CHANNEL DDS GENERATOR J. Fischer Faculty o Electrical Engineering Czech Technical University, Prague, Czech Republic Abstract: This article deals with the application o sigma delta in the low cost testing dual channel generator with direct digital synthesis based on digital signal processor. The results o measurement perormed by means o ADSP2181 EASY KIT are presented. Keywords: DDS generator, sigma delta D/A converter 1 INTRODUCTION Sigma delta D/A converters are originally designed and most oten used or the purpose o audio signals generation in the requency range approximately rom several tens Hz up to 15 khz. As an example could serve D/A converter included in the codec AD1847. The codec Analog Devices AD1847 integrates dual channel 16 bit sigma delta A/D converter (ADC) and dual channel 16 bit sigma-delta D/A converter (). The contains digital low pass interpolation ilter. The anti-imaging interpolation ilter oversamples and digitally ilters the high requency images [1]. The outputs are then iltered in the analogue domain by a combination o switched- capacitor and continuos-time ilter. INC PHASE ACCUMULATOR + D 31 -D 20 12 LUT sin D 31 -D 0 CLK Figure.1 Basic diagram o a DDS generator 2 SIGMA DELTA IN THE DSP BASED SIGNAL GENERATOR This AD1847 is coupled to the digital signal processor (DSP) ADSP2181 in the Easy Kit ADSP2181. The block unctional diagram o designed Direct Digital Synthesis (DDS) generator is on the Fig.1. The heart o the system is the bit phase accumulator contents o which is updated once per each clock cycle. The phase increment (INC) is summed in the phase accumulator at every period o clock signal CLK. The requency o output signal depends on the value o INC. The 13 most signiicant bits o phase accumulator actually contribute to the address o the current sample o sin wave stored in the waveorm memory - look up table (LUT). This sample is transerred rom the waveorm memory to the. The internal low pass ilter () eliminates high harmonics above one hal o sampling requency. This block diagram has been realised in the DSP - ADSP2181 by sotware. The sampling signal CLK with requency s =4410 is generated by the codec, which requests every 1/44100 second a new data. The DSP realises two bit phase accumulators P.ACC 1 and P.ACC 2. They accumulate independently phase increments INC 1 and INC 2 respectively. I the phase increments INC 1 and INC 2 are the same, the dierence o the initial values SET 1 and SET 2 stored in the P.ACC 1 and P.ACC 2 sets phase shit o signals OUT 1 and OUT 2.
SET 1 INC 1 CLK ( S ) P. ACC 1 LUT sin OUT 1 INC 2 P. ACC 2 OUT 2 SET 2 Figure. 2 The realisation o DDS generator in the ADSP2181 The requency resolution o this generator is theoretically determined by the equation (1) 44100 res = = 2 5 1. 027 * 10 [ Hz ] (1) and phase shit resolution by (2). PH 2 π res = = 2 9 1, 46* 10 [ rad ] (2) I the phase increments INC1 and INC2 are constant, but not equal, the output signals with dierent requencies are generated. The mean value o generated requency is given by (3), = S INC 2 and mean value o phase shit by (4). (3) 2π PH ( SET SET ) (4) = 2 2 1 The DSP may vary independently the output requency (in sweep mode) o both channels by the continuously modiying o the phase increments INC 1 and INC 2. Figure 3. The approximation error The experimental DSP based DDS generator uses internal RAM o the ADSP2181 as LUT. The sin waves with 256, 1024, 2048, 4096 and 8192 samples o 16- bit word stored in the LUT have been designed.
Due to small capacity o internal RAM at some ADSP21XX amily members, instead o using LUT calculation o value o samples in the real time by using polynomial approximation o sin unction could be perormed - [2] and [3]. The DSP calculates the values o samples according the ormula (5). = + + + 2 3 4 5 sin( x ) 3. 140625 x 0, 02026367 x 5, 5196x 0, 544677 x 1,800293x (5) where x lies in the interval rom 0 to 0.5 and α is the phase angle measured in radians. x = α π (6) The coeicients in polynomial unction are suitably chosen so that they can be represented by 16- bits numbers with an error less than 1E-7. The maximum deviation o polynomial approximating unction rom exact sin x unction is less than 3E-5. The calculation o value by polynomial approximation takes less than 2.5 µs. The graphical representation o the approximation error is on Fig.3. The resolution o approximation o sin x unction by calculation corresponds to resolution which could be reached by LUT designed or 65536 samples. 3 THE RESULTS OF MEASUREMENT The measurement was perormed or both cases i.e. when unction sin x was generated using LUT as well as when values were calculated by the above mentioned algorithm. The spectral purity o generated signal has been measured by the FFT Signal analyser HP35670A and Spectrum analyser HP3580A. The content o higher harmonics does not represent a problem; the measured value o THD is better than 0,01%. Marker Trace: A X Re: 0 Date: 09/05/00 Time: 13::00 Y Re: 0 A: CH1 Pwr Spec X:1 khz Y:-2.524 1-119 THD:0.009 % 12.8kHz Figure 4. Spectrum 1, measured without dierence ampliier. The Fig.4 shows spectrum o signal with =1kHz generated using calculation according Equ.5. The existence o second harmonic at 2kHz is clearly visible. The improvement has been reached by implementation o a dierence ampliier (type -TL084). The signals rom channel OUT1 and OUT2 have been brought on the input o dierence ampliier. The same signal with requency o 1 khz and phase shit o 180 degrees has been generated. The degree o improvement can be seen rom the Fig.5 and Fig.6.
Marker Trace: A Date: 09/05/00 Time: 13:28:00 X Re: 0 Y Re: 0 A: CH1 Pwr Spec X:1 khz Y:3.30878 5-115 THD:0.0036 % 12.8kHz Figure 5. Spectrum 2, measured with the dierence ampliier Disp Frmat Date: 09/05/00 Time: 13::00 A: CH1 Pwr Spec X:1 khz Y:3.28743 5-115 1.6kHz Figure 6. Spectrum 2,measured with the dierence ampliier, detail 4 CONCLUSION The all experiments and measurements have been perormed with the simple low cost (approx. 100 USD) Analog Devices Easy Kit Lite ADSP2181. The RS2 interace has been used or
communication with PC. In order to avoid the inluence o intererring signal coming rom PC it was necessary to disconnect the PC ater the parameters setting. The better solution is to use an optical isolation. For testing purposes, it is possible to load the internal RAM - LUT with a user-deined waveorm. The waveorm data (or. example (sinx)/x, sin(x) * e -x, saw signal) were computed by Microsot Excel and then linked to the ADSP program. The experiments showed that perormance o internal o codec is not optimal or arbitrary signal generation. This is especially true or generation o signals with saw waveorm. The ADSP2181 may to realise two dierent look up tables or channel 1 and channel 2 in its internal RAM, so that the dierent waveorms could be generated on the output 1 and output 2. The described system realises the known method o DDS generation by a simple low cost sigma delta in the co-operation with the digital signal processor. Sinusoidal signals with requency higher than 100 khz can be generated i high speed D/A converters and external LP ilters are used. The generator here described can be used as low cost source or testing o A/D converters included in one chip microcomputers. Acknowledgement The results o the research project J04/98:210000015 Research o New Methods or Physical Quantities Measurement and Their Application in Instrumentation were used in this paper. REFERENCES: [1] Analog Devices: AD1847 data sheet [2] Analog Devices : ADSP-2100 Family user`s manual, Analog Devices, Noorwood, 1995, p.14-7 [3] Analog Devices : Digital signal processing applications using the ADSP-2100 amily, volume1, Prentice - Hall, Englewood Clis1992, p. 51. AUTHOR: Ing. Jan FISCHER, CSc. Department o Measurement, Faculty o Electrical Engineering, Czech Technical University, Technicka 2, 166 27 Prague-6, Czech Republic, Phone Int. ++42 2 2435 2179, Fax Int ++42 2 311 9929, E-mail: Fischer@eld.cvut.cz