Sei sulla pagina 1di 43

Engineering Problem Solving and

Excel

EGN 1006 Introduction


to Engineering

Mathematical Solution Procedures


Commonly Used in Engineering Analysis








Data Analysis Techniques (Statistics)


Curve Fitting techniques (Looking at Graphs)
Interpolation techniques
Single and multiple algebraic equations
Evaluating Integrals (Evaluate effects over time)
Economic Analysis
Optimization (Finding the best solution)

Applicable Engineering Fundamentals


Most engineering problems are based upon
one of three underlying principles:
1. Equilibrium Force, Flux, and Chemical
2. Conservation Laws Energy and Mass
3. Rate Phenomena How something
changes over time.

What is a spreadsheet?








A spreadsheet is basically a table containing NUMERICAL


and/or ALPHANUMERICAL values.
Individual elements are known as CELLS.
Each CELL can contain a single value or a STRING (sequence
of characters)
The cells are arranged in columns and rows are referenced by
a CELL ADDRESS ( For example, B3 refers to the cell in
COLUMN B, row 3.
The collection of cells is referred to as a WORKSHEET.
A cell can have a manually entered number or be assigned a
FORMULA EVALUATION such as C7 being =(C3+C4+C5)

The Excel Window

Entering Data
There are two ways to enter data into Excel
 A simple numerical value called a number constant.
 A string, called a text constant.
When you are finished entering a number in a cell hit
ENTER or click the checkmark.

Using Formulas
In Excel, a formula MUST always begin with an
equal sign (=), followed by an expression
involving:
Consider: =(C3+B2+5)
Constants
C3 & B2 are cell addresses
Operators
5 is the numerical constant
Cell Addresses The (+) sign is the operator
This formula could be entered in D7 where the formula
would be applied. Note: Any change in C3 or B2 will
automatically change D7!

Arithmetic Operators
Operator

Purpose

Example

Addition

A1+B1

Subtraction

A1-B1

Multiplication

A1*B1

Division

A1/B1

Exponentiation

A1^3

Percentage

A1%

Operator Preference
Since some formulas include
more than one operator, the
question arises as to which
one is carried out first. The
order is outlined to the right.
If any formula has two
operators from the same
group, the order is carried
out from left to right.

Operator
Preference
1

Operator

* and /

+ and -

For example, in the formula =(C1/D2*E3), the division


would be carried out first then multiplication.

A Simple Spreadsheet Application


A small machine shop has the following parts on hand:
Item
Screws
Nuts
Bolts

Quantity
6500
9000
5400

Start by creating a worksheet that includes this


information, plus the total number of parts on hand.
Answer the questions on the worksheet provided.

Using Functions
Excel includes many different functions which
can carry out a wide variety of operations.
They include:
 Mathematical and statistical operations
 Process financial data
 Process AND return text information
Each function has a specific name followed by
an ARGUMENT enclosed in parenthesis.

Function Examples


=Sum(C1,C2,C3) This will add the numbers


in the three cell addresses. The ARGUMENT
is inside the parenthesis and separated by
commas.
=Sum(C1:C50) the use of a COLON
indicates a RANGE and will add up ALL cells
between the two cell addresses.

Other function examples








=SQRT(x) Takes square root of x


=Min(x1:x20) Returns the minimum # in the set
=Max(x1:x20) Returns the maximum # in the set
=Round (x,n) Rounds x to n decimal places
=Average (x1:x15) Returns the average

Example: =sum(A1, SQRT(A2/2),2*B3+5,D7:D12)


This example has FOUR arguments as
evidenced by the commas

Example #2 Student Exam Scores


Create the following worksheet: See paper worksheet
Student

Davis
Graham
Jones
Meyers
Richards
Thomas
Williams

Exam 1

82
66
95
47
80
74
57

Exam 2

77
80
100
62
58
81
62

Final Exam

94
75
97
78
73
85
67

Overall Score

Moving things around!


You can:
 Select and Highlight a block of cells
 Copy a block of cells
 Move a clock of cells
 Delete rows or columns
 Create grids
 Change font color, fill in backgrounds, etc
 Adjust column widths

Creating Graphs
The easiest way to create a graph in Excel is to use the
Chart Wizard!
Follow these steps:
 Select the block of cells containing the data to be
plotted. You may include headings!
 Click on the CHART WIZARD icon
 Choose the graph type
 Type in a title
 And select Chart on this worksheet or As object in

More on Graphs


Graphs done on a SEPARATE sheet can


easily be copied or pasted into a WORD
document.
Graphs embedded into worksheet can be
edited even after they have been inserted.

Creating and Editing a Line Graph


The voltage within an
electronic device varies
with time in accordance
with the formula:

V = 10 e

0 .5 t

Prepare an Excel
worksheet and line
graph (scatter) with
the data to the right

Seconds

Volts

10

6.07

3.68

2.23

1.35

0.82

0.50

0.30

0.18

0.11

10

0.07

Editing the graph


Once the graph is embedded into the
worksheet, click on the graph until the chart
toolbox appears

Select the drop down menu to add a title


and label each axis with units. Also,
choose LEGEND then RIGHT CLICK on
the small box and choose CLEAR!

Analyzing Data
Engineering analysis usually begins with the
analysis of data! Engineers gather data to
measure VARIABILITY or CONSISTENCY.
Measured Data can tell you a great deal if you
know how to interpret the results. Let Excel
do the tedious work for you so that you can
focus on the interpretation of results.

Data Characteristics
There are several commonly used parameters that allow us to draw
conclusions about the characteristics of a data set. They are:

Mean

Median

Mode

Min

Variance

Standard
Deviation

Max

Mean, Median, and Mode




Mean is the arithmetic average of a data set. It


represents expected behavior. AVERAGE( ) is used
in Excel
Median the value where half of the data falls above
and half the data falls below. MEDIAN ( ) is used in
Excel
Mode the value that occurs with the greatest
frequency with in data set. Mode ( ) is used in Excel.
If a tie results it will always list the FIRST frequent
number it encounters

Min and Max


The min and Max simple represent the
extremities of the data set. In Excel ,the MIN
( ) and Max ( ) functions return these values.
NOTE: The MIN and MAX functions return
the values that are the smallest and
largest ALGEBRAICALLY. They do not
return values in terms of MAGNITUDE.
Example: ( -5,-2, 1) ; Min = -5 & Max = 1

Variance
The variance provides an
indication of the degree of
SPREAD in the data. The
greater the variance, the
greater the spread. It is
determined by the following
formula:
Excel uses the VAR( ) function

n
1
2
s2 =
(
x

x
)

i
n 1 i =1

s 2 = variance
n = # of data values
x i = individual data value
x = mean

Standard Deviation
The standard deviation is simply the square root of
the variance.
s =

= standard

deviation

So why bother with the standard deviation?


The variance is a much more practical value to
have but its UNITS are NOT consistent with the
mean, median, or mode. Excel use the stdev ( )
command.

Analyzing a data set


A car manufacturer wishes to determine how
accurately the cylinders are being machined
in several engine blocks. The design
specification call for a cylinder diameter of
3.500 inches, with a tolerance of +/- 0.005
inches. See paper worksheet

Histograms
Thought the previous statistical characteristics
can prove useful in interpreting data, it is
often more desirable to the plot the data in a
manner that illustrates how the values are
distributed within their range. This is called a
HISTOGRAM or RELATIVE FREQUENCY
plot.

More on Histograms
To create a histogram, you must first subdivide
the range of the data into a series of
adjacent, equally spaced intervals. The first
interval must begin at or below the smallest
value (the min) and the last interval must
extend to or beyond the largest data value
(the max). These intervals are called CLASS
INTERVALS. Then you determine HOW
MANY values fall within each interval

The car manufacturer continued


The histogram feature is found under TOOLS then choose DATA
ANALYSIS. The choose histogram. There are two things the
histogram needs:





An INPUT RANGE this comes from your data. Click on the


Input range box then click on the first cell of the data, hold, and
highlight until the last cell is chosen
An OUTPUT RANGE this is the interval bounds. Do the same
click and hold
To see the chart you must click OUTPUT RANGE under
OUTPUT OPTIONS and specify where you want the chart
located. Click on the cell where you want it to be placed.

The car manufacturer continued


Your histogram
should look like
this!

Relative Frequency
Now we can go back and LOOK AT the percentage of
values that fell into each interval. These values were
found using the following equation:

ni
fi =
n
f = relative frequency in the interval
ni = number of values in that interval
n = total number of values in data set

Cumulative Distribution
A histogram can provide a great graphical illustration of
how a data set is distributed. A CUMULATIVE
DISTRIBUTION is equally important. It provides us
ANOTHER graphical way to view the
data.BUT.it allows us to determine the
LIKELIHOOD of a RANDOM VALUE being less than
or greater than a specified value. It is almost like a
percent chance and is the graphical representation
of the calculated relative frequency.

Cumulative Distribution Cont


To find the cumulative
distribution:
So basically you just sum
up the relative
frequency using the
interval prior.

F1 = f1
F2 = f1 + f 2
F3 = f1 + f 2 + f 3....

Create a cumulative distribution column


using your relative frequency data.

Plotting the Cumulative Distribution


Cut the original
histogram and
Choose TOOLS
then data analysis.
This time under
OUTPUT OPTIONS
click on cumulative
distribution and
chart output
Notice that the calculated CD values will appear!

Fixing The Cumulative Distribution Plot


The problem with this type of graph is that the
bar graph has GAPS in it.
 Right Click on one of the bars in the graph
 Choose FORMAT DATA SERIES
 Click on OPTIONS
 Change GAP WIDTH to ZERO!

Drawing inferences
A engineer can now look at the cumulative
distribution and randomly pull a part off of the
manufacturing line. The plot will tell him the
% likelihood that an arbitrary cylinder
diameter within a randomly selected engine
block WILL NOT exceed a certain length. For
example, what is the likelihood that a cylinder
will NOT exceed 3.503 inches?

Fitting Equations to Data


The data an engineer collects could reveal:
 Spatial profile
 Time history
 Cause and effect relationship
 System output as a function of input
Mathematical expressions are then used to
CAPTURE the relationship shown in the data

Fitting a straight line to a set of data


Data is usually represented by values that
show some SCATTER, which is due to
fluctuations or errors in measurement.
Therefore, we NEVER connect the dots on a
graph! We pass the points through an
AGGREGATE or TRENDLINE. In science,
this is probably referred to as a line of best
fit.

Force exerted by a spring


Data point
#
1

Distance (cm)

Force (N)

2.0

3.5

4.5

11

8.0

17

9.5

Making a Trendline






Using the data you just entered into EXCEL, use


chart wizard to construct a SCATTER plot. Place in
WORKSHEET 2. Add title and units to axes.
RIGHT CLICK on one of the data points (all should
highlight) and choose trendline.
Since this plot looks linear, choose LINEAR.
The choose OPTIONS and click on ADD equation to
chart and ADD R value.

Regression Statistics
Excel can also provide a great deal of built in
statistics. But they may prove MORE than
what you need.
 Choose TOOLS then DATA ANALYSIS
 Choose Regression
 Highlight the appropriate cells and where to
place the stats.

Assessing Quality using r2


The r2 value helps and engineer assess the QUALITY
of the curve fit.
Any number close to 1.0 is a good fit. You can think of
this value as a %fit. A 1.0 would represent 100%.
If the r2 value is too low, right click on the trendline and
change the type to LOGARITHMIC or other type of
curve fit. The largest r2 value is the one that fits the
data the best.

The OTHER fitting functions







Exponential
Logarithmic
Power Function
Polynomial ( NOTE: By INCREASING the
order, you can increase your r2 value)

Potrebbero piacerti anche