08-02-2019 03:31 PM
Hello everyone,
Now my system has inputs of two sinusoidal signals combined whose frequency are close to each other and amplitude are same, one is 100KHz, the other is 100K +10 Hz.
I need to calculate the signal phase using Cordic in NI 7972 FPGA module, either 100K or 100K+10Hz. My plan is to filter out 100K+10Hz, and measure 100KHz. But I was wondering if the filter in FPGA can do that precisely and fast. I need the feedback to be MHz level.
So guys, please advice me.
Thanks
08-02-2019 05:16 PM
You can filter on an FPGA. See if this will do: https://zone.ni.com/reference/en-XX/help/371599P-01/lvfpga/fpga_butterworth_filter/
08-05-2019 03:14 PM
Hi terry,
thanks for the reply.
I doubt whether the butterworth filter can filter the signal that precisely, because 10Hz is relatively too small for 100KHz.
Thanks
08-05-2019 04:18 PM
@zyb1003 wrote:
Hi terry,
thanks for the reply.
I doubt whether the butterworth filter can filter the signal that precisely, because 10Hz is relatively too small for 100KHz.
Thanks
Make a digital mixer and down convert the frequency. For a 10 Hz separation you will need at least a 300ms time constant to be able to accurately separate them. It may be possible in theory with a 100 ms time constant, but probably not likely.
(For example if you mix your signal with a 99kHz sine wave, your 100kHz will be at 1kHz and you 100.01kHz signal will be at 1.01kHz, this assumes you low pass filter after the mixer.)
mcduff
08-05-2019 04:20 PM
Might the Goertzel Algorithm be helpful?
(Not something I've done or even read closely enough to claim I understand. I was just intrigued by your problem and came across it during some brief searching. It sounded like it *might possibly* be helpful for a case like yours where a full FFT might be too slow or memory-intensive.)
-Kevin P
08-05-2019 04:23 PM
@zyb1003 wrote:
Hi terry,
thanks for the reply.
I doubt whether the butterworth filter can filter the signal that precisely, because 10Hz is relatively too small for 100KHz.
Thanks
Add it and test it out in simulation mode.
Otherwise, check out https://www.xilinx.com/support/documentation/ip_documentation/fir_compiler/v7_2/pg149-fir-compiler.p... (available via LabVIEW FPGA)
08-05-2019 04:27 PM
@Kevin_Price wrote:
Might the Goertzel Algorithm be helpful?
(Not something I've done or even read closely enough to claim I understand. I was just intrigued by your problem and came across it during some brief searching. It sounded like it *might possibly* be helpful for a case like yours where a full FFT might be too slow or memory-intensive.)
-Kevin P
This is where you use lock-in amplifiers, or mixers and down-converters. You need to think radio here. Your FM stations are only separated by 100kHz.
You can make a mixer on the FPGA, I have done it before.
For a FFT, you need at least 100ms of data, and hope you have hardly any spectral leakage. In reality, depending on SNR you probably need a 1 second of data.
But if you down convert the signal to 1 and 1.01kHz, now you can digitize at a much lower rate, and continuously without needing an insane amount of storage.
mcduff
09-10-2019 05:48 PM
Thanks for the reply.
However, I need my feedback loop to be 1MHz or faster. So that means I need the filtered signal value updated every 1us.
When I run my fpga code, the filter loop fastest sample rate can be 5MHz. Now I downconvert the signal frequency to DC and 10Hz. Now How can I filter the 10Hz part and only have DC?
Thanks
09-10-2019 05:58 PM
@zyb1003 wrote:
Thanks for the reply.
However, I need my feedback loop to be 1MHz or faster. So that means I need the filtered signal value updated every 1us.
When I run my fpga code, the filter loop fastest sample rate can be 5MHz. Now I downconvert the signal frequency to DC and 10Hz. Now How can I filter the 10Hz part and only have DC?
Thanks
When you mix two sine waves you get sums and differences; typically people want to down convert the signal to a lower range so they use a low pass filter to get rid of the "sum" signal. You now have a difference frequency of 10Hz, I think, if you just want DC use a low pass filter. However, the value of your filter will take 3-5 time constants to be steady. So if you set a 1 Hz filter, then you need to wait 5 s before the output is stable.
mcduff
09-11-2019 08:59 AM - edited 09-11-2019 09:11 AM
I seperated a 200% AM modulated signal (results in two sines at nearly same frequency) with two sine fits (or tone detection) in sequence. the first run 'locks' to one frequency and the residual is used for the second one.
Found my first try with tone detection 🙂 (the task was to demodulate 😉 )
Not clear if the frequencies are known and 'only' the phases are important or ??
and what parameters are to be monitored fast and what parameters change 'slowly'.
With 10Hz difference you would need at least a quarter of a periode (2.5ms) better a full periode (10ms) to get all parameters.
If a faster controller is needed you would need a internal model with all prior knowledge and adapt predictions...
If the exact frequencies are known, a least square sine fit for amplitude and phase is quickly done in a FPGA...