How to achieve phase difference from phase respons of a hybrid/Coupler?
时间:04-04
整理:3721RD
点击:
hi every one.
I have 2 txt file that contain phase for s31 and s41 from a 3dB coupler(Hybrid).
It must some how give the 90 degree phase difference and when i subtract them i get weird result?
could any one give me a clue how to get this result from these files?
I must get this :
from these data:
Thanks.
I Have any CST in mu ubuntu,and because of that I can't do anything with the coupler model or phase response,I only have these 2 text file!
but about "unwrap" that u said,could you give me a more clear answer?
is this right?
I have 2 txt file that contain phase for s31 and s41 from a 3dB coupler(Hybrid).
It must some how give the 90 degree phase difference and when i subtract them i get weird result?
could any one give me a clue how to get this result from these files?
I must get this :
from these data:
Thanks.
There is an additional length in your data. This adds phase proportional to frequency, and with the phase "jumps" from -180 to 180°, now you can't just subtract the data.
You need to "unwrap" the data before subtracting, so that it is continuous beyond the -180°, rather than jumping from -180° back to 180°.
I use this simple Octave code for get the results:
Code:
%% after removing two first line: s31=load('/home/ehsan/Desktop/CST/s31.txt'); freq=s31(:,1); s31=s31(:,2); s41=load('/home/ehsan/Desktop/CST/s41.txt'); s41=s41(:,2); diffPhase=bsxfun(@minus,s31,s41);
but about "unwrap" that u said,could you give me a more clear answer?
is this right?
Code:
s31(s31<0)=s31(s31<0)+360
You can convert your phase to radian and use the unwrap function
http://octave.sourceforge.net/octave...on/unwrap.html
https://ccrma.stanford.edu/~jos/fp/P...nwrapping.html