From A-parameters to B-parameters
In matrix form, the formula is
B=A−1
While for each element, we obtain
B11B12B21B22=A11A22−A12A21A22=−A11A22−A12A21A12=−A11A22−A12A21A21=A11A22−A12A21A11
The formulas are obtained with the methods explained here.
The MATLAB implementation can be found in circuitconversions on Gitlab.
Definitions
[V1I1]=A[V2−I2] | [V2−I2]=B[V1I1] |