Engineering 103 –UMass Boston

CW 10

(In-Class-Work 10)

 

Data Modeling/Curve Fitting with LabVIEW: Arrays, XY Graph, Build Array, and Multiple Plot

Make a VI that finds the best linear fit Y’=a*X+b  for the table of data shown below. On a same XY graph (do not use “Express XY Graph”) plot both the raw data and the fit curve. It should also output the parameters a (slope) and b (intercept), 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 raw data X and Y. Use Linear Fit under Analysis-Curve Fitting 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 fit curve, 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 curve 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

 

 

Please insert names and dates within the Front Panels. By alphabetical order of the last names, the first two students in each team will submit LabVIEW LLB file cw10_XX_a.llb, the next two students will submit LabVIEW LLB file cw10_XX_b.llb, to the files folder in the server. Each LLB file should contain two VI’s corresponding to this CW. These files need to be uploaded to the server today to receive credit.

 

*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.