Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMLab 1 Some basic Applications of Digital filters : Least-square fitting of polynomials Given M data points (t m, u m ), m=1,2,…,M wish to fit (approximate)

Similar presentations


Presentation on theme: "CMLab 1 Some basic Applications of Digital filters : Least-square fitting of polynomials Given M data points (t m, u m ), m=1,2,…,M wish to fit (approximate)"— Presentation transcript:

1 CMLab 1 Some basic Applications of Digital filters : Least-square fitting of polynomials Given M data points (t m, u m ), 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

2 CMLab 2 Ex: consider a set of 5 equally spaced data points. t m =m for m=-2, -1, 0, 1, 2 u m unspecified fit the above data by a straight line u=A+Bt in least-square sense.

3 CMLab 3 From the frequency point of view : S’pose the input function is one of the eigenfunctions in the complex form e iwt 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).

4 CMLab 4 In general : : transfer function

5 CMLab 5 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.

6 CMLab 6 Least-squares Quadratics and Quartics Instead of a straight line, fit by a quardratic (or a cubic) u(t)=A+Bt+Ct 2

7 CMLab 7 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.

8 CMLab 8 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

9 CMLab 9 The curve will come down more rapidly The main lobe is slightly wider. ★ the end constants can be chosen as a parameter

10 CMLab 10 Differences and Derivatives The difference operator the operator annihilates a polynomial P n (x) of degree n in X; that is

11 CMLab 11 from frequency point of view :

12 CMLab 12 Since, so the amplification at frequency w is contained in the factor ; △ decreases the amplitude of any frequency ; there is an amplification

13 CMLab 13 high-pass behavior of the difference operator Δ k

14 CMLab 14 Differences are also used to approximate derivatives. Central difference formula from the formula (with h=1)

15 CMLab 15 The ratio of the calculated to the true answer (which is iw) is : w=0, R=1 w  0, |R|<1  the formula underestimates the value of the derivatives for all other freqs. For the 2 nd derivate :

16 CMLab 16 Spencer’s smoothing formula: 15-point: 21-point: not informative

17 CMLab 17 plot the logs of the numbers |H(w)| 20 log|ratio| = decibel units (dB) 20 dB = factor of 10

18 CMLab 18 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.

19 CMLab 19 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.

20 CMLab 20 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

21 CMLab 21 If set then

22 CMLab 22 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.

23 CMLab 23 Interpolation midpoint values : linear interpolation gives if 4 adjacent points are used

24 CMLab 24 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.

25 CMLab 25 Since H(  )=0 the factor [cos w+1] had to occur Now one can select a filter that approximately meets the requirement.

26 CMLab 26 for Ex.1, if we require Ex.2 if we set

27 CMLab 27 Ex. 3. S’pose that we try to do as well as possible in the neighborhood of zero freq.

28 CMLab 28 Ex: we pick our filter form as

29 CMLab 29 Integration : Recursive Filters Trapezoid Rule (using y 0 =0)

30 CMLab 30 The true answer for integration of is

31 CMLab 31 Simpson’s Rule : w=0, R=1 and has a tangency through the 3 rd derivative

32 CMLab 32 Midpoint integration formula (using y 0 =0)

33 CMLab 33 Leo Tick Formula

34 CMLab 34 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.


Download ppt "CMLab 1 Some basic Applications of Digital filters : Least-square fitting of polynomials Given M data points (t m, u m ), m=1,2,…,M wish to fit (approximate)"

Similar presentations


Ads by Google