340 likes | 371 Views
Explore various applications of digital filters including least-square polynomial fitting, frequency analysis, quadratics, derivatives, missing data interpolation, and filter design methods with examples and principles.
E N D
Some basic Applications of Digital filters : • Least-square fitting of polynomials Given M data points (tm, um), m=1,2,…,M wish to fit (approximate) these data, in some sense, by a polynomial u=u(t) of degree N where M≧N+1 Principle of least square : the sum of the squares of the residuals is the least
Ex: consider a set of 5 equally spaced data points. tm=m for m=-2, -1, 0, 1, 2 um unspecified fit the above data by a straight line u=A+Bt in least-square sense.
From the frequency point of view : S’pose the input function is one of the eigenfunctions in the complex form eiwt of frequency w. Since the system is linear, the same function will emerge at the output except that it is multiplied by its eigenvalue H(w).
: transfer function In general :
the more terms used , the more rapid are the wiggles of H(w), and the more the envelope of the wiggles is squeezed toward the frequency axis.
Least-squares Quadratics and Quartics Instead of a straight line, fit by a quardratic (or a cubic) u(t)=A+Bt+Ct2
The effect of the higher-degree polynomial is a higher degree of tangency at w=0 • The use of more terms in the smoothing formula makes the curve come down sooner.
Modified least squares : Smoothing Window for 2N+1 points modified Smoothing Windows for 2N+1 points : reduce the two end values to one-half their assigned values
The curve will come down more rapidly • The main lobe is slightly wider. ★ the end constants can be chosen as a parameter
Differences and Derivatives The difference operator the operator annihilates a polynomial Pn(x) of degree n in X; that is
Since , so the amplification at frequency w is contained in the factor ; △decreases the amplitude of any frequency ; there is an amplification
Differences are also used to approximate derivatives. • Central difference formula from the formula (with h=1)
The ratio of the calculated to the true answer (which is iw) is : w=0, R=1 w0, |R|<1 the formula underestimates the value of the derivatives for all other freqs. For the 2nd derivate :
Spencer’s smoothing formula: 15-point: 21-point: not informative
plot the logs of the numbers |H(w)| 20 log|ratio| = decibel units (dB) 20 dB = factor of 10
Missing Data and Interpolation : The reasons or situations for the occurrence of “missing data” in a long record of data : • the measurements may never have been made; they may have been misrecorded and thus later removed • the formula used to compute successive values of the function may have involved an indeterminate form, such as at x=0, and the computer refused to divide by zero.
Usually, an interpolation formula based on the assumption that the data locally is a polynomial of some odd degree. This is equivalent to the assumption that the next higher-order difference is zero.
For instance, k=4 note: the sum of the sequences of the binomial coeffs. of order N is . Hence for the 2k th difference formula, the noise amplification is
If set then
H(0)=1 However, for high freqs, the value is not too good, particularly for very high freqs. • Negative values on the graph of the transfer function imply a change in sign. The above figure points out the damager of interpolating a missing value when the data is noisy, which means that the data has numerous high frequencies.
Interpolation midpoint values : linear interpolation gives if 4 adjacent points are used
A Class of Nonre cursive Smoothing Filters Design of filters : H(0)=1 exact at dc(lowest freq.) H()=0 no highest freq. get through L.P.
Since H()=0 the factor [cos w+1] had to occur Now one can select a filter that approximately meets the requirement.
for Ex.1, if we require Ex.2 if we set
Ex. 3. S’pose that we try to do as well as possible in the neighborhood of zero freq.
Integration : Recursive Filters Trapezoid Rule (using y0=0)
Simpson’s Rule : w=0 , R=1 and has a tangency through the 3rd derivative
Simpson’s formula amplifies the upper part of Nyquist interval (the higher frequencies) where as the trapezoid rule damps them out. • In the presence of noise. Simpson’s formula is more dangerous to use than are the trapezoid or midpoint formulas. But when there is relatively little high freq. In the function being integrated, then the flatness of Simpson’s formula for low freqs. show why it is superior.