Forum Discussion
23 Replies
- Altera_Forum
Honored Contributor
thanks Dave and Kaz for the guidance.
Could you please suggest how to estimate the energy of a sinusoid? I need an algorithm to differentiate between the sinusoids from different channels. I am thinking of using fft megacore , do you Gurus think thats a good idea? :) thanks, - Altera_Forum
Honored Contributor
--- Quote Start --- Could you please suggest how to estimate the energy of a sinusoid? I need an algorithm to differentiate between the sinusoids from different channels. I am thinking of using fft megacore , do you Gurus think thats a good idea? :) --- Quote End --- Do you know the frequency of the sinusoids, or do you have to determine that too? If so, how closely spaced will the sinusoids be? This is required to determine the number of points needed in your transform. How accurate do you need to estimate the power and frequency of the sinusoid? If you do not have a window function prior to the FFT, then you will experience 'scalloping loss', i.e., if the sinusoid frequency is such that it lies between spectral channels (FFT output channels), its amplitude will be down by -3.92dB, relative to what would be detected if it was on a spectral channel. What dynamic range do you need, i.e., what is the largest and smallest sinusoid you need to measure? What is the noise level expected in the signal? Before thinking about the hardware design, you should first model the signals. Go and download the sine_plus_noise.m MATLAB script I posted here and start changing parameters in the file http://www.alteraforum.com/forum/showthread.php?t=30284&page=3 Cheers, Dave - Altera_Forum
Honored Contributor
A practical approach is to measure mean power of your input in time domain. square up the input (I^2 + Q^2) and add up in accumulator 2^n samples then truncate n LSB bits from result.
I am assuming your input is not a mixture of sinusoids and other signals. - Altera_Forum
Honored Contributor
hey...thanks for all your help. I have almost completed my design. Now I have the problem implementing it on the board. I guess the problem is because of FIR Megacore I am using. Could you please help me with implementing FIR Megacore on the board?
Thanks saket - Altera_Forum
Honored Contributor
--- Quote Start --- I have almost completed my design. Now I have the problem implementing it on the board. I guess the problem is because of FIR Megacore I am using. Could you please help me with implementing FIR Megacore on the board? --- Quote End --- No, not without an explanation of what you decided to design :) Please explain your system-level design, and then people can help. Before you work with the Altera tools, you need to design the filter(s). For example, if you know the frequency of the signal you are trying to detect the power of, then your design could be implemented per the discussion in this thread; http://www.alteraforum.com/forum/showthread.php?t=30284&page=3 I just posted a MATLAB script showing how to decimate a high-rate sampled signal, to a low-rate sampled signal. The script shows that the particular combination of filters meets the design requirements, however, the script is not an HDL implementation. The next task for the person I was responding to, is to go and implement these filters in CIC Compiler, and FIR Compiler II. In your design, you would demodulate your received signal using the known frequency (generated using an NCO with quadrature outputs), low-pass filter and decimate (both the in-phase and quadrature components), and then calculate the power. Cheers, Dave - Altera_Forum
Honored Contributor
hey Dave,
thanks for the suggestions but I have only configured my fir_compiler megacore and its working fine in dsp builder. I was trying to program it on the board and it wouldn program. I was asking if any extra care I need to take for implementing the megacore on the board. Cheers, Saket - Altera_Forum
Honored Contributor
--- Quote Start --- I was trying to program it on the board and it wouldn program. I was asking if any extra care I need to take for implementing the megacore on the board. --- Quote End --- If you do not have an FIR Compiler license, then I believe you need to keep the JTAG cable connected. Even then, the design might become non-functional after some time. You will need to read the messages from Quartus, I believe they will tell you what the limits on the design are. These limits will not occur in the simulator. Cheers, Dave - Altera_Forum
Honored Contributor
Hey Dave,
hope you are fine on the other end. I am not so fine as the transmitter and receiver are not getting synchronized :( I am trying to use the peak of auto-correlation to synchronize but I think its not the best way.Could you please suggest any other technique to synchronize? I just need to find the delay of channel so that I can guide receiver to decode data. Please help!!!! Saket - Altera_Forum
Honored Contributor
--- Quote Start --- hope you are fine on the other end. I am not so fine as the transmitter and receiver are not getting synchronized :( I am trying to use the peak of auto-correlation to synchronize but I think its not the best way.Could you please suggest any other technique to synchronize? I just need to find the delay of channel so that I can guide receiver to decode data. --- Quote End --- Please describe your hardware setup in a little more detail. What are you actually trying to do? What are the frequencies of operation? Cheers, Dave - Altera_Forum
Honored Contributor
I am working with frequencies of 3MHz(transmitted signal) and trying to make a model of visible light communication.