Phase shift in frequency domain

AI Thread Summary
The discussion revolves around simulating phase shifts in the frequency domain using MATLAB. The user initially attempts to apply a phase shift formula directly, but encounters issues when needing to work with the real and imaginary parts of the FFT output. After clarification, it is revealed that the correct approach involves calculating the shifted real and imaginary parts using trigonometric functions. The user successfully implements the revised formulas, which correctly compute the phase shift. The solution resolves the initial problem, allowing for accurate results in the time domain.
Eng_Pat
Messages
2
Reaction score
0
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 transferred 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 transferred it back to time domain but result is inccorect.

Could anybody help me?

Thank you
 
Physics news on Phys.org
Think about what you are doing. Is it true that(a + ib) (x + iy) = ax + iby?
 
  • Like
Likes sophiecentaur
Eng_Pat said:
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}##.
 
Thank you for your answers.
I din't reliaze that so the right code for MATLAB is this:

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

It's working right now.

Thank you very much
 
Thread 'Inducing EMF Through a Coil: Understanding Flux'
Thank you for reading my post. I can understand why a change in magnetic flux through a conducting surface would induce an emf, but how does this work when inducing an emf through a coil? How does the flux through the empty space between the wires have an effect on the electrons in the wire itself? In the image below is a coil with a magnetic field going through the space between the wires but not necessarily through the wires themselves. Thank you.
Thread 'Griffith, Electrodynamics, 4th Edition, Example 4.8. (Second part)'
I am reading the Griffith, Electrodynamics book, 4th edition, Example 4.8. I want to understand some issues more correctly. It's a little bit difficult to understand now. > Example 4.8. Suppose the entire region below the plane ##z=0## in Fig. 4.28 is filled with uniform linear dielectric material of susceptibility ##\chi_e##. Calculate the force on a point charge ##q## situated a distance ##d## above the origin. In the page 196, in the first paragraph, the author argues as follows ...
Back
Top