Chapter 8: Problem 45
Numerical differentiation of noisy signals. The purpose of this exercise is to look into numerical differentiation of time series signals that contain measurement errors. This insight might be helpful when analyzing the noise in real data from a laboratory experiment in Exercises \(8.44\) and \(8.46\). 1\. Compute a signal $$ \bar{\eta}_{i}=A \sin \left(\frac{2 \pi}{T} t_{i}\right), \quad t_{i}=i \frac{T}{40}, i=0, \ldots, 200 $$ Display \(\bar{\eta}_{i}\) versus time \(t_{i}\) in a plot. Choose \(A=1\) and \(T=2 \pi\). Store the \(\bar{\eta}\) values in an array etabar. 2\. Compute a signal with random noise \(E_{i}\), $$ \eta_{i}=\bar{\eta}_{i}+E_{i} $$ \(E_{i}\) is drawn from the normal distribution with mean zero and standard deviation \(\sigma=0.04 A\). Plot this \(\eta_{i}\) signal as circles in the same plot as \(\eta_{i}\). Store the \(E_{i}\) in an array E for later use. 3\. Compute the first derivative of \(\bar{\eta}_{i}\) by the formula $$ \frac{\bar{\eta}_{i+1}-\bar{\eta}_{i-1}}{2 h}, \quad i=1, \ldots, n-1 $$ and store the values in an array detabar. Display the graph. 4\. Compute the first derivative of the error term by the formula, $$ \frac{E_{i+1}-E_{i-1}}{2 h}, \quad i=1, \ldots, n-1 $$ and store the values in an array \(d E .\) Calculate the mean and the standard deviation of \(\mathrm{dE}\). 5\. Plot detabar and detabar \(+\mathrm{dE}\). Use the result of the standard deviation calculations to explain the qualitative features of the graphs. 6\. The second derivative of a time signal \(\eta_{i}\) can be computed by $$ \frac{\eta_{i+1}-2 \eta_{i}+\eta i-1}{h^{2}}, \quad i=1, \ldots, n-1 $$ Use this formula on the etabar data and save the result in d2etabar. Also apply the formula to the E data and save the result in \(\mathrm{d} 2 \mathrm{E}\). Plot d2etabar and d2etabar + d2E. Compute the standard deviation of d2E and compare with the standard deviation of \(\mathrm{dE}\) and \(\mathrm{E} .\) Discuss the plot in light of these standard deviations. Name of program file: sine_noise.py. 0
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.