Ref. 1 investigates the modeling and optimization of the co-gasification of oil palm trunks and fronds. The model has been developed to correlate the gas composition (i.e. syngas H2+CO and CH4) in terms of three independent variables : Temperature ºC , Blending Ratio (wt.%) and Particle size (mm). To do so, Response Surface Methodology (RSM) is used in conjunction with Box-Behnken design matrix. Our calculations using Mathematica agree closely with the results of Umar et al. These later authors applied Design Expert software.
We assume the following responses for a Box-Behnken design matrix
In[]:=
data={{1.,800.,50.,2.59,43.,17.},{2.,800.,50.,2.59,35.,16.},{3.,800.,50.,2.59,36.,14.},{4.,900.,50.,4.00,38.,7.},{5.,700.,50.,1.18,18.,4.},{6.,900.,20.,2.59,44.,13.},{7.,900.,80.,2.59,47.,11.},{8.,700.,20.,2.59,21.,5.},{9.,900.,50.,1.18,38.,14.},{10.,700.,80.,2.59,23.,5.},{11.,700.,50.,4.00,24.,6.},{12.,800.,80.,1.18,20.,3.},{13.,800.,20.,4.00,24.,3.},{14.,800.,20.,1.18,23.,4.},{15.,800.,50.,2.59,37.,14.},{16.,800.,80.,4.00,20.,2.},{17.,800.,50.,2.59,36.,14.}};
Factors: Temperature ºC , Blending Ratio (wt.%) and Particle size (mm) ​
​ ​
​Responses : Syngas (CO+H2) in vol.% and CH4 in vol.%
In[]:=
Join[{{Style["Run",Darker@Red,16],Style["Factor A",Darker@Red,16],Style["Factor B",Darker@Red,16],Style["Factor C",Darker@Red,16],Style["Response 1",Darker@Red,16],Style["Response 2",Darker@Red,16]}},data]//TableForm
Out[]//TableForm=
Run
Factor A
Factor B
Factor C
Response 1
Response 2
1.
800.
50.
2.59
43.
17.
2.
800.
50.
2.59
35.
16.
3.
800.
50.
2.59
36.
14.
4.
900.
50.
4.
38.
7.
5.
700.
50.
1.18
18.
4.
6.
900.
20.
2.59
44.
13.
7.
900.
80.
2.59
47.
11.
8.
700.
20.
2.59
21.
5.
9.
900.
50.
1.18
38.
14.
10.
700.
80.
2.59
23.
5.
11.
700.
50.
4.
24.
6.
12.
800.
80.
1.18
20.
3.
13.
800.
20.
4.
24.
3.
14.
800.
20.
1.18
23.
4.
15.
800.
50.
2.59
37.
14.
16.
800.
80.
4.
20.
2.
17.
800.
50.
2.59
36.
14.
Range for factors are used to map coded to real values and vice versa
In[]:=
Mreal=Table[{data[[i]][[2]],data[[i]][[3]],data[[i]][[4]]},{i,1,17}]
Out[]=
{{800.,50.,2.59},{800.,50.,2.59},{800.,50.,2.59},{900.,50.,4.},{700.,50.,1.18},{900.,20.,2.59},{900.,80.,2.59},{700.,20.,2.59},{900.,50.,1.18},{700.,80.,2.59},{700.,50.,4.},{800.,80.,1.18},{800.,20.,4.},{800.,20.,1.18},{800.,50.,2.59},{800.,80.,4.},{800.,50.,2.59}}
In[]:=
Mreal//TableForm
Out[]//TableForm=
800.
50.
2.59
800.
50.
2.59
800.
50.
2.59
900.
50.
4.
700.
50.
1.18
900.
20.
2.59
900.
80.
2.59
700.
20.
2.59
900.
50.
1.18
700.
80.
2.59
700.
50.
4.
800.
80.
1.18
800.
20.
4.
800.
20.
1.18
800.
50.
2.59
800.
80.
4.
800.
50.
2.59
In[]:=
low={700,20,1.18};high={900,80,4.0};
In[]:=
mid=0.5(low+high)
Out[]=
{800.,50.,2.59}
In[]:=
halfrange=0.5(high-low)
Out[]=
{100.,30.,1.41}
coded values of the three factors
In[]:=
codedvar=Table[-(mid[[j]]-Mreal[[i,j]])/halfrange[[j]],{i,1,17},{j,1,3}]
Out[]=
{{0.,0.,0.},{0.,0.,0.},{0.,0.,0.},{1.,0.,1.},{-1.,0.,-1.},{1.,-1.,0.},{1.,1.,0.},{-1.,-1.,0.},{1.,0.,-1.},{-1.,1.,0.},{-1.,0.,1.},{0.,1.,-1.},{0.,-1.,1.},{0.,-1.,-1.},{0.,0.,0.},{0.,1.,1.},{0.,0.,0.}}
In[]:=
codedvar//TableForm
Out[]//TableForm=
0.
0.
0.
0.
0.
0.
0.
0.
0.
1.
0.
1.
-1.
0.
-1.
1.
-1.
0.
1.
1.
0.
-1.
-1.
0.
1.
0.
-1.
-1.
1.
0.
-1.
0.
1.
0.
1.
-1.
0.
-1.
1.
0.
-1.
-1.
0.
0.
0.
0.
1.
1.
0.
0.
0.
Visualize the design using Graphics3D
In[]:=
Show[Graphics3D[{Darker@Red,PointSize[0.025],Table[Point[codedvar[[i]]],{i,1,17}]}],Axes->True]
Out[]=
Forming MD the Computation Matrix
In[]:=
M=codedvar;
In[]:=
x1=Transpose[M][[1]]
Out[]=
{0.,0.,0.,1.,-1.,1.,1.,-1.,1.,-1.,-1.,0.,0.,0.,0.,0.,0.}
In[]:=
x2=Transpose[M][[2]]
Out[]=
{0.,0.,0.,0.,0.,-1.,1.,-1.,0.,1.,0.,1.,-1.,-1.,0.,1.,0.}
In[]:=
x3=Transpose[M][[3]]
Out[]=
{0.,0.,0.,1.,-1.,0.,0.,0.,-1.,0.,1.,-1.,1.,-1.,0.,1.,0.}
In[]:=
MD=Transpose[{{1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000},x1,x2,x3,x1x1,x2x2,x3x3,x1x2,x1x3,x2x3}];
In[]:=
Grid[Table[NumberForm[MD[[i,j]],{4,4}],{i,1,17},{j,1,10}],Frame->All]
Out[]=
1.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
1.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
1.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
1.0000
1.0000
0.0000
1.0000
1.0000
0.0000
1.0000
0.0000
1.0000
0.0000
1.0000
-1.0000
0.0000
-1.0000
1.0000
0.0000
1.0000
0.0000
1.0000
0.0000
1.0000
1.0000
-1.0000
0.0000
1.0000
1.0000
0.0000
-1.0000
0.0000
0.0000
1.0000
1.0000
1.0000
0.0000
1.0000
1.0000
0.0000
1.0000
0.0000
0.0000
1.0000
-1.0000
-1.0000
0.0000
1.0000
1.0000
0.0000
1.0000
0.0000
0.0000
1.0000
1.0000
0.0000
-1.0000
1.0000
0.0000
1.0000
0.0000
-1.0000
0.0000
1.0000
-1.0000
1.0000
0.0000
1.0000
1.0000
0.0000
-1.0000
0.0000
0.0000
1.0000
-1.0000
0.0000
1.0000
1.0000
0.0000
1.0000
0.0000
-1.0000
0.0000
1.0000
0.0000
1.0000
-1.0000
0.0000
1.0000
1.0000
0.0000
0.0000
-1.0000
1.0000
0.0000
-1.0000
1.0000
0.0000
1.0000
1.0000
0.0000
0.0000
-1.0000
1.0000
0.0000
-1.0000
-1.0000
0.0000
1.0000
1.0000
0.0000
0.0000
1.0000
1.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
1.0000
0.0000
1.0000
1.0000
0.0000
1.0000
1.0000
0.0000
0.0000
1.0000
1.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
Using LinearModelFit to get the model for CO+H2 in %
In[]:=
Clear[x1,x2,x3]
In[]:=
yexp=Table[data[[i]][[5]],{i,1,17}]
Out[]=
{43.,35.,36.,38.,18.,44.,47.,21.,38.,23.,24.,20.,24.,23.,37.,20.,36.}
In[]:=
Dimensions[yexp]
Out[]=
{17}
In[]:=
datalm={MD,yexp}
Out[]=
{{{1.,0.,0.,0.,0.,0.,0.,0.,0.,0.},{1.,0.,0.,0.,0.,0.,0.,0.,0.,0.},{1.,0.,0.,0.,0.,0.,0.,0.,0.,0.},{1.,1.,0.,1.,1.,0.,1.,0.,1.,0.},{1.,-1.,0.,-1.,1.,0.,1.,0.,1.,0.},{1.,1.,-1.,0.,1.,1.,0.,-1.,0.,0.},{1.,1.,1.,0.,1.,1.,0.,1.,0.,0.},{1.,-1.,-1.,0.,1.,1.,0.,1.,0.,0.},{1.,1.,0.,-1.,1.,0.,1.,0.,-1.,0.},{1.,-1.,1.,0.,1.,1.,0.,-1.,0.,0.},{1.,-1.,0.,1.,1.,0.,1.,0.,-1.,0.},{1.,0.,1.,-1.,0.,1.,1.,0.,0.,-1.},{1.,0.,-1.,1.,0.,1.,1.,0.,0.,-1.},{1.,0.,-1.,-1.,0.,1.,1.,0.,0.,1.},{1.,0.,0.,0.,0.,0.,0.,0.,0.,0.},{1.,0.,1.,1.,0.,1.,1.,0.,0.,1.},{1.,0.,0.,0.,0.,0.,0.,0.,0.,0.}},{43.,35.,36.,38.,18.,44.,47.,21.,38.,23.,24.,20.,24.,23.,37.,20.,36.}}
In[]:=
lm=LinearModelFit[datalm,{1,x1,x2,x3,x1x1,x2x2,x3x3,x1x2,x1x3,x2x3}]
Out[]=
FittedModel
37.4+10.1x1+2.05x1x1+9+0.875x3-9.95x3x3

Our result agrees with its counterpart given in Ref. 1
statistical and ANOVA analyses.
A small p-value (typically < 0.05) means the variable significantly contributes to explaining the outcome.
A large p-value suggests the variable may not be important in the model and should be dropped from the model equation.
Comparison of actual (exp .) and predicted values of response (CO+H2 in %)
3-D and contour plot for x3=0
Using LinearModelFit to get the model for CH4 in %
Our result agrees with its counterpart given in Ref. 1
statistical and ANOVA analyses.
A small p-value (typically < 0.05) means the variable significantly contributes to explaining the outcome.
A large p-value suggests the variable may not be important in the model and should be dropped from the model equation.
Comparison of actual (exp .) and predicted values of response (CH4 in %)
3-D and contour plot for x3=0

References

◼
  • [1] H. A. Umar, S. A. Sulaiman, M. A. M. Said, A. Gungor, and R. K. Ahmad, Use of Response Surface Methodology to Measure the Impact of Operating Variables on the Co-gasification of Oil Palm Biomass, Journal of Hunan University(Natural Sciences), Vol. 48. No. 4. Apr. 2021. https://jonuns.com/index.php/journal/article/view/561/558
  • ◼
  • [2] We also use the ideas for Placing a ContourPlot under a 3D Plot from: https://community.wolfram.com/groups/-/m/t/1148582
  • CITE THIS NOTEBOOK

    RSM modeling and optimization of co-gasification of oil palm trunks and fronds​
    by Housam Binous, Asma Hammami, Hatem Dhaoudi and Ahmed Bellagi
    Wolfram Community, STAFF PICKS, November 3, 2025
    ​https://community.wolfram.com/groups/-/m/t/3569677