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

#include <rt-wdf_nlSolvers.h>

Inheritance diagram for nlNewtonSolver:

Public Member Functions

 nlNewtonSolver (std::vector< int > nlList, matData *myMatData)
 
 ~nlNewtonSolver ()
 
void nlSolve (vec *inWaves, vec *outWaves)
 
void evalNlModels (vec *inWaves, matData *myMatData, vec *x)
 
int getNumPorts ()
 

Public Attributes

std::vector< nlModel * > nlModels
 
int numNLPorts
 

Protected Attributes

matDatamyMatData
 
vec * x0
 
vec * fNL
 
mat * JNL
 
vec * F
 
mat * J
 
vec * Fmat_fNL
 
bool firstRun = true
 

Constructor & Destructor Documentation

§ nlNewtonSolver()

nlNewtonSolver::nlNewtonSolver ( std::vector< int >  nlList,
matData myMatData 
)

Multi-dimensional Newton Solver class.

Newton solver as introduced by Michael Jorgen Olsen: ("Resolving grouped nonlinearities in wave digital filters using iterative techniques"), DAFx-16

Creates a newton solver and it's nonlinearities

Parameters
nlListis a vector of enums that specify the types of nonlinearities
*myMatDatais a pointer to the E,F,M,N (and S) matrices

§ ~nlNewtonSolver()

nlNewtonSolver::~nlNewtonSolver ( )

Deconstructor.

Member Function Documentation

§ evalNlModels()

void nlNewtonSolver::evalNlModels ( vec *  inWaves,
matData myMatData,
vec *  x 
)

Evaluates all non-linear model members of a solver and sets J and F members properly.

It calculates J and F matrices based on both fNL, JNL as returned from nlModel.calculate(x,..) and Emat, Fmat from myMatData.

Parameters
*inWavesis a pointer to a vector of incoming waves
*myMatDatais a pointer to the E,F,M,N matrices
*xis a pointer to the input values x

§ getNumPorts()

int nlSolver::getNumPorts ( )
inherited

Function which returns the number of ports on an NL model for memory house- keeping

Returns
the total number of non-linear ports which are present at the root.

§ nlSolve()

void nlNewtonSolver::nlSolve ( vec *  inWaves,
vec *  outWaves 
)
virtual

Solver function that processes a vector of incoming waves and returns a vector of outgoing waves according to the specified nonlinearities.

The actual solver operates on J and F matrices which are calculated by evalNlModels based on fNL, JNL, Emat and Fmat.

The result outWaves is calculated based on inWaves, x, Nmat, Mmat.

Parameters
inWavesis a pointer to a vector of incoming waves
outWavesis a pointer to a vector of outgoing waves

Implements nlSolver.

Member Data Documentation

§ F

vec* nlNewtonSolver::F
protected

F vector for newton method

§ firstRun

bool nlNewtonSolver::firstRun = true
protected

flag to detect first run of the solver for a clean first initial guess

§ Fmat_fNL

vec* nlNewtonSolver::Fmat_fNL
protected

variable to store Fmat * fNL for x0 next prediction

§ fNL

vec* nlNewtonSolver::fNL
protected

result of the NL equations

§ J

mat* nlNewtonSolver::J
protected

J matrix for the newton method

§ JNL

mat* nlNewtonSolver::JNL
protected

Jacobian of the NL equations

§ myMatData

matData* nlNewtonSolver::myMatData
protected

struct which holds all root NLSS matrices including variable conversion

§ nlModels

std::vector<nlModel*> nlSolver::nlModels
inherited

Vector of enums that specify the types on non-linearities in the solver

§ numNLPorts

int nlSolver::numNLPorts
inherited

Total number of non-linear ports which are present at the root.

§ x0

vec* nlNewtonSolver::x0
protected

latest guess to solve the NLSS system


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