DSP With Matlab PDF
DSP With Matlab PDF
discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/300167873
CITATIONS READS
0 192
3 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Muhammad Zainuddin Lubis on 10 April 2016.
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.
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);
>>t1=0:1/f:1;
>>y1=sin(2*pi*f*t1);
>>plot(t,y,t1,y1,-o);
28
It will get the following results (the original blue color, the green color
footage) (Figure 1) :
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);
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);
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));
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.
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).
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:
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
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)
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 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 12. Density estimate 1D wavelet whistle 1 before eating pool show
41