EEE 4510 DSP Homework: Signal Sampling, Conversion and Analysis

Verified

Added on  2023/06/15

|14
|1643
|411
Homework Assignment
AI Summary
This assignment solution covers several aspects of Digital Signal Processing (DSP), including signal sampling, aliasing, and conversion between continuous and discrete-time domains. It begins by defining the Nyquist sampling theorem and differentiating between under-sampling and over-sampling. The solution then addresses specific questions involving a cosine signal sampled at various frequencies, determining whether each case results in under-sampling or over-sampling, and verifying the results using MATLAB. Further, the assignment identifies equal discrete-time signals among a given set, again using MATLAB for verification. It also explores the conversion of discrete-time signals to continuous-time signals using a D to A converter. Finally, the solution analyzes the frequency spectrum of signals after A/D and D/A conversion, considering the impact of the sampling frequency. The document includes MATLAB code snippets and relevant calculations to support the solutions.
Document Page
DSP
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Table of Contents
Definition.........................................................................................................................................2
Sampling signal...........................................................................................................................2
Question – 1.....................................................................................................................................3
Question -2.......................................................................................................................................5
Question-3........................................................................................................................................9
Question - 4....................................................................................................................................10
References......................................................................................................................................12
1
Document Page
Definition
Sampling signal
Nyquist sampling theorem using under sampling and oversampling(Thompson, 2013)
2
Document Page
Question – 1
signal x(t) = 2cos (2π 2000t − π /6)
Given
x(t) = 2cos (2π 2000t – π/ 6)
Solution
Sampling Signal
t- representing the continues variable
sampling rate is
f s=samples/sec
3
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
f s=1/T s
The condition for under sampling and oversampling is given below(Bi and Mitra, 2011)
w0< π under sampled
w0>π over sampled
Aliasing
the aliasing is using to signal converts the analog (continuous-time) and digital (discrete-time)
domain (Etikan, 2017).
( a ) f s =16kHz
f s=1/T s = 1/16
x[n]=x (n (1/T s ¿) =2 cos (2π n ( 2000 ) ( f s ) π
6 )
=2 cos (2π n(2000) ( 1
T s ) π
6 )
=2 cos (2 π n(2000) 1
16 - π
6 )
= 2 cos (4000 π n 1
16 000 π
6 ) (16kHz 16000)
=2 cos (4000 π n(0.0 000 625) π
6 )
= 2 cos (0.25π n - π
6 )
= 2 cos (0.25π n - π
6 )
w0=0.25 π
φ= - π/6
A=2
The wo>2 so, it is under sampling.
(b) f s=10kHz
f s=1/T s = 1/10
X[n] =2 cos (2πn ( 2000 ) ( f s ) π
6 )
= 2 cos (2πn (2000) 1
10 - π /6)
4
Document Page
=2 cos (4000 π n 1
10 00 0 - π
6 ) (10kHz 10000)
= 2 cos (4000π n(0.0001)- π
6 )
=2 cos (0.4π n π
6 )
= 2 cos (0.4π n π
6 )
wo=0.4, φ=π /6 , A=2
The wo>2 so, it is under sampling.
f s=10 is under sampling
(c) f s=2.5kHZ
f s=1/T s = 1/2.5
X[n] =2 cos (2πn ( 2000 ) ( f s ) π
6 )
=2 cos (2πn (2000) 1
2.5 - π /6)
=2 cos (4000 πn 1
2.5000 - π
6 ) (2.5kHz 2.5000)
= 2 cos (4000 πn(0.4)- π
6 )
=2 cos (1600πn π
6 )
wo=1600, φ= π /6 , A=2
wo< 2 so it is oversampling.
(d) f s=1.5kHz
f s=1/T s = 1/1.5
X[n] =2 cos (2πn ( 2000 ) ( f s ) π
6 )
=2 cos (2πn (2000) 1
1.5 - π /6)
=2 cos (4000 πn 1
1.5000 - π
6 ) (1.5kHz 1.5000)
5
Document Page
= 2 cos (4000 πn(0.666)- π
6 )
=2 cos (2666.6πn π
6 )
wo=2666.6 , φ=π /6 , A=2
wo< 2 so it is oversampling
MATLAB command
Question -2
n is identical value for x1 [ n ] ¿ x2 [n]
n range from 0 to 6
MATLAB command
x1[n] = cos(0.7πn + π 3)
n= 0:6;
x1 = cos (0.7*pi*n +pi/3);
stem (n, x1)
6
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
x2 [n] = cos(1.3πn − π 3)
n= 0:6;
x2 = cos (1.3*pi*n -pi/3);
stem (n, x2)
x3 [n] = cos(1.3πn + π 3)
n =0:6;
x3=cos (1.3*pi* n +pi/3);
stem (n, x3)
7
Document Page
x4 [n] = cos(1.5πn − π 4)
n=0:6;
x4 = cos(1.5*pi*n-pi/4);
stem (n, x4)
x5[n] = cos(−1.5πn − π 4)
n=0:6;
x5=cos (-1.5*pi* n-pi/4);
stem (n, x5)
8
Document Page
x6 [n] = cos(2.5πn − π 4)
n=0:6;
x6=cos (2.5*pi* n -pi/ 4);
stem (n, x6)
x5 [ n ] x6 [n] these signals are equal discrete time signal
9
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Question-3
D to A converter
The Y[n] is called "discrete time" signal
The Y[n] is convert to continuous time signal Y[t] (Guochang, Yadong and Xiaohui, 2010).
[a] y1 [n] = 3cos (0.7πn + π /6)
Given
y1 [n] = 3cos (0.7πn + π /6)
f s=4kHz
Solution
y1 [n] = 3cos (0.7πn + π /6)
Y[t] = 3 cos (0.7 π ( 4000 t ) + π
6 )
[b] y2 [n] = 2cos (1.7πn − π 3)
Solution
y2 [n] = 2cos (1.7πn − π /3)
Y[t] =3cos (1.7π (4000t ) + π / ¿3 ¿)
[c] y3[n] = 4 cos (2.2πn + π/ 4)
Solution
y3[n] = 4 cos (2.2πn + π /4)
Y[t] = 4 cos (2.2π ( 4000 t )+ π / 4)
MATLAB
program
n = 0:10; % discrete time axis
x1 = 5*cos(7.3*pi*n+pi/4);
x2 = 5*cos(0.7*pi*n+pi/4);
x3 = 5*cos(0.7*pi*n-pi/4);
na = 0:1/200:10; % continuous time axis
x1a = 5*cos(7.3*pi*na+pi/4);
x2a = 5*cos(0.7*pi*na+pi/4);
x3a = 5*cos(0.7*pi*na-pi/4);
subplot(3,1,1);
plot(n,x1);
hold on;
subplot(3,1,2);
10
Document Page
plot(n,x2);
hold on;
subplot(3,1,3);
plot(n,x3);
hold on;
Result
Question - 4
Given:
x (t ) = 3cos(2π 400t +π 4)+ 2cos(2π 1200t −π 3)
Common sampling frequency fs
(a) y(t ) = x(t ) and about fs
The output of digital to analog converter is equal to the input of analog to digital converter, i.e. y
(t) = x (t).
That it is larger than twice fmax, namely fs > 2400 Hz
(b) fs = 1.8 kHz and find x[n]
Where x (t ) = 3cos(2π 400t +π /4)+ 2cos(2π 1200t –π/ 3)
11
chevron_up_icon
1 out of 14
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]