SlideShare a Scribd company logo
1 of 210
4 - *
© 2014 Pearson Education, Inc.
Forecasting
PowerPoint presentation to accompany
Heizer and Render
Operations Management, Eleventh Edition
Principles of Operations Management, Ninth Edition
PowerPoint slides by Jeff Heyl
4
© 2014 Pearson Education, Inc.
4 - *
© 2014 Pearson Education, Inc.
OutlineGlobal Company Profile:
Walt Disney Parks & ResortsWhat Is Forecasting?The Strategic
Importance of ForecastingSeven Steps in the Forecasting
SystemForecasting Approaches
*
4 - *
© 2014 Pearson Education, Inc.
Outline - ContinuedTime-Series ForecastingAssociative
Forecasting Methods: Regression and Correlation
AnalysisMonitoring and Controlling ForecastsForecasting in the
Service Sector
*
4 - *
© 2014 Pearson Education, Inc.
Learning Objectives
When you complete this chapter you should be able to
:Understand the three time horizons and which models apply for
each useExplain when to use each of the four qualitative
modelsApply the naive, moving average, exponential
smoothing, and trend methods
*
4 - *
© 2014 Pearson Education, Inc.
Learning Objectives
When you complete this chapter you should be able to :Compute
three measures of forecast accuracyDevelop seasonal
indicesConduct a regression and correlation analysisUse a
tracking signal
*
4 - *
© 2014 Pearson Education, Inc.
Global portfolio includes parks in Hong Kong, Paris, Tokyo,
Orlando, and Anaheim
Revenues are derived from people – how many visitors and how
they spend their money
Daily management report contains only the forecast and actual
attendance at each park
Forecasting Provides a Competitive Advantage for Disney
© 2014 Pearson Education, Inc.
*
4 - *
© 2014 Pearson Education, Inc.
Disney generates daily, weekly, monthly, annual, and 5-year
forecasts
Forecast used by labor management, maintenance, operations,
finance, and park scheduling
Forecast used to adjust opening times, rides, shows, staffing
levels, and guests admitted
Forecasting Provides a Competitive Advantage for Disney
© 2014 Pearson Education, Inc.
*
4 - *
© 2014 Pearson Education, Inc.
20% of customers come from outside the USA
Economic model includes gross domestic product, cross-
exchange rates, arrivals into the USA
A staff of 35 analysts and 70 field people survey 1 million park
guests, employees, and travel professionals each year
Forecasting Provides a Competitive Advantage for Disney
© 2014 Pearson Education, Inc.
*
4 - *
© 2014 Pearson Education, Inc.
Inputs to the forecasting model include airline specials, Federal
Reserve policies, Wall Street trends, vacation/holiday schedules
for 3,000 school districts around the world
Average forecast error for the 5-year forecast is 5%
Average forecast error for annual forecasts is between 0% and
3%
Forecasting Provides a Competitive Advantage for Disney
© 2014 Pearson Education, Inc.
*
4 - *
© 2014 Pearson Education, Inc.
What is Forecasting?Process of predicting a future
eventUnderlying basis
of all business decisionsProductionInventoryPersonnelFacilities
??
*
4 - *
© 2014 Pearson Education, Inc.
Short-range forecast
Up to 1 year, generally less than 3 months
Purchasing, job scheduling, workforce levels, job assignments,
production levels
Medium-range forecast
3 months to 3 years
Sales and production planning, budgeting
Long-range forecast
3+ years
New product planning, facility location, research and
development
Forecasting Time Horizons
*
4 - *
© 2014 Pearson Education, Inc.
Distinguishing Differences
Medium/long range forecasts deal with more comprehensive
issues and support management decisions regarding planning
and products, plants and processes
Short-term forecasting usually employs different methodologies
than longer-term forecasting
Short-term forecasts tend to be more accurate than longer-term
forecasts
*
4 - *
© 2014 Pearson Education, Inc.
Influence of Product Life Cycle
Introduction and growth require longer forecasts than maturity
and decline
As product passes through life cycle, forecasts are useful in
projecting
Staffing levels
Inventory levels
Factory capacity
Introduction – Growth – Maturity – Decline
*
4 - *
© 2014 Pearson Education, Inc.
Product Life Cycle
Figure 2.5
Best period to increase market share
R&D engineering is critical
Practical to change price or quality image
Strengthen niche
Poor time to change image, price, or quality
Competitive costs become critical
Defend market position
Cost control critical
Introduction Growth Maturity Decline
Company Strategy/Issues
Internet search engines
Sales
Drive-through restaurants
DVDs
Analog TVs
Boeing 787
Electric vehicles
iPods
3-D game players
3D printers
Xbox 360
*
4 - *
© 2014 Pearson Education, Inc.
Product Life Cycle
Product design and development critical
Frequent product and process design changes
Short production runs
High production costs
Limited models
Attention to quality
Forecasting critical
Product and process reliability
Competitive product improvements and options
Increase capacity
Shift toward product focus
Enhance distribution
Standardization
Fewer product changes, more minor changes
Optimum capacity
Increasing stability of process
Long production runs
Product improvement and cost cutting
Little product differentiation
Cost minimization
Overcapacity in the industry
Prune line to eliminate items not returning good margin
Reduce capacity
Figure 2.5
Introduction Growth Maturity Decline
OM Strategy/Issues
*
4 - *
© 2014 Pearson Education, Inc.
Types of Forecasts
Economic forecasts
Address business cycle – inflation rate, money supply, housing
starts, etc.
Technological forecasts
Predict rate of technological progress
Impacts development of new products
Demand forecasts
Predict sales of existing products and services
*
4 - *
© 2014 Pearson Education, Inc.
Strategic Importance of ForecastingSupply-Chain Management
– Good supplier relations, advantages in product innovation,
cost and speed to market Human Resources – Hiring, training,
laying off workersCapacity – Capacity shortages can result in
undependable delivery, loss of customers, loss of market share
4 - *
© 2014 Pearson Education, Inc.
Seven Steps in Forecasting
Determine the use of the forecast
Select the items to be forecasted
Determine the time horizon of the forecast
Select the forecasting model(s)
Gather the data needed to make the forecast
Make the forecast
Validate and implement results
*
4 - *
© 2014 Pearson Education, Inc.
The Realities!Forecasts are seldom perfect, unpredictable
outside factors may impact the forecastMost techniques assume
an underlying stability in the systemProduct family and
aggregated forecasts are more accurate than individual product
forecasts
4 - *
© 2014 Pearson Education, Inc.
Forecasting ApproachesUsed when situation is vague and little
data existNew productsNew technologyInvolves intuition,
experiencee.g., forecasting sales on Internet
Qualitative Methods
*
4 - *
© 2014 Pearson Education, Inc.
Forecasting ApproachesUsed when situation is ‘stable’ and
historical data existExisting productsCurrent
technologyInvolves mathematical techniquese.g., forecasting
sales of color televisions
Quantitative Methods
*
4 - *
© 2014 Pearson Education, Inc.
Overview of Qualitative Methods
Jury of executive opinion
Pool opinions of high-level experts, sometimes augment by
statistical models
Delphi method
Panel of experts, queried iteratively
*
4 - *
© 2014 Pearson Education, Inc.
Overview of Qualitative Methods
Sales force composite
Estimates from individual salespersons are reviewed for
reasonableness, then aggregated
Market Survey
Ask the customer
*
4 - *
© 2014 Pearson Education, Inc.
Involves small group of high-level experts and managersGroup
estimates demand by working togetherCombines managerial
experience with statistical modelsRelatively quick‘Group-think’
disadvantage
Jury of Executive Opinion
*
4 - *
© 2014 Pearson Education, Inc.
Delphi Method
Iterative group process, continues until consensus is reached
3 types of participants
Decision makers
Staff
Respondents
Staff
(Administering survey)
Decision Makers
(Evaluate responses and make decisions)
Respondents
(People who can make valuable judgments)
*
4 - *
© 2014 Pearson Education, Inc.
Sales Force CompositeEach salesperson projects his or her
salesCombined at district and national levelsSales reps know
customers’ wantsMay be overly optimistic
*
4 - *
© 2014 Pearson Education, Inc.
Market SurveyAsk customers about purchasing plansUseful for
demand and product design and planningWhat consumers say,
and what they actually do may be differentMay be overly
optimistic
*
4 - *
© 2014 Pearson Education, Inc.
Overview of Quantitative Approaches
Naive approach
Moving averages
Exponential smoothing
Trend projection
Linear regression
Time-series models
Associative model
*
4 - *
© 2014 Pearson Education, Inc.
Set of evenly spaced numerical data
Obtained by observing response variable at regular time periods
Forecast based only on past values, no other variables important
Assumes that factors influencing past and present will continue
influence in future
Time-Series Forecasting
*
4 - *
© 2014 Pearson Education, Inc.
Time-Series Components
Trend
Seasonal
Cyclical
Random
*
4 - *
© 2014 Pearson Education, Inc.
Components of Demand
Average demand over 4 years
Trend component
Random variation
Figure 4.1
Demand for product or service
| | | |
1 2 3 4
Time (years)
Actual demand line
Seasonal peaks
*
4 - *
© 2014 Pearson Education, Inc.
Persistent, overall upward or downward pattern
Changes due to population, technology, age, culture, etc.
Typically several years duration
Trend Component
*
4 - *
© 2014 Pearson Education, Inc.
Regular pattern of up and down fluctuations
Due to weather, customs, etc.
Occurs within a single year
Seasonal ComponentPERIOD LENGTH“SEASON”
LENGTHNUMBER OF “SEASONS” IN
PATTERNWeekDay7MonthWeek4 – 4.5MonthDay28 –
31YearQuarter4YearMonth12YearWeek52
*
4 - *
© 2014 Pearson Education, Inc.
Repeating up and down movements
Affected by business cycle, political, and economic factors
Multiple years duration
Often causal or
associative
relationships
Cyclical Component
0 5 10 15 20
*
4 - *
© 2014 Pearson Education, Inc.
Erratic, unsystematic, ‘residual’ fluctuations
Due to random variation or unforeseen events
Short duration
and nonrepeating
Random Component
M T W T F
*
4 - *
© 2014 Pearson Education, Inc.
Naive ApproachAssumes demand in next
period is the same as
demand in most recent periode.g., If January sales were 68, then
February sales will be 68Sometimes cost effective and
efficientCan be good starting point
*
4 - *
© 2014 Pearson Education, Inc.
MA is a series of arithmetic means
Used if little or no trend
Used often for smoothing
Provides overall impression of data over time
Moving Average Method
*
4 - *
© 2014 Pearson Education, Inc.
Moving Average Example
(10 + 12 + 13)/3 = 11 2/3
(12 + 13 + 16)/3 = 13 2/3
(13 + 16 + 19)/3 = 16MONTHACTUAL SHED SALES3-
MONTH MOVING
AVERAGEJanuary10February12March13April16May19June23J
uly26August30September28October18November16December14(
16 + 19 + 23)/3 = 19 1/3(19 + 23 + 26)/3 = 22 2/3(23 + 26 +
30)/3 = 26 1/3(29 + 30 + 28)/3 = 28(30 + 28 + 18)/3 = 25 1/3(28
+ 18 + 16)/3 = 20 2/3
10
12
13
4 - *
© 2014 Pearson Education, Inc.
Used when some trend might be present
Older data usually less important
Weights based on experience and intuition
Weighted Moving Average
Weighted moving average
*
4 - *
© 2014 Pearson Education, Inc.
Weighted Moving AverageMONTHACTUAL SHED SALES3-
MONTH WEIGHTED MOVING
AVERAGEJanuary10February12March13April16May19June23J
uly26August30September28October18November16December14
WEIGHTS APPLIEDPERIOD3Last month2Two months
ago1Three months ago6Sum of the weightsForecast for this
month =3 x Sales last mo. + 2 x Sales 2 mos. ago + 1 x Sales 3
mos. agoSum of the weights
[(3 x 13) + (2 x 12) + (10)]/6 = 12 1/6
10
12
13
4 - *
© 2014 Pearson Education, Inc.
Weighted Moving Average
[(3 x 13) + (2 x 12) + (10)]/6 = 12 1/6
10
12
13MONTHACTUAL SHED SALES3-MONTH WEIGHTED
MOVING
AVERAGEJanuary10February12March13April16May19June23J
uly26August30September28October18November16December14[
(3 x 16) + (2 x 13) + (12)]/6 = 14 1/3[(3 x 19) + (2 x 16) +
(13)]/6 = 17[(3 x 23) + (2 x 19) + (16)]/6 = 20 1/2[(3 x 26) + (2
x 23) + (19)]/6 = 23 5/6[(3 x 30) + (2 x 26) + (23)]/6 = 27
1/2[(3 x 28) + (2 x 30) + (26)]/6 = 28 1/3[(3 x 18) + (2 x 28) +
(30)]/6 = 23 1/3[(3 x 16) + (2 x 18) + (28)]/6 = 18 2/3
4 - *
© 2014 Pearson Education, Inc.
Increasing n smooths the forecast but makes it less sensitive to
changes
Does not forecast trends well
Requires extensive historical data
Potential Problems With
Moving Average
*
4 - *
© 2014 Pearson Education, Inc.
Graph of Moving Averages
Figure 4.2
| | | | | | | | | | | |
J F M A M J J A S O N D
Sales demand
30 –
25 –
20 –
15 –
10 –
5 –
Month
Actual sales
Moving average
Weighted moving average
*
4 - *
© 2014 Pearson Education, Inc.
Form of weighted moving average
Weights decline exponentially
Most recent data weighted most
Ranges from 0 to 1
Subjectively chosen
Involves little record keeping of past data
Exponential Smoothing
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing
New forecast = Last period’s forecast
+ a (Last period’s actual demand
– Last period’s forecast)
Ft = Ft – 1 + a(At – 1 - Ft – 1)
where Ft = new forecast
Ft – 1 = previous period’s forecast
a = smoothing (or weighting) constant (0 ≤ a ≤ 1)
At – 1 = previous period’s actual demand
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing Example
Predicted demand = 142 Ford Mustangs
Actual demand = 153
Smoothing constant a = .20
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing Example
Predicted demand = 142 Ford Mustangs
Actual demand = 153
Smoothing constant a = .20
New forecast = 142 + .2(153 – 142)
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing Example
Predicted demand = 142 Ford Mustangs
Actual demand = 153
Smoothing constant a = .20
New forecast = 142 + .2(153 – 142)
= 142 + 2.2
= 144.2 ≈ 144 cars
*
4 - *
© 2014 Pearson Education, Inc.
Effect of
Smoothing ConstantsSmoothing constant generally .05 ≤ a ≤
.50As a increases, older values become less significantWEIGHT
ASSIGNED TOSMOOTHING CONSTANTMOST RECENT
PERIOD
(a)2ND MOST RECENT PERIOD
a(1 – a)3RD MOST RECENT PERIOD
a(1 – a)24th MOST RECENT PERIOD
a(1 – a)35th MOST RECENT PERIOD
a(1 – a)4a = .1.1.09.081.073.066a = .5.5.25.125.063.031
*
4 - *
© 2014 Pearson Education, Inc.
225 –
200 –
175 –
150 –
| | | | | | | | |
1 2 3 4 5 6 7 8 9
Quarter
Demand
a = .1
Actual demand
a = .5
4 - *
© 2014 Pearson Education, Inc.
225 –
200 –
175 –
150 –
| | | | | | | | |
1 2 3 4 5 6 7 8 9
Quarter
Demand
a = .1
Actual demand
a = .5
changeCh
stable
4 - *
© 2014 Pearson Education, Inc.
The objective is to obtain the most accurate forecast no matter
the technique
We generally do this by selecting the model that gives us the
lowest forecast error
Forecast error = Actual demand – Forecast value
= At – Ft
*
4 - *
© 2014 Pearson Education, Inc.
Common Measures of Error
Mean Absolute Deviation (MAD)
4 - *
© 2014 Pearson Education, Inc.
Determining the MADQUARTERACTUAL TONNAGE
UNLOADEDFORECAST WITH a = .10FORECAST WITH
a = .5011801751752168175.50 = 175.00 + .10(180 – 175)
177.503159174.75 = 175.50 + .10(168 – 175.50)
172.754175173.18 = 174.75 + .10(159 – 174.75)
165.885190173.36 = 173.18 + .10(175 – 173.18)
170.446205175.02 = 173.36 + .10(190 – 173.36)
180.227180178.02 = 175.02 + .10(205 – 175.02)
192.618182178.22 = 178.02 + .10(180 – 178.02)
186.309?178.59 = 178.22 + .10(182 – 178.22) 184.15
4 - *
© 2014 Pearson Education, Inc.
Determining the MADQUARTERACTUAL TONNAGE
UNLOADEDFORECAST WITH
a = .10ABSOLUTE DEVIATION FOR a = .10FORECAST
WITH
a = .50ABSOLUTE DEVIATION FOR a = .501180 1755.00
1755.002168 175.507.50 177.509.503159
174.7515.75 172.7513.754175 173.181.82
165.889.125190 173.3616.64 170.4419.566205
175.0229.98 180.2224.787180 178.021.98
192.6112.618182 178.223.78 186.304.30Sum of
absolute deviations:82.4598.62MAD =
Σ|Deviations|10.3112.33n
4 - *
© 2014 Pearson Education, Inc.
Common Measures of Error
Mean Squared Error (MSE)
4 - *
© 2014 Pearson Education, Inc.
Determining the MSEQUARTERACTUAL TONNAGE
UNLOADEDFORECAST FOR a = .10(ERROR)21180 175 52
= 252168 175.50 (–7.5)2 = 56.253159 174.75 (–
15.75)2 = 248.064175 173.18 (1.82)2 = 3.315190
173.36 (16.64)2 = 276.896205 175.02 (29.98)2 =
898.807180 178.02 (1.98)2 = 3.928182 178.22
(3.78)2 = 14.29 Sum of errors squared = 1,526.52
4 - *
© 2014 Pearson Education, Inc.
Common Measures of Error
Mean Absolute Percent Error (MAPE)
4 - *
© 2014 Pearson Education, Inc.
Determining the MAPEQUARTERACTUAL TONNAGE
UNLOADEDFORECAST FOR a = .10ABSOLUTE PERCENT
ERROR
100(ERROR/ACTUAL)1180 175.00 100(5/180) =
2.78%2168 175.50 100(7.5/168) = 4.46%3159 174.75
100(15.75/159)= 9.90%4175 173.18 100(1.82/175) =
1.05%5190 173.36 100(16.64/190)= 8.76%6205 175.02
100(29.98/205)= 14.62%7180 178.02 100(1.98/180) =
1.10%8182 178.22 100(3.78/182) = 2.08% Sum of %
errors = 44.75%
4 - *
© 2014 Pearson Education, Inc.
Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
4 - *
© 2014 Pearson Education, Inc.
Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD =
∑ |deviations|
n
= 82.45/8 = 10.31
For a = .10
= 98.62/8 = 12.33
For a = .50
4 - *
© 2014 Pearson Education, Inc.
Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
= 1,526.54/8 = 190.82
For a = .10
= 1,561.91/8 = 195.24
For a = .50
MSE =
∑ (forecast errors)2
n
4 - *
© 2014 Pearson Education, Inc.
Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
MSE 190.82 195.24
= 44.75/8 = 5.59%
For a = .10
= 54.05/8 = 6.76%
For a = .50
MAPE =
∑100|deviationi|/actuali
n
n
i = 1
4 - *
© 2014 Pearson Education, Inc.
Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
MSE 190.82 195.24
MAPE 5.59% 6.76%
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing with Trend Adjustment
When a trend is present, exponential smoothing must be
modifiedMONTHACTUAL DEMANDFORECAST (Ft) FOR
MONTHS 1 – 51100Ft = 100 (given)2200 Ft = F1 + a(A1 –
F1) = 100 + .4(100 – 100) = 1003300 Ft = F2 + a(A2 – F2) =
100 + .4(200 – 100) = 1404400 Ft = F3 + a(A3 – F3) = 140
+ .4(300 – 140) = 2045500 Ft = F4 + a(A4 – F4) = 204 +
.4(400 – 204) = 282
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing with Trend Adjustment
Ft = a(At - 1) + (1 - a)(Ft - 1 + Tt - 1)
Tt = b(Ft - Ft - 1) + (1 - b)Tt - 1
where Ft = exponentially smoothed forecast average
Tt = exponentially smoothed trend
At = actual demand
a = smoothing constant for average (0 ≤ a ≤ 1)
b = smoothing constant for trend (0 ≤ b ≤ 1)
Forecast
including (FITt) =
trend
Exponentially Exponentially
smoothed (Ft) + smoothed (Tt)
forecast trend
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing with Trend Adjustment
Step 1: Compute Ft
Step 2: Compute Tt
Step 3: Calculate the forecast FITt = Ft + Tt
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing with Trend Adjustment Example
a = .2 b = .4MONTH (t)ACTUAL DEMAND
(At)MONTH (t)ACTUAL DEMAND
(At)11262121773132082841993652410?
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing with Trend Adjustment Example
F2 = aA1 + (1 – a)(F1 + T1)
F2 = (.2)(12) + (1 – .2)(11 + 2)
= 2.4 + (.8)(13) = 2.4 + 10.4
= 12.8 units
Step 1: Average for Month 2
12.80TABLE 4.1Forecast with a - .2 and b =
.4MONTHACTUAL DEMANDSMOOTHED FORECAST
AVERAGE, FtSMOOTHED TREND, TtFORECAST
INCLUDING TREND,
FITt11211213.0021732041952462173182893610—
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing with Trend Adjustment Example
T2 = b(F2 - F1) + (1 - b)T1
T2 = (.4)(12.8 - 11) + (1 - .4)(2)
= .72 + 1.2 = 1.92 units
Step 2: Trend for Month 2
1.92TABLE 4.1Forecast with a - .2 and b = .4MONTHACTUAL
DEMANDSMOOTHED FORECAST AVERAGE,
FtSMOOTHED TREND, TtFORECAST INCLUDING TREND,
FITt11211213.0021712.8032041952462173182893610—
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing with Trend Adjustment Example
FIT2 = F2 + T2
FIT2 = 12.8 + 1.92
= 14.72 units
Step 3: Calculate FIT for Month 2
14.72TABLE 4.1Forecast with a - .2 and b =
.4MONTHACTUAL DEMANDSMOOTHED FORECAST
AVERAGE, FtSMOOTHED TREND, TtFORECAST
INCLUDING TREND,
FITt11211213.0021712.801.9232041952462173182893610—
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing with Trend Adjustment ExampleTABLE
4.1Forecast with a - .2 and b = .4MONTHACTUAL
DEMANDSMOOTHED FORECAST AVERAGE,
FtSMOOTHED TREND, TtFORECAST INCLUDING TREND,
FITt11211213.0021712.801.9214.7232015.182.1017.2841917.82
2.3220.1452419.912.2322.1462122.512.3824.8973124.112.0726
.1882827.142.4529.5993629.282.3231.6010—32.482.6835.16
*
4 - *
© 2014 Pearson Education, Inc.
Exponential Smoothing with Trend Adjustment Example
Figure 4.3
| | | | | | | | |
1 2 3 4 5 6 7 8 9
Time (months)
Product demand
40 –
35 –
30 –
25 –
20 –
15 –
10 –
5 –
0 –
Actual demand (At)
Forecast including trend (FITt)
*
4 - *
© 2014 Pearson Education, Inc.
Trend Projections
Fitting a trend line to historical data points to project into the
medium to long-range
Linear trends can be found using the least squares technique
y = a + bx
^
where y = computed value of the variable to be predicted
(dependent variable)
a = y-axis intercept
b = slope of the regression line
x = the independent variable
^
*
4 - *
© 2014 Pearson Education, Inc.
Least Squares Method
Figure 4.4
Least squares method minimizes the sum of the squared errors
(deviations)
Deviation1
(error)
Deviation5
Deviation7
Deviation2
Deviation6
Deviation4
Deviation3
Actual observation
(y-value)
Trend line, y = a + bx
^
Time period
Values of Dependent Variable (y-values)
| | | | | | |
1 2 3 4 5 6 7
*
4 - *
© 2014 Pearson Education, Inc.
Least Squares Method
Equations to calculate the regression variables
*
4 - *
© 2014 Pearson Education, Inc.
Least Squares ExampleYEARELECTRICAL
POWER DEMANDYEARELECTRICAL
POWER DEMAND174510527961423807122490
*
4 - *
© 2014 Pearson Education, Inc.
Least Squares ExampleYEAR (x)ELECTRICAL POWER
DEMAND (y)x2xy 1 74 1 74 2 79 4 158 3
80 9 240 4 90 16 360 5 105 25 525 6
142 36 852 7 122 49 854 Σx = 28 Σy = 692
Σx2 = 140 Σxy = 3,063
*
4 - *
© 2014 Pearson Education, Inc.
Least Squares ExampleYEAR (x)ELECTRICAL POWER
DEMAND (y)x2xy 1 74 1 74 2 79 4 158 3
80 9 240 4 90 16 360 5 105 25 525 6
142 36 852 7 122 49 854 Σx = 28 Σy = 692
Σx2 = 140 Σxy = 3,063
Demand in year 8 = 56.70 + 10.54(8)
= 141.02, or 141 megawatts
*
4 - *
© 2014 Pearson Education, Inc.
Least Squares Example
Figure 4.5
| | | | | | | | |
1 2 3 4 5 6 7 8 9
160 –
150 –
140 –
130 –
120 –
110 –
100 –
90 –
80 –
70 –
60 –
50 –
Year
Power demand (megawatts)
Trend line,
y = 56.70 + 10.54x
^
*
4 - *
© 2014 Pearson Education, Inc.
Least Squares Requirements
We always plot the data to insure a linear relationship
We do not predict time periods far beyond the database
Deviations around the least squares line are assumed to be
random
4 - *
© 2014 Pearson Education, Inc.
Seasonal Variations In Data
The multiplicative seasonal model can adjust trend data for
seasonal variations in demand
*
4 - *
© 2014 Pearson Education, Inc.
Seasonal Variations In DataFind average historical demand for
each monthCompute the average demand over all
monthsCompute a seasonal index for each monthEstimate next
year’s total demandDivide this estimate of total demand by the
number of months, then multiply it by the seasonal index for
that month
Steps in the process for monthly seasons:
*
4 - *
© 2014 Pearson Education, Inc.
Seasonal Index Example
90
80
85
100
123
115
105
100
90
80
80
80
Total average annual demand =
1,128DEMANDMONTHYEAR 1YEAR 2YEAR 3AVERAGE
YEARLY DEMANDAVERAGE MONTHLY
DEMANDSEASONAL INDEXJan 80 85 105Feb 70 85
85Mar 80 93 82Apr 90 95 115May 113
125 131June 110 115 120July 100 102 113Aug 88
102 110Sept 85 90 95Oct 77 78 85Nov 75
82 83Dec 82 78 80
4 - *
© 2014 Pearson Education, Inc.
Seasonal Index ExampleDEMANDMONTHYEAR 1YEAR
2YEAR 3AVERAGE YEARLY DEMANDAVERAGE
MONTHLY DEMANDSEASONAL INDEXJan 80 85
1059094Feb 70 85 858094Mar 80 93
828594Apr 90 95 11510094May 113 125
13112394June 110 115 12011594July 100 102
11310594Aug 88 102 11010094Sept 85 90
959094Oct 77 78 858094Nov 75 82
838094Dec 82 78 808094Total average annual
demand =1,128
Average monthly demand
4 - *
© 2014 Pearson Education, Inc.
Seasonal Index Example
.957( = 90/94)DEMANDMONTHYEAR 1YEAR 2YEAR
3AVERAGE YEARLY DEMANDAVERAGE MONTHLY
DEMANDSEASONAL INDEXJan 80 85 1059094Feb 70
85 858094Mar 80 93 828594Apr 90 95
11510094May 113 125 13112394June 110 115
12011594July 100 102 11310594Aug 88 102
11010094Sept 85 90 959094Oct 77 78
858094Nov 75 82 838094Dec 82 78
808094Total average annual demand =1,128
Seasonal index
4 - *
© 2014 Pearson Education, Inc.
Seasonal Index ExampleDEMANDMONTHYEAR 1YEAR
2YEAR 3AVERAGE YEARLY DEMANDAVERAGE
MONTHLY DEMANDSEASONAL INDEXJan 80 85
1059094.957( = 90/94)Feb 70 85 858094.851( =
80/94)Mar 80 93 828594.904( = 85/94)Apr 90 95
115100941.064( = 100/94)May113 125 131123941.309( =
123/94)June 110 115 120115941.223( = 115/94)July 100
102 113105941.117( = 105/94)Aug 88 102
110100941.064( = 100/94)Sept 85 90 959094.957(
= 90/94)Oct 77 78 858094.851( = 80/94)Nov 75 82
838094.851( = 80/94)Dec 82 78 808094.851( =
80/94)Total average annual demand =1,128
4 - *
© 2014 Pearson Education, Inc.
Seasonal Index Example
Seasonal forecast for Year
4MONTHDEMANDMONTHDEMANDJan1,200x .957 =
96July1,200x 1.117 = 1121212Feb1,200x .851 = 85Aug1,200x
1.064 = 1061212Mar1,200x .904 = 90Sept1,200x .957 =
961212Apr1,200x 1.064 = 106Oct1,200x .851 =
851212May1,200x 1.309 = 131Nov1,200x .851 =
851212June1,200x 1.223 = 122Dec1,200x .851 = 851212
4 - *
© 2014 Pearson Education, Inc.
Seasonal Index Example
140 –
130 –
120 –
110 –
100 –
90 –
80 –
70 –
| | | | | | | | | | | |
J F M A M J J A S O N D
Time
Demand
Year 4 Forecast
Year 3 Demand
Year 2 Demand
Year 1 Demand
4 - *
© 2014 Pearson Education, Inc.
San Diego Hospital
Figure 4.6
Trend Data
10,200 –
10,000 –
9,800 –
9,600 –
9,400 –
9,200 –
9,000 –
| | | | | | | | | | | |
Jan Feb Mar Apr May June July Aug Sept Oct Nov
Dec
67 68 69 70 71 72 73 74 75 76 77 78
Month
Inpatient Days
9530
9551
9573
9594
9616
9637
9659
9680
9702
9724
9745
9766
4 - *
© 2014 Pearson Education, Inc.
San Diego HospitalSeasonality Indices for Adult Inpatient Days
at San Diego HospitalMONTHSEASONALITY
INDEXMONTHSEASONALITY INDEXJanuary
1.04July1.03February0.97August1.04March1.02September0.97A
pril1.01October1.00May0.99November0.96June0.99December0.
98
4 - *
© 2014 Pearson Education, Inc.
San Diego Hospital
Figure 4.7
Seasonal Indices
1.06 –
1.04 –
1.02 –
1.00 –
0.98 –
0.96 –
0.94 –
0.92 –
| | | | | | | | | | | |
Jan Feb Mar Apr May June July Aug Sept Oct Nov
Dec
67 68 69 70 71 72 73 74 75 76 77 78
Month
Index for Inpatient Days
1.04
1.02
1.01
0.99
1.03
1.04
1.00
0.98
0.97
0.99
0.97
0.96
4 - *
© 2014 Pearson Education, Inc.
San Diego
HospitalPeriod676869707172MonthJanFebMarAprMayJuneFore
cast with Trend &
Seasonality9,9119,2659,1649,6919,5209,542Period7374757677
78MonthJulyAugSeptOctNovDecForecast with Trend &
Seasonality9,94910,0689,4119,7249,3559,572
4 - *
© 2014 Pearson Education, Inc.
San Diego Hospital
Figure 4.8
Combined Trend and Seasonal Forecast
10,200 –
10,000 –
9,800 –
9,600 –
9,400 –
9,200 –
9,000 –
| | | | | | | | | | | |
Jan Feb Mar Apr May June July Aug Sept Oct Nov
Dec
67 68 69 70 71 72 73 74 75 76 77 78
Month
Inpatient Days
9911
9265
9764
9520
9691
9411
9949
9724
9542
9355
10068
9572
4 - *
© 2014 Pearson Education, Inc.
Adjusting Trend Data
Quarter I:
Quarter II:
Quarter III:
Quarter IV:
4 - *
© 2014 Pearson Education, Inc.
Associative Forecasting
Used when changes in one or more independent variables can be
used to predict the changes in the dependent variable
Most common technique is linear regression analysis
We apply this technique just as we did in the time-series
example
4 - *
© 2014 Pearson Education, Inc.
Associative Forecasting
Forecasting an outcome based on predictor variables using the
least squares technique
y = a + bx
^
where y = value of the dependent variable (in our
example, sales)
a = y-axis intercept
b = slope of the regression line
x = the independent variable
^
*
4 - *
© 2014 Pearson Education, Inc.
Associative Forecasting ExampleNODEL’S SALES
(IN $ MILLIONS), yAREA PAYROLL
(IN $ BILLIONS), xNODEL’S SALES
(IN $ MILLIONS), yAREA PAYROLL
(IN $ BILLIONS), x2.012.023.032.012.543.57
4.0 –
3.0 –
2.0 –
1.0 –
| | | | | | |
0 1 2 3 4 5 6 7
Area payroll (in $ billions)
Nodel’s sales
(in$ millions)
4 - *
© 2014 Pearson Education, Inc.
Associative Forecasting ExampleSALES, yPAYROLL,
xx2xy2.0112.03.0399.02.541610.02.0244.02.0112.03.574924.5Σ
y =15.0Σx =18Σx2 =80Σxy =51.5
4 - *
© 2014 Pearson Education, Inc.
Associative Forecasting ExampleSALES, yPAYROLL,
xx2xy2.0112.03.0399.02.541610.02.0244.02.0112.03.574924.5Σ
y =15.0Σx =18Σx2 =80Σxy =51.5
4 - *
© 2014 Pearson Education, Inc.
Associative Forecasting ExampleSALES, yPAYROLL,
xx2xy2.0112.03.0399.02.541610.02.0244.02.0112.03.574924.5Σ
y =15.0Σx =18Σx2 =80Σxy =51.5
4.0 –
3.0 –
2.0 –
1.0 –
| | | | | | |
0 1 2 3 4 5 6 7
Area payroll (in $ billions)
Nodel’s sales
(in$ millions)
4 - *
© 2014 Pearson Education, Inc.
Associative Forecasting Example
If payroll next year is estimated to be $6 billion, then:
Sales (in $ millions) = 1.75 + .25(6)
= 1.75 + 1.5 = 3.25
Sales = $3,250,000
4 - *
© 2014 Pearson Education, Inc.
Associative Forecasting Example
If payroll next year is estimated to be $6 billion, then:
Sales (in$ millions) = 1.75 + .25(6)
= 1.75 + 1.5 = 3.25
Sales = $3,250,000
3.25
4.0 –
3.0 –
2.0 –
1.0 –
| | | | | | |
0 1 2 3 4 5 6 7
Area payroll (in $ billions)
Nodel’s sales
(in$ millions)
4 - *
© 2014 Pearson Education, Inc.
Standard Error of the EstimateA forecast is just a point estimate
of a future valueThis point is
actually the
mean of a
probability
distribution
Figure 4.9
4.0 –
3.0 –
2.0 –
1.0 –
| | | | | | |
0 1 2 3 4 5 6 7
Area payroll (in $ billions)
Nodel’s sales
(in$ millions)
3.25
Regression line,
4 - *
© 2014 Pearson Education, Inc.
Standard Error of the Estimate
where y = y-value of each data point
yc = computed value of the dependent variable, from
the regression equation
n = number of data points
4 - *
© 2014 Pearson Education, Inc.
Standard Error of the Estimate
Computationally, this equation is considerably easier to use
We use the standard error to set up prediction intervals around
the point estimate
4 - *
© 2014 Pearson Education, Inc.
Standard Error of the Estimate
The standard error of the estimate is $306,000 in sales
4.0 –
3.0 –
2.0 –
1.0 –
| | | | | | |
0 1 2 3 4 5 6 7
Area payroll (in $ billions)
Nodel’s sales
(in$ millions)
3.25
4 - *
© 2014 Pearson Education, Inc.
How strong is the linear relationship between the variables?
Correlation does not necessarily imply causality!
Coefficient of correlation, r, measures degree of association
Values range from -1 to +1
Correlation
*
4 - *
© 2014 Pearson Education, Inc.
Correlation Coefficient
*
4 - *
© 2014 Pearson Education, Inc.
Correlation Coefficient
Figure 4.10
y
x
(a) Perfect negative correlation
y
x
(c) No correlation
y
x
(d) Positive correlation
y
x
(e) Perfect positive correlation
y
x
(b) Negative correlation
High
Moderate
Low
Correlation coefficient values
High
Moderate
Low
| | | | | | | | |
–1.0 –0.8 –0.6 –0.4 –0.2 0 0.2 0.4 0.6 0.8 1.0
*
4 - *
© 2014 Pearson Education, Inc.
Correlation
Coefficientyxx2xyy22.0112.04.03.0399.09.02.541610.06.252.02
44.04.02.0112.04.03.574924.512.25Σy =15.0Σx =18Σx2 =80Σxy
=51.5Σy2 =39.5
*
4 - *
© 2014 Pearson Education, Inc.
Coefficient of Determination, r2, measures the percent of
change in y predicted by the change in x
Values range from 0 to 1
Easy to interpret
Correlation
For the Nodel Construction example:
r = .901
r2 = .81
*
4 - *
© 2014 Pearson Education, Inc.
Multiple-Regression Analysis
If more than one independent variable is to be used in the
model, linear regression can be extended to multiple regression
to accommodate several independent variables
Computationally, this is quite complex and generally done on
the computer
4 - *
© 2014 Pearson Education, Inc.
Multiple-Regression Analysis
In the Nodel example, including interest rates in the model
gives the new equation:
An improved correlation coefficient of r = .96 suggests this
model does a better job of predicting the change in construction
sales
Sales = 1.80 + .30(6) - 5.0(.12) = 3.00
Sales = $3,000,000
4 - *
© 2014 Pearson Education, Inc.
Measures how well the forecast is predicting actual values
Ratio of cumulative forecast errors to mean absolute deviation
(MAD)
Good tracking signal has low values
If forecasts are continually high or low, the forecast has a bias
error
Monitoring and Controlling Forecasts
Tracking Signal
*
4 - *
© 2014 Pearson Education, Inc.
Monitoring and Controlling Forecasts
Tracking signal
Cumulative error
MAD
=
*
4 - *
© 2014 Pearson Education, Inc.
Tracking Signal
Figure 4.11
Tracking signal
+
0 MADs
–
Upper control limit
Lower control limit
Time
Signal exceeding limit
Acceptable range
*
4 - *
© 2014 Pearson Education, Inc.
Tracking Signal Example
QTRACTUAL DEMANDFORECAST DEMANDERRORCUM
ERRORABSOLUTE FORECAST ERRORCUM ABS
FORECAST ERRORMADTRACKING SIGNAL (CUM
ERROR/MAD)190100–10–10101010.0–10/10 = –1295100–5–
155157.5–15/7.5 = –23115100+150153010.0/10 = 04100110–
10–10104010.10/10 = –15125110+15+5155511.0+5/11 =
+0.56140110+30+35308514.2+35/14.2 = +2.5
At the end of quarter 6,
*
4 - *
© 2014 Pearson Education, Inc.
Adaptive SmoothingIt’s possible to use the computer to
continually monitor forecast error and adjust the values of the a
and b coefficients used in exponential smoothing to continually
minimize forecast errorThis technique is called adaptive
smoothing
4 - *
© 2014 Pearson Education, Inc.
Focus ForecastingDeveloped at American Hardware Supply,
based on two principles:Sophisticated forecasting models are
not always better than simple onesThere is no single technique
that should be used for all products or servicesUses historical
data to test multiple forecasting models for individual
itemsForecasting model with the lowest error used to forecast
the next demand
4 - *
© 2014 Pearson Education, Inc.
Forecasting in the Service Sector
Presents unusual challenges
Special need for short term records
Needs differ greatly as function of industry and product
Holidays and other calendar events
Unusual events
*
4 - *
© 2014 Pearson Education, Inc.
Fast Food Restaurant Forecast
Figure 4.12
20% –
15% –
10% –
5% –
11-12 1-2 3-4 5-6 7-8 9-10
12-1 2-3 4-5 6-7 8-9 10-11
(Lunchtime)
(Dinnertime)
Hour of day
Percentage of sales by hour of day
*
4 - *
© 2014 Pearson Education, Inc.
FedEx Call Center Forecast
Figure 4.12
2
4
6
8
10
12
2
4
6
8
10
12
12% –
10% –
8% –
6% –
4% –
2% –
0% –
Hour of day
A.M.
P.M.
*
4 - *
© 2014 Pearson Education, Inc.
All rights reserved. No part of this publication may be
reproduced, stored in a retrieval system, or transmitted, in any
form or by any means, electronic, mechanical, photocopying,
recording, or otherwise, without the prior written permission of
the publisher.
Printed in the United States of America.
Moving average =
demand in previous n periods∑
n
Moving average=
demand in previous n periods
å
n
=
Weight for period n( ) Demand in period n( )( )∑
Weights∑
=
Weight for period n
( )
Demand in period n
( )
( )
å
Weights
å
MAD =
Actual - Forecast∑
n
MAD=
Actual - Forecast
å
n
MSE =
Forecast errors( )
2
∑
n
MSE=
Forecast errors
( )
2
å
n
MSE =
Forecast errors( )
2
∑
n
=1,526.52 / 8 =190.8
MSE=
Forecast errors
( )
2
å
n
=1,526.52/8=190.8
MAPE=
100 Actuali −Forecasti
i=1
n
∑ / Actuali
n
MAPE=
100Actual
i
-Forecast
i
i=1
n
å
/Actual
i
n
MAPE =
absolute percent error∑
n
=
44.75%
8
= 5.59%
MAPE=
absolute percent error
å
n
=
44.75%
8
=5.59%
ŷ = a+bx
ˆ
y=a+bx
b=
xy−nxy∑
x2 −nx2∑
b=
xy-nxy
å
x
2
-nx
2
å
a = y −bx
a=y-bx
x =
x∑
n
=
28
7
= 4 y =
y∑
n
=
692
7
= 98.86
x=
x
å
n
=
28
7
=4 y=
y
å
n
=
692
7
=98.86
b=
xy−nxy∑
x2 −nx2∑
=
3,063− 7( ) 4( ) 98.86( )
140− 7( ) 42( )
=
295
28
=10.54
b=
xy-nxy
å
x
2
-nx
2
å
=
3,063-7
()
4
()
98.86
()
140-7
()
4
2
()
=
295
28
=10.54
a = y −bx =98.86−10.54 4( ) =56.70
a=y-bx=98.86-10.544
()
=56.70
Thus, ŷ = 56.70+10.54x
Thus,
ˆ
y=56.70+10.54x
=
1,128
12 months
= 94
=
1,128
12 months
= 94
=
Average monthly demand for past 3 years
Average monthly demand
=
Average monthly demand for past 3 years
Average monthly demand
ŷseasonal = Index × ŷtrend forecast
ˆ
y
seasonal
=Index´
ˆ
y
trend forecast
ŷI = (1.30)($100,000)=$130,000
ŷII = (.90)($120,000)=$108,000
ŷIII = (.70)($140,000)=$98,000
ŷIV = (1.10)($160,000)=$176,000
ˆ
y
I
=(1.30)($100,000)=$130,000
ˆ
y
II
=(.90)($120,000)=$108,000
ˆ
y
III
=(.70)($140,000)=$98,000
ˆ
y
IV
=(1.10)($160,000)=$176,000
x =
x∑
6
=
18
6
= 3 y =
y∑
6
=
15
6
= 2.5
x=
x
å
6
=
18
6
=3 y=
y
å
6
=
15
6
=2.5
b=
xy−nxy∑
x2 −nx2∑
=
51.5−(6)(3)(2.5)
80−(6)(32)
= .25 a = y −bx = 2.5−(.25)(3)=1.75
b=
xy-nxy
å
x
2
-nx
2
å
=
51.5-(6)(3)(2.5)
80-(6)(3
2
)
=.25 a=y-bx=2.5-(.25)(3)=1.75
ŷ =1.75+.25x
Sales=1.75+.25(payroll)
ˆ
y=1.75+.25x
Sales=1.75+.25(payroll)
ŷ =1.75+.25x
ˆ
y=1.75+.25x
Sy,x =
(y− yc)
2∑
n−2
S
y,x
=
(y-y
c
)
2
å
n-2
Sy,x =
y2 −a y∑ −b xy∑∑
n−2
S
y,x
=
y
2
-ay
å
-bxy
åå
n-2
Sy,x =
y2 −a y∑ −b xy∑∑
n− 2
=
39.5−1.75(15.0)−.25(51.5)
6− 2
= .09375
= .306 (in $ millions)
S
y,x
=
y
2
-ay
å
-bxy
åå
n-2
=
39.5-1.75(15.0)-.25(51.5)
6-2
=.09375
=.306 (in $ millions)
r =
n xy− x y∑∑∑
n x2 − x∑( )
2
∑
⎡
⎣ ⎢
⎤
⎦ ⎥
n y2 − y∑( )
2
∑
⎡
⎣ ⎢
⎤
⎦ ⎥
r=
nxy-xy
ååå
nx
2
-x
å
()
2
å
é
ë
ê
ù
û
ú
ny
2
-y
å
()
2
å
é
ë
ê
ù
û
ú
r =
(6)(51.5)– (18)(15.0)
(6)(80)– (18)2⎡ ⎣
⎤
⎦ – (15.0)
2⎡
⎣
⎤
⎦
r=
(6)(51.5)–(18)(15.0)
(6)(80)–(18)
2
é
ë
ù
û
(16)(39.5)–(15.0)
2
é
ë
ù
û
=
309−270
(156)(12)
=
39
1,872
=
39
43.3
= .901
=
309-270
(156)(12)
=
39
1,872
=
39
43.3
=.901
ŷ =a+b1x1+b2x2
ˆ
y=a+b
1
x
1
+b
2
x
2
ŷ =1.80+.30x1−5.0x2
ˆ
y=1.80+.30x
1
-5.0x
2
=
(Actual demand in period i−Forecast demand in period i)∑
Actual−Forecast∑
n
=
(Actual demand in period i-Forecast demand in period i)
å
Actual-Forecast
å
n
MAD =
Forecast errors∑
n
=
85
6
=14.2
MAD=
Forecast errors
å
n
=
85
6
=14.2
Tracking signal =
Cumulative error
MAD
=
35
14.2
= 2.5 MADs
Tracking signal=
Cumulative error
MAD
=
35
14.2
=2.5 MADs
Sample Computing Project Report
Square Plate in Orthogonal Guides
Keith D. Hjelmstad
June 19, 2015
Introduction
The subject of the investigation for the Sample Computing
Project is the
Square Plate in Orthogonal Guides. The system is illustrated in
Fig. 1.
The mechanism consists of a square plate of uniform thickness
and
dimension b that is constrained in such a way that two of its
corners must
move in orthogonal guides—one horizontal and the other
vertical. We
assume that the guides do not have friction and are restrained
against
motion in either direction (i.e., there is no possibility of uplift).
The corner
B is subjected to a constant force P acting vertically. As the
plate moves,
the corner C moves and the plate rotates (by an angle θ, as
shown in the
sketch). We assume that the guide that constrains point B can
pass by the
guide that constrains point C so that point B can actually move
below the
horizontal guide. The task is to describe the behavior of this
system.
In this report we first derive the equations of motion that are
implemented
in the code and verify the code by observing certain aspects of
the response
in certain specific scenarios. With the verified code we explore
several
aspects of the response of the system, including the influence of
the initial
angle, the initial angular velocity, and the magnitude of the
applied load. We extend the scope of the
problem slightly by adding a viscous damping term. We make
observations on the behavior of the horizontal
reaction force at point B under dynamic loads and we make an
observation about the geometry of the motion
of the corners of the plate as constrained by the guides. We also
comment on other aspects of the problem
which could be explored using the code, but are not covered in
this report.
Theory
Derivation of the equations of motion. The motion of the plate
can be completely characterized by the
angle θ, which depends upon time. The system is a rigid body
undergoing motion in a plane. The body must
respect balance of linear and angular momentum. There are no
mechanisms of energy dissipation (e.g.,
friction). Therefore, the system should conserve energy and we
can use that fact to derive the equations of
motion and verify the code. The full derivation of the equations
of motion can be found in Appendix B
(which is also the solution to HW problem 0.0.0).
Note that in the derivation we first characterize the motion with
two variables (θ and z) and subsequently
enforce the constraint that the motion must be along the guides
at the two constrained points. Note that due
to the kinematic description we have selected, the constraint at
point C is automatically satisfied. We achieve
the constraint at B by forcing the velocity at that point to be
zero in the 1e (horizontal) direction. Setting
1 0B ⋅
can use that relationship to eliminate the variable z
from our equations (but note that we sometimes still use z to
keep the algebra simpler).
P
b
b
B
C
θ
Fig. 1 Illustration of
application problem
Sample Computing Project Square Plate in Orthogonal Guides
2
The equations of motion for the system are—either from
conservation of energy or from balance of angular
momentum—given by the equation (see Appendix B for details
of the derivation)
( )3 34 2 cos sin 0
P g
W b
where 2W gbρ= is the total weight of the plate (density time
thickness times area), P is the applied force,
b is the length of the sides of the plate, g is the acceleration of
gravity, and ( )tθ is the angle that the plate
makes with the horizontal. The equation is a second-order,
nonlinear differential equation in the variable θ.
We will solve this equation numerically and include initial
in our program so that they can be varied and studied.
The horizontal reaction force at point B can be obtained from
balance of linear momentum. The magnitude
of this force is
(2)
The derivation of this expression can also be found in Appendix
B.
Equations for Numerical Analysis. The equations for numerical
integration of a second order dynamical
system were derived in the Course Notes entitled Numerical
Methods—integrating the equations of motion
(Hjelmstad, 2013). Let the angle, angular velocity and angular
acceleration at the discrete time nt t= be
denoted as follows:
The generalized trapezoidal rule allows us to estimate the
values of the angle and angular velocity at the
next time step 1n nt t t+ = + ∆ (where t∆ is the size of the time
step) as
( )
( )
1 1
1 1
(1 )
(1 )
n n n n
n n n n
v v t a a
x x t v v
β β
β β
+ +
+ +
= + ∆ + −
= + ∆ + −
(4)
where β is a numerical analysis parameter (which we usually set
to 0.5). If we also satisfy the equation of
motion at the next time step, then we have enough equations to
solve for the three state variables at the new
time step. Those three equations, then, enable the solution of
the differential equation starting from known
initial conditions and marching forward in time. The equation of
motion in the discrete variables is
( )3 31 1 14 2 cos( ) sin( ) 0n n n
P g
a x x
W b+ + +
(5)
In anticipation of using Newton’s Method (see the Course Notes
entitled Newton’s Method—solving
nonlinear algebraic equations (Hjelmstad, 2013) for details) to
solve the equations of motion we define the
residual as
( )3 31 1 1 14 2( ) cos( ) sin( )n n n n
P g
g a a x x
W b+ + + +
(6)
The tangent for this residual is simply the derivative of g with
respect to its argument 1na +
( )1 3 31 1 14 2
1
( )
1 sin( ) cos( )nn n n
n
g a P g
A x x
a W b
ζ++ + +
+
(7)
where 2 21 1( ) / ( ) (1 )n nd x d a tζ β+ += = ∆ − by virtue of
Eqn. (4) and as shown in detail in Appendix B. Note
that we have used the chain rule in the derivation of the tangent
matrix. Since there is only one variable the
Sample Computing Project Square Plate in Orthogonal Guides
3
tangent matrix is 1 1× . We can solve the equations in the code
by applying Newton’s method, with these
definitions. The code is given in Appendix A.
Code Verification. In order to verify that the code computes the
intended results we will consider several
verification scenarios. Because the governing equation of
motion is nonlinear there are no known analytical
solutions to compare the results to. However, we can verify that
the energy is conserved by plotting the
energy versus time (that is an independent verification because
we do not actually use conservation of
energy to advance the solution in the code). Figure 2 shows the
response of the system initially at rest with
P/W = 0.65.
We can also verify the code if we can specify initial conditions
and a force P that is in static equilibrium.
By statics, we can easily show that when the plate is initially at
rest then a force of 12P W= should hold
the plate in static equilibrium (at any angle). Figure 3 shows the
system with initial angle set to 0.4oθ =
0 5 10 15 20
0
5
10
15
t
T
(
bl
ue
),
U
(
re
d)
,
W
k
(c
ya
n)
,
E
(
bl
ac
k)
Energy and Work vs. Time
0 2 4 6 8 10 12 14 16 18 20
0
0.5
1
1.5
2
t
A
ng
le
Angle vs. Time
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
t
A
ng
lu
la
r
V
el
oc
ity
Angular Velocity vs. Time
Fig 2. Verification problem. Plate is initially at rest with
P/W=0.65. The energy plot
shows that the net energy (energy minus work done by the
load), shown in black,
remains constant. The kinetic energy is shown in blue, the
potential energy is shown
in red, and the work done by the load is shown in cyan.
0 1 2 3 4 5 6 7 8 9 10
-1
0
1
2
t
A
ng
le
Angle vs. Time
0 1 2 3 4 5 6 7 8 9 10
-1
-0.5
0
0.5
1
t
A
ng
lu
la
r
V
el
oc
ity
Angular Velocity vs. Time
Fig 3. Verification problem. Plate has initial angle of θο = 0.4,
zero initial angular
velocity and load P=W/2. The plot shows that the angle remains
constant with zero
angular velocity (that is the definition of static).
Sample Computing Project Square Plate in Orthogonal Guides
4
with zero initial angular velocity. The plot of angle and angular
velocity versus time shows that the angle
remains constant. That is the definition of static. The picture
from the animation (a movie, which in this
case does not move) is shown to depict the (static) position of
the plate.
As a final verification, we can observe that values of 12P W<
should result in a downward motion
(counterclockwise rotation) initially because the weight of the
block should overcome the upward force and
values 12P W> should result in upward motion (clockwise
rotation) initially because the upward force
should overcome the weight. This observation is best done
through the animation. However, you can see
from Fig. 2 that in the case where the load trumps the weight
the angle initially moves in the positive
direction. According to our sign convention that is a clockwise
angle, as expected.
Study and Results
The physical system in this computing project is a very specific
one; in essence, it is a device. The aim of
the study for this project is to understand the behavior of the
device under various initial conditions and by
looking at it through various lenses (essentially the output
graphics generated by the code). We will try to
find general trends and make general conclusions about the
behavior. We will extend the scope of the
problem slightly by introducing a velocity-dependent damping
mechanism. To accomplish this task we will
need to augment our theory and add the new feature to the code.
The damped system will allow us to
examine the eventual static repose of the system when all of the
kinetic energy has been drained (through
damping) from the system.
General motion of the system. In the verification section we
have already been introduced to some aspects
of the motion of the system. Recall that Fig. 2 showed the
response of the system initially horizontal (θ =
0) and at rest, subjected to a load of P/W = 0.65. We have
already observed that the motion of the system
is initially in the direction of the load (i.e., the load overwhelms
the weight). Both the angle and angular
velocity move initially in the positive direction. One can
observe from those response curves that the angle
achieves a maximum of 1.57θ = radians. That means that the
plate rotates all the way to the other side
(180 degrees) before turning around and rotating back the other
way.
Another observation is that the velocity at the peak of the
motion (i.e., where the angle is greatest) is zero.
The angular velocity is the rate of change of the angle. When
the angle turns around, its rate of change must
pass through zero. This is, in fact, another verification of the
correctness of the code.
One can also see in Fig. 2 that the period of oscillation (time
between peaks) of the motion is approximately
8 seconds. The apparent period of oscillation of the energy is
exactly half that value. The reason that the
energy oscillates twice as fast as the motion itself, is a property
of energy. In motion, the system converts
potential to kinetic energy, and vice versa. The kinetic energy is
maximum when the motion is at its peak
and returns to its initial value (zero in this case) when the plate
reaches its extreme angle. Observe that the
angular velocity peaks twice in each cycle (once positive and
once negative).
Initial Angle. In Fig. 4 we examine the effect of varying the
initial angle for that same experiment. The
response curves show that the plate rotates exactly to the
complement of the initial angle, giving a
completely symmetric response. The first case oscillates
between 0 and π. The second case oscillates
between 0.3 and π−0.3. The third case oscillates between 0.6
and π−0.6.
The angular velocity curves in Fig. 4 do appear to pass through
zero at the same time, but seem to lose some
coherence as time goes on. The cause of this phenomenon is
unknown. It could be due to loss of accuracy
of the numerical integration, but reduction of the time step
seems to rule this out. Perhaps this phenomenon
is worthy of more study in the future (time and space do not
allow it here).
Sample Computing Project Square Plate in Orthogonal Guides
5
Initial velocity. We can examine the effects of changing the
initial angular velocity. Many of the trends are
best made from observing the animation of the motion. Some
experimentation with small values of P show
that the system tends oscillate like a pendulum for low initial
angular velocities. With no damping, there is
an initial angular velocity great enough to get the system
spinning. If damping is added for such a case, the
system will spin until it loses enough energy, after which it will
oscillate with decreasing amplitude until it
comes to rest in its static position. The magnitude of the force P
has a significant effect on the dividing line
between spinning and oscillating—the larger P is, the more
inclined the system is to oscillate. The force
acts as a stabilizing influence.
Load magnitude. Experiments with changing the magnitude of
the load showed that no matter how large
or small the load is, the tendency of the plate to oscillate
between the initial angle and its complement did
not change. This result is not intuitively obvious (at least not to
me). Energy is put into the system only
through the load P. One might imagine that P could put larger
and larger amounts of energy in by increasing
the magnitude of P. With more energy in it seems like the plate
should be flung further and further. Figure
5 shows the case with an initial angle of θo = 0.2 and a large
load ratio of P/W = 10. The extremes of the
0 2 4 6 8 10 12 14 16 18 20
0
0.5
1
1.5
2
t
A
ng
le
Angle vs. Time
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
t
A
ng
lu
la
r
V
el
oc
ity
Angular Velocity vs. Time
Fig 4. Study of the effect of initial angle. The system in
initially at rest in each case, but the initial angle is θo
=0.0, 0.3, and 0.6. No matter what the force P the plate
rotates only to the complementary angle and back again.
0 2 4 6 8 10 12 14 16 18 20
0
0.5
1
1.5
t
A
ng
le
Angle vs. Time
Fig 5. Study of the effect of increasing the magnitude of
the load P. The system in initially at rest with initial
angle is θo =0.2. The load ratio is P/W =10. The effect is
to increase the frequency of the motion, but the
amplitude remains the same as P/W =0.65.
Sample Computing Project Square Plate in Orthogonal Guides
6
oscillation are not affected by the large load. The main effect of
the larger load ratio is that the frequency
of the oscillation is dramatically increased. The reason we
cannot put arbitrary amounts of energy into the
system is that the mechanism pulls back on the load during part
of the motion, thereby extracting energy
back out of the system.
The horizontal reaction at B. From the perspective of
design, it is interesting to examine the behavior of the
reaction forces in the dynamic scenario. How strong do
the guides need to be? For the static case the horizontal
reaction at point B is always zero. For dynamic motion it
is not. Figure 6 shows a plot of the horizontal reaction
force (normalized by the value of the weight W) for the
case of an initially horizontal plate starting at rest with
P/W = 0.65.
As expected the reaction force is not zero. It oscillates
back and forth at magnitude about equal to the weight of
the plate (for this case). Notice also that the nature of the
motion is not the (roughly) sinusoidal response of the
angle and angular velocity. Half way between the
extremes of motion the reaction force changes most
rapidly and it changes from negative to positive and vice
versa. The shape of the response curve changes
significantly as the load level P/W changes.
The effect of varying the load (as a fraction of the weight) is
shown in Table 1. The system starts from rest
in the horizontal position, subjected to the load magnitude
given. The largest horizontal reaction occurs
when there is no load applied to the system (i.e., the plate
simply falls under its own weight). At the static
load (P/W=0.5) there is no reaction (and no motion). For load
values above the static load the amplitude of
the horizontal reaction gets larger again. For values of P/W>2
the reaction gets larger and larger.
Table 1. Effect of load ratio on horizontal reaction
P/W NB/W P/W NB/W
0.00 18.9 0.55 0.44
0.10 15.1 0.60 0.88
0.20 11.4 0.70 1.77
0.30 7.57 0.80 2.65
0.40 3.78 0.90 3.53
0.45 1.89 1.00 4.42
0.50 0.00 2.00 13.2
Damped motion. In order to explore damped motion we must
augment our equations of motion with a
velocity-dependent term. The coefficient of the velocity
dependent term is called the damping coefficient.
It is not important to ascribe a physical origin or value to this
constant for the study, except to note that you
can increase the effects of damping by making the damping
coefficient larger and decrease them by making
it smaller. Damping continuously takes energy out of the
system. The equation of motion with damping is
(see Appendix B)
Fig 6. Angle (top) and horizontal reaction
at point B (bottom) versus time. The plate
is initially at rest with P/W=0.65.
0 2 4 6 8 10 12 14 16 18 20
0
0.5
1
1.5
2
t
A
ng
le
Angle vs. Time
0 2 4 6 8 10 12 14 16 18 20
-2
-1
0
1
2
t
N
B
/W
Reaction at B vs. Time
Sample Computing Project Square Plate in Orthogonal Guides
7
( )3 34 2 cos sin 0
P g
W b
where µ is the damping constant (which will be a user-specified
value in the code). The residual and tangent
for Newton’s method are easily computed to be
( )3 31 1 1 1 14 2( ) cos( ) sin( )n n n n n
P g
g a a v x x
W b
µ+ + + + +
(9)
and
( )1 3 31 1 14 2
1
( )
1 sin( ) cos( )nn n n
n
g a P g
A x x
a W b
µη ζ++ + +
+
= = + − −
(10)
where 1 1( ) / ( ) (1 )n nd v d a tη β+ += = ∆ − , in accord with
the generalized trapezoidal rule (and the chain rule).
The code is very simple to change to account for this additional
term (note that the code in Appendix B has
this term in it).
Figure 7 shows a case with damping. The system starts in the
horizontal position at rest with load ratio of
P/W = 0.65, as before. The damping takes energy out of the
system, which you can see from the energy plot
in the figure. The black line is the total net energy. The total net
energy levels off to a minimum value as
time goes on. The motion damps to a static position (i.e., when
none of the fields change with time). It is
obvious (at least in retrospect) that the static position is the one
where the hinges in the guides align with
the direction of the applied force.
Motion of the corners. There is one final observation on the
response of this system that is worth pointing
out. In the animations we include a tracer line (the position for
recent times) for the corners. It is not a
surprise that the motions of the constrained points B and C are
straight lines along the guides. It is somewhat
surprising to find that the other corners also trace straight lines
along a 45 degree line. Figure 8 shows these
lines for a snapshot of a certain motion.
Upon reflection it might be an obvious geometric truth about
the two constraints. In fact, one should be
able to prove that the position of the corners must lie along
these lines. The proof is beyond the scope of
this report. It is worth noting that seeing is believing and it is
unlikely that anyone would think to make
such a proof without first seeing it in the animation.
0 5 10 15 20 25 30 35 40
0
0.5
1
1.5
t
A
ng
le
Angle vs. Time
0 5 10 15 20 25 30 35 40
-0.5
0
0.5
1
t
A
ng
lu
la
r
V
el
oc
ity
Angular Velocity vs. Time
Fig 7. Damped motion. The system in initially horizontal and at
rest with P/W = 0.65. The damping coefficient
is set to µ=0.2. Observe how the motion damps to the static
value. The snapshot of the animation shows that the
static position has the hinges aligned with the load. The viscous
damping removes energy from the system.
0 5 10 15 20 25 30 35 40
0
5
10
15
t
T
(
bl
ue
),
U
(
re
d)
,
W
k
(c
ya
n)
,
E
(
bl
ac
k)
Energy and Work vs. Time
Sample Computing Project Square Plate in Orthogonal Guides
8
Other aspects. The code is a very general solution to this
problem. Any of the physical parameters could be studied in
more detail. We have considered some of those, and even
within those studies, only a small number of parameter values.
We have not looked at the effects of varying some of the
parameters, e.g., the dimension b of the plate or the total
weight W.
It would also be possible to examine the performance of the
numerical integration scheme. In particular, we could vary the
time step to determine what value is needed to get good
accuracy. For these computations we have used 0.01t∆ = ,
which appears to be sufficiently accurate.
It would not be difficult to modify the formulation to have a
load P that varies with time. We could use such a code to
model a process like a string pull to start an engine. We could
then try to find an optimal pulling strategy to get the plate
spinning as fast as possible (for a certain input of work). Many
other extensions are possible.
Conclusions
This report has documented the derivation of the equations of
motion for a square plate with opposite
corners constrained to move in orthogonal guides. The system is
a single degree of freedom system that can
be described in terms of the angle of rotation of the plate as a
function of time. The equations of motion are
nonlinear, but they can be integrated numerically. The code in
Appendix A carries out the numerical
integration and produces graphical response (including an
animation, which cannot be shown in a static
report).
In the study we explored the effects of the initial angle, the
magnitude of the load (relative to the weight of
the plate), the evolution of the horizontal reaction at point B,
and the static position (by way of damped
equations of motion). We discovered that the response is always
symmetric with the plate oscillating
between the initial angle and its complement, independent of
the magnitude of the load. Changing the
magnitude of the load change the frequency of oscillation of the
system (with larger loads giving higher
frequencies). The reaction force at point B showed non-
sinusoidal oscillations with magnitudes that varied
with the applied load P (whereas the reaction is zero for the
static case).
References
K. D. Hjelmstad. (2013). Numerical Methods—integrating the
equations of motion. Course notes for CEE
212 Engineering Mechanics II—Dynamics. Arizona State
University.
K.D. Hjelmstad (2013). Newton’s Method—a method to solve
nonlinear algebraic equations. Course notes
for CEE 212 Engineering Mechanics II—Dynamics. Arizona
State University.
Fig 8. Snapshot of plate in motion from the
animation. The blue lines are the recent
positions of the corners the yellow dot is
point B, the white dot is point C.
Sample Computing Project Square Plate in Orthogonal Guides
9
Appendix A. MATLAB code.
% *-------------------------------------------------------------------*
% | Sample CP -- Square Plate (Implicit Version)
|
% | Square plate constrained to move in horizontal and
guides |
% | and pulled up by a constant force. This code adds a drag
term |
% | that models friction in the glides (not part of the
Assessment |
% | problem) this helps to see how the system would get to a
|
% | final static configuration (it lets the dynamics damp out).
|
% *-------------------------------------------------------------------*
clear; clc;
%.... Print Banner to command window
fprintf('%sn','*------------------------------------------------*')
fprintf('%sn','| Sample CP |')
fprintf('%sn','| K. D. Hjelmstad |')
fprintf('%sn','| |')
fprintf('%sn','| Original Version: 10.25.2013 |')
fprintf('%sn','| Latest Update: 06.23.2015 |')
fprintf('%sn','*------------------------------------------------*')
%.... Input physical problem data
gravity = 9.81; % acceleration of gravity (m/s^2)
Wt = 4; % Total weight of plate
b = 5; % plate dimension (m)
pr = 2.0; % Ratio of applied force to weight
P = pr*Wt; % Total force
drag = 0.0; % drag coefficient
%.... Initial conditions and analysis start and end times
xo = 0.0; % initial angle of plate
vo = 0.0; % initial angular velocity of plate
to = 0.0; % initial time (usually zero)
tf = 20; % final time (end of analysis)
%.... Compute coefficient of equation of motion (constant)
c = (3-6*pr)*gravity/(4*b); % coefficient of equation
%.... Compute an estimate of the maximum angular velocity (xo
= 0)
omax = sqrt(vo^2 + 2*(1-sqrt(2))*c);
%.... Numerical analysis parameters. Put all parameters that are
% associated with the numerical methods here. For implicit
methods
% you can put the parameters that describe and control
Newton's method.
dt = 0.01; % analysis time step
beta = 0.5; % numerical integration parameter
tol = 1.e-8; % Newton iteration tolerance
itmax = 10; % Newton max no. iterations
eta = (1-beta)*dt; % Integration parameter
zeta = eta^2; % Integration parameter
%.... Select figures to plot (1=yes, 0=no)
dofig1 = 1; % theta and omega vs. time
dofig2 = 0; % energy vs. time
dofig3 = 0; % theta vs. omega
dofig4 = 1; % Reaction at B vs time.
dofig5 = 0; % Simulation movie
%.... Set up a history array to save results ever once in a while
% This part is simply to avoid plotting every point that we
compute
% It does not take that many points to give a nice
representative
% response curve. We need to compute more points to get
accuracy in
% the solution.
nitems = 18; % number of items stored in history
nreport = 4000; % number of steps to output
nsteps = ceil((tf-to)/dt); % total number of analysis time
steps
nreport = min(nreport,nsteps); % report only what you
compute
noutput = ceil(nsteps/nreport); % set frequency of output
history = zeros(nreport,nitems); % initialize storage for
history
Sample Computing Project Square Plate in Orthogonal Guides
10
%.... Echo input values to screen
fprintf('rr%sn', ' PHYSICAL PROPERTIES ')
fprintf('%s%8.3fn', ' b (plate width) ',b)
fprintf('%s%8.3fn', ' pr = (P/W) ',pr)
fprintf('%s%8.3fn', ' Maximum angular velocity (est.)
',omax)
fprintf('%s%8.3fn', ' Initial time (to) ',to)
fprintf('%s%8.3fn', ' Final time (tf) ',tf)
fprintf('rr%sn', ' INTEGRATION OF EQUATIONS
')
fprintf('%s%8.3fn', ' Time increment (dt) ',dt)
fprintf('%s%8.3fn', ' Numerical integration (beta)
',beta)
fprintf('%s%8in', ' Number of time steps
',nsteps)
fprintf('%s%8in', ' Number of steps to report
',nreport)
fprintf('%s%8in', ' Output frequency (no. of steps)
',noutput)
fprintf('rr%sn', ' INITIAL CONDITIONS ')
fprintf('%s%8.3fn', ' Initial position (xo) ',xo)
fprintf('%s%8.3fn', ' Initial velocity (vo) ',vo)
%.... Set time and output counters to get ready to start analysis
t = to; out = 0; iout = 0; its = 0;
%.... Initialize position and velocity (put in 'xold' and 'vold'
arrays)
xold = xo;
vold = vo;
%.... Compute initial acceleration from the equation of motion
aold = -c*(cos(xold) - sin(xold)) - drag*vo;
%.... Compute motion by numerical integration--loop over time
steps
for i=1:nsteps
%....... Write the values out to history, if appropriate
% This segment writes a row to 'history' every 'noutput'
steps
% Note that for quantities that are not needed to advance
the
% numerical solution (e.g., speed and xcomp) we only need
to
% compute them if it is an output step.
if (out==0)
iout = iout + 1;
%......... compute the locations of the four corners
nvec = [ sin(xold); cos(xold)];
mvec = [-cos(xold); sin(xold)];
x1 = -(sin(xold) - cos(xold))*b*[1; 0];
x2 = x1 + b*mvec;
x3 = x2 + b*nvec;
x4 = x1 + b*nvec;
xc = [ x1', x2', x3', x4'];
%......... Compute work and energy
T = (Wt*b^2/(3*gravity))*vold^2; % Kinetic
energy
U = Wt*b*(cos(xold) + sin(xold))/2; % Potential
energy
Work = P*b*(cos(xold) + sin(xold) - 1); % Work of
force
netE = T + U - Work; % Energy - Work
%......... Compute reaction force at B
csum = cos(xold) + sin(xold);
cdif = cos(xold) - sin(xold);
NB = -(b/2)*(aold*csum + vold^2*cdif);
%......... Write results to 'history' array
history(iout,:) =
[t,xold,vold,aold,its,xc,T,U,Work,netE,NB];
out = noutput;
end
out = out - 1;
%....... Compute the values of the state for the next time step
t = t + dt;
%....... Initialize Newton loop
err = 1.0; its = 0;
bn = xold + vold*dt + aold*beta*(1-beta)*dt^2;
cn = vold + aold*beta*dt;
anew = aold;
Sample Computing Project Square Plate in Orthogonal Guides
11
%....... Compute new acceleration from equation of motion
while (err > tol) && (its < itmax)
its = its + 1; % iteration
xnew = bn + zeta*anew; % angle
vnew = cn + eta*anew; % ang. vel.
g = anew + c*(cos(xnew) - sin(xnew)) + drag*vnew; %
residual
A = 1 - c*zeta*(sin(xnew) + cos(xnew)) + drag*eta; %
Tangent
anew = anew - g/A; % ang. accel.
err = norm(g); % error
end % while loop
%....... Compute new angular velocity and angle by trapezoidal
rule
vnew = vold + dt*(beta*aold + (1-beta)*anew);
xnew = xold + dt*(beta*vold + (1-beta)*vnew);
%....... Put current state (new) into old slot to get ready for new
step
% Note that this approach allows us to only store two states
as
% we carry out the calculation: 'old' and 'new'
aold = anew;
vold = vnew;
xold = xnew;
end % loop over time steps
max (history(:,18))
%.... GRAPHICAL OUTPUT SECTION
% In this section we create plots to display the results that
were
% stored in the array history. Each row of history contains
the values
% of the response at a given time. The value "iout" refers to
the last
% row number in history. Thus, history(1:iout,1) is time, etc.
xmina = floor(min(history(1:iout,6:13)));
xmaxa = ceil(max(history(1:iout,6:13)));
xmin = min((xmina)); xmax = max((xmaxa));
xsize = max(abs(xmin),abs(xmax));
%.... Plot time history of angle
if (dofig1==1)
fig=figure(1); clf;
subplot(2,1,1); grid on; hold on;
xlabel('t'); ylabel('Angle'); title('Angle vs. Time');
p = plot(history(1:iout,1),history(1:iout,2));
set(p,'Color','b','LineWidth',1.5);
subplot(2,1,2); grid on; hold on;
xlabel('t'); ylabel('Anglular Velocity');
title('Angular Velocity vs. Time');
p = plot(history(1:iout,1),history(1:iout,3));
set(p,'Color','r','LineWidth',1.5);
end % dofig1
%.... Plot energy vs. time
if (dofig2==1)
fig=figure(2); clf;
grid on; axis square; hold on;
xlabel('t'); ylabel('T (blue), U (red), Wk (cyan), E
(black)');
title('Energy and Work vs. Time');
p = plot(history(1:iout,1),history(1:iout,14));
set(p,'Color','b','LineWidth',1.5);
p = plot(history(1:iout,1),history(1:iout,16));
set(p,'Color','c','LineWidth',2);
p = plot(history(1:iout,1),history(1:iout,15));
set(p,'Color','r','LineWidth',1.5);
p = plot(history(1:iout,1),history(1:iout,17));
set(p,'Color','k','LineWidth',2);
end % dofig2
%.... Plot phase portrait
if (dofig3==1)
fig=figure(3); clf; grid on; axis square; hold on;
xlabel('Angle'); ylabel('Angular Velocity');
Sample Computing Project Square Plate in Orthogonal Guides
12
title('Phase Portrait');
p = plot(history(1:iout,2),history(1:iout,3));
set(p,'Color','r','LineWidth',2);
end % dofig3
%.... Reaction at B vs. time
if (dofig4==1)
fig=figure(4); clf;
subplot(2,1,1); grid on; hold on;
xlabel('t'); ylabel('Angle');
title('Angle vs. Time');
p = plot(history(1:iout,1),history(1:iout,2));
set(p,'Color','b','LineWidth',2);
subplot(2,1,2); grid on; hold on;
xlabel('t'); ylabel('NB/W');
title('Reaction at B vs. Time');
p = plot(history(1:iout,1),history(1:iout,18));
set(p,'Color','g','LineWidth',2.5);
end % dofig4
%.... Plot 3D simulation as a movie
if (dofig5==1)
fig5=figure(5);
kframes = 10; kforget = 5;
numframes = floor(iout/kframes);
for k=1:numframes
rect = get(fig5,'Position'); rect(1:2) = [0 0]; axis equal;
grid on; axis ([-xsize xsize -xsize xsize]);
xlabel('x'); ylabel('y');title('Animation');
hold on;
%........ Plot the guide tracks
yb1 = [-xsize, xsize]; xb1 = [0,0];
xb2 = [-xsize, xsize]; yb2 = [0,0];
plot(xb1,yb1,'Color','k','Linewidth',15);
plot(xb2,yb2,'Color','k','Linewidth',15);
plot(xb1,yb1,'Color','g','Linewidth',11);
plot(xb2,yb2,'Color','g','Linewidth',11);
%........ Plot the traces of the path of the tip of the corners
kk = k - kforget; kk = (kk + abs(kk))/2;
istart = 1 + kframes*kk; iend = kframes*k;
p = plot(history(istart:iend,6),history(istart:iend,7));
set(p,'Color','b','LineWidth',1);
p = plot(history(istart:iend,8),history(istart:iend,9));
set(p,'Color','b','LineWidth',1);
p = plot(history(istart:iend,10),history(istart:iend,11));
set(p,'Color','b','LineWidth',1);
p = plot(history(istart:iend,12),history(istart:iend,13));
set(p,'Color','b','LineWidth',1);
%........ Plot the four sides of the box
for iii=1:4
i1 = (iii-1)*2+6; i2 = i1+1; i3 = i2+1; i4 = i3+1;
if (iii==4)
i3 = 6; i4 = 7;
end
xb = [history(iend:iend,i3),history(iend:iend,i1)];
yb = [history(iend:iend,i4),history(iend:iend,i2)];
plot(xb,yb,'Color','k','Linewidth',2);
end % loop on iii
%........ Plot the rollers in the guides
plot(history(iend:iend,6), history(iend:iend,7),...
'o','MarkerFaceColor','w','Linewidth',2,...
'MarkerEdgeColor','k','MarkerSize',11);
plot(history(iend:iend,10), history(iend:iend,11),...
'o','MarkerFaceColor','y','Linewidth',2,...
'MarkerEdgeColor','k','MarkerSize',11);
Sample Computing Project Square Plate in Orthogonal Guides
13
%........ Put timer in upper left corner
time = num2str(history(iend,1),'%4.1f');
xplace = -xmax*0.65;
yplace = xmax*0.85;
text(xplace,yplace,time,...
'FontSize',16,'HorizontalAlignment','right')
%........ Store frame for movie (set view point)
M(:,k) = getframe(fig5,rect);
clf;
end % loop over frames
%...... Play (and record) movie with play speed factor faster that
actual
clf; N=1; PlaySpeed = 5;
FPS = ceil(PlaySpeed*numframes/tf);
movie(fig5,M, N,FPS,rect)
end % dofig5 block
fprintf('r%sr',' Normal Termination of Program')
%.... End of program Sample CP
CEE 212—Dynamics
Arizona State University
Sample Computing Project
Keith D. Hjelmstad
1 © 2013 Keith D. Hjelmstad
B. Describe position vector. We need to describe the position
of a typical particle A in the plate relative to the origin O
A. Describe geometry. We will introduce the unit vectors n
and m for the purpose of describing the motion (note
direction of base vectors).
Derivation of Equations
Appendix B. Derivation of the equations of motion for
Square plate in Orthogonal Glides (Sample CP)
Problem Statement. A square plate with dimensions b by b,
which has a
uniform mass per unit area of ρ, The corner B of the plate is
subjected to
a constant vertical force of magnitude P. The rollers at corners
B and C
ride in frictionless guides. The orientation of the plate is
characterized by
the angle θ. Assume that the rollers are prevented from
changing guides.
Find the equations of motion using energy methods and balance
of
momentum. Find the residual and tangent needed to implement
an
implicit code. (Note these equations will be implemented in a
computing
project).
1 2
1 2
sin cos
cos sin
θ θ
θ θ
= +
= − +
n e e
m e e
θ
θ
= −
=
n m
m n
1
1
( , , ) ( ) ( ) ( )
( ) ( , , )
x y t z t x t y t
z t x y t
= + +
= +
x e n m
e r
Geometry
2e
1e
( )tθ
A
nm
O 1( )z t e
r
x
y
( , , )
( , , )
x y t x y
x y t x y
= +
= −
r n m
p m n
( )
( )
x y
x y
x y
x y
θ
θ
θ
θ
= +
= − +
= −
= −
= +
=
r n m
m n
p
p m n
n m
r
It will also be convenient to introduce a (non-unit) vector r
from corner D to the typical particle A in terms of the spatial
variables x and y (which measure distance in the n and m
directions, respectively):
( , , )x y t x y= +r n m
We can also introduce a (non-unit) vector p, orthogonal to r
( , , )x y t x y= −p m n
Note that the time derivative of r is related to p as shown in
the box at right.
Note that we have introduced the time-dependent variable
z(t) to help describe the motion. Due to the two constraints at
points B and C, z is not independent of θ. However, it will be
convenient to sort out the constraint once we compute the
velocity.
Relationships between r and p:
P
b
b
B
C
θ
D
CEE 212—Dynamics
Arizona State University
Sample Computing Project
Keith D. Hjelmstad
2 © 2013 Keith D. Hjelmstad
C. Compute v and a from x. The velocity is computed as the
derivatives of the position vector. Using the
expressions above, we get
( )
1
1
z
z x y
θ
θ
= −
= − −
x e p
e m n
We know that at point B (x=b, y=b) the velocity is only in the
e2 direction. We can use this constraint to
eliminate z as a variable. Note that the velocity constraint at C
is already satisfied by the kinematics
( )
( )( )
( )
( )
( )
1
1 1 1
1 10
0 cos sin
cos sin
B
B
z b
z b
z b
z b
z b
θ
θ
θ
θ θ θ
θ θ θ
= − −
⋅ = − − ⋅
= − ⋅ − ⋅
= + +
= − +
x e m n
x e e m n e
m e n e
( )
( )
( ) ( ){ } { }
1
1
2 2
1
1 sin cos
cos sin
cos sin sin cos
b
b
b
θ θ
θ θ θ θ
θ θ θ θ θ θ θ θ
= − + − +
= − + −
= − + + − + − −
x e r
x e p
x e p r
If we implement the constraint into the
position vector we have
( )
( ) ( )
2
1
2
1
z
z x y x y
θ θ
θ θ
= − +
= − − − +
x e p r
e m n n m
where zo is constant. The first derivative of
this expression, with respect to time, is
( )sin cos oz b zθ θ= − − +
Note that we have found out that the rate
of change of z is a function of the rate of
change of θ. Hence, only one of these is
independent. We can integrate this
equation to find how z is related to θ.
What if z turned out to be
( )cos
That is the expression we have. Therefore,
the expression for z is the correct integral
of the velocity constraint equation we have
derived.
( )1 1sin cosoz b θ θ= − − +x e e r
It appears that zo is unknown, but its value really
only depends upon where we take the origin O. If
we select the origin to be located a position a
distance b to the right of the intersection of the
guides (i.e., zo=−b) then the final expressions for
the position, velocity, and acceleration vectors are
OK, so we got rid of z because it is not independent from θ.
However, for algebra purposes, it will be
convenient to continue to use z, knowing that we can, in the
end, substitute the expression in terms of θ.
1
1
2
1
z
z
z
θ
θ θ
= +
= −
= − +
x e r
x e p
x e p r
( )
( )
( ) ( ){ }2
1 sin cos
cos sin
cos sin sin cos
z b
z b
z b
θ θ
θ θ θ
θ θ θ θ θ θ
= − + −
= − +
= − + + − +
where
CEE 212—Dynamics
Arizona State University
Sample Computing Project
Keith D. Hjelmstad
3 © 2013 Keith D. Hjelmstad
K. Compute energy of the system. We can compute the kinetic
and
potential energies of the system as follows:
( ) ( )
( ) ( )( )
( ) ( ) ( ) ( )
1
2
1
1 12
2 2 2 21
2
2 2 2 21 1
2 2
( , ) ( , )
2 cos sin
cos sin ( )
A
A
A
A A A A
T x y x y dA
z z dA
z z x y x y dA
z dA z x dA z y dA x y dA
ρ
ρ θ θ
ρ θ θ θ θ
ρ θ θ ρ θ θ ρ θ ρ
= ⋅
= − ⋅ −
= − + + +
= − − + +
∫
∫
∫
∫ ∫ ∫ ∫
x x
e p e p
( ) ( )
[ ] [ ]
2 2 2 2
0
3 31 1
3 30 00 0
4 22 2
3 3
b b
A o
b bb b
x y dA x y dx dy
x y x y
W
b b
g
ρ ρ
ρ ρ
ρ
+ = +
= =
∫ ∫ ∫
( )1 1
cos sin
x y
x yθ θ
⋅ = − ⋅
= − −
p e m n e
1 2
1 2
sin cos
cos sin
θ θ
θ θ
= +
= − +
n e e
m e e
[ ] [ ]
[ ] [ ]
0 0
2
0 0
0 0
2
0 0
b b
A
b b
b b
A
b b
g dA g dx dy
g x y g b
dA dx dy
x y b
ρ ρ
ρ ρ
ρ ρ
ρ ρ
=
= =
=
= =
∫ ∫ ∫
∫ ∫ ∫
[ ]
[ ]
0 0
2 31 1
2 200
0 0
2 31 1
2 200
b b
A
b b
b b
A
b b
x dA x dx dy
x y b
y dA y dx dy
y x b
ρ ρ
ρ ρ
ρ ρ
ρ ρ
=
=
∫ ∫ ∫
∫ ∫ ∫
The expressions have several integrals over the area of
the domain. These can be evaluated as follows:
A.2. Identify initial (or other special) conditions. This problem
will be implemented as a CP so we will
employ general initial conditions so that they can be varied
when we run the program
( )
2
1 2
( , )
cos sin
A
A
A A
U g x y dA
g z x y dA
g x dA g y dA
ρ
ρ
θ ρ θ ρ
= ⋅
= − + + ⋅
= +
∫
∫
∫ ∫
x e
e n m e
( )312 cos sinU bρ θ θ= +
( )( )
2
2 2 21 1 1
2 2 3cos sin
b
T z z b b
g
ρ
Evaluating the integrals gives:
( )
( )
( )
22 2 2
2 2
cos sin
cos sin
cos sin
z b
z b
b z b
θ θ θ
θ θ θ
θ θ θ θ
= +
= +
= +
4
21
3
b
T
g
ρ
Now is a great time to substitute back the
expression for the constraint. Recall
So the kinetic energy reduces to the simple form:
CEE 212—Dynamics
Arizona State University
Sample Computing Project
Keith D. Hjelmstad
4 © 2013 Keith D. Hjelmstad
( )( )
( )
[ ]
( )
0
2 10
0
0
sin cos
cos sin
cos sin 1
t
P
t
t
t
W dt
P z b dt
P b dt
Pb
Pb
θ
θ θ θ θ
θ θ
θ θ
= ⋅
= ⋅ − −
= − +
= +
= + −
∫
∫
∫
F v
0
0
0
0
t
B B
t
C C
W dt
W dt
= ⋅ =
= ⋅ =
∫
∫
N v
N v
We can compute the work done by the forces as
( ) ( )
4
2 31 1
3 2 cos sin cos sin 1P
b
E T U W b Pb
g
ρ
L. Conservation of energy. Total energy (which is conserved if
we account for the work put in). The total
net energy is
The work done by the normal forces is zero because they are
orthogonal to the velocity at that point (the velocity is along
the guide, the normal force is normal to the guide).
( ) ( )cos sin 1 sin cosd
dt
Note that we can check the anti-derivative by
taking the derivative of the result and showing
that it gives us back our integrand.
Note that without putting any work into the system, energy is
constant. If we add positive work (i.e., force
in the same direction of velocity) then the amount of energy
increases. Therefore, T + U = WP + const.
(i.e., the current energy is the constant plus the work put in).
Therefore, the total net energy should be
conserved.
We can use conservation of energy to determine the equation of
motion
( ) ( )
4
2 31 1
3 2 cos sin cos sin 1
b
E b Pb
g
ρ
( ) ( )
( )( )
4
32 1
3 2
4
32 1
3 2
sin cos sin cos
cos sin 0
d b
E b Pb
dt g
b
b Pb
g
ρ
θ θ ρ θ θ θ θ θ θ
ρ
θ ρ θ θ θ
= + − + − − +
( )3 34 2 cos sin 0
P b
W g
θ θ θ
For this equation to be true for all time, noting that while
angular velocity might be zero at certain times it
is certainly not zero for all time, the term in square brackets
must be zero. Hence, dividing through by the
leading term in front of the first term, we get the equation of
motion
2 Total Weight of PlateW bρ= =
CEE 212—Dynamics
Arizona State University
Sample Computing Project
Keith D. Hjelmstad
5 © 2013 Keith D. Hjelmstad
D. Construct free body diagram (FBD). See sketch.
Free body diagram
2C CN=N e
A
2g dAρ− e
1B BN=N e
P 2e
E. Write equation of motion. Compute balance of linear
momentum and balance of angular momentum, about point C.
( ) ( ) ( )( ) ( )( )
2 2
2
1 2 2 2 1
2 2
1 2 2 2 1
B C A A
B C A A
B C A A A A
P g dA dA
N N P g dA z dA
N N P g dA z dA x dA y dA
ρ ρ
ρ ρ θ θ
ρ ρ ρ θ θ ρ θ θ
+ + − =
+ + − = − + + −
∫ ∫
∫ ∫
∫ ∫ ∫ ∫
N N e e x
e e e e e p r
e e e e e m n n m
( ) ( )
( ) ( ) ( )( )
2 2 3 2 3 21 1
1 2 2 2 1 2 2
2 2 3 21
1 2 1 2
B C
B C
N N P gb b z b b
N N P gb b z b
ρ ρ ρ θ θ ρ θ θ
ρ ρ ρ θ θ
+ + − = − − − +
+ + − = + − + +
e e e e e m n n m
e e e n m n m
( ) ( )( )
( ) ( )( )
2 3 21
12
3 21
22
B
C
N b z b
N W P b
ρ ρ θ θ
ρ θ θ
= + − + + ⋅
= − + − + + ⋅
n m n m e
n m n m e
1 2
1 2
sin cos
cos sin
θ θ
θ θ
= +
= − +
n e e
m e e
( )
( )
( )
( )
1
1
2
2
sin cos
sin cos
cos sin
cos sin
θ θ
θ θ
θ θ
θ θ
+ ⋅ = −
− ⋅ = +
+ ⋅ = +
− ⋅ = −
n m e
n m e
n m e
n m e
We can find the integrals we need from the earlier results. If we
use those here we end up with the
following equations.
We can dot this equation successively with e1 and e2 to get
expression for the two reaction forces in terms
of the motion variables.
The dot products can be evaluated as shown at right
( ) ( )( )
( ) ( )( )
2 3 21
2
2 3 21
2
sin cos sin cos
cos sin cos sin
B
C
N b z b
N b P b
ρ ρ θ θ θ θ θ θ
ρ ρ θ θ θ θ θ θ
= + + + −
= − + − + +
E.1. First, balance of linear momentum
We can also derive the equations of motion using balance of
momentum. In fact, we need at least balance
of linear momentum to derive the equations for the reaction
forces (energy methods do not give reactions
because those forces do no work).
CEE 212—Dynamics
Arizona State University
Sample Computing Project
Keith D. Hjelmstad
6 © 2013 Keith D. Hjelmstad
Side calculations
1 3
2 3
1 3
2 3
3
2 2
3
cos
sin
sin
cos
( )
x y
x y
x y
θ
θ
θ
θ
× = −
× =
× = −
× = −
× =
= +
= −
× = +
n e e
n e e
m e e
m e e
n m e
r n m
p m n
r p e
( ) ( )( )
( ) ( )( ) ( ) ( )( )
( ) ( )( )
( ) ( )( )
2 3 21
2
3 2 3 21
2
3 21
2
3 21
2
sin cos sin cos
sin cos sin cos sin cos sin cos
sin cos sin cos
sin cos sin cos
BN b z b
b b
b
b
ρ ρ θ θ θ θ θ θ
ρ θ θ θ θ θ θ ρ θ θ θ θ θ θ
ρ θ θ θ θ θ θ
ρ θ θ θ θ θ θ
= + + + −
= − + + − + + + −
= − + + −
= − + + −
( ) ( ) ( ) ( )
( )
( ) ( ) ( ) ( )( ) ( ) ( )( )
( ) ( )
2 1 2
2
1
2 2 1 1 2 2
1
3 3 3 3 3sin cos sin cos cos sin
BA
A
BA
A A
B AA
x y g dA b N P
z dA
g x g y dA bN b P
z dA dA
g x y dA b N b N b P b P
ρ
ρ θ θ
ρ ρ
ρ ρθ
ρ θ θ θ θ θ
+ × − + + × +
−
∫
∫
∫
∫ ∫
∫
n m e m n e e
r e p r
n e m e m × e n × e m × e n × e
r e r p
e e e e e
( )
( ) ( ) ( )
( )
3
2 2
3 3 3
31
3 32
3 41 2
3 32 3
cos sin
cos sin sin cos cos sin
cos sin
A A
B
x z y z dA x y dA
b bN bP
b z b
θ
ρ θ ρ θ ρ θ
ρ θ θ θ θ θ θ
ρ θ θ ρ θ
− − + − −
= + −
∫ ∫
3
e
e e e
e e e
e e
E.2. Then, balance of angular momentum about point C gives
Dot this equation with e3 and substitute the expressions for the
reactions and the second derivative
of z to get
The expressions for the reaction forces still contain z. We can
eliminate it by recalling that
From the kinematics section (Part C)
( )3 34 2 cos sin 0
P b
W g
θ θ θ
which is the same as the equation we got from conservation of
energy. This calculation again shows that
the two approaches give identical results. The details of the
calculation is a bit different in each case (there
are some similarities) and sometimes one approach is quite a bit
simpler than the other.
Substituting, we get
( ) ( )( )
( ) ( )( )
3 21
2
2 3 21
2
sin cos sin cos
cos sin cos sin
B
C
N b
N b P b
ρ θ θ θ θ θ θ
ρ ρ θ θ θ θ θ θ
= − + + −
= − + − + +
CEE 212—Dynamics
Arizona State University
Sample Computing Project
Keith D. Hjelmstad
7 © 2013 Keith D. Hjelmstad
( )
( )
3 3
1 1 1 14 2
3 3
1 1 14 2
( ) cos ( ) sin ( )
cos sin
r n n n n
n n n
P b
g a a x a x a
W g
P b
a x x
W g
+ + + +
+ + +
We can implement this problem in a CP format. The residual
can be expressed at time step tn+1 as
( )
( )
3 3
4 2
3 3
4 2
1 sin cos
1 sin cos
rgA
a
P b d
W g da
P b
W g
θ
θ θ
ζ θ θ
∂
=
∂
= −
Where an+1 is the angular acceleration at time tn+1. We can
write the angle and angular velocity in terms of the angular
acceleration a using the generalized trapezoidal rule as
{ }
{ }
( ){ }
1 1
1
1
1 1
1
2 2 2
1
1
(1 )
(1 )
(1 )
(1 ) (1 )
(1 ) (1 )
n n n n
n n n
n n
n n n n
n n n n n
n n n n
n n
v v t a a
v t a t a
c a
x x t v v
x t v v t a t a
x t v t a t a
b a
β β
β β
η
β β
β β β β
β β β
ζ
+ +
+
+
+ +
+
+
+
= + ∆ + −
= + ∆ + ∆ −
= +
= + ∆ + −
= + ∆ + − + ∆ + ∆ −
= + ∆ + − ∆ + ∆ −
= +
(1 )
n n nc v t a
t
β
η β
= + ∆
=∆ −
2
2 2 2
(1 )
(1 )
n n n nb x t v t a
t
β β
ζ β η
= + ∆ + − ∆
=∆ − =
1
1
1
1
n
n
n
n
d x
d a
d v
d a
ζ
η
+
+
+
+
=
=
The tangent is the derivative of the residual with respect to its
argument:
One of the things we would like to do in our study is add a
viscous damping term to the equation of motion:
( )3 34 2 cos sin 0
P b
W g
θ µθ θ θ
Now the residual and tangent are:
Damping coefficient (user specified)µ =
( )3 31 1 1 1 14 2( ) cos sinr n n n n n
P b
g a a v x x
W g
µ+ + + + + +
( )3 3 1 14 21 sinx cosn n
P b
A x
W g
µη ζ + +
( )
( )
( )
n n
n n
n n
x t
v t
a t
θ
θ
θ
=
=
=
Discrete state variables
Definitions from trapezoidal rule
Consequence of discrete equations
Sample CP Report 1Sample CP - Appendix BSlide Number
1Slide Number 2Slide Number 3Slide Number 4Slide Number
5Slide Number 6Slide Number 7
CEE 213—Deformable Solids
© Keith D. Hjelmstad
CP 2—Multiaxial States
Benchmark case
The benchmark case will be used to demonstrate
that your code works for the in-class code check.
CP 2 - STRAIN TRANSFORMATION FOR UNIFORM
MOTION
Deformation Gradient and Strain Tensor
----- F ----- ----- E -----
1.500 0.200 0.645 0.280
0.200 1.300 0.280 0.365
Principal Strains
e1 = 0.818 e2 = 0.192
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
y
z
Deformed and Undeformed Block
0.5536
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
y
z
Deformed and Undeformed Block
0.0000
Original orientation
Principal orientation
0.2 0.3 0.4 0.5 0.6 0.7 0.8
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
Mohrs Circle
CEE 213—Deformable Solids The Mechanics Project
Arizona State University CP 2—Multiaxial States
1
Computing Project 2
Multiaxial States
The computing project Multiaxial States concerns the analysis
of strain and stress at a point
in a solid body. The goal is to write a MATLAB program that
will allow the computation
of the strain associated with a prescribed motion and the stress
associated with that strain
through Hooke’s Law. We will compute principal values,
maxima, and graphically repre-
sent the state by mapping the motion both in the (x,y)
coordinates and in the principal co-
ordinates. Finally, we will produce Mohr’s circle to represent
the state.
The theory needed to execute this project is contained in the
Course Notes entitled Multi-
axial Strain.
The general steps are as follows:
1. Specify the components of the deformation tensor (matrix) F
and use it to compute
strain tensor E. The tensor F is the mapping matrix. We can use
it to compute the
deformed location of points that we identify in the undeformed
configuration (e.g.,
the vertices of the initial square of material).
2. Develop code to plot both the undeformed square and the
deformed version of it.
Establish the vertices of the square with the points (0,0), (1,0),
(0,1), and (1,1).
Compute the deformed positions of those points using F.
3. Compute the angle for the principal directions along with the
principal values of
strain. Develop code to plot the undeformed and deformed
square defined in the
coordinate system associated with the principal directions (i.e.,
take the initial
square to have its sides along those directions and map the
vertices to find the
deformed body.
4. Compute the stresses associated with the strains by virtue of
Hooke’s law for plane
strain.
5. Solve the problem of finding principal values using the
eigenvalue solver (the
“eig” command) in MATLAB. Output the principal values of
stress, the maximum
shear stress, and plot Mohr’s circle for the stress state. Do the
same for the strain.
6. Examine the implications of different states of strain. For
example:
a. What happens in a state of uniform dilatation (elongation
without shear-
ing)?
b. Verify that pure shear has principal directions at 45 degrees
from the orig-
inal orientation of the block.
CEE 213—Deformable Solids The Mechanics Project
Arizona State University CP 2—Multiaxial States
2
c. Show that the principal directions for stress and strain are the
same. Is this
due to the nature of Hooke’s Law? Do you expect it to be true
for all ma-
terial models?
d. Explore any other feature of the problem that you find
interesting.
e. Extend the code to do three dimensional states of strain for an
extra nice
project. Note that this step is not required but you are
encouraged to do it
to earn top marks. The visualization plots (especially the
deformed and
undeformed cube need to be rendered in 3D).
Write a report documenting your work and the results (in accord
with the specification
given in the document Guidelines for Doing Computing
Projects). Post it to the Critviz
website prior to the deadline.
Please consult the document Evaluation of Computing Projects
to see how your project
will be evaluated to make sure that you can get full marks. Note
that there is no peer review
process for reports in this course.
4 - © 2014 Pearson Education, Inc.ForecastingPo.docx

More Related Content

Similar to 4 - © 2014 Pearson Education, Inc.ForecastingPo.docx

david-_sm14_inppt09.pptx
david-_sm14_inppt09.pptxdavid-_sm14_inppt09.pptx
david-_sm14_inppt09.pptxRamyRamzy10
 
The Internal AssessmentChapter FourChapter Objec.docx
The Internal AssessmentChapter FourChapter Objec.docxThe Internal AssessmentChapter FourChapter Objec.docx
The Internal AssessmentChapter FourChapter Objec.docxoreo10
 
SM CH 8 STRATEGY IMPLEMENTATION
SM CH 8 STRATEGY IMPLEMENTATIONSM CH 8 STRATEGY IMPLEMENTATION
SM CH 8 STRATEGY IMPLEMENTATIONShadina Shah
 
Operational Management Chapter - [04].ppt
Operational Management Chapter - [04].pptOperational Management Chapter - [04].ppt
Operational Management Chapter - [04].pptAhmedAlrashid7
 
Textura q3 14 earnings release 11 4 2014 final
Textura q3 14 earnings release 11 4 2014 finalTextura q3 14 earnings release 11 4 2014 final
Textura q3 14 earnings release 11 4 2014 finalTexturaCorp
 
Textura q3 14 earnings release 11.4.2014 final
Textura q3 14 earnings release 11.4.2014 finalTextura q3 14 earnings release 11.4.2014 final
Textura q3 14 earnings release 11.4.2014 finalTexturaCorp
 
Revenue in America : Scaling businesses in the US
Revenue in America:  Scaling businesses in the USRevenue in America:  Scaling businesses in the US
Revenue in America : Scaling businesses in the USVision & Execution, Inc.
 
Transform Organisational Culture - Defining, Communicating and Measuring Core...
Transform Organisational Culture - Defining, Communicating and Measuring Core...Transform Organisational Culture - Defining, Communicating and Measuring Core...
Transform Organisational Culture - Defining, Communicating and Measuring Core...The HR Observer
 
Operations & Supply Chain Management
Operations & Supply Chain ManagementOperations & Supply Chain Management
Operations & Supply Chain ManagementShafiqShetu
 
Chapter Six-Formulating Strategy.pptx
Chapter Six-Formulating Strategy.pptxChapter Six-Formulating Strategy.pptx
Chapter Six-Formulating Strategy.pptxBeamlak5
 
CIMA Dublin MIAGEN on FP&A Best Practices June '15
CIMA Dublin MIAGEN on FP&A Best Practices June '15CIMA Dublin MIAGEN on FP&A Best Practices June '15
CIMA Dublin MIAGEN on FP&A Best Practices June '15MIAGEN
 
Pure Insight Information_FEI
Pure Insight Information_FEIPure Insight Information_FEI
Pure Insight Information_FEIPure Insight Ltd
 
strategic-chp6 (1).ppt.strategic planning
strategic-chp6 (1).ppt.strategic planningstrategic-chp6 (1).ppt.strategic planning
strategic-chp6 (1).ppt.strategic planningriadhrtc
 
502423 hr om11_ch01_ge (2)
502423 hr om11_ch01_ge (2)502423 hr om11_ch01_ge (2)
502423 hr om11_ch01_ge (2)tehreem fatima
 
Operational Management Chapter - [01].ppt
Operational Management Chapter - [01].pptOperational Management Chapter - [01].ppt
Operational Management Chapter - [01].pptAhmedAlrashid7
 

Similar to 4 - © 2014 Pearson Education, Inc.ForecastingPo.docx (20)

david-_sm14_inppt09.pptx
david-_sm14_inppt09.pptxdavid-_sm14_inppt09.pptx
david-_sm14_inppt09.pptx
 
The Internal AssessmentChapter FourChapter Objec.docx
The Internal AssessmentChapter FourChapter Objec.docxThe Internal AssessmentChapter FourChapter Objec.docx
The Internal AssessmentChapter FourChapter Objec.docx
 
SM CH 8 STRATEGY IMPLEMENTATION
SM CH 8 STRATEGY IMPLEMENTATIONSM CH 8 STRATEGY IMPLEMENTATION
SM CH 8 STRATEGY IMPLEMENTATION
 
SP
SPSP
SP
 
Operational Management Chapter - [04].ppt
Operational Management Chapter - [04].pptOperational Management Chapter - [04].ppt
Operational Management Chapter - [04].ppt
 
David sm14 inppt04_ge
David  sm14 inppt04_geDavid  sm14 inppt04_ge
David sm14 inppt04_ge
 
Textura q3 14 earnings release 11 4 2014 final
Textura q3 14 earnings release 11 4 2014 finalTextura q3 14 earnings release 11 4 2014 final
Textura q3 14 earnings release 11 4 2014 final
 
Textura q3 14 earnings release 11.4.2014 final
Textura q3 14 earnings release 11.4.2014 finalTextura q3 14 earnings release 11.4.2014 final
Textura q3 14 earnings release 11.4.2014 final
 
Revenue in America : Scaling businesses in the US
Revenue in America:  Scaling businesses in the USRevenue in America:  Scaling businesses in the US
Revenue in America : Scaling businesses in the US
 
Transform Organisational Culture - Defining, Communicating and Measuring Core...
Transform Organisational Culture - Defining, Communicating and Measuring Core...Transform Organisational Culture - Defining, Communicating and Measuring Core...
Transform Organisational Culture - Defining, Communicating and Measuring Core...
 
Operations & Supply Chain Management
Operations & Supply Chain ManagementOperations & Supply Chain Management
Operations & Supply Chain Management
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Chapter 05.pptx
Chapter 05.pptxChapter 05.pptx
Chapter 05.pptx
 
Chapter Six-Formulating Strategy.pptx
Chapter Six-Formulating Strategy.pptxChapter Six-Formulating Strategy.pptx
Chapter Six-Formulating Strategy.pptx
 
CIMA Dublin MIAGEN on FP&A Best Practices June '15
CIMA Dublin MIAGEN on FP&A Best Practices June '15CIMA Dublin MIAGEN on FP&A Best Practices June '15
CIMA Dublin MIAGEN on FP&A Best Practices June '15
 
Pure Insight Information_FEI
Pure Insight Information_FEIPure Insight Information_FEI
Pure Insight Information_FEI
 
strategic-chp6 (1).ppt.strategic planning
strategic-chp6 (1).ppt.strategic planningstrategic-chp6 (1).ppt.strategic planning
strategic-chp6 (1).ppt.strategic planning
 
Chapter ppt_04.pptx
Chapter  ppt_04.pptxChapter  ppt_04.pptx
Chapter ppt_04.pptx
 
502423 hr om11_ch01_ge (2)
502423 hr om11_ch01_ge (2)502423 hr om11_ch01_ge (2)
502423 hr om11_ch01_ge (2)
 
Operational Management Chapter - [01].ppt
Operational Management Chapter - [01].pptOperational Management Chapter - [01].ppt
Operational Management Chapter - [01].ppt
 

More from tamicawaysmith

(No Plagiarism) Explain the statement Although many leading organi.docx
(No Plagiarism) Explain the statement Although many leading organi.docx(No Plagiarism) Explain the statement Although many leading organi.docx
(No Plagiarism) Explain the statement Although many leading organi.docxtamicawaysmith
 
 What made you choose this career path What advice do you hav.docx
 What made you choose this career path What advice do you hav.docx What made you choose this career path What advice do you hav.docx
 What made you choose this career path What advice do you hav.docxtamicawaysmith
 
 Patient Population The student will describe the patient populati.docx
 Patient Population The student will describe the patient populati.docx Patient Population The student will describe the patient populati.docx
 Patient Population The student will describe the patient populati.docxtamicawaysmith
 
 Dr. Paul Murray  Bessie Coleman  Jean-Bapiste Bell.docx
 Dr. Paul Murray  Bessie Coleman  Jean-Bapiste Bell.docx Dr. Paul Murray  Bessie Coleman  Jean-Bapiste Bell.docx
 Dr. Paul Murray  Bessie Coleman  Jean-Bapiste Bell.docxtamicawaysmith
 
 In depth analysis of your physical fitness progress  Term p.docx
 In depth analysis of your physical fitness progress  Term p.docx In depth analysis of your physical fitness progress  Term p.docx
 In depth analysis of your physical fitness progress  Term p.docxtamicawaysmith
 
 Information systems infrastructure evolution and trends  Str.docx
 Information systems infrastructure evolution and trends  Str.docx Information systems infrastructure evolution and trends  Str.docx
 Information systems infrastructure evolution and trends  Str.docxtamicawaysmith
 
⦁One to two paragraph brief summary of the book. ⦁Who is the.docx
⦁One to two paragraph brief summary of the book. ⦁Who is the.docx⦁One to two paragraph brief summary of the book. ⦁Who is the.docx
⦁One to two paragraph brief summary of the book. ⦁Who is the.docxtamicawaysmith
 
101018, 6(27 PMPage 1 of 65httpsjigsaw.vitalsource.co.docx
101018, 6(27 PMPage 1 of 65httpsjigsaw.vitalsource.co.docx101018, 6(27 PMPage 1 of 65httpsjigsaw.vitalsource.co.docx
101018, 6(27 PMPage 1 of 65httpsjigsaw.vitalsource.co.docxtamicawaysmith
 
100.0 Criteria10.0 Part 1 PLAAFP The PLAAFP thoroughly an.docx
100.0 Criteria10.0 Part 1 PLAAFP The PLAAFP thoroughly an.docx100.0 Criteria10.0 Part 1 PLAAFP The PLAAFP thoroughly an.docx
100.0 Criteria10.0 Part 1 PLAAFP The PLAAFP thoroughly an.docxtamicawaysmith
 
100635307FLORIDABUILDINGCODE Sixth Edition(2017).docx
100635307FLORIDABUILDINGCODE Sixth Edition(2017).docx100635307FLORIDABUILDINGCODE Sixth Edition(2017).docx
100635307FLORIDABUILDINGCODE Sixth Edition(2017).docxtamicawaysmith
 
1003Violence Against WomenVolume 12 Number 11Novembe.docx
1003Violence Against WomenVolume 12 Number 11Novembe.docx1003Violence Against WomenVolume 12 Number 11Novembe.docx
1003Violence Against WomenVolume 12 Number 11Novembe.docxtamicawaysmith
 
102120151De-Myth-tifying Grading in Sp.docx
102120151De-Myth-tifying Grading             in Sp.docx102120151De-Myth-tifying Grading             in Sp.docx
102120151De-Myth-tifying Grading in Sp.docxtamicawaysmith
 
100.0 Criteria30.0 Flowchart ContentThe flowchart skillful.docx
100.0 Criteria30.0 Flowchart ContentThe flowchart skillful.docx100.0 Criteria30.0 Flowchart ContentThe flowchart skillful.docx
100.0 Criteria30.0 Flowchart ContentThe flowchart skillful.docxtamicawaysmith
 
100 words agree or disagree to eac questions Q 1.As her .docx
100 words agree or disagree to eac questions Q 1.As her .docx100 words agree or disagree to eac questions Q 1.As her .docx
100 words agree or disagree to eac questions Q 1.As her .docxtamicawaysmith
 
101118, 4(36 PMCollection – MSA 603 Strategic Planning for t.docx
101118, 4(36 PMCollection – MSA 603 Strategic Planning for t.docx101118, 4(36 PMCollection – MSA 603 Strategic Planning for t.docx
101118, 4(36 PMCollection – MSA 603 Strategic Planning for t.docxtamicawaysmith
 
100 words per question, no references needed or quotations. Only a g.docx
100 words per question, no references needed or quotations. Only a g.docx100 words per question, no references needed or quotations. Only a g.docx
100 words per question, no references needed or quotations. Only a g.docxtamicawaysmith
 
100A 22 4 451A 1034 51B 1000 101C 1100 11D 112.docx
100A 22 4 451A 1034  51B 1000 101C 1100  11D 112.docx100A 22 4 451A 1034  51B 1000 101C 1100  11D 112.docx
100A 22 4 451A 1034 51B 1000 101C 1100 11D 112.docxtamicawaysmith
 
10122018Week 5 Required Reading and Supplementary Materials - .docx
10122018Week 5 Required Reading and Supplementary Materials - .docx10122018Week 5 Required Reading and Supplementary Materials - .docx
10122018Week 5 Required Reading and Supplementary Materials - .docxtamicawaysmith
 
101416 526 PMAfter September 11 Our State of Exception by .docx
101416 526 PMAfter September 11 Our State of Exception by .docx101416 526 PMAfter September 11 Our State of Exception by .docx
101416 526 PMAfter September 11 Our State of Exception by .docxtamicawaysmith
 
100 words per question, no references needed or quotations. Only.docx
100 words per question, no references needed or quotations. Only.docx100 words per question, no references needed or quotations. Only.docx
100 words per question, no references needed or quotations. Only.docxtamicawaysmith
 

More from tamicawaysmith (20)

(No Plagiarism) Explain the statement Although many leading organi.docx
(No Plagiarism) Explain the statement Although many leading organi.docx(No Plagiarism) Explain the statement Although many leading organi.docx
(No Plagiarism) Explain the statement Although many leading organi.docx
 
 What made you choose this career path What advice do you hav.docx
 What made you choose this career path What advice do you hav.docx What made you choose this career path What advice do you hav.docx
 What made you choose this career path What advice do you hav.docx
 
 Patient Population The student will describe the patient populati.docx
 Patient Population The student will describe the patient populati.docx Patient Population The student will describe the patient populati.docx
 Patient Population The student will describe the patient populati.docx
 
 Dr. Paul Murray  Bessie Coleman  Jean-Bapiste Bell.docx
 Dr. Paul Murray  Bessie Coleman  Jean-Bapiste Bell.docx Dr. Paul Murray  Bessie Coleman  Jean-Bapiste Bell.docx
 Dr. Paul Murray  Bessie Coleman  Jean-Bapiste Bell.docx
 
 In depth analysis of your physical fitness progress  Term p.docx
 In depth analysis of your physical fitness progress  Term p.docx In depth analysis of your physical fitness progress  Term p.docx
 In depth analysis of your physical fitness progress  Term p.docx
 
 Information systems infrastructure evolution and trends  Str.docx
 Information systems infrastructure evolution and trends  Str.docx Information systems infrastructure evolution and trends  Str.docx
 Information systems infrastructure evolution and trends  Str.docx
 
⦁One to two paragraph brief summary of the book. ⦁Who is the.docx
⦁One to two paragraph brief summary of the book. ⦁Who is the.docx⦁One to two paragraph brief summary of the book. ⦁Who is the.docx
⦁One to two paragraph brief summary of the book. ⦁Who is the.docx
 
101018, 6(27 PMPage 1 of 65httpsjigsaw.vitalsource.co.docx
101018, 6(27 PMPage 1 of 65httpsjigsaw.vitalsource.co.docx101018, 6(27 PMPage 1 of 65httpsjigsaw.vitalsource.co.docx
101018, 6(27 PMPage 1 of 65httpsjigsaw.vitalsource.co.docx
 
100.0 Criteria10.0 Part 1 PLAAFP The PLAAFP thoroughly an.docx
100.0 Criteria10.0 Part 1 PLAAFP The PLAAFP thoroughly an.docx100.0 Criteria10.0 Part 1 PLAAFP The PLAAFP thoroughly an.docx
100.0 Criteria10.0 Part 1 PLAAFP The PLAAFP thoroughly an.docx
 
100635307FLORIDABUILDINGCODE Sixth Edition(2017).docx
100635307FLORIDABUILDINGCODE Sixth Edition(2017).docx100635307FLORIDABUILDINGCODE Sixth Edition(2017).docx
100635307FLORIDABUILDINGCODE Sixth Edition(2017).docx
 
1003Violence Against WomenVolume 12 Number 11Novembe.docx
1003Violence Against WomenVolume 12 Number 11Novembe.docx1003Violence Against WomenVolume 12 Number 11Novembe.docx
1003Violence Against WomenVolume 12 Number 11Novembe.docx
 
102120151De-Myth-tifying Grading in Sp.docx
102120151De-Myth-tifying Grading             in Sp.docx102120151De-Myth-tifying Grading             in Sp.docx
102120151De-Myth-tifying Grading in Sp.docx
 
100.0 Criteria30.0 Flowchart ContentThe flowchart skillful.docx
100.0 Criteria30.0 Flowchart ContentThe flowchart skillful.docx100.0 Criteria30.0 Flowchart ContentThe flowchart skillful.docx
100.0 Criteria30.0 Flowchart ContentThe flowchart skillful.docx
 
100 words agree or disagree to eac questions Q 1.As her .docx
100 words agree or disagree to eac questions Q 1.As her .docx100 words agree or disagree to eac questions Q 1.As her .docx
100 words agree or disagree to eac questions Q 1.As her .docx
 
101118, 4(36 PMCollection – MSA 603 Strategic Planning for t.docx
101118, 4(36 PMCollection – MSA 603 Strategic Planning for t.docx101118, 4(36 PMCollection – MSA 603 Strategic Planning for t.docx
101118, 4(36 PMCollection – MSA 603 Strategic Planning for t.docx
 
100 words per question, no references needed or quotations. Only a g.docx
100 words per question, no references needed or quotations. Only a g.docx100 words per question, no references needed or quotations. Only a g.docx
100 words per question, no references needed or quotations. Only a g.docx
 
100A 22 4 451A 1034 51B 1000 101C 1100 11D 112.docx
100A 22 4 451A 1034  51B 1000 101C 1100  11D 112.docx100A 22 4 451A 1034  51B 1000 101C 1100  11D 112.docx
100A 22 4 451A 1034 51B 1000 101C 1100 11D 112.docx
 
10122018Week 5 Required Reading and Supplementary Materials - .docx
10122018Week 5 Required Reading and Supplementary Materials - .docx10122018Week 5 Required Reading and Supplementary Materials - .docx
10122018Week 5 Required Reading and Supplementary Materials - .docx
 
101416 526 PMAfter September 11 Our State of Exception by .docx
101416 526 PMAfter September 11 Our State of Exception by .docx101416 526 PMAfter September 11 Our State of Exception by .docx
101416 526 PMAfter September 11 Our State of Exception by .docx
 
100 words per question, no references needed or quotations. Only.docx
100 words per question, no references needed or quotations. Only.docx100 words per question, no references needed or quotations. Only.docx
100 words per question, no references needed or quotations. Only.docx
 

Recently uploaded

MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 

Recently uploaded (20)

MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 

4 - © 2014 Pearson Education, Inc.ForecastingPo.docx

  • 1. 4 - * © 2014 Pearson Education, Inc. Forecasting PowerPoint presentation to accompany Heizer and Render Operations Management, Eleventh Edition Principles of Operations Management, Ninth Edition PowerPoint slides by Jeff Heyl 4 © 2014 Pearson Education, Inc. 4 - * © 2014 Pearson Education, Inc. OutlineGlobal Company Profile: Walt Disney Parks & ResortsWhat Is Forecasting?The Strategic Importance of ForecastingSeven Steps in the Forecasting SystemForecasting Approaches *
  • 2. 4 - * © 2014 Pearson Education, Inc. Outline - ContinuedTime-Series ForecastingAssociative Forecasting Methods: Regression and Correlation AnalysisMonitoring and Controlling ForecastsForecasting in the Service Sector * 4 - * © 2014 Pearson Education, Inc. Learning Objectives When you complete this chapter you should be able to :Understand the three time horizons and which models apply for each useExplain when to use each of the four qualitative modelsApply the naive, moving average, exponential smoothing, and trend methods * 4 - * © 2014 Pearson Education, Inc. Learning Objectives When you complete this chapter you should be able to :Compute
  • 3. three measures of forecast accuracyDevelop seasonal indicesConduct a regression and correlation analysisUse a tracking signal * 4 - * © 2014 Pearson Education, Inc. Global portfolio includes parks in Hong Kong, Paris, Tokyo, Orlando, and Anaheim Revenues are derived from people – how many visitors and how they spend their money Daily management report contains only the forecast and actual attendance at each park Forecasting Provides a Competitive Advantage for Disney © 2014 Pearson Education, Inc. * 4 - * © 2014 Pearson Education, Inc. Disney generates daily, weekly, monthly, annual, and 5-year forecasts Forecast used by labor management, maintenance, operations, finance, and park scheduling
  • 4. Forecast used to adjust opening times, rides, shows, staffing levels, and guests admitted Forecasting Provides a Competitive Advantage for Disney © 2014 Pearson Education, Inc. * 4 - * © 2014 Pearson Education, Inc. 20% of customers come from outside the USA Economic model includes gross domestic product, cross- exchange rates, arrivals into the USA A staff of 35 analysts and 70 field people survey 1 million park guests, employees, and travel professionals each year Forecasting Provides a Competitive Advantage for Disney © 2014 Pearson Education, Inc. * 4 - * © 2014 Pearson Education, Inc. Inputs to the forecasting model include airline specials, Federal
  • 5. Reserve policies, Wall Street trends, vacation/holiday schedules for 3,000 school districts around the world Average forecast error for the 5-year forecast is 5% Average forecast error for annual forecasts is between 0% and 3% Forecasting Provides a Competitive Advantage for Disney © 2014 Pearson Education, Inc. * 4 - * © 2014 Pearson Education, Inc. What is Forecasting?Process of predicting a future eventUnderlying basis of all business decisionsProductionInventoryPersonnelFacilities
  • 6.
  • 7. ?? * 4 - * © 2014 Pearson Education, Inc. Short-range forecast Up to 1 year, generally less than 3 months Purchasing, job scheduling, workforce levels, job assignments, production levels Medium-range forecast 3 months to 3 years Sales and production planning, budgeting
  • 8. Long-range forecast 3+ years New product planning, facility location, research and development Forecasting Time Horizons * 4 - * © 2014 Pearson Education, Inc. Distinguishing Differences Medium/long range forecasts deal with more comprehensive issues and support management decisions regarding planning and products, plants and processes Short-term forecasting usually employs different methodologies than longer-term forecasting Short-term forecasts tend to be more accurate than longer-term forecasts * 4 - * © 2014 Pearson Education, Inc. Influence of Product Life Cycle Introduction and growth require longer forecasts than maturity and decline As product passes through life cycle, forecasts are useful in projecting
  • 9. Staffing levels Inventory levels Factory capacity Introduction – Growth – Maturity – Decline * 4 - * © 2014 Pearson Education, Inc. Product Life Cycle Figure 2.5 Best period to increase market share R&D engineering is critical Practical to change price or quality image Strengthen niche Poor time to change image, price, or quality Competitive costs become critical Defend market position Cost control critical Introduction Growth Maturity Decline
  • 10. Company Strategy/Issues Internet search engines Sales Drive-through restaurants DVDs Analog TVs Boeing 787 Electric vehicles iPods 3-D game players 3D printers Xbox 360 * 4 - *
  • 11. © 2014 Pearson Education, Inc. Product Life Cycle Product design and development critical Frequent product and process design changes Short production runs High production costs Limited models Attention to quality Forecasting critical Product and process reliability Competitive product improvements and options Increase capacity Shift toward product focus Enhance distribution Standardization Fewer product changes, more minor changes Optimum capacity Increasing stability of process Long production runs Product improvement and cost cutting Little product differentiation Cost minimization Overcapacity in the industry Prune line to eliminate items not returning good margin Reduce capacity Figure 2.5
  • 12. Introduction Growth Maturity Decline OM Strategy/Issues * 4 - * © 2014 Pearson Education, Inc. Types of Forecasts Economic forecasts Address business cycle – inflation rate, money supply, housing starts, etc. Technological forecasts Predict rate of technological progress Impacts development of new products Demand forecasts Predict sales of existing products and services * 4 - * © 2014 Pearson Education, Inc. Strategic Importance of ForecastingSupply-Chain Management – Good supplier relations, advantages in product innovation, cost and speed to market Human Resources – Hiring, training, laying off workersCapacity – Capacity shortages can result in
  • 13. undependable delivery, loss of customers, loss of market share 4 - * © 2014 Pearson Education, Inc. Seven Steps in Forecasting Determine the use of the forecast Select the items to be forecasted Determine the time horizon of the forecast Select the forecasting model(s) Gather the data needed to make the forecast Make the forecast Validate and implement results * 4 - * © 2014 Pearson Education, Inc. The Realities!Forecasts are seldom perfect, unpredictable outside factors may impact the forecastMost techniques assume an underlying stability in the systemProduct family and aggregated forecasts are more accurate than individual product forecasts 4 - * © 2014 Pearson Education, Inc. Forecasting ApproachesUsed when situation is vague and little data existNew productsNew technologyInvolves intuition, experiencee.g., forecasting sales on Internet
  • 14. Qualitative Methods * 4 - * © 2014 Pearson Education, Inc. Forecasting ApproachesUsed when situation is ‘stable’ and historical data existExisting productsCurrent technologyInvolves mathematical techniquese.g., forecasting sales of color televisions Quantitative Methods * 4 - * © 2014 Pearson Education, Inc. Overview of Qualitative Methods Jury of executive opinion Pool opinions of high-level experts, sometimes augment by statistical models Delphi method Panel of experts, queried iteratively *
  • 15. 4 - * © 2014 Pearson Education, Inc. Overview of Qualitative Methods Sales force composite Estimates from individual salespersons are reviewed for reasonableness, then aggregated Market Survey Ask the customer * 4 - * © 2014 Pearson Education, Inc. Involves small group of high-level experts and managersGroup estimates demand by working togetherCombines managerial experience with statistical modelsRelatively quick‘Group-think’ disadvantage Jury of Executive Opinion * 4 - * © 2014 Pearson Education, Inc. Delphi Method Iterative group process, continues until consensus is reached 3 types of participants Decision makers
  • 16. Staff Respondents Staff (Administering survey) Decision Makers (Evaluate responses and make decisions) Respondents (People who can make valuable judgments) * 4 - * © 2014 Pearson Education, Inc. Sales Force CompositeEach salesperson projects his or her salesCombined at district and national levelsSales reps know customers’ wantsMay be overly optimistic * 4 - * © 2014 Pearson Education, Inc. Market SurveyAsk customers about purchasing plansUseful for demand and product design and planningWhat consumers say, and what they actually do may be differentMay be overly optimistic
  • 17. * 4 - * © 2014 Pearson Education, Inc. Overview of Quantitative Approaches Naive approach Moving averages Exponential smoothing Trend projection Linear regression Time-series models Associative model * 4 - * © 2014 Pearson Education, Inc. Set of evenly spaced numerical data Obtained by observing response variable at regular time periods Forecast based only on past values, no other variables important Assumes that factors influencing past and present will continue influence in future Time-Series Forecasting
  • 18. * 4 - * © 2014 Pearson Education, Inc. Time-Series Components Trend Seasonal Cyclical Random * 4 - * © 2014 Pearson Education, Inc. Components of Demand Average demand over 4 years Trend component
  • 19. Random variation Figure 4.1 Demand for product or service | | | | 1 2 3 4 Time (years) Actual demand line Seasonal peaks * 4 - * © 2014 Pearson Education, Inc. Persistent, overall upward or downward pattern Changes due to population, technology, age, culture, etc. Typically several years duration Trend Component * 4 - *
  • 20. © 2014 Pearson Education, Inc. Regular pattern of up and down fluctuations Due to weather, customs, etc. Occurs within a single year Seasonal ComponentPERIOD LENGTH“SEASON” LENGTHNUMBER OF “SEASONS” IN PATTERNWeekDay7MonthWeek4 – 4.5MonthDay28 – 31YearQuarter4YearMonth12YearWeek52 * 4 - * © 2014 Pearson Education, Inc. Repeating up and down movements Affected by business cycle, political, and economic factors Multiple years duration Often causal or associative
  • 21. relationships Cyclical Component 0 5 10 15 20 * 4 - * © 2014 Pearson Education, Inc. Erratic, unsystematic, ‘residual’ fluctuations Due to random variation or unforeseen events Short duration and nonrepeating Random Component M T W T F * 4 - * © 2014 Pearson Education, Inc. Naive ApproachAssumes demand in next period is the same as
  • 22. demand in most recent periode.g., If January sales were 68, then February sales will be 68Sometimes cost effective and efficientCan be good starting point * 4 - * © 2014 Pearson Education, Inc. MA is a series of arithmetic means Used if little or no trend Used often for smoothing Provides overall impression of data over time Moving Average Method * 4 - * © 2014 Pearson Education, Inc. Moving Average Example (10 + 12 + 13)/3 = 11 2/3 (12 + 13 + 16)/3 = 13 2/3 (13 + 16 + 19)/3 = 16MONTHACTUAL SHED SALES3- MONTH MOVING AVERAGEJanuary10February12March13April16May19June23J uly26August30September28October18November16December14( 16 + 19 + 23)/3 = 19 1/3(19 + 23 + 26)/3 = 22 2/3(23 + 26 +
  • 23. 30)/3 = 26 1/3(29 + 30 + 28)/3 = 28(30 + 28 + 18)/3 = 25 1/3(28 + 18 + 16)/3 = 20 2/3 10 12 13 4 - * © 2014 Pearson Education, Inc. Used when some trend might be present Older data usually less important Weights based on experience and intuition Weighted Moving Average Weighted moving average
  • 24. * 4 - * © 2014 Pearson Education, Inc. Weighted Moving AverageMONTHACTUAL SHED SALES3- MONTH WEIGHTED MOVING AVERAGEJanuary10February12March13April16May19June23J uly26August30September28October18November16December14 WEIGHTS APPLIEDPERIOD3Last month2Two months ago1Three months ago6Sum of the weightsForecast for this month =3 x Sales last mo. + 2 x Sales 2 mos. ago + 1 x Sales 3 mos. agoSum of the weights
  • 25. [(3 x 13) + (2 x 12) + (10)]/6 = 12 1/6 10 12 13 4 - * © 2014 Pearson Education, Inc. Weighted Moving Average [(3 x 13) + (2 x 12) + (10)]/6 = 12 1/6 10 12 13MONTHACTUAL SHED SALES3-MONTH WEIGHTED MOVING AVERAGEJanuary10February12March13April16May19June23J uly26August30September28October18November16December14[ (3 x 16) + (2 x 13) + (12)]/6 = 14 1/3[(3 x 19) + (2 x 16) + (13)]/6 = 17[(3 x 23) + (2 x 19) + (16)]/6 = 20 1/2[(3 x 26) + (2 x 23) + (19)]/6 = 23 5/6[(3 x 30) + (2 x 26) + (23)]/6 = 27 1/2[(3 x 28) + (2 x 30) + (26)]/6 = 28 1/3[(3 x 18) + (2 x 28) + (30)]/6 = 23 1/3[(3 x 16) + (2 x 18) + (28)]/6 = 18 2/3
  • 26. 4 - * © 2014 Pearson Education, Inc. Increasing n smooths the forecast but makes it less sensitive to changes Does not forecast trends well Requires extensive historical data Potential Problems With Moving Average * 4 - *
  • 27. © 2014 Pearson Education, Inc. Graph of Moving Averages Figure 4.2 | | | | | | | | | | | | J F M A M J J A S O N D Sales demand 30 – 25 – 20 – 15 – 10 – 5 – Month Actual sales Moving average Weighted moving average * 4 - * © 2014 Pearson Education, Inc. Form of weighted moving average Weights decline exponentially Most recent data weighted most Ranges from 0 to 1 Subjectively chosen
  • 28. Involves little record keeping of past data Exponential Smoothing * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing New forecast = Last period’s forecast + a (Last period’s actual demand – Last period’s forecast) Ft = Ft – 1 + a(At – 1 - Ft – 1) where Ft = new forecast Ft – 1 = previous period’s forecast a = smoothing (or weighting) constant (0 ≤ a ≤ 1) At – 1 = previous period’s actual demand * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing Example Predicted demand = 142 Ford Mustangs Actual demand = 153 Smoothing constant a = .20 *
  • 29. 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing Example Predicted demand = 142 Ford Mustangs Actual demand = 153 Smoothing constant a = .20 New forecast = 142 + .2(153 – 142) * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing Example Predicted demand = 142 Ford Mustangs Actual demand = 153 Smoothing constant a = .20 New forecast = 142 + .2(153 – 142) = 142 + 2.2 = 144.2 ≈ 144 cars *
  • 30. 4 - * © 2014 Pearson Education, Inc. Effect of Smoothing ConstantsSmoothing constant generally .05 ≤ a ≤ .50As a increases, older values become less significantWEIGHT ASSIGNED TOSMOOTHING CONSTANTMOST RECENT PERIOD (a)2ND MOST RECENT PERIOD a(1 – a)3RD MOST RECENT PERIOD a(1 – a)24th MOST RECENT PERIOD a(1 – a)35th MOST RECENT PERIOD a(1 – a)4a = .1.1.09.081.073.066a = .5.5.25.125.063.031 * 4 - * © 2014 Pearson Education, Inc.
  • 31. 225 – 200 – 175 – 150 – | | | | | | | | | 1 2 3 4 5 6 7 8 9 Quarter Demand a = .1 Actual demand a = .5 4 - * © 2014 Pearson Education, Inc. 225 – 200 – 175 – 150 – | | | | | | | | | 1 2 3 4 5 6 7 8 9 Quarter Demand a = .1 Actual demand a = .5
  • 32. changeCh stable 4 - * © 2014 Pearson Education, Inc. The objective is to obtain the most accurate forecast no matter the technique We generally do this by selecting the model that gives us the lowest forecast error Forecast error = Actual demand – Forecast value = At – Ft * 4 - * © 2014 Pearson Education, Inc. Common Measures of Error Mean Absolute Deviation (MAD) 4 - * © 2014 Pearson Education, Inc. Determining the MADQUARTERACTUAL TONNAGE UNLOADEDFORECAST WITH a = .10FORECAST WITH a = .5011801751752168175.50 = 175.00 + .10(180 – 175)
  • 33. 177.503159174.75 = 175.50 + .10(168 – 175.50) 172.754175173.18 = 174.75 + .10(159 – 174.75) 165.885190173.36 = 173.18 + .10(175 – 173.18) 170.446205175.02 = 173.36 + .10(190 – 173.36) 180.227180178.02 = 175.02 + .10(205 – 175.02) 192.618182178.22 = 178.02 + .10(180 – 178.02) 186.309?178.59 = 178.22 + .10(182 – 178.22) 184.15 4 - * © 2014 Pearson Education, Inc. Determining the MADQUARTERACTUAL TONNAGE UNLOADEDFORECAST WITH a = .10ABSOLUTE DEVIATION FOR a = .10FORECAST WITH a = .50ABSOLUTE DEVIATION FOR a = .501180 1755.00 1755.002168 175.507.50 177.509.503159 174.7515.75 172.7513.754175 173.181.82 165.889.125190 173.3616.64 170.4419.566205
  • 34. 175.0229.98 180.2224.787180 178.021.98 192.6112.618182 178.223.78 186.304.30Sum of absolute deviations:82.4598.62MAD = Σ|Deviations|10.3112.33n 4 - * © 2014 Pearson Education, Inc. Common Measures of Error Mean Squared Error (MSE)
  • 35. 4 - * © 2014 Pearson Education, Inc. Determining the MSEQUARTERACTUAL TONNAGE UNLOADEDFORECAST FOR a = .10(ERROR)21180 175 52 = 252168 175.50 (–7.5)2 = 56.253159 174.75 (– 15.75)2 = 248.064175 173.18 (1.82)2 = 3.315190 173.36 (16.64)2 = 276.896205 175.02 (29.98)2 = 898.807180 178.02 (1.98)2 = 3.928182 178.22 (3.78)2 = 14.29 Sum of errors squared = 1,526.52 4 - * © 2014 Pearson Education, Inc. Common Measures of Error Mean Absolute Percent Error (MAPE)
  • 36. 4 - * © 2014 Pearson Education, Inc. Determining the MAPEQUARTERACTUAL TONNAGE UNLOADEDFORECAST FOR a = .10ABSOLUTE PERCENT ERROR 100(ERROR/ACTUAL)1180 175.00 100(5/180) = 2.78%2168 175.50 100(7.5/168) = 4.46%3159 174.75 100(15.75/159)= 9.90%4175 173.18 100(1.82/175) = 1.05%5190 173.36 100(16.64/190)= 8.76%6205 175.02 100(29.98/205)= 14.62%7180 178.02 100(1.98/180) = 1.10%8182 178.22 100(3.78/182) = 2.08% Sum of % errors = 44.75% 4 - *
  • 37. © 2014 Pearson Education, Inc. Comparison of Forecast Error Rounded Absolute Rounded Absolute Actual Forecast Deviation Forecast Deviation Tonnage with for with for Quarter Unloaded a = .10 a = .10 a = .50 a = .50 1 180 175 5.00 175 5.00 2 168 175.5 7.50 177.50 9.50 3 159 174.75 15.75 172.75 13.75 4 175 173.18 1.82 165.88 9.12 5 190 173.36 16.64 170.44 19.56 6 205 175.02 29.98 180.22 24.78 7 180 178.02 1.98 192.61 12.61 8 182 178.22 3.78 186.30 4.30 82.45 98.62 4 - * © 2014 Pearson Education, Inc. Comparison of Forecast Error Rounded Absolute Rounded Absolute Actual Forecast Deviation Forecast Deviation Tonnage with for with for Quarter Unloaded a = .10 a = .10 a = .50 a = .50 1 180 175 5.00 175 5.00 2 168 175.5 7.50 177.50 9.50 3 159 174.75 15.75 172.75 13.75 4 175 173.18 1.82 165.88 9.12
  • 38. 5 190 173.36 16.64 170.44 19.56 6 205 175.02 29.98 180.22 24.78 7 180 178.02 1.98 192.61 12.61 8 182 178.22 3.78 186.30 4.30 82.45 98.62 MAD = ∑ |deviations| n = 82.45/8 = 10.31 For a = .10 = 98.62/8 = 12.33 For a = .50 4 - * © 2014 Pearson Education, Inc. Comparison of Forecast Error Rounded Absolute Rounded Absolute Actual Forecast Deviation Forecast Deviation Tonnage with for with for Quarter Unloaded a = .10 a = .10 a = .50 a = .50 1 180 175 5.00 175 5.00 2 168 175.5 7.50 177.50 9.50 3 159 174.75 15.75 172.75 13.75 4 175 173.18 1.82 165.88 9.12 5 190 173.36 16.64 170.44 19.56 6 205 175.02 29.98 180.22 24.78 7 180 178.02 1.98 192.61 12.61 8 182 178.22 3.78 186.30 4.30 82.45 98.62 MAD 10.31 12.33
  • 39. = 1,526.54/8 = 190.82 For a = .10 = 1,561.91/8 = 195.24 For a = .50 MSE = ∑ (forecast errors)2 n 4 - * © 2014 Pearson Education, Inc. Comparison of Forecast Error Rounded Absolute Rounded Absolute Actual Forecast Deviation Forecast Deviation Tonnage with for with for Quarter Unloaded a = .10 a = .10 a = .50 a = .50 1 180 175 5.00 175 5.00 2 168 175.5 7.50 177.50 9.50 3 159 174.75 15.75 172.75 13.75 4 175 173.18 1.82 165.88 9.12 5 190 173.36 16.64 170.44 19.56 6 205 175.02 29.98 180.22 24.78 7 180 178.02 1.98 192.61 12.61 8 182 178.22 3.78 186.30 4.30 82.45 98.62 MAD 10.31 12.33 MSE 190.82 195.24 = 44.75/8 = 5.59% For a = .10 = 54.05/8 = 6.76% For a = .50
  • 40. MAPE = ∑100|deviationi|/actuali n n i = 1 4 - * © 2014 Pearson Education, Inc. Comparison of Forecast Error Rounded Absolute Rounded Absolute Actual Forecast Deviation Forecast Deviation Tonnage with for with for Quarter Unloaded a = .10 a = .10 a = .50 a = .50 1 180 175 5.00 175 5.00 2 168 175.5 7.50 177.50 9.50 3 159 174.75 15.75 172.75 13.75 4 175 173.18 1.82 165.88 9.12 5 190 173.36 16.64 170.44 19.56 6 205 175.02 29.98 180.22 24.78 7 180 178.02 1.98 192.61 12.61 8 182 178.22 3.78 186.30 4.30 82.45 98.62 MAD 10.31 12.33 MSE 190.82 195.24 MAPE 5.59% 6.76% 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing with Trend Adjustment When a trend is present, exponential smoothing must be
  • 41. modifiedMONTHACTUAL DEMANDFORECAST (Ft) FOR MONTHS 1 – 51100Ft = 100 (given)2200 Ft = F1 + a(A1 – F1) = 100 + .4(100 – 100) = 1003300 Ft = F2 + a(A2 – F2) = 100 + .4(200 – 100) = 1404400 Ft = F3 + a(A3 – F3) = 140 + .4(300 – 140) = 2045500 Ft = F4 + a(A4 – F4) = 204 + .4(400 – 204) = 282 * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing with Trend Adjustment Ft = a(At - 1) + (1 - a)(Ft - 1 + Tt - 1) Tt = b(Ft - Ft - 1) + (1 - b)Tt - 1 where Ft = exponentially smoothed forecast average Tt = exponentially smoothed trend At = actual demand a = smoothing constant for average (0 ≤ a ≤ 1) b = smoothing constant for trend (0 ≤ b ≤ 1) Forecast including (FITt) =
  • 42. trend Exponentially Exponentially smoothed (Ft) + smoothed (Tt) forecast trend * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing with Trend Adjustment Step 1: Compute Ft Step 2: Compute Tt Step 3: Calculate the forecast FITt = Ft + Tt * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing with Trend Adjustment Example a = .2 b = .4MONTH (t)ACTUAL DEMAND (At)MONTH (t)ACTUAL DEMAND (At)11262121773132082841993652410?
  • 43. * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing with Trend Adjustment Example F2 = aA1 + (1 – a)(F1 + T1) F2 = (.2)(12) + (1 – .2)(11 + 2) = 2.4 + (.8)(13) = 2.4 + 10.4 = 12.8 units Step 1: Average for Month 2 12.80TABLE 4.1Forecast with a - .2 and b = .4MONTHACTUAL DEMANDSMOOTHED FORECAST AVERAGE, FtSMOOTHED TREND, TtFORECAST INCLUDING TREND, FITt11211213.0021732041952462173182893610—
  • 44. * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing with Trend Adjustment Example T2 = b(F2 - F1) + (1 - b)T1 T2 = (.4)(12.8 - 11) + (1 - .4)(2) = .72 + 1.2 = 1.92 units Step 2: Trend for Month 2 1.92TABLE 4.1Forecast with a - .2 and b = .4MONTHACTUAL DEMANDSMOOTHED FORECAST AVERAGE, FtSMOOTHED TREND, TtFORECAST INCLUDING TREND, FITt11211213.0021712.8032041952462173182893610—
  • 45. * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing with Trend Adjustment Example FIT2 = F2 + T2 FIT2 = 12.8 + 1.92 = 14.72 units Step 3: Calculate FIT for Month 2 14.72TABLE 4.1Forecast with a - .2 and b = .4MONTHACTUAL DEMANDSMOOTHED FORECAST
  • 46. AVERAGE, FtSMOOTHED TREND, TtFORECAST INCLUDING TREND, FITt11211213.0021712.801.9232041952462173182893610— * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing with Trend Adjustment ExampleTABLE 4.1Forecast with a - .2 and b = .4MONTHACTUAL
  • 47. DEMANDSMOOTHED FORECAST AVERAGE, FtSMOOTHED TREND, TtFORECAST INCLUDING TREND, FITt11211213.0021712.801.9214.7232015.182.1017.2841917.82 2.3220.1452419.912.2322.1462122.512.3824.8973124.112.0726 .1882827.142.4529.5993629.282.3231.6010—32.482.6835.16 * 4 - * © 2014 Pearson Education, Inc. Exponential Smoothing with Trend Adjustment Example Figure 4.3
  • 48. | | | | | | | | | 1 2 3 4 5 6 7 8 9 Time (months) Product demand 40 – 35 – 30 – 25 – 20 – 15 – 10 – 5 – 0 – Actual demand (At) Forecast including trend (FITt) * 4 - * © 2014 Pearson Education, Inc. Trend Projections Fitting a trend line to historical data points to project into the medium to long-range Linear trends can be found using the least squares technique y = a + bx ^ where y = computed value of the variable to be predicted (dependent variable)
  • 49. a = y-axis intercept b = slope of the regression line x = the independent variable ^ * 4 - * © 2014 Pearson Education, Inc. Least Squares Method Figure 4.4 Least squares method minimizes the sum of the squared errors (deviations) Deviation1 (error) Deviation5 Deviation7 Deviation2 Deviation6 Deviation4
  • 50. Deviation3 Actual observation (y-value) Trend line, y = a + bx ^ Time period Values of Dependent Variable (y-values) | | | | | | | 1 2 3 4 5 6 7 * 4 - * © 2014 Pearson Education, Inc. Least Squares Method Equations to calculate the regression variables * 4 - *
  • 51. © 2014 Pearson Education, Inc. Least Squares ExampleYEARELECTRICAL POWER DEMANDYEARELECTRICAL POWER DEMAND174510527961423807122490 * 4 - * © 2014 Pearson Education, Inc. Least Squares ExampleYEAR (x)ELECTRICAL POWER DEMAND (y)x2xy 1 74 1 74 2 79 4 158 3 80 9 240 4 90 16 360 5 105 25 525 6 142 36 852 7 122 49 854 Σx = 28 Σy = 692 Σx2 = 140 Σxy = 3,063
  • 52. * 4 - * © 2014 Pearson Education, Inc. Least Squares ExampleYEAR (x)ELECTRICAL POWER DEMAND (y)x2xy 1 74 1 74 2 79 4 158 3 80 9 240 4 90 16 360 5 105 25 525 6 142 36 852 7 122 49 854 Σx = 28 Σy = 692 Σx2 = 140 Σxy = 3,063
  • 53. Demand in year 8 = 56.70 + 10.54(8) = 141.02, or 141 megawatts * 4 - * © 2014 Pearson Education, Inc. Least Squares Example Figure 4.5
  • 54. | | | | | | | | | 1 2 3 4 5 6 7 8 9 160 – 150 – 140 – 130 – 120 – 110 – 100 – 90 – 80 – 70 – 60 – 50 – Year Power demand (megawatts) Trend line, y = 56.70 + 10.54x ^ * 4 - * © 2014 Pearson Education, Inc. Least Squares Requirements We always plot the data to insure a linear relationship We do not predict time periods far beyond the database Deviations around the least squares line are assumed to be
  • 55. random 4 - * © 2014 Pearson Education, Inc. Seasonal Variations In Data The multiplicative seasonal model can adjust trend data for seasonal variations in demand * 4 - * © 2014 Pearson Education, Inc. Seasonal Variations In DataFind average historical demand for each monthCompute the average demand over all monthsCompute a seasonal index for each monthEstimate next year’s total demandDivide this estimate of total demand by the number of months, then multiply it by the seasonal index for that month Steps in the process for monthly seasons: * 4 - * © 2014 Pearson Education, Inc. Seasonal Index Example 90
  • 56. 80 85 100 123 115 105 100 90 80 80 80 Total average annual demand = 1,128DEMANDMONTHYEAR 1YEAR 2YEAR 3AVERAGE YEARLY DEMANDAVERAGE MONTHLY DEMANDSEASONAL INDEXJan 80 85 105Feb 70 85 85Mar 80 93 82Apr 90 95 115May 113 125 131June 110 115 120July 100 102 113Aug 88 102 110Sept 85 90 95Oct 77 78 85Nov 75 82 83Dec 82 78 80
  • 57. 4 - * © 2014 Pearson Education, Inc. Seasonal Index ExampleDEMANDMONTHYEAR 1YEAR 2YEAR 3AVERAGE YEARLY DEMANDAVERAGE MONTHLY DEMANDSEASONAL INDEXJan 80 85 1059094Feb 70 85 858094Mar 80 93 828594Apr 90 95 11510094May 113 125 13112394June 110 115 12011594July 100 102 11310594Aug 88 102 11010094Sept 85 90 959094Oct 77 78 858094Nov 75 82 838094Dec 82 78 808094Total average annual demand =1,128
  • 58. Average monthly demand 4 - * © 2014 Pearson Education, Inc. Seasonal Index Example .957( = 90/94)DEMANDMONTHYEAR 1YEAR 2YEAR 3AVERAGE YEARLY DEMANDAVERAGE MONTHLY DEMANDSEASONAL INDEXJan 80 85 1059094Feb 70 85 858094Mar 80 93 828594Apr 90 95 11510094May 113 125 13112394June 110 115 12011594July 100 102 11310594Aug 88 102 11010094Sept 85 90 959094Oct 77 78 858094Nov 75 82 838094Dec 82 78 808094Total average annual demand =1,128
  • 59. Seasonal index 4 - * © 2014 Pearson Education, Inc. Seasonal Index ExampleDEMANDMONTHYEAR 1YEAR 2YEAR 3AVERAGE YEARLY DEMANDAVERAGE MONTHLY DEMANDSEASONAL INDEXJan 80 85 1059094.957( = 90/94)Feb 70 85 858094.851( = 80/94)Mar 80 93 828594.904( = 85/94)Apr 90 95 115100941.064( = 100/94)May113 125 131123941.309( = 123/94)June 110 115 120115941.223( = 115/94)July 100 102 113105941.117( = 105/94)Aug 88 102
  • 60. 110100941.064( = 100/94)Sept 85 90 959094.957( = 90/94)Oct 77 78 858094.851( = 80/94)Nov 75 82 838094.851( = 80/94)Dec 82 78 808094.851( = 80/94)Total average annual demand =1,128 4 - * © 2014 Pearson Education, Inc. Seasonal Index Example
  • 61. Seasonal forecast for Year 4MONTHDEMANDMONTHDEMANDJan1,200x .957 = 96July1,200x 1.117 = 1121212Feb1,200x .851 = 85Aug1,200x 1.064 = 1061212Mar1,200x .904 = 90Sept1,200x .957 = 961212Apr1,200x 1.064 = 106Oct1,200x .851 = 851212May1,200x 1.309 = 131Nov1,200x .851 = 851212June1,200x 1.223 = 122Dec1,200x .851 = 851212 4 - * © 2014 Pearson Education, Inc.
  • 62. Seasonal Index Example 140 – 130 – 120 – 110 – 100 – 90 – 80 – 70 – | | | | | | | | | | | | J F M A M J J A S O N D Time Demand Year 4 Forecast Year 3 Demand Year 2 Demand Year 1 Demand 4 - * © 2014 Pearson Education, Inc. San Diego Hospital Figure 4.6 Trend Data 10,200 – 10,000 – 9,800 – 9,600 – 9,400 –
  • 63. 9,200 – 9,000 – | | | | | | | | | | | | Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec 67 68 69 70 71 72 73 74 75 76 77 78 Month Inpatient Days 9530 9551 9573 9594 9616 9637 9659 9680 9702 9724 9745 9766
  • 64. 4 - * © 2014 Pearson Education, Inc. San Diego HospitalSeasonality Indices for Adult Inpatient Days at San Diego HospitalMONTHSEASONALITY INDEXMONTHSEASONALITY INDEXJanuary 1.04July1.03February0.97August1.04March1.02September0.97A pril1.01October1.00May0.99November0.96June0.99December0. 98 4 - * © 2014 Pearson Education, Inc. San Diego Hospital Figure 4.7 Seasonal Indices 1.06 – 1.04 – 1.02 – 1.00 – 0.98 –
  • 65. 0.96 – 0.94 – 0.92 – | | | | | | | | | | | | Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec 67 68 69 70 71 72 73 74 75 76 77 78 Month Index for Inpatient Days 1.04 1.02 1.01 0.99 1.03 1.04 1.00 0.98 0.97 0.99 0.97 0.96 4 - * © 2014 Pearson Education, Inc. San Diego HospitalPeriod676869707172MonthJanFebMarAprMayJuneFore cast with Trend & Seasonality9,9119,2659,1649,6919,5209,542Period7374757677 78MonthJulyAugSeptOctNovDecForecast with Trend & Seasonality9,94910,0689,4119,7249,3559,572
  • 66. 4 - * © 2014 Pearson Education, Inc. San Diego Hospital Figure 4.8 Combined Trend and Seasonal Forecast 10,200 – 10,000 – 9,800 – 9,600 – 9,400 – 9,200 – 9,000 – | | | | | | | | | | | | Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec 67 68 69 70 71 72 73 74 75 76 77 78 Month Inpatient Days 9911
  • 67. 9265 9764 9520 9691 9411 9949 9724 9542 9355 10068 9572 4 - * © 2014 Pearson Education, Inc. Adjusting Trend Data Quarter I: Quarter II: Quarter III: Quarter IV: 4 - * © 2014 Pearson Education, Inc. Associative Forecasting Used when changes in one or more independent variables can be used to predict the changes in the dependent variable Most common technique is linear regression analysis We apply this technique just as we did in the time-series example
  • 68. 4 - * © 2014 Pearson Education, Inc. Associative Forecasting Forecasting an outcome based on predictor variables using the least squares technique y = a + bx ^ where y = value of the dependent variable (in our example, sales) a = y-axis intercept b = slope of the regression line x = the independent variable ^ * 4 - * © 2014 Pearson Education, Inc. Associative Forecasting ExampleNODEL’S SALES (IN $ MILLIONS), yAREA PAYROLL (IN $ BILLIONS), xNODEL’S SALES (IN $ MILLIONS), yAREA PAYROLL (IN $ BILLIONS), x2.012.023.032.012.543.57
  • 69. 4.0 – 3.0 – 2.0 – 1.0 – | | | | | | | 0 1 2 3 4 5 6 7 Area payroll (in $ billions) Nodel’s sales (in$ millions) 4 - * © 2014 Pearson Education, Inc. Associative Forecasting ExampleSALES, yPAYROLL, xx2xy2.0112.03.0399.02.541610.02.0244.02.0112.03.574924.5Σ y =15.0Σx =18Σx2 =80Σxy =51.5
  • 70. 4 - * © 2014 Pearson Education, Inc. Associative Forecasting ExampleSALES, yPAYROLL, xx2xy2.0112.03.0399.02.541610.02.0244.02.0112.03.574924.5Σ y =15.0Σx =18Σx2 =80Σxy =51.5
  • 71. 4 - * © 2014 Pearson Education, Inc. Associative Forecasting ExampleSALES, yPAYROLL, xx2xy2.0112.03.0399.02.541610.02.0244.02.0112.03.574924.5Σ y =15.0Σx =18Σx2 =80Σxy =51.5
  • 72. 4.0 – 3.0 – 2.0 – 1.0 – | | | | | | | 0 1 2 3 4 5 6 7 Area payroll (in $ billions) Nodel’s sales (in$ millions) 4 - * © 2014 Pearson Education, Inc. Associative Forecasting Example If payroll next year is estimated to be $6 billion, then: Sales (in $ millions) = 1.75 + .25(6) = 1.75 + 1.5 = 3.25
  • 73. Sales = $3,250,000 4 - * © 2014 Pearson Education, Inc. Associative Forecasting Example If payroll next year is estimated to be $6 billion, then: Sales (in$ millions) = 1.75 + .25(6) = 1.75 + 1.5 = 3.25 Sales = $3,250,000 3.25 4.0 – 3.0 – 2.0 – 1.0 – | | | | | | | 0 1 2 3 4 5 6 7 Area payroll (in $ billions) Nodel’s sales (in$ millions) 4 - * © 2014 Pearson Education, Inc. Standard Error of the EstimateA forecast is just a point estimate
  • 74. of a future valueThis point is actually the mean of a probability distribution Figure 4.9 4.0 – 3.0 – 2.0 – 1.0 – | | | | | | | 0 1 2 3 4 5 6 7 Area payroll (in $ billions) Nodel’s sales (in$ millions) 3.25 Regression line,
  • 75. 4 - * © 2014 Pearson Education, Inc. Standard Error of the Estimate where y = y-value of each data point yc = computed value of the dependent variable, from the regression equation n = number of data points 4 - * © 2014 Pearson Education, Inc. Standard Error of the Estimate Computationally, this equation is considerably easier to use We use the standard error to set up prediction intervals around the point estimate 4 - * © 2014 Pearson Education, Inc. Standard Error of the Estimate The standard error of the estimate is $306,000 in sales 4.0 – 3.0 – 2.0 – 1.0 – | | | | | | | 0 1 2 3 4 5 6 7
  • 76. Area payroll (in $ billions) Nodel’s sales (in$ millions) 3.25 4 - * © 2014 Pearson Education, Inc. How strong is the linear relationship between the variables? Correlation does not necessarily imply causality! Coefficient of correlation, r, measures degree of association Values range from -1 to +1 Correlation * 4 - * © 2014 Pearson Education, Inc. Correlation Coefficient
  • 77. * 4 - * © 2014 Pearson Education, Inc. Correlation Coefficient Figure 4.10 y x (a) Perfect negative correlation y
  • 78. x (c) No correlation y x (d) Positive correlation y x (e) Perfect positive correlation
  • 79. y x (b) Negative correlation High Moderate Low Correlation coefficient values High Moderate Low | | | | | | | | | –1.0 –0.8 –0.6 –0.4 –0.2 0 0.2 0.4 0.6 0.8 1.0 * 4 - * © 2014 Pearson Education, Inc. Correlation Coefficientyxx2xyy22.0112.04.03.0399.09.02.541610.06.252.02 44.04.02.0112.04.03.574924.512.25Σy =15.0Σx =18Σx2 =80Σxy =51.5Σy2 =39.5
  • 80. * 4 - * © 2014 Pearson Education, Inc. Coefficient of Determination, r2, measures the percent of change in y predicted by the change in x Values range from 0 to 1
  • 81. Easy to interpret Correlation For the Nodel Construction example: r = .901 r2 = .81 * 4 - * © 2014 Pearson Education, Inc. Multiple-Regression Analysis If more than one independent variable is to be used in the model, linear regression can be extended to multiple regression to accommodate several independent variables Computationally, this is quite complex and generally done on the computer 4 - * © 2014 Pearson Education, Inc. Multiple-Regression Analysis In the Nodel example, including interest rates in the model gives the new equation: An improved correlation coefficient of r = .96 suggests this model does a better job of predicting the change in construction sales Sales = 1.80 + .30(6) - 5.0(.12) = 3.00 Sales = $3,000,000
  • 82. 4 - * © 2014 Pearson Education, Inc. Measures how well the forecast is predicting actual values Ratio of cumulative forecast errors to mean absolute deviation (MAD) Good tracking signal has low values If forecasts are continually high or low, the forecast has a bias error Monitoring and Controlling Forecasts Tracking Signal * 4 - * © 2014 Pearson Education, Inc. Monitoring and Controlling Forecasts Tracking signal Cumulative error MAD = * 4 - * © 2014 Pearson Education, Inc.
  • 83. Tracking Signal Figure 4.11 Tracking signal + 0 MADs – Upper control limit Lower control limit Time Signal exceeding limit Acceptable range * 4 - * © 2014 Pearson Education, Inc. Tracking Signal Example QTRACTUAL DEMANDFORECAST DEMANDERRORCUM ERRORABSOLUTE FORECAST ERRORCUM ABS FORECAST ERRORMADTRACKING SIGNAL (CUM ERROR/MAD)190100–10–10101010.0–10/10 = –1295100–5–
  • 84. 155157.5–15/7.5 = –23115100+150153010.0/10 = 04100110– 10–10104010.10/10 = –15125110+15+5155511.0+5/11 = +0.56140110+30+35308514.2+35/14.2 = +2.5 At the end of quarter 6, * 4 - * © 2014 Pearson Education, Inc. Adaptive SmoothingIt’s possible to use the computer to continually monitor forecast error and adjust the values of the a and b coefficients used in exponential smoothing to continually minimize forecast errorThis technique is called adaptive
  • 85. smoothing 4 - * © 2014 Pearson Education, Inc. Focus ForecastingDeveloped at American Hardware Supply, based on two principles:Sophisticated forecasting models are not always better than simple onesThere is no single technique that should be used for all products or servicesUses historical data to test multiple forecasting models for individual itemsForecasting model with the lowest error used to forecast the next demand 4 - * © 2014 Pearson Education, Inc. Forecasting in the Service Sector Presents unusual challenges Special need for short term records Needs differ greatly as function of industry and product Holidays and other calendar events Unusual events * 4 - * © 2014 Pearson Education, Inc. Fast Food Restaurant Forecast Figure 4.12
  • 86. 20% – 15% – 10% – 5% – 11-12 1-2 3-4 5-6 7-8 9-10 12-1 2-3 4-5 6-7 8-9 10-11 (Lunchtime) (Dinnertime) Hour of day Percentage of sales by hour of day * 4 - * © 2014 Pearson Education, Inc. FedEx Call Center Forecast Figure 4.12
  • 88. 6% – 4% – 2% – 0% – Hour of day A.M. P.M. * 4 - * © 2014 Pearson Education, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Moving average = demand in previous n periods∑ n Moving average= demand in previous n periods å n
  • 89. = Weight for period n( ) Demand in period n( )( )∑ Weights∑ = Weight for period n ( ) Demand in period n ( ) ( ) å Weights å MAD = Actual - Forecast∑ n MAD= Actual - Forecast å n MSE = Forecast errors( ) 2 ∑ n
  • 90. MSE= Forecast errors ( ) 2 å n MSE = Forecast errors( ) 2 ∑ n =1,526.52 / 8 =190.8 MSE= Forecast errors ( ) 2 å n =1,526.52/8=190.8 MAPE= 100 Actuali −Forecasti i=1 n ∑ / Actuali n
  • 91. MAPE= 100Actual i -Forecast i i=1 n å /Actual i n MAPE = absolute percent error∑ n = 44.75% 8 = 5.59% MAPE= absolute percent error å n = 44.75% 8 =5.59% ŷ = a+bx
  • 92. ˆ y=a+bx b= xy−nxy∑ x2 −nx2∑ b= xy-nxy å x 2 -nx 2 å a = y −bx a=y-bx x = x∑ n = 28 7 = 4 y = y∑ n
  • 93. = 692 7 = 98.86 x= x å n = 28 7 =4 y= y å n = 692 7 =98.86 b= xy−nxy∑ x2 −nx2∑ = 3,063− 7( ) 4( ) 98.86( ) 140− 7( ) 42( ) = 295 28 =10.54
  • 94. b= xy-nxy å x 2 -nx 2 å = 3,063-7 () 4 () 98.86 () 140-7 () 4 2 () = 295 28 =10.54 a = y −bx =98.86−10.54 4( ) =56.70 a=y-bx=98.86-10.544 () =56.70 Thus, ŷ = 56.70+10.54x
  • 95. Thus, ˆ y=56.70+10.54x = 1,128 12 months = 94 = 1,128 12 months = 94 = Average monthly demand for past 3 years Average monthly demand = Average monthly demand for past 3 years Average monthly demand ŷseasonal = Index × ŷtrend forecast ˆ y seasonal =Index´ ˆ y trend forecast
  • 96. ŷI = (1.30)($100,000)=$130,000 ŷII = (.90)($120,000)=$108,000 ŷIII = (.70)($140,000)=$98,000 ŷIV = (1.10)($160,000)=$176,000 ˆ y I =(1.30)($100,000)=$130,000 ˆ y II =(.90)($120,000)=$108,000 ˆ y III =(.70)($140,000)=$98,000 ˆ y IV =(1.10)($160,000)=$176,000 x = x∑ 6 = 18 6 = 3 y = y∑
  • 97. 6 = 15 6 = 2.5 x= x å 6 = 18 6 =3 y= y å 6 = 15 6 =2.5 b= xy−nxy∑ x2 −nx2∑ = 51.5−(6)(3)(2.5) 80−(6)(32) = .25 a = y −bx = 2.5−(.25)(3)=1.75 b= xy-nxy
  • 99. = (y-y c ) 2 å n-2 Sy,x = y2 −a y∑ −b xy∑∑ n−2 S y,x = y 2 -ay å -bxy åå n-2 Sy,x = y2 −a y∑ −b xy∑∑ n− 2 = 39.5−1.75(15.0)−.25(51.5) 6− 2 = .09375
  • 100. = .306 (in $ millions) S y,x = y 2 -ay å -bxy åå n-2 = 39.5-1.75(15.0)-.25(51.5) 6-2 =.09375 =.306 (in $ millions) r = n xy− x y∑∑∑ n x2 − x∑( ) 2 ∑ ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ n y2 − y∑( ) 2 ∑
  • 102. r = (6)(51.5)– (18)(15.0) (6)(80)– (18)2⎡ ⎣ ⎤ ⎦ – (15.0) 2⎡ ⎣ ⎤ ⎦ r= (6)(51.5)–(18)(15.0) (6)(80)–(18) 2 é ë ù û (16)(39.5)–(15.0) 2 é ë ù û = 309−270 (156)(12) = 39
  • 104. y=1.80+.30x 1 -5.0x 2 = (Actual demand in period i−Forecast demand in period i)∑ Actual−Forecast∑ n = (Actual demand in period i-Forecast demand in period i) å Actual-Forecast å n MAD = Forecast errors∑ n = 85 6 =14.2 MAD= Forecast errors å n = 85
  • 105. 6 =14.2 Tracking signal = Cumulative error MAD = 35 14.2 = 2.5 MADs Tracking signal= Cumulative error MAD = 35 14.2 =2.5 MADs Sample Computing Project Report Square Plate in Orthogonal Guides Keith D. Hjelmstad June 19, 2015
  • 106. Introduction The subject of the investigation for the Sample Computing Project is the Square Plate in Orthogonal Guides. The system is illustrated in Fig. 1. The mechanism consists of a square plate of uniform thickness and dimension b that is constrained in such a way that two of its corners must move in orthogonal guides—one horizontal and the other vertical. We assume that the guides do not have friction and are restrained against motion in either direction (i.e., there is no possibility of uplift). The corner B is subjected to a constant force P acting vertically. As the plate moves, the corner C moves and the plate rotates (by an angle θ, as shown in the sketch). We assume that the guide that constrains point B can pass by the guide that constrains point C so that point B can actually move below the horizontal guide. The task is to describe the behavior of this system. In this report we first derive the equations of motion that are implemented in the code and verify the code by observing certain aspects of the response in certain specific scenarios. With the verified code we explore several aspects of the response of the system, including the influence of the initial angle, the initial angular velocity, and the magnitude of the applied load. We extend the scope of the
  • 107. problem slightly by adding a viscous damping term. We make observations on the behavior of the horizontal reaction force at point B under dynamic loads and we make an observation about the geometry of the motion of the corners of the plate as constrained by the guides. We also comment on other aspects of the problem which could be explored using the code, but are not covered in this report. Theory Derivation of the equations of motion. The motion of the plate can be completely characterized by the angle θ, which depends upon time. The system is a rigid body undergoing motion in a plane. The body must respect balance of linear and angular momentum. There are no mechanisms of energy dissipation (e.g., friction). Therefore, the system should conserve energy and we can use that fact to derive the equations of motion and verify the code. The full derivation of the equations of motion can be found in Appendix B (which is also the solution to HW problem 0.0.0). Note that in the derivation we first characterize the motion with two variables (θ and z) and subsequently enforce the constraint that the motion must be along the guides at the two constrained points. Note that due to the kinematic description we have selected, the constraint at point C is automatically satisfied. We achieve the constraint at B by forcing the velocity at that point to be zero in the 1e (horizontal) direction. Setting 1 0B ⋅ can use that relationship to eliminate the variable z from our equations (but note that we sometimes still use z to keep the algebra simpler).
  • 108. P b b B C θ Fig. 1 Illustration of application problem Sample Computing Project Square Plate in Orthogonal Guides 2 The equations of motion for the system are—either from conservation of energy or from balance of angular momentum—given by the equation (see Appendix B for details of the derivation) ( )3 34 2 cos sin 0 P g W b
  • 109. where 2W gbρ= is the total weight of the plate (density time thickness times area), P is the applied force, b is the length of the sides of the plate, g is the acceleration of gravity, and ( )tθ is the angle that the plate makes with the horizontal. The equation is a second-order, nonlinear differential equation in the variable θ. We will solve this equation numerically and include initial in our program so that they can be varied and studied. The horizontal reaction force at point B can be obtained from balance of linear momentum. The magnitude of this force is (2) The derivation of this expression can also be found in Appendix B. Equations for Numerical Analysis. The equations for numerical integration of a second order dynamical system were derived in the Course Notes entitled Numerical Methods—integrating the equations of motion (Hjelmstad, 2013). Let the angle, angular velocity and angular acceleration at the discrete time nt t= be denoted as follows: The generalized trapezoidal rule allows us to estimate the values of the angle and angular velocity at the next time step 1n nt t t+ = + ∆ (where t∆ is the size of the time step) as ( )
  • 110. ( ) 1 1 1 1 (1 ) (1 ) n n n n n n n n v v t a a x x t v v β β β β + + + + = + ∆ + − = + ∆ + − (4) where β is a numerical analysis parameter (which we usually set to 0.5). If we also satisfy the equation of motion at the next time step, then we have enough equations to solve for the three state variables at the new time step. Those three equations, then, enable the solution of the differential equation starting from known initial conditions and marching forward in time. The equation of
  • 111. motion in the discrete variables is ( )3 31 1 14 2 cos( ) sin( ) 0n n n P g a x x W b+ + + (5) In anticipation of using Newton’s Method (see the Course Notes entitled Newton’s Method—solving nonlinear algebraic equations (Hjelmstad, 2013) for details) to solve the equations of motion we define the residual as ( )3 31 1 1 14 2( ) cos( ) sin( )n n n n P g g a a x x W b+ + + + (6) The tangent for this residual is simply the derivative of g with respect to its argument 1na + ( )1 3 31 1 14 2
  • 112. 1 ( ) 1 sin( ) cos( )nn n n n g a P g A x x a W b ζ++ + + + (7) where 2 21 1( ) / ( ) (1 )n nd x d a tζ β+ += = ∆ − by virtue of Eqn. (4) and as shown in detail in Appendix B. Note that we have used the chain rule in the derivation of the tangent matrix. Since there is only one variable the Sample Computing Project Square Plate in Orthogonal Guides 3 tangent matrix is 1 1× . We can solve the equations in the code by applying Newton’s method, with these definitions. The code is given in Appendix A.
  • 113. Code Verification. In order to verify that the code computes the intended results we will consider several verification scenarios. Because the governing equation of motion is nonlinear there are no known analytical solutions to compare the results to. However, we can verify that the energy is conserved by plotting the energy versus time (that is an independent verification because we do not actually use conservation of energy to advance the solution in the code). Figure 2 shows the response of the system initially at rest with P/W = 0.65. We can also verify the code if we can specify initial conditions and a force P that is in static equilibrium. By statics, we can easily show that when the plate is initially at rest then a force of 12P W= should hold the plate in static equilibrium (at any angle). Figure 3 shows the system with initial angle set to 0.4oθ = 0 5 10 15 20 0 5 10 15 t T ( bl ue
  • 114. ), U ( re d) , W k (c ya n) , E ( bl ac k) Energy and Work vs. Time 0 2 4 6 8 10 12 14 16 18 20 0 0.5 1 1.5
  • 115. 2 t A ng le Angle vs. Time 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 t A ng lu la r V el oc
  • 116. ity Angular Velocity vs. Time Fig 2. Verification problem. Plate is initially at rest with P/W=0.65. The energy plot shows that the net energy (energy minus work done by the load), shown in black, remains constant. The kinetic energy is shown in blue, the potential energy is shown in red, and the work done by the load is shown in cyan. 0 1 2 3 4 5 6 7 8 9 10 -1 0 1 2 t A ng le Angle vs. Time 0 1 2 3 4 5 6 7 8 9 10 -1 -0.5 0
  • 117. 0.5 1 t A ng lu la r V el oc ity Angular Velocity vs. Time Fig 3. Verification problem. Plate has initial angle of θο = 0.4, zero initial angular velocity and load P=W/2. The plot shows that the angle remains constant with zero angular velocity (that is the definition of static). Sample Computing Project Square Plate in Orthogonal Guides 4
  • 118. with zero initial angular velocity. The plot of angle and angular velocity versus time shows that the angle remains constant. That is the definition of static. The picture from the animation (a movie, which in this case does not move) is shown to depict the (static) position of the plate. As a final verification, we can observe that values of 12P W< should result in a downward motion (counterclockwise rotation) initially because the weight of the block should overcome the upward force and values 12P W> should result in upward motion (clockwise rotation) initially because the upward force should overcome the weight. This observation is best done through the animation. However, you can see from Fig. 2 that in the case where the load trumps the weight the angle initially moves in the positive direction. According to our sign convention that is a clockwise angle, as expected. Study and Results The physical system in this computing project is a very specific one; in essence, it is a device. The aim of the study for this project is to understand the behavior of the device under various initial conditions and by looking at it through various lenses (essentially the output graphics generated by the code). We will try to find general trends and make general conclusions about the behavior. We will extend the scope of the problem slightly by introducing a velocity-dependent damping mechanism. To accomplish this task we will need to augment our theory and add the new feature to the code. The damped system will allow us to examine the eventual static repose of the system when all of the kinetic energy has been drained (through damping) from the system.
  • 119. General motion of the system. In the verification section we have already been introduced to some aspects of the motion of the system. Recall that Fig. 2 showed the response of the system initially horizontal (θ = 0) and at rest, subjected to a load of P/W = 0.65. We have already observed that the motion of the system is initially in the direction of the load (i.e., the load overwhelms the weight). Both the angle and angular velocity move initially in the positive direction. One can observe from those response curves that the angle achieves a maximum of 1.57θ = radians. That means that the plate rotates all the way to the other side (180 degrees) before turning around and rotating back the other way. Another observation is that the velocity at the peak of the motion (i.e., where the angle is greatest) is zero. The angular velocity is the rate of change of the angle. When the angle turns around, its rate of change must pass through zero. This is, in fact, another verification of the correctness of the code. One can also see in Fig. 2 that the period of oscillation (time between peaks) of the motion is approximately 8 seconds. The apparent period of oscillation of the energy is exactly half that value. The reason that the energy oscillates twice as fast as the motion itself, is a property of energy. In motion, the system converts potential to kinetic energy, and vice versa. The kinetic energy is maximum when the motion is at its peak and returns to its initial value (zero in this case) when the plate reaches its extreme angle. Observe that the angular velocity peaks twice in each cycle (once positive and once negative).
  • 120. Initial Angle. In Fig. 4 we examine the effect of varying the initial angle for that same experiment. The response curves show that the plate rotates exactly to the complement of the initial angle, giving a completely symmetric response. The first case oscillates between 0 and π. The second case oscillates between 0.3 and π−0.3. The third case oscillates between 0.6 and π−0.6. The angular velocity curves in Fig. 4 do appear to pass through zero at the same time, but seem to lose some coherence as time goes on. The cause of this phenomenon is unknown. It could be due to loss of accuracy of the numerical integration, but reduction of the time step seems to rule this out. Perhaps this phenomenon is worthy of more study in the future (time and space do not allow it here). Sample Computing Project Square Plate in Orthogonal Guides 5 Initial velocity. We can examine the effects of changing the initial angular velocity. Many of the trends are best made from observing the animation of the motion. Some experimentation with small values of P show that the system tends oscillate like a pendulum for low initial angular velocities. With no damping, there is an initial angular velocity great enough to get the system spinning. If damping is added for such a case, the system will spin until it loses enough energy, after which it will oscillate with decreasing amplitude until it comes to rest in its static position. The magnitude of the force P
  • 121. has a significant effect on the dividing line between spinning and oscillating—the larger P is, the more inclined the system is to oscillate. The force acts as a stabilizing influence. Load magnitude. Experiments with changing the magnitude of the load showed that no matter how large or small the load is, the tendency of the plate to oscillate between the initial angle and its complement did not change. This result is not intuitively obvious (at least not to me). Energy is put into the system only through the load P. One might imagine that P could put larger and larger amounts of energy in by increasing the magnitude of P. With more energy in it seems like the plate should be flung further and further. Figure 5 shows the case with an initial angle of θo = 0.2 and a large load ratio of P/W = 10. The extremes of the 0 2 4 6 8 10 12 14 16 18 20 0 0.5 1 1.5 2 t A ng le
  • 122. Angle vs. Time 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 t A ng lu la r V el oc ity Angular Velocity vs. Time Fig 4. Study of the effect of initial angle. The system in initially at rest in each case, but the initial angle is θo =0.0, 0.3, and 0.6. No matter what the force P the plate rotates only to the complementary angle and back again.
  • 123. 0 2 4 6 8 10 12 14 16 18 20 0 0.5 1 1.5 t A ng le Angle vs. Time Fig 5. Study of the effect of increasing the magnitude of the load P. The system in initially at rest with initial angle is θo =0.2. The load ratio is P/W =10. The effect is to increase the frequency of the motion, but the amplitude remains the same as P/W =0.65. Sample Computing Project Square Plate in Orthogonal Guides 6 oscillation are not affected by the large load. The main effect of the larger load ratio is that the frequency of the oscillation is dramatically increased. The reason we
  • 124. cannot put arbitrary amounts of energy into the system is that the mechanism pulls back on the load during part of the motion, thereby extracting energy back out of the system. The horizontal reaction at B. From the perspective of design, it is interesting to examine the behavior of the reaction forces in the dynamic scenario. How strong do the guides need to be? For the static case the horizontal reaction at point B is always zero. For dynamic motion it is not. Figure 6 shows a plot of the horizontal reaction force (normalized by the value of the weight W) for the case of an initially horizontal plate starting at rest with P/W = 0.65. As expected the reaction force is not zero. It oscillates back and forth at magnitude about equal to the weight of the plate (for this case). Notice also that the nature of the motion is not the (roughly) sinusoidal response of the angle and angular velocity. Half way between the extremes of motion the reaction force changes most rapidly and it changes from negative to positive and vice versa. The shape of the response curve changes significantly as the load level P/W changes. The effect of varying the load (as a fraction of the weight) is shown in Table 1. The system starts from rest in the horizontal position, subjected to the load magnitude given. The largest horizontal reaction occurs when there is no load applied to the system (i.e., the plate simply falls under its own weight). At the static load (P/W=0.5) there is no reaction (and no motion). For load values above the static load the amplitude of the horizontal reaction gets larger again. For values of P/W>2 the reaction gets larger and larger.
  • 125. Table 1. Effect of load ratio on horizontal reaction P/W NB/W P/W NB/W 0.00 18.9 0.55 0.44 0.10 15.1 0.60 0.88 0.20 11.4 0.70 1.77 0.30 7.57 0.80 2.65 0.40 3.78 0.90 3.53 0.45 1.89 1.00 4.42 0.50 0.00 2.00 13.2 Damped motion. In order to explore damped motion we must augment our equations of motion with a velocity-dependent term. The coefficient of the velocity dependent term is called the damping coefficient. It is not important to ascribe a physical origin or value to this constant for the study, except to note that you can increase the effects of damping by making the damping coefficient larger and decrease them by making it smaller. Damping continuously takes energy out of the system. The equation of motion with damping is (see Appendix B) Fig 6. Angle (top) and horizontal reaction at point B (bottom) versus time. The plate is initially at rest with P/W=0.65. 0 2 4 6 8 10 12 14 16 18 20 0 0.5 1 1.5
  • 126. 2 t A ng le Angle vs. Time 0 2 4 6 8 10 12 14 16 18 20 -2 -1 0 1 2 t N B /W Reaction at B vs. Time Sample Computing Project Square Plate in Orthogonal Guides
  • 127. 7 ( )3 34 2 cos sin 0 P g W b where µ is the damping constant (which will be a user-specified value in the code). The residual and tangent for Newton’s method are easily computed to be ( )3 31 1 1 1 14 2( ) cos( ) sin( )n n n n n P g g a a v x x W b µ+ + + + + (9) and ( )1 3 31 1 14 2 1 ( )
  • 128. 1 sin( ) cos( )nn n n n g a P g A x x a W b µη ζ++ + + + = = + − − (10) where 1 1( ) / ( ) (1 )n nd v d a tη β+ += = ∆ − , in accord with the generalized trapezoidal rule (and the chain rule). The code is very simple to change to account for this additional term (note that the code in Appendix B has this term in it). Figure 7 shows a case with damping. The system starts in the horizontal position at rest with load ratio of P/W = 0.65, as before. The damping takes energy out of the system, which you can see from the energy plot in the figure. The black line is the total net energy. The total net energy levels off to a minimum value as time goes on. The motion damps to a static position (i.e., when none of the fields change with time). It is obvious (at least in retrospect) that the static position is the one where the hinges in the guides align with the direction of the applied force. Motion of the corners. There is one final observation on the
  • 129. response of this system that is worth pointing out. In the animations we include a tracer line (the position for recent times) for the corners. It is not a surprise that the motions of the constrained points B and C are straight lines along the guides. It is somewhat surprising to find that the other corners also trace straight lines along a 45 degree line. Figure 8 shows these lines for a snapshot of a certain motion. Upon reflection it might be an obvious geometric truth about the two constraints. In fact, one should be able to prove that the position of the corners must lie along these lines. The proof is beyond the scope of this report. It is worth noting that seeing is believing and it is unlikely that anyone would think to make such a proof without first seeing it in the animation. 0 5 10 15 20 25 30 35 40 0 0.5 1 1.5 t A ng le Angle vs. Time 0 5 10 15 20 25 30 35 40
  • 130. -0.5 0 0.5 1 t A ng lu la r V el oc ity Angular Velocity vs. Time Fig 7. Damped motion. The system in initially horizontal and at rest with P/W = 0.65. The damping coefficient is set to µ=0.2. Observe how the motion damps to the static value. The snapshot of the animation shows that the static position has the hinges aligned with the load. The viscous damping removes energy from the system. 0 5 10 15 20 25 30 35 40 0
  • 132. ac k) Energy and Work vs. Time Sample Computing Project Square Plate in Orthogonal Guides 8 Other aspects. The code is a very general solution to this problem. Any of the physical parameters could be studied in more detail. We have considered some of those, and even within those studies, only a small number of parameter values. We have not looked at the effects of varying some of the parameters, e.g., the dimension b of the plate or the total weight W. It would also be possible to examine the performance of the numerical integration scheme. In particular, we could vary the time step to determine what value is needed to get good accuracy. For these computations we have used 0.01t∆ = , which appears to be sufficiently accurate. It would not be difficult to modify the formulation to have a load P that varies with time. We could use such a code to model a process like a string pull to start an engine. We could then try to find an optimal pulling strategy to get the plate spinning as fast as possible (for a certain input of work). Many other extensions are possible. Conclusions This report has documented the derivation of the equations of
  • 133. motion for a square plate with opposite corners constrained to move in orthogonal guides. The system is a single degree of freedom system that can be described in terms of the angle of rotation of the plate as a function of time. The equations of motion are nonlinear, but they can be integrated numerically. The code in Appendix A carries out the numerical integration and produces graphical response (including an animation, which cannot be shown in a static report). In the study we explored the effects of the initial angle, the magnitude of the load (relative to the weight of the plate), the evolution of the horizontal reaction at point B, and the static position (by way of damped equations of motion). We discovered that the response is always symmetric with the plate oscillating between the initial angle and its complement, independent of the magnitude of the load. Changing the magnitude of the load change the frequency of oscillation of the system (with larger loads giving higher frequencies). The reaction force at point B showed non- sinusoidal oscillations with magnitudes that varied with the applied load P (whereas the reaction is zero for the static case). References K. D. Hjelmstad. (2013). Numerical Methods—integrating the equations of motion. Course notes for CEE 212 Engineering Mechanics II—Dynamics. Arizona State University. K.D. Hjelmstad (2013). Newton’s Method—a method to solve nonlinear algebraic equations. Course notes for CEE 212 Engineering Mechanics II—Dynamics. Arizona State University.
  • 134. Fig 8. Snapshot of plate in motion from the animation. The blue lines are the recent positions of the corners the yellow dot is point B, the white dot is point C. Sample Computing Project Square Plate in Orthogonal Guides 9 Appendix A. MATLAB code. % *-------------------------------------------------------------------* % | Sample CP -- Square Plate (Implicit Version) | % | Square plate constrained to move in horizontal and guides | % | and pulled up by a constant force. This code adds a drag term | % | that models friction in the glides (not part of the Assessment | % | problem) this helps to see how the system would get to a | % | final static configuration (it lets the dynamics damp out). | % *-------------------------------------------------------------------* clear; clc; %.... Print Banner to command window fprintf('%sn','*------------------------------------------------*') fprintf('%sn','| Sample CP |') fprintf('%sn','| K. D. Hjelmstad |')
  • 135. fprintf('%sn','| |') fprintf('%sn','| Original Version: 10.25.2013 |') fprintf('%sn','| Latest Update: 06.23.2015 |') fprintf('%sn','*------------------------------------------------*') %.... Input physical problem data gravity = 9.81; % acceleration of gravity (m/s^2) Wt = 4; % Total weight of plate b = 5; % plate dimension (m) pr = 2.0; % Ratio of applied force to weight P = pr*Wt; % Total force drag = 0.0; % drag coefficient %.... Initial conditions and analysis start and end times xo = 0.0; % initial angle of plate vo = 0.0; % initial angular velocity of plate to = 0.0; % initial time (usually zero) tf = 20; % final time (end of analysis) %.... Compute coefficient of equation of motion (constant) c = (3-6*pr)*gravity/(4*b); % coefficient of equation %.... Compute an estimate of the maximum angular velocity (xo = 0) omax = sqrt(vo^2 + 2*(1-sqrt(2))*c); %.... Numerical analysis parameters. Put all parameters that are % associated with the numerical methods here. For implicit methods % you can put the parameters that describe and control Newton's method. dt = 0.01; % analysis time step beta = 0.5; % numerical integration parameter tol = 1.e-8; % Newton iteration tolerance itmax = 10; % Newton max no. iterations eta = (1-beta)*dt; % Integration parameter
  • 136. zeta = eta^2; % Integration parameter %.... Select figures to plot (1=yes, 0=no) dofig1 = 1; % theta and omega vs. time dofig2 = 0; % energy vs. time dofig3 = 0; % theta vs. omega dofig4 = 1; % Reaction at B vs time. dofig5 = 0; % Simulation movie %.... Set up a history array to save results ever once in a while % This part is simply to avoid plotting every point that we compute % It does not take that many points to give a nice representative % response curve. We need to compute more points to get accuracy in % the solution. nitems = 18; % number of items stored in history nreport = 4000; % number of steps to output nsteps = ceil((tf-to)/dt); % total number of analysis time steps nreport = min(nreport,nsteps); % report only what you compute noutput = ceil(nsteps/nreport); % set frequency of output history = zeros(nreport,nitems); % initialize storage for history Sample Computing Project Square Plate in Orthogonal Guides 10 %.... Echo input values to screen
  • 137. fprintf('rr%sn', ' PHYSICAL PROPERTIES ') fprintf('%s%8.3fn', ' b (plate width) ',b) fprintf('%s%8.3fn', ' pr = (P/W) ',pr) fprintf('%s%8.3fn', ' Maximum angular velocity (est.) ',omax) fprintf('%s%8.3fn', ' Initial time (to) ',to) fprintf('%s%8.3fn', ' Final time (tf) ',tf) fprintf('rr%sn', ' INTEGRATION OF EQUATIONS ') fprintf('%s%8.3fn', ' Time increment (dt) ',dt) fprintf('%s%8.3fn', ' Numerical integration (beta) ',beta) fprintf('%s%8in', ' Number of time steps ',nsteps) fprintf('%s%8in', ' Number of steps to report ',nreport) fprintf('%s%8in', ' Output frequency (no. of steps) ',noutput) fprintf('rr%sn', ' INITIAL CONDITIONS ') fprintf('%s%8.3fn', ' Initial position (xo) ',xo) fprintf('%s%8.3fn', ' Initial velocity (vo) ',vo) %.... Set time and output counters to get ready to start analysis t = to; out = 0; iout = 0; its = 0; %.... Initialize position and velocity (put in 'xold' and 'vold' arrays) xold = xo; vold = vo; %.... Compute initial acceleration from the equation of motion aold = -c*(cos(xold) - sin(xold)) - drag*vo; %.... Compute motion by numerical integration--loop over time
  • 138. steps for i=1:nsteps %....... Write the values out to history, if appropriate % This segment writes a row to 'history' every 'noutput' steps % Note that for quantities that are not needed to advance the % numerical solution (e.g., speed and xcomp) we only need to % compute them if it is an output step. if (out==0) iout = iout + 1; %......... compute the locations of the four corners nvec = [ sin(xold); cos(xold)]; mvec = [-cos(xold); sin(xold)]; x1 = -(sin(xold) - cos(xold))*b*[1; 0]; x2 = x1 + b*mvec; x3 = x2 + b*nvec; x4 = x1 + b*nvec; xc = [ x1', x2', x3', x4']; %......... Compute work and energy T = (Wt*b^2/(3*gravity))*vold^2; % Kinetic energy U = Wt*b*(cos(xold) + sin(xold))/2; % Potential energy Work = P*b*(cos(xold) + sin(xold) - 1); % Work of force netE = T + U - Work; % Energy - Work %......... Compute reaction force at B csum = cos(xold) + sin(xold); cdif = cos(xold) - sin(xold); NB = -(b/2)*(aold*csum + vold^2*cdif); %......... Write results to 'history' array history(iout,:) = [t,xold,vold,aold,its,xc,T,U,Work,netE,NB];
  • 139. out = noutput; end out = out - 1; %....... Compute the values of the state for the next time step t = t + dt; %....... Initialize Newton loop err = 1.0; its = 0; bn = xold + vold*dt + aold*beta*(1-beta)*dt^2; cn = vold + aold*beta*dt; anew = aold; Sample Computing Project Square Plate in Orthogonal Guides 11 %....... Compute new acceleration from equation of motion while (err > tol) && (its < itmax) its = its + 1; % iteration xnew = bn + zeta*anew; % angle vnew = cn + eta*anew; % ang. vel. g = anew + c*(cos(xnew) - sin(xnew)) + drag*vnew; % residual A = 1 - c*zeta*(sin(xnew) + cos(xnew)) + drag*eta; % Tangent anew = anew - g/A; % ang. accel. err = norm(g); % error end % while loop %....... Compute new angular velocity and angle by trapezoidal rule
  • 140. vnew = vold + dt*(beta*aold + (1-beta)*anew); xnew = xold + dt*(beta*vold + (1-beta)*vnew); %....... Put current state (new) into old slot to get ready for new step % Note that this approach allows us to only store two states as % we carry out the calculation: 'old' and 'new' aold = anew; vold = vnew; xold = xnew; end % loop over time steps max (history(:,18)) %.... GRAPHICAL OUTPUT SECTION % In this section we create plots to display the results that were % stored in the array history. Each row of history contains the values % of the response at a given time. The value "iout" refers to the last % row number in history. Thus, history(1:iout,1) is time, etc. xmina = floor(min(history(1:iout,6:13))); xmaxa = ceil(max(history(1:iout,6:13))); xmin = min((xmina)); xmax = max((xmaxa)); xsize = max(abs(xmin),abs(xmax)); %.... Plot time history of angle if (dofig1==1) fig=figure(1); clf; subplot(2,1,1); grid on; hold on; xlabel('t'); ylabel('Angle'); title('Angle vs. Time'); p = plot(history(1:iout,1),history(1:iout,2)); set(p,'Color','b','LineWidth',1.5);
  • 141. subplot(2,1,2); grid on; hold on; xlabel('t'); ylabel('Anglular Velocity'); title('Angular Velocity vs. Time'); p = plot(history(1:iout,1),history(1:iout,3)); set(p,'Color','r','LineWidth',1.5); end % dofig1 %.... Plot energy vs. time if (dofig2==1) fig=figure(2); clf; grid on; axis square; hold on; xlabel('t'); ylabel('T (blue), U (red), Wk (cyan), E (black)'); title('Energy and Work vs. Time'); p = plot(history(1:iout,1),history(1:iout,14)); set(p,'Color','b','LineWidth',1.5); p = plot(history(1:iout,1),history(1:iout,16)); set(p,'Color','c','LineWidth',2); p = plot(history(1:iout,1),history(1:iout,15)); set(p,'Color','r','LineWidth',1.5); p = plot(history(1:iout,1),history(1:iout,17)); set(p,'Color','k','LineWidth',2); end % dofig2 %.... Plot phase portrait if (dofig3==1) fig=figure(3); clf; grid on; axis square; hold on; xlabel('Angle'); ylabel('Angular Velocity'); Sample Computing Project Square Plate in Orthogonal Guides 12
  • 142. title('Phase Portrait'); p = plot(history(1:iout,2),history(1:iout,3)); set(p,'Color','r','LineWidth',2); end % dofig3 %.... Reaction at B vs. time if (dofig4==1) fig=figure(4); clf; subplot(2,1,1); grid on; hold on; xlabel('t'); ylabel('Angle'); title('Angle vs. Time'); p = plot(history(1:iout,1),history(1:iout,2)); set(p,'Color','b','LineWidth',2); subplot(2,1,2); grid on; hold on; xlabel('t'); ylabel('NB/W'); title('Reaction at B vs. Time'); p = plot(history(1:iout,1),history(1:iout,18)); set(p,'Color','g','LineWidth',2.5); end % dofig4 %.... Plot 3D simulation as a movie if (dofig5==1) fig5=figure(5); kframes = 10; kforget = 5; numframes = floor(iout/kframes); for k=1:numframes rect = get(fig5,'Position'); rect(1:2) = [0 0]; axis equal; grid on; axis ([-xsize xsize -xsize xsize]); xlabel('x'); ylabel('y');title('Animation'); hold on; %........ Plot the guide tracks yb1 = [-xsize, xsize]; xb1 = [0,0]; xb2 = [-xsize, xsize]; yb2 = [0,0]; plot(xb1,yb1,'Color','k','Linewidth',15);
  • 143. plot(xb2,yb2,'Color','k','Linewidth',15); plot(xb1,yb1,'Color','g','Linewidth',11); plot(xb2,yb2,'Color','g','Linewidth',11); %........ Plot the traces of the path of the tip of the corners kk = k - kforget; kk = (kk + abs(kk))/2; istart = 1 + kframes*kk; iend = kframes*k; p = plot(history(istart:iend,6),history(istart:iend,7)); set(p,'Color','b','LineWidth',1); p = plot(history(istart:iend,8),history(istart:iend,9)); set(p,'Color','b','LineWidth',1); p = plot(history(istart:iend,10),history(istart:iend,11)); set(p,'Color','b','LineWidth',1); p = plot(history(istart:iend,12),history(istart:iend,13)); set(p,'Color','b','LineWidth',1); %........ Plot the four sides of the box for iii=1:4 i1 = (iii-1)*2+6; i2 = i1+1; i3 = i2+1; i4 = i3+1; if (iii==4) i3 = 6; i4 = 7; end xb = [history(iend:iend,i3),history(iend:iend,i1)]; yb = [history(iend:iend,i4),history(iend:iend,i2)]; plot(xb,yb,'Color','k','Linewidth',2); end % loop on iii %........ Plot the rollers in the guides plot(history(iend:iend,6), history(iend:iend,7),... 'o','MarkerFaceColor','w','Linewidth',2,... 'MarkerEdgeColor','k','MarkerSize',11); plot(history(iend:iend,10), history(iend:iend,11),... 'o','MarkerFaceColor','y','Linewidth',2,... 'MarkerEdgeColor','k','MarkerSize',11);
  • 144. Sample Computing Project Square Plate in Orthogonal Guides 13 %........ Put timer in upper left corner time = num2str(history(iend,1),'%4.1f'); xplace = -xmax*0.65; yplace = xmax*0.85; text(xplace,yplace,time,... 'FontSize',16,'HorizontalAlignment','right') %........ Store frame for movie (set view point) M(:,k) = getframe(fig5,rect); clf; end % loop over frames %...... Play (and record) movie with play speed factor faster that actual clf; N=1; PlaySpeed = 5; FPS = ceil(PlaySpeed*numframes/tf); movie(fig5,M, N,FPS,rect) end % dofig5 block fprintf('r%sr',' Normal Termination of Program') %.... End of program Sample CP CEE 212—Dynamics
  • 145. Arizona State University Sample Computing Project Keith D. Hjelmstad 1 © 2013 Keith D. Hjelmstad B. Describe position vector. We need to describe the position of a typical particle A in the plate relative to the origin O A. Describe geometry. We will introduce the unit vectors n and m for the purpose of describing the motion (note direction of base vectors). Derivation of Equations Appendix B. Derivation of the equations of motion for Square plate in Orthogonal Glides (Sample CP) Problem Statement. A square plate with dimensions b by b, which has a uniform mass per unit area of ρ, The corner B of the plate is subjected to a constant vertical force of magnitude P. The rollers at corners B and C ride in frictionless guides. The orientation of the plate is characterized by the angle θ. Assume that the rollers are prevented from changing guides. Find the equations of motion using energy methods and balance of momentum. Find the residual and tangent needed to implement an implicit code. (Note these equations will be implemented in a computing
  • 146. project). 1 2 1 2 sin cos cos sin θ θ θ θ = + = − + n e e m e e θ θ = − = n m m n
  • 147. 1 1 ( , , ) ( ) ( ) ( ) ( ) ( , , ) x y t z t x t y t z t x y t = + + = + x e n m e r Geometry 2e 1e ( )tθ A nm O 1( )z t e r x y
  • 148. ( , , ) ( , , ) x y t x y x y t x y = + = − r n m p m n ( ) ( ) x y x y x y x y θ θ θ θ = + = − + = −
  • 149. = − = + = r n m m n p p m n n m r It will also be convenient to introduce a (non-unit) vector r from corner D to the typical particle A in terms of the spatial variables x and y (which measure distance in the n and m directions, respectively): ( , , )x y t x y= +r n m
  • 150. We can also introduce a (non-unit) vector p, orthogonal to r ( , , )x y t x y= −p m n Note that the time derivative of r is related to p as shown in the box at right. Note that we have introduced the time-dependent variable z(t) to help describe the motion. Due to the two constraints at points B and C, z is not independent of θ. However, it will be convenient to sort out the constraint once we compute the velocity. Relationships between r and p: P b b B C θ D CEE 212—Dynamics Arizona State University Sample Computing Project Keith D. Hjelmstad
  • 151. 2 © 2013 Keith D. Hjelmstad C. Compute v and a from x. The velocity is computed as the derivatives of the position vector. Using the expressions above, we get ( ) 1 1 z z x y θ θ = − = − − x e p e m n
  • 152. We know that at point B (x=b, y=b) the velocity is only in the e2 direction. We can use this constraint to eliminate z as a variable. Note that the velocity constraint at C is already satisfied by the kinematics ( ) ( )( ) ( ) ( ) ( ) 1 1 1 1 1 10 0 cos sin cos sin B B z b z b z b z b z b
  • 153. θ θ θ θ θ θ θ θ θ = − − ⋅ = − − ⋅ = − ⋅ − ⋅ = + + = − + x e m n x e e m n e m e n e
  • 154. ( ) ( ) ( ) ( ){ } { } 1 1 2 2 1 1 sin cos cos sin cos sin sin cos b b b θ θ
  • 155. θ θ θ θ θ θ θ θ θ θ θ θ = − + − + = − + − = − + + − + − − x e r x e p x e p r If we implement the constraint into the position vector we have ( ) ( ) ( ) 2 1 2 1
  • 156. z z x y x y θ θ θ θ = − + = − − − + x e p r e m n n m where zo is constant. The first derivative of this expression, with respect to time, is ( )sin cos oz b zθ θ= − − + Note that we have found out that the rate of change of z is a function of the rate of change of θ. Hence, only one of these is independent. We can integrate this equation to find how z is related to θ. What if z turned out to be
  • 157. ( )cos That is the expression we have. Therefore, the expression for z is the correct integral of the velocity constraint equation we have derived. ( )1 1sin cosoz b θ θ= − − +x e e r It appears that zo is unknown, but its value really only depends upon where we take the origin O. If we select the origin to be located a position a distance b to the right of the intersection of the guides (i.e., zo=−b) then the final expressions for the position, velocity, and acceleration vectors are OK, so we got rid of z because it is not independent from θ. However, for algebra purposes, it will be convenient to continue to use z, knowing that we can, in the end, substitute the expression in terms of θ. 1 1 2 1 z z z θ
  • 158. θ θ = + = − = − + x e r x e p x e p r ( ) ( ) ( ) ( ){ }2 1 sin cos cos sin cos sin sin cos z b z b
  • 159. z b θ θ θ θ θ θ θ θ θ θ θ = − + − = − + = − + + − + where CEE 212—Dynamics Arizona State University Sample Computing Project Keith D. Hjelmstad 3 © 2013 Keith D. Hjelmstad K. Compute energy of the system. We can compute the kinetic and
  • 160. potential energies of the system as follows: ( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( ) 1 2 1 1 12 2 2 2 21 2 2 2 2 21 1 2 2 ( , ) ( , ) 2 cos sin cos sin ( ) A A A A A A A T x y x y dA z z dA
  • 161. z z x y x y dA z dA z x dA z y dA x y dA ρ ρ θ θ ρ θ θ θ θ ρ θ θ ρ θ θ ρ θ ρ = ⋅ = − ⋅ − = − + + + = − − + + ∫ ∫ ∫ ∫ ∫ ∫ ∫ x x e p e p
  • 162. ( ) ( ) [ ] [ ] 2 2 2 2 0 3 31 1 3 30 00 0 4 22 2 3 3 b b A o b bb b x y dA x y dx dy x y x y W b b g
  • 163. ρ ρ ρ ρ ρ + = + = = ∫ ∫ ∫ ( )1 1 cos sin x y x yθ θ ⋅ = − ⋅ = − − p e m n e 1 2 1 2 sin cos cos sin θ θ θ θ = +
  • 164. = − + n e e m e e [ ] [ ] [ ] [ ] 0 0 2 0 0 0 0 2 0 0 b b A b b b b A b b g dA g dx dy g x y g b dA dx dy x y b
  • 165. ρ ρ ρ ρ ρ ρ ρ ρ = = = = = = ∫ ∫ ∫ ∫ ∫ ∫ [ ] [ ] 0 0 2 31 1 2 200 0 0 2 31 1 2 200 b b
  • 166. A b b b b A b b x dA x dx dy x y b y dA y dx dy y x b ρ ρ ρ ρ ρ ρ ρ ρ = = ∫ ∫ ∫ ∫ ∫ ∫
  • 167. The expressions have several integrals over the area of the domain. These can be evaluated as follows: A.2. Identify initial (or other special) conditions. This problem will be implemented as a CP so we will employ general initial conditions so that they can be varied when we run the program ( ) 2 1 2 ( , ) cos sin A A A A U g x y dA g z x y dA g x dA g y dA ρ ρ
  • 168. θ ρ θ ρ = ⋅ = − + + ⋅ = + ∫ ∫ ∫ ∫ x e e n m e ( )312 cos sinU bρ θ θ= + ( )( ) 2 2 2 21 1 1 2 2 3cos sin b T z z b b g ρ Evaluating the integrals gives: ( )
  • 169. ( ) ( ) 22 2 2 2 2 cos sin cos sin cos sin z b z b b z b θ θ θ θ θ θ θ θ θ θ = + = + = +
  • 170. 4 21 3 b T g ρ Now is a great time to substitute back the expression for the constraint. Recall So the kinetic energy reduces to the simple form: CEE 212—Dynamics Arizona State University Sample Computing Project Keith D. Hjelmstad 4 © 2013 Keith D. Hjelmstad ( )( ) ( )
  • 171. [ ] ( ) 0 2 10 0 0 sin cos cos sin cos sin 1 t P t t t W dt P z b dt P b dt Pb Pb
  • 172. θ θ θ θ θ θ θ θ θ = ⋅ = ⋅ − − = − + = + = + − ∫ ∫ ∫ F v 0 0 0
  • 173. 0 t B B t C C W dt W dt = ⋅ = = ⋅ = ∫ ∫ N v N v We can compute the work done by the forces as ( ) ( ) 4 2 31 1 3 2 cos sin cos sin 1P b E T U W b Pb
  • 174. g ρ L. Conservation of energy. Total energy (which is conserved if we account for the work put in). The total net energy is The work done by the normal forces is zero because they are orthogonal to the velocity at that point (the velocity is along the guide, the normal force is normal to the guide). ( ) ( )cos sin 1 sin cosd dt Note that we can check the anti-derivative by taking the derivative of the result and showing that it gives us back our integrand. Note that without putting any work into the system, energy is constant. If we add positive work (i.e., force in the same direction of velocity) then the amount of energy increases. Therefore, T + U = WP + const. (i.e., the current energy is the constant plus the work put in). Therefore, the total net energy should be conserved. We can use conservation of energy to determine the equation of motion ( ) ( ) 4
  • 175. 2 31 1 3 2 cos sin cos sin 1 b E b Pb g ρ ( ) ( ) ( )( ) 4 32 1 3 2 4 32 1 3 2 sin cos sin cos cos sin 0 d b E b Pb dt g b b Pb
  • 176. g ρ θ θ ρ θ θ θ θ θ θ ρ θ ρ θ θ θ = + − + − − + ( )3 34 2 cos sin 0 P b W g θ θ θ For this equation to be true for all time, noting that while angular velocity might be zero at certain times it is certainly not zero for all time, the term in square brackets must be zero. Hence, dividing through by the leading term in front of the first term, we get the equation of
  • 177. motion 2 Total Weight of PlateW bρ= = CEE 212—Dynamics Arizona State University Sample Computing Project Keith D. Hjelmstad 5 © 2013 Keith D. Hjelmstad D. Construct free body diagram (FBD). See sketch. Free body diagram 2C CN=N e A 2g dAρ− e 1B BN=N e P 2e E. Write equation of motion. Compute balance of linear momentum and balance of angular momentum, about point C. ( ) ( ) ( )( ) ( )( ) 2 2 2 1 2 2 2 1
  • 178. 2 2 1 2 2 2 1 B C A A B C A A B C A A A A P g dA dA N N P g dA z dA N N P g dA z dA x dA y dA ρ ρ ρ ρ θ θ ρ ρ ρ θ θ ρ θ θ + + − = + + − = − + + − ∫ ∫ ∫ ∫ ∫ ∫ ∫ ∫ N N e e x
  • 179. e e e e e p r e e e e e m n n m ( ) ( ) ( ) ( ) ( )( ) 2 2 3 2 3 21 1 1 2 2 2 1 2 2 2 2 3 21 1 2 1 2 B C B C N N P gb b z b b N N P gb b z b ρ ρ ρ θ θ ρ θ θ ρ ρ ρ θ θ + + − = − − − +
  • 180. + + − = + − + + e e e e e m n n m e e e n m n m ( ) ( )( ) ( ) ( )( ) 2 3 21 12 3 21 22 B C N b z b N W P b ρ ρ θ θ ρ θ θ
  • 181. = + − + + ⋅ = − + − + + ⋅ n m n m e n m n m e 1 2 1 2 sin cos cos sin θ θ θ θ = + = − + n e e m e e ( ) ( ) ( ) ( ) 1
  • 182. 1 2 2 sin cos sin cos cos sin cos sin θ θ θ θ θ θ θ θ + ⋅ = − − ⋅ = + + ⋅ = + − ⋅ = − n m e n m e n m e
  • 183. n m e We can find the integrals we need from the earlier results. If we use those here we end up with the following equations. We can dot this equation successively with e1 and e2 to get expression for the two reaction forces in terms of the motion variables. The dot products can be evaluated as shown at right ( ) ( )( ) ( ) ( )( ) 2 3 21 2 2 3 21 2 sin cos sin cos cos sin cos sin B C N b z b N b P b ρ ρ θ θ θ θ θ θ ρ ρ θ θ θ θ θ θ
  • 184. = + + + − = − + − + + E.1. First, balance of linear momentum We can also derive the equations of motion using balance of momentum. In fact, we need at least balance of linear momentum to derive the equations for the reaction forces (energy methods do not give reactions because those forces do no work). CEE 212—Dynamics Arizona State University Sample Computing Project Keith D. Hjelmstad 6 © 2013 Keith D. Hjelmstad Side calculations 1 3 2 3 1 3
  • 185. 2 3 3 2 2 3 cos sin sin cos ( ) x y x y x y θ θ θ θ × = − × = × = − × = − × =
  • 186. = + = − × = + n e e n e e m e e m e e n m e r n m p m n r p e ( ) ( )( ) ( ) ( )( ) ( ) ( )( ) ( ) ( )( ) ( ) ( )( ) 2 3 21 2 3 2 3 21 2 3 21 2 3 21 2 sin cos sin cos
  • 187. sin cos sin cos sin cos sin cos sin cos sin cos sin cos sin cos BN b z b b b b b ρ ρ θ θ θ θ θ θ ρ θ θ θ θ θ θ ρ θ θ θ θ θ θ ρ θ θ θ θ θ θ ρ θ θ θ θ θ θ = + + + − = − + + − + + + − = − + + − = − + + −
  • 188. ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )( ) ( ) ( )( ) ( ) ( ) 2 1 2 2 1 2 2 1 1 2 2 1 3 3 3 3 3sin cos sin cos cos sin BA A BA A A B AA x y g dA b N P z dA
  • 189. g x g y dA bN b P z dA dA g x y dA b N b N b P b P ρ ρ θ θ ρ ρ ρ ρθ ρ θ θ θ θ θ + × − + + × + − ∫ ∫ ∫ ∫ ∫ ∫
  • 190. n m e m n e e r e p r n e m e m × e n × e m × e n × e r e r p e e e e e ( ) ( ) ( ) ( ) ( ) 3 2 2 3 3 3 31 3 32 3 41 2 3 32 3 cos sin
  • 191. cos sin sin cos cos sin cos sin A A B x z y z dA x y dA b bN bP b z b θ ρ θ ρ θ ρ θ ρ θ θ θ θ θ θ ρ θ θ ρ θ − − + − − = + − ∫ ∫ 3 e e e e e e e
  • 192. e e E.2. Then, balance of angular momentum about point C gives Dot this equation with e3 and substitute the expressions for the reactions and the second derivative of z to get The expressions for the reaction forces still contain z. We can eliminate it by recalling that From the kinematics section (Part C) ( )3 34 2 cos sin 0 P b W g θ θ θ which is the same as the equation we got from conservation of energy. This calculation again shows that
  • 193. the two approaches give identical results. The details of the calculation is a bit different in each case (there are some similarities) and sometimes one approach is quite a bit simpler than the other. Substituting, we get ( ) ( )( ) ( ) ( )( ) 3 21 2 2 3 21 2 sin cos sin cos cos sin cos sin B C N b N b P b ρ θ θ θ θ θ θ ρ ρ θ θ θ θ θ θ = − + + − = − + − + +
  • 194. CEE 212—Dynamics Arizona State University Sample Computing Project Keith D. Hjelmstad 7 © 2013 Keith D. Hjelmstad ( ) ( ) 3 3 1 1 1 14 2 3 3 1 1 14 2 ( ) cos ( ) sin ( ) cos sin r n n n n n n n P b g a a x a x a W g
  • 195. P b a x x W g + + + + + + + We can implement this problem in a CP format. The residual can be expressed at time step tn+1 as ( ) ( ) 3 3 4 2 3 3 4 2 1 sin cos 1 sin cos rgA
  • 196. a P b d W g da P b W g θ θ θ ζ θ θ ∂ = ∂ = − Where an+1 is the angular acceleration at time tn+1. We can write the angle and angular velocity in terms of the angular acceleration a using the generalized trapezoidal rule as { } { } ( ){ } 1 1
  • 197. 1 1 1 1 1 2 2 2 1 1 (1 ) (1 ) (1 ) (1 ) (1 ) (1 ) (1 ) n n n n n n n n n n n n n n n n n n n n n n n n
  • 198. v v t a a v t a t a c a x x t v v x t v v t a t a x t v t a t a b a β β β β η β β β β β β β β β ζ + + + + + + + +
  • 199. + = + ∆ + − = + ∆ + ∆ − = + = + ∆ + − = + ∆ + − + ∆ + ∆ − = + ∆ + − ∆ + ∆ − = + (1 ) n n nc v t a t β η β = + ∆ =∆ − 2 2 2 2 (1 ) (1 ) n n n nb x t v t a
  • 200. t β β ζ β η = + ∆ + − ∆ =∆ − = 1 1 1 1 n n n n d x d a d v d a ζ η +
  • 201. + + + = = The tangent is the derivative of the residual with respect to its argument: One of the things we would like to do in our study is add a viscous damping term to the equation of motion: ( )3 34 2 cos sin 0 P b W g θ µθ θ θ Now the residual and tangent are: Damping coefficient (user specified)µ = ( )3 31 1 1 1 14 2( ) cos sinr n n n n n P b
  • 202. g a a v x x W g µ+ + + + + + ( )3 3 1 14 21 sinx cosn n P b A x W g µη ζ + + ( ) ( ) ( ) n n n n n n x t v t
  • 203. a t θ θ θ = = = Discrete state variables Definitions from trapezoidal rule Consequence of discrete equations Sample CP Report 1Sample CP - Appendix BSlide Number 1Slide Number 2Slide Number 3Slide Number 4Slide Number 5Slide Number 6Slide Number 7 CEE 213—Deformable Solids © Keith D. Hjelmstad CP 2—Multiaxial States Benchmark case
  • 204. The benchmark case will be used to demonstrate that your code works for the in-class code check. CP 2 - STRAIN TRANSFORMATION FOR UNIFORM MOTION Deformation Gradient and Strain Tensor ----- F ----- ----- E ----- 1.500 0.200 0.645 0.280 0.200 1.300 0.280 0.365 Principal Strains e1 = 0.818 e2 = 0.192 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 y
  • 205. z Deformed and Undeformed Block 0.5536 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 y z Deformed and Undeformed Block 0.0000 Original orientation Principal orientation
  • 206. 0.2 0.3 0.4 0.5 0.6 0.7 0.8 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 Mohrs Circle CEE 213—Deformable Solids The Mechanics Project Arizona State University CP 2—Multiaxial States 1 Computing Project 2 Multiaxial States
  • 207. The computing project Multiaxial States concerns the analysis of strain and stress at a point in a solid body. The goal is to write a MATLAB program that will allow the computation of the strain associated with a prescribed motion and the stress associated with that strain through Hooke’s Law. We will compute principal values, maxima, and graphically repre- sent the state by mapping the motion both in the (x,y) coordinates and in the principal co- ordinates. Finally, we will produce Mohr’s circle to represent the state. The theory needed to execute this project is contained in the Course Notes entitled Multi- axial Strain. The general steps are as follows: 1. Specify the components of the deformation tensor (matrix) F and use it to compute strain tensor E. The tensor F is the mapping matrix. We can use it to compute the deformed location of points that we identify in the undeformed configuration (e.g., the vertices of the initial square of material). 2. Develop code to plot both the undeformed square and the deformed version of it. Establish the vertices of the square with the points (0,0), (1,0), (0,1), and (1,1). Compute the deformed positions of those points using F. 3. Compute the angle for the principal directions along with the principal values of
  • 208. strain. Develop code to plot the undeformed and deformed square defined in the coordinate system associated with the principal directions (i.e., take the initial square to have its sides along those directions and map the vertices to find the deformed body. 4. Compute the stresses associated with the strains by virtue of Hooke’s law for plane strain. 5. Solve the problem of finding principal values using the eigenvalue solver (the “eig” command) in MATLAB. Output the principal values of stress, the maximum shear stress, and plot Mohr’s circle for the stress state. Do the same for the strain. 6. Examine the implications of different states of strain. For example: a. What happens in a state of uniform dilatation (elongation without shear- ing)? b. Verify that pure shear has principal directions at 45 degrees from the orig- inal orientation of the block. CEE 213—Deformable Solids The Mechanics Project Arizona State University CP 2—Multiaxial States 2
  • 209. c. Show that the principal directions for stress and strain are the same. Is this due to the nature of Hooke’s Law? Do you expect it to be true for all ma- terial models? d. Explore any other feature of the problem that you find interesting. e. Extend the code to do three dimensional states of strain for an extra nice project. Note that this step is not required but you are encouraged to do it to earn top marks. The visualization plots (especially the deformed and undeformed cube need to be rendered in 3D). Write a report documenting your work and the results (in accord with the specification given in the document Guidelines for Doing Computing Projects). Post it to the Critviz website prior to the deadline. Please consult the document Evaluation of Computing Projects to see how your project will be evaluated to make sure that you can get full marks. Note that there is no peer review process for reports in this course.