Products & Services Solutions Academia Support User Community Company

Learn more about RF Toolbox   

Processing File Data for Analysis

Converting Single-Ended S-Parameters to Mixed-Mode S-Parameters

After you import file data (as described in Importing Property Values from Data Files), you can convert a matrix of single-ended S-parameter data to a matrix of mixed-mode S-parameters.

This section contains the following topics:

Functions for Converting 4-Port S-Parameters

To convert 4-port single-ended S-parameter data to 2-port differential-, common-, and cross-mode S-parameters, use one of these functions:

Functions for Converting 4N-Port S-Parameters

To convert 4N-port single-ended S-parameter data to 2N-port mixed-mode S-parameters, use the s2smm function with the following syntax:

s_params_mm = s2smm(s_params)

where s_params is an array of 4N-port S-parameters.

For more details about the arguments to this function, see the s2smm reference page.

Example — Converting S-Parameters

In this example, use the toolbox to import 4-port single-ended S-parameter data from a file, convert the data to 2-port differential S-parameter data, and create a new rfckt object to store the converted data for analysis.

At the MATLAB prompt:

  1. Type this command to import data from the file default.s4p:

    SingleEnded4Port = read(rfdata.data,'default.s4p');
    
  2. Type this command to convert 4-port single-ended S-parameters to 2-port mixed-mode S-parameters:

    DifferentialSParams = s2sdd(SingleEnded4Port.S_Parameters);

      Note   The S-parameters that you specify as input to the s2sdd function are the ones the toolbox stores in the S_Parameters property of the rfdata.data object.

  3. Type this command to create an rfckt.passive object that stores the 2-port differential S-parameters for simulation:

    DifferentialCkt = rfckt.passive('NetworkData', ...
        rfdata.network('Data', DifferentialSParams, 'Freq', ...
        SingleEnded4PortData.Freq));

Extracting M-Port S-Parameters from N-Port S-Parameters

After you import file data (as described in Importing Property Values from Data Files), you can extract a set of data with a smaller number of ports by terminating one or more ports with a specified impedance.

This section contains the following topics:

How To Extract S-Parameters

To extract M-port S-parameters from N-port S-parameters, use the snp2smp function with the following syntax:

s_params_mp = snp2smp(s_params_np, Z0, n2m_index, ZT)

where

The following figure illustrates how to specify the ports for the output data and the termination of the remaining ports.

For more details about the arguments to this function, see the snp2smp reference page.

Example — Extracting S-Parameters From Imported File Data

In this example, use the toolbox to import 16-port S-parameter data from a file, convert the data to 4-port S-parameter data by terminating the remaining ports, and create a new rfckt object to store the extracted data for analysis.

At the MATLAB prompt:

  1. Type this command to import data from the file default.s16p into an rfdata.data object, SingleEnded16PortData:

    SingleEnded16PortData = read(rfdata.data,'default.s16p');
    
  2. Type this command to convert 16-port S-parameters to 4-port S-parameters by using ports 1, 16, 2, and 15 as the first, second, third, and fourth ports, and terminating the remaining 12 ports with an impedance of 50 ohms:

    N2M_index = [1 16 2 15];
    FourPortSParams = snp2smp(SingleEnded16PortData.S_Parameters, ...
        SingleEnded16PortData.Z0, N2M_index, 50);

      Note   The S-parameters that you specify as input to the snp2smp function are the ones the toolbox stores in the S_Parameters property of the rfdata.data object.

  3. Type this command to create an rfckt.passive object that stores the 4-port S-parameters for simulation:

    FourPortChannel = rfckt.passive('NetworkData', ...
        rfdata.network('Data', FourPortSParams, 'Freq', ...
        SingleEnded16PortData.Freq));

Cascading N-Port S-Parameters

After you import file data (as described in Importing Property Values from Data Files), you can cascade two or more networks of N-port S-parameters.

This section contains the following topics:

How To Cascade N-Port S-Parameters

To cascade networks of N-port S-parameters, use the cascadesparams function with the following syntax:

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

where

For more details about the arguments to this function, see the cascadesparams reference page.

Example — Cascading N-Port S-Parameters

In this example, use the toolbox to import 16-port and 4-port S-parameter file data and cascade the two S-parameter networks by connecting the last three ports of the 16-port network to the first three ports of the 4-port network. Then, create a new rfckt object to store the resulting network for analysis.

At the MATLAB prompt:

  1. Type these commands to import data from the files default.s16p and default.s4p, and create the 16- and 4-port networks of S-parameters:

    S_16Port = read(rfdata.data,'default.s16p');
    S_4Port = read(rfdata.data,'default.s4p');freq = [2e9 2.1e9];
    freq = [2e9 2.1e9];
    analyze(S_16Port, freq);
    analyze(S_4Port, freq);
    sparams_16p = S_16Port.AnalyzedResult.S_Parameters;
    sparams_4p = S_4Port.AnalyzedResult.S_Parameters;
    
  2. Type this command to cascade 16-port S-parameters and 4-port S-parameters by connecting ports 14, 15, and 16 of the 16-port network to ports 1, 2, and 3 of the 4-port network:

    sparams_cascaded = cascadesparams(sparams_16p, sparams_4p,3)

    cascadesparams creates a 14-port network. Ports 1–13 are the first 13 ports of the 16-port network. Port 14 is the fourth port of the 4-port network.

  3. Type this command to create an rfckt.passive object that stores the 14-port S-parameters for simulation:

    Ckt14 = rfckt.passive('NetworkData', ...
        rfdata.network('Data', sparams_cascaded, 'Freq', ...
        freq));

For more examples of how to use this function, see the cascadesparams reference page.

  


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