KiCad PCB EDA Suite
Loading...
Searching...
No Matches
common/transline_calculations/microstrip.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2001 Gopal Narayanan <[email protected]>
3 * Copyright (C) 2002 Claudio Girardi <[email protected]>
4 * Copyright (C) 2005, 2006 Stefan Jahn <[email protected]>
5 * Modified for Kicad: 2018 Jean-Pierre Charras <jp.charras at wanadoo.fr>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this package; see the file COPYING. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22 */
23
24#ifndef TRANSLINE_CALCULATIONS_MICROSTRIP_H
25#define TRANSLINE_CALCULATIONS_MICROSTRIP_H
26
27
28#include <algorithm>
29
31
32
34{
36
37public:
48
49 friend class COUPLED_MICROSTRIP;
50
52 void Analyse() override;
53
55 bool Synthesize( SYNTHESIZE_OPTS aOpts ) override;
56
61 double GetSoldermaskDeltaQ( double aWOverH, double aCOverH ) const override
62 {
63 if( aWOverH <= 0.0 || aCOverH <= 0.0 )
64 return 0.0;
65
66 const double q2Coated = WanHoorfarQ2( aWOverH, 1.0 + aCOverH );
67 const double q2Base = WanHoorfarQ2( aWOverH, 1.0 );
68 return std::max( 0.0, q2Coated - q2Base );
69 }
70
71private:
73 void SetAnalysisResults() override;
74
76 void SetSynthesisResults() override;
77
79 double SynthesizeWidth() const;
80
82 static double Z0_dispersion( double, double, double, double, double );
83
85 static double Z0_homogeneous( double );
86
88 static double delta_Z0_cover( double, double );
89
91 static double filling_factor( double, double );
92
94 static double delta_q_cover( double );
95
97 static double delta_q_thickness( double, double );
98
100 static double e_r_effective( double, double );
101
103 static double delta_u_thickness( double, double, double );
104
106 static double e_r_dispersion( double, double, double );
107
109 double conductor_losses() const;
110
112 double dielectric_losses() const;
113
115 void microstrip_Z0();
116
118 void dispersion();
119
121 void attenuation();
122
124 void mur_eff_ms();
125
127 void line_angle();
128
129 double Z0_0{ 0.0 };
130 double er_eff_0{ 0.0 };
131 double mur_eff{ 0.0 };
132 double w_eff{ 0.0 };
133 double Z0_h_1{ 0.0 };
134};
135
136
137#endif //TRANSLINE_CALCULATIONS_MICROSTRIP_H
double w_eff
Effective width of line.
void microstrip_Z0()
Calculates the microstrip static impedance.
double GetSoldermaskDeltaQ(double aWOverH, double aCOverH) const override
Microstrip soldermask incremental filling factor.
static double e_r_effective(double, double)
Calculates effective dielectric constant from material e_r and filling factor.
bool Synthesize(SYNTHESIZE_OPTS aOpts) override
Synthesis track geometry parameters to match given Z0.
double Z0_0
static characteristic impedance
void line_angle()
Calculates microstrip length in radians.
void Analyse() override
Analyse track geometry parameters to output Z0 and Ang_L.
static double Z0_dispersion(double, double, double, double, double)
Calculates the dispersion correction factor for the characteristic impedance static.
void dispersion()
Calculates frequency dependent parameters of the microstrip.
static double filling_factor(double, double)
Calculates the filling factor for a microstrip without cover and zero conductor thickness.
double SynthesizeWidth() const
Calculates the width with the current set of parameters.
static double e_r_dispersion(double, double, double)
Calculates the dispersion correction factor for the effective permeability.
static double delta_u_thickness(double, double, double)
Calculates the thickness effect on normalized width.
static double delta_q_thickness(double, double)
Calculates the thickness effect on filling factor.
static double delta_q_cover(double)
Calculates the cover effect on filling factor.
double mur_eff
Effective mag. permeability.
double er_eff_0
Static effective dielectric constant.
void mur_eff_ms()
Calculates the effective magnetic permeability.
void SetSynthesisResults() override
Sets the output values and status following synthesis.
void SetAnalysisResults() override
Sets the output values and status following analysis.
static double Z0_homogeneous(double)
Calculates the impedance for a stripline in a homogeneous medium, without cover effects.
double dielectric_losses() const
Calculates the microstrip dielectric losses per unit.
double Z0_h_1
homogeneous stripline impedance
void attenuation()
Calculates the attenuation of the microstrip.
static double delta_Z0_cover(double, double)
Calculates the cover effect on impedance for a stripline in a homogeneous medium.
double conductor_losses() const
Calculate the microstrip conductor losses per unit.
static double WanHoorfarQ2(double aU, double aHBarTop)
Wan-Hoorfar 2000 eq.
TRANSLINE_CALCULATION_BASE(std::initializer_list< TRANSLINE_PARAMETERS > aParameters)
Constructs the transmission line calculation object.
SYNTHESIZE_OPTS
Options for specifying synthesis inputs, targets, or strategies.
TRANSLINE_PARAMETERS
All possible parameters used (as inputs or outputs) by the transmission line calculations.