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 non linear variation with respect to frequency change

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
Hello support team,

I am using a high-speed data converter with FPGA to measure the RF signal amplitude and phase. below is my query.
My RF input is a pure sine wave (no modulation). for a single normal operation, I am having the information of frequency based on which I am changing the NCO frequency to get the down-converted baseband signal and using 10*log(I^2+Q^2) to measure the amplitude from the captured I and Q.
now my front-end insertion loss is different for each different frequency. for example, my front end loss is 2 dB for 35 MHz RF input, for which I am adding 2 dB fixed digital gain compensation to get the correct amplitude output.
but when my RF frequency is 135 MHz, my front end loss is 3 dB. that means, my digital gain compensation value should be changed based on the RF input frequency information, right?
what would be the suitable way to do this for this kind of situation?

I am thinking to measure the approximate RF input frequency using the FFT algorithm and based on the measured RF frequency, I will prepare a look-up table for each frequency with respect to the required digital gain compensation value, which will further change the same.
Is there any best way to do above , kindly provide suggestions and feedback.


(FY: Once my RF input frequency changes, it will be constant for one single operation of 2-3 hours)
 

kaz1

Full Member level 4
Joined
Aug 15, 2019
Messages
195
Helped
14
Reputation
28
Reaction score
31
Trophy points
28
Location
UK
Activity points
1,282
That implies the analogue channel (or filter) is not having ideal passband response.
This is common in RF design and requires equaliser inverse of channel effect.

Your approach of checking each spot frequency and scaling would only work if your application is going to be restricted to those spot frequencies.
 

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
Hello support team,

I am using a high-speed data converter with FPGA to measure the RF signal amplitude and phase. below is my query.
My RF input is a pure sine wave (no modulation). for a single normal operation, I am having the information of frequency based on which I am changing the NCO frequency to get the down-converted baseband signal and using 10*log(I^2+Q^2) to measure the amplitude from the captured I and Q.
now my front-end insertion loss is different for each different frequency. for example, my front end loss is 2 dB for 35 MHz RF input, for which I am adding 2 dB fixed digital gain compensation to get the correct amplitude output.
but when my RF frequency is 135 MHz, my front end loss is 3 dB. that means, my digital gain compensation value should be changed based on the RF input frequency information, right?
what would be the suitable way to do this for this kind of situation?

I am thinking to measure the approximate RF input frequency using the FFT algorithm and based on the measured RF frequency, I will prepare a look-up table for each frequency with respect to the required digital gain compensation value, which will further change the same.
Is there any best way to do above , kindly provide suggestions and feedback.


(FY: Once my RF input frequency changes, it will be constant for one single operation of 2-3 hours)
That implies the analogue channel (or filter) is not having ideal passband response.
This is common in RF design and requires equaliser inverse of channel effect.

Your approach of checking each spot frequency and scaling would only work if your application is going to be restricted to those spot frequencies.
Hello,
Once my spot freq is finalized , for example let's say 35 MHz then the variation would be within +/-1 MHz only.
But during power on , spot frequency would be selected. once selected then the variation in between +/-1 MHz.
And yes my RF input is coming from external source which is not having ideal passband response.
--- Updated ---

then weather any other suitable and accurate approach available for above
 

stenzer

Advanced Member level 3
Joined
Oct 1, 2012
Messages
714
Helped
114
Reputation
229
Reaction score
161
Trophy points
1,323
Activity points
7,545
Hi,

have you already created a graphical representation of your systen showing e.g. S21 vs. f, which you could share?
Depending on the "flatness" of the curve, one might implement a polynomial representation base of the attenuation.

My question herer is, what is your main task? Is it the determination of the TX amplitude? If so, I assume you are interested at the TX amplitude "leaving" the transmitter i.e. at a SMA connector. If so it's, quite tricky, as you mentioned that your TX already has a non ideal passband response. How flat and sharp is it? By this fact, with your current approach you are compensating a combined (TX & RX) insertion loss at the moment.

BR
 

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
Yes, I have prepared a graph of S21 vs the frequency of my system along with the signal generator. right now my signal generator is having approx. 0.5 dB variation in between 35 to 65 MHz. ( this variation is from the signal generator itself). I have prepared this graph as below.

RF NCO DDC
34 32 2
35 32 3
36 32 4
37 35 2
38 35 3
39 35 4 and so on up to 60 MHz.

After DDC, I am capturing I and Q samples , converting it to amp( SQRT(i^2+q^2) , further conversion to dBm using formula. Below graph is for fix RF input power -30.0 dBm ( signal generator is providing almost approx. 0.5 dB variation for RF input 35-65 MHz).

From this , I am understanding that my PCB has front end fix loss of 2 dB. that I understand is a fixed loss.

But my concern is that when I will be using another source instead of signal generator , which is having non-flat response in between 35-65 MHz (right now , I do not have the S21 vs freq response for this). But only have the data for min and max freq which is 2 dB variation.

Yes, My task is to measure the Tx amplitude ( leaving the transmitter, i.e at the SMA connector). as of now as I am using signal generator, I am figuring out from the graph that my Rx loss is constant approx. 2 dB. but with changing the signal generator with other source, my tx insertion loss becomes non linear w.r.t frequency for which how to do compensation?

RF front end loss.jpg
 

stenzer

Advanced Member level 3
Joined
Oct 1, 2012
Messages
714
Helped
114
Reputation
229
Reaction score
161
Trophy points
1,323
Activity points
7,545
Hi,

I assume RF is your frequency of interest, NCO is the oscillator frequency used for down conversion and DDC is your down-converted frequency. Why aren't you setting the NCO equal to your RF? Is this due to selectable frequency resolution? Further, I do not see the exact measuerd signal strength/amplitude accompanying the listed frequencies.

(i) I assume you are able to characterize your RF generator e.g. with a spectrum analyzer or oscilloscope. So you are able to compensate the attenuation of the RF generator itself.
(ii) Now adopt your RF power accordingly to compensate the loss determined in point (i), to get the receiver loss.
(iii) Implement a look-up table or a polynomial to compansete the RX losses.

How does you measurement setup loosks like e.g. are you designing a spectroscopic measurement device? How are gaining knowledge about the frequency AND phase for your aimed application, when not using your mentioned signal generator? What will be the FR excitation source in this case and how is oit connected to your RX?

BR​
 

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
Hello,

1. yes, I have not set the NCO same as RF as my RF input will be vary in between +/-1 MHz. but, Its ok If I change the NCO same as RF , I am getting same results only. but what I have observed is that when I am setting the RF =NCO freq, the outer harmonics after DDC is higher than this combination inside the range of my ddc filter.

2. Yes, right now I have characterized my signal generator with spectrum, based on that only I am saying is that the signal generator is providing variation of 0.5 dB in 35-65 Mhz band and 0.2 dB in +/-1 Mhz. FYI: My signal generator is not that stable , it is a cost-effective source. so not able to provide stable output. there is 0.2 dB variation within +/-1 Mhz range from the signal generator itself.

3. Yes, based on (i), I have figured out the insertion loss that I am providing -30.1 dBm RF input from signal generator( +/-0.2 dB) - I have measured the -32.1 dBm power approx. so , I am assuming 2 dB Insertion loss, which I am able to compensate for Rx loss.

4. My setup is Tx- Rx and connected with RF cable only. No, I am just designing a measurement system for the aimed transmitter. but, right now for the implementation, I am using my signal generator.
My final source is just a transmitter and it also will be connected through cable only, just that it has one directional coupler inside that has a non-flat response with respect to frequency variation. so, my question is how I can compensate for the Tx side loss if it is a non-flat response?
 

stenzer

Advanced Member level 3
Joined
Oct 1, 2012
Messages
714
Helped
114
Reputation
229
Reaction score
161
Trophy points
1,323
Activity points
7,545
Ok, it sounds to me you are designing the measurement device. So for your field application, you do not know anything about the TX source besides its excitation frequency. Is this correct? Maybe you can privide a sketch of your aimed application and highlight what is part of your system by means what are you able to characterize and compensate.

If so, I assume the directional coupler is part of your design as well and has to be compensated. By using an off-the-shelf directional coupler, will usually give you enough information to do so. Here an arbitrary chosen directional coupler [1], showing the attenuation of the directional coupler as well as the attenuation of the decoupling path.

[1] https://media.digikey.com/pdf/Data Sheets/Anaren PDFs/10270-3.pdf

BR​
 

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
Hello,

Yes, Right now I am only aware about the min and max freq coupling factor variation. as per your suggestion, I will further collect the information and try to implement the polynomial or look up table to compensate for both tx and rx losses.
 

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
Hello,

I have one more query for the fixed Rx compensation. below is the reference example.

What I am getting is in the form of SQRT (i^2+ Q^2),
For example: 0.032359, which is -32 dBm ( 20*Log(amp) + full scale) : when I am providing -30 dBm from signal generator. my full scale is -2.2 dBm

Now in the received answer of 0.032359 , I need to add value in such a way that I get 0.0407 , which is -30 dBm.
i.e 0.032359 +0.00844 = 0.0407

The above is correct for the conversion of -32 dBm to -30 dBm.

But when I see for any other signal level , such as
0.01288 = -40 dBm ( 20*log(amp)+full scale)
to have -38 dBm after compensation, I need to add 0.00333
0.00333+0.01288 =0.001621 = -38 dBm

as I have to add the compensation in terms of amplitude, how should I do that ?

As every time I need to add 2 dB but in terms of amplitude , how would I do that?
--- Updated ---

fixed compensation( addition) on the amplitude ( SQRT(I^2+Q^2) is possible? finally this compensated output is going to DAC.
please provide guidance.
--- Updated ---

or else , in order to add fix 2 dB addition. weather it is suitable to convert the amplitude in dBm and then add 2 dB. as in dBm , addition is linear. and this compensated output in dBm , i can further provide to DAC.
it's just that , it will increase one process of conversion from amp(SQRT(I^2+Q^2) to dBm , that's why i was ignoring.
 
Last edited:

stenzer

Advanced Member level 3
Joined
Oct 1, 2012
Messages
714
Helped
114
Reputation
229
Reaction score
161
Trophy points
1,323
Activity points
7,545
Hi,

sorry but now I'm quite confused. Especially as you are now talking about a DAC, where your aim is to determine the amplitude of an unknown TX signal. As you stated so far, your only prior is the excitation frequency. So you have to add the losses of your RX (and later also that one of the directional coupler) at individual frequency points to your measured signal.

E.g. you are measuring an excitation frequency of 45 MHz, according to your plot provided in reply #5 your receiver attenuates the TX signal by about 2.4 dB. I'm assuming the graph shows the RX attenuation only and for your current benchtop testing you are taking care of the ±0.5 dB variation your RF generator e.g. by adjusting the RF level by hand to obatain a "constant and flat" behavior over frequency.

Please provide a clear step by step calculation, if possible even with pen & paper where the units are clear as well as each individual calculation step. Further, indicate where individual values are comming from e.g. TX of interest/under-test, attenuation of RX only .....

BR​
 

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
Hello,

Sorry for the confusion.
I have attached the block diagram for your reference.
And yes your understanding is correct. My receiver is attenuating the Tx signal by 2.4 dB. and yes I am adjusting my signal generator +/-0.5 db variation by hand.

As per diagram, you can see that my receiver is generating I and Q samples, on which I am doing math to generate amplitude which is SQRT(I^2+Q^2).

Now my final measured amplitude I need to provide it to DAC.
but as you can see my measured amplitude is in terms of SQRT(I^2+Q^2). in order to add fix 2.4 dB compensation for my Rx , how would I add that to the SQRT(I^2+Q^2). because when we talk in Vpk. 2 dB addition is not linear.

For example, if my measured amp is 0.01288 then, in order to add 2 dB approx. , I have to add 0.00333.
0.01288 = -40 dBm ( 20*log(amp)+full scale)
to have -38 dBm after compensation, I need to add 0.00333
0.00333+0.01288 =0.001621 = -38 dBm

But same if my measured amp is 0.032359 then, in order to add 2 dB approx, I have to add 0.0084.
0.032359 = -32 dBm ( 20*log(amp)+full scale)
to have -30 dBm after compensation, I need to add 0.0084
0.032259+0.0084 = 0.0407 = -30 dBm

In short, when I want to add fix compensation in terms of Vpk, how to add that.

Because as my output is in terms of SQRT(I^2+Q^2) and I am manually calculating the equivalent dBm power level. so, when we talk to add compensation in terms of dB. it is linear that -40 dBm+ 2 dB = -38 dBm
... But same thing, when we talk to add fix compensation( let's say 2.4 dB) in terms of Vpk. How to do that?

That is my confusion. I hope I have given now clear explanation. awaited your feedback what I am missing over here.
 

Attachments

  • IMG_20230118_163730.jpg
    IMG_20230118_163730.jpg
    1.3 MB · Views: 13

stenzer

Advanced Member level 3
Joined
Oct 1, 2012
Messages
714
Helped
114
Reputation
229
Reaction score
161
Trophy points
1,323
Activity points
7,545
Hi,

sorry but I'm still confused by your calculation and you haven't added the units as requested.

E.g. you measured 0.01288, what's its unit? I assume V_pk,RX = 0.01288 Vpk, so this is your received and measured peak amplitude for a RF generator setting of -38 dBm?

The 0.01288 Vpk would result in a dBm of -27.8017 dBm according to the following equation [1], assuming a 50 Ω sytsem

PdBm,50Ω=10⋅log10(10⋅V2pk,RX)PdBm,50Ω=10⋅log10⁡(10⋅Vpk,RX2)​

So assuming your recived signal would be attenuated by 2.4 dB, you would have a TX signal of -25.4017 dBm.

[1] https://www.rfcafe.com/references/electrical/pwr2volts.htm

BR
 
Last edited:

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
Below are my calculation.

My Rx system is having high-speed ADC with full-scale power of -2.2 dBm.
So, below will become the formula.

Power in dBm = 20*Log( SQRT(I^2+Q^2) + full scale

Power in dBm = 20* log ( SQRT(I^2+Q^2) -2.2

Power in dBm for the measured amplitude of 0.01288 is = 20*log(0.01288) -2.2 = -40 dBm
--- Updated ---

So, when I am transmitting let's say -30 dBm from my signal generator.

My SQRT(I^2+Q^2) = 0.032359 Vpk.

If we convert it to dBm = 20*log(0.032359) -2.2 = -32 dBm
 

stenzer

Advanced Member level 3
Joined
Oct 1, 2012
Messages
714
Helped
114
Reputation
229
Reaction score
161
Trophy points
1,323
Activity points
7,545
Why are you adding the ADC's full scale power here? That's simply the power which can be handeled by the ADC before it starts to clip/saturate your input signal. That's basically the same as the full-scale-range (FSR) in Volt, of an ordinary ADC, see [2].

Further, your 20 • log10(sqrt(I^2+Q^2)) confuses me, as this would be simply a dB (no dBm) representation of your measured voltage (peak) amplitude. I do not see a dBm scaling here at all. Have a look here [3].

And you are still not adding the units i.e. 0.01288 Vpk (?), so I do not know if you are dealing with peak voltages or RMS voltages.

[2] https://ez.analog.com/ez-blogs/b/engineerzone-spotlight/posts/adc-full-scale-input-power
[3] https://www.tek.com/en/blog/calculating-rf-power-iq-samples

BR
 

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
Yes, I understand the formulla. But I am in the assumption that the given formulla of

PdBm = 10* log10( I^2+Q^2) is for the ideal case when ADC full scale power is 0 dBm.

I am just using the same formula. let me take all the formulas as it as [3]

For example , SQRT(I^2+Q^2) = 0.01288 Vpk as per [3]

Remove the square root , I will be getting ( I^2+Q^2) = 0.0001658944

PdBm = 10*log10(I^2+Q^2) as per [3]

PdBm = 10*log(0.0001658944) = -37.8 dBm

Now If we add ADC full scale power = -37.8 -2.2 = -40 dBm

( So I am having the result in terms of SQRT(I^2+Q^2) , which is Vpk as per [3] , now in order to convert it into dBm power , PdBm = 10*log( I^2+ Q^2) or we can say 20*log (SQRT(I^2+Q^2) )
 

stenzer

Advanced Member level 3
Joined
Oct 1, 2012
Messages
714
Helped
114
Reputation
229
Reaction score
161
Trophy points
1,323
Activity points
7,545
PdBm = 10*log( I^2+ Q^2) or we can say 20*log (SQRT(I^2+Q^2) )

A factor of 10 is missing here. PdBm = 10 • log( 10 • (I^2 + Q^2) ), so your conclusion is not true.

PdBm = 10*log(0.0001658944) = -37.8 dBm

A factor of 10 is here missing here as well --> PdBm = 10 • log( 10 • 0.0001658944) = -27.8 dBm

Which ADC are you using? Taking the -2.2 dBm does not make sense to me at all.

BR
 

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
I think , there is some major confusion.

See, I am using TI high speed data converter having -2.2 dBm full scale power.
and it provides me the output in terms of I and Q with Fix16_0 format
For example, when I am sending -24.4 dBm input power,

I = 1785 and Q = 687 is amplitude 1913. ( SQRT(I^2+Q^2)

As My I and Q need to be scaled down by 2^15 ( as my I and Q are having FIX16_0 format signed format representation).
1913/32767 = 0.05838190 = SQRT(I^2+Q^2) scaling down with 32767

{sqrt(I^2+Q^2)}^2 = 0.00340844624761

PdBm = 10* log ( 10 * 0.00340844624761) = -14.6 dBm
This does not make sense.

( because with the same I and Q sample results , I am verifying with one FFT domain GUI ,which is providing me the result in dBFS . so for RF input -24.4 dBm , I am getting -24.26 dBFS.

Same when I am providing -1.2 dbm RF input power, I am getting -1 dBFS . ( as per datasheet, I should get -1 dBFS at -3.2 dBm , but I am getting it at -1.2 dBm that means my RF front end loss is 2 dB)

May be the issue is with the scaling factor? please guide.
--- Updated ---

I and Q is the signed decimal value
 

stenzer

Advanced Member level 3
Joined
Oct 1, 2012
Messages
714
Helped
114
Reputation
229
Reaction score
161
Trophy points
1,323
Activity points
7,545
I asked you several times to add units to your results, this is the last time.

Further, I asked you which ADC you are using, also no info.

Yes, the results does not make sense at all, but if you are leaving out important imformation, no one can support you. How should I check if your conversion is correct i.e. does the ADC provides the resolt in two's complement or offset binary format, what's the ADC's reference voltage.....
 

Maitry07

Member level 5
Joined
Jun 29, 2022
Messages
83
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
748
OK, please check below responses. I think I have added units in all. just in I and Q are the digital data, in that I have not added, may be ok sure I will take care from this time.

The ADC , I am using is high speed data converter AFE series of TI:
As you can see from the datasheet, the full scale power they have given in dBm (DSA=0) is -2.2 dBm.

This chip has inbuilt DDC as well, which directly digitize the RF to I and Q samples. which I am capturing with the rate of 61.44 MSPS in my FPGA.
ADC+DDC output provide result in 16-bit fixed point.(yes it is in the signed format. the highest bit is sign bit) so I am assuming,
Minimum to maximum number in signed decimal: -32768 to 32767 (i.e., the decimal point is after 16 bits) or in hex format: 0x8000 to 0x7FFF.

I and Q is Fix16_0 format. that means , my I and Q are digital 16bits results. I am using ILA analyzer to convert the binary to signed decimal value.

So, I = 1785 ( signed decimal value of binary 16 bits) and Q = 687 ( signed decimal value of binary 16 bits) - for I and Q, there is no unit I think. It is just the digital data.

as this is fix_16_0 format. I have scaled down the signed decimal value by 2^15(32767).

I =1785/2^15 = 0.05447553 , Q =687/2^15 = 0.0209662160

SQRT( I^2+Q^2) = SQRT( 0.00296758+ 0.000439582) = 0.05837090211 V pk ( unit is Vpk as per [3])

I hope, now I have provided you all the information. kindly request you to look into this?
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top