CurveFittinginExcel

CurveFittinginExcel - ECE 2 Circuits and Systems Spring...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 2 Circuits and Systems Spring 2009 Page 1 of 12 Plots, Curve-Fitting, and Data Modeling in Microsoft Excel This handout offers some tips on making nice plots of data collected in your lab experiments, as well as instruction on how to use the built-in curve-fitting routines in Microsoft Excel. Excel is a good utility program for data recording and plotting, and is actually used a lot by practicing engineers in industry. The main reason for its popularity is simply cost and convenience (most people have it on their computers) making information sharing very easy. It is also easy to learn and use. With a little extra effort you can write your own computational routines using the built-in VBA (Visual Basic) compiler. If you already know how to create a basic X-Y plot on Excel, then skip ahead to page 3 and the section called “Changing the Plot Appearance”. Simple X-Y Plots Table 1 includes measured data on the current- voltage relationship of a diode that we can use for demonstration of the plotting and curve-fitting features of Excel. Enter the data in two columns as shown in the figure below, select the two columns and then choose “Chart…” from the “Insert” menu (or just click on the Chart icon in a toolbar if it is visible). You will then see a dialog box like that shown in the figure below. Select the “XY (Scatter)” chart type as shown. In this case there are some options (sub-types) that control whether each data point is highlighted by a marker of some kind, and whether a straight- or smoothed line is shown connecting the data points. That isn’t really important at this stage because you can always change the appearance later, but let’s start by choosing the smoothed-lines with data markers (highlighted selection in the figure). Step 1: Enter data, then select the columns you want to plot Step 2: Select “Chart” from the Insert menu or toolbar Table 1 – Sample Diode I-V Data I [mA] V [Volts] 0 0 0.001 0.24 0.005 0.34 0.01 0.36 0.02 0.39 0.05 0.43 0.1 0.46 0.2 0.49 0.5 0.53 1.0 0.57 2.0 0.60 5 0.65 10 0.68 14 0.69 (Note: this is actual data recorded by Prof. York on a certain diode. In this experiment I expected an exponential dependence so I made a list of diode currents that would yield a nice plot, and then recorded the diode voltage that produced those currents. )
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ECE 2 Circuits and Systems Spring 2009 Page 2 of 12 Now select “Next” and you will see the “Source Data” dialog box. Click on the “Series” Tab and you will see something like the following: This gives a snapshot of what the graph will look like so far, and the source of data. It looks a little strange for a diode characteristic because Excel has assumed the first column represents the horizontal coordinate, so we need to switch the X and Y data range around. This is easy, just interchange the data ranges for the X and Y values. It is also useful to give the data series a name (like “Data” or “Measurements”) which will appear in the legend.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/28/2011 for the course ECE 2C taught by Professor Yue during the Fall '08 term at UCSB.

Page1 / 12

CurveFittinginExcel - ECE 2 Circuits and Systems Spring...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online