























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
This thesis explores the use of Acumen models for Amplitude Modulation (AM), Frequency Modulation (FM), and Binary Amplitude Shift Keying (BASK) signals, comparing their implementation with MATLAB. equations, signal plots, and code snippets for building and analyzing these models.
What you will learn
Typology: Lab Reports
1 / 95
This page cannot be seen from the preview
Don't miss anything!
i
ii
School of Information Science, Computer and Electrical Engineering Halmstad University PO Box 823, SE-301 18 HALMSTAD, Sweden
iv
Simulation is the process of computing a behavior determined by a given model of a system of interest. Modeling is the process of creating a model that formally describes a given class of system. Modeling and simulation can be used to quickly and cheaply study and understand new technologies. Today, a wide range of systems are simulated using different tools. However, converting models into simulation codes can still be difficult and time consuming.
In this thesis, we study how a new modeling and simulation language called Acumen can be used to model basic physical links. This language is aimed at bridging the gap between modeling and simulation. We focus on basic physical links as an interesting type of system to model and simulate. We also focus on comparing Acumen to MATLAB and Simulink. The types of links we consider include models of an RC low-pass filter, Amplitude Modulation, Frequency Modulation, Amplitude Shift Keying, Phase Shift Keying and Frequency Shift Keying systems. Each of these examples is modeled in Acumen, MATLAB and Simulink. We find that, for the most part, Acumen allows us to naturally express a wide range of modulation techniques mentioned above. When compared to MATLAB ad Simulink, we find that Acumen is simple language to understand. Acumen codes are described in a more natural way. Simplicity is the biggest advantage of Acumen.
v
First and foremost, I would like to express my deepest gratitude to my advisor, Prof. Walid Taha, for his excellent supervision, guidance, care and assistance during the entire period of my thesis work.
I would also like to thank Prof. Magnus Jonson (my co-advisor), Prof. Verónica Gaspes and Urban Bilstrup for the support they provided me throughout my thesis work.
I would like to thank the School of Information Science, Computer and Electrical Engineering of Halmstad University for admitting me to its graduate program in Computer Network Engineering, which provided me an opportunity to advance my knowledge and skills in my area of specialization. I would also like to thank Haramaya University, Ethiopia, for providing me the required leave of absence for the period of my study. I'm grateful to Prof. Belay Kassa, Dr. Belaineh Legesse, Dr. Tena Alamirew and Tsehay Gelagil for their substantial support
Furthermore, I am grateful to my best friends Dr. Hussein H. Komicha, Jeylan Wolyie, Adem Kedir and several others who have been providing me valuable advice and encouragements from the inception to the completion of my study. I would also like to thank my friends in Halmstad, Essayas G. Wahid, Mekuria Eyayu and Daniel Kifetew for the support they have provided me during my arrival in Halmstd and during my study.
Finally, I would like to thank my wife, Meriyema Mohammed, my mother, father, brothers and sisters for their love, support, encouragement, and understanding.
x
1
In building any simple or complex communication network systems, it is clear that it is very costly to buy real network devices and tools required to establish or deploy a complete system. In addition, it is difficult to deploy tested systems without having the real equipment, such as computers, switches, routers, oscilloscopes and also the different software required for the systems. To overcome these problems, researchers and software engineers developed different network simulation tools that can help design complete network systems. Network simulators enable researchers, network administrators, and other interested users to test new network technologies and protocols before using them on real networks; thus, saving a lot of time and money. In this thesis, we will study basic examples of physical link modeling and simulation of network systems using a new and small executable modeling language called Acumen [1]. Acumen is a new language for modeling and simulation of hybrid (discrete/continuous) systems, currently being developed by Prof. Walid Taha and other collaborators. This is the first thesis that evaluates the design of Acumen (Version 10). Because of this, the work of the thesis started from basic models of physical links in a communication system.
The main purpose of this thesis is to examine and discover how basic physical links of network systems are modeled in Acumen. Thus, the analysis of Acumen as a modeling and simulation tool and Acumen code examples are the main focus of the thesis. This includes presenting several Acumen codes in the thesis, discussing and evaluating the extent to which Acumen language makes modeling such components convenient. The thesis has tutorial content that explains clearly to the reader how the codes and other features of the language are interpreted and also explains how network components can be modeled in this language. In focus on modeling very small and simple examples and on case studies to identify the advantages and disadvantages of using Acumen is compared to using other modeling tools, such as MATLAB and Simulink.
In this section, we will discuss some popular tools that serve a similar purpose to Acumen. Each of these tools is based on different technologies. Some of them are based on block diagrams while others are based on functional programming. In tools based on block diagrams, different systems are represented with block diagrams. Simulink and VisSim can
3
We illustrate the basic utility of Acumen as a modeling and simulation tool using a series of modulation/demodulation methods as case studies. We carry out this study in the context of a simple, first-order RC model of a communication channel. We find that, for the most part, Acumen allows us to naturally express a wide range of modulation techniques, including AM modulation, FM modulation, Amplitude Shift Keying, Phase Shift Keying and Frequency Shift Keying modulations. To identify some ways in which Acumen is better than other related tools, we build Acumen models in MATLAB and Simulink. We compare the results of Acumen, MATLAB and Simulink based on the plots they generate. The plots show similarity in most of the models we build in this thesis.
In this chapter, we introduced the basic research question that need to be answered in the thesis and indicated the approach followed during the process of the study. The second chapter presents basic tutorial on Acumen. Chapters 3 through 8 are the technical core to the thesis. The third chapter presents a model of simple RC low-pass filter model. The example presented in the first part of this chapter is further extended and investigated in a different approach. In addition, it addresses how the Acumen code is interpreted by the compiler. The RC low-pass filter is also modeled with Simulink. In Chapter 4, Amplitude Modulation system is modeled in three different tools including Acumen, MATLAB and Simulink. The fifth chapter presents a model for Frequency Modulation system with the three tools mentioned above. In chapters 6, 7 and 8, the models for digital modulation techniques namely, Amplitude Shift Keying, Phase Shift Keying and Frequency Shift Keying have been presented respectively in Acumen, MATLAB and Simulink.
Finally, the last chapter discusses the conclusion and future research work and followed by references and appendix (Acumen codes).
Acumen is a simulation tool for modeling continuous, discrete and hybrid dynamical systems. The tool is new and does not have a well documented user guide. it is important to include basic tutorial in this thesis. basic user guide to help users who are systems. The chapter provides basic functionalities of Acumen graphical also defines basic syntaxes and operations provided by Acumen.
Acumen 10 software can be downloaded from the Acumen website currently available for free. Once it is downloaded, we can start to use it by extracting the compressed file and opening the .jar file. When the software is started, a screen with three windows is opened. Figure 2 interface with basic descriptions of buttons indicated with arrows.
Figure 2: The Acumen GUI
The model window is the place where we write Acumen codes. Once we write the code f the model, we can save it by choosing the appropriate option from file menu. The following simple code shows the smallest possible Acumen model we can run. We cannot see any
Acumen is a simulation tool for modeling continuous, discrete and hybrid dynamical systems. The tool is new and does not have a well documented user guide. it is important to include basic tutorial in this thesis. This chapter is intended users who are interested in modeling and simulation of dynamical systems. The chapter provides basic functionalities of Acumen graphical user interface basic syntaxes and operations provided by Acumen.
software can be downloaded from the Acumen website [1]. currently available for free. Once it is downloaded, we can start to use it by extracting the compressed file and opening the .jar file. When the software is started, a screen with three 2 below shows a snapshot of the Acumen graphical user interface with basic descriptions of buttons indicated with arrows.
The model window is the place where we write Acumen codes. Once we write the code f the model, we can save it by choosing the appropriate option from file menu. The following simple code shows the smallest possible Acumen model we can run. We cannot see any
4
Acumen is a simulation tool for modeling continuous, discrete and hybrid dynamical systems. The tool is new and does not have a well documented user guide. For this reason, This chapter is intended to provide a in modeling and simulation of dynamical user interface and
. The software is currently available for free. Once it is downloaded, we can start to use it by extracting the compressed file and opening the .jar file. When the software is started, a screen with three below shows a snapshot of the Acumen graphical user
The model window is the place where we write Acumen codes. Once we write the code for the model, we can save it by choosing the appropriate option from file menu. The following simple code shows the smallest possible Acumen model we can run. We cannot see any
6
underscores. After the first character in the variable, variable names can have any combination of characters. Acumen also supports special variables that are differentiated from normal variables by having primes ( ’ ) at the end. These variables represent derivatives of variables. For example, X’ and X’’ represent the first and second derivatives of X with respect to time respectively. Acumen keywords (reserved words) like if, else, switch, case, end, for, sum, class, private, create, terminate, stop etc cannot be used as variable names.
Acumen supports single line and multi-line comments. In Acumen, the symbol // is used to comment a single line and /* … / is used to comment multiple lines. Comments are usually added for the purpose of making Acumen codes easier to understand. This means that any line of Acumen code that starts with // symbol or placed between / … */ will not be executed.
The most commonly used punctuation mark is semicolon. In Acumen, a semicolon is used to separate variables declared in the private section. It is also placed at the end of Acumen codes to separate different commands.
Acumen provides many operations to manipulate given variables. These include arithmetic operation, relational operations, logical operations, bitwise operations, assignment operations and vector operations. The following table summarizes some of these operations with examples.
Arithmetic Operators (Assume X=10 and Y=20)
Operator Description Example (How we write in Acumen)
/ Binary Division X / Y gives 0.
% Modulus X % Y gives 10
Relational Operators (Assume X=10 and Y=20)
== Relational equality (X == Y) is not true
!= Not equal to (X != Y) is true
Greater than (X > Y) is not true
7
< Less than (X < Y) is true
= Greater than or equal to
(X >= Y) is not true
<= Less than or equal to (X <= Y) is true
Logical (Boolean) operators (Assume X and Y are Boolean expressions)
&& Logical and X && Y (returns true if both X and Y are true)
|| Logical or X || Y (returns true if either X or Y is true)
Assignment Operations
= Discrete assignment Z = X (Assigns the value of X to Z)
[=] Continuous assignment
Z[=]X (similar to discrete assignment)
Continuous integration (for any number of primes)
Z’[=]X (Z changes over time at the rate of X)
Acumen also supports some mathematical functions that can be used in modeling different systems. These functions are included as built-in functions in Acumen and are ready for use. The basic mathematical functions available with Acumen are listed in the table below.
Function Description Example (How we write in Acumen) Assume (x = 25)
abs Absolute value or Magnitude y = abs(x) gives 25
sin Sine function y = sin(x) gives 0.
cos Cosine function y = cos(x) gives 0.
sqrt Square root y = sqrt(x) gives 5
^ Power x^2 (x to the power of 2) gives 625
Acumen provides different control flow structures including if-else-end, switch-case and for-loops. The syntax for each of these decision-making structures is similar to the syntax used in other programming languages. The following table shows the syntax for these control flow statements in Acumen models.
9
else state="OFF" end end case "OFF" if (output==1) output= else state="ON" end end end
for loop for variable1 = start_value:end_value statement(s) end
class Main(simulator) private k=1; k'=1; i=1; end k'[=]1; for k=1:5 i=k^2; end end
As we have discussed in the previous sections, Acumen has special variables to represent derivatives of variables. They are declared and initialized in the private section of the Acumen code. Derivatives with respect to time play an important role in modeling physical systems. Thus, Acumen has made the use of derivative functions in Acumen models very simple. To illustrate this concept, let us consider the relationship between position (x), velocity (v), and acceleration (a). From physics we know that they are related as:
ᡴ =
In the following model, the variables t’ and x’ represent the first derivatives of t and x. Similarly, x’’ represents the second derivative of x. When t and x are initialized to 0 in the private section, the values of t and x can be automatically known if t’ and x’ are continuously defined. In the same way, the values of x and x’ are known automatically if x’’ is continuously defined.
//First order derivative example class Main(simulator) private x=0; x'=0; t=0; t'=0; end t'[=]1; //continuous law x'[=]sin(10t) * (10t); //continuous law end
//Second order derivative example class Main(simulator) private x=0; x'=0; x''=0; t=0; t'=0; end t'[=]1; //continuous law x''[=]sin(10t) * (10t); //continuous law end
10
Continuous model in Acumen is identified by having the assignment operator inserted between angle brackets ([ ]). The above two examples show purely continuous models that change over time continuously.
It is also important to consider the mechanism in which Acumen can perform discrete transitions. The following example illustrates a simple discrete model that may help users to know how they should use it in Acumen.
class Main (simulator) private x = 0; y = 4; z = 1; end if x==10 x = x+1 end; //discrete law if y%2 == 0 z = y*2 end; //discrete law end
Hybrid law in Acumen involves the use of continuous and discrete laws to be used to model a given system. In the following example, t controls the system based on the criteria set in the model.
class Main (simulator) private output=0; t=0; t'=0; x=0; y=0 end t' [=] 1; //continuous law if t> t=0; //discrete law if output==1 output=0; //discrete law else if output==0 output=1; //discrete law end end end; x [=]outputsin(30t); //continuous law end
To create a class in Acumen, we use a keyword class followed by the class name and optional arguments of the class. The basic syntax for creating a class is: