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?
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);
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?