From Z-parameters to G-parameters
In matrix form, the formula is
G=([0001]Z+[1000])([1000]Z+[0001])−1
While for each element, we obtain
G11G12G21G22=Z111=−Z11Z12=Z11Z21=Z11Z11Z22−Z12Z21
The formulas are obtained with the methods explained here.
The MATLAB implementation can be found in circuitconversions on Gitlab.
Definitions
[V1V2]=Z[I1I2] | [I1V2]=G[V1I2] |