Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

### Contents

Combine S-parameters to form cascaded network

## Description

s_params = cascadesparams(s1_params,s2_params,...,sk_params) cascades the scattering parameters of the K input networks described by the S-parameters s1_params through sk_params. The function 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.

hs = cascadesparams(hs1,hs2,...,hsk) cascades K S-parameter objects to create the cascaded network hs. The function checks that the Impedance and Frequencies properties of each object are equal and that the Parameters property contains a 2N-by-2N-by-M array of S-parameters.

cascadesparams assumes that you are using the port ordering given in the following illustration.

Based on this ordering, the function connects ports N + 1 through 2N of the first network to ports 1 through N of the second network. Therefore, when you use this syntax:

• Each network has an even number of ports

• Every network in the cascade has the same number of ports.

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,...,sk_params,Kconn) cascades the scattering parameters of the K input networks described by the S-parameters s1_params through sk_params. The function creates a cascaded network based on the number of cascade connections between networks, specified by Kconn. Kconn must be a positive scalar or vector of size K – 1.

• If Kconn is a scalar, cascadesparams makes the same number of connections between each pair of consecutive networks.

• If Kconn is a vector, the ith element of Kconn specifies the number of connections between the ith and the i+1th networks.

cascadesparams always connects the last Kconn(i) ports of the ith network and the first Kconn(i) ports of the i+1th network. The ports of the entire cascaded network represent the unconnected ports of each individual network, taken in order from the first network to the nth network.

• Each network can have either an even or odd number of ports.

• Every network in the cascade can have a different 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
freq = [2e9 2.1e9];
analyze(ckt1,freq);
analyze(ckt2,freq);
sparams_2p_1 = ckt1.AnalyzedResult.S_Parameters;
sparams_2p_2 = ckt2.AnalyzedResult.S_Parameters;

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
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
Kconn = 1

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');
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
Kconn = 1
sparams_2p,Kconn)

```

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');
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
Kconn = [1 1]
sparams_2p_1,sparams_2p_2,Kconn)
```

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');
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;
%by connecting one port between them
Kconn = 1
sparams_3p, ...
sparams_2p_1, ...
Kconn)
%Reorder the second and third ports of the 3-port network