You are on page 1of 5

VIET NAM NATIONAL UNIVERSITY HO CHI MINH CITY

HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY


FACULTY OF COMPUTER SCIENCE AND ENGINEERING

DIGITAL SIGNAL PROCESSING

LAB 01

Student name: Ngo Chan Phong


Student ID: 2053321

Semester 231, AY 2023-2024


HCMC UNIVERSITY OF TECHNOLOGY - VNU-HCM
FACULTY OF COMPUTER SCIENCE AND ENGINEERING

1 Exercise 1.1

first vector, second vector, third vector are three vectors to display the results in exercise 1.

2 Exercise 1.2

2.1 Use Scilab to draw xa (t) in 5 periods


2π 1
T = 100π = 50

1 T = 1/50
2 t = linspace (0 , 5* T ,100)
3 x = 3* sin (100*% pi * t )
4 plot (t , x )

Digital Signal Processing Page 1/4


HCMC UNIVERSITY OF TECHNOLOGY - VNU-HCM
FACULTY OF COMPUTER SCIENCE AND ENGINEERING

2.2 Determine the discrete time signal x(n) of the signal xa (t) that is sample with
a sampling rate Fs = 300 samples per s
t
x(n) = xa ( 300 ) = 3sin( 100π π
300 ∗ t) = 3sin( 3 t)

2.3 Determine the discrete time signal x(n) and determine the periodic property
of x(n). If x(n) is periodic signal, determine the frequency and period of
x(n).Then, use Scilab to draw x(n) in 5 periods.
π
Based on the answer below, we have ω = 3
2kπ 2kπ
N= ω = π = 6k
3
From the result above, x(n) is periodic. The fundamental period is 6 which corresponds to k=1 envelope cycles.
So the frequency of x(n) is 16 Hz
1 t = 0:30
2 x = 3* sin ((% pi /3) * t )
3 plot (t , x )
4 plot2d3 (t , x )

Digital Signal Processing Page 2/4


HCMC UNIVERSITY OF TECHNOLOGY - VNU-HCM
FACULTY OF COMPUTER SCIENCE AND ENGINEERING

2.4 Determine the quantized signal xq (n) if δ =0.1 using truncated method. Then,
draw xq (n) in 5 periods.

1 N = 6
2 n = linspace (0 , 5* N -1 , 30)
3 x = 3* sin ((% pi /3) * n )
4 xq = ( floor ( x *10) /10.0)
5 plot (n , xq ,"*")
6 plot2d3 (n , xq )

Digital Signal Processing Page 3/4


HCMC UNIVERSITY OF TECHNOLOGY - VNU-HCM
FACULTY OF COMPUTER SCIENCE AND ENGINEERING

Digital Signal Processing Page 4/4

You might also like