Register to reply

Phase shift using FFT

by marksayles
Tags: phase, shift
Share this thread:
Oct3-07, 02:36 PM
P: 3
What I want to do is apply a frequency-independent phase shift to a Gaussian Noise signal. Obviously I can just invert it to get a pi shift. Also I can take the Hilbert transform to get a pi/2 shift and I can invert that to give myself in effect a 3/2pi shift. BUT..... what I want to do is to be able to apply any phase shift, 10, 20, 30 degrees etc.

The way I have been thinking about this is that I can take the FFT of the noise and get the magnitude and phase information, and then I could manipulate the phase but leave the magnitude the same and take the IFFT to get my phase-shifted signal. Here is an example bit of matlab code doing this on a single sinusoid. As it is here the code doesn't work. But if you change the phase shift p from pi/2 to pi then it does? Is there something I'm missing. Perhaps I need to apply the phase shift differently to the positive and negative parts of the FFT? Or is it something to do with the fact that theta is distributed on [-pi pi] and when I add "p" I change this and make it ambiguous or something?

%generate signal
%Define a phase shift in rads
%Get the FFT of the signal
%Get the magnitude
%Get the phase
%Add the phase shift onto the phase
%Set the new real and imag parts of the spectrum
%Make the new spectrum
%Get the new signal
%plot the signals
figure;plot(t,sig);hold on; plot(t,newsig,'g');
Phys.Org News Partner Science news on
New model helps explain how provisions promote or reduce wildlife disease
Stress can make hard-working mongooses less likely to help in the future
Grammatical habits in written English reveal linguistic features of non-native speakers' languages

Register to reply

Related Discussions
Phase shift using FFT General Engineering 11
Phase, Phase Difference and Phase Shift General Physics 6
Phase shift Introductory Physics Homework 0
Phase shift Introductory Physics Homework 0
Phase Shift Electrical Engineering 1