# Phase shift in frequency domain

Hello,

I'using Matlab to simulate phase shift in frequency domain (FD).
I have got real and imaginary parts of the signal after FFT.
I'd like to use phase shift in FD.

This works:
Y=fft(y);
YY=Y.exp(-i*2*pi*nk/N*samples_delay);
result=ifft(YY);

But in my DSP I can't use the formula above and I need to use real and imaginary parts from fft signal.

I supposed exp(-i*2*pi*nk/N*samples_delay) can be transfered to this:

Shifted real part = re*cos(2*pi*nk/N*samples_delay)
Shifted imaginary part = im*sin(-2*pi*nk/N*samples_delay)

Then I transfered it back to time domain but result is inccorect.

Could anybody help me?

Thank you

Related Other Physics Topics News on Phys.org
DrGreg
Gold Member
Think about what you are doing. Is it true that$$(a + ib) (x + iy) = ax + iby?$$

• sophiecentaur
blue_leaf77
Homework Helper
Shifted real part = re*cos(2*pi*nk/N*samples_delay)
Shifted imaginary part = im*sin(-2*pi*nk/N*samples_delay)
From what I understand, you actually want to calculate the real and imaginary parts of YY, am I right? Then you have to calculate Re[Y.exp(-i*2*pi*nk/N*samples_delay)] and Im[Y.exp(-i*2*pi*nk/N*samples_delay)]. Consider this
$$Ze^{i\theta} = (Re[Z] + i Im[Z])(\cos(\theta)+i\sin(\theta) )$$
Calculate the last expression to see which are the right real and imaginary parts of ##Ze^{i\theta}##.