Download - Power Spectral Density ( USED MATLAB)
7/23/2019 Power Spectral Density ( USED MATLAB)
http://slidepdf.com/reader/full/power-spectral-density-used-matlab 1/4
SIGNAL PROCESSING POWER SPECTRAL DENSITY ( PSD )
Fourier TransformThe basis of the frequency characteristics of the signal is Fourier transform (Brook and
Wynne 1991). Fast Fourier Transform (FFT) is an algorithm for calculating Discrette Fourier
Transform (DFT). eneral function of the Fourier transform is to find the frequency com!onents
of the signal that is hidden by a time domain signal filled "ith noise (#rauss et.al 199$) are%
&'fft (y) (1)&'fft(yn) ()
(*)
(+)
,n the equation t is time and fh is the frequency. - is a signal notation in the s!ace of time
and is a notation for signals in the frequency domain. /quation (1) is called the Fourier transform of - (t) "hile equation () is called the in0erse Fourier transform of (f) namely -
(t). /quation (1) can also be "ritten as%
os(2ft)34&in(2ft) ($)
Fourier transformation can ca!ture information "hether a signal ha0ing a s!ecific
frequency or not but can not ca!ture the frequency in "hich it occurs. ommand form (*) and
(+) is almost the same that com!ute the DFT of 0ector - only the command (+) is added "iththe use of the FFT length !arameter (n).
Power Spectral Density
The frequency of a "a0e is naturally determined by the frequency source. The rate of the
"a0e through a medium is determined by the !ro!erties of the medium. 5nce the frequency (f)
and s!eed of sound (0) of the "a0e has been gi0en then the "a0elength ( λ) has been set. With
the relationshi! f ' 1 6 T can be obtained equation (7).
f
ν λ =
(7)
Because the study used the s!eed of sound in the liquid medium ie sea"ater.
Then the s!eed of sound in air is denoted by (0) can be changed "ith the s!eed of sound in "ater
that is denoted by () so that equation (8)
f
C =λ
(8)
o"er &!ectral Density (&D) is defined as the amount of !o"er !er frequency inter0al
in the form of mate tinkers (Brook and Wynne 1991)%
By : MUHAMMAD ZAINUDDIN LUBIS , and PRATIWI DWI
WULANDARI
7/23/2019 Power Spectral Density ( USED MATLAB)
http://slidepdf.com/reader/full/power-spectral-density-used-matlab 2/4
SIGNAL PROCESSING POWER SPECTRAL DENSITY ( PSD )
&D '
¿ Xn∨¿2
f ¿
:::::::::. (( Amplitudo)2
Hz )(;)
&D calculations in <=T>=B using Welch (#rauss et.al 199$) "hich is looking for a
DFT (based on calculations by the FFT algorithm) then squaring the magnitude 0alue. ?ere are
the results of !rocessing "hich is e-ecuted by using the synta-%
,n the !icture abo0e sho"s the 1@ cycles generated by synta- di4alakan using <=T>=B
the cycle is indicated by a blue line dra"ing. The cycle has the same 0alue u! to the 0alue to
@@@8 "ith the remaining 0alue on the yAa-is is the range of @ A1 because time is 1 6 n 6 Fs. so that
the ma-imum 0alue is generated by the cycle is 1.
,n the !icture abo0e is sho"n the results of o"er s!ectral density at a 0alue of - (t) using
frequency is 1.@@@ ? "hile the 0alue of Fs that is Afold greater the frequency in accordance
"ith the calculation in finding Frequency sam!le amounting to +@@@ ? has the highest score
is at @.@@+ "ith the a-is - is "orth $@@ and A$@@ "ith its lo" !oint in @@@ the 0alue of "hich
By : MUHAMMAD ZAINUDDIN LUBIS , and PRATIWI DWI
WULANDARI
7/23/2019 Power Spectral Density ( USED MATLAB)
http://slidepdf.com/reader/full/power-spectral-density-used-matlab 3/4
SIGNAL PROCESSING POWER SPECTRAL DENSITY ( PSD )
is at $@@ and A$@@ negati0e and !ositi0e center has charts the same highs and lo"s there is no
difference bet"een the (3) and (A) "ith o"er2of2- ' @.+9999$;********
,n the !icture abo0e is the !o"er s!ectral density of - (t) "ith units of dB already
incor!orated into the antiAlog function 1@ log (n) can be seen in the abo0e !icture has the same
!attern "ith the highest 0alue on the y a-is "hich is at A@ dB "ith 0alues "hich are at an
inter0al of $@@ and A $@@ it sho"ed no difference bet"een the !eak 0alue a-is negati0e (A) and
the a-is of the !ositi0e (3) "ith ans ' @.+9999$;******+7 and the frequency used is 1%@@ ?
and frequency &am!le is +@@@ ?.
Syntax used :
clear all
close allfs=24000; %Fs merupakan frekuensi sampleT=10; % time duration of the waveform, in sechn=T*fs; % time is the vector of the sample timetime=1!n"#fs; % waktu adalah vektor dari sampel waktuf=12000#2*pi";$=cos2*pi*f*time";t=find$0";$t"=&erossi&et""; % 'ni merupakan (elom)an( terakhir# pen(ha)isan
$=si(n$";t=find$0";$t"=&eros si&et""; % pen(ha)isan (elom)an(sound$#ma$a)s$"",fs" % memulai panan(n+a (elomn)an( dalam se)uah file%audiofi(ure 1"plot time,$"a$is0 12#f -1.2 1.2/" %asil +an( akan ditunukkan adalah 12 siklustitle First few c+cles of the waveform, $t"";(rid on
%enumlahan ener(+ dari sin+al waktu
By : MUHAMMAD ZAINUDDIN LUBIS , and PRATIWI DWI
WULANDARI
7/23/2019 Power Spectral Density ( USED MATLAB)
http://slidepdf.com/reader/full/power-spectral-density-used-matlab 4/4
SIGNAL PROCESSING POWER SPECTRAL DENSITY ( PSD )
%'ni adalah aproksimasi penumlahan 3iemann dari rata-rata ener(i%atatan! 5urasi, T=n*Ts, dimana Ts=1#Fs
ower6of6$=sum$.72"#n % 8proksimasi reimann dari persamaan inte(ral%lihat pada domain frekuensi%9valuasi FFT +an( dise)ut den(an 5iscrete Fourier transform 5FT"%at a set of e:uall+ space point on 0,1/%Fs=fft$"#fs; % <kala fft pada spektrum $ t"%%omputasi ener(+ spektrum%9$f=a)sFs".72; % >ote! 8$f can also )e computed as a)s F".72%%$f=9$f#T;%%ersetuuan frekuensi +an( akan di(unakan di <5%fi(ure 2"
df=fs#n; % 5f = Fre: separation )etween two consecutive fft pointsfre:=-n#2"?1!1!n#2/*df;ma$$f=ma$$f";su)plot211"plotfre:,$f"(rid ona$is-@000 @000 0 ma$$f/"title ower <pectral 5ensit+ of $t"";su)plot 212"plot fre:,10*lo(10$f#ma$$f",r,AineBidth,0.@"a$is-@000 @000 -100 0/"(rid ontitle ower <pectral 5ensit+ of $t" in dC";
%alculatin( power from the <5 usin( arsevals relation!%i.e., power = inte(ral of $f" over all fre:uenc+%This is a riemann sum appro$imation to the actual powersum$f"*df
Reference
BrookD. and C.. Wynne. 1991. &ignal rocessing% rinci!!les and =!!lications. /d"ard
=rnold a di0ision of ?odder and &toughton >imited <ill Coad Dunton reen. reat
Britain.
#raussT..>. &hure and .E.>ittle 199$. &ignal rocessing Toolbo-% For se "ith <atlab. The
<ath"orks ,nc.
By : MUHAMMAD ZAINUDDIN LUBIS , and PRATIWI DWI
WULANDARI