Signal Processing Toolkit User Guide > Reference (G to P) > P_STAB Function (PV-WAVE Extreme Advantage)
  

P_STAB Function (PV-WAVE Extreme Advantage)
Stabilizes a filter polynomial by reflecting any roots that exist outside the unit circle to points within the unit circle.
Usage
result = P_STAB(c)
Input Parameters
c—An array of coefficients of a polynomial in positive powers of the independent variable, such as would be used in ZEROPOLY.
Returned Value
result—An array of polynomial coefficients of the transformed, stable polynomial.
Keywords
Information—If present and nonzero, information regarding the number of unstable roots in the polynomial is returned.
Scale—If present and nonzero, the output polynomial is scaled such that the first element is the same as the first element of the input polynomial.
Discussion
Given a polynomial whose roots lie either inside or outside of the unit circle, another polynomial is created whose roots are all inside the circle and is therefore stable. This is done by mirroring the outsiders into the circle. The transform results in a polynomial that is stable, but has the same magnitude response. The magnitude response is thus maintained, while the polynomial becomes stable.
 
note
P_STAB relies on root finding which can create problems if the input polynomial has repeated roots. P_STAB is also restricted by the accuracy of ZEROPOLY.
Example
In this example, a Butterworth filter is used since it is likely to have some of its zeros located on or just outside the unit circle, and therefore be marginally unstable. The Butterworth filter is converted to a stable filter, one with all its poles and zeros inside the unit circle, using the P_STAB function.
The results are shown in Figure 3-15: Frequency Response Plot of Stabilized Butterworth Flter on page 169. Note that the frequency response of the stabilized filter is identical to the original, default Butterworth filter created using IIRDESIGN.
; Create a Butterworth filter.
h = IIRDESIGN(8, 0.5, /Butter)
; Extract numerator and denominator polynomials from the filter.
PARSEFILT, h, name, num, den
; Stabilize the numerator and denominator polynomials.
new_num = P_STAB(num)
new_den = P_STAB(den)
; Scale the denominator so that a0 = 1.0.
new_den = new_den/new_den(0)
; Scale the denominator so that h1 = 1.0, which is the same thing
; as saying that the filter amplitude at zero frequency is unity.
new_num = TOTAL(new_den)/TOTAL(new_num)*new_num
; Make a new filter out of the new numerator and denominator
; polynomials.
newh = FILTSTR(new_num, new_den)
resp = FREQRESP_Z(newh, Outfreq = f)
; Plot the frequency response of this new filter just to show
; that it has the same characteristics as the original.
PLOT, f, ABS(resp)
 
Figure 3-15: Frequency Response Plot of Stabilized Butterworth Flter
 
See Also
ZEROPOLY
For Additional Information
Roberts and Mullis, 1987, p. 202.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.