<< Chapter < Page Chapter >> Page >

In order to formulate a cost criterion, we must first select a model for thediscrete-time filter of interest. There are many ways of doing this, but we will usethe coefficients of a rational transfer function to model (or parameterize) the set of second order IIR filters.In this case, the elements of the vector θ = [ θ 1 , θ 2 , θ 3 , θ 4 , θ 5 ] are the coefficients of the transfer function

H θ ( z ) = θ 1 + θ 2 z - 1 + θ 3 z - 2 1 + θ 4 z - 1 + θ 5 z - 2 .

Using this parameterization, we may then define a function Cost ( θ ) which is the “cost” of using the filter H θ ( z ) .

To illustrate this numerical optimization approach, we will design a digital filter that compensates for the roll-offdue to the sample-and-hold process in an audio CD player. In lab 4, we saw that the sample-and-hold operation in a conventionalD/A converter causes the reconstructed signal to be filtered by the function

H s h ( e j ω ) = sinc ω 2 π for | ω | < π

One method of reducing this distortion is to digitally “pre-filter” a signal withthe inverse transfer function, 1 / H s h . This filter 1 / H s h pre-distorts the audio signal so the reconstructed signal has the desired frequency response.We would like to approximate the filter 1 / H s h using the second order filter of [link] .

For an audio CD player, the magnitude of the frequency response is generally considered to be more important than the phase. This isbecause we are not perceptually sensitive to phase distortion in sound. Therefore, we may choose a cost function which computes the total squarederror between the magnitudes of the desired pre-filter response, 1 / H s h ( e j ω ) , and the second order filter H θ ( e j ω ) :

Cost ( θ ) = - π π 1 H s h ( e j ω ) - H θ ( e j ω ) 2 d ω

The θ parameters that minimize this cost function will be the parameters of our designed filter.A more complex approach might also account for the filter phase, but for simplicity we will only try to match the filter magnitudes.

After the filter is designed, we may compute the difference between the CD player's frequency response in dB and the ideal desired responsein dB that the CD player should have:

Err d B ( ω ) = 20 log 10 H s h ( e j ω ) | H θ * ( e j ω ) |

where θ * is the optimized value of θ and H θ * ( e j ω ) is the optimum second-order filter.

Do the following to perform this filter design:

  • Write a Matlab function prefilter(w,theta) which computes the frequency response H θ ( e j ω ) from equation [link] for the vector of input frequencies w and the parameter vector theta .
  • Write a Matlab function Cost(theta) which computes the total squared error of equation [link] . Use a sampling interval Δ ω = 0 . 01 for the functions H θ ( e j ω ) and 1 / H s h ( e j ω ) .
  • Use the command fminsearch from Matlab's Optimization Toolbox to compute the value of the parameter θ which minimizes Cost(theta) . The function fminsearch has the syntax X = fminsearch('function_name',initial_value) where function_nameis the name of the function being minimized ( Cost ), initial_value is the starting value for the unknown parameter, and X is the minimizing parameter vector. Choose an initial value of ( θ 1 , θ 2 , θ 3 , θ 4 , θ 5 ) = ( 1 , 0 , 0 , 0 , 0 ) so that H θ ( e j ω ) = 1 .
  • Use the subplot command to plot the following three functions on the interval [ - π , π ] .
    • The desired filter magnitude response 1 / H s h ( e j ω ) .
    • The designed IIR filter magnitude response | H θ * ( e j ω ) | .
    • The error in decibels, from equation [link] .

Inlab report

Do the following:
  1. Submit the printouts of the code for the two Matlab functions prefilter.m and Cost.m .
  2. Give an analytical expression for the optimized transfer function H θ * ( z ) with the coefficients that were computed.
  3. Submit the three plots. On the error plot, mark the frequency ranges where the approximation error is high.

Questions & Answers

what is mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask