Академический Документы
Профессиональный Документы
Культура Документы
EXPERIMENT 1:
THE FOURIER TRANSFORM
2010
PRELAB 1.1
1.
2.
-As she use the linspace command in
generating time
Sequence same plot is obtained.
- The value of the last element for the
time sequence is 7.0711V
PRELAB 1.2
1.) number of data points(DS) = time period / sampling time.
Using command:
plot ( abs ( fftshift ( Y ) ) )
Using commands:
>> L = length ( Y ) ;
>> x = 100 * ( ( 0 : L-1 ) / L - .5 ) ;
>> plot ( x, fftshift ( abs ( Y ) ) )
Using commands
plot ( f, 20 * log10 ( abs ( Y ( 1 : L/2 ) ) ) )
Figures:
figure1_2(2_1)
figure1_2(2_12)
figure1_2(2_3)
figure1_2(2_4)
figure1_2(2_5)
figure1_2(2_6)
figure1_2(2_7)
FIGURES
figure1_3(1_1)
figure1_3(1_2)
figure1_3(2_1)
figure1_3(1_3)
figure1_3(3_1)
figure1_3(3_2)
figure1_3(3_3)
figure1_3(3_4)
figure1_3(3_5)
Pre-Lab 1.4
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 100) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) + 0.2 * randn (1, length (t)) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave with AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 100) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) + 0.2 * randn (1, length (t)) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave with AWGN')
Y = fft (yt, 512);
plot (Y)
plot (abs (Y))
axis ([ 0 20 0 1300 ])
plot (abs ( fftshift (Y)))
L = length (Y);
x = 100 * ((0:L-1)/L-.5);
plot (x, fftshift (abs(Y)))
f = 100 * ((0 : L/2-1)/L);
Y = fft (yt,512);
plot (f, abs (Y (1:L/2)))
plot (f, 20 * log10(abs(Y(1:L/2))))
Pre-Lab 1.4 2
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 100) ;
fo = 1000;
duty = 20;
yt = 5 * square ( 2 * pi * fo * t , duty)+ 0.2 * randn (1, length (t))
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave with AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 100) ;
fo = 1000;
duty = 20;
yt = 5 * square ( 2 * pi * fo * t, duty ) + 0.2 * randn (1, length (t)) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave with AWGN')
Y = fft (yt, 512);
plot (Y)
plot (abs (Y))
axis ([ 0 20 0 1300 ])
plot (abs ( fftshift (Y)))
L = length (Y);
x = 100 * ((0:L-1)/L-.5);
plot (x, fftshift (abs(Y)))
f = 100 * ((0 : L/2-1)/L);
Y = fft (yt,512);
plot (f, abs (Y (1:L/2)))
plot (f, 20 * log10(abs(Y(1:L/2))))
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 100) ;
fo = 1000;
duty = 35;
yt = 5 * square ( 2 * pi * fo * t , duty)+ 0.2 * randn (1, length (t))
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave with AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 100) ;
fo = 1000;
duty = 35;
yt = 5 * square ( 2 * pi * fo * t, duty ) + 0.2 * randn (1, length (t)) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave with AWGN')
Y = fft (yt, 512);
plot (Y)
plot (abs (Y))
axis ([ 0 20 0 1300 ])
plot (abs ( fftshift (Y)))
L = length (Y);
x = 100 * ((0:L-1)/L-.5);
plot (x, fftshift (abs(Y)))
f = 100 * ((0 : L/2-1)/L);
Y = fft (yt,512);
plot (f, abs (Y (1:L/2)))
plot (f, 20 * log10(abs(Y(1:L/2))))
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 100) ;
fo = 1000;
duty = 75;
yt = 5 * square ( 2 * pi * fo * t , duty)+ 0.2 * randn (1, length (t))
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave with AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 100) ;
fo = 1000;
duty = 75;
yt = 5 * square ( 2 * pi * fo * t, duty ) + 0.2 * randn (1, length (t)) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave with AWGN')
Y = fft (yt, 512);
plot (Y)
plot (abs (Y))
axis ([ 0 20 0 1300 ])
plot (abs ( fftshift (Y)))
L = length (Y);
x = 100 * ((0:L-1)/L-.5);
plot (x, fftshift (abs(Y)))
f = 100 * ((0 : L/2-1)/L);
Y = fft (yt,512);
plot (f, abs (Y (1:L/2)))
plot (f, 20 * log10(abs(Y(1:L/2))))
Pre-Lab 1.4 3
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 512) ;
fo = 1000;
duty = 75;
yt = 5 * square ( 2 * pi * fo * t, duty ) + 0.2 * randn (1, length (t)) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave with AWGN')
Y = fft (yt, 512);
plot (Y)
plot (abs (Y))
axis ([ 0 20 0 1300 ])
plot (abs ( fftshift (Y)))
L = length (Y);
x = 100 * ((0:L-1)/L-.5);
plot (x, fftshift (abs(Y)))
f = 100 * ((0 : L/2-1)/L);
Y = fft (yt,512);
plot (f, abs (Y (1:L/2)))
Pre-Lab 1.4 4
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 64) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 64) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
Y = fft (yt, 512);
plot (Y)
plot (abs (Y))
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 32) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 32) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
Y = fft (yt, 512);
plot (Y)
plot (abs (Y))
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 16) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 16) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
Y = fft (yt, 512);
plot (Y)
plot (abs (Y))
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 8) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 8) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
Y = fft (yt, 512);
plot (Y)
plot (abs (Y))
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 64) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
Y = fft (yt);
xi = ifft (Y);
stem (t, real (xi))
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 32) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
Y = fft (yt);
xi = ifft (Y);
stem (t, real (xi))
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 16) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
Y = fft (yt);
xi = ifft (Y);
stem (t, real (xi))
ts = 0.0000001;
fs = 1 / ts;
t = linspace (0, 0.002, 8) ;
fo = 1000;
yt = 5 * square ( 2 * pi * fo * t ) ;
plot (t, yt)
axis ([0 0.002 -6 6])
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Square Wave without AWGN')
Y = fft (yt);
xi = ifft (Y);
stem (t, real (xi))
Pre-Lab 1.4 5
ts = 0.0000001;
fs = 1 / ts;
t = (0:0.000015625:0.002);%64-points for the first sequence
fo = 1000;
yt = 5 * sin ( 2 * pi * fo * t ) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Sine Wave without AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = (0:0.00003125:0.002);%32-points for the first sequence
fo = 1000;
yt = 5 * sin ( 2 * pi * fo * t ) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Sine Wave without AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = (0:0.0000625:0.002);%16-points for the first sequence
fo = 1000;
yt = 5 * sin ( 2 * pi * fo * t ) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Sine Wave without AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = (0:0.000125:0.002);%8-points for the first sequence
fo = 1000;
yt = 5 * sin ( 2 * pi * fo * t ) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Sine Wave without AWGN')
ts = 0.0000001;
fs = 1 / ts;
t = (0:0.00025:0.002);%4-points for the first sequence
fo = 1000;
yt = 5 * sin ( 2 * pi * fo * t ) ;
plot (t, yt)
xlabel ('time [sec]')
ylabel ('amplitude [volt]')
title ('1000 Hz Sine Wave without AWGN')