KiCad PCB EDA Suite
|
#include <microstrip.h>
Public Member Functions | |
MICROSTRIP () | |
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 | SynthesizeWidth () const |
Calculates the width with the current set of parameters. | |
double | conductor_losses () const |
Calculate the microstrip conductor losses per unit. | |
double | dielectric_losses () const |
Calculates the microstrip dielectric losses per unit. | |
void | microstrip_Z0 () |
Calculates the microstrip static impedance. | |
void | dispersion () |
Calculates frequency dependent parameters of the microstrip. | |
void | attenuation () |
Calculates the attenuation of the microstrip. | |
void | mur_eff_ms () |
Calculates the effective magnetic permeability. | |
void | line_angle () |
Calculates microstrip length in radians. | |
Static Private Member Functions | |
static double | Z0_dispersion (double, double, double, double, double) |
Calculates the dispersion correction factor for the characteristic impedance static. | |
static double | Z0_homogeneous (double) |
Calculates the impedance for a stripline in a homogeneous medium, without cover effects. | |
static double | delta_Z0_cover (double, double) |
Calculates the cover effect on impedance for a stripline in a homogeneous medium. | |
static double | filling_factor (double, double) |
Calculates the filling factor for a microstrip without cover and zero conductor thickness. | |
static double | delta_q_cover (double) |
Calculates the cover effect on filling factor. | |
static double | delta_q_thickness (double, double) |
Calculates the thickness effect on filling factor. | |
static double | e_r_effective (double, double) |
Calculates effective dielectric constant from material e_r and filling factor. | |
static double | delta_u_thickness (double, double, double) |
Calculates the thickness effect on normalized width. | |
static double | e_r_dispersion (double, double, double) |
Calculates the dispersion correction factor for the effective permeability. | |
Private Attributes | |
double | Z0_0 { 0.0 } |
static characteristic impedance | |
double | er_eff_0 { 0.0 } |
Static effective dielectric constant. | |
double | mur_eff { 0.0 } |
Effective mag. permeability. | |
double | w_eff { 0.0 } |
Effective width of line. | |
double | Z0_h_1 { 0.0 } |
homogeneous stripline impedance | |
Friends | |
class | COUPLED_MICROSTRIP |
Definition at line 31 of file common/transline_calculations/microstrip.h.
|
private |
Definition at line 33 of file common/transline_calculations/microstrip.h.
|
inline |
Definition at line 36 of file common/transline_calculations/microstrip.h.
|
overridevirtual |
Analyse track geometry parameters to output Z0 and Ang_L.
Implements TRANSLINE_CALCULATION_BASE.
Definition at line 32 of file common/transline_calculations/microstrip.cpp.
References attenuation(), dispersion(), line_angle(), microstrip_Z0(), and mur_eff_ms().
Referenced by MICROSTRIP_UI::calcAnalyze(), and Synthesize().
|
private |
Calculates the attenuation of the microstrip.
Definition at line 369 of file common/transline_calculations/microstrip.cpp.
References conductor_losses(), dielectric_losses(), TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetParameter(), and TRANSLINE_CALCULATION_BASE::SkinDepth().
Referenced by Analyse().
|
private |
Calculate the microstrip conductor losses per unit.
Definition at line 265 of file common/transline_calculations/microstrip.cpp.
References TRANSLINE_CALCULATIONS::C0, delta, er_eff_0, TRANSLINE_CALCULATION_BASE::GetParameter(), Z0_h_1, and TRANSLINE_CALCULATIONS::ZF0.
Referenced by attenuation().
|
inlinestaticprotectedinherited |
Calculates cosh of the given argument.
Definition at line 211 of file transline_calculation_base.h.
Referenced by COUPLED_STRIPLINE::calcZeroThicknessCoupledImpedances().
|
staticprivate |
Calculates the cover effect on filling factor.
Definition at line 216 of file common/transline_calculations/microstrip.cpp.
Referenced by microstrip_Z0().
|
staticprivate |
Calculates the thickness effect on filling factor.
Definition at line 222 of file common/transline_calculations/microstrip.cpp.
Referenced by COUPLED_MICROSTRIP::er_eff_static(), and microstrip_Z0().
|
staticprivate |
Calculates the thickness effect on normalized width.
Definition at line 234 of file common/transline_calculations/microstrip.cpp.
Referenced by microstrip_Z0().
|
staticprivate |
Calculates the cover effect on impedance for a stripline in a homogeneous medium.
Definition at line 196 of file common/transline_calculations/microstrip.cpp.
References atanh().
|
private |
Calculates the microstrip dielectric losses per unit.
Definition at line 294 of file common/transline_calculations/microstrip.cpp.
References TRANSLINE_CALCULATIONS::C0, er_eff_0, and TRANSLINE_CALCULATION_BASE::GetParameter().
Referenced by attenuation().
|
private |
Calculates frequency dependent parameters of the microstrip.
Definition at line 347 of file common/transline_calculations/microstrip.cpp.
References D, e_r_dispersion(), er_eff_0, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetParameter(), TRANSLINE_CALCULATION_BASE::UnitPropagationDelay(), Z0_0, and Z0_dispersion().
Referenced by Analyse(), and COUPLED_MICROSTRIP::compute_single_line().
|
staticprivate |
Calculates the dispersion correction factor for the effective permeability.
Definition at line 253 of file common/transline_calculations/microstrip.cpp.
Referenced by dispersion().
|
staticprivate |
Calculates effective dielectric constant from material e_r and filling factor.
Definition at line 228 of file common/transline_calculations/microstrip.cpp.
Referenced by microstrip_Z0().
|
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 COUPLED_STRIPLINE::calcSingleStripImpedances(), and COUPLED_STRIPLINE::calcZeroThicknessCoupledImpedances().
|
staticprivate |
Calculates the filling factor for a microstrip without cover and zero conductor thickness.
Definition at line 205 of file common/transline_calculations/microstrip.cpp.
Referenced by microstrip_Z0().
|
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 COUPLED_STRIPLINE::Analyse(), STRIPLINE::Analyse(), attenuation(), COUPLED_STRIPLINE::calcDielectrics(), COUPLED_STRIPLINE::calcSingleStripImpedances(), COUPLED_STRIPLINE::calcZ0SymmetricStripline(), COUPLED_MICROSTRIP::compute_single_line(), COUPLED_MICROSTRIP::conductor_losses(), conductor_losses(), COUPLED_MICROSTRIP::delta_u_thickness(), COUPLED_MICROSTRIP::dielectric_losses(), dielectric_losses(), dispersion(), COUPLED_MICROSTRIP::er_eff_freq(), COUPLED_MICROSTRIP::er_eff_static(), COUPLED_MICROSTRIP::line_angle(), line_angle(), STRIPLINE::lineImpedance(), microstrip_Z0(), TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D(), mur_eff_ms(), COUPLED_MICROSTRIP::SetAnalysisResults(), COUPLED_STRIPLINE::SetAnalysisResults(), SetAnalysisResults(), STRIPLINE::SetAnalysisResults(), COUPLED_MICROSTRIP::SetSynthesisResults(), COUPLED_STRIPLINE::SetSynthesisResults(), SetSynthesisResults(), STRIPLINE::SetSynthesisResults(), TRANSLINE_CALCULATION_BASE::SkinDepth(), COUPLED_MICROSTRIP::syn_fun(), COUPLED_MICROSTRIP::synth_width(), COUPLED_MICROSTRIP::Synthesize(), COUPLED_STRIPLINE::Synthesize(), Synthesize(), 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().
|
private |
Calculates microstrip length in radians.
Definition at line 386 of file common/transline_calculations/microstrip.cpp.
References TRANSLINE_CALCULATIONS::C0, TRANSLINE_CALCULATION_BASE::GetParameter(), mur_eff, and TRANSLINE_CALCULATION_BASE::SetParameter().
Referenced by Analyse().
|
private |
Calculates the microstrip static impedance.
Definition at line 304 of file common/transline_calculations/microstrip.cpp.
References delta_q_cover(), delta_q_thickness(), delta_u_thickness(), e_r_effective(), er_eff_0, filling_factor(), TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetParameter(), w_eff, Z0_0, Z0_h_1, and Z0_homogeneous().
Referenced by Analyse(), and COUPLED_MICROSTRIP::compute_single_line().
|
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(), COUPLED_STRIPLINE::Synthesize(), 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 |
|
private |
Calculates the effective magnetic permeability.
Definition at line 377 of file common/transline_calculations/microstrip.cpp.
References TRANSLINE_CALCULATION_BASE::GetParameter(), and mur_eff.
Referenced by Analyse().
|
inlinestaticprotectedinherited |
Calculates sech of the given argument.
Definition at line 214 of file transline_calculation_base.h.
Referenced by COUPLED_STRIPLINE::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(), COUPLED_STRIPLINE::SetAnalysisResults(), SetAnalysisResults(), STRIPLINE::SetAnalysisResults(), and COUPLED_MICROSTRIP::SetSynthesisResults().
|
overrideprivatevirtual |
Sets the output values and status following analysis.
Implements TRANSLINE_CALCULATION_BASE.
Definition at line 81 of file common/transline_calculations/microstrip.cpp.
References ANG_L, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetAnalysisResult(), and Z0.
|
inlineinherited |
Sets the given calculation property.
Definition at line 118 of file transline_calculation_base.h.
References TRANSLINE_CALCULATION_BASE::m_parameters.
Referenced by COUPLED_STRIPLINE::Analyse(), STRIPLINE::Analyse(), COUPLED_MICROSTRIP::attenuation(), attenuation(), COUPLED_STRIPLINE::calcZ0EvenMode(), COUPLED_STRIPLINE::calcZ0OddMode(), COUPLED_STRIPLINE::calcZ0SymmetricStripline(), COUPLED_MICROSTRIP::compute_single_line(), dispersion(), C_MICROSTRIP::getProperties(), C_STRIPLINE::getProperties(), MICROSTRIP_UI::getProperties(), STRIPLINE_UI::getProperties(), line_angle(), microstrip_Z0(), TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D(), COUPLED_MICROSTRIP::syn_fun(), COUPLED_MICROSTRIP::synth_width(), COUPLED_MICROSTRIP::Synthesize(), COUPLED_STRIPLINE::Synthesize(), 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 COUPLED_STRIPLINE::SetSynthesisResults(), SetSynthesisResults(), and STRIPLINE::SetSynthesisResults().
|
overrideprivatevirtual |
Sets the output values and status following synthesis.
Implements TRANSLINE_CALCULATION_BASE.
Definition at line 106 of file common/transline_calculations/microstrip.cpp.
References ANG_L, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetSynthesisResult(), and Z0.
|
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 COUPLED_STRIPLINE::Analyse(), STRIPLINE::Analyse(), COUPLED_MICROSTRIP::attenuation(), and attenuation().
|
overridevirtual |
Synthesis track geometry parameters to match given Z0.
Implements TRANSLINE_CALCULATION_BASE.
Definition at line 51 of file common/transline_calculations/microstrip.cpp.
References Analyse(), TRANSLINE_CALCULATIONS::C0, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D(), mur_eff, TRANSLINE_CALCULATION_BASE::SetParameter(), and SynthesizeWidth().
Referenced by MICROSTRIP_UI::calcSynthesize().
|
private |
Calculates the width with the current set of parameters.
Definition at line 131 of file common/transline_calculations/microstrip.cpp.
References TRANSLINE_CALCULATION_BASE::GetParameter(), and TRANSLINE_CALCULATIONS::ZF0.
Referenced by Synthesize().
|
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(), COUPLED_STRIPLINE::calcDielectrics(), dispersion(), and COUPLED_MICROSTRIP::er_eff_freq().
|
staticprivate |
Calculates the dispersion correction factor for the characteristic impedance static.
Definition at line 162 of file common/transline_calculations/microstrip.cpp.
Referenced by dispersion().
|
staticprivate |
Calculates the impedance for a stripline in a homogeneous medium, without cover effects.
Definition at line 189 of file common/transline_calculations/microstrip.cpp.
References TRANSLINE_CALCULATIONS::ZF0.
Referenced by microstrip_Z0().
|
friend |
Definition at line 44 of file common/transline_calculations/microstrip.h.
|
private |
Static effective dielectric constant.
Definition at line 111 of file common/transline_calculations/microstrip.h.
Referenced by conductor_losses(), dielectric_losses(), dispersion(), COUPLED_MICROSTRIP::er_eff_static(), microstrip_Z0(), COUPLED_MICROSTRIP::Z0_dispersion(), and COUPLED_MICROSTRIP::Z0_even_odd().
|
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().
|
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 |
Effective mag. permeability.
Definition at line 112 of file common/transline_calculations/microstrip.h.
Referenced by line_angle(), mur_eff_ms(), and Synthesize().
|
private |
Effective width of line.
Definition at line 113 of file common/transline_calculations/microstrip.h.
Referenced by microstrip_Z0().
|
private |
static characteristic impedance
Definition at line 110 of file common/transline_calculations/microstrip.h.
Referenced by dispersion(), microstrip_Z0(), and COUPLED_MICROSTRIP::Z0_even_odd().
|
private |
homogeneous stripline impedance
Definition at line 114 of file common/transline_calculations/microstrip.h.
Referenced by conductor_losses(), and microstrip_Z0().