ME 482/582 Optimal Design H14 pg 1 of 2

Unconstrained Optimization Applications

1. System of Non-linear Equations

The vertical displacement of a damped oscillating object as a function of time can be approximated by the following equation. The parameters are characteristics of the system (i.e. mass, spring constant, damping).

Use the experimental data for time and displacement below, to determine the parameters. That is, prepare a spreadsheet with 3 NL equations, minimize the square of the errors using the parameters as design variables. Graph the resulting equation from 1 to 3 seconds in 0.2 sec intervals. Attach a copy of the spreadsheet (w/graph).

Time
t (s) / Displacement
y (in)
1 / 7.822
2 / 1.533
3 / -2.979

2. Curve Fitting

Given a set of experimental data, unconstrained optimization techniques can be used to “fit” a “curve” thru the points. The “curve” is in really an analytical function that is “fit” to the data. Candidate analytical functions can be used to “predict” the value of y given x, and include:

The goal in curve fitting is to determine the “best” values of the constants in the candidate analytical function, for example, finding the values for the slope a1 and intercept a0 for a straight-line (linear) fit.

Using unconstrained optimization, an objective function is created to measure the sum of the squared errors or “residuals.” A residual is the difference between the actual yi value and the analytically predicted value f(xi) (note the Excel text uses f(x) for y(x), as shown in the following equation:

ei = yi - f(xi)

or

Obj Fcn = Σ ei2 for i = 1 to n data points

2.1 Download the CapacitorData.xls spreadsheet from the course web page. The spreadsheet lists points of data relating voltage to time. A capacitor’s voltage decreases or decays over time. Your goal is to find the analytical function that best fits the data.

2.2 Prepare your own user-friendly spreadsheet for four different curve fits: Straight line, Quadratic, Power and Exponential. Fit the functions by minimizing the sum of the residuals by “changing” the design variables (ai, constants) with Solver. Set the SOLVER options to convergence=0.00001, and derivatives= central difference. Enter your findings in the table provided.

Linear / Quadratic / Power / Exponential
a0
a1
a2
a3
a4
a5
a6
a7
SSE
r2

2.3 Prepare and a curve of the fitted equation as a line and the data as point markers only. Attach a copy of the spreadsheet w/graph.

3. Based on your results, which of the functions is the best? Why?

5. Use the TRENDLINE feature of Excel to fit an exponential function to the data. Select “options” to display the equation and r2. Record the “constant” values.

Slope =

Intercept =

r2 =

Discuss how well your answers compare to TRENDLINE calculations.