pydsm.NTFdesign.weighting.ntf_fir_weighting

pydsm.NTFdesign.weighting.ntf_fir_weighting(order, w, H_inf=1.5, normalize='auto', **options)

Synthesize FIR NTF based on a noise weighting function or a filter.

The ΔΣ modulator NTF is designed after a noise weigthing function stating how expensive noise is at the various frequencies.

Parameters:

order : int

Delta sigma modulator order

w : callable with argument f in [0,1/2] or tuple

  • if function: noise weighting function
  • if filter definition as zpk or ba tuple: weighting is implicitly provided by the filter

H_inf : real, optional

Max peak NTF gain, defaults to 1.5, used to enforce the Lee criterion

normalize : string or real, optional

Normalization to apply to the quadratic form used in the NTF selection. Defaults to ‘auto’ which means setting the top left entry in the matrix Q defining the quadratic form to 1.

Returns:

ntf : ndarray

FIR NTF in zpk form

Other Parameters:
 

show_progress : bool, optional

provide extended output.

fix_pos : bool, optional

fix quadratic form for positive definiteness. Numerical noise may make it not positive definite leading to errors.

modeler : string, optional

modeling backend for the optimization problem. Currently, the cvxpy_old, cvxpy and picos backends are supported. Default is cvxpy_old.

cvxpy_opts : dictionary, optional

A dictionary of options to use with the cvxpy modeling library. Allowed options include:

override_kktsolver (bool)

Whether to override the default cvxopt kkt solver using the chol kkt solver. Leave this at the default True setting, to avoid paying a performance price.

solver (string)

The solver backend to use. Either cvxopt or scs

cvxopt_opts : dict, optional

A dictionary of options for the cvxopt optimizer. Allowed options include:

maxiters (int)

Maximum number of iterations

abstol (real)

Absolute accuracy

reltol (real)

Relative accuracy

feastol (real)

Tolerance for feasibility conditions (defaults to 1e-6)

Do not use other options since they could break cvxopt in unexpected ways. These options can be passed when using the cvxpy_old modeler, the picos modeler or the cvxpy modeler with the cvxopt backend.

scs_opts : dict, optional

A dictionary of options for the scs optimizer. Allowed options include:

max_iters (int)

Maximum number of iterations

eps (real)

Convergence tolerance

alpha (real)

Relaxation parameter

normalize (bool)

Whether to precondition data matrices

use_indirect (bool)

Whether to use indirect solver for KKT sytem (instead of direct)

Do not use other options since they could break scs in unexpected ways. These options can be passed when using the cvxpy modeler with the scs backend.

quad_opts : dictionary, optional

Parameters to be passed to the quad function used internally as an integrator. Allowed options are epsabs, epsrel, limit, points. Do not use other options since they could break the integrator in unexpected ways.

See also

scipy.integrate.quad
for the meaning of the integrator parameters
cvxopt
for the optimizer parameters
scs
for the optimizer parameters
cvxpy
for the modeler parameters

Notes

Default values for the options not directly documented in the function call signature can be checked and updated by changing the function default_options attribute.

The internal operation of this function is described in [R4].

[R4]Sergio Callegari, Federico Bizzarri “Noise Weighting in the Design of ΔΣ Modulators (with a Psychoacoustic Coder as an Example),” IEEE Transactions on Circuits and Systems - Part II: Express Briefs, Vol. 60, N. 11, pp. 756-760. Nov. 2013. DOI: 10.1109/TCSII.2013.2281892. Pre-print available on arXiv.