Enforce passivity of S-parameters
sparams_passive = makepassive(sparams)
hsp = makepassive(hs)
sparams_passive = makepassive(sparams) makes an array of S-parameters passive. Both sparams and sparams_passive are N-by-N-by-M arrays representing M N-port S-parameters.
The makepassive function enforces the following conditions on sparams:
The notation represents the 2-norm, or singular-value decomposition, of S.
hsp = makepassive(hs) creates a passive S-parameter object from the S-parameter object hs.
N-port S-parameters, specified as an RF Toolbox™ S-parameter object.
sparams can represent either an active network or a passive network. To check if sparams is passive, use the ispassive function.
The makepassive function uses a purely mathematical method to calculate sparams_passive. As a result, the array sparams_passive does not represent the same network as sparams. sparams and sparams_passive do not represent the same network unless sparams and sparams_passive are equal.
The more closely sparams represents a passive network, the better the approximation sparams_passive is to that network. Therefore, makepassive generates the most realistic results when sparams is active only due to small numerical errors.
Enforce passivity of the S-parameters that represent a passive network:
ckt = read(rfckt.passive,'passive.s2p'); sparams = ckt.NetworkData.Data; Is_Passive = ispassive(sparams) sparams_new = makepassive(sparams); Is_Passive = ispassive(sparams_new) ckt.NetworkData.Data = sparams_new;