Question: Please make code clear and easy to understand PART 1 One way to evaluate a 6 is to use the Newton Raphson method to find
Please make code clear and easy to understand
PART
One way to evaluate is to use the Newton Raphson method to find the zeros of the function
starting at Use this approach to find the sixth root of
NOTE: To obtain full points for this question, you must include all code with your answer. You should include in
your code i tests that stop the iterative procedure when convergence is reached and ii a maximum number of
iterations in your code to avoid your code getting into an infinite loop. iii a check for derivatives close to zero to
avoid division by zero, so that your code exits elegantly if that happens. iv an alternative update method that is
used in case the derivative becomes close to zero.
A points Write Python code to show how you can implement the Newton Raphson method to find the sixth
roots of starting at Plot your estimate of as a function of iteration number. How many
iterations were needed for the sequence to converge within your specified tolerance level?
B points Does the process work if you start at Modify your code to start at this initial guess
and plot your findings as a function of iteration number. How many iterations did this take?
C point What happens if you specify Why does this happen?
PART
You are asked to write onboard code for a new interactive pacemaker system that monitors ECG to determine
the right time to defibrillate the heart. The monitoring part of the system requires you to analyze voltage data
gathered from an electrode placed in the right atrium and figure out the times between zero crossings in the
data to estimate the heart rate. To make sure the pacemaker pulses are applied exactly when needed it is
important to do this as efficiently as possible. The processing power of the microprocessor is very small, and
while it can perform multiplication, division, subtraction and addition, it cannot calculate derivatives or perform
Fourier transforms. The signal is very approximately sinusoidal.
A points of the four methods presented in the module bisection false position, secant and Newton
Raphson which would you use to try to find zero crossings, given the processor and time limitations In
your answer, briefly describe why you chose the method.
B points You are not able to make a plot of the data recorded by the board. Given that you know the signal
is approximately sinusoidal, and that the frequency of the signal is around Hz suggest a method you could
use for bracketing zeros Bisection False Position methods or choosing starting points for Newton
Raphson or Secant methods.
C points Write pseudocode outlining the process you chose in part B
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
