ispassive

Check passivity of N-port S-parameters

Description

example

[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 is false. It also optionally returns idx_non_passive, the indices of the non-passive S-parameters.

example

[___]= ispassive(sparams_data,'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. The impedance can be in general complex.

Examples

collapse all

S = sparameters('measured.s2p');

Check the passivity of the S-parameters.

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

Get the nonpassive S-parameters.

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

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 S-parameter data at impedance value, 60.

ispassive(sobj.Parameters,'Impedance',60)
ans = logical
1

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 positive real scalar.

Note

z0 must be a positive real scalar or vector. If z0 is a vector, then the vector must be equal to the number of network parameter data points or frequency vector.

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.