33 if( aWOverH <= 0.0 || aCOverH <= 0.0 )
43 const double q2Coated =
WanHoorfarQ2( aWOverH, 1.0 + aCOverH );
45 const double microstripDelta = std::max( 0.0, q2Coated - q2Base );
53 const double halfSpace = backMetal ? 0.25 : 0.5;
61 const double slotCoverage = fillsGaps ? 1.0 : 0.4;
63 return halfSpace * slotCoverage * microstripDelta;
94 const double k1 = W / ( W +
S +
S );
97 const double q1 = kk1 / kpk1;
102 double zl_factor = 0.0;
106 const double k3 = std::tanh( (
M_PI / 4.0 ) * ( W /
H ) )
107 / std::tanh( (
M_PI / 4.0 ) * ( W +
S +
S ) /
H );
109 qz = 1.0 / ( q1 + q3 );
110 er0 = 1.0 + q3 * qz * ( epsr - 1.0 );
111 zl_factor =
TC::ZF0 / 2.0 * qz;
115 const double k2 = std::sinh( (
M_PI / 4.0 ) * ( W /
H ) )
116 / std::sinh( (
M_PI / 4.0 ) * ( W +
S +
S ) /
H );
118 er0 = 1.0 + ( epsr - 1.0 ) / 2.0 * q2 / q1;
119 zl_factor =
TC::ZF0 / 4.0 / q1;
127 const double d = (
T * 1.25 /
M_PI ) * ( 1.0 + std::log( 4.0 *
M_PI * W /
T ) );
128 const double se =
S - d;
129 const double We = W + d;
130 const double ke = We / ( We + se + se );
135 qz = 1.0 / ( qe + q3 );
136 er0 = 1.0 + q3 * qz * ( epsr - 1.0 );
137 zl_factor =
TC::ZF0 / 2.0 * qz;
141 zl_factor =
TC::ZF0 / 4.0 / qe;
144 er0 = er0 - ( 0.7 * ( er0 - 1.0 ) *
T /
S ) / ( q1 + ( 0.7 *
T /
S ) );
151 double tand_eff = tand_substrate;
152 const double uOverH = (
H > 0.0 ) ? ( W /
H ) : 0.0;
153 const auto [ er0_coated, tand_coated ] =
156 if( er0_coated != er0 )
158 zl_factor *= std::sqrt( er0 / er0_coated );
160 tand_eff = tand_coated;
163 const double sr_er = std::sqrt( epsr );
164 const double sr_er0 = std::sqrt( er0 );
168 const double fte = (
TC::C0 / 4.0 ) / (
H * std::sqrt( epsr - 1.0 ) );
170 const double p = std::log( W /
H );
171 const double u = 0.54 - ( 0.64 - 0.015 * p ) * p;
172 const double v = 0.43 - ( 0.86 - 0.54 * p ) * p;
173 const double G = std::exp( u * std::log( W /
S ) + v );
189 const double n = ( 1.0 - k1 ) * 8.0 *
M_PI / (
T * ( 1.0 + k1 ) );
190 const double a = W / 2.0;
191 const double b = a +
S;
192 ac = (
M_PI + std::log( n * a ) ) / a + (
M_PI + std::log( n * b ) ) / b;
195 const double ac_factor = ac / ( 4.0 *
TC::ZF0 * kk1 * kpk1 * ( 1.0 - k1 * k1 ) );
196 const double ad_factor = ( epsr / ( epsr - 1.0 ) ) * tand_eff *
M_PI /
TC::C0;
203 double sr_er_f = sr_er0;
204 sr_er_f += ( sr_er - sr_er0 ) / ( 1.0 +
G * std::pow( freq / fte, -1.8 ) );
210 TC::LOG2DB * len * ad_factor * freq * ( sr_er_f * sr_er_f - 1.0 ) / sr_er_f );
243 const bool Z0_invalid = !std::isfinite(
Z0 ) ||
Z0 < 0;
244 const bool angL_invalid = !std::isfinite( angL ) || angL < 0;
245 const bool len_invalid = !std::isfinite( len ) || len < 0;
246 const bool W_invalid = !std::isfinite( W ) || W <= 0.0;
247 const bool S_invalid = !std::isfinite(
S ) ||
S <= 0.0;
271 const bool Z0_invalid = !std::isfinite(
Z0 ) ||
Z0 < 0;
272 const bool angL_invalid = !std::isfinite( angL ) || angL < 0;
273 const bool len_invalid = !std::isfinite( len ) || len < 0;
274 const bool W_invalid = !std::isfinite( W ) || W <= 0.0;
275 const bool S_invalid = !std::isfinite(
S ) ||
S <= 0.0;
void SetAnalysisResults() override
Sets the output values and status following analysis.
void Analyse() override
Analyse trace geometry to produce Z0, electrical length, effective permittivity, and losses.
bool Synthesize(SYNTHESIZE_OPTS aOpts) override
Synthesize the unknown geometry parameter to match the Z0 target.
bool hasBackMetal() const
True when CPW_BACKMETAL reads as grounded (CBCPW)
void SetSynthesisResults() override
Sets the output values and status following synthesis.
double GetSoldermaskDeltaQ(double aWOverH, double aCOverH) const override
Coplanar waveguide soldermask filling factor.
double GetDispersedEpsilonR(double aF) const
Dispersed permittivity at aF. Returns raw EPSILONR when the model is inactive.
TRANSLINE_PARAMETERS m_synthesizeTarget
Which geometry parameter is the unknown during synthesis (set by the UI)
double GetDispersedTanDelta(double aF) const
Dispersed loss tangent at aF. Returns raw TAND when the model is inactive.
double GetParameter(const TRANSLINE_PARAMETERS aParam) const
Gets the given calculation property.
static std::pair< double, double > EllipticIntegral(double arg)
Computes the complete elliptic integral of first kind K() and the second kind E() using the arithmeti...
void SetParameter(const TRANSLINE_PARAMETERS aParam, const double aValue)
Sets the given calculation property.
void SetSynthesisResult(TRANSLINE_PARAMETERS aParam, const double aValue, const TRANSLINE_STATUS aStatus=TRANSLINE_STATUS::OK)
Sets a synthesis result.
void UpdateDielectricModel()
Refit the Djordjevic-Sarkar model from the current parameter map.
std::pair< double, double > ApplySoldermaskCorrection(double aEpsEffUncoated, double aTanDeltaSubstrate, double aEpsRSubstrate, double aWOverH, double aF) const
Apply a three-layer (substrate / soldermask / air) correction to an un-coated (eps_eff,...
double SkinDepth() const
Calculate skin depth.
static double WanHoorfarQ2(double aU, double aHBarTop)
Wan-Hoorfar 2000 eq.
bool MinimiseZ0Error1D(TRANSLINE_PARAMETERS aOptimise, TRANSLINE_PARAMETERS aMeasure, bool aRecalculateLength=false)
minimizeZ0Error1D
void SetAnalysisResult(TRANSLINE_PARAMETERS aParam, const double aValue, const TRANSLINE_STATUS aStatus=TRANSLINE_STATUS::OK)
Sets an analysis result.
static double UnitPropagationDelay(double aEpsilonEff)
Calculates the unit propagation delay (ps/cm) for the given effective permittivity.
SYNTHESIZE_OPTS
Options for specifying synthesis inputs, targets, or strategies.
TRANSLINE_STATUS
Parameter status values.
TRANSLINE_PARAMETERS
All possible parameters used (as inputs or outputs) by the transmission line calculations.