AnsweredAssumed Answered

How to measure 4 port S parameter

Question asked by jib on Jun 21, 2011
Latest reply on Oct 27, 2011 by tsilchia001
I am using matlab with a network analyzer and my code is not measuring 4 port S-parameter. It creates a .s2p file on the PNA and gives me a results for what appears to be only one S parameter even though I believe that I am asking for more than one S parameter. Can anyone please help me edit my code so I can measure all four S parameters in one touchstone file. Also if anyone can tell me how to transfer the .s2p file from the pna analyzer to matlab/my pc, i will be VERY grateful. Please, any help would be greatly and i mean greatly appreciated.

here is the gist of my code


fprintf(pna,'DISPlay:WINDow1:STATE ON');

fprintf(pna,'CALCulate:PARameter:DEFine "S11", S11');
fprintf(pna,'CALCulate:PARameter:DEFine "S21", S21');
fprintf(pna,'CALCulate:PARameter:DEFine "S12", S12');
fprintf(pna,'CALCulate:PARameter:DEFine "S22", S22');

fprintf(pna,'DISPlay:WINDow1:TRACe1:FEED "S11"');
fprintf(pna,'DISPlay:WINDow1:TRACe2:FEED "S21"');
fprintf(pna,'DISPlay:WINDow1:TRACe3:FEED "S12"');
fprintf(pna,'DISPlay:WINDow1:TRACe4:FEED "S22"');

fprintf(pna, 'INITiate1:CONTinuous OFF;*OPC?');
opc = fscanf(pna);
fprintf(pna, 'SENSe1:SWEep:TRIGger:POINt OFF');

fprintf(pna, 'SENSe1:SWEep:POINts 9');

fprintf(pna,'SENS:FREQ:START 1000000000');

fprintf(pna, 'SENS:FREQ:STOP 2000000000');

fprintf(pna, 'INITiate1;*OPC?');
opc = fscanf(pna);

fprintf(pna, 'CALCulate1:PARameter:SELect "S11"');
fprintf(pna, 'CALCulate1:PARameter:SELect "S12"');
fprintf(pna, 'CALCulate1:PARameter:SELect "S21"');
fprintf(pna, 'CALCulate1:PARameter:SELect "S22"');

fprintf(pna, 'FORMat ASCII');

fprintf(pna, 'CALC1:DATA:SNP:PORTs? "1,2"')

result = fscanf(pna)

fprintf(pna, 'CALC1:DATA:SNP:PORTs:SAVE "1,2", "C:/Documents and Settings/Administrator/Desktop/mydata.s2p"');