Tugas Pengolahan Sinyal Digital 2011 2012 06
-
Upload
syamsul-maarief -
Category
Documents
-
view
248 -
download
0
Transcript of Tugas Pengolahan Sinyal Digital 2011 2012 06
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
1/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
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
2/17
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
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
3/17
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) = 1compute the windowed sequence xw(n) using thea. triangular window function.b. Hamming window function.c. Hanning window function.
11.
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
4/17
12.
Jawab:
1. X(0) =n=0
3
x n = ( x(0) + x(1) + x(2) + x(3) ) = (1+1-1+0) = 1
X(1)= n=0
3
x n =1
4
( + x 2 e j + )
= 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 j2 + x 3 ej3 )
= x(0) - x(1) + x(2) -x(3)= 1 1 1 + 0 = - 1
X(3) = = ( + x 2 e j3 + )
= x(0) + jx(1) - x(2) - jx(3)
= 1 + j + 1 - 0 = 2 + j
2. N = 4
W4 = ej
2
3X(k) = x(n) W4kn
n=03
= x(n) ej
k n2
n=0
untuk :3
k = 0 = x(0) = x(n) e j0 = x(0) e
j0 + x(1) e j0 + x(2) e
j0 + x(3)
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
5/17
ej0
n=0
= x(0) + x(1) + x(2) + x(3)= 4 + 3 + 2 + 1= 10
3
k = 1 = x(1) = x(n) ej
n2 = x(0) e
j0 + x(1) + ej
2 + x(2) e
j +
x(3) ej
32
n=0= x(0) - jx(1) + x(2) + jx(3)= 4 j3 2 + j= 2- j2
3k = 2 = x(2) = x(n) e
j n = x(0) e j0 + x(1) e
j + x(2) e j2 + x(3)
ej 3
n=0= x(0) - x(1) + x(2) - x(3)= 4 3 + 2 - 1= 2
3
k = 3 = x(3) = x(n) ej
3n2 = x(0) e
j0 + x(1) ej
32 + x(2) e
j 3
n=0
+ x(3) ej
92
= 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 = ej 2 , maka:
x n=1
4Xk W4-nk = x n=1
4Xke
jk n
2
untuk n = 0
x 0=1
4X0ej 0=
1
4X0e
j 0X1e
j 0X2e
j 0X3e
j 0
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
6/17
=1
4102J2 22J2 =4
untuk n = 1
x 1=1
4 X ke
jk2 =
1
4X0e
j 0X1e
j2X2e
jX3e
j32
=1
4X0jX1X2jX3
=1
410j 2j22j 2j2=3
untuk n = 2
x 2=1
4Xkej k=
1
4X0e
j0X1e
jX2e
j 2X3e
j3
=1
4X0X1X2X3
=1
4102j222j2=2
untuk n = 3
x 3=1
4 Xke
jk3
2 =1
4X0e
j 0X1e
j32 X2e
j 3X3e
j33
2
=1
4X0jX1X2jX3
=
1
4 10j 2j22j 2j2=1
4. Since N = 4 and W4 = ej
2
We have simplified formula :
X(k) = 3
n=0
x nW4kn
= 3
n=0
x n ej
2
This , for k=0
X(0) = 3
n=0
x n ej0 = x(0) ej0 + x(1) ej0 + x(2) ej0 + x(3) ej0
= x(0) + x(1) + x(2) + x(3)
= 4 + 3 + 2 + 1
= 10
for k=1
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
7/17
X(1) = 3
n=0
x n ej
n2
= x(0) ej0
+ x(1) ej
2
+x(2) ej
+x(3) ej
32
= x(0) - jx(1) - x(2) + jx(3)
= 4 - j3 - 2 + j
= 2 - 2jfor k=2
X(2) = 3
n=0
x ne jn
= x(0) e j0
+ x(1) e j
+x(2) e j2
+x(3) e j3
= x(0) - x(1) + x(2) - x(3)
= 4 - 3 + 2 - 1
= 2
and for k=1
X(1) = 3
n=0
x n ej
3n2
= x(0) ej0
+ x(1) ej
32
+x(2) ej3
+x(3) ej
92
= 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 2.0000 2.5000+0.8660i 3.5000+4.3301i
5. Dari soal 4.4 didapatkan: x(0) = 10
X(1) = 3,5 4,3301j
X(2) = 2,5 0,8660jX(3) = 2
X(4) = 2,5 + 0,8660j
X(5) = 3,5 + 4,3301j
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
8/17
Ditanyakan x(0) dan x(4)
X(0) = 1
6
(x(0) + x(1) + x(2) + x(3) + x(4) + x(5)
=1
6 ( 10 + 3,5 - 4,3301j + 2,5 0,8660j + 2 + 2,5 + 0,8660j + 3,5 + 4,3301j)
= 1
6
(10 + 3,5 + 2,5 + 2 + 2,5 + 3,5)
= 1
6
(24)
= 4
X(4) = 1
6n=0
5
x n
= 1
6
( + + x 3 e2 j + + )
= 1
6
( 10 (3,5 - 4,3301j) (2,5 0,8660j) + 2 (2,5 + 0,8660j) (3,5 +4,3301j))
= 1
6
(0)
= 0
6. a. f =fs
N
=20.000
8000
= 2.5 Hz
b. f max =N
2f = 10.000 Hz
7. Jawab: f=0.5Hz
N=fs
f=
2000
0.5=4000
Since we use the FFT to compute the spectrum, the number of the data points must be a power
of 2, that is,
N=215=32768
And the resulting frequency resolution can be recalculated as
f=fs
N=
2000
32768=0.061Hz
8. Diketahui : N = 4
fs = 100 Hz
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
9/17
W4 = ej
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
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
10/17
2 = tan-1 ( |ImagX0
RealX0| ) = tan-1 ( |
0
6| ) = 00
P2 =1
42 |X(2)|
2 =1
16|-6|2 = 2.25
For k = 3, f = k . fs /N = 3 x 100/4 = 75 Hz
A3 =1
4|X(3)| =
1
4x 2.828 = 0.707 ;
3 = tan-1 ( |ImagX0
RealX0| ) = tan-1 ( |
2
2| ) = -1350
P3 =1
42 |X(3)|
2 =1
16|2.828|2 = 0.5
9. N = 8
Whm(0)= 0,54 - 0,46 cos (81
2 x
0
) = 0.0800
Whm(1) = 0,54 0,46 cos (81
2 x 1
) = 0,2532
Whm(2) = 0,54 0,46 cos (81
2 x 2
) = 0,6424
Whm(3) = 0,54 0,46 cos (81
2 x 3
) = 0,9544
Whm(4) = 0,54 0,46 cos (81
2 x 4
) = 0,9544
Whm(5) = 0,54 0,46 cos (81
2 x 5
) = 0,6424
Whm(6) = 0,54 0,46 cos (81
2 x 6 ) = 0,2532
Whm(7) = 0,54 0,46 cos (81
2 x 7
) = 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
Whn(0) = 0,5 0,5cos (81
2 x 0
) = 0
Whn(1) = 0,5 0,5cos (81
2 x 1
) = 0,1883
Whn(2) = 0,5 0,5cos (81
2 x 2
) = 0,6113
Whn(3) = 0,5 0,5cos (81
2 x 3
) = 0,9505
Whn(4) = 0,5 0,5cos (81
2 x 4
) = 0,9505
Whn(5) = 0,5 0,5cos (81
2 x 5
) = 0,6113
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
11/17
Whn(6) = 0,5 0,5cos (81
2 x 6
) = 0,1883
Whn(7) = 0,5 0,5cos (81
2 x 7
) = 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-2nN1
N1
wtri (0) = 1-2061
61= 0
wtri (1) = 1-
2161
61 = 0.4
wtri (2) = 1- 2261
61= 0.8
wtri (3) = 1-2361
61= 0.8
wtri (4) = 1-24 61
61= 0.4
wtri (5) = 1-2561
61= 0
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 cos2 n
N1
Whm (0) = 0.54 0.46 cos20
61= 0.08
Whm (1) = 0.54 0.46 cos21
61= 0.4
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
12/17
Whm (2) = 0.54 0.46 cos22
61= 0.91
Whm (3) = 0.54 0.46 cos23
61= 0.91
Whm (4) = 0.54 0.46 cos24
61 = 0.4
Whm (5) = 0.54 0.46 cos25
61= 0.08
windowed sequence :
Xw (0) = X (0) x Whm(0) = 0 x 0.08 = 0
Xw (1) = X (1) x Whm (1) = 1 x 0.4 = 0.4
Xw (2) = X (2) x Whm (2) = 0 x 0.91 = 0
Xw (3) = X (3) x Whm (3) = -1 x 0.91 = -0.91
Xw (4) = X (4) x Whm (4) = 0 x 0.4 = 0
Xw (5) = X (5) x Whm (5) = 1 x 0.08 = 0.08
c. Hanning
whn (n) = 0.5- 0.5 cos2 n
N1
whn (0) = 0.5- 0.5 cos20
61= 0
whn (1) = 0.5- 0.5 cos21
61= 0.35
whn (2) = 0.5- 0.5 cos22
61
= 0.9
whn (3) = 0.5- 0.5 cos23
61= 0.9
whn (4) = 0.5- 0.5 cos2 4
61= 0.35
whn (5) = 0.5- 0.5 cos25
61= 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.35Xw (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:
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
13/17
Wtri(0) = 12x 041
41= 0
Wtri(1) = 12x 141
41= 0.6667
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) W4
kx1 + xw(2) W4kx2 + xw(3) W4
kx3
We have the following results:
X(0) = 0.6667X(1) = -1.3334 + j0.6667
X(2) = 2
X(3) = 1.3334 j0.6667
f=1
NT=
1
4 .0.01=25Hz
Applying Equations (4.19), (4.22), and (4.23) leads to
A0 =1
4|X(0)| = 0.1667, = tanh
0
0.6667 = 00
P0 =1
42 |X(0)|
2 = 0.02778
A1 =1
4|X(1)| = 0.3727, = tanh
0.6667
1.3334 = 153.440
P1 =1
42 |X(1)|
2 = 0.1389
A2=1
4|X(2)| = 0.5, = tanh
0
2 = 00
P2 =1
42 |X(2)|
2 = 0.25
A3=1
4|X(3)| = 0.3727, = tanh
0.6667
1.3334 = -26.560
P3 =1
42 |X(3)|
2 = 0.1389
b. Hamming Windows
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
14/17
N = 4, maka:
Whm(0) = 0.54 0.46 cos2x 0
41=0.08
Whm(1) = 0.54 0.46 cos2x 1
41=0.77
Whm(2) = 0.54 0.46 cos2x 241
=0.77
Whm(3) = 0.54 0.46 cos2x 3
41=0.08
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) W4
kx1 + xw(2) W4kx2 + xw(3) W4
kx3
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
NT=
1
4 .0.01=25Hz
Applying Equations (4.19), (4.22), and (4.23) we achieve
A0 =1
4|X(0)| = 0.2925, = tanh
0
1.17 = 00
P0 =1
42 |X(0)|
2 = 0.0856
A1 =
1
4 |X(1)| = 3717, = tanh
0.85
1.22 = 145.140
P1 =1
42 |X(1)|
2 = 0.1382
A2=1
4|X(2)| = 0.6375, = tanh
0
2 = 00
P2 =1
42 |X(2)|
2 = 0.4064
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
15/17
A3=1
4|X(3)| = 0.3717, = tanh
0.85
1.22 = 214.860
P3 =1
42 |X(3)|
2 = 0.1382
c. Hanning Windows
N = 4, maka:
Whn(0) = 0.5 0.5 cos2x 0
41=0
Whn(1) = 0.5 0.5 cos2x 1
41=0.75
Whn(2) = 0.5 0.5 cos2x 2
41=0.75
Whn(3) = 0.5 0.5 cos 2x 341
=0
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
NT=
1
4 . 0.01=25Hz
Applying Equations (4.19), (4.22), and (4.23) we achieve
A0 =1
4|X(0)| = 0.1875, = tanh
0
0.75 = 00
P0 =1
42 |X(0)|
2 = 0.352
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
16/17
A1 =1
4|X(1)| = 0.4193, = tanh
0.75
1.5 = 153.440
P1 =1
42 |X(1)|
2 = 0.1758
A2=1
4
|X(2)| = 0.5625, = tanh 0
2.25
= 00
P2 =1
42 |X(2)|
2 = 0.3164
A3=1
4|X(3)| = 0.4193, = tanh
0.75
1.5 = 206.560
P3 =1
42 |X(3)|2 = 0.1758
12. a.
Pada grafik di atas menunjukkan adanya kebocoran spectral karena
amplitudonya tidak kontinyu pada domain waktu
b.
-
8/2/2019 Tugas Pengolahan Sinyal Digital 2011 2012 06
17/17
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