Digital Filter Design, TMS320C5X Processor Instructions & Decimation
VerifiedAdded on 2023/06/14
|9
|1126
|391
Homework Assignment
AI Summary
This assignment provides solutions to three distinct problems in digital signal processing. The first solution details the design of a digital notch filter using the pole-zero placement method, specifying the transfer function, difference equation, and direct-form I and canonical-form realizations based on given notch frequency, 3dB width, and sampling frequency. The second solution focuses on designing an optimum multistage decimator for down-sampling an audio band signal from 80 kHz to 5 kHz, considering passband and stopband ripple specifications, and determining the number of filter coefficients required for each stage, along with block diagrams. Lastly, the assignment includes the execution of TMS320C5X series processor instructions, tracking the changes in register contents after each instruction, assuming any missing data to facilitate the execution.

Solution 1
Given
Notch frequency: 25 Hz
3 dB width of notch : +/- 4 Hz
Sampling frequency : 200 Hz
To reject the component at 25Hz we can place a complex zeros pairs at points on the unit circle
corresponding to 25Hz that is at angles of
360 ° × 25
200 =± 45°
To attain a sharp notch filter and response of better amplitude on whichever side of the notch
frequency. Complex conjugate pair of poles are there at a radius r < 1. The notch width is
strongminded by the locations of the poles. The connection amid the bandwidth and radius is
similar as given below:
Radius
r =1−
( BW
Fsample )π
r =1−( 2∗4
200 ) π
r =0.8744
The connection between the bandwidth and the radius is appropriate. Therefore the radius of the
poles is 0.8744.
Given
Notch frequency: 25 Hz
3 dB width of notch : +/- 4 Hz
Sampling frequency : 200 Hz
To reject the component at 25Hz we can place a complex zeros pairs at points on the unit circle
corresponding to 25Hz that is at angles of
360 ° × 25
200 =± 45°
To attain a sharp notch filter and response of better amplitude on whichever side of the notch
frequency. Complex conjugate pair of poles are there at a radius r < 1. The notch width is
strongminded by the locations of the poles. The connection amid the bandwidth and radius is
similar as given below:
Radius
r =1−
( BW
Fsample )π
r =1−( 2∗4
200 ) π
r =0.8744
The connection between the bandwidth and the radius is appropriate. Therefore the radius of the
poles is 0.8744.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Transfer Function
From the transfer function of the filter we have:
H [ z ]= [z −e− j 45 ][ z−e j 45]
[z−0.8744 e− j 45 ][ z−0.8744 e j 45 ]
H [ z ]= z2−z e j 45−z e− j 45 +1
z2−z 0.8744 e j 45−0.8744 z e− j 45+ ( 0.8744 ) 2
H [ z ]= z2− z( ( 0.525+0.85 j ) )−z ( ( 0.525−0.85 j ) )+1
z2−z 0.8744∗( ( 0.525+0.85 j ) ) −0.8744 z∗( ( 0.525−0.85 j ))+ ( 0.8744 )2
H [ z ]= z2−z +1
z2−z 0.8744+0.77
H [ z ]= 1−z−1+z−2
1−0.8744 z−1+0.77 z−2
Difference Equation
Now difference equation can be derived as
Y ( z )
X (z )= 1−z−1+ z−2
1−0.8744 z−1+0.77 z−2
Y ( z )∗( 1−0.8744 z−1 +0.77 z−2 )=X ( z )∗(1−z−1 + z−2 )
(Y ( z ) −0.8744 z−1 Y ( z ) +0.77 z−2 Y ( z ) )=( X ( z ) −z−1 X ( z ) +z−2 X ( z ) )
Using inverse z transform
From the transfer function of the filter we have:
H [ z ]= [z −e− j 45 ][ z−e j 45]
[z−0.8744 e− j 45 ][ z−0.8744 e j 45 ]
H [ z ]= z2−z e j 45−z e− j 45 +1
z2−z 0.8744 e j 45−0.8744 z e− j 45+ ( 0.8744 ) 2
H [ z ]= z2− z( ( 0.525+0.85 j ) )−z ( ( 0.525−0.85 j ) )+1
z2−z 0.8744∗( ( 0.525+0.85 j ) ) −0.8744 z∗( ( 0.525−0.85 j ))+ ( 0.8744 )2
H [ z ]= z2−z +1
z2−z 0.8744+0.77
H [ z ]= 1−z−1+z−2
1−0.8744 z−1+0.77 z−2
Difference Equation
Now difference equation can be derived as
Y ( z )
X (z )= 1−z−1+ z−2
1−0.8744 z−1+0.77 z−2
Y ( z )∗( 1−0.8744 z−1 +0.77 z−2 )=X ( z )∗(1−z−1 + z−2 )
(Y ( z ) −0.8744 z−1 Y ( z ) +0.77 z−2 Y ( z ) )=( X ( z ) −z−1 X ( z ) +z−2 X ( z ) )
Using inverse z transform

( y ( n)−0.8744 y (n−1)+0.77 y ( n−2))=(x (n)− x(n−1)+ x(n−2))
y ( n ) =x ( n ) −x ( n−1 ) + x ( n−2 ) + 0.8744 y ( n−1 ) −0.77 y (n−2)
We can have coefficient as
b0=1 b1=−1 b2 =1
a0=1 a1=−0.8744 a2=0.77
Direct-Form I
From
y ( n )=x ( n )−x ( n−1 )+ x ( n−2 )+0.8744 y ( n−1 ) −0.77 y (n−2)
Canonical-Form
From
y ( n )=x ( n )−x ( n−1 )+ x ( n−2 )+0.8744 y ( n−1 ) −0.77 y (n−2)
y ( n ) =x ( n ) −x ( n−1 ) + x ( n−2 ) + 0.8744 y ( n−1 ) −0.77 y (n−2)
We can have coefficient as
b0=1 b1=−1 b2 =1
a0=1 a1=−0.8744 a2=0.77
Direct-Form I
From
y ( n )=x ( n )−x ( n−1 )+ x ( n−2 )+0.8744 y ( n−1 ) −0.77 y (n−2)
Canonical-Form
From
y ( n )=x ( n )−x ( n−1 )+ x ( n−2 )+0.8744 y ( n−1 ) −0.77 y (n−2)
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Solution 2
A Blackman window can attain a ripple of 75dB in stop band and ripple of 0.0014dB in
passband.
This could be likened with the necessities of this antialiasing filter of
δs ≈ 0.01 , which is−20 log(0.01)=40 dB
And a passband ripple
δp ≈ 0.1 ,∨20 log (1+ 0.1)=0.827 dB
Though, giving to the low pass FIR filter design strategies, the filter coefficients number for a
Blackman window would then be:
N=−10∗log ( δs δ p )−13
14.6∗∆ f +1
N= 27
14.6∗∆ f +1
N= 1.85
∆ f +1
N= 1.85
5/80 +1
A Blackman window can attain a ripple of 75dB in stop band and ripple of 0.0014dB in
passband.
This could be likened with the necessities of this antialiasing filter of
δs ≈ 0.01 , which is−20 log(0.01)=40 dB
And a passband ripple
δp ≈ 0.1 ,∨20 log (1+ 0.1)=0.827 dB
Though, giving to the low pass FIR filter design strategies, the filter coefficients number for a
Blackman window would then be:
N=−10∗log ( δs δ p )−13
14.6∗∆ f +1
N= 27
14.6∗∆ f +1
N= 1.85
∆ f +1
N= 1.85
5/80 +1
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

N=30
Design
Stage 1
The original sampling frequency fs = 80 kHz and the new or we can say of the decimated signal
should have a sampling frequency of f new=5 kHz .
Decimation of Multistage type with 2 stages necessitates that:
f s
f new
=D
D= 80
5
D=16=D 1× D2.
Block Diagrams
Decimation in multistage:
The values of multistage decimation could hence be D1 = 4 and D2 = 4, making a middle signal
with sampling frequency:
Design
Stage 1
The original sampling frequency fs = 80 kHz and the new or we can say of the decimated signal
should have a sampling frequency of f new=5 kHz .
Decimation of Multistage type with 2 stages necessitates that:
f s
f new
=D
D= 80
5
D=16=D 1× D2.
Block Diagrams
Decimation in multistage:
The values of multistage decimation could hence be D1 = 4 and D2 = 4, making a middle signal
with sampling frequency:

f s 1= f s
4 =80
4 =20 kHZ
The transition width could be lengthier with this more sampling rate. We can retain the similar
passband frequency (2 kHz). The transition width could go up to half the sampling rate:
f tw ≤ 20 kHz
2 −2 kHz=8 kHz
The number of Blackman filter coefficients for this stage is:
N 1=5.98 × f s 1
f tw
N1=5.98 × 20
8 =15( rounded up)
So N1 = 8 filter coefficients are required for the first decimation stage.
Stage 2
The intermediate signal sampled at 20 kHz is to be decimated by a factor of 4 to 5 kHz
for the second stage:
f s 2= f s 1
4 = 5
4 =1.25 kHZ
The transition width can be longer with this higher sampling rate:
4 =80
4 =20 kHZ
The transition width could be lengthier with this more sampling rate. We can retain the similar
passband frequency (2 kHz). The transition width could go up to half the sampling rate:
f tw ≤ 20 kHz
2 −2 kHz=8 kHz
The number of Blackman filter coefficients for this stage is:
N 1=5.98 × f s 1
f tw
N1=5.98 × 20
8 =15( rounded up)
So N1 = 8 filter coefficients are required for the first decimation stage.
Stage 2
The intermediate signal sampled at 20 kHz is to be decimated by a factor of 4 to 5 kHz
for the second stage:
f s 2= f s 1
4 = 5
4 =1.25 kHZ
The transition width can be longer with this higher sampling rate:
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

f tw ≤ 1.25 kHz
2 −2kHz=−ve kHz
So N1 = 8 filter coefficients are required for the first decimation stage.
Solution 3
Given
DP = 6
PM=1
CNF= 1 [311h] = 64h [02100H] = 04h
TREG0 = 22h
PREG = 01234567h
ACC = 76543210h
ARCR = 2530h
ARP = 3;
AR3 = 2350h;
INDX = 10h; [2350h] = 132h [50h] = 4680h
a. SAMM * 0 - , AR0
Meaning
2 −2kHz=−ve kHz
So N1 = 8 filter coefficients are required for the first decimation stage.
Solution 3
Given
DP = 6
PM=1
CNF= 1 [311h] = 64h [02100H] = 04h
TREG0 = 22h
PREG = 01234567h
ACC = 76543210h
ARCR = 2530h
ARP = 3;
AR3 = 2350h;
INDX = 10h; [2350h] = 132h [50h] = 4680h
a. SAMM * 0 - , AR0
Meaning
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Accept that ARP = 3 and AR3 = 2350h. The ACC content is kept to the PMST sharp at
through the 7 LSBs of AR3.
*0+ Increment by index amount. In this the current AR Content is utilized like the data
memory address. Prior to completion of the memory access, the INDX content is
augmented to the current AR contents.
Execution
SAMM Store ACCL in memory-mapped register
AR=2350h [132 h]+ 10h = 142 h
b. XOR # 0ABBA h, 2
Long immediate shift by 2 places
PREG = 01234569h
ACC = 76543212h
c. MAC 02100h,11h
PREG = 01234569h
ACC = 76543212h
AR= 153 h
d. ADD 11h, 3
PREG = 01234569h
ACC = 76543212h
AR= 156 h
through the 7 LSBs of AR3.
*0+ Increment by index amount. In this the current AR Content is utilized like the data
memory address. Prior to completion of the memory access, the INDX content is
augmented to the current AR contents.
Execution
SAMM Store ACCL in memory-mapped register
AR=2350h [132 h]+ 10h = 142 h
b. XOR # 0ABBA h, 2
Long immediate shift by 2 places
PREG = 01234569h
ACC = 76543212h
c. MAC 02100h,11h
PREG = 01234569h
ACC = 76543212h
AR= 153 h
d. ADD 11h, 3
PREG = 01234569h
ACC = 76543212h
AR= 156 h

e. CMPR 2
PREG = 01234571h
ACC = 76543214h
AR= 153 h
PREG = 01234571h
ACC = 76543214h
AR= 153 h
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 9
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024 | Zucol Services PVT LTD | All rights reserved.