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.

Relative phase compensation technique

Maitry07

Full Member level 3
Full Member level 3
Joined
Jun 29, 2022
Messages
159
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Visit site
Activity points
1,424
Hello support team,

I am working on a high speed ADC + FPGA . High speed ADC is multi channel that can take CW tone RF input and convert it into decimated I,Q digital data through DDC technique. I am providing 40 MHz RF input to high speed ADC channel 1 and channel 2 with the same cable length through function generator. My FG's channel 1 phase is 9.058 deg while My FG's channel 2 phase is 0 deg. FYI: I have checked my input's phase difference in MSO and validate that it is 9.058 deg

My FPGA is capturing decimated digital I,Q data for both the channels simultanously and I am using CORDIC IP core to convert the I,Q to absolute phase for both channel 1 and channel 2.
now, I am using subtractor IP core to have a difference between absolute phase 1- absolute phase 2 to generate relative phase.

and when I am checking output of relative phase , it is approximately 15 deg instead of 9.058 deg. weather this variation is due to slight mismatch between both the front end channel of my high speed ADC?
FYI: I am using AFE7900 High speed ADC.

What need to be done in order to compensate this relative phase misatch? is it ok to subtract 6 deg from the final relative phase output or any other proven method you can suggest to compensate this relative phase mismatch?

Awaited your response. if you need any other details, do let me know.
 
Solution
keep your test simple with minimum variables. Just connect same signal to two ADCs. This should give zero phase.
Target dc by setting NCO to -RF then if you don't get zero phase either the NCO phase is playing or your logic needs check.

You can directly check the final I/Q dc levels and tell us what are they.
1732536133789.png

We have recommended this several times now. But OP refuses to cooperate.
Thus I'll leave this thread.
--- Updated ---

We have recommended this several times now. But OP refuses to cooperate.
Thus I'll leave this thread.
I have connected the same signal to 2 ADCs via BNC TEE.
I am looking at difference (relative phase) not the absolute phase. my input phase variation is fixed such as 90 deg. variation remains same and both inputs are in sync as well as DSP to generate absolute phase for both channels are also in sync.
the data I am seeing is before averaging at near full scale
 
I am looking at difference (relative phase) not the absolute phase. my input phase variation is fixed such as 90 deg. variation remains same and both inputs are in sync as well as DSP to generate absolute phase for both channels are also in sync.
the data I am seeing is before averaging at near full scale
Let me explain and I leave it to you:
I can think of three methods to get phase difference between two tones.
1) look at peaks only or zero crossings of the two tones and compare/average. This will give you resolution no more than one sample per cycle as I explained above.

2) push tones down to dc then you get rid of cycles and you can average all samples. This is best method in my view

3) do fft and you get one bin per tone to get I/Q phase in frequency domain.
 
Hello,

Yes I applied 2nd method and push down my 40 MHz CW RF tone to dc after DDC to get rid of cycles. and further analyze the same. I again analyze my output. the below remains same for 40 MHz .
generator setting----oscilloscope---- your measurement
0---------------------- 2.8--------------------5.3~6
90--------------------- 92.5------------------ 95.4~96.1
270--------------------273-------------------275~276

I have further analyze at different RF frequencies . below is the variation I am getting with DDC output =3 MHz or DC.

Frequency( MHz ) ----------oscilloscope ---------measurement
35 to 38 MHz----------------2.8 .....................................max 5.1
39 to 42 MHz----------------2.8---------------------max 6
43 to 46 MHz----------------2.8---------------------max 7.5
47 to 50 MHz----------------2.8---------------------max 8.3
51 to 56 MHz----------------2.8---------------------max 8.8
57 to 60 MHz----------------2.8---------------------max 9.8

so this fix variation is dependent on frequency and it is fixed in any scenario of phase difference either 0, 90, 270 or any other. Now can you further check and let me know what could the reason and can I compensate this fix offset of phase difference? and why what is the reason
 
I have a bit doubt how you are pushing down to dc.
Are you applying (-40MHz) at DDC i.e. (-RF)?
would all RF cases end up as 3MHz?
Or are you applying (-3MHz) in all cases?

are you sure you get dc levels on I/Q at the end?
 
I have a bit doubt how you are pushing down to dc.
Are you applying (-40MHz) at DDC i.e. (-RF)?
would all RF cases end up as 3MHz?
Or are you applying (-3MHz) in all cases?

are you sure you get dc levels on I/Q at the end?
My high speed ADC's sample rate is 1966.08 MSPS. DDC decimation factor is 32. I am applying 40 MHz RF input to high speed ADC input. To push down to DC, my NCO frequency I am keeping same as RF frequency, in this case 40 MHz. and yes I am sure I am getting dc levels on I/ Q at the end. I have validate this in complex FFT domain as well. I am getting DDC output tone at DC (0 Hz).
To vary DDC output frequency, I am varying NCO frequency.
--- Updated ---

Also I have found one more observation. Let me give a detailed brief for this as well.
My High speed ADC is having 4 identical input channels. up till now, I have done the above analysis for relative phase measurement between channel 1 and channel 2. so below is the measurement for channel 1 and channel 2.
Frequency( MHz ) ----------oscilloscope ---------measurement
35 to 38 MHz----------------2.8 .....................................max 5.1
39 to 42 MHz----------------2.8---------------------max 6

after that, I have tried 3 more combination.

channel 1 and channel 3
Frequency( MHz ) ----------oscilloscope ---------measurement
39 to 42 MHz----------------2.8---------------------max 6.6

channel 1 and channel 4
39 to 42 MHz----------------2.8---------------------max 5.6

channel 2 and channel 3
39 to 42 MHz----------------2.8---------------------max 2.8
( That means , there is no compensation required for the relative phase measurement between channel 2 and channel 3)

all above is done with DDC output : DC (0 Hz)
 
Last edited:
keep your test simple with minimum variables. Just connect same signal to two ADCs. This should give zero phase.
Target dc by setting NCO to -RF then if you don't get zero phase either the NCO phase is playing or your logic needs check.

You can directly check the final I/Q dc levels and tell us what are they.
 
keep your test simple with minimum variables. Just connect same signal to two ADCs. This should give zero phase.
Target dc by setting NCO to -RF then if you don't get zero phase either the NCO phase is playing or your logic needs check.

You can directly check the final I/Q dc levels and tell us what are they.
1732536133789.png

We have recommended this several times now. But OP refuses to cooperate.
Thus I'll leave this thread.
--- Updated ---

We have recommended this several times now. But OP refuses to cooperate.
Thus I'll leave this thread.
I have connected the same signal to 2 ADCs via BNC TEE.
 
Solution
As per your suggestion,
I have taken I,Q DC levels and validate the relative phase with that I,Q DC levels . and observations are as below.

One of the data
Channel 1
Channel 1 I = 18415 ( signed decimal )
Channel 1 Q = -22080 (signed decimal )

In order to take this in the range of -1 to 1. I am dividing the I and Q with 2^15 and multiply it with Vpk( full scale), which is 0.24547 Vpk .

Channel 1 I ( divided) = 0.137954
Channel 1 Q ( divided) = -0.165410
(4th quadrant)

Inverse tan of channel 1 (Q/I) = -0.87565

Channel 2
Channel 2 I = -16814 ( signed decimal )
Channel 2 Q = 23604 (signed decimal )
(2nd quadrant)

In order to take this in the range of -1 to 1. I am dividing the I and Q with 2^15 and multiply it with Vpk( full scale), which is 0.24547 Vpk .

Channel 2 I ( divided) = -0.1259
Channel 2 Q ( divided) = 0.1768

Inverse tan of channel 2 (Q/I) = 2.1897

Relative phase channel 1- channel 2 = -3.065 ( radian)
As per ATAN2 and CORDIC ATAN2 radian output rule, below is the condition
1732610784502.png


So , in current situation channel 1 I, Q has 4th quadrant and channel 2 I,Q has 2nd quadrant. so the ATAN2 output is already 180 deg added.

So, from the subtracted (relative phase) output , I need to subtract 180 deg (-3.14 radian) . The result will be -6.205 radian.

And further I have added module that convert the range to 0 to 2*pi . so for the negative result , 6.28 radian ( 360 deg ) will be added.

-6.205 + 6.28 = 0.075 radian = 4.29 deg I am getting .

So, the I/Q data is in such a way that I am getting this 4.29 deg for the phase aligned single input to 2 ADCs. channels.

Now, can you review and provide suggestion and reason behind this and how to mitigate?
I have also attached FFT domain result at 0 Hz in the previous answer.

Awaited your quick and positive response.
 
without going into calculation details.
Your two channels are not even in same quadrant.
channel1 is Q4
channel2 is Q2

that is a lot more than just few degrees.
Either the mixer or decimation is messing it up.
The mixers must be enabled in parallel.
The decimation chains need to go in parallel
 
Mixing and Decimation are done inside the High speed ADC and this is done in sync only. also, I am getting all I,Q data for both the channels are in sync.
is this because of the front end? My front end for both channels are identical and made of baluns and LC network ?
 
The input is same I assume unless you are having issue there.
To track the issue you can move to 3MHz instead of dc and check the tone at every stage visually.

It could be you have 180 degrees phase shift for some reason
 
Yes, Input are same as I told earlier. I am providing input through BNC TEE to generate 2 outputs from single channel of function generator.
and also, As I told earlier, what I observe is 2 deg offset while checking with MSO. Either it is incapability of MSO to measure 0 deg phase shift. I do not know. But I am providing same input via BNC TEE to both the channels. I am using standard same length cables.
 
The two degrees is just false.

try 3MHz back and chase it visually
ok let me try and update you
--- Updated ---

ok let me try and update you
1732615172993.png


Channel 1 (I ): DDC output DC


1732615234369.png

Channel 2 (I) : DDC output DC
--- Updated ---

ok let me try and update you
--- Updated ---


1732615172993.png


Channel 1 (I ): DDC output DC


1732615234369.png

Channel 2 (I) : DDC output DC
1732615343610.png

Channel 2(I) : ddc output 3 MHz

1732615396073.png

Channel 1(I) : ddc output 3 MHz
--- Updated ---

I have attached one excel file in which I have added I, Q data for both DDC output =3 MHz , DDC output = 0 Hz when input is given via BNC TEE through same signal to both ADC.

can you check?
 
Last edited:
ok let me try and update you
--- Updated ---


View attachment 195572

Channel 1 (I ): DDC output DC


View attachment 195573
Channel 2 (I) : DDC output DC
--- Updated ---


View attachment 195574
Channel 2(I) : ddc output 3 MHz

View attachment 195575
Channel 1(I) : ddc output 3 MHz
--- Updated ---

I have attached one excel file in which I have added I, Q data for both DDC output =3 MHz , DDC output = 0 Hz when input is given via BNC TEE through same signal to both ADC.

can you check?
Please check attached zip excel .
the single excel include analysis on the I/Q data with DDC = 0 Hz and DDC=3 MHz.
please note: Before RF on, I have set the NCO frequency as well decimation factor of both ADCs . and input is given via single source through BNC TEE.

Request you to kindly check and review
--- Updated ---

ok let me try and update you
--- Updated ---


View attachment 195572

Channel 1 (I ): DDC output DC


View attachment 195573
Channel 2 (I) : DDC output DC
--- Updated ---


View attachment 195574
Channel 2(I) : ddc output 3 MHz

View attachment 195575
Channel 1(I) : ddc output 3 MHz
--- Updated ---

I have attached one excel file in which I have added I, Q data for both DDC output =3 MHz , DDC output = 0 Hz when input is given via BNC TEE through same signal to both ADC.

can you check?
Please check attached zip excel .
the single excel include analysis on the I/Q data with DDC = 0 Hz and DDC=3 MHz.
please note: Before RF on, I have set the NCO frequency as well decimation factor of both ADCs . and input is given via single source through BNC TEE.

Request you to kindly check and review
 

Attachments

  • comparison of I_Q data at DDC variation.zip
    17.4 KB · Views: 19
For DC and 3MHz, the phase and amplitude are different. You should get at least amplitude to be close enough.

So your test is not valid for its purpose.
For now, test 3MHz only and also ignore your other scaling calculations, you don't need them. Just look at I,Q as they are.
Avoid initial sections as tone goes through DDC filters (just delete them from vector).
Still you need to capture both channels at same time as the 3MHz cycles around?
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top