Tutorial: PolyFit 1 ,2

advertisement
Engineering 25
Tutorial:
PolyFit
st
nd
1 ,2 ,
rd
3 ,
th
4
Bruce Mayer, PE
Licensed Electrical & Mechanical Engineer
BMayer@ChabotCollege.edu
Engineering-25: Computational Methods
1
Bruce Mayer, PE
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx
PolyFit for PolyMers
 In ENGR45 you will learn
that the production of
PolyMers (Plastics) requires
Chemical Reactions
 The polymer rcns maybe
• Single ReAgent
• Multiple ReAgent
Engineering-25: Computational Methods
2
Bruce Mayer, PE
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx
MultiReagent Reaction
 The Curing Time, t, for a
Batch of certain Polymer
varies the amount of
Reagent, R, as shown in the
Data-Table (T-Table) Below
R (kg) t (sec)
 For this Data Set
0.0
1350
Find
1.1
1170
•
1st
4th
thru
degree
polynomials that
best fit the data
• Determine the
all the polynomial’s
goodness of fit by
finding J, S, and r2
Engineering-25: Computational Methods
3
2.0
2.9
4.1
5.1
6.0
7.2
8.1
9.3
Bruce Mayer, PE
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx
1070
920
895
895
960
995
1040
1260
MultiReagent Reaction
• Plot Each polynomial
and the actual Data
on the Same Graph
• Use the Low-r2
polynomials to
estimate the Amount
of ReAgent that will
Minimize the Curing
Time
Engineering-25: Computational Methods
4
R (kg) t (sec)
0.0
1350
1.1
1170
2.0
1070
2.9
920
4.1
895
5.1
895
6.0
960
7.2
995
8.1
1040
9.3
1260
Bruce Mayer, PE
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx
The Plots
 Use 2X2 SubPlot
1400
1200
1200
t (Sec)
1400
1000
800
t (Sec)
Degree = 2
0
5
R (kg)
Degree = 3
1000
800
10
1400
1400
1200
1200
t (Sec)
t (Sec)
Degree = 1
1000
800
0
5
R (kg)
Engineering-25: Computational Methods
5
10
0
5
R (kg)
Degree = 4
10
0
5
R (kg)
10
1000
800
Bruce Mayer, PE
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx
The Results
The J values for polynomial degrees 1-4:
1.0e+05 *
2.1442
0.0676
0.0647
0.0621
The S value for this data set:
2.2477e+05
The r-sqd values for polynomial degrees
1-4:
0.0461
0.9699
0.9712
0.9724
The Best r-sqd value is for degree =
4
The amount of R (in kg) for minimum
cure-time
4.8400
The minimum cure-time in seconds
897.5275
Engineering-25: Computational Methods
6
Bruce Mayer, PE
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx
The MATLAB File-1
Engineering-25: Computational Methods
7
Bruce Mayer, PE
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx
The MATLAB File-2
Engineering-25: Computational Methods
8
Bruce Mayer, PE
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx
Digital Data Table
R (kg)
0.0
1.1
2.0
2.9
4.1
5.1
6.0
7.2
8.1
9.3
Engineering-25: Computational Methods
9
t (sec)
1350
1170
1070
920
895
895
960
995
1040
1260
Bruce Mayer, PE
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx
Download