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