From G-parameters to B-parameters
In matrix form, the formula is
B=([0010]G+[000−1])([0100]G+[1000])−1
While for each element, we obtain
B11B12B21B22=−G12G11G22−G12G21=G12G22=G12G11=−G121
The formulas are obtained with the methods explained here.
The MATLAB implementation can be found in circuitconversions on Gitlab.
Definitions
[I1V2]=G[V1I2] | [V2−I2]=B[V1I1] |