2y ago

36 Views

3 Downloads

362.90 KB

31 Pages

Transcription

Lecture 07: Multirate Digital Signal ProcessingJohn ChivertonSchool of Information TechnologyMae Fah Luang University1st Semester 2009/ 2552

Lecture eger Sample Rate ConversionMultistage Sample Rate ConversionSummary

ger Sample Rate ConversionMultistage Sample Rate ConversionSummary

What is a Multirate Digital Signal Processing?IA digital signal processing system that uses signals withdifferent sampling frequencies is probably performingmultirate digital signal processing.IMultirate digital signal processing often uses sample rateconversion to convert fromone sampling frequency to another sampling frequency.ISample rate conversion usesdecimation to decrease the sampling rate,interpolation to increase the sampling rate.

Sample Rate ConversionChanging the sampling frequency in the analog domainrequires:Idigital to analog conversion thenIanalog to digital conversion at a different samplingfrequency.BothIDigital to analog conversionIAnalog to digital conversionintroduce errors and noise into the signal.Therefore sample rate conversion is done in digital domain anduses a combination of:IDecimation,Iand Interpolation.

ger Sample Rate ConversionMultistage Sample Rate ConversionSummary

Decimation (for Downsampling)Decimation removes samples from a signal.Decimation can therefore only downsample the signal by aninteger factor:fs D 1so that fs fsnewfsnewwhere D is an integer, fs is the old sampling rate (number ofsamples per second) and fsnew is the new sampling 7]x[8]x[9]timIIy[1]y[2](included)(included)

Anti-aliasing for DecimationDecimation decreases the sampling rate.IThe sampling theorem states that the highest frequency in asignal should be less than half the sampling frequency.IA digital anti-aliasing filter has to be applied to removefrequencies higher than:fcf Ifsnew2So in digital frequency the cut-off frequency is:new2π fsfsΩnewsΩcf 22as fsnew fs . πfsnew πfs

Anti-aliasing for DecimationThis means that the signal has to be filtered in the digitaldomain before decimation:x[n]DigitalAnti aliasingFilterDecimatory[n]

ger Sample Rate ConversionMultistage Sample Rate ConversionSummary

Interpolation (for Upsampling)IInterpolation increases the sampling frequency by estimatingthe value of the signal between samples.x(t)x(t)x[n]time t orsample instancesntime t or newsample instancesmy[m]

InterpolationIThe new sampling frequency is greater than the oldsampling frequency:fsnew fswhere fs is the old sampling frequency and fsnew the newsampling frequency.IAlso, the new sampling frequency has to be an integermultiple of the original sampling frequency:fsnew D 1fswhere D is an integer.

Zero Filling Based InterpolationA common interpolation approach is zero filling basedinterpolation.There are two stages:1. zero filling2. low pass 0y[0]y[1]y[2]y[3]y[4]y[5]y[6]y[7]y[8]y[9]

Zero Filling Based InterpolationExample: Interpolating by 3 (two zero samples are insertedbetween each original sample).x(t)Original Signalx[n]time t orsample instancesnzero fillingx(t)zero filledtime t or newsample instancesmlow passfilteringx(t)y[m]time t or newsample instancesmInterpolated Signal

ger Sample Rate ConversionMultistage Sample Rate ConversionSummary

Non-Integer Sample Rate ConversionBoth:IDecimation (for downsampling):fsfsnewI Dand Interpolation (for upsampling):fsnew Dfswhere D is an integer, can only change the sampling frequencyto an integer of the original frequency.

Non-Integer Sample Rate ConversionExample:IA CD player stores music at 44.1kHz.IA professional music recording device processes audio at48kHz.Transfer of the music to or from the CD player and theprofessional audio device using:IIIdecimation only orinterpolation onlyare not possible because:48e3 1.088444.1e3which is not an integer.

Non-Integer Sample Rate ConversionSolution!Combine decimation and interpolation to get non-integer samplerate conversion.Similar to finding a common denominator in fractions.1. Find common (integer) factor of the two sample rates, L2. Interpolate (upsample) by this common factor L3. Decimate (downsample) to the new sample rate fsnew bydownsampling by an integer factor M .The sample rate converison is then:f newL sMfs

Non-Integer Sample Rate Conversion ExampleExample:Get audio from 44.1kHz sampled source (CD player) and transferto professional audio processor requiring 48kHz sample rate.A. This process requires upsampling to 48kHz from 44.1kHz.ProfessionalAudio ProcessorCD Player44.1kHzSample RateConversion48kHz

Non-Integer Sample Rate Conversion Example cont’d.1. Worst case common factor: L 48kHz to givefs 48kHz 2116.8MHz.Better alternative is L 160 to giveL 44.1kHz 7056kHz2. So interpolate by factor L by inserting 159 zeros for eachsample in 44.1kHz CD player signal then low pass filtering.3. Then decimate to 48kHz by removing 146 samples in every147 ( L 44.1kHz/48kHz) from the upsampled signal(after applying anti-aliasing low pass filter).The resulting sample rate conversion is:160L 1.088M147which is the same asfsnew48kHz 1.088.fs44.1kHz

Optimising Non-Integer Sample Rate ConversionThere are 2 low pass filters (low pass filtering and anti-aliasingfiltering) for non-integer sample rate conversion:INPUT SIGNALInterpolationZero FillingLow PassFilteringAnti AliasingFilteringDecimationSampleRemovalOUTPUT SIGNAL

Optimising Non-Integer Sample Rate ConversionThe interpolation low pass filter and the anti-aliasing filter forthe decimation stage can be combinedwith a cut-off frequency equal to the lower of the two filters’cut-off frequencies.INPUT SIGNALZero FillingInterpolation& DecimationLow PassFilteringSampleRemovalOUTPUT SIGNAL

ger Sample Rate ConversionMultistage Sample Rate ConversionSummary

Multistage Sample Rate ConversionProblem!In real world applications sample rate conversion converts asampling frequency to another sampling frequency that is:IVery much greater (fsnew fs ) orIVery much smaller (fsnew fs )than the original signal sampling frequency.But what is wrong with this?This is best explained by an example.

Multistage Sample Rate Conversion: ProblemQ. A signal x[n], sampled at 4.096kHz has to be decimated to 128Hz. There shouldbe an antialiasing filter:I that rejects frequencies above 64Hz,I with a stopband ripple, δs 0.001,I and a passband ripple of δp 0.001.I The transition width should be ftw 4Hz,I so that frequencies below 60Hz are kept.A. A Blackman window can achieve a stop band ripple 75dB and passband ripple of0.0014dB.This can be compared with the requirements of this antialiasing filter of δs 0.001,which is 20 log(0.001) 60dB and a passband ripple δp 0.001, or20 log(1 0.001) 0.0087dB.However, according to the low pass FIR filter design guidelines in [Van de Vegte,2002]1 , the number of filter coefficients for a Blackman window will then be:N 5.98 fs 5.98 4096/4 6123.5ftwSo the number of filter coefficients is very high.1Van de Vegte, “Fundamentals of Digital Signal Processing” Prentice Hall, 2002.

Multistage Sample Rate ConversionMultiple stages for decimation (or interpolation) can reduce thenumber of filter coefficients in the filter specifications.The signal can be decimated more than once, usinga gradual change in sampling frequency.Conventional decimation:x[n]Anti AliasingFilter h[n]DecimationDy[n]Decimation in mutliple stages (multistage):x[n]Anti AliasingFilter h 1 [n]DecimationD1Anti AliasingFilter h 2 [n]DecimationD2Anti AliasingFilter h 3 [n]DecimationD3y[n]

Multistage Sample Rate ConversionThe multi-stage sample rate conversion decimation values, Di :fsfsnew D D1 D2 . Dk kYDii 1where all Di are integers. So for three stages, k 3 andD D1 D2 D3 .x[n]Anti AliasingFilter h 1 [n]DecimationD1Anti AliasingFilter h 2 [n]DecimationD2Anti AliasingFilter h 3 [n]DecimationD3y[n]

Multistage Sample Rate Conversion Problem 2Q. The earlier problem can now be implemented using 2 decimation stages. Find outhow many filter coefficients are necessary for a 2 stage decimation process.A. The original sampling frequency fs 4.096kHz and the new (decimated signal)should have a sampling frequency of fsnew 128Hz. Multistage decimation with 2stages requires that:4096fs D 32 D1 D2 .fsnew128The multistage decimation values can therefore be D1 8 and D2 4, creating an(1)intermediate signal with sampling frequency: fs fs /8 512Hz.The transition width can be longer with this higher sampling rate.We can keep the same passband frequency (60Hz).The transition width can go up to half the sampling rate:(1)ftw 512Hz 60Hz 196Hz2The number of Blackman filter coefficients for this stage is:(1)N1 5.98 fs(1)ftw 5.98 512 16, (rounded up to integer value).196

Multistage Sample Rate Conversion Problem 2, cont’d.So N1 8 filter coefficients are required for the first decimation stage.The intermediate signal sampled at 512Hz is to be decimated by a factor of 4 to128Hz for the second stage:(2)fsnew fs 512Hz 128Hz.4The transition width for this (final) stage can then be:(2)ftw 128Hz 60Hz 4Hz2So that the number of Blackman filter coefficients for this stage is:(2)N2 5.98 fs(2)ftw 5.98 128 192.4192 filter coefficients are required for this final stage. The combined filter coefficientsfor the two stages is:N1 N2 16 192 208,which is considerably less than the original non-multistage decimation antialiasingfilter requiring N 6124 coefficients.

ger Sample Rate ConversionMultistage Sample Rate ConversionSummary

Lecture SummaryThis lecture has coveredIDecimation,IInterpolation,INon-integer sample rate conversion,IMultistage sample rate conversion.There are many more to topics and techniques in multirate digitalsignal processing including:IImplementation techniques, e.g. polyphase filtersIand Applications.

Lecture 07: Multirate Digital Signal Processing John Chiverton School of Information Technology Mae Fah Luang University 1st Semester 2009/ 2552. Lecture Contents Introduction Decimation Interpolation Non-Integer Sample Rate Conv

Related Documents: