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. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef TRANSLINE_CALCULATIONS_MICROSTRIP_H
23#define TRANSLINE_CALCULATIONS_MICROSTRIP_H
24
25
26#include <algorithm>
27
29
30
32{
34
35public:
46
47 friend class COUPLED_MICROSTRIP;
48
50 void Analyse() override;
51
53 bool Synthesize( SYNTHESIZE_OPTS aOpts ) override;
54
59 double GetSoldermaskDeltaQ( double aWOverH, double aCOverH ) const override
60 {
61 if( aWOverH <= 0.0 || aCOverH <= 0.0 )
62 return 0.0;
63
64 const double q2Coated = WanHoorfarQ2( aWOverH, 1.0 + aCOverH );
65 const double q2Base = WanHoorfarQ2( aWOverH, 1.0 );
66 return std::max( 0.0, q2Coated - q2Base );
67 }
68
69private:
71 void SetAnalysisResults() override;
72
74 void SetSynthesisResults() override;
75
77 double SynthesizeWidth() const;
78
80 static double Z0_dispersion( double, double, double, double, double );
81
83 static double Z0_homogeneous( double );
84
86 static double delta_Z0_cover( double, double );
87
89 static double filling_factor( double, double );
90
92 static double delta_q_cover( double );
93
95 static double delta_q_thickness( double, double );
96
98 static double e_r_effective( double, double );
99
101 static double delta_u_thickness( double, double, double );
102
104 static double e_r_dispersion( double, double, double );
105
107 double conductor_losses() const;
108
110 double dielectric_losses() const;
111
113 void microstrip_Z0();
114
116 void dispersion();
117
119 void attenuation();
120
122 void mur_eff_ms();
123
125 void line_angle();
126
127 double Z0_0{ 0.0 };
128 double er_eff_0{ 0.0 };
129 double mur_eff{ 0.0 };
130 double w_eff{ 0.0 };
131 double Z0_h_1{ 0.0 };
132};
133
134
135#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.