From A-parameters to G-parameters
In matrix form, the formula is
G=([0010]A+[0100])([1000]A+[000−1])−1
While for each element, we obtain
G11G12G21G22=A11A21=−A11A11A22−A12A21=A111=A11A12
The formulas are obtained with the methods explained here.
The MATLAB implementation can be found in circuitconversions on Gitlab.
Definitions
[V1I1]=A[V2−I2] | [I1V2]=G[V1I2] |