13 views

Uploaded by hassanshahji11

dsp lab

- IbaPADU-8-M v1.9 en A4
- Design of IIR Filters
- Bandpass Filter Tutorial
- DSP ASSIGNMENT
- 08 CM0268 Filters
- Fir filter design
- Narrowband Microstrip Filter Design
- uaf42
- Design and Optimization of Band Pass Filter for Software Defined Radio Telescope
- problemas5s
- Active Filter
- Matlab 1
- uaf42
- Project 1 EE406
- DSP ALGORITHMS & ARCHITECTURE NOTES (vtupro.com).pdf
- Vlsi in Noise Cancellation
- Effects of Filters on DVB-T Receiver Performance Under AWGN, RAYLEIGH and RICEAN Fading Channels
- Dsp.pdf
- 9D49106a Advanced Digital Signal Processing1
- PSP 42 Operation Manual

You are on page 1of 8

Objectives The objective is to design digital filters with an infinite impulse response (IIR). IIR filters can be designed either directly, by means of a clever placement of poles and zeros in the z-plane, or indirectly by first designing a corresponding analog filter, which is then transformed to the digital domain. In this lab we will only consider the later design procedure. Note that the described principle of using analog prototypes for IIR filter design originally stems from the idea to use digital filters as a substitute for analog systems. This allows us to use the well constructed theory of analog filter design and simply transform it to the digital domain. Familiarization with IIR filter design procedure. Familiarization with frequency transformation. Bilinear frequency transformation Impulse invariance frequency transformation

Lab Instructions

This lab activity comprises of three parts: Pre-lab, Lab Exercises, and Post-Lab Viva session. The lab report shall be uploaded on LMS three days before next scheduled lab. The Pre-lab tasks should be completed before coming to the lab and hard copy of Pre-lab session should be deposited with teacher/lab engineer at start of the lab for necessary evaluation. Alternatively, the reports can be submitted in PDF format on LMS. The students should perform and demonstrate each lab task separately for step-wise evaluation (please ensure that course instructor/lab engineer has signed each step after ascertaining its functional verification) Only those tasks that completed during the allocated lab time will be credited to the students. Students are however encouraged to practice on their own in spare time for enhancing their skills.

All questions should be answered precisely to get maximum credit. Lab report must ensure following items: Lab objectives MATLAB/C codes Results (graphs/tables) duly commented and discussed Conclusion

Page 1

In the last practical we have had a closer look at the class of non-recursive digital filters, with a finite impulse response (FIR). We have presented techniques for designing FIR filters to meet certain filter specifications. Also, we have seen some typical applications of digital filtering.Now we will focus on digital filters with an infinite impulse response (IIR).These can be designed either directly, by means of a clever placement of poles and zeros in the z-plane, or indirectly by first designing a corresponding analog filter, which is then transformed to the digital domain. Within this practical we will only consider the latter design procedure. Note that the described principle of using analog prototypes for IIR filter design originally stems from the idea to use digital filters as a substitute for analog systems.This allows us to use the well constructed theory of analog filter design and simply transfer it to the digital domain.

1.2.1 IIR filter design problem

Ideally, we are interested in a digital filter H(ej) that simulates a continuous time system Hc(j), i.e. the following identity is fullfilled

Here denotes the dimensionless discrete-time frequency in radians per sample, and the analog frequency in radians per second. Td is a design parameter for the analog to digital conversion, and does not need to be the same as T = 1/fs, where fs is the sampling frequency.

1.2.2

Design procedure

Given a digital filter specifications, the design of digital IIR filters can be summarized by a three-step procedure: 1. Translate the discrete-time filter specifications to the analog design domain,so that after the continuous to discrete-time transform is applied, they will be proper. 2. Select an analog prototype (Butterworth, Chebyshev, etc.) and design your analog filter Hc(s) using the translated specifications. Analog filter design it treated in Section 2. 3. Apply the continuous to discrete-time transform, and convert the analog transfer function Hc(s) into a discrete-time transfer function H(z). Details on the continuous to discrete-time conversion are given in Section 3. So before designing an appropriate analog filter, we have to translate the discrete-time filter specifications, which may be given either in real frequency f in Hz or normalized frequency = 2f/fs in radians per sample, to analog design frequency . The translation depends on which continuous to discrete time conversion scheme is used. An overview for the frequency translation is depicted in Figure 1. The digital IIR filter design steps, described above can be done automatically in the MATLAB design programs. However, to understand the procedure we will go through the individual steps in one of the experiments.

Page 2

1.2.3

We briefly describe methods for analog lowpass filter design and then show how to easily obtain highpass, bandpass or bandstop from analog lowpass prototypes by using frequency transformations. (1) Bilinear transformation (2) Impulse invariance method.

1.2.3.1

There are four established techniques for the design of analog filters, including Butterworth, Chebyshev Type I and II, and Elliptic analog prototypes. They represent four different combinations of two error approximation measures. One is based on Taylor series, and results in a maximally flat frequency response. The other approximation minimizes the maximum difference between the desired and actual response, and results in an equiripple frequency response. The four lowpass prototypes are: 1. The analog Butterworth filter is based on a Taylor series with expansions at = 0 and = , with desired values 1 and 0 respectively, and first up to (N-1)-th derivative equal to zero. This results in a smooth transition between at = 0 and = . The squared magnitude of the normalized frequency response is given by

where N is the filter order and c is 3 dB cutoff frequency. It can be seen that |Hc(j)|2 = 0.5 at = c. 2. The analog Chebyshev Type I filter has a rippled passband with equally sized ripples and a smooth behavior in the stopband, as can be seen in Figure 2. The squared magnitude of the normalized frequency response

Page 3

Figure 2: Magnitude specification for a Chebyshev Type I lowpass filter of a Chebyshev Type I filter is given by

where parameter determines the passband ripple amplitude, given by Chebyshev polynomial of order N, defined recursively as

3. The analog Chebyshev Type II is the reverse counterpart of the Type I, i.e. it has a smooth passband and a rippled stopband. Here the design parameter specifies the stopband ripple amplitude. 4. The analog Elliptic filter uses a Chebyshev approximation in both the passband and the stopband. Two design parameters are used to specify the passband and stopband ripple mplitude. Corresponding MATLAB functions for analog prototype lowpass filter design are buttap, cheb1ap, cheb2ap and ellipap. They provide a zeropole representation, which can be easily converted to differential coefficient parameters by zp2tf.

Sometimes it is simpler to calculate filter coefficients of an analog lowpass prototype only once, or to use tables. This prototype is then converted by means of frequency transforms, according to the desired characteristics. In the following, let Hc(s) be an analog lowpass prototype of order N with normalized bandedge c = 1. For instance, a lowpass with an arbitrary bandedge c can be obtained from the analog prototype Hc(s) by simply replacing Using this principle, we can also convert Hc(s) to a highpass filter with bandedge c, by changing this essentially replaces = 0 and = . A bandpass filter with lower and upper bandedge 1 and 2, can be obtained from the lowpass prototype Hc(s) by changing

Where BP is the geometric mean of the two bandedges.This mapping doubles the order of the filter and is a one-to-one mapping of the frequency domain.In MATLAB you can use the functions lp2lp, lp2hp, lp2bp and lp2bs for the analog frequency transformations. For more detail we refer to the corresponding help files.

1.2.4

Two methods for discrete-time conversion are considered: the impulse invariance and the bilinear transformation.

1.2.4.1

The impulse invariance method is based on an intuitive concept. We directly transfer the discrete specifications into the analog domain, using = /Td, and design a corresponding continuous-time filter Hc(j). We then determine the impulse response of Hc(j), denoted hc(t) and obtain the impulse response of our discrete-time filter by sampling hc(t), i.e.

Page 4

Here Td is the design sampling interval. Due to the fact that the FT of hc(nTd) is a periodic extension of Hc(j), which is not perfectly bandlimited in practice, aliasing may occur so that (1) does not hold exactly. The continuous to discrete-time conversion by means of the impulse invariance can be done in MATLAB using the function impinvar.

1.2.4.2

The bilinear transformation is a one-to-one mapping of the entire analog frequency domain 1 < < 1 onto the discrete-time frequency interval < < . Using complex Laplace and Z-transform variables s and z, the mapping is given by

In the discrete-time domain we are interested in z variables on the unit circle whereas in the continuous-time domain, s variables on the imaginary axis s = j are of importance. By evaluating (3) at and s = j, we obtain the relation between analog and digital frequency =

We notice that = 0 implies = 0 and for increasing the continuous frequency also increases and we obtain . Hence, positive continuous-time frequencies are mapped to the upper half of the unit circle and negative frequencies to the lower half. Two important properties are: The bilinear transform preserves stability. A stable continuous -time system Hc(s) with poles on the left half of the s-plane, is mapped to a stable discrete-time system H(z) with poles inside the unit circle. Identity (1) holds exactly at = 2/Tdtan(/2) when using the bilinear transform. Finally, we can perform the bilinear transformation and convert Hc(s) to H(z) using the relation

1.3 Warmup:

1. Use equation (2) at s = j to obtain a formula for the poles of the squared magnitude of a Butterworth filter |Hc(s)|2 and locate them on the s-plane. Hint: The M-th complex roots of are given by

2. We can rewrite the squared magnitude |Hc(s)|2 by assigning the stable poles on the left half s-plane to Hc(s), and the remaining to Hc(s). Thus, we can get Based on this, calculate the analog filter coefficients of a Butterworth filter Hc(s) with N = 2 and c = 1. 3. Briefly describe, how you can modify the analog Butterworth lowpass from above, to obtain a bandpass with bandedges 1, 2 and order N = 4. 4. A second-order digital Butterworth lowpass filter with cutoff frequency c = 0.3 is to be designed using the bilinear transformation with Td = 2. The normalized (c = 1) analog filter is given by

Page 5

Calculate the translated analog cutoff frequency c. Modify Hc(s) such that the bandedge is changed to c. Apply the bilinear transformation and determine the discrete-time filter coefficients.

1.4.1 Lab Task 1

1.4.1.1 Bilinear transformation and impulse invariance

The N-th order analog Butterworth lowpass filter with cutoff frequency c is given by

1. Design a Butterworth filter with N = 4, c = 0.3 and Td = 2 using the impulse invariance method. Proceed as follows: (a) Determine c and use (5) to calculate the analog filtering coefficients (use poly to convert between root and polynomial representation). (b) In the analog domain, plot hc(t) and |Hc(j)|. For the analog domain plots in MATLAB use the commands tf, impulse and freqs. (c) Transform your filter coefficients from the analog to the discretetime domain. (d) In the discrete-time domain, plot h(n) and |H(ej)| . Compare your results with (b). 2. Repeat 1. but with the bilinear transformation. 3. Vary the design parameter Td. What is its influence? Further, compare both methods: what are their strengths and weaknesses?

Page 6

10

Magnitude

10

10

-2

10

-4

10

-1

10 Frequency (rad/s)

10

150

Phase (degrees)

100 50 0 -50 -1 10

0 1

10 Frequency (rad/s)

10

1.4.2.1 Characteristics of IIR filters

For simplicity, we now use MATLAB functions which automatically perform all digital IIR filter design steps, mentioned in the introduction. The commands are e.g. butter, cheby1 or ellip. Use the help command for more details. Say the filtering specifications for a particular job are: Sampling frequency 200 Hz Passband ripple _ 1 dB Passband edge 32 Hz Stopband edge 38 Hz Stopband attenuation > 25 dB 1. Determine the order of a Butterworth, Chebyshev Type I and Elliptic filters that meet these specifications? Use the buttord, cheb1ord and ellipord commands. 2. Use butter, cheby1 and ellip to design the specified filters. For each, plot the magnitude of the frequency response, the pole-zero location diagram and the significant part of the impulse response. 3. For comparison, design an optimum FIR filter using firpm that meets the specifications. Determine the order using firpmord. Discuss your results.

Page 7

1.4.3.1 IIR filtering of sinusoids

1. The digital sequence x(n) arises from sampling an analog signal, x(t) = 5 sin(200t) + 2 cos(300t), at a sample rate fs = 1000 Hz. (a) Design a minimum-order IIR digital filter that will pass the 150 Hz component with attenuation of less than 1 dB and suppress the 100 Hz component to at least 40 dB. The filter should have a monotone passband and an equiripple stopband. (b) Generate 300 samples of the above sequence x(n) and process it through the designed filter to obtain the output sequence. Plot the input and the output sequences and comment on your results. 2. Use an elliptic bandstop filter with N = 10 to remove the digital frequency = 0.44 with a bandwidth of = 0.08. (a) Choose a reasonable value for the passband ripple and the stopband attenuation. Design the bandstop filter using ellip. Plot the magnitude response of your filter. (b) Generate samples of the sequence x(n) = sin(0.44n) for n = 0, 1, . . . , 200 and process through the bandstop filter. Comment on your results.

Page 8

- IbaPADU-8-M v1.9 en A4Uploaded byRodrigo Antonio Burboa Calisto
- Design of IIR FiltersUploaded bydivya1587
- Bandpass Filter TutorialUploaded byJaideep Bose
- DSP ASSIGNMENTUploaded byjpsridhar
- Fir filter designUploaded byJayan Kulathoor
- 08 CM0268 FiltersUploaded byNoedjoem Kaboer Aer
- Narrowband Microstrip Filter DesignUploaded bydwissel
- uaf42Uploaded byensv
- Design and Optimization of Band Pass Filter for Software Defined Radio TelescopeUploaded bytalha0703097
- problemas5sUploaded byturbodilan
- Active FilterUploaded byanon_463330020
- Matlab 1Uploaded byVikas Singla
- uaf42Uploaded bypantaloncitos
- Project 1 EE406Uploaded byhuda1989
- DSP ALGORITHMS & ARCHITECTURE NOTES (vtupro.com).pdfUploaded bySGS
- Vlsi in Noise CancellationUploaded byamta1
- Effects of Filters on DVB-T Receiver Performance Under AWGN, RAYLEIGH and RICEAN Fading ChannelsUploaded byAIRCC - IJCNC
- Dsp.pdfUploaded byTijana Mrdakovic
- 9D49106a Advanced Digital Signal Processing1Uploaded bysubbu
- PSP 42 Operation ManualUploaded byGeorge Robinson
- 10556345Uploaded byWilliam's Limonchi Sandoval
- DSI Synth Comparison ChartUploaded byandrewpiano
- Area Efficient Reconfigurable Fast Filter Bank for Multi-Standard Wireless ReceiversUploaded byinventy
- Equalization TechniquesUploaded byZekarias Hailu
- UC2F1601Uploaded byRamrekha Akshay
- Cartoon and Texture Decomposition - NotesUploaded byGiannis Gkouzionis
- MfcUploaded byAlexander Wiese
- title - CopyUploaded byEr Chaman Rana
- From Smith's Predictor to Model-Based Predictive ControlUploaded bydsshin_ps
- GoffauxRossion 2006 Journalofexperimentalpsychology.humanperceptionandperformanceUploaded byAlfonso Valdivia

- Why is Ethics ImportantUploaded byhassanshahji11
- Policy, Tariff Regime and Incentives for Solar EnergyUploaded byhassanshahji11
- Amir Jahan KhanUploaded byhassanshahji11
- Academic Calender 08-09Uploaded byhassanshahji11
- Engr Reg Form 1AUploaded bySufian Ahmad
- Transform PairsUploaded byArun Balakrishnan
- CE-2016-Revised Rule-18-09-2015Uploaded byhassanshahji11
- PSO PowerSectorUploaded byhassanshahji11
- Priorities of Pakistan in Energy SectorUploaded byhassanshahji11
- 26 Rehana Saeed 29 1Uploaded byhassanshahji11
- 6b Motor Nameplate Handout.325.pdfUploaded bypartha_gang4526
- E410-S02Uploaded byAsepta Surya Wardhana
- fdbkampsUploaded byhassanshahji11
- Probabilistic Assessment of Wind Power Production on Voltage ProfilesUploaded byhassanshahji11
- Project List(1)Uploaded byhassanshahji11
- thermocouplesUploaded byCobaritsema56

- Design of Fir Filter through Windowing MethodUploaded byIJSTE
- Bandpass Filter Tutorial2Uploaded byAli Sig
- Lathi-Ch7-Frequency Response and Analog Filters.optUploaded byBenitoGaldos
- Designing the Lowpass Chebyshev Infinite Impulse Response Digital FilterUploaded byMuhammad Hamzah
- Filtro_Pasa_Bajo.pdfUploaded byJohn Alexander Hidalgo
- K Constant Electronic Filter Design Tutorial3Uploaded bysinop14
- C & N Model Question PaperUploaded byMATHANKUMAR.S
- parameqdemoUploaded byRaj Venugopal
- CH16Uploaded byapi-3771799
- Digital Signal Processing Question Bank.pdfUploaded bysruthigummadi
- Lowpass-like Bandpass Filters (G. Szentirmai - HF Electronics 08-2009)Uploaded byk00ntz
- LICAUploaded bymunnap15
- Chapter 10 FiltersUploaded bySreeja Sujith
- Buysell Signal Generation Module 2Uploaded bymaddy_i5
- FIR Filter Design Using MatlabUploaded bybhavanimaddula
- EC 6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING_QUESTION BANK_2018Uploaded byshankar
- Design of Band Pass Filter in hairpin ConfigurationUploaded byMohammad Ismail Hossain (Sujohn)
- Filters EquationsUploaded byAicha Eugene
- 15ecl48-VTU-raghudathesh-Low Pass and High Pass FiltersUploaded byraghudatheshgp
- CS2403 DSP Question Bank Group - NewUploaded byDhilip Prabakaran
- Stop-Band Limitations of the Sallen-Key Low-Pass Filter (Slyt306)Uploaded bypsouza_676603
- Files 3-Lesson Notes Lecture 17Uploaded bykingboy
- Lecture 23Uploaded byAdribon
- All Pass Filter DesignUploaded bynivia25
- tuned_amplifiers_unit_2_ii_it.pptUploaded byvmspraneeth
- Active FiltersUploaded byAdrian Zayas
- Dsp TutorialUploaded bySatya Narayana
- Butter Worth Filter DesignUploaded byCan Çamlık
- Lecture 02 - Multirate SPUploaded byGnana Jeevan
- Achit Katesa a Lo Shi TheUploaded byNayOo Thway