KiCad PCB EDA Suite
Loading...
Searching...
No Matches
MICROSTRIP Class Reference

#include <microstrip.h>

Inheritance diagram for MICROSTRIP:
TRANSLINE_CALCULATION_BASE

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
 

Detailed Description

Definition at line 31 of file common/transline_calculations/microstrip.h.

Member Typedef Documentation

◆ TCP

Constructor & Destructor Documentation

◆ MICROSTRIP()

MICROSTRIP::MICROSTRIP ( )
inline

Definition at line 36 of file common/transline_calculations/microstrip.h.

Member Function Documentation

◆ Analyse()

void MICROSTRIP::Analyse ( )
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().

◆ attenuation()

void MICROSTRIP::attenuation ( )
private

◆ conductor_losses()

double MICROSTRIP::conductor_losses ( ) const
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().

◆ coth()

static double TRANSLINE_CALCULATION_BASE::coth ( const double  x)
inlinestaticprotectedinherited

Calculates cosh of the given argument.

Definition at line 211 of file transline_calculation_base.h.

Referenced by COUPLED_STRIPLINE::calcZeroThicknessCoupledImpedances().

◆ delta_q_cover()

double MICROSTRIP::delta_q_cover ( double  h2h)
staticprivate

Calculates the cover effect on filling factor.

Definition at line 216 of file common/transline_calculations/microstrip.cpp.

Referenced by microstrip_Z0().

◆ delta_q_thickness()

double MICROSTRIP::delta_q_thickness ( double  u,
double  t_h 
)
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().

◆ delta_u_thickness()

double MICROSTRIP::delta_u_thickness ( double  u,
double  t_h,
double  e_r 
)
staticprivate

Calculates the thickness effect on normalized width.

Definition at line 234 of file common/transline_calculations/microstrip.cpp.

Referenced by microstrip_Z0().

◆ delta_Z0_cover()

double MICROSTRIP::delta_Z0_cover ( double  u,
double  h2h 
)
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().

◆ dielectric_losses()

double MICROSTRIP::dielectric_losses ( ) const
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().

◆ dispersion()

void MICROSTRIP::dispersion ( )
private

◆ e_r_dispersion()

double MICROSTRIP::e_r_dispersion ( double  u,
double  e_r,
double  f_n 
)
staticprivate

Calculates the dispersion correction factor for the effective permeability.

Definition at line 253 of file common/transline_calculations/microstrip.cpp.

Referenced by dispersion().

◆ e_r_effective()

double MICROSTRIP::e_r_effective ( double  e_r,
double  q 
)
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().

◆ EllipticIntegral()

std::pair< double, double > TRANSLINE_CALCULATION_BASE::EllipticIntegral ( double  arg)
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.

Returns
std::pair<K, E> where K = first kind integral, E = second kind integral

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().

◆ filling_factor()

double MICROSTRIP::filling_factor ( double  u,
double  e_r 
)
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().

◆ GetAnalysisResults()

std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > & TRANSLINE_CALCULATION_BASE::GetAnalysisResults ( )
inherited

◆ GetParameter()

◆ GetParameterRef()

double & TRANSLINE_CALCULATION_BASE::GetParameterRef ( const TRANSLINE_PARAMETERS  aParam)
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().

◆ GetSynthesisResults()

std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > & TRANSLINE_CALCULATION_BASE::GetSynthesisResults ( )
inherited

◆ InitProperties()

void TRANSLINE_CALCULATION_BASE::InitProperties ( const std::initializer_list< TRANSLINE_PARAMETERS > &  aParams)
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().

◆ line_angle()

void MICROSTRIP::line_angle ( )
private

◆ microstrip_Z0()

◆ MinimiseZ0Error1D()

bool TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D ( TRANSLINE_PARAMETERS  aOptimise,
TRANSLINE_PARAMETERS  aMeasure 
)
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

Parameters
aOptimiseParameter to optimise
aMeasureThe parameter to measure / optimise against
Returns
true if error < MAX_ERROR, otherwise false

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().

◆ MinimiseZ0Error2D()

bool TRANSLINE_CALCULATION_BASE::MinimiseZ0Error2D ( TRANSLINE_PARAMETERS  aParam1,
TRANSLINE_PARAMETERS  aParam2 
)
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

Parameters
aParam1First parameter to optimise
aParam2Secpmd parameter to optimise
Returns
true if error < MAX_ERROR, otherwise false

◆ mur_eff_ms()

void MICROSTRIP::mur_eff_ms ( )
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().

◆ sech()

static double TRANSLINE_CALCULATION_BASE::sech ( const double  x)
inlinestaticprotectedinherited

Calculates sech of the given argument.

Definition at line 214 of file transline_calculation_base.h.

Referenced by COUPLED_STRIPLINE::calcSingleStripImpedances().

◆ SetAnalysisResult()

void TRANSLINE_CALCULATION_BASE::SetAnalysisResult ( TRANSLINE_PARAMETERS  aParam,
const double  aValue,
const TRANSLINE_STATUS  aStatus = TRANSLINE_STATUS::OK 
)
protectedinherited

◆ SetAnalysisResults()

void MICROSTRIP::SetAnalysisResults ( )
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.

◆ SetParameter()

◆ SetSynthesisResult()

void TRANSLINE_CALCULATION_BASE::SetSynthesisResult ( TRANSLINE_PARAMETERS  aParam,
const double  aValue,
const TRANSLINE_STATUS  aStatus = TRANSLINE_STATUS::OK 
)
protectedinherited

◆ SetSynthesisResults()

void MICROSTRIP::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.

◆ SkinDepth()

double TRANSLINE_CALCULATION_BASE::SkinDepth ( ) const
protectedinherited

◆ Synthesize()

◆ SynthesizeWidth()

double MICROSTRIP::SynthesizeWidth ( ) const
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().

◆ UnitPropagationDelay()

double TRANSLINE_CALCULATION_BASE::UnitPropagationDelay ( double  aEpsilonEff)
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().

◆ Z0_dispersion()

double MICROSTRIP::Z0_dispersion ( double  u,
double  e_r,
double  e_r_eff_0,
double  e_r_eff_f,
double  f_n 
)
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().

◆ Z0_homogeneous()

double MICROSTRIP::Z0_homogeneous ( double  u)
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().

Friends And Related Function Documentation

◆ COUPLED_MICROSTRIP

friend class COUPLED_MICROSTRIP
friend

Definition at line 44 of file common/transline_calculations/microstrip.h.

Member Data Documentation

◆ er_eff_0

double MICROSTRIP::er_eff_0 { 0.0 }
private

◆ m_analysisStatus

std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS> > TRANSLINE_CALCULATION_BASE::m_analysisStatus
protectedinherited

◆ m_maxError

constexpr double TRANSLINE_CALCULATION_BASE::m_maxError { 0.000001 }
staticconstexprprotectedinherited

The maximum error for Z0 optimisations.

Definition at line 226 of file transline_calculation_base.h.

Referenced by TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D().

◆ m_parameters

std::unordered_map<TRANSLINE_PARAMETERS, double> TRANSLINE_CALCULATION_BASE::m_parameters
protectedinherited

◆ m_synthesisStatus

std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS> > TRANSLINE_CALCULATION_BASE::m_synthesisStatus
protectedinherited

◆ mur_eff

double MICROSTRIP::mur_eff { 0.0 }
private

Effective mag. permeability.

Definition at line 112 of file common/transline_calculations/microstrip.h.

Referenced by line_angle(), mur_eff_ms(), and Synthesize().

◆ w_eff

double MICROSTRIP::w_eff { 0.0 }
private

Effective width of line.

Definition at line 113 of file common/transline_calculations/microstrip.h.

Referenced by microstrip_Z0().

◆ Z0_0

double MICROSTRIP::Z0_0 { 0.0 }
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().

◆ Z0_h_1

double MICROSTRIP::Z0_h_1 { 0.0 }
private

homogeneous stripline impedance

Definition at line 114 of file common/transline_calculations/microstrip.h.

Referenced by conductor_losses(), and microstrip_Z0().


The documentation for this class was generated from the following files: