This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Check passivity of N-port S-parameters


[result, idx_nonpassive]= ispassive(sparams)
[___]= ispassive(sparams,'Impedance',z0)
[___]= ispassive(fit_obj)



[result, idx_nonpassive]= ispassive(sparams) checks the passivity of S-parameters object or data. If the S-parameters are passive at every frequency, then the result is true. Otherwise, the result it false. It also optionally returns idx_non_passive, the indices of the non-passive S-parameters.


[___]= ispassive(sparams,'Impedance',z0) checks the passivity of N-port S-parameters data, that is referenced to the impedance value in the name-value pair, 'Impedance',z0.


[___]= ispassive(fit_obj) checks the passivity of a scalar rfmodel.rational object. The rfmodel.rational object is the output of a rational fit function.

Input Arguments

collapse all

S-parameters specified as one of the following:

  • A scalar S-parameters object

  • A complex N-by-N-by-K array for N-port S-parameters data.

S-parameter data referenced to z0, specified as an N-by-N-by-K numeric matrix.

Reference impedance, specified as a complex scalar or vector.

Output of rational fit function, specified as a scalar rfmodel.rational object.

Output Arguments

collapse all

Passivity of s-parameter data, returned as a logical scalar of 0 or 1. If all the S-parameters are passive, then ispassive sets flag equal to 1 (true). Otherwise, flag is equal to 0 (false). If flag is true, idx_non_passive is empty.

Indices that correspond to the frequencies where the S-parameter is not passive, returned as vector of numeric integers.


collapse all

Read a Touchstone data file.

S = sparameters('measured.s2p');

Check the passivity of the S-parameters.

[passivevar,idx] = ispassive(S);
passivevar =



Get the nonpassive S-parameters.

if ~passivevar
    nonpassivevals = S.Parameters(:,:,idx);

Convert passive.s2p Touchstone file to an nport object.

nobj = nport('passive.s2p');

Convert the n-port object, nobj to s-parameter object.

sobj = sparameters(nobj)
sobj = 

  sparameters: S-parameters object

       NumPorts: 2
    Frequencies: [202x1 double]
     Parameters: [2x2x202 double]
      Impedance: 50

  rfparam(obj,i,j) returns S-parameter Sij

Find the passivity of n-port sparameter data at impedance value, 60.

ans =



Converted measured.s2p to S-parameter object.

S = sparameters('measured.s2p');

Extract the S21 parameters and the frequencies of the s-parameters.

s21 = rfparam(S,2,1);
freq = S.Frequencies;

Rationalfit S21 data.

fit = rationalfit(freq,s21);

Check if the rationalfit of S21 data is passive.

ispass = ispassive(fit)
ispass =



Introduced in R2009b

Was this topic helpful?