ECE 204 Numerical Methods for Computer Engineers Welcome to ECE 204 Numerical Methods for Computer Engineers Douglas Wilhelm Harder Department of Electrical and Computer Engineering University of Waterloo Copyright © 2007 by Douglas Wilhelm Harder. All rights reserved. ECE 204 Numerical Methods for Electrical and Computer Engineers Welcome to ECE 204 Numerical Methods for Engineers Douglas Wilhelm Harder Department of Electrical and Computer Engineering University of Waterloo Copyright © 2007 by Douglas Wilhelm Harder. All rights reserved. Introduction Everything should be made as simple as possible, but no simpler. Einstein (paraphrased) Introduction • Welcome to ECE 204 • Instructor: Douglas Wilhelm Harder Introduction • In ECE 150 and ECE 250, you have been given an introduction to programming, data structures, and algorithms • We will now show how we can use algorithms to solve mathematical problems Introduction • As an engineering, it is your job to solve the engineering problem-at-hand in the most efficient manner possible • If you are less efficient than someone else, then you will ultimately pay (monetarily, of course...) Introduction • Given any engineering problem (especially in electrical and computer engineering), we are able to model the problem mathematically – more on this in ECE 342 Signals and Systems • If we can solve the model on the computer, then we can simulate reality • Thus, we can actually prototype designs on a computer without building them Introduction • Using the design of aircraft as an example: – years ago, any new aircraft would begin with a reasonably small-scale model – this model would be tested, and then a larger model would be built – with the larger model, the effects of scale are then observed and corrected – in some cases half-scale models of aircraft would be built before the full-scale prototypes are made Introduction • As you may observe, this is an expensive process • To given an example of today’s technology, the Airbus A380, the doubledecker jumbo jet, was modeled entirely in a computer • Only when the computer model was perfected did they actually build the aircraft, and the rest is history... Introduction • Consider some of the problems: – with smoking banned on flights, the removal of the ash trays resulted in an incredible fuel savings – if the mathematical model was wrong and the A380 was even 1% heavier than it could have been, this would have resulted in a tremendous fuel inefficiency over the life of all the aircraft – Boeing would build a better jumbo and take the market away... Introduction • Consider some of the problems: – if the models are wrong, or if information put into models was wrong, then we could experience a failure... – the extreme example is the Mars Climate Orbiter, launched on December 11th, 1998 and crash landed on September 23rd, 1999 because the measurements were sent in Imperial but assumed to be in metric: 1 lbf = 4.4482216152605 N Introduction • As electrical and computer engineers, you will be designing circuits – consider having to build prototypes of each circuit you design – any errors could be the result of your design, or the fault of your model – you cannot build “scale models” Introduction • Alternatively, you could model your circuit on the computer • You will be using SPICE to model your circuits in your other courses – it is much less expensive to find errors in your model when simulating them than after you actually construct the circuit Introduction • Thus, we have the following diagram: Introduction • There are a number of possible errors: – Modeling Error: a wrong or inappropriate choice of model – Measurement Error: incorrect or poor measurements – Implementation Error: incorrect or poor choice of algorithms – Simulation Error: error accumulated due to the execution of our model Introduction • You will learn how to avoid modeling, measuring, and implementation errors in your other classes • We will focus on the last source of errors: numerical errors occurring during the simulation stage References • The course web site: http://www.ece.uwaterloo.ca/~ece204/ • The course text are a collection of my own notes online – they have been used for two years now and have been well received by students Matlab • While this is not a course in teaching you how to program, we will be using Matlab to both demonstrate and evaluate you on your knowledge of the course material • At the start of many of the lectures, I will begin with a “Matlab minute”, a short introduction to Matlab Evaluation • The course evaluation is performed through: – midterm examination – final examination 40% 60% Academic Offences • Academic Offences include, but are not limited to: – Infringing unreasonably on the work of other members (e.g., disrupting classes) – Cheating – Plagiarism – Misrepresentations • All students must read Policy 71 Plagiarism • All instances of Plagiarism are reported to the Associate Dean of Undergraduate Studies Usage Notes • These slides are made publicly available on the web for anyone to use • If you choose to use them, or a part thereof, for a course at another institution, I ask only three things: – that you inform me that you are using the slides, – that you acknowledge my work, and – that you alert me of any mistakes which I made or changes which you make, and allow me the option of incorporating such changes (with an acknowledgment) in my set of slides Sincerely, Douglas Wilhelm Harder, MMath dwharder@alumni.uwaterloo.ca