From Y-parameters to B-parameters
In matrix form, the formula is
B=([000−1]Y+[0010])([0100]Y+[1000])−1
While for each element, we obtain
B11B12B21B22=−Y12Y11=Y121=Y12Y11Y22−Y12Y21=−Y12Y22
The formulas are obtained with the methods explained here.
The MATLAB implementation can be found in circuitconversions on Gitlab.
Definitions
[I1I2]=Y[V1V2] | [V2−I2]=B[V1I1] |