73 if( aOpts == SYNTHESIZE_OPTS::FIX_WIDTH )
76 if( aOpts == SYNTHESIZE_OPTS::FIX_SPACING )
92 const double z0 = sqrt( z0e_target * z0o_target );
93 const double k = ( z0e_target - z0o_target ) / ( z0e_target + z0o_target );
98 static constexpr double ai[] = { 1, -0.301, 3.209, -27.282, 56.609, -37.746 };
99 static constexpr double bi[] = { 0.020, -0.623, 17.192, -68.946, 104.740, -16.148 };
100 static constexpr double ci[] = { 0.002, -0.347, 7.171, -36.910, 76.132, -51.616 };
102 const double AW = exp( z0 * sqrt( er + 1.0 ) / 42.4 ) - 1.0;
103 const double F1 = 8.0 * sqrt(
AW * ( 7.0 + 4.0 / er ) / 11.0 + ( 1.0 + 1.0 / er ) / 0.81 ) /
AW;
105 double F2 = 0.0, F3 = 0.0;
108 for(
int i = 0; i <= 5; i++ )
109 F2 = F2 + ai[i] * pow( k, i );
111 for(
int i = 0; i <= 5; i++ )
112 F3 = F3 + ( bi[i] - ci[i] * ( 9.6 - er ) ) * pow( ( 0.6 - k ),
static_cast<double>( i ) );
114 double w = h * fabs( F1 * F2 );
115 double s = h * fabs( F1 * F3 );
123 const double cval = 1e-12 * z0e_target * z0o_target;
125 while( !done && iters < maxiters )
137 const double err = pow( ( ze0 - z0e_target ), 2.0 ) + pow( ( zo0 - z0o_target ), 2.0 );
160 const double dedw = ( ze1 - ze0 ) /
delta;
161 const double dodw = ( zo1 - zo0 ) /
delta;
162 const double deds = ( ze2 - ze0 ) /
delta;
163 const double dods = ( zo2 - zo0 ) /
delta;
166 const double d = dedw * dods - deds * dodw;
169 double dw = -1.0 * ( ( ze0 - z0e_target ) * dods - ( zo0 - z0o_target ) * deds ) / d;
171 if( fabs( dw ) > 0.1 * w )
181 double ds = ( ( ze0 - z0e_target ) * dodw - ( zo0 - z0o_target ) * dedw ) / d;
183 if( fabs( ds ) > 0.1 * s )
226 const bool Z0_E_invalid = !std::isfinite(
Z0_E ) ||
Z0_E <= 0;
227 const bool Z0_O_invalid = !std::isfinite(
Z0_O ) ||
Z0_O <= 0;
228 const bool Z_DIFF_invalid = !std::isfinite(
Z_DIFF ) ||
Z_DIFF <= 0;
229 const bool ANG_L_invalid = !std::isfinite(
ang_l ) ||
ang_l < 0;
230 const bool W_invalid = !std::isfinite( W ) || W <= 0;
231 const bool L_invalid = !std::isfinite( L ) || L < 0;
232 const bool S_invalid = !std::isfinite( S ) || S <= 0;
234 SetAnalysisResult( TCP::Z0_E,
Z0_E, Z0_E_invalid ? TRANSLINE_STATUS::TS_ERROR : TRANSLINE_STATUS::OK );
235 SetAnalysisResult( TCP::Z0_O,
Z0_O, Z0_O_invalid ? TRANSLINE_STATUS::TS_ERROR : TRANSLINE_STATUS::OK );
237 SetAnalysisResult( TCP::ANG_L,
ang_l, ANG_L_invalid ? TRANSLINE_STATUS::TS_ERROR : TRANSLINE_STATUS::OK );
238 SetAnalysisResult( TCP::PHYS_WIDTH, W, W_invalid ? TRANSLINE_STATUS::WARNING : TRANSLINE_STATUS::OK );
239 SetAnalysisResult( TCP::PHYS_LEN, L, L_invalid ? TRANSLINE_STATUS::WARNING : TRANSLINE_STATUS::OK );
240 SetAnalysisResult( TCP::PHYS_S, S, S_invalid ? TRANSLINE_STATUS::WARNING : TRANSLINE_STATUS::OK );
259 const bool Z0_E_invalid = !std::isfinite(
Z0_E ) ||
Z0_E <= 0;
260 const bool Z0_O_invalid = !std::isfinite(
Z0_O ) ||
Z0_O <= 0;
261 const bool Z_DIFF_invalid = !std::isfinite(
Z_DIFF ) ||
Z_DIFF <= 0;
262 const bool ANG_L_invalid = !std::isfinite(
ang_l ) ||
ang_l < 0;
263 const bool W_invalid = !std::isfinite( W ) || W <= 0;
264 const bool L_invalid = !std::isfinite( L ) || L < 0;
265 const bool S_invalid = !std::isfinite( S ) || S <= 0;
271 SetSynthesisResult( TCP::PHYS_WIDTH, W, W_invalid ? TRANSLINE_STATUS::TS_ERROR : TRANSLINE_STATUS::OK );
272 SetSynthesisResult( TCP::PHYS_LEN, L, L_invalid ? TRANSLINE_STATUS::TS_ERROR : TRANSLINE_STATUS::OK );
273 SetSynthesisResult( TCP::PHYS_S, S, S_invalid ? TRANSLINE_STATUS::TS_ERROR : TRANSLINE_STATUS::OK );
281 * ( ( 2.0 / ( 1.0 - t / h ) ) * log( ( 1.0 / ( 1.0 - t / h ) ) + 1.0 )
282 - ( 1.0 / ( 1.0 - t / h ) - 1.0 ) * log( ( 1.0 / pow( 1.0 - t / h, 2.0 ) ) - 1.0 ) );
293 const double k_e = tanh( M_PI * w / ( 2.0 * h ) ) * tanh( M_PI * ( w + s ) / ( 2.0 * h ) );
294 const double k_o = tanh( M_PI * w / ( 2.0 * h ) ) *
coth( M_PI * ( w + s ) / ( 2.0 * h ) );
295 const double k_e_p = std::sqrt( 1 - std::pow( k_e, 2 ) );
296 const double k_o_p = std::sqrt( 1 - std::pow( k_o, 2 ) );
315 const double k =
sech( M_PI * w / ( 2.0 * h ) );
316 const double k_p = tanh( M_PI * w / ( 2.0 * h ) );
343 const double Z_o = s / t >= 5.0 ? Z_o_1 : Z_o_2;
371 const double v =
TC::C0 / sqrt( e_r );
372 const double lambda_g = v /
GetParameter( TCP::FREQUENCY );
void Analyse() override
Analyse track geometry parameters to output Z0 and Ang_L.
double C_f_t_h
Fringing capacitance of single strip of finite width.
void calcLosses()
Calculates conductor and dielectric losses.
void SetSynthesisResults() override
Sets the output values and status following synthesis.
STRIPLINE m_striplineCalc
Calculator used to determine single stripline values.
double unit_prop_delay_o
Odd mode unit propagation delay (ps/cm)
bool Synthesize(SYNTHESIZE_OPTS aOpts) override
Synthesis track geometry parameters to match given Z0.
void calcFringeCapacitances(double h, double t, double er)
Calculate the coupling fringe capacitances.
double Z0_o_w_h_0_s_h
Odd mode impedance of coupled zero thickness strips.
double Z0_w_h_t_h
Impedance of single strip of finite thickness.
void calcZ0EvenMode()
Calculates even mode Z0.
void calcDielectrics()
Calculate dialectric and propagation parameters.
double Z0_w_h_0
Impedance of single strip of zero thickness.
void calcSingleStripImpedances()
Calculates impedances of finite- and zero-thickness single strips.
double e_eff_e
Even mode effective dielectric constant.
void calcZ0OddMode(double t, double s)
Calculates odd mode Z0.
void SetAnalysisResults() override
Sets the output values and status following analysis.
double C_f_0
Fringing capacitance from one edge to ground of zero thickness strip.
double e_eff_o
Odd mode effective dielectric constant.
double Z0_e_w_h_0_s_h
Even mode impedance of coupled zero thickness strips.
double calcZ0SymmetricStripline()
Calculates the impedance of a finite-width single strip.
double ang_l
Angular length (rad)
void calcZeroThicknessCoupledImpedances(double h, double w, double s, double er)
Calculates zero-thickness coupled strip impedances.
double unit_prop_delay_e
Even mode unit propagation delay (ps/cm)
void Analyse() override
Analyse track geometry parameters to output Z0 and Ang_L.
static double coth(const double x)
Calculates cosh of the given argument.
double GetParameter(const TRANSLINE_PARAMETERS aParam) const
Gets the given calculation property.
static double sech(const double x)
Calculates sech of the given argument.
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.
bool MinimiseZ0Error1D(TRANSLINE_PARAMETERS aOptimise, TRANSLINE_PARAMETERS aMeasure)
minimizeZ0Error1D
double SkinDepth() const
Calculate skin depth.
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.
constexpr double UNIT_MIL
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.