Numerical Methods in Fourier Series Applications

Similar documents
Chapter 4. Fourier Series

Castiel, Supernatural, Season 6, Episode 18

Math 113 Exam 3 Practice

Fourier Series and the Wave Equation

Chapter 9: Numerical Differentiation

Math 113, Calculus II Winter 2007 Final Exam Solutions

CHAPTER 10 INFINITE SEQUENCES AND SERIES

1.3 Convergence Theorems of Fourier Series. k k k k. N N k 1. With this in mind, we state (without proof) the convergence of Fourier series.

Chapter 10: Power Series

FREE VIBRATION RESPONSE OF A SYSTEM WITH COULOMB DAMPING

6.3 Testing Series With Positive Terms

Solutions to Final Exam Review Problems

CHAPTER 5. Theory and Solution Using Matrix Techniques

Math 106 Fall 2014 Exam 3.2 December 10, 2014

EXPERIMENT OF SIMPLE VIBRATION

radians A function f ( x ) is called periodic if it is defined for all real x and if there is some positive number P such that:

UNIVERSITY OF CALIFORNIA - SANTA CRUZ DEPARTMENT OF PHYSICS PHYS 116C. Problem Set 4. Benjamin Stahl. November 6, 2014

Math 106 Fall 2014 Exam 3.1 December 10, 2014

1 Approximating Integrals using Taylor Polynomials

Comparison Study of Series Approximation. and Convergence between Chebyshev. and Legendre Series

Lecture 6 Chi Square Distribution (χ 2 ) and Least Squares Fitting

f(x) dx as we do. 2x dx x also diverges. Solution: We compute 2x dx lim

Seunghee Ye Ma 8: Week 5 Oct 28

Math 1314 Lesson 16 Area and Riemann Sums and Lesson 17 Riemann Sums Using GeoGebra; Definite Integrals

Appendix: The Laplace Transform

Lecture 6 Chi Square Distribution (χ 2 ) and Least Squares Fitting

Stopping oscillations of a simple harmonic oscillator using an impulse force

Most text will write ordinary derivatives using either Leibniz notation 2 3. y + 5y= e and y y. xx tt t

Math 113 Exam 3 Practice

We are mainly going to be concerned with power series in x, such as. (x)} converges - that is, lims N n

EDEXCEL NATIONAL CERTIFICATE UNIT 4 MATHEMATICS FOR TECHNICIANS OUTCOME 4 - CALCULUS

Løsningsførslag i 4M

2C09 Design for seismic and climate changes

The axial dispersion model for tubular reactors at steady state can be described by the following equations: dc dz R n cn = 0 (1) (2) 1 d 2 c.

Additional Notes on Power Series

Carleton College, Winter 2017 Math 121, Practice Final Prof. Jones. Note: the exam will have a section of true-false questions, like the one below.

Kinetics of Complex Reactions

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Math 113 Exam 4 Practice

Quiz. Use either the RATIO or ROOT TEST to determine whether the series is convergent or not.

SOLUTIONS TO EXAM 3. Solution: Note that this defines two convergent geometric series with respective radii r 1 = 2/5 < 1 and r 2 = 1/5 < 1.

Math 132, Fall 2009 Exam 2: Solutions

9.3 The INTEGRAL TEST; p-series

Part I: Covers Sequence through Series Comparison Tests

Chapter 2 Feedback Control Theory Continued

TR/46 OCTOBER THE ZEROS OF PARTIAL SUMS OF A MACLAURIN EXPANSION A. TALBOT

SCORE. Exam 2. MA 114 Exam 2 Fall 2017

HOMEWORK #10 SOLUTIONS

Math 21B-B - Homework Set 2

Section 11.6 Absolute and Conditional Convergence, Root and Ratio Tests

Calculus 2 - D. Yuen Final Exam Review (Version 11/22/2017. Please report any possible typos.)

C. Complex Numbers. x 6x + 2 = 0. This equation was known to have three real roots, given by simple combinations of the expressions

Ma 530 Introduction to Power Series

FIR Filter Design: Part II

NUMERICAL METHODS COURSEWORK INFORMAL NOTES ON NUMERICAL INTEGRATION COURSEWORK

SOLUTION SET VI FOR FALL [(n + 2)(n + 1)a n+2 a n 1 ]x n = 0,

Math 142, Final Exam. 5/2/11.

Mechatronics. Time Response & Frequency Response 2 nd -Order Dynamic System 2-Pole, Low-Pass, Active Filter

Vibratory Motion. Prof. Zheng-yi Feng NCHU SWC. National CHung Hsing University, Department of Soil and Water Conservation

x a x a Lecture 2 Series (See Chapter 1 in Boas)

Strategy for Testing Series

Calculus II exam 1 6/18/07 All problems are worth 10 points unless otherwise noted. Show all analytic work.

4x 2. (n+1) x 3 n+1. = lim. 4x 2 n+1 n3 n. n 4x 2 = lim = 3

1 Cabin. Professor: What is. Student: ln Cabin oh Log Cabin! Professor: No. Log Cabin + C = A Houseboat!

DYNAMIC ANALYSIS OF BEAM-LIKE STRUCTURES SUBJECT TO MOVING LOADS

Math 10A final exam, December 16, 2016

SCORE. Exam 2. MA 114 Exam 2 Fall 2016

Finally, we show how to determine the moments of an impulse response based on the example of the dispersion model.

Section A assesses the Units Numerical Analysis 1 and 2 Section B assesses the Unit Mathematics for Applied Mathematics

PLEASE MARK YOUR ANSWERS WITH AN X, not a circle! 1. (a) (b) (c) (d) (e) 3. (a) (b) (c) (d) (e) 5. (a) (b) (c) (d) (e) 7. (a) (b) (c) (d) (e)

THE SOLUTION OF NONLINEAR EQUATIONS f( x ) = 0.

*X203/701* X203/701. APPLIED MATHEMATICS ADVANCED HIGHER Numerical Analysis. Read carefully

CALCULUS BASIC SUMMER REVIEW

POWER SERIES SOLUTION OF FIRST ORDER MATRIX DIFFERENTIAL EQUATIONS

Fall 2013 MTH431/531 Real analysis Section Notes

Sequences and Series of Functions

Let us give one more example of MLE. Example 3. The uniform distribution U[0, θ] on the interval [0, θ] has p.d.f.

Chapter 4 : Laplace Transform

MATH 10550, EXAM 3 SOLUTIONS

AP Calculus BC Review Applications of Derivatives (Chapter 4) and f,

The state space model needs 5 parameters, so it is not as convenient to use in this control study.

Solutions to quizzes Math Spring 2007

REGRESSION (Physics 1210 Notes, Partial Modified Appendix A)

3. Z Transform. Recall that the Fourier transform (FT) of a DT signal xn [ ] is ( ) [ ] = In order for the FT to exist in the finite magnitude sense,


MIDTERM 3 CALCULUS 2. Monday, December 3, :15 PM to 6:45 PM. Name PRACTICE EXAM SOLUTIONS

PAPER : IIT-JAM 2010

METHOD OF FUNDAMENTAL SOLUTIONS FOR HELMHOLTZ EIGENVALUE PROBLEMS IN ELLIPTICAL DOMAINS

Zeros of Polynomials

mx bx kx F t. dt IR I LI V t, Q LQ RQ V t,

Chapter 6 Infinite Series

Section 11.8: Power Series

MH1101 AY1617 Sem 2. Question 1. NOT TESTED THIS TIME

MTH 142 Exam 3 Spr 2011 Practice Problem Solutions 1

A collocation method for singular integral equations with cosecant kernel via Semi-trigonometric interpolation

Ma 4121: Introduction to Lebesgue Integration Solutions to Homework Assignment 5

: Transforms and Partial Differential Equations

Problem 1. Problem Engineering Dynamics Problem Set 9--Solution. Find the equation of motion for the system shown with respect to:

x x x 2x x N ( ) p NUMERICAL METHODS UNIT-I-SOLUTION OF EQUATIONS AND EIGENVALUE PROBLEMS By Newton-Raphson formula

Transcription:

Numerical Methods i Fourier Series Applicatios Recall that the basic relatios i usig the Trigoometric Fourier Series represetatio were give by f ( x) a o ( a x cos b x si ) () where the Fourier coefficiets were give by a b x f ( x)cos dx, 0,,, x f ( x)si dx,,,3, () For some complicated situatios, the itegrals appearig i relatios () may ot be able to be evaluated usig stadard had calculatio. For such cases the itegrals may have to be determied usig umerical methods. Fortuately, may such methods have bee developed ad are readily available i various computer software packages. MATAB has several such optios, ad oe particular commad that will determie the itegral I f ( x) dx is called the quad commad with format b a I = quad(fuctio,a,b). This scheme uses a adaptive Simpso method of umerical itegratio ad has reasoable accuracy with a default error of 0-6 which ca be chaged (see Help). Obviously the fuctio to be itegrated must be cotiuous ad well-behaved over the iterval (a,b). Cosider the test problem I 0 0 x dx. For this simple case, oly the sigle commad is eeded ad the aswer matches the kow aalytical evaluatio as show >> quad('x.^',0,0) as = 333.3333

It should be oted that MATAB has may other umerical itegrators that ca hadle more complicated situatios ad yield better accuracy tha quad. Next let us put this umerical scheme to work o a simple Fourier series problem with kow solutio. The problem is take from Kreyszig, exercise.., where f ( x) x over the iterval x. Note that this problem reduces to a Fourier Cosie Series, with the Fourier coefficiet give by a / 3 ad a ( ) 4/( ). The followig code uses aoymous fuctio commad to pass the idex through, ad plots are made of the fuctio, aalytical evaluatio ad umerical evaluatio retaiig 0 terms i the series. o % Exercise.. Solutio: Aalytical & Numerical clc;clear all ;clf; % Plot Fuctio x=-:0.0:; y=x.^; plot(x,y,'r','liewih',) grid o hold o % Evaluate ad Plot Aalytical Series X=-:0.:; ao=/3;f=ao; for =:0 a=((-)^)*4/(pi*)^; f=f+a*cos(pi**x); ed plot(x,f, 'k*', 'liewih',.5) % Evaluate ad Plot Numerical Series x=-0.95:0.:0.95; ao=quad('x.^',0,);f=ao; for =:0 F=@(x)(x.^).*cos(*pi*x); a=*quad(f,0,); f=f+a*cos(pi**x); ed plot(x,f, 'bo', 'liewih',.5) leged('fuctio','aalytical FS - 0 Terms','Numerical FS - 0 Terms') title('compariso of Aalytical vs Numerical Fourier Series: f = x^') xlabel('x'),ylabel('f')

f Results of the code are show i the followig figure. 0.9 0.8 Compariso of Aalytical vs Numerical Fourier Series: f = x Fuctio Aalytical FS - 0 Terms Numerical FS - 0 Terms 0.7 0.6 0.5 0.4 0.3 0. 0. 0 - -0.8-0.6-0.4-0. 0 0. 0.4 0.6 0.8 x Forced Oscillatio Example Cosider the forced oscillatio example from Kyeszig pp. 49-494. The applicatio ivolves the vibratioal time-depedet behavior of a mechaical mass-sprigdashpot system subjected to a exteral forcig fuctio as show i the adjacet figure.

Usig Newto s law, the goverig equatio of motio is give by the secod order differetial equatio that we have see earlier i the course (Sectio.4) d y m dy c ky r( t) (3) where y is the vertical displacemet from the static equilibrium positio, m is the mass, k is the sprig stiffess, c is the dampig costat, ad r is the exteral forcig fuctio. As show i the text, this equatio also describes the behavior of particular electrical circuits as well. If r(t) is harmoic (si(t) or cos(t) time behavior), the steady-state solutio ca be easily foud ad will also be harmoic of the same frequecy,. However, if r(t) is periodic but ot harmoic, the more complicated behavior will result. We ow wish to explore such a case usig Fourier Series methods. Followig the text s example i this sectio, we explore the particular case govered by the equatio d y dy 0.05 5y r( t) (4) with the followig forcig fuctio (5)

I order to fid the solutio to the differetial equatio we first represet the periodic forcig fuctio i terms of its Fourier Cosie Series 4 4 r( t) cost cos3t cos5t cost 3 5,3,5,... The differetial equatio the ca be writte as d y dy 4 0.05 5y cost (6) where we are lookig at oly a sigle -term of the series. From our previous studies, we kow that the steady state solutio must be of the form y ( t) A cost B si t (7) ad substitutig this ito equatio (6) gives A D 4(5 ) 0., B D D (8) (5 ) (0.05) Sice the differetial equatio is liear, the solutio is the give by A,3,5,... y ( t) cost B si t (9) Numerical evaluatio of this solutio is accomplished by the followig MATAB code, ad the solutio is plotted i the followig figure.

y - Output % MCE 37 Egieerig Aalysis Example Code - Prof. Sadd % Force Oscillatio Example, pp. 49-494 % Numerical Evaluatio of Fourier Series Solutio % ************************************** clc;clear all;clf; t=lispace(-pi,pi,00); y=0; for =:: D=(5-^)^+(0.05*)^; A=4*(5-^)/(^*pi*D); B=0./(*pi*D); y=y+b*si(*t)+a*cos(*t); if == plot(t,y,'k','liewih',) hold o ed if ==3 plot(t,y,'b','liewih',) ed if ==5 plot(t,y,'r','liewih',) ed ed grid o xlabel('time');ylabel('y - Output') title('vibratio Output - Example, pp 49-494') leged('-term','-terms','3-or more terms',4) 0.3 Vibratio Output - Example, pp 49-494 0. 0. 0-0. -0. -0.3 -term -terms 3-or more terms -0.4-4 -3 - - 0 3 4 time

The plot illustrates that the solutio coverges quickly, ad thus oly 3 terms are eeded i the Fourier series. The displacemet output is almost a harmoic oscillatio of five times the frequecy of the iput drivig force. Discrete Data Example Aother useful MATAB umerical itegrator is the trapz commad, ad this is used for itegratig a fuctio that is oly defied as data at discrete poits. This situatio could come from a experimetal data acquisitio system that captures say the drivig force o a mechaical system but oly at discrete times. As i the previous example, we may wat to represet this drivig force usig a Fourier series. For this case, cosider a example where the discrete drivig force data has bee collected over a time iterval 0 < t < 5 as show i the followig table. Time 0 0.500 0.5000.0000.5000.0000.5000 3.0000 3.5000 4.0000 4.5000 5.0000 Force 0.6000 3.000 4.000 4.5000 4.000 3.000.000.5000.000.000.0500 The data idicates a force history that first icreases to a maximum ad the decreases to a smaller costat value. Usig this data set we ca use trapz commad to first determie the Fourier coefficiets of the drivig force ad the to use these to calculate the Fourier series. To make thigs a little simpler, we will assume that the fuctio has a eve half-rage expasio, ad thus will determie a Fourier Cosie series represetatio of the discrete data. The results are show i the figure below ad the MATAB code is give the text box. Notice that the umerical results have some iaccuracies ear t = 0, probably comig from the simple method (trapezoid techique) used i the trapz method.

Drivig Force 4.5 4 Discrete Drivig Force Example Discrete Data Fourier Series Represetatio 3.5 3.5.5 0.5 0 0 0.5.5.5 3 3.5 4 4.5 5 time % MCE 37 Egieerig Aalysis Example Code - Prof. Sadd % Fourier Series Represetatio of a Drivig Force % Prescribed at Discrete Times % ************************************** clc;clear all;clf; % Iput Discrete Fuctio Data =5; t=[0,0.5,0.5,,.5,,.5,3,3.5,4,4.5,5] F=[0,.6,3.,4.,4.5,4.0,3.,.,.5,.,.,.05] % Plot Data plot(t,f,'ro','liewih',) grid o xlabel('time');ylabel('drivig Force') title('discrete Drivig Force Example') hold o % Calculate Fourier Coefficiets; Assume Eve Fuctio of Time ao=trapz(t,f)/ for =:9 FF=F.*cos(*pi*t/) a()=*trapz(t,ff)/ ed % Determie Fourier Series T=0:0.:5; f=ao; for =:9 A=a(); f=f+a*cos(*pi*t/); ed % Plot Fourier Series plot(t,f,'liewih',) leged('discrete Data','Fourier Series Represetatio')