# LabVIEW

cancel
Showing results for
Did you mean:

## How to seperate 2 signals whose frequency are close

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.

Thanks

Message 1 of 10
(331 Views)

## Re: How to seperate 2 signals whose frequency are close

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/

Certified LabVIEW Architect, Certified Professional Instructor, LabVIEW FPGA expert
ALE Consultants
LabVIEW Programming (make LV more popular, read this)
Message 2 of 10
(298 Views)

## Re: How to seperate 2 signals whose frequency are close

Hi terry,

I doubt whether the butterworth filter can filter the signal that precisely, because 10Hz is relatively too small for 100KHz.

Thanks

Message 3 of 10
(203 Views)

## Re: How to seperate 2 signals whose frequency are close

@zyb1003 wrote:

Hi terry,

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

Message 4 of 10
(193 Views)

## Re: How to seperate 2 signals whose frequency are close

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

Message 5 of 10
(191 Views)

## Re: How to seperate 2 signals whose frequency are close

@zyb1003 wrote:

Hi terry,

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)

Certified LabVIEW Architect, Certified Professional Instructor, LabVIEW FPGA expert
ALE Consultants
LabVIEW Programming (make LV more popular, read this)
Message 6 of 10
(188 Views)

## Re: How to seperate 2 signals whose frequency are close

@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

Message 7 of 10
(184 Views)

## Re: How to seperate 2 signals whose frequency are close

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

Message 8 of 10
(106 Views)

## Re: How to seperate 2 signals whose frequency are close

@zyb1003 wrote:

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

Message 9 of 10
(98 Views)

## Re: How to seperate 2 signals whose frequency are close

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...

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Message 10 of 10
(68 Views)