Cover Page

Scrivener Publishing
100 Cummings Center, Suite 541J
Beverly, MA 01915-6106

Publishers at Scrivener
Martin Scrivener (martin@scrivenerpublishing.com)
Phillip Carmical (pcarmical@scrivenerpublishing.com)

Network Modeling, Simulation and Analysis in MATLAB

Theory and Practices

 

Dac-Nhuong Le

Haiphong University, Haiphong, Vietnam

Abhishek Kumar Pandey

ACERC, Visiting faculty, Mdsu, Ajmer Rajasthan, India

Sairam Tadepalli

AWS Architect, Python Developer, India

Pramod Singh Rathore

ACERC, Visiting Faculty, Mdsu Ajmer Rajasthan, India

Jyotir Moy Chatterjee

Lord Buddha Education Foundation (APUTI), Kathmandu, Nepal

 

 

Wiley Logo

List of Figures

  1. 1.1 System modeling and simulation scheme.
  2. 1.2 Network simulator abstraction.
  3. 1.3 Discrete-event simulation.
  4. 1.4 Principles of discrete-event simulation and the system state changes only at discrete point’s ti in time during the simulation.
  5. 1.5 Flow chart explaining a discrete-event test system.
  6. 1.6 Wireless sensor network model.
  7. 1.7 Tier-based node model.
  8. 2.1 MathWorks MATLAB R2018b
  9. 2.2 MATLAB decision.
  10. 2.3 MATLAB loops.
  11. 2.4 MATLAB elements.
  12. 2.5 Create an M-File.
  13. 2.6 How to add new toolbox to MATLAB.
  14. 2.7 Initializing deploy tool in MATLAB.
  15. 2.8 Initializing standalone application.
  16. 2.9 Initilazing toolboxes required.
  17. 2.10 Inspecting MATLAB GUI.
  18. 2.11 Simple GUI.
  19. 2.12 Selecting callback options.
  20. 2.13 Selecting callback options 2.
  21. 2.14 Running script as batch job.
  22. 3.1 Data transmission system.
  23. 3.2 Time domain and frequency domain representation of a signal.
  24. 3.3 Analog-to-digital conversion.
  25. 3.4 Upper panel: Periodic sampling of an analog signal. Bottom panel: Quantization of a sampled signal.
  26. 3.5 Simulation results.
  27. 3.6 BPSK modulator.
  28. 3.7 BPSK demodulator.
  29. 3.8 Sampling and results.
  30. 3.9 Waveform simulation model for QPSK modulation.
  31. 3.10 Timing diagram for BPSK and QPSK modulations.
  32. 3.11 Waveform simulation model for QPSK demodulation.
  33. 3.12 Simulated QPSK waveforms at the transmitter side.
  34. 3.13 M-QAM modulator.
  35. 3.14 M-QAM simulation model.
  36. 3.15 Samples of in-phase component.
  37. 3.16 An OFDM communication architecture with a cyclic prefix.
  38. 3.17 Effect of cyclic prefix on Es/N0.
  39. 3.18 Assignment of OFDM subcarriers.
  40. 3.19 Eb/N0 Vs BER for BPSKOFDM over AWGN.
  41. 3.20 OFDM essential Tx-Rx chain.
  42. 3.21 BER results.
  43. 4.1 Flowchart of association rules implementation.
  44. 4.2 (a) ARN for contact lens data with target node as hard; (b) ARN for contact lens data with target node as soft.
  45. 4.3 Schematic diagram showing the activity method of communication in a software with ARN.
  46. 4.4 Time series plot for adjusted AUTOSALE/CPI.
  47. 4.5 Time series chart with obtained output form.
  48. 4.6 Output of wave configeration.
  49. 4.7 Error rates identification.
  50. 4.8 Density estimate for power spectral.
  51. 4.9 Density estimate for periodogram spectral.
  52. 4.10 Plottings of the estimate.
  53. 4.11 Markov plottings.
  54. 4.12 Parameters of new functions.
  55. 4.13 Replot status.
  56. 4.14 VAR models.
  57. 5.1 Each middle purpose of the structure is related to a signal. Edges between focus remain for reliance (shared data) between the signs.
  58. 5.2 Basic driving cases that can incite fake unmistakable check of huge Granger causality.
  59. 5.3 Granger causality patterns between simulated ROIs.
  60. 5.4 Comparison of model estimation by LASSO-GC and pairwise GC.
  61. 5.5 Correlation of LASSO-GC and pairwise-GC techniques in recouping the summary measurement.
  62. 5.6 Correlation of LASSO-GC and pairwise-GC techniques in recuperating the W summary measurement.
  63. 5.7 Examination of network designs with LASSO-GC and connection measures.
  64. 5.8 Utilitarian availability examination of dorsal attention network and visual occipital cortex in visualspatial consideration.
  65. 5.9 Different phases of approach in attributes.
  66. 5.10 GAs in MATLAB’s Optimization Toolbox.
  67. 5.11 Rastrigin’s function optimization with the default setting.
  68. 5.12 Rastrigin’s function optimization with the default setting, except Stopping Criteria-Stall Generations set 100 and initial range set [1; 1.1].
  69. 5.13 Rastrigin’s function optimization with the default setting, except Stopping Criteria-Stall Generations set 100 and initial range set [1; 1.1].
  70. 5.14 Rastrigin’s function optimization with the default setting, except Stopping Criteria-Stall Generations set 100 and initial range set [1; 2].
  71. 5.15 Lower raw fitness value.
  72. 5.16 Higher raw fitness value.
  73. 5.17 Stochastic uniform selection method.
  74. 5.18 Elite count 10.
  75. 5.19 Elite count 3.
  76. 5.20 Elite count 1.
  77. 5.21 Estimation of frequency relation to error over time.
  78. 5.22 Radiation readings for distributed beamforming.
  79. 6.1 Spherical free-space propagation: power transmitted over the air radiates spherically, with different gain in different directions. A portion of that power is received on an active aperture area Ae of the receiving antenna.
  80. 6.2 Ray model geometry.
  81. 6.3 Simple propagation models: free-space one-slope direct line of sight, and two-ray with direct ray and ground reflected ray. In some places, signal adds constructively, in others phase differences cause deep fades.
  82. 6.4 Vertical polarization ground reflection coefficient.
  83. 6.5 Horizontal polarization ground reflection coefficient.
  84. 6.6 Six-ray model (R0;R1;R2) and ten-ray model (R0 to R4) geometry: each line hides two rays, one direct, the other bouncing off the ground.
  85. 6.7 Ray tracing plots of received signal power indicator as a function of log d0 for N ∊ {0, 2, 3, 5} for a typical suburban case with street width of 20 feet, and the average distance from the street to the home of wt = 10 feet (so ws = 40 feet).
  86. 6.8 Ray-tracing geometry for a street corridor; some rays escape the corridor through gaps between homes.
  87. 6.9 Ray-tracing power levels down a street, with gaps between homes.
  88. 6.10 Beam following impinging on home dividers.
  89. 6.11 Angles of incidence illuminating homes in an urban corridor.
  90. 6.12 Demonstration of street orientation angle φ for use in COST 231 Walfish-Ikegami model.
  91. 6.13 Tree foliage attenuation as a function of frequency.
  92. 6.14 COST-231 indoor penetration loss model.
  93. 6.15 Penetration odd into private structures, total thickness dispersion.
  94. 6.16 In-building loss for residential buildings: measurement campaigns published for different frequencies, in different residential areas.
  95. 6.17 In-building loss for urban office buildings and high-rises: measurement campaigns published for different frequencies, in different urban areas.
  96. 6.18 Random waypoint model.
  97. 6.19 MAC layers in IEEE 802.11 standard.
  98. 6.20 RTS/CTS mechanism.
  99. 6.21 Ad hoc routing protocols.
  100. 6.22 Example of distance vector routing.
  101. 6.23 Accuracy of information in FSR.
  102. 6.24 An example of clustering in HSR.
  103. 6.25 Example of CGSR routing from node 1 to node 12.
  104. 6.26 Example of CBRP protocol.
  105. 6.27 Route discovery in AODV.
  106. 6.28 Creation of record route in DSRP.
  107. 6.29 Example of route creation in TORA.
  108. 6.30 Re-establishing route on failure of link 5-7. The new reference level is node 5.
  109. 6.31 Associativity-based routing.
  110. 6.32 An illustrative example of overlay networks.
  111. 6.33 A sample overlay network.
  112. 6.34 Overlay network broken up into logical layers.
  113. 6.35 Overlay network over the Internet.
  114. 7.1 Timestamp identification.
  115. 7.2 Execute the callback function.
  116. 7.3 Remote client access configuration setup.
  117. 7.4 Local client access configuration setup.
  118. 7.5 PDR vs Node Mobility.
  119. 7.6 Packet Loss Rate vs Node Mobility.
  120. 7.7 Routing Overhead vs Node Mobility.
  121. 7.8 Average End-to-End Delay vs Node Mobility.
  122. 7.9 Packet Delivery Ratio vs Number of Connections.
  123. 7.10 Routing Overhead vs Number of Connections.
  124. 7.11 Packet Loss Rate vs Number of Connections.
  125. 7.12 Average End-to-End Delay vs Number of Connections.
  126. 8.1 Two-stage model of torque against spark.
  127. 8.2 ResStatus plot.
  128. 8.3 CustIncome plot.
  129. 8.4 CustIncome plot.
  130. 8.5 TmAtAddress plot.
  131. 8.6 ResStatus plot.
  132. 8.7 EmpStatus plot.
  133. 8.8 Random waypoint mobility model.
  134. 8.9 The location of target and anchor nodes in WSN.
  135. 8.10 (a) Simulated path loss model; (b) Histogram of simulated RSS noise modeled as Gaussian mixture.
  136. 8.11 RMSE vs N (number of anchors).
  137. 8.12 CDF vs error.
  138. 8.13 Cluster formation in LEACH.
  139. 8.14 Steady-state phase in LEACH.
  140. 8.15 LEACH simulation.

List of Tables

  1. 1.1 Summary of the most important network simulators.
  2. 2.1 Operators and special characters.
  3. 2.2 Unique variables and constants.
  4. 2.3 Variables and constants.
  5. 2.4 Articulations.
  6. 2.5 Loop control statements.
  7. 2.6 Low-level file I/O functions.
  8. 2.7 Framework operations.
  9. 2.8 Setting colors.
  10. 2.9 Calling objects functions.
  11. 2.10 Java class functions.
  12. 4.1 MeansRT and error rates under each condition.
  13. 4.2 Relations between different networks and test sessions.
  14. 4.3 Techniques related to VARM.
  15. 5.1 The fraction of non-zero coefficients in each of the 4 submatrices.
  16. 5.2 Methodologies related to operations.
  17. 5.3 Filtering mechanisms for different models in structural problems.
  18. 6.1 Relative permittivity.
  19. 6.2 Values for COST 231 Hata and modified Hata models.
  20. 6.3 Values of a(hM) for COST 231 Hata model according to city size.
  21. 6.4 Values of CM for COST 231 Hata model according to city size.
  22. 6.5 Values for COST 231 Walfish-Ikegami model.
  23. 6.6 Values for Erceg model.
  24. 6.7 Values for Erceg model parameters in various terrain categories.
  25. 6.8 Vegetation loss caused by tree foliage reported for various frequencies: single-tree model loss in dB, and dB/m loss.
  26. 6.9 TGn channel models A to F are used to model MIMO systems in a different environment, with different RMS delay spreads.
  27. 6.10 TGn channel models A to F use two slopes n1 = 2 near transmitter and different values of n2 beyond a critical distance d0.
  28. 6.11 Building penetration loss from COST-231 model.
  29. 6.12 Private structures penetration loss: middle odd (μi) and standard deviation (σi) from exploratory outcomes announced for different frequencies.
  30. 6.13 Penetration loss into vehicles: median loss (μv) and standard deviation (σv) from experimental results reported at various frequencies.
  31. 7.1 Parameter values in simulation.

Foreword

In addition to modeling and simulating systems, this book provides a better understanding of how real-world systems function. This enables us to predict the behavior of systems before they are actually built and to accurately analyze them under various operating conditions. This book provides comprehensive, state-of-the-art coverage of all the essential aspects of modeling and simulation both physical and conceptual systems. Various real-life examples are included, which show how simulation plays a crucial role in understanding real-world systems. We also explain how to effectively use MATLAB to apply the modeling and simulation techniques presented successfully.

After introducing the underlying philosophy of the systems, the book offers step-by-step procedures for modeling with practical examples, and codes different types of systems using modeling techniques such as the Rayleigh fading model, BPSK modulation and demodulation, QPSK modulation and demodulation, etc.

This book will prepare both undergraduate and graduate students for advanced modeling and simulation courses, and will help them carry out useful simulation studies. Moreover, postgraduate students should be able to comprehend and conduct simulation research after completing this book.

Preface

This book is organized into eight chapters. In Chapter 1 a detailed overview is provided on how MATLAB can be used for network simulation and modeling. Then various types of simulation are described, followed by their working principles and different terminologies, along with the algorithms governing these simulations. The chapter also describes the selection of various software simulations for MATLAB, and the simulation tools based on high performance, followed by the different network models. This chapter will effectively help readers understand the concepts more clearly and provide them with a clear understanding of how to perform these tasks in MATLAB.

In Chapter 2, the power of MATLAB for computational mathematics is shown, followed by a detailed description of the features. A detailed discussion of various areas of MATLAB use is provided. We also discuss multiple notations, operators, and syntax and give hands-on practical examples along with various loop structures and decision controls, import, and export operations, using and creating M-files, different types of plotting and graphs, etc. Also explained are the various clones of MATLAB. This chapter will effectively help readers understand the workings and uses as well as applications of MATLAB more clearly.

In Chapter 3, we explain how digital communication system simulations can be performed using MATLAB. A detailed introduction to digital communications, i.e, data transmission, is provided along with an example. Next, a detailed explanation of simulations of Rayleigh fading model, BPSK modulation and demodulation, QPSK (Quadrature Phase Shift Keying) modulation and demodulation is given, along with their MATLAB coding, and the output is shown as well. We image error rate vs signal-to-noise ratio and OFDM with sample MATLAB coding and their output.

In Chapter 4, we explain how to perform statistical analysis of network data utilizing MATLAB starting from affiliation systems/networks with examples. Time series analysis, statistical stationarity, time series decomposition, de-trending, curve fitting, digital filtering, recurrence reaction, and the connection between recurrence reaction to spline parameter are also explained. Next, details are provided about autocorrelation, test for independence, linear autoregressive models, etc.

In Chapter 5, we explain how network routing simulations can be done using MATLAB. Additionally, deep insights are provided about the evaluation of Granger causality measures on known systems, along with results. We explain the application to fMRI BOLD (Blood-Oxygenation-Level-Dependent) information from a visuospatial consideration undertaking followed by various model development approaches, models validation, universal algorithms, and sequential algorithms, acoustic-centric and radio-centric algorithms, AODV routing protocols, etc.

In Chapter 6, we explain how wireless network simulations can be done using MATLAB. We explain how shadowing methods are used for radio propagation, two-ray model, indoor propagation, classical empirical model, Hata model, Walfisch-Ikegami model, Erceg model, multi-slope model, dispersive model, 3GPP SCM, MAC: IEEE 802.11 (CSMA/CA, virtual carrier sense, and RTS-CTS-DATA-ACK), NET-ad hoc routing, APP-overlay routing protocols, etc.

In Chapter 7, we explain various layers and protocols such as Vehicle Network Toolbox. In this toolbox, an explanation is given on how to make a receiving channel, how to access a chain, how to start a channel, how to transmit a message, etc. Next, the topic of network management (NM) is presented, in which a detailed explanation is given of network installation planning, setting up a remote client access configuration, interaction layer, directing protocols in MANET, along with their results and analysis, and transport layer with protocols.

In Chapter 8, a detailed explanation is provided of various real-time scenarios by using case studies taken from multiple real-time situations with their sample codes and result from analysis for a better understanding of how MATLAB performed in these situations and how it can solve critical simulation problems in detail.

Dr. Dac-Nhuong Le

Deputy-Head, Faculty of Information Technology Haiphong University, Haiphong, Vietnam

Abhishek K. Pandey

Assistant Professor (Computer Science Engineering) ACERC, Visiting faculty, Mdsu, Ajmer Rajasthan, India

Sairam Tadepalli

Junior Data Scientist, AWS Architect, Python Developer

Pramod Singh Rathore

Assistant Professor (Computer Science Engineering) ACERC, Visiting faculty, Mdsu Ajmer Rajasthan, India

Jyotir Moy Chatterjee

Assistant Professor (IT) Lord Buddha Education Foundation (APUTI), Kathmandu, Nepal

Acknowledgments

First of all, I would like to thank the authors for contributing their chapters to this book. Without their contributions, this book would not have been possible. Thanks to all my associates for sharing my happiness at the start of this project and following up with their encouragement when it seemed to be too difficult to complete.

I want to acknowledge and thank the most important people in my life, my grandfather, grandmother, and finally thanks to my wife. This book has been a long-cherished dream of mine which would not have been turned into reality without the support and love of these fantastic people, who encouraged me despite my not giving them the proper time and attention. I am also grateful to my best associates for their blessings and unconditional love, patience, and encouragement.

Dac-Nhuong Le

Deputy-Head, Faculty of Information Technology Haiphong University, Haiphong, Vietnam

Writing a book is harder than I thought and more rewarding than I could have ever imagined. First and foremost, I would like to thank my father Mr. Krishan Dev Pandey for being the coolest father ever and my mother Mrs. Veena Pandey for allowing me to follow my ambitions throughout my childhood. They taught me discipline, tough love, manners, respect, and so much more that has helped me succeed in life. Also, I would like to express my gratitude to my elder sister Mrs. Arpna Tripathi, who always stood by me during every struggle and all my successes. She has been my inspiration and motivation for continuing to improve my knowledge and move my career forward. Also, I’m eternally grateful to my wife, Mrs. Kajal Pandey, for standing beside me throughout my career and the writing of this book. I also thank my wonderful son, Aarudra Pandey, for always making me smile and for understanding on those weekend mornings when I was writing this book instead of playing games with him. I hope that one day he can read it and understand why I spent so much time in front of my computer. Last but not the least, I want to thank my friends who always backed me up during both good and bad days and everyone who ever said anything positive to me or taught me something. I heard it all, and it meant something.

Abhishek K. Pandey

Assistant Professor (Computer Science Engineering) ACERC, Visiting faculty, Mdsu, Ajmer Rajasthan, India.

Acronyms

AAL
Ambient Assistive Learning
ABR
Associativity Based Routing
ACK
Acknowledgement
AODV
Ad hoc On-Demand Distance Vector
ASK
Amplitude-Shift Keying
ANT
Attention Network Test
ASW
Apparent Source Width
ARIMA
Autoregressive Integrated-Moving-Average
AR
Auto Regressive
AS
Autonomous System
ASAP
AS-Aware Peer-relay Protocol
B.A.T.M.A.N
Better Approach To Mobile Adhoc Networking
BPSK
Double Phase Shift Keying
BOLD
Blood-Oxygenation-Level-Dependent
CDF
Cumulative Distribution Function
CSMA/CA
Carrier-Sense Multiple Access with Collision Avoidance
CSMA/CD
Carrier Sense Multiple Access with Collision Detect
CLPC
Cross-Layer setup approach for Power Control
CTS
Clear to Send
CRLB
Cramer-Rao Lower Bound
CBRP
Cluster based Routing Protocol
CGSR
Clusterhead Gateway Switch Routing
DSR
Dynamic Source Routing
DAN
Dorsal Attention Network
DREAM
Distance Routing Effect Algorithm for Mobility
DSSS
Direct Sequence Spread Spectrum
DSDV
Destination-Sequenced Distance-Vector Routing
DSRP
Dynamic Source Routing Protocol
DRP
Dynamic Routing Protocol
DHT
Distributed Hash Table
ECG
Electrocardiogram
EEG
Electroencephalogram
FMRI
Functional Magnetic Resonance Imaging
FEF
Frontal Eye Field
FHSS
Frequency Hopping Spread Spectrum
FFT
Fast Fourier Transform

FSR
Fisheye State Routing
GC
Granger Causality
GA
Genetic Algorithm
GM-SDP
Gaussian Mixture-SemiDefinite Programming
GUI
Graphical User Interface
GSR
Global State Routing
IACF
Interaural Cross correlation Function
IEEE
Institute of Electrical and Electronics Engineers
ITU-T
International Telecommunication Union-Telecommunication
JiST
Java in Simulation Time
LASSO
Least Absolute Shrinkage and Selection Operator
LEACH
Low Energy Adaptive Clustering Hierarchy
LOS
Line of Sight
LCC
Least Cluster Change
LUT
Look-Up-Table
M-QAM M-ary
Quadrature Amplitude Modulation
MWP
Markovian Waypoint Model
MANET
Mobile Ad-hoc Network
MVAR
Multivariate Vector Auto Regressive
MIMO
Multiple In, Multiple Out
MWP
Markovian Waypoint Model
MRL
Message Retransmission List
MUEL
Minimize Usage Extend Life
NM
Network Management
NS
Network Simulator
NHST
Null Hypothesis Significance Testing
NLOS
Non Line of Sight
OFDM
Orthogonal Frequency Division Modulation
OLSR
Optimized Link State Routing Protocol
OS
Operating System
OMNET
Object-Oriented Modular Discrete Event Simulator
PAN
Personal Area Network
PHY
Physical Layer
P2P
Peer-to-Peer
PLL
Phase Locked Loop
PSK
Phase-Shift Keying
PROWLER
Probabilistic Wireless Network Simulator
QPSK
Quadrature Phase Shift Keying
QAM
Quadrature Amplitude Modulation
RWPB
Irregular Waypoint on the Border
RWP
Arbitrary Waypoint
RWPB
Discretionary Waypoint on the Periphery
RERR
Route Error
RREP
Route Reply
RPGM
Reference Point Group Mobility Model
RDP
Reliable Data Protocol

ROI
ROI Region of Interest
RON
Solid Overlay Networks
RTS
Request to Send
RREQ
Route Request
RT
Response Time
RFC
Request for Comments
RSS
Received Signal Strength
RMSE
Root Mean Square Error
SSR
Signal Stability Routing
SSF
Scalable Simulation Framework
SNAP
Simulation Analysis Platform
SST
Signal Stability Table
SRP
Static Routing Protocol
SCM
Spatial Channel Model
SDP
Semidefinite Programming
SNR
Signal-to-Noise Ratio
SwaP
Weight and Power
SWANS
Scalable Wireless Ad hoc Network Simulator
TORA
Temporally Ordered Routing Algorithm
TCP
Transmission Control Protocol
TCP/IP
Transmission Control Protocol/Internet Protocol
TTL
Time to Live
TOSSIM
Tiny Operating System Sensor Network
TDMA
Time Division Multiple Access
UDP
User Datagram Protocol
VAR
Vector Autoregression
VANET
Vehicular Ad hoc Network
VOC
Visual Occipital Cortex
VPN
Virtual Private Network
VoIP
Voice over Internet Protocol
ZRP
Zone Routing Protocol
ZHLS
Zone-based Hierarchical Link State Routing Protocol
WRP
Wireless Routing Protocol
WLS
Weighed Least Square
WSN
Wireless Sensor Network
WOE
Weight of Evidence
WIMAX
Worldwide Interoperability for Microwave Access
3GPP
3rd Generation Partnership Project