Open Access

A Gaussian function model for simulation of complex environmental sensing

Complex Adaptive Systems Modeling20153:3

DOI: 10.1186/s40294-015-0009-0

Received: 3 September 2015

Accepted: 5 November 2015

Published: 14 November 2015

Abstract

Background

Sensors can be used to sense not only simple behavior but also complex ones. Previous work has demonstrated how agent-based modeling can be used to model sensing of complex behavior in Complex Environments.

Findings

Here, we propose a mathematical model using Gaussian function for the previously developed Agent Based Model (ABM) for Sensing of Emergent behavior in Complex Adaptive System (SECAS). The goodness of the fitted curve was observed by using standard tools, e.g. by determining SSE, SSM, ASSM and RMSE.

Conclusions

Our proposed model provides a good fit for data obtained from the earlier model. Also the developed model provides a bench mark against the data obtained from a former Agent Based Model.

Keywords

Complex Adaptive System Environmental sensing Gaussian function Mathematical model

Findings

Wireless sensors are a growing area of research focus. In previous works Niazi and Hussain (2011a, b), a formal model of wireless sensor networks has been given along with an agent-based simulation model. The idea was to use sensing to examine and identify complex behavior such as flocking. The papers also presented a formal specification model is based on the Z formal specification language. While the idea was interesting, these papers did not present a traditional mathematical model. In the current paper, I expand the ideas presented in the earlier papers and present an alternative mathematical model in the form of a Gaussian model for the results of sensing presented earlier in Niazi and Hussain (2011a).

Background

Mathematical modeling of curve fitting

Curve fitting provides an ample opportunity to capture nicely the trend in the data by assigning a single function across the entire range. There are many possible ways to do this e.g. using Gaussian function, smoothing spine, sum of the trigonometric function or weibull function etc. Ordinary and partial differential equations are also helpful in determining the trend beautifully. In this paper, I have used Gaussian function.

Gaussian model

This is a method which has been frequently adopted in various kinds of curve fitting e.g. in (Jonsson and Eklundh 2002). Gaussian function arises by composing the exponential functions and is given by:
$$f(x) = \sum\limits_{i = 1}^{n} {a_{i} e^{-((x - b_{i})/c_{i})^{2}} } ,\quad n = 1,2,3,\ldots$$
(1)
where a stands for the amplitude, b for centroid and c represents the peak width. In order to fit a curve using this function, one needs to optimize the parameters involved in the function.

Methodology

In order to fit the data, mathematical model was developed using Gaussian function as given in Eq. 1. All the simulation work was performed using (Matlab 2011; Curve Fitting Toolbox 2011) . The validation data was taken on the basis of the original simulation model presented in (Niazi and Hussain 2011a). To find the optimal values of the coefficients of the given equation, Trust-region algorithm was used. This algorithm is not only very useful in the evaluation of constraint coefficients but also in handling the complex nonlinear problems more efficiently than the other algorithms. The goodness of the fitted curve was observed by determining of the sum of the squares of residuals (SSE), summed squares about the mean (SSM), adjusted summed squares about the mean (ASSM) and root mean squared error (RMSE). SSE represents the sum of squares due to the error of the fit where a value in the vicinity of zero indicates a fit which is more useful for prediction. SSM represents the square of the correlation between response and predicted response values, where ASSM depends on the adjusted residual degrees of freedom. RMSE is quite commonly used and requires no debate on it.

Results and discussion

Mathematical modeling is an important area of research work where curve fitting along with the determination of optimal set of parameters provides an opportunity to find a bench mark against some experimental data. In this paper, a mathematical model using Gaussian function was developed to fit a curve against the data obtained from a former Agent Based Model Niazi and Hussain (2011a). The goodness of the fitted curve was observed by determining SSE, SSM, ASSM and RMSE. It was noted that with the increase in the value of n, the values of SSE, SSM, ASSM and RMSE towards the fit were improved, e.g., for the value of n = 6 using data I; SSE is 9.335e + 4, SSM is 0.8769, ASSM is 0.8748, and RMSE is 9.745, whereas for the value of n = 8; SSE is 3.648e + 4, SSM is 0.9519, ASSM is .9508, and RMSE is 6.11 which is much improvement as compared to the case when n = 6. Therefore, the value of n = 8 was chosen to fit the data. Similar analysis was performed for the data II. The fitted curves for both the data are shown in Figs. 1 and 2, where the fitted values of these parameters for n = 8 along with the 95 % confidence bounds are given in the Table 1.
Fig. 1

Comparison between simulation experimental data I (Niazi and Hussain 2011a ) and mathematical curve fitted using Gaussian function

Fig. 2

Comparison between simulation experimental data II (Niazi and Hussain 2011a) and mathematical curve fitted using Gaussian function

Table 1

Fitted parameters for the Gaussian equation models

Coefficients

For data set I

For data set II

Optimal values

95 % confidence bounds

Optimal values

95 % confidence bounds

a 1

133.6

(120.6, 146.6)

173.5

(136.2, 210.8)

b 1

10.76

(9.237, 12.29)

8.775

(5.796, 11.75)

c 1

33.31

(30.03, 36.58)

27.73

(22.42, 33.04)

a 2

53.15

(47.34, 58.97)

62.05

(24.20, 99.89)

b 2

69.82

(68.21, 71.44)

126.6

(117.2, 136.0)

c 2

20.15

(17.73, 22.57)

32.98

(21.37, 44.59)

a 3

128.2

(126.7, 129.6)

99.22

(86.58, 111.9)

b 3

173.7

(166.6, 180.9)

184.7

(173.6, 195.7)

c 3

273.3

(221.5, 325.1)

71.87

(59.18, 84.57)

a 4

10.47

(4.187, 16.75)

97.64

(96.42, 98.86)

b 4

351.2

(336.0, 366.4)

826.5

(815.1, 837.8)

c 4

49.78

(17.65, 81.92)

337.4

(300.6, 374.1)

a 5

95.77

(88.91, 102.6)

26.49

(22.28, 30.69)

b 5

711.1

(707.4, 714.8)

675.9

(671.6, 680.1)

c 5

85.36

(79.55, 91.17)

27.31

(21.47, 33.16)

a 6

28.77

(23.63, 33.91)

136.4

(125.4, 147.4)

b 6

403.0

(401.4, 404.5)

62.42

(57.42, 67.42)

c 6

14.51

(11.53, 17.48)

39.44

(23.83, 55.04)

a 7

81.12

(66.55, 95.68)

87.85

(80.49, 95.21)

b 7

533.0

(524.7, 541.3)

374.1

(366.0, 382.2)

c 7

124.4

(108.1, 140.6)

166.8

(149.5, 184.2)

a 8

106.0

(104.6, 107.4)

31.93

(28.06, 35.81)

b 8

925.2

(922.6, 927.8)

607.5

(603.1, 611.9)

c 8

131.2

(123.1, 139.3)

40.72

(33.33, 48.11)

Conclusion and future work

In this paper, I have presented a mathematical model using Gaussian function for Sensing of Emergent behavior in Complex Adaptive System (SECAS). This work is actually an extension of the formal model presented earlier by Niazi and Hussain for the sensing of complex behavior. The lack of a traditional mathematical model motivated me to do this. In the future, it would be interesting to couple formal models with formal specification models in other domains such as in the domain of the Internet of Things, networks of consumer electronics and more.

Abbreviations

ABM: 

Agent Based Model

SECAS: 

sensing of emergent behavior in Complex Adaptive System

SSE: 

sum of the squares of residuals

SSM: 

summed squares about the mean

ASSM: 

adjusted summed squares about the mean

RMSE: 

root mean squared error

Declarations

Acknowledgements

The author of this paper acknowledge the support given by University of Engineering and Technology, Lahore. However, UET has no role in writing this paper.

Competing interests

The author declares that they have no competing interests.

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors’ Affiliations

(1)
Department of Mathematics, University of Engineering and Technology

References

  1. Curve Fitting Toolbox, The MathWorks Inc. MATLAB 7.12.0.635 (R2011a), 2011
  2. Jonsson P, Eklundh L (2002) Seasonality extraction by function fitting to time-series of satellite sensor data. IEEE Trans Geosci Remote Sens 40:1824–1832View ArticleGoogle Scholar
  3. Niazi MA, Hussain A (2011a) Sensing emergence in complex systems. Sens J IEEE. 11:2479–2480View ArticleGoogle Scholar
  4. Niazi MA, Hussain A (2011b) A novel agent-based simulation framework for sensing in complex adaptive environments. Sens J IEEE 11:404–412View ArticleGoogle Scholar
  5. The MathWorks Inc. MATLAB 7.12.0.635 (R2011a), 2011

Copyright

© Chaudhry. 2015