12

Mathematics and applications of the Hartley and Fourier Transforms

Embed Size (px)

Citation preview

Page 1: Mathematics and applications of the Hartley and Fourier Transforms
Page 2: Mathematics and applications of the Hartley and Fourier Transforms

Mathematics and Applications 

of the Twin 

" Hartley and Fourier Transforms" 

i. Introduction 

At the end of the eighteenth century and beginning of the nineteenth century the world around us have been changed , the new era of scientific renaissance has been birthed with the emergence of the transform methods. These methods  is the basis of many of techniques and discoveries at the present time because of its capabilities to transfer the functions between different worlds. and one of  the  famous methods are Fourier Transform and  its successor Hartley Transform which are  the subject of our present . The Fourier  ( by  Joseph Fourier)   and Hartley  (by R. V. L. Hartley) transform methods are  integral methods  with  a  kernel  functions  that  transform  the  functions  (signals)  from  time  domain  to frequency domain , Based on the fact that " any function in our life is just a series of combination of sinusoidal signals or complex exponential ". as shown in figure (1) below .  

Aperiodic function  Periodic function  

Figure(1) func ons in time and frequency domains   So , the Hartley and Fourier Transform methods in its general concept is just a way that "change our sight  to  a  function  from  the  front  view  (along  the  time  domain)  to  the  side  view  (along  the frequency domain)" . in fact they work like a machine that sucks the whole function (domain , range and properties ) as an input and manipulates it by its heart or its engine part that called  the "kernel function"  and  then  produces  a  new  function  as  an  output  with  a  new  (domain  ,  range  and properties  )  , however  these  functions are  related  to each other where  the changes  in each one means changes in the other . On the other hand  , the complexity of these transformations are depending on the complexity of the  input  and  kernel  functions  .  this means  ,the  complexity  of  transform  is  associated with  the number  of  the  domains  (dimensions)  of  these  function whenever  the  dimensions  (domains)  are increased the complexity will also increases . In this report we will address to the relations between Fourier and Hartley transform by doing some comparisons and proofs that lead to consideration these transform methods are a twin and at the end we will present some of the benefits that be obtained from these methods . 

Page 3: Mathematics and applications of the Hartley and Fourier Transforms

ii. FT and HT formulas (Relation and Proofs ) 

In this section we will address to the Kernel Function of both Fourier and Hartley transform method and  the  relation between  FT and HT Equation and we will proof  the  capability of writing  the  FT equations (General ,  Amplitude and Phase equations )  in terms of HT equation components , and in the  rest  part  of  these  section  we  will  try  to  prove  (mathematically  and  by  using  MATLAB implementation codes) that the FT and HT outputs and most of their properties (like Scallimg and Modulation ) are the same .  

Kernel Function The Hartley transform  is purely real and fully equivalent to the well‐known Fourier transform. It  is an offshoot of the Fourier transform with the same physical significance as that of  its progenitor. The  two  transforms  are  closely  related  .  So both  Fourier  and Hartley  transforms  furnish  at each frequency a pair of numbers that represent a physical oscillation in amplitude and phase and in tum they give the same  information substantiates that the Hartley transform can equally be applicable to all fields where the Fourier transform is currently being used. But the main difference between them is the nature of kernel function . as shown below  

Fourier Transform Equation  Hartley Transform Equation 

F w f t e dt 

 

H w f t cas wt dt 

 

Where the kernel function of Fourier Transform (e  as shown in figure (2) is a complex function which  needs  of  four  dimension  (real  ,  imaginary  domains  &  magnitude  ,  phase  ranges)    to represented it and based on the first section of this report , we mentioned that "the complexity of the transform method  is  increased when the complexity of   kernel function  is  increased "  , hence the solving by using this method will be more complicated .  

 Figure (2) Fourier Transform Kernel (e  

 

While  the kernel  function of Hartley  transform  (cas wt ) as shown  in figure  (3)  is a  real  function that  consist  of  one  domain  and  range  and  can  be  represented  in  plane  coordinate  ,  hence  the solving by using this method will be more simplicity than Fourier . 

Figure (3) Hartley Transform Kernel (cas wt cos wx sin wx  ) 

Page 4: Mathematics and applications of the Hartley and Fourier Transforms

FT and HT related equations (proofs) The well‐known Fourier Transform (FT) general equation can be defined as :  

 

  

Where R(w) and I(w) are the real and negative imaginary components of the Fourier Transform .  while the Hartley Transform (HT) general equation can be defined as : 

 

 

 Where  E(w)  and  O(w)  are  the  even  and  odd  components  of  Hartley  Transform  which  can  be expressed by other ways as shown in the two sections (A & B) below :  A‐ Even component 

 

                               

                                                              

                                

2 ∗  

 

B‐ Odd component 

 

                               

                                                              

                                

2 ∗  

 

 

Page 5: Mathematics and applications of the Hartley and Fourier Transforms

and based on what we mentioned previously (The FT and HT methods close to each other and they work as a Twin ) , we will find that :  

1‐ the ( ) of Fourier Transform equal to the ( ) of Hartley Transform . 

2‐ and the (‐ ) equal to the ( ) . 

 Hence the FT equation can be expressed in terms of the HT components as shown below  

2

∗2

 

  And  the same  thing  for Fourier Amplitude and Phase equations  , we can expressed  it  in  terms of Hartley transform components as shown in section (C & D) below : C‐ For amplitude 

∗ 2 where  

∗ 2 where  

14∗ 2

14∗ 2  

14

2 2  

142 2  

2

Bytakingthesquarerootwewillgetthesameresultoftheequationabove:

D‐ For phase 

 

 

/  

 But , Fourier and Hartley phases differ by a constant due to the presence of the negative sign and hence they can be related as:  

Page 6: Mathematics and applications of the Hartley and Fourier Transforms

 

FT & HT magnitude result similarity‐Example 

In this part , we will try to find the FT and HT of the square signal  f(t) as  shown  in  the  figure(4)  ,then we will  compare between  the  results  that will  show  the  similarity  of  their results . At the end  , we are sketching the results by using MATLAB as shown in figure (5) and (6)   .  

1 1 10

                                                                                                                         ‐ In Fourier Transform: 

1 ∗  

 

11

1

1

2

2

  

2sin 2 ∗

sin2 ∗  

                                                                                                                      ‐ In Hartley Transform: 

cos sin 1 ∗ cos 1 ∗ sin  

 

sin 1

1

cos 11

1 sin sin cos cos  

 

 

1 sin sin cos cos

1 sin sin cos cos  

 

1 2 ∗ sin 2 ∗

sin2 ∗  

Figure(5)  Figure(6)  

Figure(4) 

Page 7: Mathematics and applications of the Hartley and Fourier Transforms

MATLAB Implementation of (Scaling and Modulation properties ) 

Scaling property [h( )=a H(aw)] 

Fourier Transform‐Codes  Hartley Transform‐Codes 

clc; clear all; close all; %----------- function f(t)----------- t=-4 : pi/180 : 4; f = zeros(size(t)); f=heaviside(t+2)-heaviside(t-2); figure(2); subplot(2,1,1); plot(t,f,'LineWidth',2); xlabel('t (sec)'); ylabel('f(t)'); axis([-4 4 0 1.5]) title('Function of t where a=1'); grid %-------------Fourier transform------------ omega = [-50 : 0.1 : 50]; F = zeros(size(omega)); for i = 1 : length(omega) F(i) = trapz(t,f.*exp(-1i*omega(i)*t)); %Fourier Transform end F_magnitude = abs(F); %Magnitude of the Fourier Transform subplot(2,1,2); plot(omega,F_magnitude,'LineWidth',2); xlabel('\omega'); ylabel('|F(j\omega)|'); title('Fourier Transform Magnitude'); grid 

clear all; clc %----------- function f(t)----------- t=-4 : pi/180 : 4; f = zeros(size(t)); f=heaviside(t+1)-heaviside(t-1); figure(2); subplot(2,1,1); plot(t,f,'LineWidth',2); xlabel('t (sec)'); ylabel('f(t)'); title('Function of t when a=1/2'); axis([-4 4 0 1.5]) grid %-------------Hartley Transform------------ omega = [-50 : 0.1 : 50]; F = zeros(size(omega)); for i = 1 : length(omega) F(i) = trapz(t,f.*(cos(omega(i)*t)+sin(omega(i)*t))); %Hartley Transform integral end F_magnitude = abs(F); %Magnitude of the Hartley Transform subplot(2,1,2); plot(omega,F_magnitude ,'LineWidth',2); xlabel('\omega '); ylabel('|F(j\omega)|'); title('Hartley Transform Magnitude'); grid 

 

Fourier Transform  Hartley Transform 

   

Page 8: Mathematics and applications of the Hartley and Fourier Transforms

 

  

 

  

 

Modulation property 

Carrier and Signal‐Codes  Carrier and Signal ‐ sketch 

%----------- Carrier ----------% t = -2*pi : pi/180 : 2*pi; fs=cos(10*t); subplot(2,1,1); plot(t,fs,'LineWidth',2); xlabel('t (sec)'); ylabel('carrier'); axis([-4 4 -1.5 1.5]) title('Carrier Signal [ cos(10t) ]'); grid %---------- Signal -----------% fc = zeros(size(t)); fc=heaviside(t+1)-heaviside(t-1); subplot(2,1,2); plot(t,fc,'LineWidth',2); axis([-4 4 0 1.5]) xlabel('t (sec)'); ylabel('signal'); title('Square signal [ u(t+1)-u(t-1)]'); grid

 

 

Page 9: Mathematics and applications of the Hartley and Fourier Transforms

Fourier Modulation‐Codes Hartley Modulation‐Codes 

%----------- Modulation ----------- figure; t = -2*pi : pi/180 : 2*pi; f1=heaviside(t+1)-heaviside(t-1); f=f1.*cos(10*t); figure(1); subplot(2,1,1); plot(t,f,'LineWidth',2); xlabel('t (sec)'); ylabel('f(t)'); title('Function of cos(10t)*u(t+1)-u(t-1)'); axis([-4.2 4.2 -1.2 1.2 ]) grid %-------------Fourier transform----------- omega = [-50 : 0.1 : 50]; F = zeros(size(omega)); for i = 1 : length(omega) F(i) = trapz(t,f.*exp(-1i*omega(i)*t)); %Fourier Transform end F_magnitude = abs(F); %Magnitude of the Fourier Transform subplot(2,1,2); plot(omega,F_magnitude,'LineWidth',2); xlabel('\omega (rad/sec)'); ylabel('|F(j\omega)|'); title('Fourier Transform Magnitude'); grid  

%----------- Modulation ----------- figure; t = -2*pi : pi/180 : 2*pi; f=f1.*cos(10*t); subplot(2,1,1); plot(t,f,'LineWidth',2); title(' after Modulation'); xlabel('t (sec)'); ylabel('f(t)'); axis([-4.2 4.2 -1.2 1.2 ]) grid %-------------Hartley Transform------------ omega = [-50 : 0.1 : 50]; F = zeros(size(omega)); for i = 1 : length(omega) F(i) = trapz(t,f.*(cos(omega(i)*t)+sin(omega(i)*t))); %Hartley Transform integral end F_magnitude = abs(F); %Magnitude of the Hartley Transform subplot(2,1,2); plot(omega,F_magnitude ,'LineWidth',2); xlabel('\omega (rad/sec)'); ylabel('|F(j\omega)|'); title('Hartley Transform Magnitude'); grid   

 

Fourier Modulation  Hartley Modulation 

 

   

 

  

 

 

Page 10: Mathematics and applications of the Hartley and Fourier Transforms

iii. Benefits Gained The Fourier and Hartley Transform Methods are changing our way of thinking and our conception 

about  interpretation some natural phenomena  , also  they enabled us  to develop and create new 

techniques  that  support  our  life  and  activities  ,  in  this  section we will mention  briefly  the  idea 

beyond  our  hearing  and  sight  senses  ,  and  how  the  engineers  benefitted  from  the  FT  and  HT 

methods to create and develop the TV and Phones systems . 

 

A‐ Sense of Hearing  

After discovery of FT and HT  , we could understand that one of the functions  in our ear system  is 

transformtion the Acoustic Signal from time domain to frequency domain  , and these frequencies 

are realized by sensor organs are called (Corti) that have a limited capabilities where they can react 

with  just band of  frequencies  from 20Hz  to 20KHz  and  this  is  the  limitations of our hearing  .  as 

shown in figure (7). 

Figure(7) Sense of Hearing  

 

B‐ Sense of Sight  

The same thing for our sight sense where our eyes play the machine role where one of its important 

function is transform the signal from the time to frequency domain then realization it by the "Cone 

and Rod" organs which  can distinguish only a band of  frequencies  called  the band of  the  visible 

waves . the figure (8) shows the inner structure of the eye while the figure (9) shows the spectrum 

band of the visible waves . 

Figure(8) inner structure of the eye  

 

Page 11: Mathematics and applications of the Hartley and Fourier Transforms

 Figure(10) visible waves 

 

C‐ TV and Phone Systems 

Based on  the  FT  and HT  transform methods  concept  and  its property  that  is  called  (Modulation 

Property) , the engineers became able to send many TV channels or Phone Calls as a complex signal, 

By modulating the  information of  it on the carrier signals with different frequencies are separated 

from each other by Guard Band . for the TV system the signal is received by LNB which transfer it via 

the  cable  to  the  receiver  that  transform  it  to  the  frequency  domain where  each  channel  has  a 

certain band of frequency  in this spectrum  ,hence the person can move from channel to other by 

changing  from  frequency  to other  .  the figure(11)  show  the  idea beyond  the TV  system  .  for  the 

Phone Calls the complex signal will reach to the Switch device inside the call center that transform it 

to a group of  frequencies then separate each  frequency and resend  it as a temporal signal to the 

des na on . the figure(12) show the Phone Calls idea . 

Figure(10) TV System  

 Figure(11) Phone Calls 

Page 12: Mathematics and applications of the Hartley and Fourier Transforms

iv. Conclusion  Since  ,  the  transform methods  (FT and HT) have been discovered our  life  is changing  , we 

able to understand some of phenomena around us , and we could exploit these method to 

create and develop and get a new and modern techniques. 

The essential differences between these two transforms is that Fourier transform gives rise 

to  complex plane even  for  real data whereas  the Hartley  transform always gives  the  real 

plane for real data. 

The properties of Fourier and Hartley transforms are almost the same. 

 

 

v. References 1. ALEXANDER D. POULARIKAS  ,  "TRANSFORMS  and APPLICATIONS HANDBOOK  ,  Third  Edition"  , 

CRC Press  ,Taylor & Francis Group, 6000 Broken Sound Parkway NW, Suite 300  , chapter 4  , p 180‐184 . 

2. N. SUNDARARAJAN , "FOURIER AND HARTLEY TRANSFORMS ‐ A MATHEMATICAL TWIN " , Indian J. pure appl. Math., 28(10) : 1361‐1365, October 1997 , p1‐5 . 

3. University  of  Wisconsin–Madison  ,  Department  of  Mathematics  ,  Lecture  Notes  ,  " https://www.math.wisc.edu/ ~angenent/Free‐Lecture‐Notes/freecomplexnumbers.pdf " . 

4. University  of  Haifa,  The  Department  of  Computer  Science,  Lecture  Notes  ,  " https://www.math.wisc.edu/ ~angenent/Free‐Lecture‐Notes/freecomplexnumbers.pdf " . 

5. Chris  Solomon  ,Toby  Breckon,  "Fundamentals  of  Digital  Image  Processing",Chichester,  West Sussex, PO19 8SQ, UK , 2011, sec on 1.1 , p 20‐25. 

6. Hartley  transform  ,  From  Wikipedia,  the  free  encyclopedia  ,  " https://en.wikipedia.org/wiki/Hartley_transform "