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