Phase shift in frequency domain

Click For Summary

Discussion Overview

The discussion revolves around simulating phase shifts in the frequency domain using MATLAB, specifically focusing on the manipulation of real and imaginary parts of a signal obtained from the Fast Fourier Transform (FFT). Participants explore methods to achieve phase shifts without directly using the exponential formula typically employed in digital signal processing (DSP).

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant describes their initial approach using the FFT output and an exponential phase shift formula, but encounters issues when trying to implement it without using the formula directly.
  • Another participant questions the mathematical manipulation of complex numbers, suggesting a need for clarity in the operations being performed.
  • A third participant proposes a method to calculate the real and imaginary parts of the phase-shifted signal, emphasizing the correct application of trigonometric identities in the context of complex exponentials.
  • The original poster later acknowledges the correction and provides an updated MATLAB code that successfully implements the phase shift using the suggested approach.

Areas of Agreement / Disagreement

There is a general agreement on the need to correctly manipulate the real and imaginary parts of the FFT output, but the initial approach and understanding of the mathematical operations were contested. The discussion reflects a progression from misunderstanding to clarification, with the final code being accepted by the original poster.

Contextual Notes

The discussion highlights the importance of correctly applying mathematical principles in DSP, particularly when transitioning between frequency and time domains. There may be assumptions about the familiarity with complex number operations that are not explicitly stated.

Who May Find This Useful

This discussion may be useful for individuals working with digital signal processing in MATLAB, particularly those interested in phase manipulation techniques in the frequency 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   Reactions: 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
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
10K
  • · Replies 16 ·
Replies
16
Views
15K
  • · Replies 27 ·
Replies
27
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K