200 likes | 428 Views
第二十章 效應曲面法 Response Surface Method. 目的: 經由分析與建模尋找 獲得最適效果的變因組合條件 RSM 集合統計與數學方法。 RSM 需經過 一連串 取樣與計算 過程 ,由粗至細,以 快速有效的方法 接 近 答案 。. EXAMPLE 尋求最大產量之作業條件 ( 未使用 RSM) 。 可控制變因 : 反應時間( time) ,反應 溫度( temp) 實驗時選擇 反應時間:15 , 20 , 25 min ,反應 溫度:125 , 150 , 175 2 replicates for each cell 。
E N D
第二十章 效應曲面法 Response Surface Method • 目的:經由分析與建模尋找獲得最適效果的變因組合條件 • RSM 集合統計與數學方法。 • RSM 需經過一連串取樣與計算過程,由粗至細,以快速有效的方法接近答案。
EXAMPLE 尋求最大產量之作業條件(未使用 RSM)。 可控制變因 : 反應時間(time),反應溫度(temp) 實驗時選擇反應時間:15,20,25 min,反應溫度:125,150,175 2 replicates for each cell。 (3x3 balanced factorial design) Data (coded)
SAS 程式: PROC GLM; CLASS time temp; MODEL y = time temp time*temp; CONTRAST ’ Timelinr' time -1 0 1; CONTRAST ’ Timequad' time 1 -2 1; CONTRAST ’ Templinr' temp -1 0 1; CONTRAST ’ Tempquad' temp 1 -2 1; CONTRAST ’ TiL*TpL' time*temp 1 0 -1 0 0 0 -1 0 1; CONTRAST ’ TiL*TpQ' time*temp -1 2 -1 0 0 0 1 -2 1; CONTRAST ’ TiQ*TpL' time*temp -1 0 1 2 0 -2 -1 0 1; CONTRAST ’ TiQ*TpQ' time*temp 1 -2 1 -2 4 -2 1 -2 1; PROC GLM; MODEL y=time time*time temp time*temp time*temp*temp time*time*temp*temp; SAS 報表 Source DF Type III SS Mean Square F Value Pr > F time 2 24.33333333 12.16666667 8.42 0.0087 temp 2 25.33333333 12.66666667 8.77 0.0077 time*temp 4 61.33333333 15.33333333 10.62 0.0018
Contrast DF Contrast SS Mean Square F Value Pr > F Timelinr 1 8.33333333 8.33333333 5.77 0.0398 Timequad 1 16.00000000 16.00000000 11.08 0.0088 Templinr 1 21.33333333 21.33333333 14.77 0.0039 Tempquad 1 4.00000000 4.00000000 2.77 0.1305 TiL*TpL 1 8.00000000 8.00000000 5.54 0.0431 TiL*TpQ 1 42.66666667 42.66666667 29.54 0.0004 TiQ*TpL 1 2.66666667 2.66666667 1.85 0.2073 TiQ*TpQ 1 8.00000000 8.00000000 5.54 0.0431 Standard Parameter Estimate Error t Value Pr > |t| Intercept 122.0740554 114.2886578 1.07 0.3083 time -12.5822015 8.9551729 -1.41 0.1876 time*time 0.1680855 0.1541151 1.09 0.2987 temp -1.0316048 0.7542961 -1.37 0.1987 time*temp 0.0901570 0.0437059 2.06 0.0636 time*temp*temp 0.0001058 0.0001619 0.65 0.5267 time*time*temp*temp -0.0000108 0.0000065 -1.67 0.1227
ANOVA Table (general form) 分析: (1) 交互作用顯著 (2) 由 Contrast 檢定結果選定一包含 t, t2, p, tp, tp2, t2p2 之模式 (3) 由迴歸得到 y = 122 - 12.58 t + 0.168 t2 -1.03p + 0.09tp + .000106tp2 - .0000108 t2p2 依此迴歸式得到等高線圖及曲面圖。
等高線圖 Estimated local max.
Estimated local max. 結論: 使用 temperature 150 , time 25 時,反應量最多。
RSM 涉及的方法 • 以Least square 法求得一次或二次迴歸式。 • 以 Lack-of-fit test 確認迴歸式的適合性。 • Method of steepest ascent (陡升法) • 以最陡路徑尋找高點或低點區 • 註:最陡路徑與等高線正交, • 如:y= β0 +β1x1 + β2x2,則最陡路徑方向為 β2 /β1 • 尋找二次曲面之最佳解
Step1、二次式微分 = 0,得到一平穩點 (逗留點stationary point ) ,Xs Stationary point : a point of max. response a point of min. response , 或 saddle point Step2、 典型分析 (Canonical analysis) 由 B之eigen-values, λ1 ,λ2, 決定此點為max, min , or saddle point (i) 若λ1 ,λ2全為正,則此點為一 point of min (ii) 若λ1 ,λ2全為負,則此點為一 point of max (iii) 若λ1 ,λ2是一正一負,則為一saddle point
EXP20-1&2 目的 : 尋求最大產量之作業條件(未使用 RSM)。 可控制變因 : 反應時間,反應溫度 目前作業環境: 反應時間 35 min,反應溫度 155 此研究需經過三個步驟的實驗及分析,才得到結果。 Step1 Fit a model in [30,40] x [150,160],控制變因在下列狀況,得實驗值 , y.
SAS 程式: /* 測試 response surface */ PROC RSREG; MODEL y = x1 x2; /* 當二次不適配時,找出一次迴歸式 */ PROC REG; MODEL y=x1 x2; Type I Sum Regression DF of Squares R-Square F Value Pr > F Linear 2 1.930000 0.7990 12.06 0.0202 Quadratic 1 0.005556 0.0023 0.07 0.8052 Crossproduct 1 0.160000 0.0662 2.00 0.2302 Total Model 4 2.095556 0.8675 6.55 0.0480
Sum of Mean Source DF Squares Square F Value Pr > F Model 2 1.93000 0.96500 11.92 0.0081 Error 6 0.48556 0.08093 Corrected Total 8 2.41556 Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept 1 42.92222 0.09482 452.65 <.0001 x1 1 0.60000 0.14224 4.22 0.0056 x2 1 0.35000 0.14224 2.46 0.0491
一次模式適用性之Lack-of-fit test : SSPE = 0.32 SSLF= 0.48556-0.32=0.16556 F = 1.03 < Fα 資料適用一次模式 y = 42.92 +0.60 x1+ 0.35 x2 x1 = (time-35) / 5, x2 = (temper - 155) /5
Step2. (Steepest Ascent Experiment) 由控制變因 x1=0, x2=0 開始,延最陡方向間隔 △ x1=1, △x2=3連續做實驗,得反應值 y。直到產生最大值。 ( 方向與等高線垂直,斜率 = 0.35/0.60=.6 ) 最大值發生在 (85, 176) 附近。
Step3. Fit a model in [80, 90] x [170,180] 取控制變因在下列狀況,得實驗值 , y. x1 = (time-85) / 5, x2 = (temper - 175) /5 是否可得到二次模式 ?
RSREG之報表 Type I Sum Regression DF of Squares R-Square F Value Pr > F Linear 2 4.525000 0.3018 10.38 0.0261 Quadratic 1 9.476056 0.6319 43.47 0.0027 Crossproduct 1 0.122500 0.0082 0.56 0.4952 Total Model 4 14.123556 0.9418 16.20 0.0098 由上結果,資料適用 二次模式,增加 4 點資料,以得到完整的二次迴歸式。 註: x1 , x2之選取是依據central composite design (CCD)
Lack-of-fit test 報表 Sum of Residual DF Squares Mean Square F Value Pr > F Lack of Fit 3 0.758783 0.252928 1.16 0.4281 Pure Error 4 0.872000 0.218000 Total Error 7 1.630783 0.232969 完整的二次迴歸式報表 Parameter Estimate Standard from Coded Parameter DF Estimate Error t Value Pr > |t| Data Intercept 1 84.939927 0.215856 393.50 <.0001 84.939927 x1 1 0.922189 0.170662 5.40 0.0010 1.303976 x2 1 0.456994 0.170662 2.68 0.0316 0.646190 x1*x1 1 -1.320161 0.183040 -7.21 0.0002 -2.639525 x2*x1 1 0.175000 0.241334 0.73 0.4919 0.349894 x2*x2 1 -1.045078 0.183040 -5.71 0.0007 -2.089525
二次曲面之最佳解報表 Canonical Analysis of Response Surface Based on Coded Data Critical Value Factor Coded Uncoded x1 0.258694 0.365793 x2 0.176285 0.249267 Predicted value at stationary point: 85.165549 Eigenvectors Eigenvalues x1 x2 -2.038593 0.279522 0.960139 -2.690457 0.960139 -0.279522 Stationary point is a maximum.
二次曲面中心區的反應值估計 Estimated Ridge of Maximum Response for Variable y Coded Estimated Standard Uncoded Factor Values Radius Response Error x1 x2 0.0 84.939927 0.215856 0 0 0.1 85.061685 0.215076 0.123757 0.068397 0.2 85.136479 0.213097 0.241185 0.147668 0.3 85.165164 0.211030 0.351858 0.236942 0.4 85.148542 0.210787 0.455705 0.335016 0.5 85.087329 0.215006 0.552962 0.440548 0.6 84.982149 0.226647 0.644079 0.552218 0.7 84.833530 0.248239 0.729629 0.668839 0.8 84.641908 0.281207 0.810223 0.789400 0.9 84.407646 0.325797 0.886456 0.913075 1.0 84.131039 0.381514 0.958881 1.039203
依據報表得到二次模式適合,迴歸曲面估計為:依據報表得到二次模式適合,迴歸曲面估計為: y = 84.9 + 0.992 x1 + 0.457 x2-1.32 x12 + 0.175 x1x2 - 1.05 x22 最大值發生在 x1= 0.3658, x2= 0.2493, 此時 y = 85.16 結論: 估計最大反應值為85.16,在時間=86.83,溫度=175.47。 (time= 0.3658*5 + 85,temper= 0.2493*5 + 175 )