Вы находитесь на странице: 1из 17

See

discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/300167873

SIGNAL PROCESSING USING MATLAB

Chapter March 2016


DOI: 10.13140/RG.2.1.2630.4886

CITATIONS READS

0 192

3 authors, including:

Muhammad Zainuddin Lubis Pratiwi Dwi Wulandari


Politeknik Negeri Batam Bogor Agricultural University
121 PUBLICATIONS 132 CITATIONS 46 PUBLICATIONS 53 CITATIONS

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Geology View project

Call for Papers View project

All content following this page was uploaded by Muhammad Zainuddin Lubis on 10 April 2016.

The user has requested enhancement of the downloaded file.


CHAPTER 3
SIGNAL PROCESSING USING MATLAB
Muhammad Zainuddin Lubis B.Sc, M.Si,
Henry Munandar Manik PhD,
Pratiwi Dwi Wulandari, B.Sc.

In the past decade, we have witnessed a massive revolution Technology


Computers and explosions in various applications that are easy to use
(userfriendly applications). This revolution still continues to this day with the
system personal computers are relatively cheaper price compared to a server
workstation expensive. This technology should be used to enhance the learning
process so that generating process effective learning.
The learning method in digital signal processing has undergone various
changes over the years, starting from the format or method "Lecture-only, one-
way" to lecture the learning process integrated with laboratory activities (theory
and practice) with issues taught using hardware PSD. PSD so that learning
becomes effective, the learning components must be able to utilize intensively
explanations, giving examples and exercises based Computer and Technology
Information (Computer- and IT-based explanations, examples, and exercises).
In in recent years, the MATLAB software developed by The MathWorks, Inc.
(Http://www.mathworks.com), has become, de facto, the standard for numerical
computing and signal processing communities selected as a platform for the
development of algorithms. Actually there are several reason why using
MATLAB for development, but the grounds The main is because MATLAB is
available in a variety of operating system platforms (Especially Windows and
Linux). The availability of MATLAB student version enables their use in
classes learning PSD. Even some textbooks PSD is widely used also use
MATLAB as tools (tools), as well as using the hardware developers in

26
particular processor PSD (Mostly production of Texas Instruments, Inc.
(http://www.ti.com)).
So in this book we will retain and provide understanding and
implementation examples MATLAB application to signal processing
applications. As we know that the signal processing will not escape the
application or software. Signal processing using many of the functions
contained in it, with the help of a software application and it will facilitate the
process of signal processing. MATLAB is an application that is still reliable as
the software is always used in signal processing. The desired result will be
obvious, and the calculation will be completed in a short time by entering a
program or commonly called in MATLAB that syntax. In this section we will
discuss about Nyquist , Aliasing Effect, Wavelet Analysis 1D.

A. Nyquist and Aliasing Effects


At first we only recognize signals or analog signals and continuous
(continuous with no break at all, for example between the data for t = 0 seconds
hinga t = 1 second, we have all the data in full, not only at t = 0 seconds and t =
1 seconds). With the computer technology, signal processing progress because
the data signal may be stored and processed using a computer, how? By
performing the sampling (you can imagine how much data is stored if they are
continuous? Because between t = 0 seconds to t = 1 second can amount to
infinity) into the data discrete, only for a moment t certain, for example by
period sampling T = 0.5 seconds, will be obtained sampling frequency fs = 2 Hz
or 2 data per second, allowing for 1 minute = 60 x 2 daa = 120 data / minute.
Not only is the process of sampling, also performed quantization process,
that is changing the number of analog to digital as wide as the n-bit, meaning
that if you only use 3-bit then there are only 2 ^ 3 = 8 levels of data, and so on,
is widening its bit more accurate and automatic increasingly require a lot of
storage space.

27
Digital data need to be analyzed further, because it is still in the realm of
time (time domain), information obtained almost nothing, so often needed
information, for example, spectrum or frequency content of the signal in
question (frequency domain or frequency domain). So the need to study or
Discrete Fourier Transform DFT.
1. Nyquist
Digital Signal Processing in the world, there is a process to obtain digital
data through the sampling process, meaning that the analog signal is sampled
(taken) as a discrete period Ts or cuplik frequency Fs. to avoid mistakes (later
named aliasing), Mr. Nyquist frequency cuplik provide rules that must be at
least two (2) times the maximum frequency contained in the signal in question.
To understand this, let us first prepare a sinusoidal signal with a frequency of 2
Hz. We use cuplik frequency of 1000 Hz or 0001 second period (so the picture
is much more 'smooth' compared with experiments that we will do).

>>t=0:0.001:1;

>>f=2;

>>y=sin(2*pi*f*t);

Then forwarded to prepare a time variable t1 with sampling frequency =


frequency signal (or period 1 / f sec), we calculate y1 her then we describe the
original signal and the signal y y1 sampling results, use the following
commands:

>>t1=0:1/f:1;

>>y1=sin(2*pi*f*t1);

>>plot(t,y,t1,y1,-o);

>>title(sprintf(frekuensi sampling = frekuensi sinyal,


jumlah data %d,length(y1)));

28
It will get the following results (the original blue color, the green color
footage) (Figure 1) :

Figure 1 Sampling Frequency = Signal Frequency = Amount of Data

The above results are results on the plot with the sampling frequency =
frequency signal (Figure 1). Value should have the results of a 2-fold, for
example, will be done using 1 / (2 * f)) (Figure 2).

>>figure; >>t1=0:1/(2*f):1;

>>y1=sin(2*pi*f*t2); >>plot(t,y,t1,y1,-o);

>>title(sprintf(frekuensi sampling = 2 x frekuensi sinyal,


jumlah data %d,length(y1)));

Figure 2 Sampling Frequency = Signal Frequency = Amount of Data

29
The results produced by using syntax has the same result, because in
Nyquist equation 2 times is minimal, so it must use higher frequencies again,
and the example shown below uses a 2.5-fold (Figure 3).
>>figure; >>t1=0:1/(2.5*f):1;

>>y1=sin(2*pi*f*t1); >>plot(t,y,t1,y1,-o);

>>title(sprintf(frekuensi sampling = 2,5 x frekuensi


sinyal, jumlah data %d,length(y1)));

Figure 3 Sampling Frequency = = 2 x frequency signal, Amount of data 6

Figure 3 shows the different results between the sampling frequency with
the actual frequency. This indicates that the sampling frequency had to be more
than 2 x folding actual frequency.

2. Aliasing Effect
Aliasing effects (which later will see that the frequency alias = sampling
frequency - the frequency of the signal), which is an effect that will occur if we
do sampling with a sampling rate below the Nyquist conditions. The first we use
a sampling rate of 20 Hz and the time span for 1 second.
fs=20; t=0:1/fs:1;
We begin with a frequency of 1 Hz, then continued with a frequency of 2
Hz, 5Hz, 10Hz (exactly half of the sampling frequency), 15Hz, 18Hz and 19Hz.

30
f1=1;
x1=sin(2*pi*f1*t);
f2=2; x2=sin(2*pi*f2*t);
f3=5; x3=sin(2*pi*f3*t);
f4=10; x4=sin(2*pi*f4*t);
f5=15; x5=sin(2*pi*f5*t);
f6=18; x6=sin(2*pi*f6*t);
f7=19; x7=sin(2*pi*f7*t);
Then we describe all the results in one plot so that we can compare the
frequencies 7 (with the same sampling frequency, 20Hz) ( Figure 4):
plot(t,x1,-o,t,x2,-o,t,x3,-o,t,x4,-o,t,x5,-
o,t,x6,-o,t,x7,-o);
legend(1hz,'2hz,'5hz,'10hz,'15hz,'18hz,'19hz);
title(Teorema Nyquist - Efek Aliasing (Fs=20Hz));

Figure 4 Nyquist Theorem - Aliasing Effect(Fs = 20 Hz)

31
In Figure 4 shows that for a frequency of 10 Hz results in a straight line
(this is related to the Nyquist theorem), clearly this is the case because the
sampling rate = 2 times the frequency of 10Hz so that only the results of a
frequency of 10 Hz are extremely limited, while the frequency of others do not
coincide.
3. Wavelet Analysis 1D
3.1 Wavelet Transform
Transformation is the process of converting data or signal into another form that
is more easily analyzed, such as Fourier transformation which converts the
signal into multiple sine wave or cosine with different frequencies, whereas the
wavelet transform (wavelet transform) converts the signal into various shapes
wavelet basis ( mother wavelet) with various shifts.
3.2 CWT (Continuous Wavelet Transform)
The workings of this transformation is to calculate the convolution of a
signal with a modulation window at any time with any desired scale.
Modulation window that has a flexible scale is commonly called the mother
wavelet or wavelet basis functions. (Reza 2013). For transformation steps can
be shown in Figure (1) below.

Figure 1 measures the continuous wavelet transform (CWT)

32
At CWT, scale and higher frequencies corresponding to wavelet most
tenuous. Wavelet is more tenuous is the main kasaran signal measured by the
wavelet coefficients (Figure 2).

Figure 2 The relationship of high and low scale with frequency

In figure 2 above, note that: for a modest scale, signal wavelet compression
experience and he corresponded with high frequency, whereas for the high
scale, amendments rude and slow as proof he corresponded with a low
frequency. Results of processing by using a signal which is the result of my
research is as follows, using the separation signals in 1D wavelet:

33
So the results of the actual signal that sounds when the first whistle Before
eating pools show:

Figure 3 Decomposition of the original signal whistle by using wavelet 1D


34
Part of the family are the wavelet wavelet Mother's, Father's Daughter
wavelets and wavelet. Father wavelet is a function of scale, mother wavelet is a
function of the wavelet itself while the daughter wavelet is derived from the
mother wavelet. Generally father wavelet expressed as:

The wavelet father of the equation, the first wavelet (mother's wavelet) may
be formed as an equation:

From the equation above, wavelet can be formed next, and so on, by
compressing and stretching and sliding the mother wavelet.

Original
signal

Signal
After
Compress

Figure 4 Results Compressing and decomposition of the signal (wavelet)

35
Results from the image above that in Figure 4, the signal that has been
compressed will look smoother indicated by a blue circle, and the signal is not
compressed with wavelet 1D which shows the image circled in red. Part d1, d2,
d3, d4, d5, is the original signal is obtained (which was added to the wavelet
function, with final results signal that is shown in the picture to the left is the
image shown on d5.
For we can also do wavelet de-noising signal to enter the real world signal
into wavelet function, the following is an example of de- noising signal by using
the same signal as above is as follows:

Figure 5 The original signal (red colored) and signal after de -Noising (in Black)

The results above show the difference in the original signal (red) with the
signal that has been carried out de-noising using wavelet. The signals do after
the de-noising look smoother and has power (energy) in units smaller amplitude
than the amplitude (energy) is generated from the original signal. Image results
from independent interval which is the stage to see the patterns and constraints
can be seen in Figure 6.

36
Figure 6 Interval independent on the signal (after denoising)

Figure 6 above is an image interval independent of a signal (the signal


used is the same signal with a signal that is above. On the distribution of signal
patterns shown visible signal pattern has three patterns, and this result is clearly
visible above the transects / line restricted by dashed lines are blue. Residual
obtained in this result which is a view in detail can be seen in Figure 7.

Figure 7 Residual signal after denoising

37
Figure 7 above is a picture of the residuals of sound (signal was added
wavelet) by showing the signals that have been carried out de-noising and
process with the 1D wavelet making images as above with the FFT, the
frequency of the original signal, and a histogram cumulative, and the histogram
is, and provide information that is autocorelation.Dengan do countinous
Wavelet Transform (CWT) singnal same result as before will have the
following results:

Figure 8 CWT results of Signals (Wavelet 1D)

Figure 8 above shows a blue circle indicates that the results of the CWT
is the result of spectrograms which show the range of colors close to white has a
value greater echo level and has a value of amplitude (energy more powerful
than the color brown.

38
Figure 9 Multivariate denoising
Figure 9 shows the results with a signal which has not been performed
multivariate denosing very different from the signals that have been performed
multivariate denoising (blue), but decomposition of the signal shown in the
form of stem height and the same pattern, because the result of the
decomposition of the results obtained from actual signal pattern, even though
the signals are manipulated / performed with a variety of treatments using
wavelet.

39
Figure 10. Pattern admissible adapter (Frequency) whistle 1 sounds
before eating pool show

Figure 11. Pattern admissible adapter (Intensity) whistle 1 before eating


pool show
40
Figure 10 and Figure 11 above shows the difference of the results held
due to have the same data but have vastly different data values result from this
pattern shows the peaks of each of the results are already shown (black circles).

Figure 12. Density estimate 1D wavelet whistle 1 before eating pool show

Figure 12 above shows the results of density estimation signal has a


decomposition different, but the premises the shoulder (top of the chart) are
shown in the picture to the right with a circled circle is black, it can be
concluded that the center of the true voice signal is entered is in the range 14
KHz - 15 KHz.
REFERENCES
Reza, Candra. 2013. Differential Potential Techniques in Three-Phase Power Transformer
Using Wavelet Transform. Indonesian education university.

41

View publication stats

Вам также может понравиться