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

#include <rt-wdf.h>

Inheritance diagram for wdfTerminatedInd:

Public Member Functions

 wdfTerminatedInd (double L, double T)
 
virtual double calculateUpRes (double T)
 
virtual double calculateUpB ()
 
virtual void calculateDownB (double descendingWave)
 
virtual std::string getType () const
 
virtual void calculateScatterCoeffs ()
 
void setParentInChildren ()
 
void createPorts ()
 
double adaptPorts (double T)
 
virtual double pullWaveUp ()
 
virtual void pushWaveDown (double descendingWave)
 

Public Attributes

double L
 
double T
 
double prevA
 
std::unique_ptr< wdfPortupPort
 
std::unique_ptr< wdfTreeNodeparentNode
 

Protected Attributes

std::vector< wdfPort * > downPorts
 
std::vector< wdfTreeNode * > childrenNodes
 

Constructor & Destructor Documentation

§ wdfTerminatedInd()

wdfTerminatedInd::wdfTerminatedInd ( double  L,
double  T 
)

Adapted inductor model class.

Creates an inductor with inductance L.

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

Member Function Documentation

§ adaptPorts()

double wdfTreeNode::adaptPorts ( double  T)
inherited

Recursively adapts all ports in the tree.

This recursion should be initiated from the base of the tree. It sets port resistances of all upfacing ports according to component values and/or adaptation rules and copies it onto connected downfacing ports in the parent.

Parameters
Tsample period as specified by setSamplerate()
Returns
a double type up-facing port resistance of that WDF element

§ calculateDownB()

void wdfTerminatedInd::calculateDownB ( double  descendingWave)
virtual

Sets the wave component in the downfacing port.

This function feeds a one sample delay with the incident wave to return it sign-flipped as the next reflected wave.

Parameters
descendingWaveincoming wave component on the upfacing port

Implements wdfTreeNode.

§ calculateScatterCoeffs()

void wdfTerminatedLeaf::calculateScatterCoeffs ( )
virtualinherited

This variant of the base classes' calculateScatterCoeffs() function is an empty function to break the recursion that only applies to adapters and stops here at the leafs.

Implements wdfTreeNode.

§ calculateUpB()

double wdfTerminatedInd::calculateUpB ( )
virtual

Returns the upfacing wave component towards the root.

This function is called from pullWave() to calculate the wave that travels towards the base.

It returns the sign-flipped incident wave delayed by one sample as the reflected wave.

Returns
the upward traveling wave of the node

Implements wdfTreeNode.

§ calculateUpRes()

double wdfTerminatedInd::calculateUpRes ( double  T)
virtual

Returns the inductors upfacing port resistance.

This function is called from adaptPorts(). It returns the upfacing port resistance of the node to fulfill termination according to the inverters adaptation law Rup = R = ( 2.0 * L ) / T.

Parameters
Tsample period T = 1/fs in seconds as needed to adapt the capacitor
Returns
a double type port resistance of that element in Ohms

Implements wdfTreeNode.

§ createPorts()

void wdfTreeNode::createPorts ( )
inherited

Recursively creates WDF ports in the tree.

This recursion should be initiated from the base of the tree. It creates downfacing ports for all children and an upfacing port in each child while setting the correct pointers to the nodes that these ports are connected to.

§ getType()

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

Returns a String describing the type of this leaf.

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

Implements wdfTreeNode.

§ pullWaveUp()

double wdfTreeNode::pullWaveUp ( )
virtualinherited

Recursively pulls the wave from the leafs towards the root.

This recursion should be initiated from the base of the tree. As all tree nodes are adapted, it basically just pulls up correctly scattered states of reactive elements and input values from adapted sources.

Returns
the upward traveling wave of a node

§ pushWaveDown()

void wdfTreeNode::pushWaveDown ( double  descendingWave)
virtualinherited

Recursively pushes the wave from the root towards the leafs.

This recursion should be initiated from the base of the tree. It pushes the respective wave component of a branch from the root to the leafs by scattering them correctly along the way.

Parameters
descendingWavedescending wave component that shall be scattered to the downfacing ports of the node or processed in a leaf accordingly

§ setParentInChildren()

void wdfTreeNode::setParentInChildren ( )
inherited

Recursively sets pointers to parent node in children.

This recursion should be initiated from the base of the tree. It sets a pointer to *this parent node in all connected children.

Member Data Documentation

§ childrenNodes

std::vector<wdfTreeNode*> wdfTreeNode::childrenNodes
protectedinherited

Vector of pointers to connected children nodes of this node.

§ downPorts

std::vector<wdfPort*> wdfTreeNode::downPorts
protectedinherited

Vector of pointers to downfacing port objects of this tree.

§ L

double wdfTerminatedInd::L

Inductance in Henry

§ parentNode

std::unique_ptr<wdfTreeNode> wdfTreeNode::parentNode
inherited

Pointer to the connected parent node of this node.

§ prevA

double wdfTerminatedInd::prevA

One sample delay element

§ T

double wdfTerminatedInd::T

Sample period in seconds

§ upPort

std::unique_ptr<wdfPort> wdfTreeNode::upPort
inherited

Pointer to the upfacing port object of this node.


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