Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - How to calculate amplitude and phase of a digital/analog signal in VHDL?

 
Thread Tools Search this Thread
Old 12-01-2006, 02:58 AM   #1
Default How to calculate amplitude and phase of a digital/analog signal in VHDL?


I am a student who is doing a project in VHDL... I need to find the
amplitude and phase of an analog and digital signal in VHDL ...

I am using an ADC to convert the analog to digital which then goes into
the simple computer module in VHDL which calculates it frequency and
all that...

I want to know given the initial analog signal or the converted digital
signal, how can I find the original signals amplitude and phase?

If anyone has any suggestions or code that can be useful please reply
ASAP!!



ronak283@gmail.com
  Reply With Quote
Old 12-01-2006, 03:29 PM   #2
boysr2003
Junior Member
 
Join Date: Jul 2006
Posts: 9
Default How to calculate amplitude and phase of a A/D signal

Hi,
my name is Yassir Boukhriss,
i think the amplitude depends on the precision of the A/D. if it was a 12 bit A/D the amplitude would go between -2^11 to 2^11. As far as frequency goes, you can do the fft of the signal, and i think there is an fft core in the core generator if you are using the xilinx tool ISE.
Good luck!
boysr2003 is offline   Reply With Quote
Old 12-01-2006, 05:44 PM   #3
jens
 
Posts: n/a
Default Re: How to calculate amplitude and phase of a digital/analog signal in VHDL?

> I want to know given the initial analog signal or the converted digital
> signal, how can I find the original signals amplitude and phase?


Assuming you're looking for the dominant signal's frequency, amplitude
& phase... do an FFT of the input, calculate the magnitudes
(sqrt(real^2 + imag^2)), find the largest magnitude, then calculate the
phase (atan(imag/real)). Note that the phase might be meaningless,
depending on what the FFT's time period is related to. Also note
you'll probably want to apply a window before the FFT, and the
amplitude will have to be scaled accordingly.

You're probably better off beginning to understand what you're trying
to do from a DSP perspective, then figuring out how to code it in VHDL.
FFT cores are widely available from FPGA vendors, also check
opencores.org.

  Reply With Quote
Old 12-01-2006, 10:56 PM   #4
Dave Higton
 
Posts: n/a
Default Re: How to calculate amplitude and phase of a digital/analog signal in VHDL?

In message <. com>
wrote:

> I want to know given the initial analog signal or the converted digital
> signal, how can I find the original signals amplitude and phase?


Phase is a measurement between two signals. What is the other signal
in your case?

Dave
  Reply With Quote
Old 12-02-2006, 10:01 PM   #5
curtis_m_watson@yahoo.com
 
Posts: n/a
Default Re: How to calculate amplitude and phase of a digital/analog signal in VHDL?

Take a look at the CORDIC algorithm.
This algorithm can be implemented with adders and shifters.

-cmw

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump