Products & Services Solutions Academia Support User Community Company

Learn more about RF Toolbox   

cascadesparams - Cascade S-parameters to form cascaded network

Syntax

s_params = cascadesparams(s1_params,s2_params,...,sn_params)
s_params = cascadesparams(s1_params,s2_params,...,sn_params,Nconn)

Description

s_params = cascadesparams(s1_params,s2_params,...,sn_params) cascades the scattering parameters of the input networks described by the S-parameters s1_params, s2_params, s3_params...,sn_params to create a cascaded network. It stores the S-parameters of the cascade in s_params. Each of the input networks must be a 2N-port network described by a 2N-by-2N-by-m array of S-parameters. All networks must have the same reference impedance.

The following diagram shows the cascadesparams port ordering.

Based on this ordering, the function connects ports N + 1 through N of the first network to ports 1 through N of the second network. To use this function for S-parameters with different port arrangements, use the snp2smp function to reorder the port indices before cascading the networks.

s_params = cascadesparams(s1_params,s2_params,...,sn_params,Nconn) cascades the scattering parameters of the input networks described by the S-parameters s1_params, s2_params, s3_params...,sn_params to create a cascaded network. This network is based on the number of cascade connections between networks specified by Nconn. Nconn must be a positive scalar or vector of size n-1.

cascadesparams always connects the last Nconn(i) ports of the ith network and the first Nconn(i) ports of the i+1th network. The ports of the entire cascaded network represent the unconnected ports of each individual network, in order from the first network to the nth network. When you use this syntax, the number of ports in each network do not have to be even. Additionally, the networks do not need to have the same number of ports.

Examples

Assemble a 2-port cascaded network from two sets of 2-port S-parameters:

%Create two sets of 2-port S-parameters
ckt1 = read(rfckt.amplifier, 'default.s2p');
ckt2 = read(rfckt.passive, 'passive.s2p');
freq = [2e9 2.1e9];
analyze(ckt1, freq);
analyze(ckt2, freq);
sparams_2p_1 = ckt1.AnalyzedResult.S_Parameters;
sparams_2p_2 = ckt2.AnalyzedResult.S_Parameters;
%Cascade the S-parameters
sparams_cascaded_2p = cascadesparams(...
     sparams_2p_1, sparams_2p_2)
 

Assemble a 3-port cascaded network from a set of 3-port S-parameters and a set of 2-port S-parameters:

%Create one set of 3-port S-parameters
%and one set of 2-port S-parameters
ckt1 = read(rfckt.passive, 'default.s3p');
ckt2 = read(rfckt.amplifier, 'default.s2p');
freq = [2e9 2.1e9];
analyze(ckt1, freq);
analyze(ckt2, freq);
sparams_3p = ckt1.AnalyzedResult.S_Parameters;
sparams_2p = ckt2.AnalyzedResult.S_Parameters;
%Cascade the two sets by connecting one port between them
Nconn = 1
sparams_cascaded_3p = cascadesparams(...
     sparams_3p,sparams_2p, Nconn)

 

Assemble a 3-port cascaded network from a set of 3-port S-parameters and a set of 2-port S-parameters, connecting the second port of the 3-port network to the first port of the 2-port network:

ckt1 = read(rfckt.passive, 'default.s3p');
ckt2 = read(rfckt.amplifier, 'default.s2p');
freq = [2e9 2.1e9];
analyze(ckt1, freq);
analyze(ckt2, freq);
sparams_3p = ckt1.AnalyzedResult.S_Parameters;
sparams_2p = ckt2.AnalyzedResult.S_Parameters;
%Reorder the second and third ports of the 3-port network
sparams_3p_2 = snp2smp(sparams_3p, 50, [1 3 2])
%Cascade the two sets by connecting one port between them
Nconn = 1
sparams_cascaded_3p_2 = cascadesparams(...
     sparams_3p_2,sparams_2p, Nconn)

 

Assemble a 3-port cascaded network from a set of 3-port S-parameters and two sets of 2-port S-parameters:

ckt1 = read(rfckt.passive, 'default.s3p');
ckt2 = read(rfckt.amplifier, 'default.s2p');
ckt3 = read(rfckt.passive, 'passive.s2p');
freq = [2e9 2.1e9];
analyze(ckt1, freq);
analyze(ckt2, freq);
analyze(ckt3, freq);
sparams_3p = ckt1.AnalyzedResult.S_Parameters;
sparams_2p_1 = ckt2.AnalyzedResult.S_Parameters;
sparams_2p_2 = ckt3.AnalyzedResult.S_Parameters;
%Connect one port between each set of adjacent networks
Nconn = [1 1]
sparams_cascaded_3p_3 = cascadesparams(...
     sparams_3p, sparams_2p_1, sparams_2p_2, Nconn)

 

Assemble a 3-port cascaded network from a set of 3-port S-parameters and two sets of 2-port S-parameters, connecting the 3-port network to both 2-port networks:

ckt1 = read(rfckt.passive, 'default.s3p');
ckt2 = read(rfckt.amplifier, 'default.s2p');
ckt3 = read(rfckt.passive, 'passive.s2p');
freq = [2e9 2.1e9];
analyze(ckt1, freq);
analyze(ckt2, freq);
analyze(ckt3, freq);
sparams_3p = ckt1.AnalyzedResult.S_Parameters;
sparams_2p_1 = ckt2.AnalyzedResult.S_Parameters;
sparams_2p_2 = ckt3.AnalyzedResult.S_Parameters;
%Cascade sparams_3p and sparams_2p_1
%by connecting one port between them
Nconn = 1
sparams_cascaded_3p = cascadesparams(...
     sparams_3p, sparams_2p_1, Nconn)
%Reorder the second and third ports of the 3-port network
sparams_cascaded_3p_3 = snp2smp(...
     sparams_cascaded_3p, 50, [1 3 2])
%Cascade sparams_3p and sparams_2p_2
%by connecting one port between them
sparams_cascaded_3p_4 = cascadesparams(...
     sparams_cascaded_3p_3,sparams_2p_2, Nconn)

See Also

deembedsparams | rfckt.cascade | s2t | t2s

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS