KiCad PCB EDA Suite
Loading...
Searching...
No Matches
coupled_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_COUPLED_MICROSTRIP_H
25#define TRANSLINE_CALCULATIONS_COUPLED_MICROSTRIP_H
26
27
30
31
33{
35
36public:
71
78 double GetSoldermaskDeltaQ( double aWOverH, double aCOverH ) const override
79 {
80 if( aWOverH <= 0.0 || aCOverH <= 0.0 )
81 return 0.0;
82
83 const double q2Coated = WanHoorfarQ2( aWOverH, 1.0 + aCOverH );
84 const double q2Base = WanHoorfarQ2( aWOverH, 1.0 );
85 return std::max( 0.0, q2Coated - q2Base );
86 }
87
89 void Analyse() override;
90
92 bool Synthesize( SYNTHESIZE_OPTS aOpts ) override;
93
94private:
96 void SetAnalysisResults() override;
97
99 void SetSynthesisResults() override;
100
107 double delta_u_thickness_single( double, double );
108
116 void delta_u_thickness();
117
119 void compute_single_line();
120
122 double filling_factor_even( double, double, double );
123
127 double filling_factor_odd( double, double, double );
128
130 double delta_q_cover_even( double );
131
133 double delta_q_cover_odd( double );
134
141 void er_eff_static();
142
149 double delta_Z0_even_cover( double, double, double );
150
157 double delta_Z0_odd_cover( double, double, double );
158
165 void Z0_even_odd();
166
168 void er_eff_freq();
169
171 void conductor_losses();
172
174 void dielectric_losses();
175
177 void attenuation();
178
180 void line_angle();
181
183 void diff_impedance();
184
186 void Z0_dispersion();
187
189 void syn_err_fun( double*, double*, double, double, double, double, double );
190
197 void synth_width();
198
199 void syn_fun( double*, double*, double, double, double, double );
200
203
204 double w_t_e{ 0.0 };
205 double w_t_o{ 0.0 };
206 double er_eff_e_0{ 0.0 };
207 double er_eff_o_0{ 0.0 };
208 double Z0_e_0{ 0.0 };
209 double Z0_o_0{ 0.0 };
210 double er_eff_e{ 0.0 };
211 double er_eff_o{ 0.0 };
212 double prop_delay_e{ 0.0 };
213 double prop_delay_o{ 0.0 };
214 double atten_cond_e{ 0.0 };
215 double atten_cond_o{ 0.0 };
216 double atten_dielectric_e{ 0.0 };
217 double atten_dielectric_o{ 0.0 };
218 double ang_l_e{ 0.0 };
219 double ang_l_o{ 0.0 };
220 double Zdiff{ 0.0 };
221};
222
223
224#endif //TRANSLINE_CALCULATIONS_COUPLED_MICROSTRIP_H
void Z0_dispersion()
Calculate frequency dependency of characteristic impedances.
void delta_u_thickness()
Compute the thickness effect on normalized width for coupled microstrips.
void er_eff_static()
Compute the static effective dielectric constants.
void diff_impedance()
Calculate the differential impedance of the coupled microstrips.
double delta_u_thickness_single(double, double)
Computes the thickness effect on normalized width for a single microstrip line.
MICROSTRIP m_aux_microstrip
Runs intermediate single-track calculations.
TRANSLINE_PARAMETERS TCP
void line_angle()
Compute electrical length in radians.
void synth_width()
Calculate widths given Z0 and e_r.
void syn_err_fun(double *, double *, double, double, double, double, double)
Error function to minimise when synthesising trace geometry.
void attenuation()
Compute attenuation.
double filling_factor_even(double, double, double)
Compute the filling factor for the coupled microstrip even mode without cover and zero conductor thic...
double delta_Z0_odd_cover(double, double, double)
Compute the odd mode impedance correction for a homogeneous microstrip due to the cover.
void compute_single_line()
Computes initial parameters for a single microstrip.
void SetAnalysisResults() override
Sets the output values and status following analysis.
void er_eff_freq()
Compute er_eff as a function of frequency.
void conductor_losses()
Compute conductor losses per unit length.
double GetSoldermaskDeltaQ(double aWOverH, double aCOverH) const override
Coupled microstrip shares the microstrip incremental filling factor.
void Analyse() override
Analyse track geometry parameters to output Z0 and Ang_L.
void SetSynthesisResults() override
Sets the output values and status following synthesis.
void syn_fun(double *, double *, double, double, double, double)
double delta_q_cover_even(double)
Compute the cover effect on filling factor for the even mode.
double delta_q_cover_odd(double)
Compute the cover effect on filling factor for the odd mode.
bool Synthesize(SYNTHESIZE_OPTS aOpts) override
Synthesis track geometry parameters to match given Z0.
double filling_factor_odd(double, double, double)
Compute the filling factor for the coupled microstrip odd mode without cover and zero conductor thick...
void Z0_even_odd()
Compute the static even- and odd-mode static impedances.
void dielectric_losses()
Compute dielectric losses per unit length.
double delta_Z0_even_cover(double, double, double)
Compute the even mode impedance correction for a homogeneous microstrip due to the cover.
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.