Engineering 103 –UMass Boston

CW 11

(In-Class-Work 10)

 

                                

Make a VI that finds the best linear fit Y’=a*X+b  for the following table of data then on a same XY graph (do not use “Express XY Graph”) plot the data and the fit line. It should also output the parameters a and b, and the MSE (Mean Square Error, an equivalent parameter as our “Standard Deviation” that indicates how well our model fits to the data). Use two arrays with a digital control in each to input data X and Y. Use Linear Fit under Analysis-CurveFitting to find the best linear fit. Then use two Bundles (under Cluster) and a BUILD  ARRAY (under Array) to do the multiple plot. The raw data should go in first, then the fitted data, into the Build Array, whose output goes into the XY Graph. Right click on Plot 0 on the XY Graph to choose Scattered Plot under Common Plots for the raw data, the fit line should be a continuous line. Use an array with a Numeric Indicator to output the coefficients a and b, and a Numeric Indicator for the MSE.

X

Y

2

7.9

3

12.5

4

15.8

5

19.6

7

27.9

By looking at this graph and recall the quadratic curve fitting we did for the pendulum, can you explain in your own words the meaning and purpose of a curve fitting process? (include your answer as a text box in the VI file to submit). Do Operate/Save Current Values as Default, then save the VI as cw11_lastname and print a copy to submit. Save all VI’s into your floppy for future use!

 

*Remember that this is an individual work (turn it in, as instructed, with your name and date). Home-works and class-works count 20% toward the course grade. Class-works are done in class.