CHAPTER 7
A 16bit D/A interface with Sinc approximated semidigital reconstruction filter 7.5. Semidigital FIR filter design To design the timediscrete filter, the effect of the noiseshaper and the lowpass continuous time analog filter have to be considered. The noise shaper and the oversampling ratio are specified and all the requirements and conditions are known. The next step is the calculation of the coefficients. But how many coefficients are necessary? To answer this question some boundary conditions will be introduced.
The area that is available limits the number of coefficients to about 100 irrespective to the implementation which is chosen. Since the coefficients are implemented by weighted currents this imposes a limitation also. The ratio between the largest and the smallest coefficient is limited by accuracy. A large number of coefficients implies big differences between coefficients. The accuracy of the smaller coefficients is impaired with consequences on the stopband rejection. There are also a few conditions for the signal transfer function of the filter. First of all, the ripple in the audioband has to be very small (< 0.1 dB). A small droop (0.5 dB) is allowed since the digital filter can correct for this nonideal behavior. In the design of a discrete time filter suitable for audio signals, phase is an important parameter too. In a digital lowpass filter design, a linear phase can be obtained by a symmetric impulse response. Odd or even numbers of coefficients can be used. The main requirement is to achieve a stopband rejection for the noise of more than 50dB. 7.5.1 Calculation of coefficientsIn the literature, a number of standard algorithms for digital filter design are extensively discussed [15]. The methods are based on Fourier series, the frequency sampling method, the Remez exchange method and equiripple designs. All these methods cannot be used since the design of this filter is not a standard design but the product of a time discrete filter and the transfer function of the noise shaper. Such methods generate a large number of coefficients and overspecifications. In order to take into account that the noise transfer will be influenced by the noiseshaper, the semidigital filter and the lowpass analog filter, we have developed an iterative method to design the filter based on Sinc approximation of the impulse response as shown in fig.7.8. Here, we have represented the transfer of the noise shaper NS, the transfer of the semidigital filter LPD and the analog lowpass LPA. The noise transfer is denoted NS*LPA*LPD. The simulations were performed with a routine written in MatLab. This allows to optimize the number of the coefficients and to take into account the effects of matching on the response. First, the time domain is divided into N equal steps and the symmetric coefficients are calculated by using the division of sin(x)/x. The Sinc function has been windowed with a rectangular window. The computer is used to perform this calculation by employing the Ztransform. For the noise shaper the transfer function is also calculated by using a Ztransform routine. Since the continuous time lowpass filter may not influence the characteristic at the audioband, its cutoff frequency is set to 140 kHz. In this way it is possible to filter the spectral images at multiples of the sample frequency sufficiently. Further, these three functions are plotted on a logarithmic scale and therefore they can be easily added. The Sinc function has been truncated to the first five lobes but the 50dB requirement for the out of band noise is not met. By taking more coefficients, the stopband rejection becomes better than 55dB, as shown in fig.7.9.
Simulations have been carried out to determine which part of the Sinc function is important and how many coefficients are necessary in the optimum case. The number of lobes from which the Sinc is approximated changes the transfer characteristic of the filter. It is also important to ensure that at zero crossings of the Sinc function the approximation has also a zero. At that moment the next sample reaches its maximum value. Using more coefficients to approximate the same part of the Sinc means decreasing the time step. This is equivalent with increasing the sample frequency in the case of a digital filter. The results is a smaller pass band of the LPD filter characteristic without changing its shape. It turns out that just the main lobe of the Sinc function is the most important part to approach the desired filter characteristic. With no more than 25 coefficients this main lobe can be approximated such that the required attenuation of more than 50dB is reached. Actually there are 27 coefficients but two of them are zero. The calculated coefficients are given in Table 7.1.
Table 7.1: Coefficients of the FIR filter
To be noticed the small ratio between the largest and the smallest coefficient which is about 12. The approximation of the main lobe is shown in fig.7.10. The first and the last coefficient are zero. The transfer characteristics for the noise and signal are illustrated in fig.7.11. The rejection of the out of band noise of the noise characteristic (NS*LPA*LPD) is better than 53dB up to the higher end of the fundamental interval (f=f_{s}/2). A sensitivity analysis will show that in the worst case the required 50dB is fulfilled. For the signal transfer a smooth roll off (» 0.25 dB in the audioband) can be seen. The zoomed characteristic of the signal in the audioband is shown in fig.7.12.
The sharp digital filter will correct the droop of the characteristic along with the sin(x)/x distortion at the end of the passband. The gain error can be corrected by multiplying the coefficients with a constant factor. 7.5.2 Windowing In the design of a FIR filter windowing functions are used to reduce the infinite length of the impulse response. By applying a rectangular window on the impulse response, i.e. just deleting a number of the coefficients, there will be oscillations in the frequency response due to Gibbs phenomenon. In order to reduce the oscillations different window functions can be applied. Widely used window functions for example are Bartlett, Hamming, Hanning and Kaiser (see fig.7.13).
By multiplying the calculated Sinc coefficients with a window, the transfer becomes slightly better. After this operation the ratio between the smallest and the largest coefficient increases tremendously. For a digital filter this is not a problem because the coefficients are represented by a number of bits. In this application this means a large ratio between components. Moreover, due to windowing, the transfer function becomes more sensitive to rounding. That is why no windowing technique is used for the calculation of the coefficients. 7.5.3 Filter response and the coefficient quantization The coefficients of the filter are subject for mismatch, rounding and quantization to the incremental grid span of the process. This will affect the stopband attenuation of the filter with some influence on the passband also. We would like to obtain specifications for the coefficients of the filter such that we get sufficient suppression of the quantized noise out of audio band without affecting the passband. Coefficient nonidealities generate an erroneous transfer function: (7.12) The deviation of the filter transfer depends on the random coefficient errors Da_{k} : (7.13) When the random coefficient errors Da_{k} are Gaussian distributed the deviation of the filter transfer is Rayleigh distributed [16] with a mean value m_{DH} and a standard deviation s_{D}H given by: (7.14) In eq.(7.14) N is the filter length and s(Dh_{k}) represents the standard deviation of the coefficients due to process mismatch. The deviation of the filter transfer has three main causes: rounding of small coefficients, quantization of the coefficients to the finite incremental grid span and mismatch. Those effects are treated separately. 7.5.4 Rounding small coefficients For FIR filters with a lot of coefficients we have to deal with large ratios between the largest and the smallest coefficient. It is necessary to round small coefficients to fit to the smallest feature size of a transistor. Rounding of small coefficients will introduce quantization errors with consequences on stopband rejection. The response of the filter in the passband it is influenced only by large coefficients and the rounding procedure has no influence on the passband. In order to estimate the stopband rejection we have to consider the size of the minimum coefficient a_{min}. As a rule of thumb, the maximum achievable stopband rejection is: (7.15) To have a stopband rejection of about 50dB the rounded coefficients have to be smaller than a_{min}=0.003. In our case, the smallest coefficient is 0.0054 and rounding is not a necessity. In the design procedure we try to keep the number of the coefficients as low as possible in order to avoid big differences between the largest and the smallest coefficient. 7.5.5 Matching of coefficientsIn contrast to a digital filter, where the only important error is caused by truncation or rounding due to the finite word length, in the time discrete filter the mismatch of the coefficients will impair the frequency characteristic. In practice the analog coefficients are realized by using current sources and their values will deviate from their nominal value. The condition for the stop band noise has to be met under mismatch conditions. Only MonteCarlo analysis can reveal the effect of mismatches on the transfer characteristic. In fig.7.14 the realization of the coefficient a_{k} is shown. A floating current source I_{0} improves the matching between the PMOS and NMOS branches. The current related to the same coefficient a_{k} is I_{k}= a_{k}I_{0}=I_{0} (W/L)_{k}/(W/L)_{0}. The mismatch of the coefficient a_{k} is a consequence of V_{T0} mismatch and b mismatch. Consider a multiparameter function f=f(x_{1},x_{2},…x_{N}). From multiparameter sensitivity analysis we have:
(7.16) Regarding the current I_{k} as the multiparameter function, the mismatch of the coefficient a_{k} is found as a function of individual mismatch terms of transistors Mo and Mk neglecting the contributions of the cascode transistors. For a single ended current mirror, the inaccuracy of the coefficient a_{k} is found from: (7.17) The lengths of the transistors Mk are taken equal and therefore we get: (7.18) The maximum value of the width W_{0} of the transistor M0 is limited from area requirements. Consider now the current mirror with PMOS and NMOS outputs. The transistors Mkn and Mkp have the same dimensions. Denote s(Da_{k})_{p} and s(Da_{k})_{n} the mismatch of the PMOS and NMOS branch respectively. Hence, the mismatch of the coefficient a_{k} in the differential approach is given by: (7.19) Denote the mismatch term: (7.20) Then the mismatch of the coefficient a_{k} in the differential approach becomes:
(7.21) This result in conjunction with eq.(7.14) can be used to have a first estimation of the errors in terms of m_{DH} and s_{D}H of the transfer H. The Monte Carlo optimization procedure described later in section 7.5.7 is based on s(Da_{k}). 7.5.6 Quantization to the incremental grid span The IC processes have a finite incremental grid span. For example in a 0.8mm CMOS process, the finite incremental grid span is in the order of 0.1m m. The dimensions of the devices (width and length) have to be quantized to the grid span. Rounding introduces a length uncertainty of (0.05 mm, 0.05 mm) and the error can be considered uniformly distributed in this interval. Compared to the errors introduced by mismatch, quantization to grid has a negligible influence on the filter response. Again eq. (7.14) can be used to show this effect. 7.5.7 SimulationsEquation (7.21) shows that each coefficient has a standard deviation which depends on W and L. Generating filter characteristics with ± 3s errors for coefficients, we cover about 99.75% of the possible cases. In MatLab, there are no standard routines to perform a Monte Carlo analysis. However, it is simply to generate normal distributed random numbers with mean 0.0 and variance 1.0. Therefore it is possible to combine this random number generator with the previous derived equation, to calculate what the effects are on the filter characteristic. The random number determines also if the coefficient is rounded up or down respectively.
In fig.7.15 the simulation results for the optimal widths and lengths of the transistors are shown. The inaccuracy of the noise transfer increases at the end of the fundamental interval. In this region, the effect of the noise shaper on the noise transfer is less effective and attenuation of the noise is ensured by the FIR filter. In the worst case we have 61dB rejection for the noise. The signal transfer is slightly affected by the matching properties. 



