Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Regarding the averaging of I and Q samples

Status
Not open for further replies.

Maitry07

Advanced Member level 4
Joined
Jun 29, 2022
Messages
109
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Activity points
961
Hello support team,

My main requirement is to use I/Q sampling on the RF input (sine wave) using the direct digitization method and convert these cartesian data into polar form to generate the amplitude using the formula of sqrt(I^2+Q^2). I am using FPGA for this implementation.
RF input's highest frequency component is 60 MHz (sine wave, no modulation) . I am using oversampling to generate I, Q samples using DDC algorithm along with the decimated filter to generate the I, Q samples. right now my I, Q samples data rate after decimation is 61.44 MSPS.

If I provide this much of high sample rate results to generate the amplitude without averaging, I am getting the different samples at the output of which If i am doing averaging, I am able to get the stable amplitude output.
so, what I am understanding from the study and other application notes that there is a requirement of averaging such as moving averages to get stable result. so when we do the averaging, the output sample rate after averaging will be reduced. So below are my queries.
1. As the CIC filter is equivalent to the moving average, as CIC is the RRS filter while moving average is the non recurrsive averaging filter. so, which one is more suitable?
2. As my input RF signal is pure sine wave, what should be the suitable averaging factor should I use to get the accurate and stable amplitude measurement? My input sine wave is clean and with less harmonics.
 

Hi,

I'm no expert in this. Thus I just can give informations about sampling and measurement.

60MHz signal frequency with 61.44MHz sampling frequency.
The sampling frequency is below nyquist. Thus the sampling values repeat with 1.44MHz (difference frequency, alias frequency).

So if you do some averaging .. there is a benefit if you do this with a window size of 1/1.44MHz = 0.694us or 43 samples (42.66) or integer multiples.
So 3 x 42.66 = 128.0 samples for example.

But you must not average the input samples but the calculated outputs.
(Averaging the input samples results in zero, ideally)

Klaus
 

Hello,
I think I have misinterpret my question. Below is the detailed brief.

1. My RF input frequency highest component: 60 MHz
2. My ADC sampling rate: 400 MSPS ( which is > 2*60 MHz), so I am using oversampling over here.
3. After ADC , I am using DDC algorithm ( Quadrature mixer to generate I, Q samples )
4. After DDC , I am using decimating filter to reduce the sample rate from 400 MSPS to 61.44 MSPS . so that' why I have said that decimated output sample rate my I and Q samples are 61.44 MSPS each.
then I am directly providing these continuous samples ( I and Q) to further cartesian to polar conversion. so I am getting amplitude samples at the output.

So, My question is if I use CIC at I, Q samples, it will further decimate the sample rate as well it will provide averaging ( as CIC filter is a Recursive Running Sum averaging filter).
If I reduce that to let's say 6 MSPS , then also I will be getting multiple amplitude samples at the output.

But in order to get the stable and accurate result, do I need to do average at the amplitude output and for how much samples ?
 

No idea how you arrive at 61.44 MHz decimated rate. CIC decimator is required to run with integer frequency ratio, preferably power of two.

Regarding possible aliasing, you didn't specify the input signal bandwidth, only maximal frequency, that's no the same. Signal bandwidth is also important to decide about filtering. If you say there's no modulation, bandwidth is very small.
 

Hello support team,

My main requirement is to use I/Q sampling on the RF input (sine wave) using the direct digitization method and convert these cartesian data into polar form to generate the amplitude using the formula of sqrt(I^2+Q^2). I am using FPGA for this implementation.
RF input's highest frequency component is 60 MHz (sine wave, no modulation) . I am using oversampling to generate I, Q samples using DDC algorithm along with the decimated filter to generate the I, Q samples. right now my I, Q samples data rate after decimation is 61.44 MSPS.

If I provide this much of high sample rate results to generate the amplitude without averaging, I am getting the different samples at the output of which If i am doing averaging, I am able to get the stable amplitude output.
so, what I am understanding from the study and other application notes that there is a requirement of averaging such as moving averages to get stable result. so when we do the averaging, the output sample rate after averaging will be reduced. So below are my queries.
1. As the CIC filter is equivalent to the moving average, as CIC is the RRS filter while moving average is the non recurrsive averaging filter. so, which one is more suitable?
2. As my input RF signal is pure sine wave, what should be the suitable averaging factor should I use to get the accurate and stable amplitude measurement? My input sine wave is clean and with less harmonics.
So in short you have single tone oversampled into FPGA and you want average of I^2+Q^2.
just use mixer(based on DDC) to push the tone to dc. No need for decimation. Once I/Q are dc levels you can get what you want. The only issue left if there is noise. You can get rid of noise using simple running average. The level of noise will decide how many taps you need to get clean dc levels and make sure your averaging gain is unity.
 

No idea how you arrive at 61.44 MHz decimated rate. CIC decimator is required to run with integer frequency ratio, preferably power of two.

Regarding possible aliasing, you didn't specify the input signal bandwidth, only maximal frequency, that's no the same. Signal bandwidth is also important to decide about filtering. If you say there's no modulation, bandwidth is very small.
Hello,
I have used decimation filters only after DDC to get 61.44 MSPS decimation rate. and yes my input signal is pure sine wave without modulation. so bandwidth is small only. just one thing is that my frequency variation is within +/1 MHz (i.e 59-61 MHz).
--- Updated ---

So in short you have single tone oversampled into FPGA and you want average of I^2+Q^2.
just use mixer(based on DDC) to push the tone to dc. No need for decimation. Once I/Q are dc levels you can get what you want. The only issue left if there is noise. You can get rid of noise using simple running average. The level of noise will decide how many taps you need to get clean dc levels and make sure your averaging gain is unity.
yes, your understanding is correct. sine tone oversampled into FPGA and I have shift it down to DDC down to DC. so, my question is that only If i use CIC decimation filter( which is RRS average filter equivalent to moving average) to further decimate at I, Q only. (let's say up to 3.07 MSPS from 61.44 MSPS using decimation factor of 20). then also I will get the amplitude samples from the sqrt(I^2+Q^2) from these 3 MSPS samples. In order to get the estimation of signal power in peak voltage, the averaging within some time duration is required at the amplitude output as well, for which I am asking about suitable method.
 
Last edited:

Hello,
I have used decimation filters only after DDC to get 61.44 MSPS decimation rate. and yes my input signal is pure sine wave without modulation. so bandwidth is small only. just one thing is that my frequency variation is within +/1 MHz (i.e 59-61 MHz).
--- Updated ---


yes, your understanding is correct. sine tone oversampled into FPGA and I have shift it down to DDC down to DC. so, my question is that only If i use CIC decimation filter( which is RRS average filter equivalent to moving average) to further decimate at I, Q only. (let's say up to 3.07 MSPS from 61.44 MSPS using decimation factor of 20). then also I will get the amplitude samples from the sqrt(I^2+Q^2) from these 3 MSPS samples. In order to get the estimation of signal power in peak voltage, the averaging within some time duration is required at the amplitude output as well, for which I am asking about suitable method.
There is no need to decimate. Just use running average filter of suitable number of taps.
Using CIC will complicate gain issues and is not doing any better than basic averaging.
This is my view and depends on how accurate you are on dc otherwise you get a slow complex tone after DDC. In that case you need search for peaks.
 

Hello,

Thank you for your response. Ok, I got your point. If I use only basic averaging at the I and Q samples, then also, after the sqrt root operation, I am assuming that at the amplitude output also, Averaging is required.right? otherwise how it is possible to get stable output.
 

Hello,

Thank you for your response. Ok, I got your point. If I use only basic averaging at the I and Q samples, then also, after the sqrt root operation, I am assuming that at the amplitude output also, Averaging is required.right? otherwise how it is possible to get stable output.
I assume averaging power itself will do instead of I/Q separately if power is your target.

Square root is costly on fpga so why not just use power as sum of squares.
 

Hello,

Ok, I got your point. That , I can do possible way of decimation at the I, Q samples with sample rate and then all the I and Q samples ( let's say with the 6 MSPS ), then you are suggesting that I do the sum of squares for all the samples to get power and then do the averaging to get stable output. Is my understanding correct?
 

Hello,

Ok, I got your point. That , I can do possible way of decimation at the I, Q samples with sample rate and then all the I and Q samples ( let's say with the 6 MSPS ), then you are suggesting that I do the sum of squares for all the samples to get power and then do the averaging to get stable output. Is my understanding correct?
Just apply DDS on sampled I/Q. No decimation needed.
Pass (now dc) into adder for sum of squares per each pair, one pair at a time.
Then apply running average on the power stream and see if you get near constant value across the stream. expect little variation.
If you target just one single final value then get the sum of all power samples in a block and divide by number of samples (block average).

That is it.
 

I assume averaging power itself will do instead of I/Q separately if power is your target.
I´m not sure I understand this correctly.

But just want you to keep in mind that
* first averaging, then doing the square root
gives a different result than
* first doing the square root, then doing the averaging

Klaus
 

I´m not sure I understand this correctly.

But just want you to keep in mind that
* first averaging, then doing the square root
gives a different result than
* first doing the square root, then doing the averaging

Klaus
It is not about square root but power as sum of squares. Anyway if target is rms you still need to get squares then average them then get root of sum of squares.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top