0% found this document useful (0 votes)
57 views

Practicum Report: Digital Telecommunication

This practicum report discusses Fourier transforms of both continuous and discrete signals. The document contains: 1) An introduction to the objectives of understanding Fourier transforms of analog signals and discrete signals. 2) A description of the basic theory of how Fast Fourier Transforms (FFT) work by converting signals to the frequency domain and back. 3) Procedures for applying FFT to continuous sinusoidal signals to view their frequency spectra, and applying Fourier transforms to discrete signals using different sample sizes. 4) Results from applying the FFT and Fourier transform procedures in Matlab, including plots of signals in both the time and frequency domains.

Uploaded by

hillyatul aulia
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Practicum Report: Digital Telecommunication

This practicum report discusses Fourier transforms of both continuous and discrete signals. The document contains: 1) An introduction to the objectives of understanding Fourier transforms of analog signals and discrete signals. 2) A description of the basic theory of how Fast Fourier Transforms (FFT) work by converting signals to the frequency domain and back. 3) Procedures for applying FFT to continuous sinusoidal signals to view their frequency spectra, and applying Fourier transforms to discrete signals using different sample sizes. 4) Results from applying the FFT and Fourier transform procedures in Matlab, including plots of signals in both the time and frequency domains.

Uploaded by

hillyatul aulia
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

PRACTICUM REPORT

DIGITAL TELECOMMUNICATION

Group 7 JTD 3B Class


Member of the Group:
NO NAME NIM
1 Diva Sabilillah A. 1841160063
2 Donna Dwie Hayyu P. 1841160037
3 Hillyatul Aulia 1841160062

STUDY PROGRAM DIGITAL TELECOMMUNICATION


NETWORK
DEPARTMENT OF ELECTRICAL ENGINEERING
STATE POLYTHECNIC OF MALANG
2021
TABLE OF CONTENT

TABLE OF CONTENT............................................................................................i
LIST OF FIGURES.................................................................................................ii
CHAPTER 6 FOURIER TRANSFORM.................................................................3
6.1 Objectives..................................................................................................3
6.2 Experiment Apparatus...............................................................................3
6.3 Basic Theory..............................................................................................3
6.3.1 Fast Fourier Transform (FFT) Works................................................3
6.3.2 FFT Implementations.........................................................................4
6.4 Procedures.................................................................................................5
6.4.1 Basic FFT on Continuous Signal.......................................................5
6.4.2 Display Signal Spectrum with Noise.................................................6
6.4.3 Fourier Transform on Discrete Signal...............................................6
6.5 Script, Result, and Problem Discussion....................................................7
6.5.1 Basic FFT on Continuous Signal.......................................................7
6.5.2 Display Signal Spectrum with Noise...............................................13
6.5.3 Fourier Transform on Discrete Signal.............................................16
6.6 Conclusion...............................................................................................25
6.7 Reference.................................................................................................25

i
LIST OF FIGURES

Figure 6.1 The Sum of Three Sinusoid Signals with the Same Amplitude.........................8
Figure 6.2 The Sum of Three Sinusoid Signals with Different Amplitudes and
Frequencies........................................................................................................................9
Figure 6.3 The Sum of Three Sinusoid Signals with the Same Frequency.......................10
Figure 6.4 The Sum of Three Square Signals with the Same Amplitude..........................11
Figure 6.5 The Sum of Three Sinusoid Signals with Different Amplitudes and
Frequencies......................................................................................................................12
Figure 6.6 The Sum of Three Sinusoid Signals with the Same Frequency.......................12
Figure 6.7 Signal with a Gaussian Noise of 2.5................................................................14
Figure 6.8 Signal with a Gaussian Noise of 1.5................................................................15
Figure 6.9 Signal with a Gaussian Noise of 3.5................................................................15
Figure 6.10 The Optimal Sampling..................................................................................16
Figure 6.11 Fourier Transform Discrete Signal Step Units for Samples of 64.................17
Figure 6.12 Fourier Transform Discrete Signal Step Units for Samples of 4...................18
Figure 6.13 Fourier Transform Discrete Signal Step Units for Samples of 8...................18
Figure 6.14 Fourier Transform Discrete Signal Step Units for Samples of 128...............19
Figure 6.15 Fourier Transform Discrete Signal Step Units for Samples of 1024.............20
Figure 6.16 The Optimal Sampling..................................................................................20
Figure 6.17 Fourier Transform Discrete Signal Ramp for Samples of 64........................21
Figure 6.18 Fourier Transform Discrete Signal Ramp for Samples of 4..........................22
Figure 6.19 Fourier Transform Discrete Signal Ramp for Samples of 8..........................23
Figure 6.20 Fourier Transform Discrete Signal Ramp Units for Samples of 128.............23
Figure 6.21 Fourier Transform Discrete Signal Ramp for Samples of 1024....................24

ii
CHAPTER 6
FOURIER TRANSFORM

6.1 Objectives
1. To understand the Fourier transformation process in analog signals and
discrete signals

6.2 Experiment Apparatus


1. Laptop / PC
2. Matlab Software

6.3 Basic Theory


6.3.1 Working Principle of Fast Fourier Transform (FFT)
FFT uses the principle that multiplication in the frequency domain
corresponds to convolution in the time domain. The input signal is
transformed into the frequency domain using the DFT, multiplied by the
frequency response of the filter, and then transformed back into the time
domain using the inverse DFT. This basic technique was known since the
days of Fourier; however, no one really cared. This is because the time
required to calculate the DFT was longer than the time to directly calculate
the convolution. This changed in 1965 with the development of the fast
Fourier transform (FFT). By using the FFT algorithm to calculate the DFT,
convolution via the frequency domain can be faster than directly
convolving the time domain signals. The final result is the same; only the
number of calculations has been changed by a more efficient algorithm.
For this reason, FFT convolution is also called high-speed convolution.

FFT uses the overlap-add method shown in only the way that the input
segments are converted into the output segments is changed. Figure 18-2
shows an example of how an input segment is converted into an output
segment by FFT convolution. To start, the frequency response of the filter
is found by taking the DFT of the filter kernel, using the FFT. For

3
instance, (a) shows an example filter kernel, a windowed-sinc band-pass
filter. The FFT converts this into the real and imaginary parts of the
frequency response, shown in (b) & (c). These frequency domain signals
may not look like a band-pass filter because they are in rectangular form.
Remember, polar form is usually best for humans to understand the
frequency domain, while rectangular form is normally best for
mathematical calculations. These real and imaginary parts are stored in the
computer for use when each segment is being calculated.

6.3.2 FFT Implementations


The FFT is used in digital recording, sampling, additive synthesis and
pitch correction software.

The FFT's importance derives from the fact that it has made working in the
frequency domain equally computationally feasible as working in the
temporal or spatial domain. Some of the important applications of the FFT
include:
 Fast large-integer and polynomial multiplication,
 Efficient matrix–vector multiplication for Toeplitz, circulant and
other structured matrices,
 Filtering algorithms (see overlap–add and overlap–save methods),
 Fast algorithms for discrete cosine or sine transforms (e.g. fast
DCT used for JPEG and MPEG/MP3 encoding and decoding),
 Fast Chebyshev approximation,
 Solving difference equations,
 Computation of isotopic distributions.
 Modulation and demodulation of complex data symbols using
orthogonal frequency division multiplexing (OFDM) for 5G, LTE,
Wi-Fi, DSL, and other modern communication systems.

4
6.4 Procedures
6.4.1 Basic FFT on Continuous Signal
1. Write the script below on Matlab.
clc
clear all

T = 1; %Signal period
f1 = 6; %First signal frequency
f2 = 7; %Second signal frequency
f3 = 12; %Third signal frequency
fs = 15*f3; %sampling frequency = 15 times the largest
frequency
t = 0:1/fs:T-1/fs;
x = sin(2*pi*f1*t) + sin(2*pi*f2*t) + sin(2*pi*f3*t);

%signal on time domain


subplot(3,1,1)
plot(t,x)
grid on
title ('Addition of 3 Sinusoid Signals on Time
Domain')
xlabel('time (s)')
ylabel('Amplitude')

%FFT process
y=fft(x);%frequency domain signal
f=(0:length(y)-1)*fs/length(y);
subplot(3,1,2)
plot(f,abs(y))
grid on
title ('Addition of 3 Sinusoid Signals on Frequency
Domain')
xlabel('Frequency (Hz)')
ylabel('Magnitude')

%zero centered
n=length(x);
fshift = (-n/2:n/2-1)*(fs/n); %shift the x-axis
spectrum
yshift = fftshift(y); %shift the y-axis spectrum
subplot(3,1,3)
plot(fshift,abs(yshift))
grid on
title ('Addition of 3 Sinusoid Signals on Frequency
Domain-Zero Centered')
xlabel('Frequency (Hz)')
ylabel('Magnitude')
2. Change the values of f1, f2, and f3 into the absent numbers of each
group member. With the biggest absences equal to f3.
3. Run script number 1 and observe what happens.

5
4. Change the amplitude of each signal to the absent number of the
group members. Run the program and observe the results.
5. With the amplitude value in step 4, equalize the frequency of each
signal component to the largest absent number in the group. Run
the program and observe the results.
6. Convert sinusoidal signal to square signal. Repeat steps 2 through
5. Observe the difference in the Fourier transform results for the
sinusoid and square signal.

6.4.2 Display Signal Spectrum with Noise


1. Use the script in step 1 of procedure 6.4.1 to generate a signal x
without adding noise.
2. Give gaussian noise to signal x by adding the following line
xnoise = x + 2.5*gallery('normaldata',size(t),4);
2.5 * gallery ('normal data', size (t), 4) is additional noise with an
amplitude of 2.5, following a normal distribution, with the same
dimensions as the variable dimension t. Number 4 is random that
can be selected by the user for variations in noise values, with a
range of [0.232 −1]
3. To display the signal spectrum with noise, add the following script:
ynoise = fft (xnoise);
ynoiseshift = fftshift(ynoise);
4. Draw the original x signal, the x signal with the added noise, and
the frequency spectrum of both in the same window. Observe the
results.
5. Modify the noise amplitude in step 2 with a smaller and larger
value. Observe the results. Compare the modified frequency
spectrum. observe the effect of the noise amplitude on the resulting
spectrum.

6.4.3 Fourier Transform on Discrete Signal


1. Generate a step unit discrete signal as in Module 2.
2. Perform Fourier discrete transformations on these discrete signals
by adding commands

6
a = fft(step_sig);
Where a is the signal resulting from the Fourier transformation,
while step_sig is the step unit signal generated in step 1.
3. do dft by determining the DFT point, by:
b = fft(step_sig,32);
That is, signal b is a signal from the Fourier transformation of the
step signal with a sample size of 32. In Fourier transformations, the
number of samples that can be used is 2n, where n is an integer
starting from 0.
4. Find the optimal sample value with
n = pow2(nextpow2(length(step_sig)))
5. Change the sample value to n in steps 4, 8, 128, and 1024.
6. Observe the results.
7. Return the signal from the Fourier transform above to the original
signal using the ifft command.
8. Change the discrete signal into a ramp unit, repeat steps 2-7.

6.5 Script, Result, and Problem Discussion


6.5.1 Basic FFT on Continuous Signal
clc
clear all

T = 1; %Signal period
f1 = 6; %First signal frequency
f2 = 7; %Second signal frequency
f3 = 12; %Third signal frequency
fs = 15*f3; %sampling frequency = 15 times the largest
frequency
t = 0:1/fs:T-1/fs;
x = sin(2*pi*f1*t) + sin(2*pi*f2*t) + sin(2*pi*f3*t);

%signal on time domain


subplot(3,1,1)
plot(t,x)
grid on
title ('Addition of 3 Sinusoid Signals on Time Domain')
xlabel('time (s)')
ylabel('Amplitude')

%FFT process
y=fft(x);%frequency domain signal
f=(0:length(y)-1)*fs/length(y);
subplot(3,1,2)
plot(f,abs(y))

7
grid on
title ('Addition of 3 Sinusoid Signals on Frequency Domain')
xlabel('Frequency (Hz)')
ylabel('Magnitude')

%zero centered
n=length(x);
fshift = (-n/2:n/2-1)*(fs/n); %shift the x-axis spectrum
yshift = fftshift(y); %shift the y-axis spectrum
subplot(3,1,3)
plot(fshift,abs(yshift))
grid on
title ('Addition of 3 Sinusoid Signals on Frequency Domain-
Zero Centered')
xlabel('Frequency (Hz)')
ylabel('Magnitude')

Figure 6.1 The Sum of Three Sinusoid Signals with the Same Amplitude

In Figure 6.1 there are 3 image plots showing the sum of three signals with
different frequencies. The first plot of the image shows the addition of
three sinusoidal signals in the time domain. The x-axis represents time and
y represents the amplitude. Then on the second plot figure shows the
addition of three sinusoidal signals in the frequency domain. In FFT, the
time domain changes to the frequency domain where the x-axis represents
the frequency and the y-axis represents the magnitude. The frequency
domain displays the frequency component of the signal, so that if three
different signals are inputted, there will be 3 frequencies with high
magnitude. In the second picture, it shows two groups of left and right
signals starting from 0. Whereas in the third image plot, shifting is carried
out where the signal is shifted so that it has a positive and negative
frequency with a center frequency of 0. The right frequency shows

8
positive frequencies of 6, 7, and 12 corresponds to the input frequency and
the left shows the negative frequencies -6, -7, and -12.

x = f1*sin(2*pi*f1*t) + f2*sin(2*pi*f2*t) +
f3*sin(2*pi*f3*t);

Figure 6.2 The Sum of Three Sinusoid Signals with Different Amplitudes and
Frequencies

Figure 6.2 is an image resulting from the sum of three signals with
different frequencies and amplitudes. The first plot image shows the sum
of the three sinusoidal signals in the time domain. Then, with FFT, the
time domain changes to the frequency domains shown in the second plot
of the image are made. In the second plot, you can see 3 different
frequencies with different amplitudes for each signal. In the second
picture, it shows two groups of left and right signals starting from 0.
Whereas in the third image plot, shifting is carried out where the signal is
shifted so that it has a positive and negative frequency with a center
frequency of 0. The right frequency shows positive frequencies of 6, 7,
and 12 with different magnitudes according to the input frequency and
amplitude and the left shows the negative frequencies -6, -7, and -12 with
different magnitudes according to the input frequency and amplitude.

9
x = f1*sin(2*pi*f3*t) + f2*sin(2*pi*f3*t) +
f3*sin(2*pi*f3*t);

Figure 6.3 The Sum of Three Sinusoid Signals with the Same Frequency

Figure 6.3 is an image resulting from the sum of three signals with
different amplitudes but the same frequency. The frequency used is the
highest number of absences in the group, namely 12. The plot of the first
image shows the sum of the three signals in the time domain. It can be
seen that the shape of the signal is constant until the end, it is due to the
same frequency. Then with FFT the time domain changes to the frequency
domain shown in the second plot of the image. The second plot shows
only one signal with a frequency of 12, this is because the frequency
domain displays the inputted frequency, while the input frequency for all
three signals is the same as 12. In the second figure, it shows two groups
of left and right signals starting from 0. Whereas in the third image plot,
shifting is carried out where the signal is shifted so that it has a positive
and negative frequency with a center frequency of 0. The right frequency
shows a positive frequency of 12 and the left shows a negative frequency
of -12.

clc
clear all

T = 1; %Signal period
f1 = 6; %First signal frequency
f2 = 7; %Second signal frequency
f3 = 12; %Third signal frequency

10
fs = 15*f3; %sampling frequency = 15 times the largest
frequency
t = 0:1/fs:T-1/fs;
x = square(2*pi*f1*t) + square(2*pi*f2*t) +
square(2*pi*f3*t);

%signal on time domain


subplot(3,1,1)
plot(t,x)
grid on
title ('Addition of 3 Sinusoid Signals on Time Domain')
xlabel('time (s)')
ylabel('Amplitude')

%FFT process
y=fft(x);%frequency domain signal
f=(0:length(y)-1)*fs/length(y);
subplot(3,1,2)
plot(f,abs(y))
grid on
title ('Addition of 3 Sinusoid Signals on Frequency Domain')
xlabel('Frequency (Hz)')
ylabel('Magnitude')

%zero centered
n=length(x);
fshift = (-n/2:n/2-1)*(fs/n); %shift the x-axis spectrum
yshift = fftshift(y); %shift the y-axis spectrum
subplot(3,1,3)
plot(fshift,abs(yshift))
grid on
title ('Addition of 3 Sinusoid Signals on Frequency Domain-
Zero Centered')
xlabel('Frequency (Hz)')
ylabel('Magnitude')

Figure 6.4 The Sum of Three Square Signals with the Same Amplitude
x = f1*square(2*pi*f1*t) + f2*square(2*pi*f2*t) +
f3*square(2*pi*f3*t);

11
Figure 6.5 The Sum of Three Sinusoid Signals with Different Amplitudes and
Frequencies
x = f1*square(2*pi*f3*t) + f2*square(2*pi*f3*t) +
f3*square(2*pi*f3*t);

Figure 6.6 The Sum of Three Sinusoid Signals with the Same Frequency

Figure 6.4 is the sum of three signals with the same amplitude, figure 6.5
is the sum of three signals with different amplitudes and frequencies, and
Figure 6.6 is the sum of three signals with the same frequency. the sum of
these signals is represented by the contact signal. From the previous
experiment using a sinusoid signal, it can be seen the difference with the
square signal. The visible difference is that in the square signal in one
image plot, the spectrum and frequency produced is more varied or more.
However, the input frequency and amplitude can be seen to stand out more
than the others.

12
6.5.2 Display Signal Spectrum with Noise
clc
clear all

T = 1; %menentukan periode sinyal

T = 1; %Signal period
f1 = 6; %First signal frequency
f2 = 7; %Second signal frequency
f3 = 12; %Third signal frequency
fs = 10*f3; %sampling frequency = 15 times the largest
frequency
t = 0:1/fs:T-1/fs;
x = sin(2*pi*f1*t) + sin(2*pi*f2*t) + sin(2*pi*f3*t);
xnoise = x + 2.5*gallery('normaldata',size(t),10);

subplot(3,2,1)
plot(t,x)
grid on
title('Addition of 3 Sinusoid Signals on Time Domain')
xlabel('Time(s)')
ylabel('Amplitude')

subplot(3,2,2)
plot(t,xnoise)
grid on
title('Addition of 3 sinusoidal signals with Noise on Time
Domain')
xlabel('Time(s)')
ylabel('Amplitude')

%proses FFT
y = fft(x); %sinyal domain frekuensi (sinusoida)
f = (0:length(y)-1)*fs/length(y);

%spektrum sinyal dengan noise


ynoise = fft(xnoise);
fnoise = (0:length(ynoise)-1)*fs/length(ynoise);

subplot(3,2,3)
plot(f,abs(y))
grid on
title('Addition of 3 Sinusoid Signals on Frequency Domain')
xlabel('frequency(Hz)')
ylabel('Magnitude')

subplot(3,2,4)
plot(fnoise, ynoise)
grid on
title('Addition of 3 Sinusoid Signals with Noise on
Frequency Domain')
xlabel('frequency(Hz)')
ylabel('Magnitude')

%zero centered
%sinyal sinusoida

13
n = length(x);
fshift = (-n/2:n/2-1)*(fs/n); %menggeser spektrum sb x
yshift = fftshift(y); %menggeser spektrum sb y

nnoise = length(xnoise);
fshift_noise = (-nnoise/2:nnoise/2-1)*(fs/nnoise);
%menggeser spektrum sb x
yshift_noise = fftshift(ynoise); %menggeser spektrum sb y

subplot(3,2,5)
plot(fshift, abs(yshift))
grid on
title('Addition of 3 Sinusoid Signals on Frequency Domain-
Zero Centered')
xlabel('frequency(Hz)')
ylabel('Magnitude')

subplot(3,2,6)
plot(fshift_noise, abs(yshift_noise))
grid on
title('Addition of 3 Sinusoid Signals with Noise on
Frequency Domain-Zero Centered')
xlabel('frequency(Hz)')
ylabel('Magnitude')

Figure 6.7 Signal with a Gaussian Noise of 2.5

Figure 6.7 shows the sum of three sinusoid signals without noise on the
left and the signal after adding a gaussian noise of 2.5 on the right. It can
be seen in the picture above that a signal with noise produces a varied
spectrum so that the signal looks messy.

14
xnoise = x + 1.5*gallery('normaldata',size(t),10);

Figure 6.8 Signal with a Gaussian Noise of 1.5

Figure 6.8 shows the sum of three sinusoid signals without noise on the
left and the signal after adding gaussian noise is smaller than the previous
experiment, namely 1.5 on the right. It can be seen in the picture above
that a signal with noise produces a varied spectrum so that the signal looks
messy.

xnoise = x + 3.5*gallery('normaldata',size(t),10);

Figure 6.9 Signal with a Gaussian Noise of 3.5

Figure 6.8 the sum of three sinusoid signals without noise on the left and
the signal after adding gaussian noise is greater than the previous
experiment, namely 3.5 on the right. It can be seen in the picture above
that a signal with noise produces a more varied spectrum so that the signal

15
looks messier than the previous experiment. So, it can be concluded that
the greater the noise added, the more spectrum is produced

6.5.3 Fourier Transform on Discrete Signal


1. Discrete Unit Step Signal

Figure 6.10 The Optimal Sampling

The optimal sampling value can be determined using the formula


n1 = pow2(nextpow2(length(step_sig))). Then we get the
optimal sampling of 4. Where the sampling value can optimally
restore the discrete unit step signal back to its original state.

clc
clear all

M=30;
n=-M:1:M;
k=length(n);
step_sig=zeros(size(n,1),size(n,2));
for i=1:k
if n(i)>=0
step_sig(i)=1;
else
step_sig(i)=0;
end
end

a = fft(step_sig);
n1 = pow2(nextpow2(length(step_sig)))
b = fft(step_sig,64);
c = ifft(b);

subplot(4,1,1)
stem(n, step_sig)
title('Discrete Signal Step Function')
grid on
xlabel('Time Index (n)')
ylabel('Amplitude')

subplot(4,1,2)
stem(a)
title('Fourier Signal')
grid on
xlabel('Time Index (n)')

16
ylabel('Amplitude')

subplot(4,1,3)
stem(b)
title('Fourier Transform Signal with the optimal
samples')
grid on
xlabel('Time Index (n)')
ylabel('Amplitude')

subplot(4,1,4)
stem(c)
title('IFFT')
grid on
xlabel('Time Index (n)')
ylabel('Amplitude')

Figure 6.11 Fourier Transform Discrete Signal Step Units for Samples of
64

Figure 6.11 is a picture of the FFT signal or Fourier transformation


reversal signal. In this figure, the signal will be represented by 64
samples from 0 to 64. The signal is generated at 1 Vp starting from
the sample point 30 and ending at point 61. This is because the
discrete step unit signal will generate a signal from sample point 0
to sample point 30. If the value of the sample exceeds the length of
the signal, so the remainder of the sample is worth 0.

17
b = fft(step_sig,4);

Figure 6.12 Fourier Transform Discrete Signal Step Units for Samples of
4

The FFT signal or Fourier transform reversal signal will create a


sample from 0 to 4 which follows the input sample value. Whereas
in the original signal that has a discrete signal the step function has
a sample of n = 30. Because the sample value of the IFFT signal is
smaller than the original signal sample value, the resulting IFFT
signal is still at point 0 because at the sample point 0 - 30 there is
no generation accordingly with the step function discrete signal
form.

b = fft(step_sig,8);

18
Figure 6.13 Fourier Transform Discrete Signal Step Units for Samples of
8

The FFT signal or Fourier transform reversal signal will create a


sample from 0 to 8 which follows the input sample value. Whereas
in the original signal that has a discrete signal the step function has
a sample of n = 30. Because the sample value of the IFFT signal is
smaller than the original signal sample value, the resulting IFFT
signal is still at point 0 because at the sample point 0 - 30 there is
no generation accordingly with the step function discrete signal
form.

b = fft(step_sig,128);

Figure 6.14 Fourier Transform Discrete Signal Step Units for Samples of
128

19
The FFT signal or Fourier transform reversal signal will create a
sample from 0 to 128 which follows the input sample value.
Generating a signal with an amplitude of 1 Vp will start at the
sample point 30 and end at the sample point 61 because basically
the discrete step unit signal will generate a signal from the sample
point 0 - 30. If the sample value exceeds the length of the signal
then the rest of the sample is worth 0.

b = fft(step_sig,1024);

Figure 6.15 Fourier Transform Discrete Signal Step Units for Samples of
1024

The FFT signal or Fourier transform reversal signal will create a


sample from 0 to 1024 which follows the input sample value.
Generating a signal with an amplitude of 1 Vp will start at the
sample point 30 and end at the sample point 61 because basically
the discrete step unit signal will generate a signal from the sample
point 0 - 30. If the sample value exceeds the length of the signal
then the rest of the sample is worth 0 .

20
2. Discrete Unit Ramp Signal

Figure 6.16 The Optimal Sampling


clc
clear all

M=30;
n=-M:1:M;
k=length(n);
ramp_sig=zeros(size(n,1),size(n,2));
for i=1:k
if n(i)>=0
ramp_sig(i)=n(i);
else
ramp_sig(i)=0;
end
end

a = fft(ramp_sig);
n1 = pow2(nextpow2(length(ramp_sig)))
b = fft(ramp_sig,64);
c = ifft(b);

subplot(4,1,1)
stem(n, ramp_sig)
title('Discrete Signal Ramp Function')
grid on
xlabel('Time Index (n)')
ylabel('Amplitude')

subplot(4,1,2)
stem(a)
title('Fourier Signal')
grid on
xlabel('Time Index (n)')
ylabel('Amplitude')

subplot(4,1,3)
stem(b)
title('Fourier Transform Signal with the optimal
samples')
grid on
xlabel('Time Index (n)')
ylabel('Amplitude')

subplot(4,1,4)
stem(c)
title('IFFT Signal')
grid on
xlabel('Time Index (n)')
ylabel('Amplitude')

21
Figure 6.17 Fourier Transform Discrete Signal Ramp for Samples of 64

The FFT signal or Fourier transform reversal signal will create a


sample from 0 to 64 which follows the input sample value. Signal
generation starts at sample point 30 and ends at sample point 61
because basically the ramp unit discrete signal will start generating
signals from sample points 0 - 30. If the sample value exceeds the
length of the signal then the rest of the sample will return to 0.

b = fft(step_sig,4);

Figure 6.18 Fourier Transform Discrete Signal Ramp for Samples of 4

The FFT signal or Fourier transform reversal signal will create a


sample from 0 to 4 which follows the input sample value. Whereas
in the original signal that has a discrete signal the ramp function

22
has a sample of n = 30. Because the sample value of the IFFT
signal is smaller than the original signal sample value, the resulting
IFFT signal is still at point 0 because at the sample point 0 - 30
there is no generation accordingly to the ramp function discrete
signal form.

b = fft(step_sig,8);

Figure 6.19 Fourier Transform Discrete Signal Ramp for Samples of 8

The FFT signal or Fourier transform reversal signal will create a


sample from 0 to 8 which follows the input sample value. Whereas
in the original signal that has a discrete signal the ramp function
has a sample of n = 30. Because the sample value of the IFFT
signal is smaller than the original signal sample value, the resulting
IFFT signal is still at point 0 because at the sample point 0 - 30
there is no generation accordingly to the ramp function discrete
signal form.

23
b = fft(step_sig,128);

Figure 6.20 Fourier Transform Discrete Signal Ramp Units for Samples
of 128

The FFT signal or Fourier transform reversal signal will create a


sample from 0 to 128 which follows the input sample value. Signal
generation starts at sample point 30 and ends at sample point 61
because basically the ramp unit discrete signal will start generating
signals from sample points 0 - 30. If the sample value exceeds the
length of the signal then the rest of the sample will return to 0.

b = fft(step_sig,1024);

Figure 6.21 Fourier Transform Discrete Signal Ramp for Samples of


1024

24
The FFT signal or Fourier transform reversal signal will create a
sample from 0 to 1024 which follows the input sample value.
Signal generation starts at sample point 30 and ends at sample
point 61 because basically the ramp unit discrete signal will start
generating signals from sample points 0 - 30. If the sample value
exceeds the length of the signal then the rest of the sample will
return to 0.

From steps 2 and 3, you can see the difference in the number of samples
shown. In the second step the signal is drawn according to the resulting
wavelength. Whereas in step 3 the signal is illustrated following the
number of samples inputted

6.6 Conclusion
1. With FFT, it can change from time domain to frequency domain.
2. The frequency domain will display the input frequency variation.
3. The amplitude affects the magnitude at the frequency domain.
4. The greater the noise added, the more spectrum is produced.
5. The number of samples affects the waveform of the signal generated

6.7 Reference
Unknown, “Fast Fourier Transform”, Drilling Engineering, 2021. Available
on: https://www.sciencedirect.com/topics/engineering/fast-fourier-
transform#:~:text=FFT%20convolution%20uses%20the%20principle,domain
%20using%20the%20inverse%20DFT. [Accessed on: 30 April 2021]

25

You might also like