Jump to content
  • 0

How to find phase of signal using FFT and CORDIC IP core in vivado?


kalainan

Question

@D@n@Pavel@zygot

I have to find the phase of a signal from the ADC sample. For simulation purpose I replaced the ADC with the DDS complier IP core the 1MHz sine wave signal with 45 degree phase is generated from the DDS core and its feed to FFT(configure as FORWARD FFT) IP core and the output of the FFT IP Core is feed to CORDIC IP core(configure for TRANSLATE function) to get the phase of the signal.

here fs=256MHz, N FFT points =256, input frequency =1MHz.

frequency resolution = 256MHz/256 =>1MHz

frequency bin = 1MHz/1MHz => 1

The magnitude of FFT output shows two bin one in 1st index and another one in 255th index. if I taken 1st bin real and imaginary value the cordic output is incorrect. If take 255 bin real and imaginary value the cordic output is correct. Iam totally confused? If anyone have done this before suggest me solution for the issue.

Here I have attached the DDS , FFT configuration settings image for clarification go through it.

s_dds1.JPG

s_dds2.JPG

s_dds3.JPG

s_fft1.JPG

s_fft2.JPG

Edited by kalainan
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
3 hours ago, kalainan said:

I have to find the phase of a signal from the ADC sample.

Your task, if I don't think about it starts off sounding kind of plausible.

What might sound like a reasonable objective isn't necessarily either a theoretical or practical one. Could you be a bit more expansive about what exactly it is that you want to do? At first glance, it sounds like you want to take an arbitrary vector magnitude and convert it into a phase value.  Trying to do this for one ADC sample doesn't make any sense to me. What's the end goal? What's the type of signal? How is the signal generated? What's the "phase" reference? What's the hoped for measurement resolution? Without more useful information I'm leaning toward suggesting that you get a different challenge to work out. From your Fs oversampling ratio I think that I see what you want to do... but hopefully not.

I'm a bit concerned about the specific list of hopeful respondents. If everyone responds more than once there would likely be more excitement than useful information.

Edited by zygot
Link to comment
Share on other sites

  • 0

@kalainan,

Are you sure you know what you are asking for?  Phase is one of the most meaningless and irrelevant outputs of an FFT.  Why?  Well, because phase has to be referenced to something.  Do you really want to reference phase to a local clock which can not have any calibrations of any type?

Likewise, if you are new to an FFT, then I think you will find the bit-reversed order difficult to work with.  If you weren't using a bit-reversed order, I could tell you what bins to expect an output in.  With a bit reversed order things get a bit more difficult, and I'd have to think about it.

Digging deeper, I'd never use an FFT without some amount of overlap and window function.  Unfortunately, any amount of overlap will really mess with the phase you are trying to measure.  So ... you are going to need some knowledge about what you are doing.  The FFT alone is rarely sufficient for such purposes.  This, however, is a much longer discussion to be had, and that with your DSP instructor.

Dan

Link to comment
Share on other sites

  • 0
On 9/9/2022 at 12:12 AM, D@n said:

@kalainan,

Are you sure you know what you are asking for?  Phase is one of the most meaningless and irrelevant outputs of an FFT.  Why?  Well, because phase has to be referenced to something.  Do you really want to reference phase to a local clock which can not have any calibrations of any type?

Likewise, if you are new to an FFT, then I think you will find the bit-reversed order difficult to work with.  If you weren't using a bit-reversed order, I could tell you what bins to expect an output in.  With a bit reversed order things get a bit more difficult, and I'd have to think about it.

Digging deeper, I'd never use an FFT without some amount of overlap and window function.  Unfortunately, any amount of overlap will really mess with the phase you are trying to measure.  So ... you are going to need some knowledge about what you are doing.  The FFT alone is rarely sufficient for such purposes.  This, however, is a much longer discussion to be had, and that with your DSP instructor.

Dan

Hi,

    I have to find the phase difference and gain difference of two signals which is 23.5MHz and the ADC sampling frequency is 188MHz. so can you suggest any algorithm to find these parameters from ADC sampled data? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...