main content

convert and reorder single-凯发k8网页登录

convert and reorder single-ended n-port s-parameters to single-ended m-port s-parameters

description

example

s_params_mp = snp2smp(s_params_np) convert and reorder the single-ended n-port s-parameters, s_params_np, into the single-ended m-port s-parameters, s_params_mp. m must be less than or equal to n.

example

s_params_mp = snp2smp(s_params_np,z0,n2m_index,zt) convert and reorder the s-parameter data using the optional arguments z0, n2m_index, and zt that control the conversion.

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

m-port device

s_params_mp = snp2smp(s_obj,n2m_index,zt) convert and reorder a s-parameters object, s_obj, into the single-ended m-port s-parameters, s_params_mp. m must be less than or equal to n.

examples

convert 3-port s-parameters to 3-port s-parameters with port indices swapped from [1 2 3] to [2 3 1] .

ckt = read(rfckt.passive,'default.s3p');

default.s3p represents a real counterclockwise circulator.

s3p = ckt.networkdata.data;
z0 = ckt.networkdata.z0;
s3p_new = snp2smp(s3p,z0,[2 3 1]);
s3p_new = s3p_new(1:5)
s3p_new = 1×5 complex
   0.1431 - 0.7986i   0.0898   0.3177i  -0.0318   0.4208i  -0.0701   0.4278i   0.0503 - 0.8080i

convert 3-port s-parameters to 2-port s-parameters by terminating port 3 with an impedance of z0.

ckt = read(rfckt.passive,'default.s3p');
s3p = ckt.networkdata.data;
z0 = ckt.networkdata.z0;
s2p = snp2smp(s3p,z0);
s2p_new = s2p(1:5)
s2p_new = 1×5 complex
  -0.0073 - 0.8086i   0.0869   0.3238i  -0.0318   0.4208i   0.1431 - 0.7986i  -0.0330 - 0.8060i

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. terminate the remaining 12 ports with an impedance of z0.

s = sparameters('default.s16p');
s16p = s.parameters;
z0 = s.impedance;
s4p = snp2smp(s16p,z0,[1 16 2 15],z0);
s4p = s4p(:,:,1)
s4p = 4×4 complex
   0.0857 - 0.1168i  -0.5372 - 0.6804i   0.0966 - 0.0706i   0.0067   0.0053i
  -0.5366 - 0.6860i   0.0803 - 0.1234i   0.0059   0.0048i   0.0977 - 0.0703i
   0.0957 - 0.0700i   0.0067   0.0048i   0.0818 - 0.1104i  -0.5362 - 0.6838i
   0.0055   0.0051i   0.0972 - 0.0703i  -0.5376 - 0.6840i   0.0761 - 0.1180i

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 terminate port 4 with an impedance of 100 ohms and terminate the remaining 11 ports with an impedance of 50 ohms.

s = sparameters('default.s16p');
s16p = s.parameters;
z0 = s.impedance; 
zt(1:16) = {50};
zt{4} = 100;
s4p = snp2smp(s16p,z0,[1 16 2 15],zt);
s4p(:,:,1)
ans = 4×4 complex
   0.0857 - 0.1168i  -0.5372 - 0.6804i   0.0966 - 0.0706i   0.0067   0.0053i
  -0.5366 - 0.6860i   0.0803 - 0.1234i   0.0059   0.0048i   0.0977 - 0.0703i
   0.0957 - 0.0700i   0.0067   0.0048i   0.0818 - 0.1104i  -0.5362 - 0.6838i
   0.0055   0.0051i   0.0972 - 0.0703i  -0.5376 - 0.6840i   0.0761 - 0.1180i

input arguments

s-parameters, specified as a n-by-n-by-k array , where k representing number of frequency points of a n-port s-parameters.

s-parameter object, specified as n-port scalar handle objects, which include numeric arrays of s-parameters.

reference impedance of n-port s-parameters, specified as positive real scalar in ohms.

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 the function converts to the ith port of s_params_mp. for example, the setting [1, 2] means that m is 2, and the first two ports of the n-port s-parameters become the ports of the m-port parameters. the function terminates any additional ports with the impedances specified by zt.

termination impedance of the ports,zt, specified as a scalar, vector, or cell array. if m is less than n, snp2smp terminates the nm ports not listed in n2m_index using the values in zt. if zt is a scalar, the function terminates all nm ports not listed in n2m_index by the same impedance zt. if zt is a vector of length k, zt[i] is the impedance that terminates all nm ports of the ith frequency point not listed in n2m_index. if zt is a cell array of length n, zt{j} is the impedance that terminates the jth port of the n-port s-parameters. the function ignores impedances related to the ports listed in n2m_index. each zt{j} can be a scalar or a vector of length k.

output arguments

single-ended m-port s-parameters, returned as one of the following:

  • if you provide s_params_np as an input, s_params_mp is returned as a m-by-m-by-k array representing k m-port s-parameters. where m representing number of frequency points of a single-ended m-port s-parameters.

  • if you provide s_obj as an input, s_params_mp is returned as a s-parameter object with following properties:

    • numports — number of ports, specified as an integer. the function calculates this value automatically when you create the object.

    • frequencies — s-parameter frequencies, specified as a k-by-1 vector of positive real numbers sorted from smallest to largest. the function sets this property from the filename or freq input arguments.

    • parameters — s-parameter data, specified as an n-by-n-by-k array of complex numbers. the function sets this property from the filename or data input arguments.

    • impedance — reference impedance in ohms, specified as a positive real scalar. the function sets this property from the filename or z0 input arguments. if no reference impedance is provided, the function uses a default value of 50.

complex number support: yes

version history

introduced in r2007b

see also

| | | | | | | | | | | | |

网站地图