![]() |
|
|
|||||||
![]() |
VHDL - How to calculate amplitude and phase of a digital/analog signal in VHDL? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Junior Member
Join Date: Jul 2006
Posts: 9
|
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! |
|
|
|
|
|
#3 |
|
Posts: n/a
|
> 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. |
|
|
|
#4 |
|
Posts: n/a
|
|
|
|
|
#5 |
|
Posts: n/a
|
Take a look at the CORDIC algorithm.
This algorithm can be implemented with adders and shifters. -cmw |
|