Help with Hermitian Symmetry and its inverse Fourier transform in MATLAB.

938 Views Asked by At

I have tried to impose Hermitian symmetry on the complex number $z$ which is varies with $x$. I need to take its inverse Fourier transform. A hermitian symmetry should give a real valued inverse FT.

$$ \operatorname {Re} (x) = \sinh[c\cdot \log(x)]/[\cosh[c\cdot \log(x)] + \cos(c)] $$

$$ \operatorname {Im} (x) = \cos(c)/[\cosh[c\cdot \log(x)] + \sin(c)] $$

clear;
x =0:31/100:31;
b = 31;
a = 15.5;
siginf = 0.0133;
mn = 0.00004;
sigzero = siginf - mn;
coleExp = 0.5;
relTime = 0.05;
arg1 = ( x<=a ).*(coleExp*log(relTime*x)) + ( x>a ).*(coleExp*log(relTime*(b-x))) ;
arg1i = ( x<=a ).*(coleExp*log(relTime*x)) - ( x>a ).*(coleExp*log(relTime*(b-x))) ;
arg2 = (1-coleExp)*pi/2;
sigdiff = sigzero - siginf;
sigdiff = sigdiff/2;
%real part
num = sinh(arg1);
den = cos(arg2) + cosh(arg1);
brack = 1 - num./den;
bgaddn = sigdiff*brack;
reall = bgaddn + siginf;
reall1 = reall;
reall1( x==0 ) = sigzero;
reall1( x==b ) = sigzero;
disp(reall1);
%imag part
num = cos(arg2)*sigdiff;
den = cosh(arg1) + sin(arg2);
den1 = (x<=a).*(den) - (x>a).*(den);
imagg = num./den1;
imagg1 = imagg;
imagg1( x==0 ) = 0;
imagg1( x==b ) = 0;
disp(imagg1);
y = complex(reall1,imagg1);
f = ifft(y);
disp(f);
disp(y);
figure(1);
plot(x,reall);grid on
figure(2);
plot(x, imagg);grid on
figure(3);
plot(x, abs(y));grid on
figure(4);
plot(x, f);grid on
figure(5);
plot(x, abs(real(f)));grid on
figure(6);
plot(x, imag(f));grid on
figure(7);
plot(x, abs(f));grid on

In the code I have tried to assign the values of real(x) and imag(x) (just added a few constants). I then form a complex function z. I then try to make z Hermitian symmetric so that its inverse FT is real valued.

Can someone please point out why it fails to do so here? Is it something mathematical that I have done wrong or is it some behaviour of MATLAB that I seem to have misunderstood.

I expect the imaginary part of the inverse FT result to be zero, but it comes out to be non-zero. I tried doing the same for other functions and got the expected result of zero imaginary part.

Thanks a lot for the help!