MAE 384: Advanced Mathematical Methods for Engineers Spring 2015 Homework #8 Due: Wednesday, April 8, in or before class. Note: Problems 2 (extra credit) and 3 have to be solved by hand. Problems 1 and 5 require MATLAB. The item 1(a) must be shown by hand. Problem 4 can be done either in Matlab or by hand. 1. Consider the following ODE: d y d x = ?8 y with y(0) = 3 on 0 < x < 5, (a) Calculate the largest step size required to maintain stability of the numerical solution to this equation using explicit Euler method. (b) Choose a step size two times smaller than this value. Solve the ODE with explicit Euler method using this step size. (c) Choose a step size two times larger than this value. Solve the ODE with explicit Euler method using this step size. (d) Now repeat parts (b) and (c) with implicit Euler method. (e) Plot all the solutions, including the analytical solution to this problem, on the same plot. Discuss your results. 2. Extra credit. Investigate the stability of the following numerical schemes on the example of an ODE d y d x = ? y with > 0. Show whether the scheme is conditionally or unconditionally stable. Derive the stability threshold if the scheme is conditionally stable. (a) The semi-implicit trapezoidal method: yi+1 = yi + 1 2 (f(xi; yi) + f(xi+1; yi+1)) h (b) The explicit midpoint method: yi+1 = yi + f  xi+1=2; yi + f(xi; yi) h 2  h 3. Solve Problem 25.1 from the textbook with third-order Runge-Kutta (page 734) and fourth-order Runge Kutta (page 735) methods with h = 0:5. Plot your results on the same plot. Also, include results from (a),(b),(c) from the two previous homeworks, on the same plot. 4. Solve Problem 25.2 from the textbook with third-order Runge-Kutta (page 734) and fourth-order Runge Kutta (page 735) methods with h = 0:25. Plot your results on the same plot. Also, include results from (a),(b),(c) from the two previous homeworks, on the same plot. There is a typo in this problem. The interval should be from t=0 to 1, not x=0 to 1. 5. For the following rst-order ODE d y d t = t2 ? 2 y t with y(1) = 2, the purpose will be to write MATLAB functions that solve this equation from t = 1 to t = 4 with 1 of 2 MAE 384: Advanced Mathematical Methods for Engineers Spring 2015 (a) Third-order Runge-Kutta (page 734) (b) Fourth-order Runge-Kutta (page 735) For each method, (a) Write the MATLAB function that solves the ODE by using the number of intervals N as an input argument. (b) Solve the ODE using your MATLAB function for N equal to 8, 16, 32, 64. Calculate the step size h inside the function. (c) Calculate the EL2 errors between the true solution and the numerical solution for each N (consult HW6 for the true solution). The following plots should be presented: 1. Plot your solutions for the methods (a), (b), along with the analytical solution, explicit Euler solution from HW6, and solutions to problem 5 (a) – (c) from HW7, on the same plot for N = 8. Do not print out the values at your grid points. 2. Plot your solutions for the methods (a), (b), along with the analytical solution, explicit Euler solution from HW6, and solutions to problem 5 (a) – (c) from HW7, on the same plot for N = 32. Do not print out the values at your grid points. 3. Plot the values of EL2 errors for the methods (a), (b), as well as for the explicit Euler method from HW6, and solutions to problem 5 (a) – (c) from HW7, as a function of h, on the same plot. What do you observe? 4. Plot the values of EL2 errors for all the methods (a)-(c), as well as for the explicit Euler method from HW6, and solutions to problem 5 (a) – (c) from HW7, as a function of h, on the same plot, but in log-log scale. Discuss how you can estimate the order of convergence for each method from this plot. Estimate the order of convergence for each method. 5. Plot the values of EL2 errors for all the methods (a)-(c), as well as for the explicit Euler method from HW6, and solutions to problem 5 (a) – (c) from HW7, as a function of N, on the same plot, but in log-log scale. Discuss how you can estimate the order of convergence for each method from this plot. Estimate the order of convergence for each method. 6. Discuss whether your convergence results for each method correspond to the known order of accuracy for each method. Explain why or why not. 2 of 2

MAE 384: Advanced Mathematical Methods for Engineers Spring 2015 Homework #8 Due: Wednesday, April 8, in or before class. Note: Problems 2 (extra credit) and 3 have to be solved by hand. Problems 1 and 5 require MATLAB. The item 1(a) must be shown by hand. Problem 4 can be done either in Matlab or by hand. 1. Consider the following ODE: d y d x = ?8 y with y(0) = 3 on 0 < x < 5, (a) Calculate the largest step size required to maintain stability of the numerical solution to this equation using explicit Euler method. (b) Choose a step size two times smaller than this value. Solve the ODE with explicit Euler method using this step size. (c) Choose a step size two times larger than this value. Solve the ODE with explicit Euler method using this step size. (d) Now repeat parts (b) and (c) with implicit Euler method. (e) Plot all the solutions, including the analytical solution to this problem, on the same plot. Discuss your results. 2. Extra credit. Investigate the stability of the following numerical schemes on the example of an ODE d y d x = ? y with > 0. Show whether the scheme is conditionally or unconditionally stable. Derive the stability threshold if the scheme is conditionally stable. (a) The semi-implicit trapezoidal method: yi+1 = yi + 1 2 (f(xi; yi) + f(xi+1; yi+1)) h (b) The explicit midpoint method: yi+1 = yi + f  xi+1=2; yi + f(xi; yi) h 2  h 3. Solve Problem 25.1 from the textbook with third-order Runge-Kutta (page 734) and fourth-order Runge Kutta (page 735) methods with h = 0:5. Plot your results on the same plot. Also, include results from (a),(b),(c) from the two previous homeworks, on the same plot. 4. Solve Problem 25.2 from the textbook with third-order Runge-Kutta (page 734) and fourth-order Runge Kutta (page 735) methods with h = 0:25. Plot your results on the same plot. Also, include results from (a),(b),(c) from the two previous homeworks, on the same plot. There is a typo in this problem. The interval should be from t=0 to 1, not x=0 to 1. 5. For the following rst-order ODE d y d t = t2 ? 2 y t with y(1) = 2, the purpose will be to write MATLAB functions that solve this equation from t = 1 to t = 4 with 1 of 2 MAE 384: Advanced Mathematical Methods for Engineers Spring 2015 (a) Third-order Runge-Kutta (page 734) (b) Fourth-order Runge-Kutta (page 735) For each method, (a) Write the MATLAB function that solves the ODE by using the number of intervals N as an input argument. (b) Solve the ODE using your MATLAB function for N equal to 8, 16, 32, 64. Calculate the step size h inside the function. (c) Calculate the EL2 errors between the true solution and the numerical solution for each N (consult HW6 for the true solution). The following plots should be presented: 1. Plot your solutions for the methods (a), (b), along with the analytical solution, explicit Euler solution from HW6, and solutions to problem 5 (a) – (c) from HW7, on the same plot for N = 8. Do not print out the values at your grid points. 2. Plot your solutions for the methods (a), (b), along with the analytical solution, explicit Euler solution from HW6, and solutions to problem 5 (a) – (c) from HW7, on the same plot for N = 32. Do not print out the values at your grid points. 3. Plot the values of EL2 errors for the methods (a), (b), as well as for the explicit Euler method from HW6, and solutions to problem 5 (a) – (c) from HW7, as a function of h, on the same plot. What do you observe? 4. Plot the values of EL2 errors for all the methods (a)-(c), as well as for the explicit Euler method from HW6, and solutions to problem 5 (a) – (c) from HW7, as a function of h, on the same plot, but in log-log scale. Discuss how you can estimate the order of convergence for each method from this plot. Estimate the order of convergence for each method. 5. Plot the values of EL2 errors for all the methods (a)-(c), as well as for the explicit Euler method from HW6, and solutions to problem 5 (a) – (c) from HW7, as a function of N, on the same plot, but in log-log scale. Discuss how you can estimate the order of convergence for each method from this plot. Estimate the order of convergence for each method. 6. Discuss whether your convergence results for each method correspond to the known order of accuracy for each method. Explain why or why not. 2 of 2

Order of accuracy for Maximum step size for numerical stability … Read More...
Biomedical Signal and Image Processing (4800_420_001) Assigned on September 12th, 2017 Assignment 4 – Noise and Correlation 1. If a signal is measured as 2.5 V and the noise is 28 mV (28 × 10−3 V), what is the SNR in dB? 2. A single sinusoidal signal is found with some noise. If the RMS value of the noise is 0.5 V and the SNR is 10 dB, what is the RMS amplitude of the sinusoid? 3. The file signal_noise.mat contains a variable x that consists of a 1.0-V peak sinusoidal signal buried in noise. What is the SNR for this signal and noise? Assume that the noise RMS is much greater than the signal RMS. Note: “signal_noise.mat” and other files used in these assignments can be downloaded from the content area of Brightspace, within the “Data Files for Exercises” folder. These files can be opened in Matlab by copying into the active folder and double-clicking on the file or using the Matlab load command using the format: load(‘signal_noise.mat’). To discover the variables within the files use the Matlab who command. 4. An 8-bit ADC converter that has an input range of ±5 V is used to convert a signal that ranges between ±2 V. What is the SNR of the input if the input noise equals the quantization noise of the converter? Hint: Refer to Equation below to find the quantization noise: 5. The file filter1.mat contains the spectrum of a fourth-order lowpass filter as variable x in dB. The file also contains the corresponding frequencies of x in variable freq. Plot the spectrum of this filter both as dB versus log frequency and as linear amplitude versus linear frequency. The frequency axis should range between 10 and 400 Hz in both plots. Hint: Use Equation below to convert: Biomedical Signal and Image Processing (4800_420_001) Assigned on September 12th, 2017 6. Generate one cycle of the square wave similar to the one shown below in a 500-point MATLAB array. Determine the RMS value of this waveform. [Hint: When you take the square of the data array, be sure to use a period before the up arrow so that MATLAB does the squaring point-by-point (i.e., x.^2).]. 7. A resistor produces 10 μV noise (i.e., 10 × 10−6 V noise) when the room temperature is 310 K and the bandwidth is 1 kHz (i.e., 1000 Hz). What current noise would be produced by this resistor? 8. A 3-ma current flows through both a diode (i.e., a semiconductor) and a 20,000-Ω (i.e., 20-kΩ) resistor. What is the net current noise, in? Assume a bandwidth of 1 kHz (i.e., 1 × 103 Hz). Which of the two components is responsible for producing the most noise? 9. Determine if the two signals, x and y, in file correl1.mat are correlated by checking the angle between them. 10. Modify the approach used in Practice Problem 3 to find the angle between short signals: Do not attempt to plot these vectors as it would require a 6-dimensional plot!

Biomedical Signal and Image Processing (4800_420_001) Assigned on September 12th, 2017 Assignment 4 – Noise and Correlation 1. If a signal is measured as 2.5 V and the noise is 28 mV (28 × 10−3 V), what is the SNR in dB? 2. A single sinusoidal signal is found with some noise. If the RMS value of the noise is 0.5 V and the SNR is 10 dB, what is the RMS amplitude of the sinusoid? 3. The file signal_noise.mat contains a variable x that consists of a 1.0-V peak sinusoidal signal buried in noise. What is the SNR for this signal and noise? Assume that the noise RMS is much greater than the signal RMS. Note: “signal_noise.mat” and other files used in these assignments can be downloaded from the content area of Brightspace, within the “Data Files for Exercises” folder. These files can be opened in Matlab by copying into the active folder and double-clicking on the file or using the Matlab load command using the format: load(‘signal_noise.mat’). To discover the variables within the files use the Matlab who command. 4. An 8-bit ADC converter that has an input range of ±5 V is used to convert a signal that ranges between ±2 V. What is the SNR of the input if the input noise equals the quantization noise of the converter? Hint: Refer to Equation below to find the quantization noise: 5. The file filter1.mat contains the spectrum of a fourth-order lowpass filter as variable x in dB. The file also contains the corresponding frequencies of x in variable freq. Plot the spectrum of this filter both as dB versus log frequency and as linear amplitude versus linear frequency. The frequency axis should range between 10 and 400 Hz in both plots. Hint: Use Equation below to convert: Biomedical Signal and Image Processing (4800_420_001) Assigned on September 12th, 2017 6. Generate one cycle of the square wave similar to the one shown below in a 500-point MATLAB array. Determine the RMS value of this waveform. [Hint: When you take the square of the data array, be sure to use a period before the up arrow so that MATLAB does the squaring point-by-point (i.e., x.^2).]. 7. A resistor produces 10 μV noise (i.e., 10 × 10−6 V noise) when the room temperature is 310 K and the bandwidth is 1 kHz (i.e., 1000 Hz). What current noise would be produced by this resistor? 8. A 3-ma current flows through both a diode (i.e., a semiconductor) and a 20,000-Ω (i.e., 20-kΩ) resistor. What is the net current noise, in? Assume a bandwidth of 1 kHz (i.e., 1 × 103 Hz). Which of the two components is responsible for producing the most noise? 9. Determine if the two signals, x and y, in file correl1.mat are correlated by checking the angle between them. 10. Modify the approach used in Practice Problem 3 to find the angle between short signals: Do not attempt to plot these vectors as it would require a 6-dimensional plot!

Whatsapp +919911743277