RT-WDF  0.0.1
Real-time Wave Digital Filter Framework
wdfUnterminatedInd Class Reference

#include <rt-wdf.h>

Inheritance diagram for wdfUnterminatedInd:

Public Member Functions

 wdfUnterminatedInd (double L, double T)
 
virtual void calculateDownB (vec *ascendingWaves, vec *descendingWaves, size_t *portIndex)
 
void setPortResistance (double Rp)
 
virtual std::string getType () const
 
int getNumPorts ()
 

Public Attributes

double L
 

Protected Attributes

double T
 
double prevA
 
double prevB
 
double reflectionCoeff
 
double Rp
 
size_t numPorts
 

Constructor & Destructor Documentation

§ wdfUnterminatedInd()

wdfUnterminatedInd::wdfUnterminatedInd ( double  L,
double  T 
)

Unadapted inductor model class.

Creates an unadapted inductor with capacitance L.

Parameters
Lphysical inductance of the component in Henry
Tsample period T = 1/fs in seconds

Member Function Documentation

§ calculateDownB()

void wdfUnterminatedInd::calculateDownB ( vec *  ascendingWaves,
vec *  descendingWaves,
size_t *  portIndex 
)
virtual

Calculates the reflection of the incoming, ascending wave.

This is composed of the recent ascending wave component and former components on this port.

Parameters
*ascendingWavesPointer to a vector of ascending waves
*descendingWavesPointer to a vector to store descending waves
*portIndexPointer to a counter with the port index to use in the vectors of ascending and descending waves. Needs to be incremented by numPorts in the node's implementation.

Implements wdfRootNode.

§ getNumPorts()

int wdfRootNode::getNumPorts ( )
inherited

Return the number of ports of that root node.

Returns
the value of the numPorts member.

§ getType()

std::string wdfUnterminatedInd::getType ( ) const
virtual

Returns a String describing the type of this root node.

Returns
a String describing the type of this leaf as "L (unadapted)"

Implements wdfRootNode.

§ setPortResistance()

void wdfUnterminatedInd::setPortResistance ( double  Rp)
virtual

Sets the nodes port resistance according to the port it is connected to.

TODO: In the case of the unadapted inductor, it also pre-calculates the reflection coefficient reflectionCoeff, which depends on the port resistance too.

Parameters
Rpport resistance in Ohm

Reimplemented from wdfRootNode.

Member Data Documentation

§ L

double wdfUnterminatedInd::L

Inductance in Henry

§ numPorts

size_t wdfRootNode::numPorts
protectedinherited

The number of ports on a root node element.

§ prevA

double wdfUnterminatedInd::prevA
protected

Place to store the previous incident wave component.

§ prevB

double wdfUnterminatedInd::prevB
protected

Place to store the previous reflected wave component.

§ reflectionCoeff

double wdfUnterminatedInd::reflectionCoeff
protected

Reflection coefficient, depending on the inherited port resistance, component value and sample rate.

This coefficient is pre-calculated in the setPortResistance function.

§ Rp

double wdfRootNode::Rp
protectedinherited

The WDF port resistance in Ohm.

§ T

double wdfUnterminatedInd::T
protected

Sample period in seconds


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