Anda di halaman 1dari 17

TUGAS PENGOLAHAN SINYAL DIGITAL

KELOMPOK 6

Oleh :
YANUAR EKA PRAYUDI

H1C007012 (1,5,9)

BUDI CAHYADI

H1C008055 (4,8,12)

SYAMSUL MA'ARIEF

H1C009009 (3,7,11)

YULIASIH

H1C009010 (2,6,10)

KEMENTERIAN PENDIDIKAN NASIONAL


UNIVERSITAS JENDERAL SOEDIRMAN
FAKULTAS SAINS DAN TEKNIK
TEKNIK ELEKTRO
2012

SOAL :
1. given a sequence x(n) for 0n 3 where x(0) = 1, x(1) = 1, x(2) = -1 and x(3) = 0, compute its
DFT X(k).
2. Given a sequence x(n) for 0 <= 3, where x(0) = 4, x(1) = 3, x(2) = 2,
and x(3) = 1, evaluate its DFT X(k).

3. Given the DFT sequence X(k) for

0k 3 obtained in Problem 4.2, evaluate its inverse DFT

x(n).
4.

5. Using the DFT sequence X(k) for xk 5 computed in problem 4.4, evaluate
the inverse DFT x(0) and x(4)
6.

Consider a digital sequence sampled at the rate of 20,000 Hz. If we use


the 8,000-point DFT to compute the spectrum, determine :
a. the frequency resolution
b. the folding frequency in the spectrum.

7. We use the DFT to compute the amplitude spectrum of a sampled data sequence with a sampling

rate fs = 2,000 Hz. It requires the frequency resolution to be less than 0.5 Hz. Determine the number
of data points used by theFFTalgorithm and actual frequency resolution inHz, assuming that the data
samples are available for selecting the number of data points.
8.

9.

Compute the following window functions for size of 8:


a. Hamming window function
b. Hanning window function
10. Given the following data sequence with a length of 6,
x(0) = 0, x(1) = 1, x(2) = 0, x(3) = 1, x(4) = 0, x(5) = 1
compute the windowed sequence xw(n) using the
a. triangular window function.
b. Hamming window function.
c. Hanning window function.
11.

12.

Jawab:

n=0 xn
3
n=0 xn

1. X(0) =

X(1)=

= ( x(0) + x(1) + x(2) + x(3) ) = (1+1-1+0) = 1


= 1 ( + x 2 e j + )
4

= x(0) - jx(1) x(2) + jx(3) = 1 j + 1 + 0 = 2-j


X(2) = = ( x 0 x 1 e j + x 2 e j 2 + x 3 e j 3 )
= x(0) - x(1) + x(2) - x(3)
=111+0 =-1
X(3)

2. N
W4

= = ( + x 2 e j 3 + )
= x(0) + jx(1) - x(2) - jx(3)
=1+j+1-0=2+j
=4
=

3
X(k) =

x(n) W4 kn
n=0
3

x(n)

kn
2

n=0
untuk :
3
k = 0 = x(0) = x(n)

j0

= x(0)

j0

+ x(1)

j0

+ x(2)

j0

+ x(3)

e j0

n=0
= x(0) + x(1) + x(2) + x(3)
=4+3+2+1
= 10
3
j

k = 1 = x(1) = x(n)
x(3)

n
2

= x(0)

j
e j0 + x(1) + e 2 + x(2)

e j +

3
2

n=0
= x(0) - jx(1) + x(2) + jx(3)
= 4 j3 2 + j
= 2- j2

3
k = 2 = x(2) = x(n)

j n

= x(0)

j0

+ x(1)

+ x(2)

j2

+ x(3)

j3

n=0
= x(0) - x(1) + x(2) - x(3)
=43+2-1
=2
3
k = 3 = x(3) = x(n)

3 n
2

= x(0)

j
e j0 + x(1) e

3
2

n=0
+ x(3)

9
2

= x(0) + j x(1) - x(2) - jx(3)


= 4 + j3 - 2 j
= 2 +j2
dengan menggnakan MATLAB function fft(), maka :
X = fft([1 1 -1 0])
X = 1.0000
2.0000 - 1.0000i -1.0000
2.0000 + 1.0000i
3. N = 4 dan W4-1 =

x n=

, maka:

k n
j
1
X k W4-nk = x n= 1 X k e 2

4
4

untuk n = 0
x 0=

1
1
X 0e j 0= X 0e j 0 X 1e j 0 X 2e j 0 X 3 e j 0

4
4

+ x(2)

e j 3

1
10 2J2 2 2J2 =4
4

untuk n = 1
j
1
x 1= X k e
4

k
2

j
j
1
= X 0 e j 0 X 1 e 2 X 2e j X 3e
4

1
X 0 jX 1 X 2 jX 3
4

1
10 j 2 j22 j 2 j2=3
4

3
2

untuk n = 2
x 2=

1
1
j k
j0
j
j 2
j 3
X k e = X 0e X 1e X 2 e X 3 e
4
4

1
X 0 X 1 X 2 X 3
4

1
10 2 j222 j2=2
4

untuk n = 3
j
1
x 3= X k e
4

=
=

k 3
2

j
1
= X 0 e j 0 X 1 e
4

3
2

X 2 e

j 3

X 3 e

33
2

1
X 0 jX 1 X 2 jX 3
4

1
10 j 2 j22 j 2 j2=1
4
j

4. Since N = 4 and W4 =

e 2
We have simplified formula :
n=0

x nW4

X(k) =

kn

n=0

x n

This , for k=0


n=0

X(0)

x n

e j0 = x(0) e j0 + x(1) e j0 + x(2) e j0 + x(3) e j0

= x(0) + x(1) + x(2) + x(3)


=4+3+2+1
= 10
for k=1

n=0

X(1)

x n

n
2

j0

= x(0) e

+ x(1) e

+x(2) e

+x(3) e

3
2

= x(0) - jx(1) - x(2) + jx(3)


= 4 - j3 - 2 + j
= 2 - 2j
for k=2
jn

n=0

X(2)

x n

j0
j
j2
j3
= x(0) e
+ x(1) e
+x(2) e
+x(3) e

= x(0) - x(1) + x(2) - x(3)


=4-3+2-1
=2
and for k=1
n=0

X(1)

= x n

3n
2

j0

= x(0) e

+ x(1) e

3
2

j3

+x(2) e

+x(3) e

9
2

= x(0) + jx(1) - x(2) - jx(3)


= 4 + j3 - 2 - j
= 2 + 2j
DFT Using Matlab :
>> X = fft ([4 3 2 1])
X=
10.0000

2.0000 - 2.0000i 2.0000

2.0000 + 2.0000i

DFT Using matlab with zero padding :


>> X = fft ([4 3 2 1 0 0])
X=
10.0000

3.5000-4.3301i 2.5000-0.8660i

5. Dari soal 4.4 didapatkan: x(0) = 10

X(1) = 3,5 4,3301j


X(2) = 2,5 0,8660j
X(3) = 2
X(4) = 2,5 + 0,8660j
X(5) = 3,5 + 4,3301j

2.0000

2.5000+0.8660i 3.5000+4.3301i

Ditanyakan x(0) dan x(4)


X(0) = 1 (x(0) + x(1) + x(2) + x(3) + x(4) + x(5)
6
= 1 ( 10 + 3,5 - 4,3301j + 2,5 0,8660j + 2 + 2,5 + 0,8660j + 3,5 + 4,3301j)
6
= 1 (10 + 3,5 + 2,5 + 2 + 2,5 + 3,5)
6
= 1 (24)
6
=4
X(4) =

1 5
xn
6 n=0

= 1 ( + + x 3 e2 j + + )
6
= 1 ( 10 (3,5 - 4,3301j) (2,5 0,8660j) + 2 (2,5 + 0,8660j) (3,5 +4,3301j))
6
= 1 (0)
6
=0

fs
20.000
=
= 2.5 Hz
N
8000
N
f = 10.000 Hz
2

6. a. f =
b. f max =
7. Jawab:

f =0.5 Hz
fs 2000
N=
=
=4000
f
0.5

Since we use the FFT to compute the spectrum, the number of the data points must be a power
of 2, that is,
15

N =2 =32768

And the resulting frequency resolution can be recalculated as


f=

8. Diketahui

fs 2000
=
=0.061 Hz
N 32768

N=4

fs = 100 Hz

W4 = e j 2

x(0) = -1; x(1)= 2; x(2) = 1; x(3) = 4


Ditanyakan

: amplitude spectrum, phase spectrum and power spectrum . . .?

Jawab

using matlab function we can get DFT X(k)


>> X=fft ([-1 2 1 4])
X=
6.0000

-2.0000 + 2.0000i -6.0000

-2.0000 - 2.0000i

we get X(0) = 6;
X(1)

= -2+2j = 2.828 <1350;

X(2)

= -6;

X(3)

= -2-2j = 2.828 <-1350

the amplitude spectrum, phase spectrum and power spectrum are computed as follows :
For k = 0, f = k . fs /N = 0 x 100/4 = 0 Hz
A0 =

1
|X(0)| =
4

0 = tan-1 ( |
P0 =

1
x 6 = 1.5 ;
4

ImagX 0
0
| ) = tan-1 ( |
| ) = 00
6
RealX 0

1
2
2 |X(0)| =
4

1
|6|2 = 2.25
16

For k = 1, f = k . fs /N = 1 x 100/4 = 25 Hz
A1 =

1
|X(1)| =
4

1 = tan-1 ( |
P1 =

1
x 2.828 = 0.707;
4
ImagX 0
2
| ) = tan-1 ( |
| ) = 1350
2
RealX 0

1
2
2 |X(1)| =
4

1
|2.828|2 = 0.5
16

For k = 2, f = k . fs /N = 2 x 100/4 = 50 Hz
A2 =

1
|X(2)| =
4

1
x (-6) = -1.5 ;
4

2 = tan-1 ( |

P2 =

ImagX 0
0
| ) = tan-1 ( |
| ) = 00
6
RealX 0

1
2
2 |X(2)| =
4

1
|-6|2 = 2.25
16

For k = 3, f = k . fs /N = 3 x 100/4 = 75 Hz
A3 =

1
|X(3)| =
4

3 = tan-1 ( |

P3 =

1
x 2.828 = 0.707 ;
4

ImagX 0
2
| ) = tan-1 ( |
| ) = -1350
2
RealX 0

1
|X(3)|2 =
42

1
|2.828|2 = 0.5
16

9. N = 8

Whm(0) = 0,54 - 0,46 cos (

81
2 x 0

Whm(1) = 0,54 0,46 cos (


Whm(2) = 0,54 0,46 cos (
Whm(3) = 0,54 0,46 cos (
Whm(4) = 0,54 0,46 cos (
Whm(5) = 0,54 0,46 cos (
Whm(6) = 0,54 0,46 cos (
Whm(7) = 0,54 0,46 cos (

81

2 x 1
81
2 x 2
81
2 x 3
81
2 x 4
81
2 x 5
81
2 x 6
81
2 x 7

) = 0.0800

) = 0,2532
) = 0,6424
) = 0,9544
) = 0,9544
) = 0,6424

= 0,2532

) = 0,0800

Jadi fungsi jendela hamming adalah :


W = [ 0,0800 0,2532 0,6424 0,9544 0,9544 0,6424 0,2532 0,0800 ]
a. N=8 dicari fungsi jendela hanning
81
Whn(0) = 0,5 0,5cos (
)=0
2 x 0

Whn(1) = 0,5 0,5cos (


Whn(2) = 0,5 0,5cos (
Whn(3) = 0,5 0,5cos (
Whn(4) = 0,5 0,5cos (
Whn(5) = 0,5 0,5cos (

81
2 x 1
81
2 x 2
81
2 x 3
81
2 x 4
81
2 x 5

) = 0,1883
) = 0,6113
) = 0,9505
) = 0,9505
) = 0,6113

Whn(6) = 0,5 0,5cos (


Whn(7) = 0,5 0,5cos (

81
2 x 6
81
2 x 7

= 0,1883

)=0

Jadi fungsi jendela hanning adalah :


W = [ 0 0,1883 0,6113 0,9505 0,9505 0,6113 0,1883 0 ]
10. 10. N = 6
a. triangular
wtri (n) = 1-

wtri (0) = 1-

2nN 1
N 1

2061

=0

61
2161
wtri (1) = 1= 0.4
61
wtri (2) = 1- 2261 = 0.8
61
wtri (3) = 1-

2361

= 0.8

61
24 61
wtri (4) = 1= 0.4
61
2561
wtri (5) = 1=0
61

windowed sequence :
Xw (0) = X (0) x Wtri (0) = 0 x 0 = 0
Xw (1) = X (1) x Wtri (1) = 1 x 0.4 = 0.4
Xw (2) = X (2) x Wtri (2) = 0 x 0.8 = 0
Xw (3) = X (3) x Wtri (3) = -1 x 0.8 = -0.8
Xw (4) = X (4) x Wtri (4) = 0 x 0.4 = 0
Xw (5) = X (5) x Wtri (5) = 1 x 0 = 0
b. Hamming
Whm (n) = 0.54 0.46 cos

2 n
N 1

Whm (0) = 0.54 0.46 cos

2 0
= 0.08
61

Whm (1) = 0.54 0.46 cos

2 1
= 0.4
61

Whm (2) = 0.54 0.46 cos

2 2
= 0.91
61

Whm (3) = 0.54 0.46 cos

2 3
= 0.91
61

Whm (4) = 0.54 0.46 cos

2 4
= 0.4
61

Whm (5) = 0.54 0.46 cos

2 5
= 0.08
61

windowed sequence :
Xw (0) = X (0) x Whm(0) = 0 x 0.08
Xw (1) = X (1) x Whm (1) = 1 x 0.4
Xw (2) = X (2) x Whm (2) = 0 x 0.91
Xw (3) = X (3) x Whm (3) = -1 x 0.91
Xw (4) = X (4) x Whm (4) = 0 x 0.4
Xw (5) = X (5) x Whm (5) = 1 x 0.08

=0
= 0.4
=0
= -0.91
=0
= 0.08

c. Hanning
whn (n) = 0.5- 0.5 cos
whn (0) = 0.5- 0.5 cos
whn (1) = 0.5- 0.5 cos
whn (2) = 0.5- 0.5 cos
whn (3) = 0.5- 0.5 cos
whn (4) = 0.5- 0.5 cos
whn (5) = 0.5- 0.5 cos

2 n
N 1
20
61
21
61
22
61
23
61
2 4
61
25
61

=0
= 0.35
= 0.9
= 0.9
= 0.35
=0

windowed sequence :
Xw (0) = X (0) x Whn(0) = 0 x 0
=0
Xw (1) = X (1) x Whn (1) = 1 x 0.35 = 0.35
Xw (2) = X (2) x Whn (2) = 0 x 0.9 = 0
Xw (3) = X (3) x Whn (3) = -1 x 0.9 = -0.91
Xw (4) = X (4) x Whn (4) = 0 x 0.35 = 0
Xw (5) = X (5) x Whn (5) = 1 x 0
=0
11. a. Triangular Window

N = 4, maka:

Wtri(0) = 1

2 x 041
=0
41

Wtri(1) = 1

2 x 141
= 0.6667
41

Similarly, wtri(2) = 0:6667, wtri(3) = 0. Next, the windowed sequence is computed as


xw(0) = x(0) x Wtri(0) = 4 x 0 = 0
xw(1) = x(1) x Wtri(1) = -1 x 0.6667 = -0.6667
xw(2) = x(2) x Wtri(2) = 2 x 0.6667 = 1.3334
xw(3) = x(3) x Wtri(3) = 1 x 0 = 0
Applying DFT Equation (4.8) to xw(n) for k = 0, 1, 2, 3, respectively,
X(K) = xw(0) W4kx0 + xw(1) W4kx1 + xw(2) W4kx2 + xw(3) W4kx3
We have the following results:
X(0) = 0.6667
X(1) = -1.3334 + j0.6667
X(2) = 2
X(3) = 1.3334 j0.6667
f=

1
1
=
=25Hz
NT 4 . 0.01

Applying Equations (4.19), (4.22), and (4.23) leads to


A0 =

1
0
= 00
|X(0)| = 0.1667, = tanh
4
0.6667

P0 =

1
|X(0)|2 = 0.02778
42

A1 =

1
0.6667
= 153.440
|X(1)| = 0.3727, = tanh
4
1.3334

P1 =

1
|X(1)|2 = 0.1389
42

A2=

1
0
|X(2)| = 0.5, = tanh = 00
4
2

P2 =

1
|X(2)|2 = 0.25
42

A3=

1
0.6667
= -26.560
|X(3)| = 0.3727, = tanh
4
1.3334

P3 =

1
|X(3)|2 = 0.1389
42

b. Hamming Windows

N = 4, maka:
Whm(0) = 0.54 0.46 cos

2x 0
=0.08
41

Whm(1) = 0.54 0.46 cos

2x 1
=0.77
41

Whm(2) = 0.54 0.46 cos

2x 2
=0.77
41

Whm(3) = 0.54 0.46 cos

2x 3
=0.08
41

the windowed sequence is computed as


xw(0) = x(0) x Whm(0) = 4 x 0.08 = 0.32
xw(1) = x(1) x Whm(1) = -1 x 0.77 = -0.77
xw(2) = x(2) x Whm(2) = 2 x 0.77 = 1.54
xw(3) = x(3) x Whm(3) = 1 x 0.08 = 0.08
Applying DFT Equation (4.8) to xw(n) for k = 0, 1, 2, 3, respectively,
X(K) = xw(0) W4kx0 + xw(1) W4kx1 + xw(2) W4kx2 + xw(3) W4kx3
We have the following results:
X(0) = 1.17
X(1) = -1.22 + j0.85
X(2) = 2.55
X(3) = -1.22 j0.85
f=

1
1
=
=25Hz
NT 4 . 0.01

Applying Equations (4.19), (4.22), and (4.23) we achieve


A0 =

0
1
= 00
|X(0)| = 0.2925, = tanh
4
1.17

P0 =

1
2
2 |X(0)| = 0.0856
4

A1 =

0.85
1
= 145.140
|X(1)| = 3717, = tanh
4
1.22

P1 =

1
|X(1)|2 = 0.1382
42

A2=

1
0
|X(2)| = 0.6375, = tanh = 00
4
2

P2 =

1
2
2 |X(2)| = 0.4064
4

A3=

0.85
1
= 214.860
|X(3)| = 0.3717, = tanh
4
1.22

P3 =

1
2
2 |X(3)| = 0.1382
4

c. Hanning Windows
N = 4, maka:
Whn(0) = 0.5 0.5 cos

2x 0
=0
41

Whn(1) = 0.5 0.5 cos

2x 1
=0.75
41

Whn(2) = 0.5 0.5 cos

2x 2
=0.75
41

Whn(3) = 0.5 0.5 cos

2x 3
=0
41

the windowed sequence is computed as


xw(0) = x(0) x Whn(0) = 4 x 0 = 0
xw(1) = x(1) x Whn(1) = -1 x 0.75 = -0.75
xw(2) = x(2) x Whn(2) = 2 x 0.75 = 1.5
xw(3) = x(3) x Whn(3) = 1 x 0 = 0
Applying DFT Equation (4.8) to xw(n) for k = 0, 1, 2, 3, respectively,
X(K) = xw(0) W4kx0 + xw(1) W4kx1 + xw(2) W4kx2 + xw(3) W4kx3
We have the following results:
X(0) = 0.75
X(1) = -1.5 + j0.75
X(2) = 2.25
X(3) = -1.5 j0.75
f=

1
1
=
=25Hz
NT 4 . 0.01

Applying Equations (4.19), (4.22), and (4.23) we achieve


A0 =

1
0
= 00
|X(0)| = 0.1875, = tanh
4
0.75

P0 =

1
|X(0)|2 = 0.352
42

A1 =

0.75
1
= 153.440
|X(1)| = 0.4193, = tanh
4
1.5

P1 =

1
2
2 |X(1)| = 0.1758
4

A2=

1
0
= 00
|X(2)| = 0.5625, = tanh
4
2.25

P2 =

1
|X(2)|2 = 0.3164
42

A3=

0.75
1
= 206.560
|X(3)| = 0.4193, = tanh
4
1.5
P3 =

1
|X(3)|2 = 0.1758
42

12. a.

Pada grafik di atas menunjukkan adanya kebocoran spectral karena


amplitudonya tidak kontinyu pada domain waktu
b.

Comparison of a spectrum without using a window function and a spectrum


using a hamming window of size of 73 sample
Pada grafik di atas menunjukkan adanya kebocoran spectral karena amplitudonya tidak kontinyu
pada domain waktu

Anda mungkin juga menyukai