KiCad PCB EDA Suite
|
#include <coupled_stripline.h>
Public Member Functions | |
COUPLED_STRIPLINE () | |
void | Analyse () override |
Analyse track geometry parameters to output Z0 and Ang_L. | |
bool | Synthesize (SYNTHESIZE_OPTS aOpts) override |
Synthesis track geometry parameters to match given Z0. | |
void | SetParameter (const TRANSLINE_PARAMETERS aParam, const double aValue) |
Sets the given calculation property. | |
double | GetParameter (const TRANSLINE_PARAMETERS aParam) const |
Gets the given calculation property. | |
double & | GetParameterRef (const TRANSLINE_PARAMETERS aParam) |
Adds a constant to the given parameter. | |
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > & | GetAnalysisResults () |
Gets the output parameters following analysis. | |
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > & | GetSynthesisResults () |
Gets the output parameters following synthesis. | |
Protected Member Functions | |
void | InitProperties (const std::initializer_list< TRANSLINE_PARAMETERS > &aParams) |
Initialises the properties used (as inputs or outputs) by the calculation. | |
void | SetAnalysisResult (TRANSLINE_PARAMETERS aParam, const double aValue, const TRANSLINE_STATUS aStatus=TRANSLINE_STATUS::OK) |
Sets an analysis result. | |
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 | |
bool | MinimiseZ0Error2D (TRANSLINE_PARAMETERS aParam1, TRANSLINE_PARAMETERS aParam2) |
minimizeZ0Error2D | |
double | SkinDepth () const |
Calculate skin depth. | |
Static Protected Member Functions | |
static double | UnitPropagationDelay (double aEpsilonEff) |
Calculates the unit propagation delay (ps/cm) for the given effective permittivity. | |
static std::pair< double, double > | EllipticIntegral (double arg) |
Computes the complete elliptic integral of first kind K() and the second kind E() using the arithmetic-geometric mean algorithm (AGM) by Abramowitz and Stegun. | |
static double | coth (const double x) |
Calculates cosh of the given argument. | |
static double | sech (const double x) |
Calculates sech of the given argument. | |
Protected Attributes | |
std::unordered_map< TRANSLINE_PARAMETERS, double > | m_parameters |
All input and output properties used by the calculation. | |
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > | m_analysisStatus |
Analysis results. | |
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > | m_synthesisStatus |
Synthesis results. | |
Static Protected Attributes | |
static constexpr double | m_maxError { 0.000001 } |
The maximum error for Z0 optimisations. | |
Private Types | |
using | TCP = TRANSLINE_PARAMETERS |
Private Member Functions | |
void | SetAnalysisResults () override |
Sets the output values and status following analysis. | |
void | SetSynthesisResults () override |
Sets the output values and status following synthesis. | |
double | calcZ0SymmetricStripline () |
Calculates the impedance of a finite-width single strip. | |
void | calcFringeCapacitances (double h, double t, double er) |
Calculate the coupling fringe capacitances. | |
void | calcSingleStripImpedances () |
Calculates impedances of finite- and zero-thickness single strips. | |
void | calcZeroThicknessCoupledImpedances (double h, double w, double s, double er) |
Calculates zero-thickness coupled strip impedances. | |
void | calcZ0EvenMode () |
Calculates even mode Z0. | |
void | calcZ0OddMode (double t, double s) |
Calculates odd mode Z0. | |
void | calcLosses () |
Calculates conductor and dielectric losses. | |
void | calcDielectrics () |
Calculate dialectric and propagation parameters. | |
Private Attributes | |
double | C_f_0 { 0.0 } |
Fringing capacitance from one edge to ground of zero thickness strip. | |
double | C_f_t_h { 0.0 } |
Fringing capacitance of single strip of finite width. | |
double | Z0_w_h_0 { 0.0 } |
Impedance of single strip of zero thickness. | |
double | Z0_w_h_t_h { 0.0 } |
Impedance of single strip of finite thickness. | |
double | Z0_e_w_h_0_s_h { 0.0 } |
Even mode impedance of coupled zero thickness strips. | |
double | Z0_o_w_h_0_s_h { 0.0 } |
Odd mode impedance of coupled zero thickness strips. | |
double | e_eff_e { 0.0 } |
Even mode effective dielectric constant. | |
double | e_eff_o { 0.0 } |
Odd mode effective dielectric constant. | |
double | ang_l { 0.0 } |
Angular length (rad) | |
double | unit_prop_delay_e { 0.0 } |
Even mode unit propagation delay (ps/cm) | |
double | unit_prop_delay_o { 0.0 } |
Odd mode unit propagation delay (ps/cm) | |
STRIPLINE | m_striplineCalc |
Calculator used to determine single stripline values. | |
Definition at line 36 of file coupled_stripline.h.
|
private |
Definition at line 38 of file coupled_stripline.h.
|
inline |
Definition at line 41 of file coupled_stripline.h.
|
overridevirtual |
Analyse track geometry parameters to output Z0 and Ang_L.
Implements TRANSLINE_CALCULATION_BASE.
Definition at line 38 of file coupled_stripline.cpp.
References calcDielectrics(), calcFringeCapacitances(), calcLosses(), calcSingleStripImpedances(), calcZ0EvenMode(), calcZ0OddMode(), calcZeroThicknessCoupledImpedances(), TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetParameter(), TRANSLINE_CALCULATION_BASE::SkinDepth(), Z0_e_w_h_0_s_h, and Z0_o_w_h_0_s_h.
Referenced by C_STRIPLINE::calcAnalyze(), and Synthesize().
|
private |
Calculate dialectric and propagation parameters.
Definition at line 355 of file coupled_stripline.cpp.
References ang_l, TRANSLINE_CALCULATIONS::C0, e_eff_e, e_eff_o, TRANSLINE_CALCULATION_BASE::GetParameter(), unit_prop_delay_e, unit_prop_delay_o, and TRANSLINE_CALCULATION_BASE::UnitPropagationDelay().
Referenced by Analyse().
|
private |
Calculate the coupling fringe capacitances.
Definition at line 277 of file coupled_stripline.cpp.
References C_f_0, C_f_t_h, and TRANSLINE_CALCULATIONS::E0.
Referenced by Analyse().
|
private |
Calculates conductor and dielectric losses.
Definition at line 350 of file coupled_stripline.cpp.
Referenced by Analyse().
|
private |
Calculates impedances of finite- and zero-thickness single strips.
Definition at line 304 of file coupled_stripline.cpp.
References calcZ0SymmetricStripline(), TRANSLINE_CALCULATION_BASE::EllipticIntegral(), TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::sech(), Z0_w_h_0, Z0_w_h_t_h, and TRANSLINE_CALCULATIONS::ZF0.
Referenced by Analyse().
|
private |
Calculates even mode Z0.
Definition at line 322 of file coupled_stripline.cpp.
References C_f_0, C_f_t_h, TRANSLINE_CALCULATION_BASE::SetParameter(), Z0_e_w_h_0_s_h, Z0_w_h_0, and Z0_w_h_t_h.
Referenced by Analyse().
|
private |
Calculates odd mode Z0.
Definition at line 331 of file coupled_stripline.cpp.
References C_f_0, C_f_t_h, TRANSLINE_CALCULATIONS::E0, TRANSLINE_CALCULATION_BASE::SetParameter(), Z0_o_w_h_0_s_h, Z0_w_h_0, Z0_w_h_t_h, and TRANSLINE_CALCULATIONS::ZF0.
Referenced by Analyse().
|
private |
Calculates the impedance of a finite-width single strip.
Definition at line 377 of file coupled_stripline.cpp.
References STRIPLINE::Analyse(), TRANSLINE_CALCULATION_BASE::GetParameter(), m_striplineCalc, and TRANSLINE_CALCULATION_BASE::SetParameter().
Referenced by calcSingleStripImpedances().
|
private |
Calculates zero-thickness coupled strip impedances.
Definition at line 289 of file coupled_stripline.cpp.
References TRANSLINE_CALCULATION_BASE::coth(), TRANSLINE_CALCULATION_BASE::EllipticIntegral(), Z0_e_w_h_0_s_h, Z0_o_w_h_0_s_h, and TRANSLINE_CALCULATIONS::ZF0.
Referenced by Analyse().
|
inlinestaticprotectedinherited |
Calculates cosh of the given argument.
Definition at line 211 of file transline_calculation_base.h.
Referenced by calcZeroThicknessCoupledImpedances().
|
staticprotectedinherited |
Computes the complete elliptic integral of first kind K() and the second kind E() using the arithmetic-geometric mean algorithm (AGM) by Abramowitz and Stegun.
Definition at line 159 of file transline_calculation_base.cpp.
References INFINITY, M_PI_2, and NR_EPSI.
Referenced by calcSingleStripImpedances(), and calcZeroThicknessCoupledImpedances().
|
inherited |
Gets the output parameters following analysis.
Definition at line 36 of file transline_calculation_base.cpp.
References TRANSLINE_CALCULATION_BASE::m_analysisStatus, and TRANSLINE_CALCULATION_BASE::SetAnalysisResults().
Referenced by C_MICROSTRIP::showAnalyze(), C_STRIPLINE::showAnalyze(), MICROSTRIP_UI::showAnalyze(), STRIPLINE_UI::showAnalyze(), C_MICROSTRIP::showSynthesize(), and C_STRIPLINE::showSynthesize().
|
inlineinherited |
Gets the given calculation property.
Definition at line 121 of file transline_calculation_base.h.
References TRANSLINE_CALCULATION_BASE::m_parameters.
Referenced by Analyse(), STRIPLINE::Analyse(), MICROSTRIP::attenuation(), calcDielectrics(), calcSingleStripImpedances(), calcZ0SymmetricStripline(), COUPLED_MICROSTRIP::compute_single_line(), COUPLED_MICROSTRIP::conductor_losses(), MICROSTRIP::conductor_losses(), COUPLED_MICROSTRIP::delta_u_thickness(), COUPLED_MICROSTRIP::dielectric_losses(), MICROSTRIP::dielectric_losses(), MICROSTRIP::dispersion(), COUPLED_MICROSTRIP::er_eff_freq(), COUPLED_MICROSTRIP::er_eff_static(), COUPLED_MICROSTRIP::line_angle(), MICROSTRIP::line_angle(), STRIPLINE::lineImpedance(), MICROSTRIP::microstrip_Z0(), TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D(), MICROSTRIP::mur_eff_ms(), COUPLED_MICROSTRIP::SetAnalysisResults(), SetAnalysisResults(), MICROSTRIP::SetAnalysisResults(), STRIPLINE::SetAnalysisResults(), COUPLED_MICROSTRIP::SetSynthesisResults(), SetSynthesisResults(), MICROSTRIP::SetSynthesisResults(), STRIPLINE::SetSynthesisResults(), TRANSLINE_CALCULATION_BASE::SkinDepth(), COUPLED_MICROSTRIP::syn_fun(), COUPLED_MICROSTRIP::synth_width(), COUPLED_MICROSTRIP::Synthesize(), Synthesize(), MICROSTRIP::Synthesize(), MICROSTRIP::SynthesizeWidth(), COUPLED_MICROSTRIP::Z0_dispersion(), and COUPLED_MICROSTRIP::Z0_even_odd().
|
inlineinherited |
Adds a constant to the given parameter.
Definition at line 124 of file transline_calculation_base.h.
References TRANSLINE_CALCULATION_BASE::m_parameters.
Referenced by TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D().
|
inherited |
Gets the output parameters following synthesis.
Definition at line 44 of file transline_calculation_base.cpp.
References TRANSLINE_CALCULATION_BASE::m_synthesisStatus, and TRANSLINE_CALCULATION_BASE::SetSynthesisResults().
Referenced by MICROSTRIP_UI::showSynthesize(), and STRIPLINE_UI::showSynthesize().
|
protectedinherited |
Initialises the properties used (as inputs or outputs) by the calculation.
Definition at line 28 of file transline_calculation_base.cpp.
References TRANSLINE_CALCULATION_BASE::m_parameters.
Referenced by TRANSLINE_CALCULATION_BASE::TRANSLINE_CALCULATION_BASE().
|
protectedinherited |
minimizeZ0Error1D
Tries to find a parameter that minimizes the error on Z0. This function only works with a single parameter. Calls Analyse several times until the error is acceptable.
This function does not change Z0 / Angl_L
aOptimise | Parameter to optimise |
aMeasure | The parameter to measure / optimise against |
Definition at line 65 of file transline_calculation_base.cpp.
References TRANSLINE_CALCULATION_BASE::Analyse(), TRANSLINE_CALCULATIONS::C0, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::GetParameterRef(), TRANSLINE_CALCULATION_BASE::m_maxError, and TRANSLINE_CALCULATION_BASE::SetParameter().
Referenced by COUPLED_MICROSTRIP::Synthesize(), Synthesize(), MICROSTRIP::Synthesize(), and STRIPLINE::Synthesize().
|
protectedinherited |
minimizeZ0Error2D
Tries to find the parameters that minimizes the error on Z_Diff. This function only works with two parameters. Calls Analyse several times until the error is acceptable. While the error is unacceptable, changes slightly the parameter.
This function does not change Z0 / Angl_L
aParam1 | First parameter to optimise |
aParam2 | Secpmd parameter to optimise |
|
inlinestaticprotectedinherited |
Calculates sech of the given argument.
Definition at line 214 of file transline_calculation_base.h.
Referenced by calcSingleStripImpedances().
|
protectedinherited |
Sets an analysis result.
Definition at line 51 of file transline_calculation_base.cpp.
References TRANSLINE_CALCULATION_BASE::m_analysisStatus.
Referenced by COUPLED_MICROSTRIP::SetAnalysisResults(), SetAnalysisResults(), MICROSTRIP::SetAnalysisResults(), STRIPLINE::SetAnalysisResults(), and COUPLED_MICROSTRIP::SetSynthesisResults().
|
overrideprivatevirtual |
Sets the output values and status following analysis.
Implements TRANSLINE_CALCULATION_BASE.
Definition at line 211 of file coupled_stripline.cpp.
References ang_l, e_eff_e, e_eff_o, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetAnalysisResult(), unit_prop_delay_e, unit_prop_delay_o, Z0_E, Z0_O, and Z_DIFF.
|
inlineinherited |
Sets the given calculation property.
Definition at line 118 of file transline_calculation_base.h.
References TRANSLINE_CALCULATION_BASE::m_parameters.
Referenced by Analyse(), STRIPLINE::Analyse(), COUPLED_MICROSTRIP::attenuation(), MICROSTRIP::attenuation(), calcZ0EvenMode(), calcZ0OddMode(), calcZ0SymmetricStripline(), COUPLED_MICROSTRIP::compute_single_line(), MICROSTRIP::dispersion(), C_MICROSTRIP::getProperties(), C_STRIPLINE::getProperties(), MICROSTRIP_UI::getProperties(), STRIPLINE_UI::getProperties(), MICROSTRIP::line_angle(), MICROSTRIP::microstrip_Z0(), TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D(), COUPLED_MICROSTRIP::syn_fun(), COUPLED_MICROSTRIP::synth_width(), COUPLED_MICROSTRIP::Synthesize(), Synthesize(), MICROSTRIP::Synthesize(), and COUPLED_MICROSTRIP::Z0_dispersion().
|
protectedinherited |
Sets a synthesis result.
Definition at line 58 of file transline_calculation_base.cpp.
References TRANSLINE_CALCULATION_BASE::m_synthesisStatus.
Referenced by SetSynthesisResults(), MICROSTRIP::SetSynthesisResults(), and STRIPLINE::SetSynthesisResults().
|
overrideprivatevirtual |
Sets the output values and status following synthesis.
Implements TRANSLINE_CALCULATION_BASE.
Definition at line 244 of file coupled_stripline.cpp.
References ang_l, e_eff_e, e_eff_o, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetSynthesisResult(), unit_prop_delay_e, unit_prop_delay_o, Z0_E, Z0_O, and Z_DIFF.
|
protectedinherited |
Calculate skin depth.
Definition at line 144 of file transline_calculation_base.cpp.
References TRANSLINE_CALCULATION_BASE::GetParameter(), and TRANSLINE_CALCULATIONS::MU0.
Referenced by Analyse(), STRIPLINE::Analyse(), COUPLED_MICROSTRIP::attenuation(), and MICROSTRIP::attenuation().
|
overridevirtual |
Synthesis track geometry parameters to match given Z0.
Implements TRANSLINE_CALCULATION_BASE.
Definition at line 71 of file coupled_stripline.cpp.
References Analyse(), AW, delta, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D(), TRANSLINE_CALCULATION_BASE::SetParameter(), and TRANSLINE_CALCULATIONS::UNIT_MIL.
Referenced by C_STRIPLINE::calcSynthesize().
|
staticprotectedinherited |
Calculates the unit propagation delay (ps/cm) for the given effective permittivity.
@aEpsilonEff is the effective permittivity of the material
Definition at line 153 of file transline_calculation_base.cpp.
Referenced by STRIPLINE::Analyse(), calcDielectrics(), MICROSTRIP::dispersion(), and COUPLED_MICROSTRIP::er_eff_freq().
|
private |
Angular length (rad)
Definition at line 95 of file coupled_stripline.h.
Referenced by calcDielectrics(), SetAnalysisResults(), and SetSynthesisResults().
|
private |
Fringing capacitance from one edge to ground of zero thickness strip.
Definition at line 85 of file coupled_stripline.h.
Referenced by calcFringeCapacitances(), calcZ0EvenMode(), and calcZ0OddMode().
|
private |
Fringing capacitance of single strip of finite width.
Definition at line 86 of file coupled_stripline.h.
Referenced by calcFringeCapacitances(), calcZ0EvenMode(), and calcZ0OddMode().
|
private |
Even mode effective dielectric constant.
Definition at line 93 of file coupled_stripline.h.
Referenced by calcDielectrics(), SetAnalysisResults(), and SetSynthesisResults().
|
private |
Odd mode effective dielectric constant.
Definition at line 94 of file coupled_stripline.h.
Referenced by calcDielectrics(), SetAnalysisResults(), and SetSynthesisResults().
|
protectedinherited |
Analysis results.
Definition at line 220 of file transline_calculation_base.h.
Referenced by TRANSLINE_CALCULATION_BASE::GetAnalysisResults(), and TRANSLINE_CALCULATION_BASE::SetAnalysisResult().
|
staticconstexprprotectedinherited |
The maximum error for Z0 optimisations.
Definition at line 226 of file transline_calculation_base.h.
Referenced by TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D().
|
protectedinherited |
All input and output properties used by the calculation.
Definition at line 217 of file transline_calculation_base.h.
Referenced by TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::GetParameterRef(), TRANSLINE_CALCULATION_BASE::InitProperties(), and TRANSLINE_CALCULATION_BASE::SetParameter().
|
private |
Calculator used to determine single stripline values.
Definition at line 100 of file coupled_stripline.h.
Referenced by calcZ0SymmetricStripline().
|
protectedinherited |
Synthesis results.
Definition at line 223 of file transline_calculation_base.h.
Referenced by TRANSLINE_CALCULATION_BASE::GetSynthesisResults(), and TRANSLINE_CALCULATION_BASE::SetSynthesisResult().
|
private |
Even mode unit propagation delay (ps/cm)
Definition at line 96 of file coupled_stripline.h.
Referenced by calcDielectrics(), SetAnalysisResults(), and SetSynthesisResults().
|
private |
Odd mode unit propagation delay (ps/cm)
Definition at line 97 of file coupled_stripline.h.
Referenced by calcDielectrics(), SetAnalysisResults(), and SetSynthesisResults().
|
private |
Even mode impedance of coupled zero thickness strips.
Definition at line 90 of file coupled_stripline.h.
Referenced by Analyse(), calcZ0EvenMode(), and calcZeroThicknessCoupledImpedances().
|
private |
Odd mode impedance of coupled zero thickness strips.
Definition at line 91 of file coupled_stripline.h.
Referenced by Analyse(), calcZ0OddMode(), and calcZeroThicknessCoupledImpedances().
|
private |
Impedance of single strip of zero thickness.
Definition at line 88 of file coupled_stripline.h.
Referenced by calcSingleStripImpedances(), calcZ0EvenMode(), and calcZ0OddMode().
|
private |
Impedance of single strip of finite thickness.
Definition at line 89 of file coupled_stripline.h.
Referenced by calcSingleStripImpedances(), calcZ0EvenMode(), and calcZ0OddMode().