From H-parameters to Z-parameters
In matrix form, the formula is
Z=([1000]H+[0001])([0001]H+[1000])−1
While for each element, we obtain
Z11Z12Z21Z22=H22H11H22−H12H21=H22H12=−H22H21=H221
The formulas are obtained with the methods explained here.
The MATLAB implementation can be found in circuitconversions on Gitlab.
Definitions
[V1I2]=H[I1V2] | [V1V2]=Z[I1I2] |