35 if( aWOverH <= 0.0 || aCOverH <= 0.0 )
45 const double q2Coated =
WanHoorfarQ2( aWOverH, 1.0 + aCOverH );
47 const double microstripDelta = std::max( 0.0, q2Coated - q2Base );
55 const double halfSpace = backMetal ? 0.25 : 0.5;
63 const double slotCoverage = fillsGaps ? 1.0 : 0.4;
65 return halfSpace * slotCoverage * microstripDelta;
96 const double k1 = W / ( W +
S +
S );
99 const double q1 = kk1 / kpk1;
104 double zl_factor = 0.0;
108 const double k3 = std::tanh( (
M_PI / 4.0 ) * ( W /
H ) )
109 / std::tanh( (
M_PI / 4.0 ) * ( W +
S +
S ) /
H );
111 qz = 1.0 / ( q1 + q3 );
112 er0 = 1.0 + q3 * qz * ( epsr - 1.0 );
113 zl_factor =
TC::ZF0 / 2.0 * qz;
117 const double k2 = std::sinh( (
M_PI / 4.0 ) * ( W /
H ) )
118 / std::sinh( (
M_PI / 4.0 ) * ( W +
S +
S ) /
H );
120 er0 = 1.0 + ( epsr - 1.0 ) / 2.0 * q2 / q1;
121 zl_factor =
TC::ZF0 / 4.0 / q1;
129 const double d = (
T * 1.25 /
M_PI ) * ( 1.0 + std::log( 4.0 *
M_PI * W /
T ) );
130 const double se =
S - d;
131 const double We = W + d;
132 const double ke = We / ( We + se + se );
137 qz = 1.0 / ( qe + q3 );
138 er0 = 1.0 + q3 * qz * ( epsr - 1.0 );
139 zl_factor =
TC::ZF0 / 2.0 * qz;
143 zl_factor =
TC::ZF0 / 4.0 / qe;
146 er0 = er0 - ( 0.7 * ( er0 - 1.0 ) *
T /
S ) / ( q1 + ( 0.7 *
T /
S ) );
153 double tand_eff = tand_substrate;
154 const double uOverH = (
H > 0.0 ) ? ( W /
H ) : 0.0;
155 const auto [ er0_coated, tand_coated ] =
158 if( er0_coated != er0 )
160 zl_factor *= std::sqrt( er0 / er0_coated );
162 tand_eff = tand_coated;
165 const double sr_er = std::sqrt( epsr );
166 const double sr_er0 = std::sqrt( er0 );
170 const double fte = (
TC::C0 / 4.0 ) / (
H * std::sqrt( epsr - 1.0 ) );
172 const double p = std::log( W /
H );
173 const double u = 0.54 - ( 0.64 - 0.015 * p ) * p;
174 const double v = 0.43 - ( 0.86 - 0.54 * p ) * p;
175 const double G = std::exp( u * std::log( W /
S ) + v );
191 const double n = ( 1.0 - k1 ) * 8.0 *
M_PI / (
T * ( 1.0 + k1 ) );
192 const double a = W / 2.0;
193 const double b = a +
S;
194 ac = (
M_PI + std::log( n * a ) ) / a + (
M_PI + std::log( n * b ) ) / b;
197 const double ac_factor = ac / ( 4.0 *
TC::ZF0 * kk1 * kpk1 * ( 1.0 - k1 * k1 ) );
198 const double ad_factor = ( epsr / ( epsr - 1.0 ) ) * tand_eff *
M_PI /
TC::C0;
205 double sr_er_f = sr_er0;
206 sr_er_f += ( sr_er - sr_er0 ) / ( 1.0 +
G * std::pow( freq / fte, -1.8 ) );
212 TC::LOG2DB * len * ad_factor * freq * ( sr_er_f * sr_er_f - 1.0 ) / sr_er_f );
245 const bool Z0_invalid = !std::isfinite(
Z0 ) ||
Z0 < 0;
246 const bool angL_invalid = !std::isfinite( angL ) || angL < 0;
247 const bool len_invalid = !std::isfinite( len ) || len < 0;
248 const bool W_invalid = !std::isfinite( W ) || W <= 0.0;
249 const bool S_invalid = !std::isfinite(
S ) ||
S <= 0.0;
273 const bool Z0_invalid = !std::isfinite(
Z0 ) ||
Z0 < 0;
274 const bool angL_invalid = !std::isfinite( angL ) || angL < 0;
275 const bool len_invalid = !std::isfinite( len ) || len < 0;
276 const bool W_invalid = !std::isfinite( W ) || W <= 0.0;
277 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.