Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
msline.cpp
Go to the documentation of this file.
1 /*
2  * msline.cpp - microstrip transmission line class implementation
3  *
4  * Copyright (C) 2004, 2005, 2006, 2008 Stefan Jahn <stefan@lkcc.org>
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this package; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * $Id$
22  *
23  */
24 
25 #if HAVE_CONFIG_H
26 # include <config.h>
27 #endif
28 
29 #include "component.h"
30 #include "substrate.h"
31 #include "msline.h"
32 
33 using namespace qucs;
34 
35 msline::msline () : circuit (2) {
36  alpha = beta = zl = ereff = 0;
37  type = CIR_MSLINE;
38 }
39 
40 void msline::calcNoiseSP (nr_double_t) {
41  nr_double_t l = getPropertyDouble ("L");
42  if (l < 0) return;
43  // calculate noise using Bosma's theorem
44  nr_double_t T = getPropertyDouble ("Temp");
45  matrix s = getMatrixS ();
46  matrix e = eye (getSize ());
47  setMatrixN (kelvin (T) / T0 * (e - s * transpose (conj (s))));
48 }
49 
50 void msline::calcPropagation (nr_double_t frequency) {
51 
52  /* how to get properties of this component, e.g. L, W */
53  nr_double_t W = getPropertyDouble ("W");
54  char * SModel = getPropertyString ("Model");
55  char * DModel = getPropertyString ("DispModel");
56 
57  /* how to get properties of the substrate, e.g. Er, H */
59  nr_double_t er = subst->getPropertyDouble ("er");
60  nr_double_t h = subst->getPropertyDouble ("h");
61  nr_double_t t = subst->getPropertyDouble ("t");
62  nr_double_t tand = subst->getPropertyDouble ("tand");
63  nr_double_t rho = subst->getPropertyDouble ("rho");
64  nr_double_t D = subst->getPropertyDouble ("D");
65 
66  /* local variables */
67  nr_double_t ac, ad;
68  nr_double_t ZlEff, ErEff, WEff, ZlEffFreq, ErEffFreq;
69 
70  // quasi-static effective dielectric constant of substrate + line and
71  // the impedance of the microstrip line
72  analyseQuasiStatic (W, h, t, er, SModel, ZlEff, ErEff, WEff);
73 
74  // analyse dispersion of Zl and Er (use WEff here?)
75  analyseDispersion (W, h, er, ZlEff, ErEff, frequency, DModel,
76  ZlEffFreq, ErEffFreq);
77 
78  // analyse losses of line
79  analyseLoss (W, t, er, rho, D, tand, ZlEff, ZlEff, ErEff,
80  frequency, "Hammerstad", ac, ad);
81 
82  // calculate propagation constants and reference impedance
83  zl = ZlEffFreq;
84  ereff = ErEffFreq;
85  alpha = ac + ad;
86  beta = qucs::sqrt (ErEffFreq) * 2 * M_PI * frequency / C0;
87 }
88 
89 void msline::calcSP (nr_double_t frequency) {
90  nr_double_t l = getPropertyDouble ("L");
91 
92  // calculate propagation constants
93  calcPropagation (frequency);
94 
95  // calculate S-parameters
96  nr_double_t z = zl / z0;
97  nr_double_t y = 1 / z;
99  nr_complex_t n = 2.0 * cosh (g * l) + (z + y) * qucs::sinh (g * l);
100  nr_complex_t s11 = (z - y) * qucs::sinh (g * l) / n;
101  nr_complex_t s21 = 2.0 / n;
102  setS (NODE_1, NODE_1, s11); setS (NODE_2, NODE_2, s11);
103  setS (NODE_1, NODE_2, s21); setS (NODE_2, NODE_1, s21);
104 }
105 
106 void msline::saveCharacteristics (nr_double_t) {
107  setCharacteristic ("Zl", zl);
108  setCharacteristic ("Er", ereff);
109 }
110 
111 /* This function calculates the quasi-static impedance of a microstrip
112  line, the value of the effective dielectric constant and the
113  effective width due to the finite conductor thickness for the given
114  microstrip line and substrate properties. */
115 void msline::analyseQuasiStatic (nr_double_t W, nr_double_t h, nr_double_t t,
116  nr_double_t er, char * Model,
117  nr_double_t& ZlEff, nr_double_t& ErEff,
118  nr_double_t& WEff) {
119 
120  nr_double_t z, e;
121 
122  // default values
123  e = er;
124  z = z0;
125  WEff = W;
126 
127  // WHEELER
128  if (!strcmp (Model, "Wheeler")) {
129  nr_double_t a, b, c, d, x, dW1, dWr, Wr;
130 
131  // compute strip thickness effect
132  if (t != 0) {
133  dW1 = t / M_PI * qucs::log (4 * M_E / qucs::sqrt (sqr (t / h) +
134  sqr (M_1_PI / (W / t + 1.10))));
135  }
136  else dW1 = 0;
137  dWr = (1 + 1 / er) / 2 * dW1;
138  Wr = WEff = W + dWr;
139 
140  // compute characteristic impedance
141  if (W / h < 3.3) {
142  c = qucs::log (4 * h / Wr + qucs::sqrt (sqr (4 * h / Wr) + 2));
143  b = (er - 1) / (er + 1) / 2 * (qucs::log (M_PI_2) + qucs::log (2 * M_2_PI) / er);
144  z = (c - b) * Z0 / M_PI / qucs::sqrt (2 * (er + 1));
145  }
146  else {
147  c = 1 + qucs::log (M_PI_2) + qucs::log (Wr / h / 2 + 0.94);
148  d = M_1_PI / 2 * (1 + qucs::log (sqr (M_PI) / 16)) * (er - 1) / sqr (er);
149  x = 2 * M_LN2 / M_PI + Wr / h / 2 + (er + 1) / 2 / M_PI / er * c + d;
150  z = Z0 / 2 / x / qucs::sqrt (er);
151  }
152 
153  // compute effective dielectric constant
154  if (W / h < 1.3) {
155  a = qucs::log (8 * h / Wr) + sqr (Wr / h) / 32;
156  b = (er - 1) / (er + 1) / 2 * (qucs::log (M_PI_2) + qucs::log (2 * M_2_PI) / er);
157  e = (er + 1) / 2 * sqr (a / (a - b));
158  }
159  else {
160  a = (er - 1) / 2 / M_PI / er * (qucs::log (2.1349 * Wr / h + 4.0137) -
161  0.5169 / er);
162  b = Wr / h / 2 + M_1_PI * qucs::log (8.5397 * Wr / h + 16.0547);
163  e = er * sqr ((b - a) / b);
164  }
165  }
166  // SCHNEIDER
167  else if (!strcmp (Model, "Schneider")) {
168 
169  nr_double_t dW = 0, u = W / h;
170 
171  // consider strip thickness equations
172  if (t != 0 && t < W / 2) {
173  nr_double_t arg = (u < M_1_PI / 2) ? 2 * M_PI * W / t : h / t;
174  dW = t / M_PI * (1 + qucs::log (2 * arg));
175  if (t / dW >= 0.75) dW = 0;
176  }
177  WEff = W + dW; u = WEff / h;
178 
179  // effective dielectric constant
180  e = (er + 1) / 2 + (er - 1) / 2 / qucs::sqrt (1 + 10 / u);
181 
182  // characteristic impedance
183  if (u < 1.0) {
184  z = M_1_PI / 2 * qucs::log (8 / u + u / 4);
185  }
186  else {
187  z = 1 / (u + 2.42 - 0.44 / u + qucs::pow ((1. - 1. / u), 6.));
188  }
189  z = Z0 * z / qucs::sqrt (e);
190  }
191  // HAMMERSTAD and JENSEN
192  else if (!strcmp (Model, "Hammerstad")) {
193  nr_double_t a, b, du1, du, u, ur, u1, zr, z1;
194 
195  u = W / h; // normalized width
196  t = t / h; // normalized thickness
197 
198  // compute strip thickness effect
199  if (t != 0) {
200  du1 = t / M_PI * qucs::log (1 + 4 * M_E / t / sqr (coth (qucs::sqrt (6.517 * u))));
201  }
202  else du1 = 0;
203  du = du1 * (1 + sech (qucs::sqrt (er - 1))) / 2;
204  u1 = u + du1;
205  ur = u + du;
206  WEff = ur * h;
207 
208  // compute impedances for homogeneous medium
209  Hammerstad_zl (ur, zr);
210  Hammerstad_zl (u1, z1);
211 
212  // compute effective dielectric constant
213  Hammerstad_ab (ur, er, a, b);
214  Hammerstad_er (ur, er, a, b, e);
215 
216  // compute final characteristic impedance and dielectric constant
217  // including strip thickness effects
218  z = zr / qucs::sqrt (e);
219  e = e * sqr (z1 / zr);
220  }
221 
222  ZlEff = z;
223  ErEff = e;
224 }
225 
226 /* This function calculates the frequency dependent value of the
227  effective dielectric constant and the microstrip line impedance for
228  the given frequency. */
229 void msline::analyseDispersion (nr_double_t W, nr_double_t h, nr_double_t er,
230  nr_double_t ZlEff, nr_double_t ErEff,
231  nr_double_t frequency, char * Model,
232  nr_double_t& ZlEffFreq,
233  nr_double_t& ErEffFreq) {
234 
235  nr_double_t e, z;
236 
237  // default values
238  z = ZlEffFreq = ZlEff;
239  e = ErEffFreq = ErEff;
240 
241  // GETSINGER
242  if (!strcmp (Model, "Getsinger")) {
243  Getsinger_disp (h, er, ErEff, ZlEff, frequency, e, z);
244  }
245  // SCHNEIDER
246  else if (!strcmp (Model, "Schneider")) {
247  nr_double_t k, f;
248  k = qucs::sqrt (ErEff / er);
249  f = 4 * h * frequency / C0 * qucs::sqrt (er - 1);
250  f = sqr (f);
251  e = ErEff * sqr ((1 + f) / (1 + k * f));
252  z = ZlEff * qucs::sqrt (ErEff / e);
253  }
254  // YAMASHITA
255  else if (!strcmp (Model, "Yamashita")) {
256  nr_double_t k, f;
257  k = qucs::sqrt (er / ErEff);
258  f = 4 * h * frequency / C0 * qucs::sqrt (er - 1) *
259  (0.5 + sqr (1 + 2 * qucs::log10 (1 + W / h)));
260  e = ErEff * sqr ((1 + k * qucs::pow (f, 1.5) / 4) / (1 + qucs::pow (f, 1.5) / 4));
261  }
262  // KOBAYASHI
263  else if (!strcmp (Model, "Kobayashi")) {
264  nr_double_t n, no, nc, fh, fk;
265  fk = C0 * qucs::atan (er * qucs::sqrt ((ErEff - 1) / (er - ErEff))) /
266  (2 * M_PI * h * qucs::sqrt (er - ErEff));
267  fh = fk / (0.75 + (0.75 - 0.332 / qucs::pow (er, 1.73)) * W / h);
268  no = 1 + 1 / (1 + qucs::sqrt (W / h)) + 0.32 * cubic (1 / (1 + qucs::sqrt (W / h)));
269  if (W / h < 0.7) {
270  nc = 1 + 1.4 / (1 + W / h) * (0.15 - 0.235 *
271  qucs::exp (-0.45 * frequency / fh));
272  }
273  else nc = 1;
274  n = no * nc < 2.32 ? no * nc : 2.32;
275  e = er - (er - ErEff) / (1 + qucs::pow (frequency / fh, n));
276  }
277  // PRAMANICK and BHARTIA
278  else if (!strcmp (Model, "Pramanick")) {
279  nr_double_t Weff, We, f;
280  f = 2 * MU0 * h * frequency * qucs::sqrt (ErEff / er) / ZlEff;
281  e = er - (er - ErEff) / (1 + sqr (f));
282  Weff = Z0 * h / ZlEff / qucs::sqrt (ErEff);
283  We = W + (Weff - W) / (1 + sqr (f));
284  z = Z0 * h / We / qucs::sqrt (e);
285  }
286  // HAMMERSTAD and JENSEN
287  else if (!strcmp (Model, "Hammerstad")) {
288  nr_double_t f, g;
289  g = sqr (M_PI) / 12 * (er - 1) / ErEff * qucs::sqrt (2 * M_PI * ZlEff / Z0);
290  f = 2 * MU0 * h * frequency / ZlEff;
291  e = er - (er - ErEff) / (1 + g * sqr (f));
292  z = ZlEff * qucs::sqrt (ErEff / e) * (e - 1) / (ErEff - 1);
293  }
294  // KIRSCHNING and JANSEN
295  else if (!strcmp (Model, "Kirschning")) {
296  nr_double_t r17, u = W / h, fn = frequency * h / 1e6;
297 
298  // dispersion of dielectric constant
299  Kirschning_er (u, fn, er, ErEff, e);
300 
301  // dispersion of characteristic impedance
302  Kirschning_zl (u, fn, er, ErEff, e, ZlEff, r17, z);
303  }
304 
305  ZlEffFreq = z;
306  ErEffFreq = e;
307 }
308 
309 /* Computes the exponent factors a(u) and b(er) used within the
310  effective relative dielectric constant calculations for single and
311  coupled microstrip lines by Hammerstad and Jensen. */
312 void msline::Hammerstad_ab (nr_double_t u, nr_double_t er, nr_double_t& a,
313  nr_double_t& b) {
314  a = 1 + qucs::log ((quadr (u) + sqr (u / 52)) / (quadr (u) + 0.432)) / 49 +
315  qucs::log (1 + cubic (u / 18.1)) / 18.7;
316  b = 0.564 * qucs::pow ((er - 0.9) / (er + 3), 0.053);
317 }
318 
319 /* The function computes the effective dielectric constant of a single
320  microstrip. The equation is used in single and coupled microstrip
321  calculations. */
322 void msline::Hammerstad_er (nr_double_t u, nr_double_t er, nr_double_t a,
323  nr_double_t b, nr_double_t& e) {
324  e = (er + 1) / 2 + (er - 1) / 2 * qucs::pow (1 + 10 / u, -a * b);
325 }
326 
327 /* This function computes the characteristic impedance of single
328  microstrip line based upon the given width-height ratio. The
329  equation is used in single and coupled microstrip calculations as
330  well. */
331 void msline::Hammerstad_zl (nr_double_t u, nr_double_t& zl) {
332  nr_double_t fu = 6 + (2 * M_PI - 6) * qucs::exp (- qucs::pow (30.666 / u, 0.7528));
333  zl = Z0 / 2 / M_PI * qucs::log (fu / u + qucs::sqrt (1 + sqr (2 / u)));
334 }
335 
336 /* Calculates dispersion effects for effective dielectric constant and
337  characteristic impedance as defined by Getsinger (for single and
338  coupled microstrips). */
339 void msline::Getsinger_disp (nr_double_t h, nr_double_t er, nr_double_t ErEff,
340  nr_double_t ZlEff, nr_double_t frequency,
341  nr_double_t& e, nr_double_t& z) {
342  nr_double_t g, f, d;
343  g = 0.6 + 0.009 * ZlEff;
344  f = frequency * 2 * MU0 * h / ZlEff;
345  e = er - (er - ErEff) / (1 + g * sqr (f));
346  d = (er - e) * (e - ErEff) / e / (er - ErEff);
347  z = ZlEff * qucs::sqrt (e / ErEff) / (1 + d); // group delay model
348 }
349 
350 /* This function computes the dispersion of the effective dielectric
351  constant of a single microstrip line. It is defined in a separate
352  function because it is used within the coupled microstrip lines as
353  well. */
354 void msline::Kirschning_er (nr_double_t u, nr_double_t fn, nr_double_t er,
355  nr_double_t ErEff, nr_double_t& ErEffFreq) {
356  nr_double_t p, p1, p2, p3, p4;
357  p1 = 0.27488 + (0.6315 + 0.525 / qucs::pow (1. + 0.0157 * fn, 20.)) * u -
358  0.065683 * qucs::exp (-8.7513 * u);
359  p2 = 0.33622 * (1 - qucs::exp (-0.03442 * er));
360  p3 = 0.0363 * qucs::exp (-4.6 * u) * (1 - qucs::exp (- qucs::pow (fn / 38.7, 4.97)));
361  p4 = 1 + 2.751 * (1 - qucs::exp (- qucs::pow (er / 15.916, 8.)));
362  p = p1 * p2 * qucs::pow ((0.1844 + p3 * p4) * fn, 1.5763);
363  ErEffFreq = er - (er - ErEff) / (1 + p);
364 }
365 
366 /* Computes dispersion effects of characteristic impedance of a single
367  microstrip line according to Kirschning and Jansen. Also used in
368  coupled microstrip lines calculations. */
369 void msline::Kirschning_zl (nr_double_t u, nr_double_t fn, nr_double_t er,
370  nr_double_t ErEff, nr_double_t ErEffFreq,
371  nr_double_t ZlEff, nr_double_t& r17,
372  nr_double_t& ZlEffFreq) {
373  nr_double_t r1, r2, r3, r4, r5, r6, r7, r8, r9, r10;
374  nr_double_t r11, r12, r13, r14, r15, r16;
375  r1 = 0.03891 * qucs::pow (er, 1.4);
376  r2 = 0.267 * qucs::pow (u, 7.);
377  r3 = 4.766 * qucs::exp (-3.228 * qucs::pow (u, 0.641));
378  r4 = 0.016 + qucs::pow (0.0514 * er, 4.524);
379  r5 = qucs::pow (fn / 28.843, 12.);
380  r6 = 22.20 * qucs::pow (u, 1.92);
381  r7 = 1.206 - 0.3144 * qucs::exp (-r1) * (1 - qucs::exp (-r2));
382  r8 = 1 + 1.275 * (1 - qucs::exp (-0.004625 * r3 *
383  qucs::pow (er, 1.674) * qucs::pow (fn / 18.365, 2.745)));
384  r9 = 5.086 * r4 * r5 / (0.3838 + 0.386 * r4) *
385  qucs::exp (-r6) / (1 + 1.2992 * r5) *
386  qucs::pow (er - 1., 6.) / (1 + 10 * qucs::pow (er - 1., 6.));
387  r10 = 0.00044 * qucs::pow (er, 2.136) + 0.0184;
388  r11 = qucs::pow (fn / 19.47, 6.) / (1 + 0.0962 * qucs::pow (fn / 19.47, 6.));
389  r12 = 1 / (1 + 0.00245 * sqr (u));
390  r13 = 0.9408 * qucs::pow (ErEffFreq, r8) - 0.9603;
391  r14 = (0.9408 - r9) * qucs::pow (ErEff, r8) - 0.9603;
392  r15 = 0.707 * r10 * qucs::pow (fn / 12.3, 1.097);
393  r16 = 1 + 0.0503 * sqr (er) * r11 * (1 - qucs::exp (- qucs::pow (u / 15., 6.)));
394  r17 = r7 * (1 - 1.1241 * r12 / r16 *
395  qucs::exp (-0.026 * qucs::pow (fn, 1.15656) - r15));
396  ZlEffFreq = ZlEff * qucs::pow (r13 / r14, r17);
397 }
398 
399 /* The function calculates the conductor and dielectric losses of a
400  single microstrip line. */
401 void msline::analyseLoss (nr_double_t W, nr_double_t t, nr_double_t er,
402  nr_double_t rho, nr_double_t D, nr_double_t tand,
403  nr_double_t ZlEff1, nr_double_t ZlEff2,
404  nr_double_t ErEff,
405  nr_double_t frequency, const char * Model,
406  nr_double_t& ac, nr_double_t& ad) {
407  ac = ad = 0;
408 
409  // HAMMERSTAD and JENSEN
410  if (!strcmp (Model, "Hammerstad")) {
411  nr_double_t Rs, ds, l0, Kr, Ki;
412 
413  // conductor losses
414  if (t != 0.0) {
415  Rs = qucs::sqrt (M_PI * frequency * MU0 * rho); // skin resistance
416  ds = rho / Rs; // skin depth
417  // valid for t > 3 * ds
418  if (t < 3 * ds) {
420  "WARNING: conductor loss calculation invalid for line "
421  "height t (%g) < 3 * skin depth (%g)\n", t, 3 * ds);
422  }
423  // current distribution factor
424  Ki = qucs::exp (-1.2 * qucs::pow ((ZlEff1 + ZlEff2) / 2 / Z0, 0.7));
425  // D is RMS surface roughness
426  Kr = 1 + M_2_PI * qucs::atan (1.4 * sqr (D / ds));
427  ac = Rs / (ZlEff1 * W) * Ki * Kr;
428  }
429 
430  // dielectric losses
431  l0 = C0 / frequency;
432  ad = M_PI * er / (er - 1) * (ErEff - 1) / qucs::sqrt (ErEff) * tand / l0;
433  }
434 }
435 
436 void msline::initDC (void) {
437  nr_double_t l = getPropertyDouble ("L");
438  nr_double_t W = getPropertyDouble ("W");
440  nr_double_t t = subst->getPropertyDouble ("t");
441  nr_double_t rho = subst->getPropertyDouble ("rho");
442 
443  if (t != 0.0 && rho != 0.0 && l != 0.0) {
444  // tiny resistance
445  nr_double_t g = t * W / rho / l;
446  setVoltageSources (0);
447  allocMatrixMNA ();
448  setY (NODE_1, NODE_1, +g); setY (NODE_2, NODE_2, +g);
449  setY (NODE_1, NODE_2, -g); setY (NODE_2, NODE_1, -g);
450  }
451  else {
452  // a DC short (voltage source V = 0 volts)
453  setVoltageSources (1);
455  allocMatrixMNA ();
456  clearY ();
458  }
459 }
460 
461 void msline::initAC (void) {
462  setVoltageSources (0);
463  allocMatrixMNA ();
464 }
465 
466 void msline::calcAC (nr_double_t frequency) {
467  nr_double_t l = getPropertyDouble ("L");
468 
469  // calculate propagation constants
470  calcPropagation (frequency);
471 
472  // calculate Y-parameters
474  nr_complex_t y11 = coth (g * l) / zl;
475  nr_complex_t y21 = -cosech (g * l) / zl;
476  setY (NODE_1, NODE_1, y11); setY (NODE_2, NODE_2, y11);
477  setY (NODE_1, NODE_2, y21); setY (NODE_2, NODE_1, y21);
478 }
479 
480 void msline::calcNoiseAC (nr_double_t) {
481  nr_double_t l = getPropertyDouble ("L");
482  if (l < 0) return;
483  // calculate noise using Bosma's theorem
484  nr_double_t T = getPropertyDouble ("Temp");
485  setMatrixN (4 * kelvin (T) / T0 * real (getMatrixY ()));
486 }
487 
488 // properties
489 PROP_REQ [] = {
490  { "W", PROP_REAL, { 1e-3, PROP_NO_STR }, PROP_POS_RANGE },
491  { "L", PROP_REAL, { 10e-3, PROP_NO_STR }, PROP_POS_RANGE },
492  { "Subst", PROP_STR, { PROP_NO_VAL, "Subst1" }, PROP_NO_RANGE },
493  { "DispModel", PROP_STR, { PROP_NO_VAL, "Kirschning" }, PROP_RNG_DIS },
494  { "Model", PROP_STR, { PROP_NO_VAL, "Hammerstad" }, PROP_RNG_MOD },
495  PROP_NO_PROP };
496 PROP_OPT [] = {
497  { "Temp", PROP_REAL, { 26.85, PROP_NO_STR }, PROP_MIN_VAL (K) },
498  PROP_NO_PROP };
499 struct define_t msline::cirdef =
#define M_E
Euler's constant ( )
Definition: consts.h:71
std::complex< nr_double_t > nr_complex_t
Definition: complex.h:31
#define MU0
magnetic constant of vacuum ( )
Definition: constants.h:49
#define PROP_POS_RANGE
Definition: netdefs.h:129
static void Hammerstad_ab(nr_double_t, nr_double_t, nr_double_t &, nr_double_t &)
Definition: msline.cpp:312
PROP_NO_SUBSTRATE
Definition: msline.cpp:500
l
Definition: parse_vcd.y:213
PROP_OPT[]
Definition: msline.cpp:496
void clearY(void)
Definition: circuit.cpp:740
#define NODE_2
Definition: circuit.h:35
matrix real(matrix a)
Real part matrix.
Definition: matrix.cpp:568
#define T0
standard temperature
Definition: constants.h:61
nr_double_t ereff
Definition: msline.h:66
#define kelvin(x)
Definition: constants.h:108
substrate * subst
Definition: circuit.h:350
#define PROP_DEF
Definition: netdefs.h:189
nr_complex_t coth(const nr_complex_t z)
Compute complex hyperbolic cotangent.
Definition: complex.cpp:320
nr_double_t getPropertyDouble(const char *)
Definition: object.cpp:176
nr_complex_t pow(const nr_complex_t z, const nr_double_t d)
Compute power function with real exponent.
Definition: complex.cpp:238
#define PROP_REAL
Definition: netdefs.h:174
substrate * getSubstrate(void)
Definition: circuit.cpp:332
void setInternalVoltageSource(bool i)
Definition: circuit.h:184
t
Definition: parse_vcd.y:290
static void analyseLoss(nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, const char *, nr_double_t &, nr_double_t &)
Definition: msline.cpp:401
#define PROP_NO_PROP
Definition: netdefs.h:122
void setVoltageSources(int)
Definition: circuit.cpp:607
nr_complex_t atan(const nr_complex_t z)
Compute complex arc tangent.
Definition: complex.cpp:117
#define K
Absolute 0 in centigrade.
Definition: constants.h:59
#define PROP_NO_RANGE
Definition: netdefs.h:126
void calcPropagation(nr_double_t)
Definition: msline.cpp:50
#define PROP_NO_STR
Definition: netdefs.h:125
#define PROP_RNG_MOD
Definition: netdefs.h:169
n
Definition: parse_citi.y:147
#define PROP_LINEAR
Definition: netdefs.h:120
static const nr_double_t z0
Definition: circuit.h:320
h
Definition: parse_vcd.y:214
matrix getMatrixY(void)
Definition: circuit.cpp:696
int getSize(void)
Get the number of ports the circuit element has.
Definition: circuit.h:143
void initDC(void)
Definition: msline.cpp:436
#define PROP_RNG_DIS
Definition: netdefs.h:166
nr_complex_t cosh(const nr_complex_t z)
Compute complex hyperbolic cosine.
Definition: complex.cpp:135
#define VSRC_1
Definition: circuit.h:40
nr_complex_t sqr(const nr_complex_t z)
Square of complex number.
Definition: complex.cpp:673
#define M_PI_2
Half of Archimedes' constant ( )
Definition: consts.h:51
nr_double_t zl
Definition: msline.h:66
nr_complex_t sqrt(const nr_complex_t z)
Compute principal value of square root.
Definition: complex.cpp:271
static void Getsinger_disp(nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t &, nr_double_t &)
Definition: msline.cpp:339
nr_complex_t cosech(const nr_complex_t z)
Compute complex argument hyperbolic cosec.
Definition: complex.cpp:364
#define PROP_COMPONENT
Definition: netdefs.h:116
nr_double_t quadr(const nr_double_t r)
Quartic function.
Definition: real.cpp:324
void calcSP(nr_double_t)
Definition: msline.cpp:89
static void Kirschning_zl(nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t &, nr_double_t &)
Definition: msline.cpp:369
x
Definition: parse_mdl.y:498
nr_complex_t log10(const nr_complex_t z)
Compute principal value of decimal logarithm of z.
Definition: complex.cpp:225
#define M_LN2
Natural logarithm of 2 ( )
Definition: consts.h:83
nr_complex_t sech(const nr_complex_t z)
Compute complex hyperbolic secant.
Definition: complex.cpp:343
void calcAC(nr_double_t)
Definition: msline.cpp:466
#define M_PI
Archimedes' constant ( )
Definition: consts.h:47
static void Hammerstad_zl(nr_double_t, nr_double_t &)
Definition: msline.cpp:331
matrix transpose(matrix a)
Matrix transposition.
Definition: matrix.cpp:492
#define M_2_PI
Definition: consts.h:63
static void Kirschning_er(nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t &)
Definition: msline.cpp:354
void calcNoiseAC(nr_double_t)
Definition: msline.cpp:480
matrix getMatrixS(void)
Definition: circuit.cpp:654
void setY(int, int, nr_complex_t)
Definition: circuit.cpp:452
#define PROP_MIN_VAL(k)
Definition: netdefs.h:133
void saveCharacteristics(nr_double_t)
Definition: msline.cpp:106
PROP_REQ[]
Definition: msline.cpp:489
void allocMatrixMNA(void)
Definition: circuit.cpp:267
#define M_1_PI
Inverse of Archimedes' constant ( )
Definition: consts.h:59
nr_double_t beta
Definition: msline.h:66
static void Hammerstad_er(nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t &)
Definition: msline.cpp:322
nr_complex_t sinh(const nr_complex_t z)
Compute complex hyperbolic sine.
Definition: complex.cpp:144
#define PROP_STR
Definition: netdefs.h:175
nr_double_t alpha
Definition: msline.h:66
y
Definition: parse_mdl.y:499
#define NODE_1
Definition: circuit.h:34
#define C0
speed of light in vacuum ( )
Definition: constants.h:47
void voltageSource(int, int, int, nr_double_t value=0.0)
Definition: circuit.cpp:748
void setMatrixN(matrix)
Definition: circuit.cpp:664
matrix eye(int rs, int cs)
Create identity matrix with specified number of rows and columns.
Definition: matrix.cpp:603
static void analyseQuasiStatic(nr_double_t, nr_double_t, nr_double_t, nr_double_t, char *, nr_double_t &, nr_double_t &, nr_double_t &)
Definition: msline.cpp:115
nr_complex_t exp(const nr_complex_t z)
Compute complex exponential.
Definition: complex.cpp:205
#define LOG_ERROR
Definition: logging.h:28
#define D(con)
void setS(int, int, nr_complex_t)
Definition: circuit.cpp:587
matrix conj(matrix a)
Conjugate complex matrix.
Definition: matrix.cpp:505
#define PROP_NO_VAL
Definition: netdefs.h:124
static void analyseDispersion(nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, char *, nr_double_t &, nr_double_t &)
Definition: msline.cpp:229
void setCharacteristic(const char *, nr_double_t)
Definition: circuit.cpp:566
char * getPropertyString(const char *)
Definition: object.cpp:159
void logprint(int level, const char *format,...)
Definition: logging.c:37
nr_complex_t log(const nr_complex_t z)
Compute principal value of natural logarithm of z.
Definition: complex.cpp:215
#define Z0
Wave impedance in vacuum ( )
Definition: constants.h:53
#define cubic(x)
Definition: constants.h:106
matrix arg(matrix a)
Computes the argument of each matrix element.
Definition: matrix.cpp:555
void calcNoiseSP(nr_double_t)
Definition: msline.cpp:40
void initAC(void)
Definition: msline.cpp:461