Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 20

Trendline Analysis

Experimental measurements are never perfect which results in data scatter From an inspection of a plot of the data, it is apparent that there is a clear trend in the dependent variable y(x) with respect to the independent parameter x. A trendline analysis is used to find the best fit of a function or best choice of a set of coefficients for a function to match the trend indicated by the data. For the example shown, the functional form is a second order polynomial,
400

Trendline Analysis

y(x) - (dependent parameter)

200

y ax bx c
MS Excel automatically determines that the polynomial best represents or fits the data when the coefficients are

experimental data

2nd order polynomial


y = 0.944x 2 - 6.941x - 10.88 R = 0.965

a 0.944 b 6.941 c 10.88

-200

10

20

30

x - (independent parameter)

Trendline Analysis
The trendline analysis uses a least squares curve fitting procedure. the deviation of the ith data point is the difference between the value of the dependent variable yi at xi and the curve fitting function f() evaluated at xi. the coefficients a, b, and c in f(x) are chosen to minimized the total sum of the deviations squared,
400

Trendline Analysis

di yi f xi
y(x) - (dependent parameter)

200

S di2
i 1

experimental data

2nd order polynomial


y = 0.944x 2 - 6.941x - 10.88 R = 0.965

-200

10

20

30

x - (independent parameter)

Transducer Calibration
exit motor The function of a water pump is to cause an increase in the fluid pressure as it passes through the pump. The pressure increase depends on the flow rate and the pump speed. In a pump test, these parameters must be measured. A pressure transducer is used to transform the pressure differential across the pump into a proportional voltage. The voltage is measured and recorded by the computerized data acquisition system (DACQ). A calibration is need to establish the relationship between the pressure input to the transducer and the output voltage.

inlet

pressure transducer

Vout

computerized DACQ

Pin
exit inlet

Transducer Calibration
apply known pressure differentials to the transducer and measure the corresponding transducer output voltage (known pressures might be determined by using another previously calibrated pressure measurement system) Apply a Trendline Analysis to find the best fit of a linear curve fit equation to the data Use the calibrated pressure transducer to determine unknown pressures by measuring the transducer output voltage and applying the calibration relation

1 P V V0 a

V a P V0 a sensitivity V0 zero offset a,V0 found from curve fit

Type in the data values shown Create the table headings and format the table as shown Plot the data on a Scatter Plot (refer to the previous tutorial as necessary)

Format the plot as shown:


axis range, tick mark intervals, tick mark type, number format horizontal & vertical grid lines data point marker style

Add a Trendline to the plot by: right-click on a data point marker and select Add Trendline from the popup window select a Linear curve fit set the Trendline Name for the plot legend display the curvefit equation on the plot display the r-squared value on the plot (indicates how well the curve fit matches the data - the closer it is to one, the better the fit)

Change the format for the Trendline Label by: right-clicking on the label select Format Trendline Label select the Number option group and choose the Scientific format with 3 decimal places select the Fill option group and choose a Solid Fill with the Color set to White select the Border Color option group and choose a Solid Line with the Color set to Black

We have established the relationship between the pressure applied to the transducer and its corresponding voltage output.

V a P V0 V a 0.0022 sensitivity Pa V0 0.1195 V zero offset


In a normal experimental application, an unknown pressure will be applied to the transducer and the calibration equation will be used to find the pressure from the measured voltage.

1 V V0 a

Start a new worksheet Sheet2 Create a data table: type in the measured transducer output voltages enter the coefficients determined from the trendline analysis enter the formula to calculate the pressures corresponding to each voltage complete the table formatting as shown Create a plot of the pressures with the formatting shown

Power Law Trendlines


Power Law y = a*x^b, b>1
8000

Power Law y = a*x^b, b<1


80

6000
y(x) = 3*x^0.5

60

y(x) = 3*x^2

4000

40

2000

20

0
0 20 40 60

0 0 200 x 400 600


x

Many processes of interest to engineers follow a power-law relationship, b

y ax

The plot above illustrates the typical trend for a power-law variation with an exponent less than 1.

The plot above is for a power-law relationship with an exponent greater than 1.

Log-Log Plots
Power Law y = a*x^b, b>1
10000

Power Law y = a*x^b, b<1


100

1000

y(x) = 3*x^0.5
100 10
1 10 100

y(x) = 3*x^2

10

1 10 100 x 1,000
x

Data that follows a power-law is often shown on a log-log plot. This is the same data that was presented on the previous slide. Note that the data follows a linear trend on the log-log plot.

On log-log plots, the distance along an axis is proportional to the log of the parameter.

Log-Log Plots
Power Law y = a*x^b, b>1
10000

On log-log plots, the distance along an axis is proportional to the log of the parameter. Taking the log of the power-law relation,

1000
y(x) = 3*x^2

log y log a xb

log y b log x log a


100

note that log y is linear with respect log x. Since the difference between log(100) and log(10) is the same as the difference between log(1000) and log(100), it follows that the distance between the corresponding tick marks is the same. The minor grid lines from 1-10 are 2, 3, 4,etc. and from 10-100 are 20, 30, 40, etc. Note that the coordinates for the first 3 points are (5,75), (10,300), and (15,675).

10
1 10 100

To find the trendline for data that follows a power-law relationship: key-in the data and format the table as shown create the plot with the formatting features shown right-click on one of the data points and select Add Trendline from the popup menu set the Trend/Regression Type to Power set the Trendline Name to powerlaw curve fit display the equation and R-squared value on the plot

Format the trendline label as shown right-click on the x-axis and select format axis turn-on the auto-scaling select the Logarithmic Scale repeat these selections for the y-axis

select Major & Minor Gridlines for the vertical and horizontal axis

The final forma of the plot

Exponential Trendlines
Exponential, y = a*exp(b*x), b>0
300 8

Exponential, y = a*exp(b*x), b<0

6
y = 8*exp(0.2*x)

200

y = 8*exp(-0.2*x)

100

0 0 5 10 x 15 20

0 0 5 10 x 15 20

Many processes of interest to engineers follow an exponential relationship, bx

y ae

The plot above is for an exponential relationship with a positive exponent . The process is described as exponential growth.

The plot above illustrates the typical trend for an exponential process with a negative exponent. The process is described as exponential decay.

Semi-Log Plots
Exponential, y = a*exp(b*x), b>0
1000 10

Exponential, y = a*exp(b*x), b<0

y = 8*exp(0.2*x)

100

y = 8*exp(-0.2*x)

10

1 0 5 10 x 15 20

0 0 5 10 x 15 20

Data that follows an exponential variation is often shown on a semi-log plot. This is the same data that was presented on the previous slide. Note that the data follows a linear trend on the semi-log plot.

On semi-log plots, the distance along the xaxis is proportional to the parameter and distance along the y-axis is proportional to the log of the parameter

Log-Log Plots
Exponential, y = a*exp(b*x), b>0
1000

On semi-log plots, the distance along the yaxis is proportional to the log of the parameter and along the x-axis, the distance is proportional to the parameter.

y = 8*exp(0.2*x)

100

Taking the log of the exponential relation,

log y log a ebx


10

log y bx log e log a log y b log e x log a


0 5 10 x 15 20

note that log y is linear with respect x.

On Sheet4 of your workbook:


Create and format the data table as shown. Create and format the plot as shown you will choose the Exponential Trendline Type.

You might also like