hilbert transform 2
PDF · 36 pages · 503.7 KB
Open PDF file
A master's thesis in applied mathematics (Växjö University, supervisor Börje Nilsson), downloaded for Phil's spectral theory book folder. It motivates the Hilbert transform via the Cauchy integral, the Fourier transform and the ±π/2 phase shift, then covers properties such as linearity, orthogonality, energy and strong analytic signals. Later chapters treat numerical methods (Hermite polynomials, Fourier series, DFT), an application and code appendices.
AI-written summary; may contain errors.
Extracted text (machine-read; may contain errors)
TheHilberttransform
MathiasJohansson
MasterThesis
Mathematics/AppliedMathematics
Supervisor:BÄorjeNilsson,VÄaxjÄoUniversity.
Examiner:BÄorjeNilsson,VÄaxjÄoUniversity.
Abstract
TheinformationabouttheHilberttransformisoftenscatteredin
booksaboutsignalprocessing.Theirauthorsfrequentlyusemathe-
maticalformulaswithoutexplainingthemthoroughlytothereader.
Thepurposeofthisreportistomakeamorestringentpresentationof
theHilberttransformbutstillwiththesignalprocessingapplication
inmind.
Contents
1Introduction:::::::::::::::::::::::::::::::::1
2MathematicalmotivationsfortheHilberttransform:::::::::::2
2.1TheCauchyintegral:::::::::::::::::::::::::3
2.2TheFouriertransform::::::::::::::::::::::::7
2.3The§¼=2phaseshift:::::::::::::::::::::::::10
3PropertiesoftheHilberttransform::::::::::::::::::::11
3.1Linearity::::::::::::::::::::::::::::::::11
3.2MultipleHilberttransformsandtheirinverses:::::::::::12
3.3DerivativesoftheHilberttransform:::::::::::::::::13
3.4Orthogonalityproperties:::::::::::::::::::::::14
3.5EnergyaspectsoftheHilberttransform:::::::::::::::15
3.6TheHilberttransformofstronganalyticsignals::::::::::15
3.7Analyticsignalsinthetimedomain:::::::::::::::::17
4NumericalcalculationsoftheHilberttransform:::::::::::::18
4.1Continuoustime::::::::::::::::::::::::::::18
4.1.1Numericalintegration.::::::::::::::::::::18
4.1.2Hermitepolynomials:::::::::::::::::::::18
4.1.3Fourierseries:::::::::::::::::::::::::22
4.2DiscreteFouriertransform::::::::::::::::::::::22
5Anapplication::::::::::::::::::::::::::::::::27
AAppendix::::::::::::::::::::::::::::::::::30
A.1ImplementationoftheHermitepolynomial:::::::::::::30
A.2ImplementationoftheFourierseries:::::::::::::::::31
A.3ImplementationoftheFouriertransform::::::::::::::32
1.Introduction
Signalprocessingisafastgrowingareatodayandadesirede®ectivenessinuti-
lizationofbandwidthandenergymakestheprogressevenfaster.Specialsignal
processorshavebeendevelopedtomakeitpossibletoimplementthetheoretical
knowledgeinane±cientway.Signalprocessorsarenowadaysfrequentlyusedin
equipmentforradio,transportation,medicineandproductionetc.
In1743afamousSwissmathematiciannamedLeonardEuler(1707-1783)de-
rivedtheformula
ejz=cos(z)+jsin(z):
150yearslaterthephysicistArthurE:KennellyandthescientistCharlesP:
Steinmetzusedthisformulatointroducethecomplexnotationofharmonicwave
formsinelectricalengineering,thatis
ej!t=cos(!t)+jsin(!t):
Lateron,inthebeginningofthe20thcentury,theGermanscientistDavidHilbert
(1862-1943)¯nallyshowedthatthefunctionsin(!t)istheHilberttransformof
cos(!t).Thisgaveusthe§¼=2phase-shiftoperatorwhichisabasicpropertyof
theHilberttransform.
Arealfunctionf(t)anditsHilberttransformbf(t)arerelatedtoeachother
insuchawaythattheytogethercreateasocalledstronganalyticsignal.The
stronganalyticsignalcanbewrittenwithanamplitudeandaphasewherethe
derivativeofthephasecanbeidenti¯edastheinstantaneousfrequency.The
Fouriertransformofthestronganalyticsignalgivesusaone-sidedspectruminthe
frequencydomain.ItisnothardtoseethatafunctionanditsHilberttransform
alsoareorthogonal.Thisorthogonalityisnotalwaysrealizedinapplications
becauseoftruncationsinnumericalcalculations.However,afunctionandits
Hilberttransformhasthesameenergyandthereforetheenergycanbeusedto
measurethecalculationaccuracyoftheapproximatedHilberttransform.
TheHilberttransformde¯nedinthetimedomainisaconvolutionbetween
theHilberttransformer1=(¼t)andafunctionf(t)[7].Thisismotivatedlateron.
De¯nition1.1.TheHilberttransformbf(t)ofafunctionf(t)isde¯nedforallt
by
bf(t)=1
¼PZ1
¡1f(¿)
t¡¿d¿;
whentheintegralexists.
ItisnormallynotpossibletocalculatetheHilberttransformasanordinary
improperintegralbecauseofthepoleat¿=t.However,thePinfrontofthe
1
integraldenotestheCauchyprincipalvaluewhichexpandingtheclassoffunctions
forwhichtheintegralinDe¯nition1.1exist.Itcanbede¯nedbythefollowing
de¯nition[5].
De¯nition1.2.Let[®;¯]bearealintervalandletfbeacomplex-valuedfunc-
tionde¯nedon[®;¯].Iffisunboundednearaninteriorpoint»of[®;¯],the
integraloffover[®;¯]doesnotalwaysexist.However,thetwolimits
lim²!0Z»¡²
®f(x)dxandlim²!0Z¯
»+²f(x)dx;
stillmayexist,andiftheydotheirsumiscalledtheimproperintegraloffover
[®;¯]andisdenotedbytheordinaryintegrationsymbol
Z¯
®f(x)dx:
Evenifthesetwolimitsdonotexist,itmayhappenthatthe"symmetriclimit"
lim²!0+ÃZ»¡²
®f(x)dx+Z¯
»+²f(x)dx!
;
exists.Ifitdoes,itiscalledtheprincipalvalueintegralofffrom®to¯andis
denotedbythesymbol
PZ¯
®f(x)dx:
Example1.3.Anordinaryrealfunction1=xthatisintegratedfrom¡atoacan
bewrittenasZa
¡a1
xdx=lim±!0+Z¡±
¡a1
xdx+lim"!0+Za
"1
xdx,
andweseethatitisnotpossibletocalculatetheseintegralsseparatelybecause
ofthepoleinx=0:However,ifweapplytheCauchyprincipalvaluethen±and
"tendtozeroatthesamespeed,thatis
PZa
¡a1
xdx=lim"!0+µZ¡"
¡a1
xdx+Za
"1
xdx¶
=0;
andtheintegralconverges.
2.MathematicalmotivationsfortheHilberttransform
InthischapterwemotivatetheHilberttransforminthreedi®erentways.First
weusetheCauchyintegralinthecomplexplaneandsecondweusetheFourier
transforminthefrequencydomainandthirdwelookatthe§¼=2phase-shift
whichisabasicpropertyoftheHilberttransform.
2
Figure2.1:¡isapiecewisesmoothclosedcontouronanopendomain
2.1.TheCauchyintegral
TheCauchyintegralisa¯gurativewaytomotivatetheHilberttransform.The
complexviewhelpsustorelatetheHilberttransformtosomethingmoreconcrete
andunderstandable.
Consideranintegralinthecomplexz-planeontheform
I
¡f(z)
z¡adz,
whichisknownasaCauchyintegral.Iffisanalyticand¡isapiecewisesmooth
closedcontourinanopendomain;seeFigure2.1,thentheCauchyintegral
theoremisapplicableas
I
¡f(z)
z¡adz=(
2¼if(a)ifaisinside¡
0ifaisoutside¡
Togetaresultwhenalieson¡wehavetocreateanewcontour¡0
"asin
Figure2.2whereI
¡0
"f(z)
z¡adz=2¼if(a). (2.1)
Iftheradius"ofthesemicircle°"tendstozero,thecontributionfromthesemi-
circle°"totheintegralalong¡0
"approaches¼if(a)accordingtoLemma2.1[7].
Lemma2.1.Ifghasasimplepoleatz=aand°risthecirculararcofFigure
2.3de¯nedby
°r:z=a+rei£(£1·£·£2),
3
Figure2.2:¡0
"isapiecewisesmoothclosedcontouronanopendomain.
Figure2.3:°risacirculararcarounda
4
Figure2.4:¡isapiecewisesmoothclosedcontour.
then
limr!0+Z
°rg(z)dz=i(£2¡£1)Resz=ag(z).
FromLemma2.1andfromthede¯nitionoftheCauchyprincipalvalue,we
seethat
lim"!0I
¡0
"f(z)
z¡adz=PZ
¡f(z)
z¡adz+lim"!0Z
°"f(z)
z¡adz=2¼if(a),
andthattheintegraloftheCauchyprincipalvalueis
PZ
¡f(z)
z¡adz´lim"!0Z
¡"f(z)
z¡adz=¼if(a). (2.2)
where¡"isanonclosedcontourwithouttheindentation°".By(2.2)wehave
generalizedthede¯nitionoftheCauchyprincipalvaluecomparedtoDe¯nition
1.2.
Aparticularlyusefulidentityariseswhenwehaveacontour¡asinFigure2.4
thatisclosedbythesemicircle°Randtherealx-axis.Iff(z)isafunctionthat
isanalyticinanopenregionthatcontainstheupperhalf-planeandtendstozero
atin¯nityinsucharatethatthecontributionfromthesemicircle°Rvanishesas
R!1,thenwehave
PZ1
¡1f(»)
»¡xd»=¼if(x). (2.3)
Theintegralover°RwilldisappearwhenR!1if
jf(z)j<C
jzj,
5
foranypositiveconstantC.Thesameyieldsif
jf(z)j<C¯¯¯eimz¯¯¯,
forpositivemaccordingtoLemma2.2[7].
Lemma2.2.(Jordan'slemma)Ifm>0andP=Qisthequotientoftwopoly-
nomialssuchthat
degreeQ¸1+degreeP,
then
lim½!1Z
C+½P(z)
Q(z)eimzdz=0,
whereC+
½istheupperhalf-circlewithradius½.
Ifweexpressf(x)as
f(x)=g(x)¡ih(x);
onbothsidesof(2.3)withargumentsontherealx-axisandequatingrealand
imaginarypartsthenweobtainfortherealpart
g(x)=¡1
¼PZ1
¡1h(»)
x¡»d»=¡Hh(x);
andfortheimaginarypart
h(x)=1
¼PZ1
¡1g(»)
x¡»d»=Hg(x): (2.4)
FromDe¯nition1.1wehavethath(x)in(2.4)istheHilberttransformofg(x)
whereHistheHilberttransformoperator.Wealsonotethatg(x)=H¡1h(x)
withH¡1astheinverseHilberttransformoperator.WeseethatHRef(x)=
Imf(x)whichmotivatesthefollowingde¯nition.
De¯nition2.3.Acomplexsignalf(x)thatful¯lstheconditionspreceding(2.3)
iscalledastronganalyticsignal.
Abovewehavejustprovedthefollowingtheorem.
Theorem2.4.Forastronganalyticsignalf(x)wehavethatHRef(x)=
Imf(x):
6
2.2.TheFouriertransform
TheFouriertransformisimportantinthetheoryofsignalprocessing.Whena
functionf(t)isreal,weonlyhavetolookonthepositivefrequencyaxisbecause
itcontainsthecompleteinformationaboutthewaveforminthetimedomain.
Therefore,wedonotneedthenegativefrequencyaxisandtheHilberttransform
canbeusedtoremoveit.Thisisexplainedbelow.
Letusde¯netheFouriertransformF(!)ofasignalf(t)by
F(!)=Z1
¡1f(t)e¡i!tdt: (2.5)
Thisde¯nitionmakessenseiff2L1(<);thatisifR1
¡1jf(t)jdtexists.Itis
importanttobeabletorecoverthesignalfromitsFouriertransform.Todothat
wede¯netheinverseFouriertransformas
ef(t)=1
2¼Z1
¡1F(!)ei!td!:
IfbothfandFbelongtoL1(<)thenf(t)iscontinuousandboundedforallreal
tandwehavethatef(t)=f(t);thatis[1]
f(t)=1
2¼Z1
¡1F(!)ei!td!: (2.6)
ThisresultisaformoftheFourierinversiontheorem.
Anothervariantoftheinversiontheorem[2]isthatiffbelongstoL1(<);f
isofboundedvariationinaneighbourhoodoftandfiscontinuousattthen
f(t)=limT!11
2¼ZT
¡TF(!)ei!td!:
Thismeansthat(2.6)istobeinterpretedasatypeofCauchyPrincipalvalue.
Furthermoregeneralvariantsoftheinversiontheoremexistforf2L1(<)but
arenotmentionedhere.
ThereisalsoatheoryfortheFouriertransformwhenf2L2(<)[2].Inthis
casewede¯netheFouriertransformas
F(!)=limN!1ZN
¡Nf(t)e¡i!tdt:
Themeanlimit
F(!)=limN!1FN(!);
istobeinterpretedas
limN!1kF(!)¡FN(!)k2=0:
7
NowF2L2(<)andtheinversionformulastatesthat
f(t)=limN!11
2¼ZN
¡NF(!)ei!td!:
OftenweneedtoconsidertheFouriertransformofasignalasitneitherbelongs
toL1(<)nortoL2(<).Thedeltafunctionissuchanexample.Thereisatheory
oftheFouriertransform,seee.g.[1],fortheresocalledtemperaturedistributions.
Thistheoryis,however,outsidethescoopofthisreport,butoccasionallyweuse
someresultsfromthistheory.
AusefulrelationisthePlancherelformula.
Theorem2.5.Iff,gandGbelongtoL1(<)oriffandgbelongtoL2(<)then
Z1
¡1f(t)g¤(t)dt=1
2¼Z1
¡1F(!)G¤(!)d!:
Proof.Foraproofwereferto[1].
Iff(t)isarealfunctionthatcanberepresentedbyaninverseFouriertransform
thenwehavethefollowingrelationshipinthetimedomain
f(t)=f¤(t)=1
2¼Z1
¡1F(!)ei!td!
=1
2¼Z1
¡1F¤(!)e¡i!td!
=1
2¼Z1
¡1F¤(¡!)ei!td!:
ThisgivesustherelationF(!)=F¤(¡!)orF(¡!)=F¤(!)inthefrequency
domainandweseethatFfornegativefrequenciescanbeexpressedbyF¤for
positiveones.
Theorem2.6.Iff(t)isarealfunctionthen
f(t)=1
2¼Z1
0h
F¤(!)e¡i!t+F(!)ei!ti
d!:
Proof.IfweapplytheFouriertransformonarealfunctionf(t)then
f(t)=1
2¼Z0
¡1F(!)ei!td!+1
2¼Z1
0F(!)ei!td!
=1
2¼Z1
0F(¡!)e¡i!td!+1
2¼Z1
0F(!)ei!td!
=1
2¼Z1
0³
F¤(!)e¡i!t+F(!)ei!t´
d!:
8
Figure2.5:TheamplitudesofF(!)andZf(!)asfunctionsof!:
Thismeansthatthepositivefrequencyspectraissu±cienttorepresentareal
signal.
Letusde¯neafunctionZf(!);thatiszeroforallnegativefrequenciesand
2F(!)forallpositivefrequencies
Zf(!)=F(!)+sgn(!)F(!); (2.7)
where
sgn(!)=8
><
>:1for!>0
0for!=0
¡1for!<0
andF(!)istheFouriertransformoftherealfunctionf(t).InFigure2.5wesee
therelation(2.7)betweenF(!)andZf(!).TheinversetransformofZf(!)is
thereforewrittenas
zf(t)=1
2¼Z1
¡1Zf(!)ei!td!=1
¼Z1
0F(!)ei!td!;
wherezf(t)isacomplexfunctionontheform
zf(t)=f(t)+ig(t): (2.8)
Wewillshowbelowthatg(t)isreal.From(2.7)and(2.8)wehavethat
f(t)+ig(t)F,F(!)+sgn(!)F(!): (2.9)
9
Thede¯nitionoftheFouriertransformtellsusthatf(t)F,F(!)andtherefore
weknowfrom(2.9)thatF(!)sgn(!)istheFouriertransformofig(t),thus
g(t)F,F(!)(¡isgn(!)):
Itisastandardresultthattheinversetransformof¡isgn(!)equals1=(¼t);that
is
g(t)=f(t)¤1
¼t=1
¼PZ1
¡1f(¿)
t¡¿d¿=Hf(t)=bf(t);
andweseethatg(t)canbewrittenasbf(t)whichisknownastheHilberttransform
off(t):Furthermoreg(t)isreal.
2.3.The§¼=2phaseshift
The§¼=2phaseshiftisinterpretedinthefrequencydomainasamultiplication
withtheimaginaryvalue§i,thus
H(!)=(
¡i=e¡i¼
2for!>0
i=ei¼
2for!<0
H(!)isunfortunatelynotapropertyofFouriertransformbuttheproblemcan
besolvedbyexpressingH(!)asalimitofaboundedfunctionG(!),thatis
G(!)=(
¡ie¡¾!for!>0
ie¾!for!<0
where
lim¾!0G(!)=H(!): (2.10)
ItisnowpossibletousetheinverseFouriertransformonG(!),thus
g(t)=F¡1G(!)
=1
2¼Z0
¡1ie¾!ei!td!+1
2¼Z1
0¡ie¡¾!ei!td!
=i
2¼Z1
0(e¡(¾+it)!¡e¡(¾¡it)!)d!
=i
2¼·
¡1
¾+ite¡(¾+it)!+1
¾¡ite¡(¾¡it)!¸1
0
=t
¼(¾2+t2):
10
whereg(t)!h(t)when¾!0andtheinverseFouriertransformoftheimpulse
responseofH(!)is
h(t)=lim¾!0g(t)=lim¾!0t
¼(¾2+t2)=1
¼t:
Aconvolutionbetweenf(t)andtheimpulseresponseh(t)givesus
bf(t)=1
¼Z1
¡1f(¿)
t¡¿d¿;
wherebf(t)isknownastheHilberttransform.Noticethatthisintegralshallbe
consideredasaprincipal-valuedintegralalimitthatcorrespondstothelimitin
(2.10).Tomakearigorouspresentationofthisproblemweshouldapplythe
distributiontheorybutthatisbeyondthescoopofthisreport.
3.PropertiesoftheHilberttransform
InthischapterwelookatsomepropertiesoftheHilberttransform.Weassume
thatF(!)doesnotcontainanyimpulsesfor!=0andthatf(t)isarealvalued
function.Someoftheformulasaretobeinterpretedinadistributionalsense.
3.1.Linearity
TheHilberttransformthatisaCauchyprinciple-valuedfunction,seeChapter1,
isexpressedontheform
Hf(t)=lim"!01
¼Z
jx¡tj>"f(¿)
t¡¿d¿:
Ifwewritethefunctionf(t)asc1f1(t)+c2f2(t)wheretheHilberttransformof
f1(t)andf2(t)existsthen
Hf(t)=H(c1f1(t)+c2f2(t))
=lim"!01
¼Z
jx¡tj>"c1f1(¿)+c2f2(¿)
t¡¿d¿
=c1lim"!01
¼Z
jx¡tj>"f1(¿)
t¡¿d¿+c2lim"!01
¼Z
jx¡tj>"f2(¿)
t¡¿d¿
=c1Hf1(t)+c2Hf2(t):
ThisisthelinearitypropertyoftheHilberttransform.
11
3.2.MultipleHilberttransformsandtheirinverses
TheHilberttransformusedtwiceonarealfunctiongivesusthesamerealfunction
butwithalteredsign
H2=¡I;
withIastheidentityoperator.TheHilberttransformusedfourtimesonthe
samerealfunctiongivesustheoriginalfunctionback
H2H2=H4=I: (3.1)
AmoreinterestingpropertyofmultipleHilberttransformsarisesifweusethe
Hilberttransform3times,thus
H3H=I)H¡1=H3:
ThistellsusthatitispossibletousethemultipleHilberttransformtocalculate
theinverseHilberttransform.
AsweseenbeforetheHilberttransformcanbeappliedinthetimedomain
byusingthede¯nitionoftheHilberttransform.Inthefrequencydomainwe
simplymultiplytheHilberttransformoperator¡isgn(!)tothefunctionF(!).
BymultiplyingtheHilberttransformoperatorbyitselfwegetaneasymethodto
domultipleHilberttransforms,thatis
Hnf(t)F
,(¡isgn(!))nF(!);
wherenisthenumberofHilberttransforms.
Example3.1.WewanttocalculatetheinverseHilberttransformofthefunction
f(t)byusingmultipleHilberttransformsinthefrequencydomain.Firstwehave
toFouriertransformthefunctionf(t)
F(!)=Z1
¡1f(t)e¡i!tdt;
andthenusetheHilberttransformthreetimesinthefrequencydomain,thatis
H3=(¡isgn(!))3:
FinallyweusetheinverseFouriertransform
H¡1f(t)=1
2¼Z1
¡1H3F(!)ei!td!:
Fromaboveweseethatweonlyhavetocalculatetwoin¯niteintegralsin
thefrequencydomaincomparedtothreein¯niteintegralsinthetimedomain.
Anotheradvantageinthefrequencydomainisthatweformallycanchoosethe
numberoftimeswewanttousetheHilberttransform.
12
3.3.DerivativesoftheHilberttransform
Theorem3.2.TheHilberttransformofthederivativeofafunctionisequivalent
tothederivativeoftheHilberttransformofafunction,thatis
f0(t)H,d
dtbf(t): (3.2)
Proof.FromDe¯nition1.1wehavethat
bf(t)=1
¼PZ1
¡1f(¿)
t¡¿d¿:
Ifwesubstitute¿witht¡s
bf(t)=1
¼PZ1
¡1f(t¡s)
sds;
andthenapplythederivativeoftonbothsidesweget
d
dtbf(t)=1
¼PZ1
¡1f0(t¡s)
sds:
Thesubstitutions=t¡¿givesusthat
d
dtbf(t)=1
¼PZ1
¡1f0(¿)
t¡¿d¿;
andtherelationin(3.2)isvalid.
Fromtheproofaboveweconcludethattherelationcanbeusedrepeatedly.
LetuslookatanexamplewherewealsomakeuseofmultipleHilberttransforms,
seeSection3.2.
Example3.3.By(3.2)wemaycalculatetheHilberttransformofthedeltafunc-
tion±(t)anditsderivatives.AtthesametimewegettheHilberttransformrep-
resentationofthedeltafunction.ConsidertheHilberttransformofthedelta
function
H±(t)=1
¼t:
Thederivativeofthedeltafunctioniscalculatedto
H±0(t)=¡1
¼t2; (3.3)
andifweapplytheHilberttransformonbothsidesthenweget
±0(t)=Hµ1
¼t2¶
:
13
Thederivativeof(3.3)is
H±00(t)=2
¼t3;
andwhenweapplytheHilberttransformonbothsidesweget
±00(t)=Hµ
¡2
¼t3¶
:
Thisprocedurecanbecontinued.
3.4.Orthogonalityproperties
AsymmetryfoundinSection2.2abouttheFouriertransformF(!)ofareal
functionf(t)leadsustodothefollowingde¯nition[6].
De¯nition3.4.AcomplexfunctioniscalledHermitianifitsrealpartiseven
anditsimaginarypartisodd.
FromthiswehavethattheFouriertransformF(!)ofarealfunctionf(t)is
Hermitian.
Theorem3.5.Arealfunctionf(t)anditsHilberttransformbf(t)areorthogonal
iff;bfandFbelongtoL1(<)oriffandbfbelongtoL2(<):
Proof.FromTheorem2.5wehavethat
Z1
¡1f(t)bf(t)dt=1
2¼Z1
¡1F(!)(¡isgn(!)F(!))¤d!
=i
2¼Z1
¡1sgn(!)F(!)F¤(!)d!
=i
2¼Z1
¡1sgn(!)jF(!)j2d!;
wheresgn(!)isanoddfunctionandthefactthatF(!)isHermitiangivesusthat
jF(!)j2isanevenfunction.Weconcludethat
Z1
¡1f(t)bf(t)dt=0;
andarealfunctionanditsHilberttransformareorthogonal.
14
3.5.EnergyaspectsoftheHilberttransform
Theenergyofafunctionf(t)iscloselyrelatedtotheenergyofitsFouriertrans-
formF(!).Theorem2.5withf(t)=g(t)iscalledtheRayleightheoremandit
helpsustode¯netheenergyoff(t)andF(!)as
Ef=Z1
¡1jf(t)j2dt=1
2¼Z1
¡1jF(!)j2d!: (3.4)
Hereitisnaturaltoassumethatf2L2(<)whichmeansthatEfis¯nite.The
sametheoremisusedtode¯netheenergyoftheHilberttransformoff(t)and
F(!);thatis
Ebf=Z1
¡1¯¯¯bf(t)¯¯¯2
dt=1
2¼Z1
¡1j¡isgn(!)F(!)j2d!; (3.5)
wherej¡isgn(!)j2=1exceptfor!=0:But,sinceF(!)doesnotcontainany
impulsesattheoriginwegetEbf=Ef.
Aconsequenceof(3.5)isthatf2L2(<)inducesthatbf2L2(<):Theaccuracy
oftheapproximatedHilberttransformoperatorcanbemeasuredbycomparing
theenergyin(3.4)and(3.5).However,aminordi®erenceinenergyalwaysexists
inrealapplicationsduetounavoidabletruncationerrors.
3.6.TheHilberttransformofstronganalyticsignals
FromSection3.2wehavethattheHilberttransformofastronganalyticsignal
z(t)is
Hz(t)=H³
f(t)+ibf(t)´
=bf(t)¡if(t)=¡iz(t): (3.6)
FromthisfollowstheresultoftheHilberttransformoftwomultipliedstrong
analyticsignals.
Theorem3.6.TheproductofH(z1(t))z2(t)isidenticalwiththeproductof
z1(t)H(z2(t))ifz1(t)andz2(t)arestronganalyticsignals.
Proof.Sincez1(t)andz2(t)arestronganalyticsignalsthen
H(z1(t))z2(t)=³bf1(t)¡if1(t)´³
f2(t)+ibf2(t)´
(3.7)
=¡i³
f1(t)+ibf1(t)´³
f2(t)+ibf2(t)´
=¡iz1(t)z2(t)
=³
f1(t)+ibf1(t)´³bf2(t)¡if2(t)´
(3.8)
=z1(t)H(z2(t)); (3.9)
wherewemakeuseof(3.6)in(3.7)and(3.8).
15
Theorem3.7.Theproductofz1(t)z2(t)isidenticalwiththeproductiH(z1(t))z2(t)=
iz1(t)H(z2(t))ifz1(t)andz2(t)arestronganalyticsignals.
Proof.Sincez1(t)andz2(t)arestronganalyticsignalsthen
z1(t)z2(t)=³
f1(t)+ibf1(t)´³
f2(t)+ibf2(t)´
=i³bf1(t)¡if1(t)´³
f2(t)+ibf2(t)´
=iH(z1(t))z2(t)=iz1(t)H(z2(t));
andthetheoremfollows.
TheHilberttransformoftheproductoftwostronganalyticsignalsgivesus
thesameresultasin(3.9).Toprovethiswe¯rstneedtoshowthattheproduct
oftwostronganalyticsignalsisstronganalytic.
Theorem3.8.Theproductoftwostronganalyticsignalsisstronganalytic.
Proof.Letz1(t00)andz2(t00)beanalyticsignalsofthecomplexvariablet00=t+it
intheopenupperhalf-plane.Thenz1(t00)z2(t00)isalsoananalyticsignalinthe
sameregion.Assumethatz1(t00)andz2(t00)aredecreasinginsucharateat
in¯nitythatthediscussioninSection2.1istruethenz1(t)andz2(t)arestrong
analyticsignals.Ifz1(t00)andz2(t00)aredecreasingsu±cientlyrapidatin¯nity
thenz1(t00)z2(t00)havetodecreasefasterthantheoneofz1(t00)andz2(t00)that
isdecreasingwiththeleastrate.FromthiswehavethatH(Re(z1(t)z2(t)))=
Im(z1(t)z2(t))andthatz1(t)z2(t)isastronganalyticsignal.
Theorem3.9.H(z1(t)z2(t))=¡iz1(t)z2(t)ifz1(t)andz2(t)arestronganalytic
signals.
Proof.Sincez1(t)andz2(t)arestronganalyticsignalsthen
H(z1(t)z2(t))=H³
f1(t)+ibf1(t)´³
f2(t)+ibf2(t)´
=H(f1(t)f2(t)¡bf1(t)bf2(t)
+i³
f1(t)bf2(t)+bf1(t)f2(t)´
)
=f1(t)bf2(t)+bf1(t)f2(t)
¡i³
f1(t)f2(t)¡bf1(t)bf2(t)´
(3.10)
=¡i(f1(t)f2(t)+if1(t)bf2(t)
+ibf1(t)f2(t)¡ibf1(t)bf2(t))
=¡i³
f1(t)+ibf1(t)´³
f2(t)+ibf2(t)´
=¡iz1(t)z2(t);
16
wherewemakeuseofTheorem3.8in(3.10).
ConsequentlyitispossibletoapplytheHilberttransformontheproductof
twostronganalyticsignalsinseveraldi®erentways,thus
H(z1(t)z2(t))=H(z1(t))z2(t)=z1(t)H(z2(t))=¡iz1(t)z2(t):
ItdoesnotmatteronwhichstronganalyticsignalweapplytheHilberttransform.
WeconcludethattheHilberttransformoftheproductofnstronganalyticsignals
formtheequation
Hzn(t)=H(z(t))zn¡1(t)=¡iz(t)zn¡1(t)=¡izn(t):
3.7.Analyticsignalsinthetimedomain
TheHilberttransformcanbeusedtocreateananalyticsignalfromarealsignal.
Insteadofstudyingthesignalinthefrequencydomainitispossibletolookata
rotatingvectorwithaninstantaneousphase'(t)andaninstantaneousamplitude
A(t)inthetimedomain,thatis
z(t)=f(t)+ibf(t)=A(t)ei'(t):
Thisnotationisusuallycalledthepolarnotationwhere
A(t)=q
f2(t)+bf2(t);
and
'(t)=arctanÃbf(t)
f(t)!
:
IfweexpressthephasewithaTaylorseriesthen
'(t)='(t0)+(t¡t0)'0(t0)+R;
whereRissmallwhentisclosetot0.Theanalyticsignalbecomes
z(t)=A(t)ei'(t)=A(t)ei('(t0)¡t0'0(t0))eit'0(t0)eiR;
andweseethat'0(t0)hastheroleoffrequencyifRisneglected.Thismakesit
naturaltointroducethenotionofinstantaneous(angular)frequency,thatis
!(t)=d'(t)
dt:
17
Example3.10.WehavearealsignalanditsHilberttransform
f(t)=cos(!0t);
bf(t)=sin(!0t):
Togethertheyformananalyticsignalwheretheinstantaneousamplitudeis
A(t)=q
cos2(!0t)+sin2(!0t)=1:
Theinstantaneousfrequencyiseasytocalculatefromthephase'(t)=!0t,that
is
!(t)=!0:
Weseethatinthisparticularcasetheinstantaneousfrequencyisthesameasthe
realfrequency.
4.NumericalcalculationsoftheHilberttransform
Thepurposeofthischapteristostudydi®erenttypesofnumericalcalculation
methodsfortheHilberttransform.
4.1.Continuoustime
4.1.1.Numericalintegration.
Numericalintegrationworks¯neonsmoothfunctionsthatdecreaserapidlyat
in¯nity.WhenwewanttocalculatetheHilberttransformbyDe¯nition1.1we
arefacingsomeproblems.Innumericalintegrationweuse¯niteintervalsandit
isthereforeimportanttoconsidertheintegrationregiontocontrolthecalculation
error.Thisisthereasonwhyarapiddecreaseatin¯nityisanadvantage.Another
problemisthattheintegrandinDe¯nition1.1isin¯nitewhenthenominatorvan-
ishes.However,byusingmoreintegrationgridpointsinthenumericalintegration
closetothisvaluewegetabetterapproximation.
4.1.2.Hermitepolynomials
Thenumericalintegrationisine±cientwhenafunctiondecreasesinaslowrate
atin¯nity.Itissometimesbettertouseaseriesoforthogonalpolynomialswhere
thefunctiondoesnothavetodecreaserapidatin¯nity.Inthissectionweusethe
HermitepolynomialstocalculatetheHilberttransform.Firstweneedtotakea
lookatthede¯nitionoftheHermitepolynomials.
18
Thesuccessivedi®erentiationoftheGaussianpulsee¡t2
generatesthenth
orderHermitepolynomialwhichisde¯nedbyRodrigues'formulaas[4]
Hn(t)=(¡1)net2dn
dtne¡t2
:
ItisalsopossibletocalculatetheHermitepolynomialsbytherecursionformula
[3]
Hn(t)=2tHn¡1(t)¡2(n¡1)Hn¡2(t); (4.1)
withn=1;2;3;::.andthestartcondition
H0(t)=1:
Letusalsode¯netheweightedHermitepolynomialsthatisweightedbythe
generatingfunctione¡t2
ontheform[3]
gn(t)=Hn(t)e¡t2
=(¡1)ndn
dtne¡t2
:
TheweightedHermitepolynomialsgn(t)donotrepresentanorthogonalsetinL2
sincethescalarproduct
Z1
¡1gn(t)gm(t)dt=Z1
¡1Hn(t)Hm(t)e¡2t2
dt;
isingeneraldi®erentfromzerowhenn6=m.Thesolutionistoreplacethe
weightingfunctione¡t2
withe¡t2
2,thatis
Z1
¡1Hn(t)Hm(t)e¡t2
dt=(
0forn6=m
2nn!p¼forn=m
BythattheweightedHermitepolynomialsful¯ltheconditionoforthogonality.
Theweightedpolynomiale¡t2
2Hn(t)dividedbytheirnormq
2nn!p¼yieldsaset
oforthonormalfunctionsinL2andiscalledtheHermitefunction
'n(t)=e¡t2
2Hn(t)q
2nn!p¼: (4.2)
Ifwecombine(4.1)and(4.2)wegettherecursivealgorithm
'n(t)=s
2(n¡1)!
n!t'n¡1(t)¡(n¡1)s
(n¡2)!
n!'n¡2(t);(4.3)
whichcanbeusedtoderivetheHilberttransformoftheHermitefunctionsby
applyingthe"multiplicationbyt"theorem[3].
19
Theorem4.1.Ifweassumethatf(t)andbf(t)belongtoL1thentheHilbert
transformoftf(t)isgivenbytheequation
H(tf(t))=tbf(t)¡1
¼Z1
¡1f(¿)d¿:
Theintegralisaconstantde¯nedbythefunctionf(t).Foroddfunctionsthis
constantequalszero.
Proof.ConsidertheHilberttransformoftf(t)
H(tf(t))=1
¼PZ1
¡1¿f(¿)
t¡¿d¿:
Theinsertionofanewvariables=t¡¿yields
H(tf(t))=1
¼PZ1
¡1(t¡s)f(t¡s)
sds
=1
¼PZ1
¡1tf(t¡s)
sds¡1
¼Z1
¡1f(t¡s)ds
=tH(f(t))¡1
¼Z1
¡1f(¿)d¿;
andthetheoremfollows.
FromTheorem4.1andfrom(4.3)wehavethat
H('n(t))=b'n(t)=s
2(n¡1)!
n!µ
tb'n¡1(t)¡1
¼Z1
¡1'n¡1(´)d´¶
¡(n¡1)s
(n¡2)!
n!b'n¡2(t); (4.4)
wheren=1;2;3:::.The¯rstterm'0(t)canbecalculatedbyusingtheFourier
transformonequation(4.2),thatis
'0(t)=¼¡1
4e¡t2
2F,p
2¼1
4e¡!2
2:
InthefrequencydomainwemultiplytheHermitefunction'0(t)bytheHilbert
transformer¡isgn(!)and¯nallyweusetheinverseFouriertransformtogetthe
HilberttransformoftheHermitefunction,thatis
H('0(t))=b'0(t)=p
2¼1
4Z1
¡1e¡!2
2(¡isgn(!))ei!td!:
20
Sincesgn(!)e¡!2
2isoddwehave
b'0(t)=2p
2¼1
4Z1
0e¡!2
2sin(!t)d!; (4.5)
whichcanbeusedin(4.4)toderivetherestoftheHilberttransforms.
IthasbeenfoundthattheerrorislargeforhigherorderoftheHilberttrans-
formedHermitefunctions(e.g.b'5(t))whenweusetherecursiveformula(4.4).
Thise®ectiscausedbythe¯niteaccuracyinthecalculationoftheintegralin(4.5)
wheretheerrorincreasesin(4.4).Itisthereforenotsuitabletousetherecursive
methodtocalculatetheHilberttransformforhigherorderHermitefunctions.
AnothermethodtocalculatetheHilberttransformbytheHermitefunctions
istomultiplytheHilberttransformerbythespectrumoftheHermitefunction
andusetheinverseFouriertransform.Noin¯niteintegralsisneededinthe
calculationsoftheHermitefunctions.Thereforetheerrordoesnotpropagateas
in(4.4).
Theseriesexpansionoff(t)canbewrittenas
f(t)=1X
n=0an'n(t);
where
an=Z1
¡1f(t)'n(t)dt:
Iftheseriesexpansionf(t)islimitedatin¯nitytherewillbeanerror"N(t),that
is
f(t)=N¡1X
n=0an'n(t)+"N(t):
ThisseriesexpansioncanalsobeusedtocalculatetheHilberttransform
Hf(t)=N¡1X
n=0anb'n(t)+b"N(t); (4.6)
andweseethatthiskindofmethodisusefulforfunctionswhereb"N(t)issmall.
TocalculatetheHilberttransformof'n(t)byusingtheinverseFouriertrans-
formontheproductoftheHermitefunctionspectraandtheHilberttransformer
isaratherdemandingmethod.However,theHermitefunctionsneverchangeand
wethereforeonlyhavetocalculatetheirHilberttransformsoncewhilean,which
dependsonf;representsaneasyintegraltocalculate.
21
Figure4.1:ApproximationbyaFourierseriesef(t)withitsHilberttransform
Hef(t),n=30:
4.1.3.Fourierseries
IfwecreateaFourierseriesofafunctionf(t)andchangesthesinefunctionsto
cosfunctionsandcosfunctionstosinefunctionswegettheHilberttransformof
f(t).Thismethodgivesusatheability,inaneasyway,tostudytheunavoidable
truncationerrors(a¯nitenumberoftermsintheFourierseries)fortheHilbert
transformofaperiodicrectangularwave.InFigure4.1weseethatthepeaksof
theHilberttransformonlyare1.5intheirmaximaandminimawhiletheyshould
havebeenin¯nite.TheimplementationincomputercodeoftheFourierseriesin
Figure4.1isfoundinAppendixA.2.
4.2.DiscreteFouriertransform
ToderivethediscreteHilberttransformweneedthede¯nitionofthediscrete
Fouriertransform(DFT),thatis
F[k]=N¡1X
n=0f[n]e¡i2¼
Nkn;k=0;1;:::;N¡1; (4.7)
andtheinversionformula
f[n]=1
NN¡1X
k=0F[k]ei2¼
Nkn;n=0;1;:::;N¡1: (4.8)
wherekisthediscretefrequencyandnisthediscretetime.Itiseasytoprove
(4.8)byinserting(4.8)into(4.7).Notethat(4.8)de¯nesaperiodicfunctionwith
22
periodN.Letusexpand(4.7)initsrealandimaginarypartsonbothsides,thus
F[k]=FRe[k]+iFIm[k];
andN¡1X
n=0f[n]e¡i2¼
Nkn=N¡1X
n=0f[n]cos(2¼
Nkn)¡iN¡1X
n=0f[n]sin(2¼
Nkn):
Therealandimaginarypartisnowidenti¯edas
FRe[k]=N¡1X
n=0f[n]cos(2¼
Nkn);
FIm[k]=¡N¡1X
n=0f[n]sin(2¼
Nkn);
andweconcludethatFIm=0whenk=0andk=N=2:Aswehaveseenbefore
theHilberttransformofthedeltapulse±(t)givesustheHilberttransformer
1=(¼t)andtheFouriertransformoftheHilberttransformergivesusthesignshift
function¡isgn(!);thatis
±(t)H
,1
¼tF
,¡isgn(!): (4.9)
ThediscreteanalogueoftheHilberttransformerin(4.9)forevenNistherefore
givenby
H[k]=8
><
>:¡i
0
ifork=1;2;:::;N=2¡1
fork=0andN=2
fork=N=2+1;:::;N¡2;N¡1;
andH[k]canbewrittenontheform
H[k]=¡isgn(N
2¡k)sgn(k). (4.10)
Herewehaveusedtheconventionthatsgn(0)=0.Thediscretefrequencykis
calledpositiveintheinterval0<k<N=2andnegativeintheintervalN=2<
k<NandalternatesignatN=2.
ThediscreteinverseFouriertransformofthediscreteHilberttransformerin
(4.10)givesusthediscreteimpulseresponseinthetimedomain,forevenN,thus
h[n]=1
NN¡1X
k=0H[k]ei2¼
Nkn
=1
NN¡1X
k=0¡isgn(N
2¡k)sgn(k)ei2¼
Nkn
=2
NN
2¡1X
k=1sin(2¼
Nkn); (4.11)
23
Figure4.2:ThediscreteimpulseresponseoftheHilberttransformforeven
N(N=10)givenbythecotangentfunctionwitheverysecondsample(n=
0;2;4;:::)erasedbysin2(¼n=2):
andh[n]canbeexpressedinclosedformas
h[n]=2
Nsin2(¼n
2)cot(¼n
N): (4.12)
Thefunctionisgivenbythecotangentfunctionwitheverysecondsample(n=
0;2;4;:::)erasedbysin2(¼n=2);seeFigure4.2.
ThesamederivationforoddNisgivenby
H[k]=8
><
>:¡i
0
ifork=1;2;:::;(N¡1)=2
fork=0
fork=(N+1)=2;:::;N¡2;N¡1:
Itiswrittenonthesameclosedformasintheevencasewiththedi®erencethat
thereisnocancellationforsgn(N=2¡k)thatis
H[k]=¡isgn(N
2¡k)sgn(k): (4.13)
ThediscreteimpulseresponseforoddNoftheHilberttransformerin(4.9)is
givenbythediscreteinverseFouriertransformofH[k]in(4.13),thus
h[n]=2
NN¡1
2X
k=1sin(2¼
Nkn);
24
Figure4.3:ThediscreteimpulseresponseoftheHilberttransformforoddN
(N=11)witheverysecondsamplepositivewithnextsamplenegative.
wheretheclosedformofh[n]canbeexpressedas
h[n]=1
NÃ
cot(¼n
N)¡cos(¼n)
sin(¼n
N)!
: (4.14)
AswementionedbeforewedonothavethesamecancellationforoddN(4.14)
asforevenN(4.12),insteadh[n]ischangingsignbyoddandevenvaluesofn,
seeFigure(4.3).
ThediscreteHilberttransformofthesequencebf[n]isde¯nedbyconvolution
ontheform
bf[n]=N¡1X
m=0h[n¡m]f[m]: (4.15)
IfweinsteadchoosetousetheDFTalgorithmwethenhavethefollowingrelations
f[n]DFT)F[k]DHT)bF[k]=¡isgn(N
2¡k)sgn(k)F[k]DFT¡1
)bf[n];(4.16)
whereDFTdenotesthediscreteFouriertransform,DHTdenotesthediscrete
HilberttransformandDFT¡1denotesthediscreteinverseFouriertransform.
Thediscreteconvolutionalgorithm(4.15)isfasterthantheDFTalgorithm
(4.16)becauseitinvolvesonlyasinglesummation.HowevertheDFTalgorithm
maybereplacedbyafastFouriertransformalgorithm(FFT).
TheaccuracyofthediscreteFouriertransformwhenappliedtocontinuous
signalsisdependingonhowmanysampleswehaveinourcalculation(Asample
isthesameasonesinglevalueofafunctionforonespeci¯ctime).Itisimportant
thatthesamplefrequencyishigherthandoublethesignalfrequency,thatisthe
Nyqvistfrequency.
25
Figure4.4:TheFouriertransformeF(w)byN=10termsofthefunctionf(t)=
cos(2t):
Example4.2.AssumethatwewanttocalculatethediscreteHilberttransform
ofasine-wavef(t)=cos(2t)withN=10samplesusingtheDFTalgorithm
accordingto(4.16)wherethesamplingfrequencyis5=¼andthesignalfrequency
is1=¼:FirstweneedtocalculatethediscreteFouriertransform(4.7)off(t).Then
weneedtouse(4.11)(Neven)toapplytheinversediscreteFouriertransform
ontheproductofthediscreteHilberttransformoperatorH[k]in(4.13)andthe
discreteFouriertransformoff(t):Thede¯nitionofthediscreteFouriertransform
givesus(seeFigure4.4)
eF[k]=N¡1X
n=0f[n]e¡i2¼
Nkn=9X
n=0cosµ2¼
5n¶
e¡i¼
5kn:
Byusing(4.11)wegettheHilberttransformHf[n]inthetimedomain(Neven)
Hf[n]=2
NN
2¡1X
k=1eF[k]sin(2¼
Nkn)
=1
54X
k=1Ã9X
n=0cosµ2¼
5n¶
e¡i¼
5kn!
sin(¼
5kn);
Thefactthatthisisanharmonicperiodicsignal(ofsinandcos)andthatthe
samplingrateismorethandoublethesignalfrequencygivesustheexactanswer,
seeFigure4.5.TheimplementationincomputercodeisfoundinAppendixA.3.
Example4.3.WewanttocalculatetheHilberttransformoff(t)=1=(t2+1)
withN=2termsoftheHermitianpolynomialin(4.6)andusen=20termsof
26
Figure4.5:f(t)anditsHilberttransformHef(t).
thediscreteFouriertransformin(4.7)and(4.11).
Firstweneedtocalculate'0(t);:::;'2(t)by(4.2)or(4.3)andthenb'0(t);:::;b'2(t)
asinExample4.2.anispossibletocalculatewithanumericalintegrationmethod
becausetheintegralconvergessu±cientlyrapidatin¯nity.InFigure4.6wecan
seethefunctionf(t)anditsapproximatedHilberttransformHy(t)comparedto
theknownHilberttransformHf(t)=t=(t2+1).Theimplementationincomputer
codeisfoundinAppendixA.1.
5.Anapplication
Insignalsystemsweoftenmakeuseofmodulatedsignals.Onebigproblemwhen
wemodulateasignalisthatitsspectrummirrorsitselfonbothsidesofthecarrier
frequency.Onlyoneofthesespectra,orsidebands,isneededtodemodulatethe
signalandthereforewehaveredundantinformation.Therearedi®erenttech-
niquestoremoveoneofthesidebandsandtherebycreateasinglesidebandsignal
(SSB).Themostsimpleoneistousealow-pass¯lterwiththemiddleofthe
transitionbandonthecarrierfrequency.Thistechniquedemandsthatwehavea
narrowtransitionbandandagoodsuppressionwhichishardtoobtain.Another
techniqueistousetheHilberttransformwhereweremoveoneofthesidebands
byaddingthesignaltoitself.Intheorywewillgetatransitionbandthatiszero
andasuppressionthatisin¯nite.
LetususetheHilberttransformtocreateanamplitudemodulatedSSBsignal
(AM-SSB)withaPhase/Hilbertmodulator,seeFigure5.1.
Theincomingsignal
fm(t)=sin(!mt); (5.1)
27
Figure4.6:Thefunctionf(t)anditsHilberttransformHf(t)andHy(t)asthe
approximatedHilberttransform.
Figure5.1:Phase/Hilbertmodulator.
28
isdividedintwopartswhereoneispreservedandtheotheroneispassingthrow
aHilbert¯lter,thatis
bfm(t)=cos(!mt):
Wemodulatethepreservedsignalfm(t)withasine-signalsin(!ct)withthecarrier
frequency!c,thus
fmc(t)=sin(!mt)sin(!ct):
Tomodulatebfm(t)weneeda¼=2phaselagonthecarrierfrequencywhichgives
usacos(!ct)function,seeFigure5.1,thatis
bfmc(t)=cos(!mt)cos(!ct):
Withsomehelpfromthetrigonometrywegetthat
fmc(t)=1
2(cos((!m¡!c)t)¡cos((!m+!c)t));
and
bfmc(t)=1
2(cos((!m¡!c)t)+cos((!m+!c)t)):
Finallyweaddfmcandbfmcwhichgivesus
s(t)=cos((!m¡!c)t);
andwehavealowerAM-SSBsignal.Ifweinsteadsubtractfmcandbfmcweget
anupperAM-SSBsignal.
Thedelay-boxinFigure5.1hasthesamedelayastheHilbert¯lter.Thedelay
isneededinrealapplicationstosynchronizethetwosignalsfm(t)andbfm(t).
29
A.Appendix
A.1.ImplementationoftheHermitepolynomial
ImplementedinMathematica.
t:=t;
x:=x;
k:=k;
Hy=0;
f=1/(t^2+1);
Hf=t/(t^2+1);
a=-In¯nity;
b=In¯nity;
m=2;
M=20;
Do[
Fi=E^(-t^2/2)*HermiteH[n,t]/Sqrt[2^n*n!*Sqrt[Pi]];
FFi=Sum[Fi*E^(-I*2*Pi*k*t/M),ft,0,M-1g];
HFi=Re[2/M*Sum[FFi*Sin[(2*Pi*k*t)/M],fk,1,M/2-1g]];
Hy+=Integrate[f*Fi,ft,a,bg]*HFi,
fn,0,mg]
Plot[ff,Hf,Hyg,ft,-10,10g,AxesLabel->f"t","f(t),Hf(t),Hy(t)"g];
30
A.2.ImplementationoftheFourierseries
ImplementedinMathematica.
t:=t;
k:=k;
y=Hy=0;
f=1;
a=-1;
b=1;
m=30;
Do[
If[k<1,
an=1/(2*Pi)*Integrate[f,ft,a,bg],
an=1/Pi*Integrate[f*Cos[k*t],ft,a,bg];
bn=1/Pi*Integrate[f*Sin[k*t],ft,a,bg];
y+=an*Cos[k*t]+bn*Sin[k*t],
fk,0,mg]
Do[
Han=1/Pi*Integrate[f*Sin[k*t],ft,a,bg];
Hbn=1/Pi*Integrate[f*Cos[k*t],ft,a,bg];
Hy+=Han*Cos[k*t]+Hbn*Sin[k*t],
fk,1,mg]
Plot[fy,Hy,f*(Sign[b-t]+Sign[t-a])/2g,ft,-5,5g,AxesLabel->f"t","f(t)"g];
Print["f(t)=",f,"from",a,"to",b,"calculatedby",m,"terms."]
31
A.3.ImplementationoftheFouriertransform
ImplementedinMathematica.
n:=n;
k:=k;
M=10;
Freq=2;
f=Cos[2*Pi/M*n*Freq];
F=Sum[f*E^(-I*2*Pi*k*n/M),fn,0,M-1g];
Hf=2/M*Sum[F*Sin[(2*Pi*k*n)/M],fk,1,M/2-1g];
Plot[Abs[F],fk,-M/2,M/2g,AxesLabel->f"w","F(w)"g];
Plot[ff,Hfg],fn,-2*M/Pi,2*M/Pig,AxesLabel->f"t","f(t),Hf(t)"g];
32
References
[1]AnianssonJ.etal,Fouriermetoder,KTH,Stockholm,1989.
[2]GoldbergR.R.,Fouriertransforms,Cambrigeuniversitypress,Cambridge.
[3]HahnStefanL.,Hilberttransformsinsignalprocessing,ArtechHouse,Inc.,
Boston,1996.
[4]LennartHellstrÄom,LinjÄaranalys,HÄogskolaniVÄaxjÄo,1995.
[5]HenriciPeter,Appliedandcomputationalcomplexanalysis,Volume1,John
Wiley&Sons,Inc.,NewYork,1988.
[6]ProakisJohnG.,SalehiMasoud,Communicationsystemsengineering,
Prentice-Hall,Inc.,NewJersey,1994.
[7]Sa®E.B.,SniderA.D.,Complexanalysisformathematics,sienceanden-
ginering,Prentice-Hall,Inc.,NewYork,1976.
33