Digital Filter Design

Total Page:16

File Type:pdf, Size:1020Kb

Digital Filter Design Digital filter design 1 FREQUENCY RESPONSE OF FILTERS x(t) - G - y(t) For input x(n) = cos(!n) the output is y(n) = AG(!) cos(!n + 'G(!)) AG(!): filter gain or magnitude 'G(!): filter phase 2 Reason: the output can always be written as y(n) = h(0) cos(!n) + h(1) cos(!n − !) + ··· h(k) cos(!n − !k) + ··· = AG(!) cos(!n + 'G(!)) The functions AG(!), 'G(!) form the frequency response of a filter Matlab routine: freqz(B,A,W) where B= [b0 a2 : : : bM ], B= [1 a1 a2 : : : aN ], W: vector with frequencies (if specified) 3 Relation between transfer function and frequency response Let x(n) = ej!n = cos(!n) + j sin(!n) Then: y(n) = h(0)ej!n + h(1)ej!(n−1) + ··· h(k)ej!(n−k) + ··· ( ) = h(0) + h(1)e−j! + ··· h(k)e−j!k + ··· ej!n = H(ej!) ej!n where H(z) is the transfer function of the system. 4 H(ej!) is the frequency response: determines how a frequency component ! is affected in magnitude and phase. H(ej!) is a complex number which can be written in polar form: j! H(ej!) = jH(ej!)j ej arg(H(e )) Then for input x(n) = ej!n = cos(!n) + j sin(!n) we have: y(n) = H(ej!) ej!n j! = jH(ej!)j ej arg(H(e )) ej!n j! = jH(ej!)j ej(!n+arg(H(e ))) ( ) = jH(ej!)j cos(!n + arg(H(ej!))) + j sin(!n + arg(H(ej!))) or y(n) = AH(!) cos(!n + 'H(!)) + jAH(!) sin(!n + 'H(!)) where j! AH(!) = jH(e )j (filter gain) and j! 'H(!) = arg(H(e )) (phase shift of filter) 5 FREQUENCY RESPONSE OF SERIES CONNECTION y1(n) - - - x(n) H1 H2 y(n) For x[n] = cos(!n) we have: y1(n) = A1(!) cos(!n + '1(!)) y(n) = A2(!)A1(!) cos(!n + '1(!) + '2(!)) ) Magnitude of series connection is multiplicative: A(!) = A2(!) · A1(!) Phase of series connection is additive: '(!) = '2(!) + '1(!) 6 FILTER DESIGN Example: Low-pass filter magnitude specs 1.2 1 0.8 0.6 0.4 0.2 0 0 0.1 0.2 0.3 0.4 0.5 - maximum deviation in passband, 1 − δp ≤ A(f) ≤ 1 + δp - damping in stopband, A(f) ≤ δs - width of transition band (normalized) 7 Filter magnitude specs often defined in dB (decibel) units: - maximum deviation in passband: Ap = 20 log(1 + δp) (dB) Note: Ap ≈ 8:7δp for small δp - damping in stopband: As = −20 log δs (dB) 8 FUNDAMENTAL RELATIONSHIP BETWEEN AMPLITUDE AND PHASE Z 1 π d log(A(!0)) sin((!0 + !)=2) d!0 ≤ · '(!) 0 log 0 − 0 π 0 d log(! ) sin((! !)=2) ! 0 sin((! +!)=2) where log sin((!0−!)=2) > 0 Implication: d log(A(!)) Low-pass filter with large magnitude slope, d log(!) << 0 results in large negative phase shifts, '(!) << 0! 9 EFFECT OF PHASE SHIFT - LINEAR PHASE FILTERS Observation: Phase shift in passband may cause signal distortion. Illustrative Example Consider a signal consisting of two sinusoidal components s(n) = s1(n) + s2(n) where s1(n) = sin(!1n) s2(n) = sin(!2n) 10 1 0.5 s 1 0 −0.5 −1 1 0.5 s 2 0 −0.5 −1 2 1 s 0 −1 −2 Top: s1(n) Middle: s2(n) Below: s(n) 11 Add a high-frequency disturbance e(n), x(n) = s(n) + e(n) where e[n] = sin(!en);!e > !1;!2 2 1 s 0 −1 −2 1 0.5 e 0 −0.5 −1 2 x 0 −2 12 Use low-pass filtering to suppress the disturbance 1 1 0.5 0.5 s ,y s ,y 1 1 0 1 1 0 −0.5 −0.5 −1 −1 1 1 0.5 0.5 s ,y s ,y 2 2 0 2 2 0 −0.5 −0.5 −1 −1 2 2 1 1 s,y s,y 0 0 −1 −1 −2 −2 Left: Nonlinear phase filter gives passband signal distortion Right: Linear phase filter reconstructs delayed version of passband signal 13 Linear phase property: x(t) - G - y(t) For input x(n) = cos(!n) we have the output y(n) = A(!) cos(!n + '(!)) To avoid phase distortion we require that all frequencies in passband delayed are by the same time, i.e., y(n) = A(!) cos(!(n − τ)) in passband. This is achieved if the filter gives phase shift '(!) = −! · τ 14 PHASE SHOULD BE A LINEAR FUNCTION OF FREQUENCY IN PASSBAND! Implication for frequency response: j! We should have 'H(!) = arg(H(e )) = −!τ or H(ej!) = jH(ej!)je−j!τ in passband. • Linear phase property can be achieved with symmetric FIR filters • Linear property can be achieved only approximately with IIR filters 15 LINEAR PHASE FIR FILTERS Linear phase property is achieved by symmetric FIR filters: y(n) = h(0)x(n) + h(1)x(n − 1) + ··· +h(1)x(n + 2 − N) + h(0)x(n + 1 − N); n = 0; 1; 2;:::;M where h(k) = h(N − 1 − k); k = 0; 1;:::;N − 1 For input x(n) = cos(!n) the output is y(n) = A(!) cos(!n − !(N − 1)=2) = A(!) cos(!(n − (N − 1)=2)) ) Each frequency component delayed by (N − 1)=2 time steps. 16 REASON: Pairwise combination of terms k and N − 1 − k gives ( ) h(k) x(n − k) + x(n + 1 − N + k) = ( ) = h(k) cos(!(n − k)) + cos(!(n + 1 − N + k)) ( N−1 N−1 = h(k) cos(!(n − ) + !( − k)) 2 2 ) N−1 N−1 + cos(!(n − ) − !( − k)) 2 2 N−1 = h(k)2 cos(!( − k)) · cos(!(n − (N − 1)=2)) 2 where we have used cos(α ± β) = cos α · cos β ∓ sin α · sin β ) All frequency components x(n) = cos(!n) are delayed by (N −1)=2 samples 17 From above, we have (for N even) y(n) = AH(!) cos(!n + 'H(!)) N=X2−1 N−1 = h(k)2 cos(!( − k)) · cos(!(n − (N − 1)=2)) 2 k=0 ) Filter has frequency response with: • Linear phase: 'H(!) = −!(N − 1)=2 • Gain: N=X2−1 N−1 A (!) = 2 h(k) cos(!( − k)) H 2 k=0 Similarly if N is odd-valued (see lecture notes) 18 FIR FILTER DESIGN We consider two important FIR filter design methods: • Windowed-Sinc filters • Optimization-based FIR filters 19 Windowed-Sinc filters The idea is to modify the ideal filter. The ideal low-pass filter with bandwidth fc has impulse response hD(0) = 2fc sin(2πf k) h (k) = c ; k = ±1; ±2;::: D πk Cannot be implemented, because: • impulse response hD(k) cannot be realized by any finite-dimensional difference equation • not causal (output depends on future inputs) 20 Practical low-pass FIR filter: • cut the ideal filter response to finite length N = 2M + 1 (hD(k); k = −M; −M + 1;:::;M), y(n) = hD(−M)x(n + M) + ··· + hD(−1)x(n + 1) + +hD(0)x(n) + hD(1)x(n − 1) + ··· + hD(M)x(n − M) • make it causal by introducing a delay M: y(n) = hD(−M)x(n) + ··· + hD(−1)x(n − M + 1) + +hD(0)x(n − M) + ··· + hD(M)x(n − 2M − 1) • multiply impulse response coefficients by a window function w(k) in order to smooth out end effects: y(n) = hw(−M)x(n) + ··· + hw(0)x(n − M) + ··· + hw(M)x(n − N); where hw(k) = w(k)hD(k), N = 2M + 1. 21 Some common window functions: • Rectangular window (trivial), w(k) = 1; jkj ≤ (N − 1)=2 • Hanning window, w(k) = 0:5 + 0:5 cos(2πk)=N); jkj ≤ (N − 1)=2 • Hamming window, w(k) = 0:54 + 0:46 cos(2πk=N); jkj ≤ (N − 1)=2 • Blackman window, w(k) = 0:42 + 0:5 cos(2πk=N) + 0:08 cos(4πk=N); jkj ≤ (N − 1)=2 22 Observe that: • Length of windowed filter is N = 2M + 1 (odd) • Windowed filters are linear phase, as they satisfy symmetry property: hD(−k) = hD(k) and w(−k) = w(k) ) hw(−k) = hw(k) Selection of window function is a trade-off between performance and complexity: • Performance (deviation in passband and damping in stopband) is determined by the window function. • Filter length N is determined by width ∆f of transition band: for each window function, ∆f = cw=N, where cw = window-specific constant. • Better passband and stopband performance implies increased filter length for a given width of transtion band. 23 Summary of windowed filter properties: Window Width of Maximal passband Damping in function transition band deviation stopband (Hz, normed) (dB) (dB) Rectangular 0:9=N 0.7416 21 Hanning 3:1=N 0.0546 44 Hamming 3:3=N 0.0194 53 Blackman 5:5=N 0.0017 74 Kaiser 2:93=N (β = 4:54) 0.0274 50 4:32=N (β = 6:76) 0.00275 70 5:71=N (β = 8:96) 0.000275 90 24 IIR FILTERS Good filter performance requires a sufficiently long memory in order to allow distinct response to different frequency components. In FIR filters this implies a large number of taps. IIR filters have infinite memory due to recursiveness ) simpler filter for given magnitude performance specifications Standard IIR filters: - Butterworth - Chebyshev - Elliptic 25 Butterworth filters Digital low-pass Butterworth filter with cut-off frequency !c = 2πfc has frequency response magnitude [ ]1=2 j j! j 1 BN (e ) = 2N (1) 1 + [tan(!=2)= tan(!c=2)] - monotonically varying gain in both passband and stopband Matlab routines: [B,A]=butter(N,Wn,'ftype') designs filter [N,Wn]=buttord(Wp,Ws,Rp,Rs) computes required minimum order 26 Chebyshev filters • Chebyshev filter type I has equiripple gain in passband and monotonically varying gain in stopband.
Recommended publications
  • Moving Average Filters
    CHAPTER 15 Moving Average Filters The moving average is the most common filter in DSP, mainly because it is the easiest digital filter to understand and use. In spite of its simplicity, the moving average filter is optimal for a common task: reducing random noise while retaining a sharp step response. This makes it the premier filter for time domain encoded signals. However, the moving average is the worst filter for frequency domain encoded signals, with little ability to separate one band of frequencies from another. Relatives of the moving average filter include the Gaussian, Blackman, and multiple- pass moving average. These have slightly better performance in the frequency domain, at the expense of increased computation time. Implementation by Convolution As the name implies, the moving average filter operates by averaging a number of points from the input signal to produce each point in the output signal. In equation form, this is written: EQUATION 15-1 Equation of the moving average filter. In M &1 this equation, x[ ] is the input signal, y[ ] is ' 1 % y[i] j x [i j ] the output signal, and M is the number of M j'0 points used in the moving average. This equation only uses points on one side of the output sample being calculated. Where x[ ] is the input signal, y[ ] is the output signal, and M is the number of points in the average. For example, in a 5 point moving average filter, point 80 in the output signal is given by: x [80] % x [81] % x [82] % x [83] % x [84] y [80] ' 5 277 278 The Scientist and Engineer's Guide to Digital Signal Processing As an alternative, the group of points from the input signal can be chosen symmetrically around the output point: x[78] % x[79] % x[80] % x[81] % x[82] y[80] ' 5 This corresponds to changing the summation in Eq.
    [Show full text]
  • Designing Filters Using the Digital Filter Design Toolkit Rahman Jamal, Mike Cerna, John Hanks
    NATIONAL Application Note 097 INSTRUMENTS® The Software is the Instrument ® Designing Filters Using the Digital Filter Design Toolkit Rahman Jamal, Mike Cerna, John Hanks Introduction The importance of digital filters is well established. Digital filters, and more generally digital signal processing algorithms, are classified as discrete-time systems. They are commonly implemented on a general purpose computer or on a dedicated digital signal processing (DSP) chip. Due to their well-known advantages, digital filters are often replacing classical analog filters. In this application note, we introduce a new digital filter design and analysis tool implemented in LabVIEW with which developers can graphically design classical IIR and FIR filters, interactively review filter responses, and save filter coefficients. In addition, real-world filter testing can be performed within the digital filter design application using a plug-in data acquisition board. Digital Filter Design Process Digital filters are used in a wide variety of signal processing applications, such as spectrum analysis, digital image processing, and pattern recognition. Digital filters eliminate a number of problems associated with their classical analog counterparts and thus are preferably used in place of analog filters. Digital filters belong to the class of discrete-time LTI (linear time invariant) systems, which are characterized by the properties of causality, recursibility, and stability. They can be characterized in the time domain by their unit-impulse response, and in the transform domain by their transfer function. Obviously, the unit-impulse response sequence of a causal LTI system could be of either finite or infinite duration and this property determines their classification into either finite impulse response (FIR) or infinite impulse response (IIR) system.
    [Show full text]
  • Finite Impulse Response (FIR) Digital Filters (II) Ideal Impulse Response Design Examples Yogananda Isukapalli
    Finite Impulse Response (FIR) Digital Filters (II) Ideal Impulse Response Design Examples Yogananda Isukapalli 1 • FIR Filter Design Problem Given H(z) or H(ejw), find filter coefficients {b0, b1, b2, ….. bN-1} which are equal to {h0, h1, h2, ….hN-1} in the case of FIR filters. 1 z-1 z-1 z-1 z-1 x[n] h0 h1 h2 h3 hN-2 hN-1 1 1 1 1 1 y[n] Consider a general (infinite impulse response) definition: ¥ H (z) = å h[n] z-n n=-¥ 2 From complex variable theory, the inverse transform is: 1 n -1 h[n] = ò H (z)z dz 2pj C Where C is a counterclockwise closed contour in the region of convergence of H(z) and encircling the origin of the z-plane • Evaluating H(z) on the unit circle ( z = ejw ) : ¥ H (e jw ) = åh[n]e- jnw n=-¥ 1 p h[n] = ò H (e jw )e jnwdw where dz = jejw dw 2p -p 3 • Design of an ideal low pass FIR digital filter H(ejw) K -2p -p -wc 0 wc p 2p w Find ideal low pass impulse response {h[n]} 1 p h [n] = H (e jw )e jnwdw LP ò 2p -p 1 wc = Ke jnwdw 2p ò -wc Hence K h [n] = sin(nw ) n = 0, ±1, ±2, …. ±¥ LP np c 4 Let K = 1, wc = p/4, n = 0, ±1, …, ±10 The impulse response coefficients are n = 0, h[n] = 0.25 n = ±4, h[n] = 0 = ±1, = 0.225 = ±5, = -0.043 = ±2, = 0.159 = ±6, = -0.053 = ±3, = 0.075 = ±7, = -0.032 n = ±8, h[n] = 0 = ±9, = 0.025 = ±10, = 0.032 5 Non Causal FIR Impulse Response We can make it causal if we shift hLP[n] by 10 units to the right: K h [n] = sin((n -10)w ) LP (n -10)p c n = 0, 1, 2, ….
    [Show full text]
  • Exploring Anti-Aliasing Filters in Signal Conditioners for Mixed-Signal, Multimodal Sensor Conditioning by Arun T
    Texas Instruments Incorporated Amplifiers: Op Amps Exploring anti-aliasing filters in signal conditioners for mixed-signal, multimodal sensor conditioning By Arun T. Vemuri Systems Architect, Enhanced Industrial Introduction Figure 1. Multimodal, mixed-signal sensor-signal conditioner Some sensor-signal conditioners are used to process the output Analog Digital of multiple sense elements. This Domain Domain processing is often provided by multimodal, mixed-signal condi- tioners that can handle the out- puts from several sense elements Sense Digital Amplifier 1 ADC 1 at the same time. This article Element 1 Filter 1 analyzes the operation of anti- Processed aliasing filters in such sensor- Intelligent Output Compensation signal conditioners. Sense Digital Basics of sensor-signal Amplifier 2 ADC 2 Element 2 Filter 2 conditioners Sense elements, or transducers, convert a physical quantity of interest into electrical signals. Examples include piezo resistive bridges used to measure pres- sure, piezoelectric transducers used to detect ultrasonic than one sense element is processed by the same signal waves, and electrochemical cells used to measure gas conditioner is called multimodal signal conditioning. concentrations. The electrical signals produced by sense Mixed-signal signal conditioning elements are small and exhibit nonidealities, such as tem- Another aspect of sensor-signal conditioning is the electri- perature drifts and nonlinear transfer functions. cal domain in which the signal conditioning occurs. TI’s Sensor analog front ends such as the Texas Instruments PGA309 is an example of a device where the signal condi- (TI) LMP91000 and sensor-signal conditioners such as TI’s tioning of resistive-bridge sense elements occurs in the PGA400/450 are used to amplify the small signals produced analog domain.
    [Show full text]
  • Transformations for FIR and IIR Filters' Design
    S S symmetry Article Transformations for FIR and IIR Filters’ Design V. N. Stavrou 1,*, I. G. Tsoulos 2 and Nikos E. Mastorakis 1,3 1 Hellenic Naval Academy, Department of Computer Science, Military Institutions of University Education, 18539 Piraeus, Greece 2 Department of Informatics and Telecommunications, University of Ioannina, 47150 Kostaki Artas, Greece; [email protected] 3 Department of Industrial Engineering, Technical University of Sofia, Bulevard Sveti Kliment Ohridski 8, 1000 Sofia, Bulgaria; mastor@tu-sofia.bg * Correspondence: [email protected] Abstract: In this paper, the transfer functions related to one-dimensional (1-D) and two-dimensional (2-D) filters have been theoretically and numerically investigated. The finite impulse response (FIR), as well as the infinite impulse response (IIR) are the main 2-D filters which have been investigated. More specifically, methods like the Windows method, the bilinear transformation method, the design of 2-D filters from appropriate 1-D functions and the design of 2-D filters using optimization techniques have been presented. Keywords: FIR filters; IIR filters; recursive filters; non-recursive filters; digital filters; constrained optimization; transfer functions Citation: Stavrou, V.N.; Tsoulos, I.G.; 1. Introduction Mastorakis, N.E. Transformations for There are two types of digital filters: the Finite Impulse Response (FIR) filters or Non- FIR and IIR Filters’ Design. Symmetry Recursive filters and the Infinite Impulse Response (IIR) filters or Recursive filters [1–5]. 2021, 13, 533. https://doi.org/ In the non-recursive filter structures the output depends only on the input, and in the 10.3390/sym13040533 recursive filter structures the output depends both on the input and on the previous outputs.
    [Show full text]
  • ELEG 5173L Digital Signal Processing Ch. 5 Digital Filters
    Department of Electrical Engineering University of Arkansas ELEG 5173L Digital Signal Processing Ch. 5 Digital Filters Dr. Jingxian Wu [email protected] 2 OUTLINE • FIR and IIR Filters • Filter Structures • Analog Filters • FIR Filter Design • IIR Filter Design 3 FIR V.S. IIR • LTI discrete-time system – Difference equation in time domain N M y(n) ak y(n k) bk x(n k) k 1 k 0 – Transfer function in z-domain N M k k Y (z) akY (z)z bk X (z)z k 1 k 0 M k bk z Y (z) k 0 H (z) N X (z) k 1 ak z k 1 4 FIR V.S. IIR • Finite impulse response (FIR) – difference equation in the time domain M y(n) bk x(n k) k 0 – Transfer function in the Z-domain M Y (z) k H (z) bk z X (z) k 0 – Impulse response h(n) [b ,b ,,b ] 0 1 M • The impulse response is of finite length finite impulse response 5 FIR V.S. IIR • Infinite impulse response (IIR) – Difference equation in the time domain N M y(n) ak y(n k) bk x(n k) k1 k0 – Transfer function in the z-domain M k bk z Y(z) k0 H (z) N X (z) k 1 ak z k1 – Impulse response can be obtained through inverse-z transform, and it has infinite length 6 FIR V.S. IIR • Example – Find the impulse response of the following system. Is it a FIR or IIR filter? Is it stable? 1 y(n) y(n 2) x(n) 4 7 FIR V.S.
    [Show full text]
  • Digital Signal Processing Filter Design
    2065-27 Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis 26 October - 20 November, 2009 Digital Signal Processing Filter Design Massimiliano Nolich DEEI Facolta' di Ingegneria Universita' degli Studi di Trieste via Valerio, 10, 34127 Trieste Italy Filter design 1 Design considerations: a framework |H(f)| 1 C ıp 1 ıp ıs f 0 fp fs Passband Transition Stopband band The design of a digital filter involves five steps: Specification: The characteristics of the filter often have to be specified in the frequency domain. For example, for frequency selective filters (lowpass, highpass, bandpass, etc.) the specification usually involves tolerance limits as shown above. Coefficient calculation: Approximation methods have to be used to calculate the values hŒk for a FIR implementation, or ak, bk for an IIR implementation. Equivalently, this involves finding a filter which has H.z/ satisfying the requirements. Realisation: This involves converting H.z/ into a suitable filter structure. Block or flow diagrams are often used to depict filter structures, and show the computational procedure for implementing the digital filter. 1 Analysis of finite wordlength effects: In practice one should check that the quantisation used in the implementation does not degrade the performance of the filter to a point where it is unusable. Implementation: The filter is implemented in software or hardware. The criteria for selecting the implementation method involve issues such as real-time performance, complexity, processing requirements, and availability of equipment. 2 Finite impulse response (FIR) filter design A FIR filter is characterised by the equations N 1 yŒn D hŒkxŒn k kXD0 N 1 H.z/ D hŒkzk: kXD0 The following are useful properties of FIR filters: They are always stable — the system function contains no poles.
    [Show full text]
  • Lecture 2 - Digital Filters
    Lecture 2 - Digital Filters 2.1 Digital filtering Digital filtering can be implemented either in hardware or software; in the first case, the numerical processor is either a special-purpose chip or it is assembled out of a set of digital integrated circuits which provide the essential building blocks of a digital filtering operation – storage, delay, addition/subtraction and multiplication by constants. On the other hand, a general-purpose mini-or micro-computer can also be programmed as a digital filter, in which case the numerical processor is the computer’s CPU, GPU and memory. Filtering may be applied to signals which are then transformed back to the analogue domain using a digital to analogue convertor or worked with entirely in the digital domain. 33 2.1.1 Reasons for using a digital rather than an analogue filter The numerical processor can easily be (re-)programmed to implement a num- • ber of different filters. The accuracy of a digital filter is dependent only on the round-off error in • the arithmetic. This has two advantages: – the accuracy is predictable and hence the performance of the digital signal processing algorithm is known apriori. – The round-off error can be minimized with appropriate design techniques and hence digital filters can meet very tight specifications on magnitude and phase characteristics (which would be almost impossible to achieve with analogue filters because of component tolerances and circuit noise). The widespread use of mini- and micro-computers in engineering has greatly • increased the number of digital signals recorded and processed. Power sup- ply and temperature variations have no effect on a programme stored in a computer.
    [Show full text]
  • Digital Signal Processing Tom Davinson
    First SPES School on Experimental Techniques with Radioactive Beams INFN LNS Catania – November 2011 Experimental Challenges Lecture 4: Digital Signal Processing Tom Davinson School of Physics & Astronomy N I VE R U S I E T H Y T O H F G E D R I N B U Objectives & Outline Practical introduction to DSP concepts and techniques Emphasis on nuclear physics applications I intend to keep it simple … … even if it’s not … … I don’t intend to teach you VHDL! • Sampling Theorem • Aliasing • Filtering? Shaping? What’s the difference? … and why do we do it? • Digital signal processing • Digital filters semi-gaussian, moving window deconvolution • Hardware • To DSP or not to DSP? • Summary • Further reading Sampling Sampling Periodic measurement of analogue input signal by ADC Sampling Theorem An analogue input signal limited to a bandwidth fBW can be reproduced from its samples with no loss of information if it is regularly sampled at a frequency fs 2fBW The sampling frequency fs= 2fBW is called the Nyquist frequency (rate) Note: in practice the sampling frequency is usually >5x the signal bandwidth Aliasing: the problem Continuous, sinusoidal signal frequency f sampled at frequency fs (fs < f) Aliasing misrepresents the frequency as a lower frequency f < 0.5fs Aliasing: the solution Use low-pass filter to restrict bandwidth of input signal to satisfy Nyquist criterion fs 2fBW Digital Signal Processing D…igi wtahl aSt ignneaxtl? Processing Digital signal processing is the software controlled processing of sequential data derived from a digitised analogue signal. Some of the advantages of digital signal processing are: • functionality possible to implement functions which are difficult, impractical or impossible to achieve using hardware, e.g.
    [Show full text]
  • Lecture 5 - Digital Filters
    Lecture 5 - Digital Filters 5.1 Digital filtering Digital filtering can be implemented either in hardware or software; in the first case, the numerical processor is either a special-purpose chip or it is assembled out of a set of digital integrated circuits which provide the essential building blocks of a digital filtering operation – storage, delay, addition/subtraction and multiplica- tion by constants. On the other hand, a general-purpose mini-or micro-computer can also be programmed as a digital filter, in which case the numerical processor is the computer’s CPU and memory. Filtering may be applied to signals which are then transformed back to the analogue domain using a digital to analogue convertor or worked with entirely in the digital domain (e.g. biomedical signals are digitised, filtered and analysed to detect some abnormal activity). 5.1.1 Reasons for using a digital rather than an analogue filter The numerical processor can easily be (re-)programmed to implement a number of different filters. The accuracy of a digital filter is dependent only on the round-off error in the arithmetic. This has two advantages: – the accuracy is predictable and hence the performance of the digital signal processing algorithm is known a priori. – The round-off error can be minimized with appropriate design tech- niques and hence digital filters can meet very tight specifications on magnitude and phase characteristics (which would be almost impossi- ble to achieve with analogue filters because of component tolerances and circuit noise). 59 The widespread use of mini- and micro-computers in engineering has greatly increased the number of digital signals recorded and processed.
    [Show full text]
  • Digital Filter Design Digital Filter Specifications Digital Filter
    Digital Filter Design Digital Filter Specifications • Usually, either the magnitude and/or the • Objective - Determination of a realizable phase (delay) response is specified for the transfer function G(z) approximating a design of digital filter for most applications given frequency response specification is an important step in the development of a • In some situations, the unit sample response digital filter or the step response may be specified • If an IIR filter is desired, G(z) should be a • In most practical applications, the problem stable real rational function of interest is the development of a realizable approximation to a given magnitude • Digital filter design is the process of response specification deriving the transfer function G(z) Copyright © 2001, S. K. Mitra Copyright © 2001, S. K. Mitra Digital Filter Specifications Digital Filter Specifications • We discuss in this course only the • As the impulse response corresponding to magnitude approximation problem each of these ideal filters is noncausal and • There are four basic types of ideal filters of infinite length, these filters are not with magnitude responses as shown below realizable j j HLP(e ) HHP(e ) • In practice, the magnitude response 1 1 specifications of a digital filter in the passband and in the stopband are given with – 0 c c – c 0 c j j HBS(e ) HBP (e ) some acceptable tolerances –1 1 • In addition, a transition band is specified between the passband and stopband – – c2 c1 c1 c2 – c2 – c1 c1 c2 Copyright © 2001, S. K. Mitra Copyright © 2001, S. K. Mitra Digital Filter Specifications Digital Filter Specifications ω • For example, the magnitude response G(e j ) • As indicated in the figure, in the passband, ≤ ω ≤ ω of a digital lowpass filter may be given as defined by 0 p , we require that jω ≅ ±δ indicated below G(e ) 1 with an error p , i.e., −δ ≤ jω ≤ +δ ω ≤ ω 1 p G(e ) 1 p , p ω ≤ ω ≤ π •In the stopband, defined by s , we jω ≅ δ require that G ( e ) 0 with an error s , i.e., jω ≤ δ ω ≤ ω ≤ π G(e ) s , s Copyright © 2001, S.
    [Show full text]
  • Oversampling with Noise Shaping • Place the Quantizer in a Feedback Loop Xn() Yn() Un() Hz() – Quantizer
    Oversampling Converters David Johns and Ken Martin University of Toronto ([email protected]) ([email protected]) University of Toronto slide 1 of 57 © D.A. Johns, K. Martin, 1997 Motivation • Popular approach for medium-to-low speed A/D and D/A applications requiring high resolution Easier Analog • reduced matching tolerances • relaxed anti-aliasing specs • relaxed smoothing filters More Digital Signal Processing • Needs to perform strict anti-aliasing or smoothing filtering • Also removes shaped quantization noise and decimation (or interpolation) University of Toronto slide 2 of 57 © D.A. Johns, K. Martin, 1997 Quantization Noise en() xn() yn() xn() yn() en()= yn()– xn() Quantizer Model • Above model is exact — approx made when assumptions made about en() • Often assume en() is white, uniformily distributed number between ±∆ ⁄ 2 •∆ is difference between two quantization levels University of Toronto slide 3 of 57 © D.A. Johns, K. Martin, 1997 Quantization Noise T ∆ time • White noise assumption reasonable when: — fine quantization levels — signal crosses through many levels between samples — sampling rate not synchronized to signal frequency • Sample lands somewhere in quantization interval leading to random error of ±∆ ⁄ 2 University of Toronto slide 4 of 57 © D.A. Johns, K. Martin, 1997 Quantization Noise • Quantization noise power shown to be ∆2 ⁄ 12 and is independent of sampling frequency • If white, then spectral density of noise, Se()f , is constant. S f e() ∆ 1 Height k = ---------- ---- x f 12 s f f f s 0 s –---- ---- 2 2 University of Toronto slide 5 of 57 © D.A. Johns, K. Martin, 1997 Oversampling Advantage • Oversampling occurs when signal of interest is bandlimited to f0 but we sample higher than 2f0 • Define oversampling-rate OSR = fs ⁄ ()2f0 (1) • After quantizing input signal, pass it through a brickwall digital filter with passband up to f0 y ()n 1 un() Hf() y2()n N-bit quantizer Hf() 1 f f fs –f 0 f s –---- 0 0 ---- 2 2 University of Toronto slide 6 of 57 © D.A.
    [Show full text]