29 #include "component.h"
34 mscross::mscross () :
circuit (6) {
38 void mscross::initModel (
void) {
73 nr_double_t mscross::capCorrection (nr_double_t W, nr_double_t f) {
80 nr_double_t Zl1, Er1, Zl2, Er2;
81 nr_double_t ZlEff, ErEff, WEff;
88 return Zl1 / Zl2 *
sqrt (Er2 / Er1);
91 nr_double_t mscross::calcCap (nr_double_t W1, nr_double_t h, nr_double_t W2) {
92 nr_double_t W1h = W1 / h;
93 nr_double_t W2h = W2 / h;
94 nr_double_t
X =
log10 (W1h) * (86.6 * W2h - 30.9 *
sqrt (W2h) + 367) +
95 cubic (W2h) + 74 * W2h + 130;
96 return 1
e-12 * W1 * (0.25 * X *
pow (W1h, -1.0 / 3.0) - 60 +
97 1 / W2h / 2 - 0.375 * W1h * (1 - W2h));
100 nr_double_t mscross::calcInd (nr_double_t W1, nr_double_t h, nr_double_t W2) {
101 nr_double_t W1h = W1 / h;
102 nr_double_t W2h = W2 / h;
103 nr_double_t
Y = 165.6 * W2h + 31.2 *
sqrt (W2h) - 11.8 *
sqr (W2h);
104 return 1
e-9 * h * (Y * W1h - 32 * W2h + 3) *
pow (W1h, -1.5);
107 matrix mscross::calcMatrixY (nr_double_t f) {
114 nr_double_t W1h = (W1 + W3) / 2 / h;
115 nr_double_t W2h = (W2 + W4) / 2 / h;
116 nr_double_t C1, C2, C3, C4,
L1, L2, L3, L4, L5;
119 C1 = calcCap (W1, h, (W2 + W4) / 2);
120 C2 = calcCap (W2, h, (W1 + W3) / 2);
121 C3 = calcCap (W3, h, (W4 + W2) / 2);
122 C4 = calcCap (W4, h, (W3 + W1) / 2);
124 L1 = calcInd (W1, h, (W2 + W4) / 2);
125 L2 = calcInd (W2, h, (W1 + W3) / 2);
126 L3 = calcInd (W3, h, (W4 + W2) / 2);
127 L4 = calcInd (W4, h, (W3 + W1) / 2);
129 L5 = 1
e-9 * h * (5 * W2h *
cos (
M_PI / 2 * (1.5 - W1h)) -
130 (1 + 7 / W1h ) / W2h - 337.5);
136 C1 = C1 * capCorrection (W1, f);
137 C2 = C2 * capCorrection (W2, f);
138 C3 = C3 * capCorrection (W3, f);
139 C4 = C4 * capCorrection (W4, f);
142 nr_double_t o = 2 *
M_PI * f;