Научная статья на тему 'NOVEL SIMPLE APPROACH TO DIGITAL SIGNAL PROCESSING OF SINUSOIDS WITH MATLAB USING DISCRETE FOURIER TRANSFORM'

NOVEL SIMPLE APPROACH TO DIGITAL SIGNAL PROCESSING OF SINUSOIDS WITH MATLAB USING DISCRETE FOURIER TRANSFORM Текст научной статьи по специальности «Медицинские технологии»

CC BY
28
12
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
DSP / SINUSOID SIGNAL / DISCRETE FOURIER TRANSFORM / MATLAB

Аннотация научной статьи по медицинским технологиям, автор научной работы — Al-Rawi Muaayed F., Abboud Izz K., Al-Awad Nasir A.

This paper examined a novel approach to the DSP of sinusoids with MATLAB using the Discrete Fourier Transform. A sinusoid is a mathematical curve that describes a smooth periodic oscillation, and it can be used to study and solve many real-world problems. In the field of computer engineering, it can be used for studies on sampling of digital signals and plotting in the time/frequency domain of discrete signals. The study determined the effect of the sampling rate on DFT. Findings reveal that an increase in sampling frequency or duration will increase the size of the DFT. Also, a time and frequency domain plot of the DFT signal was implemented. It was concluded that more research should be encouraged in the area of digital signal processing to study and solve real-life problems. This article submitted a comprehensive introduction to analogue signals and how to convert them to digital signals supported by a theorem. It also submitted the importance of the study and methodology of solution with a proposed method.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «NOVEL SIMPLE APPROACH TO DIGITAL SIGNAL PROCESSING OF SINUSOIDS WITH MATLAB USING DISCRETE FOURIER TRANSFORM»

Novel Simple Approach to Digital Signal Processing of Sinusoids with MATLAB Using Discrete Fourier Transform

Muaayed F. Al-Rawi, Izz K. Abboud , and Nasir A. Al-Awad

Abstract—This paper examined a novel approach to the DSP of sinusoids with MATLAB using the Discrete Fourier Transform. A sinusoid is a mathematical curve that describes a smooth periodic oscillation, and it can be used to study and solve many real-world problems. In the field of computer engineering, it can be used for studies on sampling of digital signals and plotting in the time/frequency domain of discrete signals. The study determined the effect of the sampling rate on DFT. Findings reveal that an increase in sampling frequency or duration will increase the size of the DFT. Also, a time and frequency domain plot of the DFT signal was implemented. It was concluded that more research should be encouraged in the area of digital signal processing to study and solve real-life problems. This article submitted a comprehensive introduction to analogue signals and how to convert them to digital signals supported by a theorem. It also submitted the importance of the study and methodology of solution with a proposed method.

Keywords— DSP, Sinusoid Signal, Discrete Fourier Transform, MATLAB

I. INTRODUCTION

Signals are part of our daily lives and we are surrounded by all kinds of signals in various forms. These signals are either natural or manmade. Some examples of these natural signals are speech, music, etc. Signals can be defined as any time-varying or spatial-varying quantity. Examples include speech or audio signal, which would be sound amplitude that changes in time, electrical signals and temperature measurements at various hours of a day, and variations in stock prices over days. From an engineering standpoint, signals are used for representing information [1, 2-6]. This makes signal processing very important. Signal processing operations include: capturing, enhancing, storing, and transmitting useful information. In specific terms, signals can exist in analogue and digital forms and digital signal processing involves processes for capturing analogue signals, converting them to digital signals, processing the signal, analysing the signal and producing an output. Signals can be classified as continuous or discrete [7, 8, 9]. In time and amplitude, analogue signals change continuously and are processed by electrical devices comprising active and passive elements of the circuit. For example, analogue signal

Muaayed F. Al-Rawi, Computer Engineering Department, College of Engineering, Mustansiriyah University, Baghdad, Iraq, e-mail: (muaayed@uomustansiriyah. edu .iq).

Izz K. Abboud, Computer Engineering Department, Mustansiriyah University, Baghdad, Iraq, (e-mail: [email protected]).

Nasir A. Al-Awad, Computer Engineering Department, Mustansiriyah University, Baghdad, Iraq, (e-mail: [email protected]).

processing (ASP) includes the utilized of electrical tools like multipliers, logic components, and the utilized of specialpurpose microprocessors for radio and television receivers. When analogue signals are converted into a form suitable for digital hardware, it is called a digital signal. A discrete-time signal is a time sequence, sampled from a continuous-time signal. A digital signal is a signal of discrete time which only takes on a discrete set of values. Digital signal processing is concerned with manipulation of signals by filtering analogue signals to get desired digital output [10, 11, and 12]. Binary numbers represent digital signals. Therefore, digital signal processing is called the processing of digital signals. Signals can be interpreted digitally as sinusoids, a mathematical curve describing a smooth periodic oscillation. A continuous wave is a sine wave flow. It is named after the sine function, which is the graph of that function. In physics, the sine wave is significant because when applied to another sine wave of the same frequency and arbitrary phase, it maintains its wave form [13, 14]. DSP functions such as sinusoid generation can be applied to solve real life problems. MATLAB can be used to incorporate digital signal processing. MATLAB is a language for interactive programming that can be used to implement DSP applications. It is a language for programming at a high level. In research and industry, the kit is widely used. In the following fields, it is particularly well known: meteorology, aerospace and defence; automotive; biotechnology, pharmaceutical; medical; and communications [15, 16]. Specialist toolboxes are available for a number of other applications, including static applications, including Statistical research, financial modelling, processing of photographs and so on. In this paper, MATLAB is used to implement the digital signal processing of sinusoids using Discrete Fourier Transform (DFT) - Fast Fourier Transform.

• Importance of the study This study is important in the following ways:

1. The study will help point out clearly how Discrete

Fourier Transform (DFT) is applied in DSP.

2. Simulation of signal sampling of sinusoids will be

implemented, thereby promoting knowledge in that area of DSP.

3. The study will reveal how MATLAB can be used to

implement signal sampling of sinusoids using Discrete Fourier Transform (DFT).

4. The study will reveal how a time domain and

frequency domain plot of DFT signal is implemented.

5. One of the premiere uses of MATLAB is in the

analysis of signal processing and control systems this study will provide an application of signal sampling.

6. In many technologies and applications, DSP is now

becoming a first choice primarily because of its benefits, making it very important. It will help stimulate interest in this area of research.

• Statement of problem and methodology of solution There are many real life problems that can be solved by

studying their flow or pattern using digital signal processing sinusoidal solution. These problems exist in different spheres such as electronics, meteorology, health care, music, entertainment, biology, waves, tides, electricity, etc. Absence of an effective digital processing system brings about error in interpretations, inaccuracy of measurements and rates of flow. With sinusoids, patterns can be easily recognized and relevant solution found and decision taken. The DSP problem in this work is to simulate the effect of sampling rate on DFT signals. Also, another problem is, given a DFT signal, how can the time domain and frequency domain of the signal be plotted. The methodology used for solving the problem is applying DFT mathematical model implemented as Fast Fourier Transform (FFT) by coding in MATLAB.

• Concept of digital signal processing (DSP)

Digital signal processing can be viewed as the analysis and handling of a data signal, such as sound, video, and temperature, with the intention of using mathematical models, such as Fourier Transform, to modify or enhance them for a specific reason. DSP is used to act on various types of signals in order to process, calculate or compress. Analogue signals then contrast again by capturing the necessary data and translating it into electrical pulses of changing amplitude, while digital signal data is translated into binary configuration where two discernible amplitudes convey each bit of information. It is possible to interpret analogue signals as sine waves, and digital signals are described as square waves. DSP is applied in different fields, such as image processing, chemical processing, radar and sonar, and telecommunications. It is basically applied when signals need to be compressed and reproduced. Figure 1 and 2 show the analogue and digital signal respectively [17, 18].

AAA/W

Figure 1. Analogue signal

I I_I I_I I_r

Figure 2. Digital signal In implementing DSP, analogue signals are first caught. Signals like sound, video, pressure, and temperature are

digitized and handled mathematically. This data will then be expressed in a discrete time, a discrete frequency or other discrete structures in order to be able to treat the data carefully. In fact, an analogue-to - digital converter is required for a digital design to take analogue signals and convert them into 0s and 1s [19, 20].

• Analogue to Digital Converter (ADC) & Digital to

Analogue Converter (DAC) Interfaces are being modified by ADC and DAC. For any variety of DSP in any region, analogue to digital converters (ADC) and digital to analogue converters (DAC) are basic ingredients. It is necessary for these two interfaces to modify real signals to consider digital electronic devices in order to receive and manipulate any analogue signal. For example, ADC converts into a digital signal over the analogue signal captured by an input to a sound device that can be generated by speakers or screens [21].

• Sampling concept in digital signal processing

At a point in time and/or space, a sample is a value or set of values. A sampler is a subsystem that generates samples from continuous signal. Sampling is the reduction of a continuous-time signal to a discrete-time signal in digital signal processing. A typical example is the conversion to a series of samples (a discrete-time signal) of a sound wave (a continuous signal). At desired stages, a theoretical ideal sampler generates samples equal to the instantaneous value of the continuous signal. The original signal can be collected from a sample sequence up to the Nyquist limit by passing the sample sequence across a type of low-pass filter named a reconstruction filter [21, 22].

For functions that vary in space, time, or any dimension, sampling should be possible, and comparable results are acquired in at least 2 or more dimensions. For functions that change with time, let s(t) be a continuous function (or 'signal') to be sampled, and let sampling be achieved by measuring the continuous function value every T seconds, which is called the sampling interval or the duration of the sampling. A sampled function is then defined by the sequence:

S (nT), for integer values of n. The average number of samples obtained in one second (samples per second) is the sampling frequency or sampling rate, fs, so fs = 1/T. A traditional sampling application is sound sampling. For sound reproduction, pulse-code modulation and digital signals are used in sound sampling. This involves analogue-to-digital (ADC), digital-to-analogue (DAC), storage, and transmission conversion. In fact, the device widely referred to as digital is actually a discrete-time, discrete-level analog of a previous electrical analogue [21, 22].

II. RESEARCH METHODOLOGY

The methodology of research is the basic techniques or methods used to classify, pick, process, and evaluate knowledge about a topic. The methodology can also be seen as the general research approach that describes the manner in which research is to be performed and defines the methods to be used in it, among other items. This

research used both qualitative and quantitative methods and the sources of data collection were from secondary sources such as, journal papers, text books, internet, etc.

III. RELATED WORKS

Several research works have been carried out that apply sinusoidal solution to solving problems. For instance, [23] wrote a paper on modelling and estimation of Climatic Variable using Time Series Trigonometric Analysis. The article focused on the effect of cyclical or sinusoidal movement in some climatic variables on rainfall as factor that maybe responsible for climate change in south western Nigeria. The study revealed that analysis of sinusoidal pattern can help in proper monitoring of climatic variables.

Also, [24] Modelling and simulation of disturbance of power quality using MATLAB / SIMULINK were studied. To evaluate the power efficiency, sinusoidal wave forms are used. The wave was studied mainly via the four equations of transformation. The results of the simulation and the theoretical analysis indicate that the model could well simulate the change in voltage and harmonic disturbance, which can provide data and bases for power quality (PQ) detection and identification, and further control steps.

In addition, [25], a study was conducted on simple, fast and reliable sinusoidal signal frequency four-point estimators. Two new sinusoidal signal frequency estimators are introduced in this paper, measured on the basis of four evenly spaced signal samples. These estimators are called estimators of four points. Frequency tracking was also conducted through simulation and experimental simulation.

Finally, [26] A journal paper was written on the development and modelling of the Three-Phase Inverter for Harmonic Change Sinusoidal Pulse Width Modulation (SPWM) Control Technique. This paper demonstrated the design of a 400 V, three-phase voltage source inverter device using the Sinusoidal Pulse Width Modulation (SPWM) control technique. An internal control technique is Pulse Width Modulation (PWM) for inverters. The aim is to reduce the harmonics that the inverter produces.

IV. MODELS AND RELATED THEORY

• Mathematical model of discrete Fourier transform (DFT)

In science and engineering, discrete Fourier Transform (DFT) is applied to discrete data processing, for example for optical and acoustic signal processing, spectrum analysis, etc. Applications for data processing in electronic measurements, - for example for signal separation, amplitude and phase measurement, and filtering of discrete data, are increasingly being defined by the DFT.

The following need to be understood about Discrete Fourier Transform (DFT) [19]:

1. DFT of a time signal is a sampled version of the

spectrum of the signal over some finite frequency range.

2. DFT is very useful in computationally intensive

filtering, convolution, or correlation applications where it is often more efficient to do calculations in the frequency domain instead of the time domain.

3. DFT can be well computed using Fast Fourier Transform technique. The mathematical expression of Fourier transform (FT) is defined as in Equation 1 and Equation 2 below [19]:

x(t) = 1 X(f}e>2rft df X(f) = 1 x(t)e-j2nft dt

(1) (2)

Where the signal x(t) is a general analogue time signal while X(f) is the spectrum of the time signal. Both are analogue. Sampling the analogue time signal results to the Discrete-Time Fourier Transform (DTFT) as shown in Equation 3 and Equation 4 [19]:

x(n) = 1 Xp(f)eJ2nnf df

n=+œ

Xp(f) = I x(n)e

-j2nnf

(3)

(4)

n=-œ

To avoid aliasing, the time signal, x (t), must be sampled at a sufficient rate. Sampling Xp(f) over one period or an integer number of periods leads to the Discrete Fourier Transform (DFT) as shown in Equation 5 and Equation 6 [19]:

N-1

x(n) = (1/N) I XT(k)ej2nnk/N K=0

N-1

XT(k) = I x(n)é K=0

2nnk/N

(5)

(6)

The signal x(n) is created by taking N samples of the original signal x(t) over some finite duration of time, D. The signal XT(k) is the DFT of the analogue time signal x(t).

• Nyquist-Shannon Sampling Theory In the form of equidistant discrete points or samples, the Nyquist-Shannon Sampling principle states that a continuous-time (or analogue) signal can be stored in a digital computer. The greater the sampling rate (or sampling frequency, IS), the more precise the information stored and the reconstruction of the signal from its samples will be. However, a high sampling rate generates a large amount of data to be processed and the use of a very fast analogue-to -digital converter is mandatory. The Nyquist-Shannon sampling theorem is a theorem in the digital signal processing field that serves as a fundamental bridge between continuous-time and discrete-time signals. It sets a suitable condition for a sample rate that allows a discrete sequence of samples to collect all information from a continuous-time signal of finite bandwidth.

Strictly speaking, the theorem only applies to a class of mathematical functions that have a zero Fourier transformation outside of a finite frequency region. The sampling theorem presents the concept of a sample rate that is sufficient for perfect fidelity for the class of functions that are band-limited to a given bandwidth, so that no real

information is lost in the sampling process. It outlines the sufficient sampling rate in terms of bandwidth for the class of functions. In addition, the theorem leads to a function for the original continuous-time feature from the samples to be consummately reconstructed.

V. PROPOSED METHOD

In order to see the effects of sampling rate in DFT, two different sampling frequencies are chosen: 5 Hz and 32 Hz. This study revealed that an increase in sampling frequency or duration will increase the size of the DFT which in turn increases computational complexity. The effect of increasing the sampling rate (from 5Hz to 32Hz) on the accuracy of the DFT. at the lower sampling rate of 5 Hz, the accuracy of the signal starts to degrade around 0.5 Hz due to sampling. However, a sampling rate of 32 Hz produces a very accurate sampled spectrum.

VI. RESULTS AND DISCUSSION

In this study, a simulation of the effect of sampling rate on DFT signal is executed with MATLAB using DFT-FFT function. The signal is defined by the decaying exponential Equation 7:

X(t) = te-t <=X(f) = 1/(1+j2nf)2 (7)

The signal and its spectrum are first plotted using MATLAB code as shown in Figure 3 below:

Fut- S,1: Un ln;-f! TisH «nbi Ktlp

C to= y ¿3 \ fr ? / ß ß ~

special™ p>ji er ä'jnai mj=№H-i] 31 r=ttt 3f«t r=sttt

\

/ X \

——----

r.iagnviudtü' x(fi

\ -V-—-I

—,—

rre-îLipnLV .;HÏ:

Figure 3. Spectrum plot of signal

To compute a Discrete Fourier Transform (DFT), the time signal x (t) needs to be sampled over a duration of time (D). The duration of time used is 10 seconds. Following the Nyquist Theorem, the sampling frequency should be at least twice the bandwidth of the signal. In order to see the effects of sampling rate, two different sampling frequencies are chosen: 5 Hz and 32 Hz. The output of the MATLAB code shows that an increase in sampling frequency or duration will increase the size of the DFT which in turn increases computational complexity. Figure 4 shows the effect of increasing the sampling rate (from 5Hz to 32Hz) on the accuracy of the DFT. at the lower sampling rate of 5 Hz, the accuracy of the signal starts to degrade around 0.5 Hz due to sampling. However, a sampling rate of 32 Hz produces a very accurate sampled spectrum.

Figure 4. DFT FFT plot of signal

And Figure 5 shows the time domain signal and the frequency domain DFT-FFT signal. The observation time NDFT T sample is an integer multiple of the period T0 of the signal.

DÎHS * A /" / |§J30

Eime Je™in signa

0 0 05 0 1 015 0 2 0 25 0 3 0 35

Figure 5. Time domain signal and frequency Domain DFT-FFT signal

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

VII. CONCLUSION

This paper focused on novel approach to digital signal processing of sinusoids with MATLAB using Discrete Fourier Transform (DFT). It was revealed that sinusoids can be applied to model and solve many real life problems Such as: signal sampling, engineering applications, daylight hours over time, population growth / decay over time, heights of ocean waves (high and low tides) over time, sound waves, environmental issues, and electric currents. In this work, sinusoidal solution was applied to model the effect of sampling rate on a signal at a given frequency and number of samples, a sinusoidal of the signal is plotted using MATLAB DFT-FFT function. It is very important that research in the area of applying sinusoids to solve problems be encouraged.

REFERENCES

[1] Abdessamad Klilou, and Assia Arsalane, "Parallel implementation of pulse compression method on a multi-core digital signal processor,"

International Journal of Electrical and Computer Engineering, vol. 10, no. 6, pp. 6541- 6548, 2020.

[2] Mihoub Youcef, Toumi Djilali, Sandrine Moreau, Hassaine Said, and Daoud Bachir, "DSP improvement of a vector speed induction motor

control with a RST and adaptive fuzzy controller," Bulletin of Electrical Engineering and Informatics, vol. 10, no. 3, pp. 1232-1244, 2021.

[3] Amer T. Seed, Zaid Raad Saber, Ahmed M. Sana, and Musa A. Hameed, "Eliminating unwanted signals in sound by using digital signal processing system," Indonesian Journal of Electrical Engineering and Computer Science, vol.18, no. 2, pp. 829-834, 2020.

[4] Borkowski, J., Kama, D., Mroczka, J., "Influence of A/D Quantization in an Interpolated DFT Based System of Power Control with A Small Delay," Metrol. Meas. Syst., vol. 21, no.3, pp.423-432, 2014.

[5] Liu, X., Ren, Y., Chu, C., Fang, W., "Accurate Frequency Estimation Based On Three-Parameter Sine-Fitting with Three FFT Samples," Metrol. Meas. Syst., vol.22, no.3, pp.403-416, 2015.

[6] Belega, D., Petri., D., "Effect of noise and harmonics on sine-wave frequency estimation by interpolated DFT algorithms based on few observed cycles," SignalProces., vol.140, pp.207-218, 2017.

[7] Wang, Y., Wei, W., Xiang, J., "Multipoint interpolated DFT for sine waves in short records with DC, "Signal Proces., vol.131, pp.161-170, 2017.

[8] Kammoun, M.A., Gargouri, D., Frikha, M., Ben Hamida, A., "Cepstral method evaluation in speech formant frequencies estimation," Proc. of IEEEICIT2004. Hammamet, Tunisia,vol. 3, pp.1612-1616, 2016.

[9] Kunieda, N., Shimamura, T., Suzuki, J., "Robust method of measurement of fundamental frequency by ACOLS: autocorrelation of log spectrum,"Proc. of IEEE Int. Conf. on Acoustics, Speech, and Signal Proces. Atlanta, USA, vol. 1, pp.232-235, 1996.

[10] Cao, Y., Wei, G., Chen, F.J., "A closed-form expanded autocorrelation method for frequency estimation of a sinusoid, "Signal Proces., vol.92, pp.885-892, 2012.

[11] Xiao, Y.C., Wei, P., Taib, H.M., "Autocorrelation-based algorithm for single-frequency estimation,"Signal Proces., vol.87, pp.1224-1233, 2007.

[12] Cheveigne, A., Kawahara, H., " Yin, a fundamental frequency estimator for speech and musi,"J. Acoust. Soc. Am., vol.111, no.4, pp. 1917-1930, 2002.

[13] Petrovic, P.B., "A simple algorithm for simultaneous sine signal parameters estimation,",/. Electrical Engineering, vol. 64, no.3, pp.180185, 2013.

[14] Vizireanu, D.N., "A fast, simple and accurate time-varying frequency estimation method for single-phase electric power systems," Measurement, vol.45, pp.1331-1333, 2012.

[15] Vizireanu, D.N. ,"A simple and precise real-time four point single sinusoid signals instantaneous frequency estimation method for portable DSP based instrumentation," Measurement, vol.44, pp.500-502, 2011.

[16] Pan, X., Zhao, H., Zou, W., "Frequency estimation of discrete time signals based on fast iterative algorithm, "Measurement, Vol.82, pp.461465, 2016.

[17] Alegria, F.C., Molino-Minero-Re, E., and Shariat-Panahi, S., "Evaluation of a four-point sine wave frequency estimator for portable DSP based instrumentation," Measurement, 45, 1866-1871, 2017.

[18] Belega, D., and Petri., D., "Effect of noise and harmonics on sine-wave frequency estimation by interpolated DFT algorithms based on few observed cycles," Signal Proces., vol.140, pp.207-218, 2017.

[19] Pharr, M., and Jakob, W. and Humphreys, G., "Physically Based Rendering: From Theory to Implementation, 3rd ed., Morgan Kaufmann, 2016.

[20] Sienkowski, S., "A method of m-point sinusoidal signal amplitude estimation,"Meas. Sci. Rev., vol.16, no. 5, pp.244-253, 2016.

[21] Sienkowski, S., "Three-point estimator of sinusoidal signal amplitude," Int. J. Electron, vol.104, no.6, pp. 942-951, 2017.

[22] Taiwo A., and Olatayo, T., "An improved procedure for Fourier regression analysis," Anale. SeriaInformatica. vol. XVI pp.108-112, 2018.

[23] Olatayo, T .O., Taiwo, A. I., and Oyewole, A., "Modelling and Estimation of Climatic Variable using Time Series Trigonometric Analysis," World Journal of Modelling and Simulation, vol. 14, no. 3, pp. 192-198, 2019.

[24] Kavitha V.,and Subramanian, K.,"Modelling and simulation of power quality disturbance using MATLAB/SIMULINK," International journal of innovative technology and exploring engineering (IJITEE) ISSN: 22783075, vol.8 no.5, 2019.

[25] Sienkowski, S., and Krajewski, M., "Simple, fast and accurate four-point estimators of sinusoidal signal frequency," Metrol. Meas. Syst., vol. 25 no. 2, pp. 359-376, 2018.

[26] Buswig, Y., Affam, A., Albalawi, H., Norhuzaimin, J., Al-Khalid, O., and Qays, O., "Development and modelling of three phase inverter for harmonic improvement using sinusoidal pulse width modulation (SPWM) control technique," International Journal of Recent Technology and Engineering (IJRTE) ISSN: 2277-3878, vol.8 no.4, 2019.

i Надоели баннеры? Вы всегда можете отключить рекламу.