Professional Documents
Culture Documents
,QGH[
)RUXPV
&KDQQHO0RGHOOLQJ
9LGHR/HFWXUHV
6LJQDO3URFHVVLQJ
%X\%RRNV
'LJLWDO0RGXODWLRQV
)HHGEDFN
0DWODE&RGHV
(VWLPDWLRQ7KHRU\
5DQGRP3URFHVV
&KDQQHO&RGLQJ
6SUHDG6SHFWUXP
2)'0
3XOVH6KDSLQJ
%RRNUHYLHZV
7LSV 7ULFNV
&RPSXWDWLRQRI3RZHURID
6LJQDOLQ0DWODE
6LPXODWLRQDQG9HULILFDWLRQ
Mathuranathan December24,2013
Tips&Tricks,Tutorials 13Comments
*UDE7KLV(ERRN7RGD\
LatestArticles,SignalProcessing,
(4votes,average:5.00outof5)
Calculatingtheenergyandpowerofasignalwasdiscussedinoneof
thepreviousposts.Here,wewillverifythemethodbyusingDiscrete
FourierTransform(DFT)inMatlab.Checkheretoknowmoreonthe
conceptofpowerandenergy.
Thetotalpowerofasignalcanbecomputedusingthefollowing
equation
6HDUFK$UWLFOHV
1
Px =
n=N 1
lim
N
|x(n)|
(1)
n=0
6HDUFK
Forotherformsofequations:referhere.
3DUWLFLSDWH
&DVH6WXG\
x(t)
thefollowingequation.
x(t) = Asin(2fc t)
Whenrepresentedinfrequencydomain,itwilllookliketheoneon
therightsideplotinthefollowingfigure.Thisisevidentfromthefact
thatthesinewavecanbemathematicallyrepresentedbyapplying
Eulersformula.
)ROORZ8V
e
j2f t
c
Asin(2fc t) = A
j2f t
c
'LJLWDO&RPPXQLFDWL
2j
OLNHV
TakingtheFouriertransformofx(t)torepresentitinfrequency
domain,
/LNH3DJH
j2f t
c
j2f t
c
]e
j2f t
A
dt =
2j
2j
[(f fc ) (f + fc )]
%HWKHILUVWRI\RXUIULHQGVWROLNHWKLV
Whenconsideringtheamplitudepart,theabovedecompositiongives
twospikesofamplitudeA/2oneithersideofthefrequencydomainat
fc
andf .
c
GaussianWave
Follow
+ 362
Squaringtheamplitudesgivesthemagnitudeofpowerofthe
individualspikes/frequencycomponents.Thepowerspectrumis
plottedbelow.
5DWLQJV
SimulationofDigital
CommunicationSystems
UsingMatlab[eBook]
SecondEdition
72votes
HowtoplotFFTusingMatlab
FFTofbasicsignals:Sine
ThusifthepuresinewaveisofamplitudeA=1Vand
frequency=100Hz,thepowerspectrumwillhavetwospikesofvalue
2
A /4 = 0.25
be A
at100Hzand100Hzfrequencies.Thetotalpowerwill
andCosinewaves
26votes
SimulationandAnalysisof
WhiteNoiseinMatlab
Letsverifythisthroughsimulation.
21votes
Topbooksonbasicsof
6LPXODWLRQDQG9HULILFDWLRQ
CommunicationSystems
13votes
Asinewaveof100Hzfrequencyandamplitude1Vistakenforthe
MIMODiversityandSpatial
experiment.
Multiplexing
11
votes
1
2
3
4
5
6
7
8
9
10
subplot(2,1,1);
t=0:Ts:nCycles/Fc-Ts; %Time base
x=A*sin(2*pi*Fc*t); %Sinusoidal function
stem(t,x); %Plot command
Asinusoidalwaveof10cyclesisplottedhere
QPSKmodulationand
Demodulation
10votes
FFTandSpectralLeakage
9votes
5HFHQW3RVWV
HowtointerpretFFTresults
obtainingmagnitudeand
phaseinformation
HowtoInterpretFFTresults
complexDFT,frequencybins
andFFTShift
Lauched:NewQ&Aforumfor
discussions
SignificanceofRMS(Root
MeanSquare)value
0DWODEV1RUPIXQFWLRQ
InvitationtoSubmityourwork
forpublicationat
gaussianwaves.com
Matlabsbasicinstallationcomeswithnormfunction.Thepnorm
inMatlabiscomputedas
1/p
n=N 1
N ORM (v, p) = (
|x(v)| )
(2)
HowtogenerateAWGNnoise
inMatlab/Octave(without
usinginbuiltawgnfunction)
n=0
Bydefault,thesingleargumentnormfunctioncomputed2norm
givenas
1/2
n=N 1
n=0
|x(v)| )
PhysicalTelepresence:Say
goodbyetoSkype,Facetime:
Thisisthefutureof
communication.
(3)
HardwareImplementationof
Goldcodegenerator
ConstructingtheAuto
CorrelationMatrixinMatlab
Constructingarectangular
constellationforMQAMusing
Tocomputethetotalpowerofthesignalx[n](asinequation(1)
KarnaughMapwalks
above),allwehavetodoiscomputenorm(x),squareitanddivide
CapacityofaMIMOsystem
overFadingChannels
bythelengthofthesignal.
1 L=length(x);
2 P=(norm(x)^2)/L;
3 sprintf('Power of the Signal from Time domain %f',P);
Theabovegivenpieceofcodewillresultinthefollowingoutput
1 Power of the Signal from Time domain 0.500000
9HULI\LQJWKHWRWDO3RZHUE\')7)UHTXHQF\
'RPDLQ
Here,thetotalpowerisverifiedbyapplyingDFTonthesinusoidal
sequence.Thesinusoidalsequencex[n]isrepresentedinfrequency
domainX[f ] usingMatlabsFFTfunction.Thepowerassociatedwith
eachfrequencypointiscomputedas
P x [f ] = X[f ]X [f ]
Finally,thetotalpoweriscalculatedasthesumofallthepointsinthe
frequencydomainrepresentation.
1
2
3
4
5
6
7
X = fft(x);
Px=sum(X.*conj(X))/(L^2); %Compute power with proper scaling.
subplot(2,1,2)
% Plot single-sided amplitude spectrum.
stem(Px);
sprintf('Total Power of the Signal from DFT %f',P);
ErgodicCapacityofaSISO
systemoveraRayleighFading
channelSimulationin
Matlab
CapacityofaSISOsystemover
afadingchannel
CharacterizingaMIMO
channelChannelState
Information(CSI)and
Conditionnumber
MIMODiversityandSpatial
Multiplexing
IntroductiontoMultiple
AntennaSystems
ChirpSignalFrequency
SweepingFFTandpower
spectraldensity
GeneratingBasicSignals
GaussianPulseandPower
SpectralDensityusingFFT
GeneratingBasicsignals
RectangularPulseandPower
SpectralDensityusingFFT
GeneratingBasicsignals
SquareWaveandPower
SpectralDensityusingFFT
5HFHQW&RPPHQWV
5HVXOW
1 Total Power of the Signal from DFT 0.500000
sakshamaghoslyaHelloSir,
>Yourfinalexpressionfor
transmi...
MathuranathanThanksfor
spottingthat.Willcorrectthe
mistake...
PTMIthinkthereisalittle
mistakeincodecomments...
AwordonMatlabsFFT:MatlabsFFTisoptimizedforfaster
performanceifthetransformlengthisapowerof2.Thefollowing
MathuranathanThanksfor
snippetofcodesimplycallsfftwithoutthetransformlength.Inthis
yourcomment...
case,thewindowlengthandthetransformlengtharethesame.This
istosimplifythecalculationofpower.Youcanrewritethecalltothe
FFTroutinewithtransformlengthsettonextpoweroftwowhichis
greaterthanorequaltothewindowlength(sequencelength).Then
MathuranathanThanksfor
yourcomment....
thesteptocomputetotalpowerwillbedifferingslightlyinthe
denominator.Butthatwillnotimproveresolution(Remember:zero
paddingtocomputeFFTwillnotimproveresolution).
HaoYithetwosourcesof
Alsonotethatintheabovesimulationweareusingapuresinusoid.
Theentiresequenceofsinusoiddefinedallthecyclescompletely.
spectralleakagehaveconfused
...
Therearenodiscontinuitiesinthesequence.IfyoucallFFTwiththe
transformlengthsettonextpowerof2(asgiveninMatlabmanuals),
itwillpadadditionalzerostothesequenceandcreatesdiscontinuities
MathuranathanThanksfor
intheFFTcomputation.Thiswillleadtospectralleakage.FFTand
pointingitout...
spectralleakageisdiscussedhere.
5HFRPPHQGHG%RRNVRQ6LJQDO
3URFHVVLQJ
MathuranathanIwas
plottingtheNONnormalized
magnitudespectr...
YamunaHiSir,Intheabove
examplewhenIgavethe...
JAYAPRAKASHPHi,iam
doingmymtechfinalyear