Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

invfreqs (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the modeling and prediction class.

Syntax

[b, a] = invfreqs(h, w, nb, na)

[b, a] = invfreqs(h, w, nb, na, wf)

[b, a] = invfreqs(h, w, nb, na, wf, maxiter)

[b, a] = invfreqs(h, w, nb, na, wf, maxiter, tol)

[b, a] = invfreqs(h, w, nb, na, wf, maxiter, tol, 'trace')

[b, a] = invfreqs(h, w, 'complex', nb, na)

[b, a] = invfreqs(h, w, 'complex', nb, na, wf)

[b, a] = invfreqs(h, w, 'complex', nb, na, wf, maxiter)

[b, a] = invfreqs(h, w, 'complex', nb, na, wf, maxiter, tol)

[b, a] = invfreqs(h, w, 'complex', nb, na, wf, maxiter, tol, 'trace')

Description

Computes an analog filter where the least squared fits to the frequency response data. If you do not specify maxiter, tol, and 'trace', invfreqs computes the filter that minimizes sum|b-h*a|^2*wf. Otherwise, invfreqs uses the Gauss-Newton method to compute the filter that minimizes sum|b/a-h|^2*wf.

Examples

Inputs

Name Description
h Specifies the desired complex frequency response.
w Specifies the normalized frequency points in radians/sample. If you do not specify 'complex', invfreqs computes a filter with real coefficients. All elements of w must be positive. length(w) must equal length(h).
'complex' Computes a filter with complex coefficients.
nb Specifies the order of the numerator.
na Specifies the order of the denominator.
wf Specifies the weight at each frequency point. wf can be an empty array or an array of the same length as h. All elements in wf must be larger than 0. The default is ones(1, length(h)). length(wf) must equal length(w).
maxiter Specifies the maximum number of iterations in the Gauss-Newton method. The default is 30.
tol Specifies the tolerance of the norm of gradient. The default is 0.01.
'trace' Generates a textual progress report of each iteration.

Outputs

Name Description
b Returns the numerator coefficients.
a Returns the denominator coefficients. The first element of a is 1.

Examples

w = 0:0.1:pi;
l = length(w);
g = ones(1, l);
g(1:l/2) = 0;
na = 2;
nb = 2;
wf =ones(1, l);
maxiter = 20;
tol = 1e-5;
[b, a] = invfreqs(g, w, nb, na, wf, maxiter, tol, 'trace')

Related Topics

freqs
freqz
invfreqz


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit