EE 3561_Unit_1(c)Al-Dhaifallah EE 3561 : - Computational Methods in Electrical Engineering Unit 1: Introduction to Computational Methods and Taylor Series Lectures 1-3: Mujahed Al-Dhaifallah (Term 351)
EE 3561_Unit_1(c)Al-Dhaifallah Mujahed Al-Dhaifallah مجاهد آل ضيف الله Office Hours Office Hours: SMT, 1:30 – 2:30 PM, by appointment Office: Dean Office. Tel:
Prerequisites Successful completion of Math 1070, Math2040, CS1090 EE 3561_Unit_1(c)Al-Dhaifallah 14353
Course Description EE 3561 is a course on Introduction to computational methods using computer packages, e.g. Matlab, Mathcad or IMSL. Solution of non-linear equations. Solution of large systems of linear equations. Interpolation. Function approximation. Numerical differentiation and integration. Solution of the initial value problem of ordinary differential equations. Applications on Electrical Engineering. EE 3561_Unit_1(c)Al-Dhaifallah 14354
Textbooks “Numerical Methods for Engineers”. By Steven C. Chapra and Raymond P. Canale EE 3561_Unit_1(c)Al-Dhaifallah 14355
Attendance Regular lecture attendance is required. There will be part of the grade on attendance EE 3561_Unit_1(c)Al-Dhaifallah 14356
Student Evaluation Exam 1 10 Exam 2 10 Computer Work 5 Quizzes 5 HW 5 Attendance 5 Final Exams 60 Total 100 EE 3561_Unit_1(c)Al-Dhaifallah 14357
Quizzes Announced After each HW. From HW material EE 3561_Unit_1(c)Al-Dhaifallah 14358
Assignment Requirements Late assignments will not be accepted. assignments are due at the beginning of lecture. Sloppy or disorganized work will adversely affect your grade. EE 3561_Unit_1(c)Al-Dhaifallah 14359
Exams Attendance is mandatory. Make-up exam are not given unless permission is obtained prior to exam day from the instructor a valid, documented emergency has arisen EE 3561_Unit_1(c)Al-Dhaifallah
Academic Dishonesty cheating fabrication falsification multiple submissions plagiarism complicity EE 3561_Unit_1(c)Al-Dhaifallah
EE 3561_Unit_1(c)Al-Dhaifallah Rules and Regulations No make up quizzes DN grade --- (25%) 8 unexcused absences Homework Assignments are due to the beginning of the lectures. Absence is not an excuse for not submitting the Homework. Late submission may not be accepted
EE 3561_Unit_1(c)Al-Dhaifallah Lecture 1 Introduction to Computational Methods What are Computational METHODS ? Why do we need them? Topics covered in EE3561. Reading Assignment: pages 3-10 of text book
EE 3561_Unit_1(c)Al-Dhaifallah Analytical Solutions Analytical methods give exact solutions Example: Analytical method to evaluate the integral Numerical methods are mathematical procedures to calculate approximate solution (Trapezoid Method)
EE 3561_Unit_1(c)Al-Dhaifallah Computational Methods Computational Methods: Algorithms that are used to obtain approximate solutions of a mathematical problem. Why do we need them? 1. No analytical solution exists, 2. An analytical solution is difficult to obtain or not practical.
EE 3561_Unit_1(c)Al-Dhaifallah What do we need Basic Needs in the Computational Methods: Practical: can be computed in a reasonable amount of time. Accurate: Good approximate to the true value Information about the approximation error (Bounds, error order,… )
EE 3561_Unit_1(c)Al-Dhaifallah Outlines of the Course Taylor Theorem Number Representation Solution of nonlinear Equations Interpolation Numerical Differentiation Numerical Integration Solution of linear Equations Least Squares curve fitting Solution of ordinary differential equations
EE 3561_Unit_1(c)Al-Dhaifallah Solution of Nonlinear Equations Some simple equations can be solved analytically Many other equations have no analytical solution
EE 3561_Unit_1(c)Al-Dhaifallah Methods for solving Nonlinear Equations o Bisection Method o Newton-Raphson Method o Secant Method
EE 3561_Unit_1(c)Al-Dhaifallah Solution of Systems of Linear Equations
EE 3561_Unit_1(c)Al-Dhaifallah Cramer’s Rule is not practical
EE 3561_Unit_1(c)Al-Dhaifallah Methods for solving Systems of Linear Equations o Naive Gaussian Elimination o Gaussian Elimination with Scaled Partial pivoting
EE 3561_Unit_1(c)Al-Dhaifallah Curve Fitting Given a set of data Select a curve that best fit the data. One choice is find the curve so that the sum of the square of the error is minimized.
EE 3561_Unit_1(c)Al-Dhaifallah Interpolation Given a set of data find a polynomial P(x) whose graph passes through all tabulated points.
EE 3561_Unit_1(c)Al-Dhaifallah Methods for Curve Fitting o Least Squares o Linear Regression o Nonlinear least Squares Problems o Interpolation o Newton polynomial interpolation o Lagrange interpolation
EE 3561_Unit_1(c)Al-Dhaifallah Integration Some functions can be integrated analytically
EE 3561_Unit_1(c)Al-Dhaifallah Methods for Numerical Integration o Upper and Lower Sums o Trapezoid Method o Romberg Method o Gauss Quadrature
EE 3561_Unit_1(c)Al-Dhaifallah Solution of Ordinary Differential Equations
EE 3561_Unit_1(c)Al-Dhaifallah Summary Computational Methods: Algorithms that are used to obtain numerical solution of a mathematical problem. We need them when No analytical solution exist or it is difficult to obtain. Solution of nonlinear Equations Solution of linear Equations Curve fitting Least Squares Interpolation Numerical Integration Numerical Differentiation Solution of ordinary differential equations Topics Covered in the Course
EE 3561_Unit_1(c)Al-Dhaifallah Number Representation Normalized Floating Point Representation Significant Digits Accuracy and Precision Rounding and Chopping Reading assignment: Chapter 2 Lecture 2 Number Representation and accuracy
EE 3561_Unit_1(c)Al-Dhaifallah Representing Real Numbers You are familiar with the decimal system Decimal System Base =10, Digits(0,1,…9) Standard Representations
EE 3561_Unit_1(c)Al-Dhaifallah Normalized Floating Point Representation Normalized Floating Point Representation No integral part, Advantage Efficient in representing very small or very large numbers
EE 3561_Unit_1(c)Al-Dhaifallah Binary System Binary System Base=2, Digits{0,1}
EE 3561_Unit_1(c)Al-Dhaifallah Bit Representation (sign: 1 bit, Mantissa 3bits,exponent 3 bits)
EE 3561_Unit_1(c)Al-Dhaifallah Fact Number that have finite expansion in one numbering system may have an infinite expansion in another numbering system You can never represent 0.1 exactly in any computer
EE 3561_Unit_1(c)Al-Dhaifallah Representation Hypothetical Machine (real computers use ≥ 23 bit mantissa) Example: If a machine has 5 bits representation distributed as follows Mantissa 2 bits exponent 2 bit sign 1 bit Possible machine numbers (0.25=00001) (0.375= 01111) (1.5=00111)
EE 3561_Unit_1(c)Al-Dhaifallah Representation Gap near zero
EE 3561_Unit_1(c)Al-Dhaifallah Remarks Numbers that can be exactly represented are called machine numbers Difference between machine numbers is not uniform. So, sum of machine numbers is not necessarily a machine number =0.625 (not a machine number)
EE 3561_Unit_1(c)Al-Dhaifallah Significant Digits Significant digits are those digits that can be used with confidence Length of green rectangle = 3.45 significant
EE 3561_Unit_1(c)Al-Dhaifallah Loss of Significance Mathematical operations may lead to reducing the number of significant digits E+02 6 significant digits ─ E+02 6 significant digits ────────────── E+02 2 significant digits E-02 Subtracting nearly equal numbers causes loss of significance
EE 3561_Unit_1(c)Al-Dhaifallah Accuracy and Precision Accuracy is related to closeness to the true value Precision is related to the closeness to other estimated values
EE 3561_Unit_1(c)Al-Dhaifallah Better Precision Better accuracy Accuracy is related to closeness to the true value Precision is related to the closeness to other estimated values Accuracy and Precision
EE 3561_Unit_1(c)Al-Dhaifallah Rounding and Chopping Rounding: Replace the number by the nearest machine number Chopping: Throw all extra digits True Rounding (1.2) Chopping (1.1)
EE 3561_Unit_1(c)Al-Dhaifallah Error Definitions True Error can be computed if the true value is known
EE 3561_Unit_1(c)Al-Dhaifallah Error Definitions Estimated error Used when the true value is not known
EE 3561_Unit_1(c)Al-Dhaifallah Notation We say the estimate is correct to n decimal digits if We say the estimate is correct to n decimal digits rounded if
EE 3561_Unit_1(c)Al-Dhaifallah Summary Number Representation Number that have finite expansion in one numbering system may have an infinite expansion in another numbering system. Normalized Floating Point Representation Efficient in representing very small or very large numbers Difference between machine numbers is not uniform Representation error depends on the number of bits used in the mantissa.
EE 3561_Unit_1(c)Al-Dhaifallah Summary Rounding Chopping Error Definitions: Absolute true error True Percent relative error Estimated absolute error Estimated percent relative error