www.gusucode.com > rf 案例源码程序 matlab代码 > rf/DeembedSParametersofaDUTfromaCascaded2portNetworkExample.m

    %% De-embed S-Parameters of a DUT from a Cascaded 2–port Network  

%% 
% Read measured S-parameters of the cascaded network from |samplebjt2.s2p|. 
S_measuredBJT = sparameters('cascadedbackplanes.s4p');
freq = S_measuredBJT.Frequencies;  

%% 
% Calculate the S-parameters of the left fixture of the network. 
leftpad = circuit('left');
add(leftpad,[1 2],inductor(1e-9));
add(leftpad,[2 3],capacitor(100e-15));
setports(leftpad,[1 0],[3 0],[2 0],[3 0]);
S_leftpad = sparameters(leftpad,freq)  

%% 
% Calculate the S-parameters of the right fixture of the network. 
rightpad = circuit('right');
add(rightpad,[1 3],capacitor(100e-15));
add(rightpad,[1 2],inductor(1e-9));
setports(rightpad,[1 0],[3 0],[2 0],[3 0]);
S_rightpad = sparameters(rightpad,freq)  

%% 
% De-embed the S-parameters of the DUT. The output is stored in |S-DUT|
% in MATLAB(R) workspace. 
% 
S_DUT = deembedsparams(S_measuredBJT,S_leftpad,S_rightpad)