process file data for analysis -凯发k8网页登录

main content

process file data for analysis

convert single-ended s-parameters to mixed-mode s-parameters

after you import file data (as described in ), 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 s-parameters

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

  • — convert 4-port, single-ended s-parameters to 2-port, common-mode s-parameters (scc).

  • — convert 4-port, single-ended s-parameters to 2-port, cross-mode s-parameters (scd).

  • — convert 4-port, single-ended s-parameters to cross-mode s-parameters (sdc).

  • — convert 4-port, single-ended s-parameters to 2-port, differential-mode s-parameters (sdd).

to perform the above conversions all at once, or to convert larger data sets, use one of these functions:

  • — convert 4n-port, single-ended s-parameters to 2n-port, mixed-mode s-parameters.

  • — convert 2n-port, mixed-mode s-parameters to 4n-port, single-ended s-parameters.

conversion functions support a variety of port orderings. for more information on these functions, see the corresponding reference pages.

convert 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));

extract m-port s-parameters from n-port s-parameters

after you import file data (as described in ), 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:

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

  • s_params_np is an array of n-port s-parameters with a reference impedance z0.

  • s_params_mp is an array of m-port s-parameters.

  • n2m_index is a vector of length m specifying how the ports of the n-port s-parameters map to the ports of the m-port s-parameters. n2m_index(i) is the index of the port from s_params_np that is converted to the ith port of s_params_mp.

  • zt is the termination impedance of the ports.

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

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.

extract 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));

cascade n-port s-parameters

after you import file data (as described in ), you can cascade two or more networks of 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

  • s_params is an array of cascaded s-parameters.

  • s1_params,s2_params,...,sn_params are arrays of input s-parameters.

  • nconn is a positive scalar or a vector of size n-1 specifying how many connections to make between the ports of the input s-parameters. cascadesparams connects the last port(s) of one network to the first port(s) of the next network.

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

import and cascade 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];
    analyze(s_16port, freq);
    analyze(s_4port, freq);
    sparams_16p = s_16port.s_parameters;
    sparams_4p = s_4port.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.

related topics

    网站地图