# Generation of any PDF from a Set of Equally Likely Random Variables I. # Quantization Computers communicate with ones and zeros back and forth. The ones and zeros make a word that a computer sends to another. Each character of the word is a bit and the word has eight bits. The word can be called a byte. One byte can have 256 different words. In general if we have eight bits register in a computer the dynamic range of numbers are quantized to 256 levels. This may result in error because the number we want to process may not fall exactly in its level. The accuracy depends on the computer and the number of bits on a register. In this paper we want to use A/D quantization error. A given digital processing system is realized by computers by relating input and output by deference equation. Coefficient error is due to quantizing of each coefficient of the deference equation to the number of levels available by the registers of the computer. Then there is an error due to the exact value of the coefficient in the deference equation and the quantized value of the implemented system. The implemented system characteristics can be found easily and compared to the original system to determine the error. A/D quantization error is due to putting each sampled value of the signal to one of the levels. The result is a signal that has error that vary from sample to sample. We will establish a model for this error. The reason for the model is to avoid nonlinear analysis which is difficult. It is good to know some statistical properties of the error. This is a statistically equivalent model. We defined two sequences to be statistically equivalent if they have the same statistical properties. For example the values of random sequence generated by one computer may be different than the values by another computer but the statistical properties of the two are the same. Let y1(n) be the response of LTI system to x1(n) Author ? : Northeastern University, Boston, MA. e-mail : sobih84@gmail.com. Author ? : MIT, Boston, MA. and y2(n) be the response of the same system to x2(n). y1 (n) and y2 (n) are statistically equivalent if x1(n) and x2(n) are statistically equivalent. This result will enable us to find statistics of the system response by making a model for the input statistics. With this statistically equivalent concept we can avoid the nonlinear analysis of the error of quantization. # II. A/D Quantization Error A general model for A/D converter is the tandem connection between a sampler and a quantizer . Figure 1 show the block diagram. In this paper the effect of finite length word will be examined. We have b bits so the register ca have 2^b values and each sample is quantized to one of the values. The A/D quantization error is q(n) = x(n) -s(n Ts) and this is the difference between the quantized value and the sample value. The output of A/D converter is the sequence x(n) then is processed by the DSP system and the output is given to D/A converter. The DSP system is LTI so we can use superposition to express the response z(n) were y(n) is the response for s(nTs) and e(n) is the response for q(n). To find e(n) we have to know q(n). to know q(n) we have to know s(t). But s(t) is ia signal that has information and the information might change. It is not important to know the sequence q(n) but the statistical properties can help. In the case that we will study the statistical properties of q(n) do not depend on s(t). it is independent of the input signal. And a mean square error can be achieved without specific s(t). The approach we use in this paper is statistical equivalence. Two independent sequences which have the same statistics are said to be statistically equivalent. We find that two different LSI system responses are omputer quantization is important to consider in digital signal processing because it limits the accuracy of signals to be processed. In this paper we will talk about the quantization effect on system performance and use the result to make an improvement in the signal and systems field. statistically equivalent if the corresponding inputs are statistically equivalent. Thus the desired properties of e(n) can be found by examining sequences that are statistically equivalent to q(n). we will study the statistical properties of the input q(n) and then draw conclusions about the output e(n). we will show this experimentally. In A/D converter the amplitude rang is divided to intervals (1) Figure 1 is a graph of x(n) versus s(nT) which is the transfer characteristic. This is a uniform quantizer. Observe that the normalized quantization error is between -.5 and .5 . if the error sequence is equally likely distributed we will have a PDF as in figure 2. If the input is constant we will have a constant error which we can model as an impulse PDF at this value. For equally likely distributed sequence the probability of the error to be between zero and .1 is just the area under the PDF curve (2) The total area under the PDF is 100% meaning that the event will happen The model that we will develop is based on this: The values of the sequence q(n) has equally PDF and for n1 and n2 so that q(n1) is independent of q(n2) if: 1. The sampled sequence s(nT) is not periodic 2. The probability of s(nT)=s(mT)is zero 3. The width of the quantization error is small Note that with this result we can study the quantization error no matter what s(t) is? That is because the error is independent of it. The random sequence for the given PDF can be easily generated with MATLAB. The width of the equally likely PDF is a function of the quantization level. I mean we can generate equally likely sequence with PDF width T1 and T2 and T3. The amplitude of the PDFs is 1/T1 and 1/T2 and 1/T3. For each PDF e(n1) is independent of error e(n2) were n1 not equal to n2. First we have to find the PDF of e2(n)= q(n)+q(n-1). The probability of q(n) is equally likely and the probability of q(n-1) is also equally likely and they are statistically independent. The probability of the sum is the convolution of the two PDFs Figure 4 : The PDF of q(n)+q (n-1) This result depend on the fact that q(n) and q(n-1) are statistically independent. We can generate q(n) + q(n-1) experimentally using a computer and if we got the shape of the expected graph we can draw conclusions about independence. The PDF for q (n)or P1 is as in figure 3. The PDF For q(n-1) is also as in figure 3. As we say the PDF of the sum P2 is the convolution of the two equally likely PDFs which is figure 4 keeping in mind that q(n) and q(n-1) are statistically independent. In this paper I will use the fact that the time constant of an exponential is a measure of the width of the equally likely PDF. I make this assumption to make calculations easier. This is only an estimate to keep things simple. We begin by analyzing the geometric view of the transfer function in the frequency domain (5) This system has one pole and the time constant = b . The gain at w0 is (6) The gain can be expressed as (7) That is the system gain at frequency w0 is equal to a constant divided by the distance from the pole to the point w0 at the jw axis. This system is a low pass filter. # Convolution As you can see we have three time constants 4,6 and 8. We will use them as a base to generate the wanted PDF. When we add the three random sequences with these statistics the result sequence has a PDF that is equal to the convolution of the first and the second and the third PDF. I mean the first sequence has a PDF1 with time constant 4 and the second sequence has PDF2 with time constant 6 and the third sequence has PDF3 with time constant 8. # Geometric View of Gain Some uses of Laplace transform was illustrated in the last part. The importance of this technique is that it shows a physical relation between the poles and the gain. One of the bases for PDF design. We can say that the system gain at frequency w0 is equal to a constant divided by the product of the distances from the system function poles to the point w0 on the w axis. As you can see the three time constants translate to three poles in the s plan. Adjusting the locations of the poles can give us an estimate of the frequency response of the wanted PDF. If we have a wanted PDF that we want to design. First we take the Laplace transform. Second we place the three poles in the s plan to give the best estimate for this transform. This way we can design for any PDF using our base of three exponentials with three time constants. # Conclusion In this paper we generated equally likely PDF sequence using quantization. An input let us say sin wave sampled at a rate more than ten times its frequency and the sampling rate not periodic with the sin wave frequency. The output samples is given to a ten level quantize in the dynamic rang of the sin wave. We found that the output is an equally likely PDF sequence. Then we use this sequence to generate a wanted sequence with any wanted PDF. # Global Journal of Computer Science and Technology 1![Figure 1 : The block diagram](image-2.png "Figure 1 :") ![Journal of Computer Science and Technology Volume XIV Issue II Version I Journals Inc. (US)](image-3.png "Global") ![Dr. Ziad Sobih ? & Prof. Martin Schetzen ?](image-4.png "C") 2![Figure 2 : The transfer characteristics for the input and output](image-5.png "Figure 2 :") 3![Figure 3 : The equally likely PDF](image-6.png "Figure 3 :") ![Journal of Computer Science and TechnologyVolume XIV Issue II Version I](image-7.png "Global") 5![Figure 5 : Distance From The Pole To W0 On The Jw Axis](image-8.png "Figure 5 :") 7![Figure 7 : Exponential with time constant 8](image-9.png "Figure 7 :") 89810![Figure 8 : Exponential with time constant 6 Global Journal of Computer Science and Technology](image-10.png "Figure 8 :Figure 9 :and 8 Figure 10 :") 11![Figure 11 : The frequency response of the system of three poles](image-11.png "Figure 11 :") 1213![Figure 12 : The frequency response of the system of three poles](image-12.png "Figure 12 :Figure 13 :") ![](image-13.png "Volume") © 2014 Global Journals Inc. (US) (4) Generation of any PDF from a Set of Equally Likely Random Variables © 2014 Global Journals Inc. (US) * ProbabilityPapoulis Random Variables, and Stochastic Process 2002 * Proakis, Digital Communications J 2001 * Engineering Analysis RJSchilling 1988 * Van Trees, Detection, Estimation, and Modulation Theory HL 1968 * J Proakis, Inroduction to Digital Signal Processing 1988 * Chen Linear System Theory and Design 1984 * SHaykin Communication System 1983 * Introduction to System Analysis THGlisson 1985 * Airborne Doppler Radar MartinSchetzen 2006 * The Volterra & Wiener Theories of Nonlinear Systems MartinSchetzen 2006 * Discrete System using Matlab MartinSchetzen 2004