Digital Signal Processing A Filtering Approach


E-Book Content

Introduction to Digital Signal Processing and Digital Filtering Table 1.1 Example of digital filtering (smoothing) ADC sample time ADC output x DAC input y T 2T 3T 4T 1.2 0 0.7 1.4 1.1 0.6 xxxxxx 0.95 1.05 1.25 0.85 1.4 The Common DSP Equation The simple DSP examples just discussed were carried out using some input sample values stored in the computer or received currently from the ADC, multiplying them by appropriate constants, and summing the results. Sometimes the previous output values are multiplied by appropriate constants and also added to the first sum to give a new output, as was done in the digital integration example. Almost all digital signal processing by a computer involves adding the signal input sample just obtained, multiplied by a constant, to the sum of a few previous input samples, each multiplied by their corresponding constants, and sometimes adding all of this to a few previous outputs, each multiplied by their constants, to obtain a new output. This leads to the common equation used for almost all DSP: y = (b −1y −1 + ⋅ ⋅ ⋅ + b −my −m ) + (ax + a −1x −1 + ⋅ ⋅ ⋅ + a −nx −n ) (Equation 1.1) In Equation 1.1, the xs are the sampled input values, the ys are the output samples going to a DAC. The subscripts indicate how many previous sample periods ago are referred to. The as and bs are just constants stored in the computer or DSP chip. A flowchart showing how Equation 1.1 might be implemented by code in the computer shown in Figure 1.1 is given in Figure 1.3. It may seem strange that almost all DSP tasks are carried out by solving the preceding equation each time a new value of x is input from the ADC, but you must remember that all a computer can do mathematically is add, subtract, multiply, and divide; which is just what this equation requires. If you choose any values for any of the a and b constants and repeat the equation for every new input sample from an ADC, you will be doing DSP! But what DSP have you done and how well? The answers to these questions and more will be given in the rest of this text. 5 Digital Signal Processing initialize X1, X2, etc. to 0 wait till ADC returns new sample X Y = 1.565*Y1 − 0.6438*Y2 + 0.019977X + 0.0395X1 + 0.01977X2 Y2 = Y1 Y1 = Y X2 = X1 X1 = X X1, X2, ... are names for x −1, x −2 , etc. X is name for x Y is name for y, Y1 is name for y−1 , etc. This is the coded DSP equation Saving previous values, only 2 shown here send Y to DAC Figure 1.3. Flowchart using the common DSP equation 1.5 What the DSP Equation Shows The common DSP equation will be used to show that many DSP questions need further study if one is to understand digital signal processing and do analysis or design of a DSP system. These questions include the following: ◗ How do you choose the a and b coefficients to perform a specific DSP task, such as doing second-order lowpass Butterworth filtering? ◗ How many coefficients are needed, and what is the effect of using fewer than required? ◗ Are the b coefficients always needed, and what is the effect if they are not used? 6 Introduction to Digital Signal Processing and Digital Filtering ◗ The a and b coefficients are represented as binary numbers in the computer; how many bits should be used to meet the filter specifications? ◗ The x values are sample values of the input signal; how often should the signal be sampled? ◗ What is the effect of different sample rates, and does the filter coding need to be changed if the sample rate changes? ◗ How many bits should be used in the ADC and DAC to obtain a specific precision? The answers to these questions and how they are obtained are subjects of the
You might also like

Computational Biochemistry And Biophysics
Authors: Oren M. Becker , Alexander D. MacKerell Jr. , Benoit Roux , Masakatsu Watanabe    233    0


Computer Algebra: Systems And Algorithms For Algebraic Computation
Authors: J. H. Davenport , Y. Siret , Evelyne Tournier    155    0



Python Scripting For Computational Science
Authors: Hans Petter Langtangen    166    0


Mathematics Of Quantum Computation And Quantum Technology
Authors: Louis Kauffman , Samuel J. Lomonaco    138    0


Varieties Of Mathematical Prose
Authors: Bagchi , Wells.    173    0


The Unity Of Mathematics: In Honor Of The Ninetieth Birthday Of I.m. Gelfand
Authors: Michael Atiyah (auth.) , Pavel Etingof , Vladimir Retakh , I. M. Singer (eds.)    192    0


Set Theory (web Draft, 1998-1999)
Authors: Dixon P.    219    0


Manis Valuations And Prüfer Extensions I: A New Chapter In Commutative Algebra
Authors: Manfred Knebusch , Digen Zhang (auth.)    141    0


Quasi-frobenius Rings
Authors: W. K. Nicholson , M. F. Yousif    184    0