0% found this document useful (0 votes)
4 views

week-11-12

Uploaded by

Owen Francis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

week-11-12

Uploaded by

Owen Francis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

WEEK (11-12)

7. NUMERICAL DIFFERENTIATION

Intended Learning Outcomes:


At the end of this lesson, you should be able to:
1. Choose the most proper scheme among FDD, BDD, and CDD based on order of accuracy and data
availability
2. Find numerical values of the first derivatives of functions that are given at discrete data points.

DISCUSSIONS
Finding the numerical value of a function's derivative at a given location is known as numerical
differentiation. Numerical integration is generally easier than numerical differentiation. This is so because
numerical differentiation requires more complex features but numerical integration merely needs adequate
continuous qualities of the function being integrated.

7.1 FINITE DIFFERENCE METHODS – FORWARD, BACKWARD AND CENTRAL


DIFFERENCE
EXAMPLE:
7.2 DERIVATIVES FOR NOISY DATA
Computing derivatives of noisy measurement data is ubiquitous in the physical, engineering, and
biological sciences, and it is often a critical step in developing dynamic models or designing control.
Unfortunately, the mathematical formulation of numerical differentiation is typically ill-posed, and
researchers often resort to an ad hoc process for choosing one of many computational methods and its
parameters.
Derivatives describe many meaningful characteristics of physical and biological systems, including
spatial gradients and time rates-of change. However, these critical quantities are often not directly
measurable by sensors. Although computing derivatives of analytic equations is straightforward, estimating
derivatives from real sensor data remains a significant challenge because sensor data is invariably corrupted
by noise. More accurate estimation of derivatives would improve our ability to produce robust diagnostics,
formulate accurate forecasts, build dynamic or statistical models, implement control protocols, and inform
policy making. There exists a large and diverse set of mathematical tools for estimating derivatives of noisy
data, most of which are formulated as an ill-posed problem regularized by some appropriate smoothing
constraints. However, the level and type of regularization are typically imposed in an ad hoc fashion, so that
there is currently no consensus “best-method” for producing “best-fit” derivatives.
Here we will assume η is zero-mean Gaussian noise with unknown variance. Even with noise
of moderate amplitude, a naïve application produces derivative estimates that are far too noisy to be useful
(Fig. 1). Thus, more sophisticated methods for data smoothing and/or differentiation of noisy time series
measurements of position y are required.

A Simple Nonsmooth Example

Let 𝑓0(𝑥)=|𝑥−1/2|, defined at 100 evenly spaced points in [0,1]. We obtain 𝑓 by


adding Gaussian noise of standard deviation 0.05. Figure 1 shows the resulting 𝑓.
First, we show in Figure 2 the result of computing 𝑓’ by simple centered differencing.
The noise has been greatly amplified, so much that denoising the result is hopeless.
Figure 1.

Figure 2.
Figure 3.

Figure 4
7.3 LABORATORY

MATLAB CODE:

CODE 1

CODE 2
RESULT OF THE CODE:

R1:

R2:

EXERCISES:

You might also like