How to achieve phase difference from phase respons of a hybrid/Coupler?

Status
Not open for further replies.

ehsan_faal

Member level 1
Joined
Sep 10, 2014
Messages
34
Helped
4
Reputation
8
Reaction score
4
Trophy points
8
Activity points
179
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.
 

Attachments

  • s31.txt
    56.8 KB · Views: 73
  • s41.txt
    56.8 KB · Views: 77

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?
Code:
s31(s31<0)=s31(s31<0)+360
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…