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

#include <stripline.h>

Inheritance diagram for STRIPLINE:
TRANSLINE_CALCULATION_BASE

Public Member Functions

 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 lineImpedance (double aHeight, double &aAc) const
 Calculate characteristic impedance and conductor loss (in db/meter)
 

Private Attributes

double unit_prop_delay
 

Detailed Description

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

Member Typedef Documentation

◆ TCP

Constructor & Destructor Documentation

◆ STRIPLINE()

STRIPLINE::STRIPLINE ( )
inline

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

Member Function Documentation

◆ Analyse()

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

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

◆ GetAnalysisResults()

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

◆ GetParameter()

double TRANSLINE_CALCULATION_BASE::GetParameter ( const TRANSLINE_PARAMETERS  aParam) const
inlineinherited

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

◆ lineImpedance()

double STRIPLINE::lineImpedance ( double  aHeight,
double &  aAc 
) const
private

Calculate characteristic impedance and conductor loss (in db/meter)

Definition at line 130 of file common/transline_calculations/stripline.cpp.

References TRANSLINE_CALCULATION_BASE::GetParameter(), and TRANSLINE_CALCULATIONS::ZF0.

Referenced by Analyse().

◆ 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(), MICROSTRIP::Synthesize(), and 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

◆ 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 STRIPLINE::SetAnalysisResults ( )
overrideprivatevirtual

Sets the output values and status following analysis.

Implements TRANSLINE_CALCULATION_BASE.

Definition at line 61 of file common/transline_calculations/stripline.cpp.

References ANG_L, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetAnalysisResult(), unit_prop_delay, 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 STRIPLINE::SetSynthesisResults ( )
overrideprivatevirtual

Sets the output values and status following synthesis.

Implements TRANSLINE_CALCULATION_BASE.

Definition at line 96 of file common/transline_calculations/stripline.cpp.

References ANG_L, TRANSLINE_CALCULATION_BASE::GetParameter(), TRANSLINE_CALCULATION_BASE::SetSynthesisResult(), unit_prop_delay, and Z0.

◆ SkinDepth()

double TRANSLINE_CALCULATION_BASE::SkinDepth ( ) const
protectedinherited

◆ Synthesize()

bool STRIPLINE::Synthesize ( SYNTHESIZE_OPTS  aOpts)
overridevirtual

Synthesis track geometry parameters to match given Z0.

Implements TRANSLINE_CALCULATION_BASE.

Definition at line 55 of file common/transline_calculations/stripline.cpp.

References TRANSLINE_CALCULATION_BASE::MinimiseZ0Error1D().

Referenced by STRIPLINE_UI::calcSynthesize().

◆ 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 Analyse(), COUPLED_STRIPLINE::calcDielectrics(), MICROSTRIP::dispersion(), and COUPLED_MICROSTRIP::er_eff_freq().

Member Data Documentation

◆ 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

◆ unit_prop_delay

double STRIPLINE::unit_prop_delay
private

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