Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Acumen Modeling of AM, FM, and BASK Signals: Comparison with MATLAB, Lab Reports of Communication

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

  • How does the Simulink model for frequency modulation differ from the Acumen and MATLAB models?
  • How does Acumen model AM signals differently than MATLAB?
  • How is demodulation of PM and FM signals achieved?
  • What is the difference between Acumen and MATLAB models for BASK modulation?
  • What is the difference between PM and FM signals?

Typology: Lab Reports

2020/2021

Uploaded on 05/06/2021

ben-ten-1
ben-ten-1 🇺🇸

1 document

1 / 95

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
i
Modeling Basic Physical Links in
Acumen
Master report, IDE1252, June 2012
Master thesis
School of Information Science, Computer and Electrical Engineering
Muzeyen Hassen Esmael
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f

Partial preview of the text

Download Acumen Modeling of AM, FM, and BASK Signals: Comparison with MATLAB and more Lab Reports Communication in PDF only on Docsity!

i

Modeling Basic Physical Links in

Acumen

Master report, IDE1252, June 2012

Master thesis^ School of Information Science, Computer and Electrical Engineering

Muzeyen Hassen Esmael

ii

Modeling Basic Physical Links in Acumen

Master Thesis in Computer Network Engineering

June 2012

Author: Muzeyen Hassen Esmael

Supervisor: Prof. Walid Taha

Examiner: Prof. Tony Larsson

School of Information Science, Computer and Electrical Engineering Halmstad University PO Box 823, SE-301 18 HALMSTAD, Sweden

iv

Abstract

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

Acknowledgements

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

  • Chapter 1: Introduction List of Models x
    • Introduction
    • Objective and Approach
    • Related Work
    • Communication System Elements
    • Thesis Contributions
    • Thesis Outline
  • Chapter 2: A Basic Acumen Tutorial
    • Introduction
    • Variables
    • Comments and Punctuation
    • Basic Operations and Mathematical functions..........................................
    • Control Flow
    • Derivatives
    • Continuous Assignment
    • Discrete Assignment
    • Hybrid Behavior
    • Creating and Terminating Objects
  • Chapter 3: A Simple Channel Model
    • Introduction
    • A Simple Acumen Model
    • Classes and Objects in Acumen vii
    • Simulink Model for Simple RC Channel
    • Comparison between the Two Models
  • Chapter 4: Amplitude Modulation
    • Introduction
    • Amplitude Modulation and Demodulation
    • Acumen Model for Amplitude Modulation
    • MATLAB Model for Amplitude Modulation
    • Simulink Model for Amplitude Modulation
    • Comparison between the Three Models
  • Chapter 5: Angular Modulation
    • Introduction
    • Phase Modulation (PM)..........................................................................
    • Frequency Modulation (FM)
    • Demodulation of PM and FM..................................................................
    • Acumen Model for Frequency Modulation
    • MATLAB Model for Frequency Modulation
    • Simulink Model for Frequency Modulation
    • Comparison Between The Three Models
  • Chapter 6: Binary Amplitude Shift Keying
    • Digital Modulation Techniques
    • Binary Amplitude Shift Keying (BASK)
    • Acumen Model for BASK Modulation
    • MATLAB Model for BASK Modulator and Demodulator
    • Simulink Model for BASK Modulator and Demodulator
    • Comparison between the Three Models
  • Chapter 7: Binary Phase Shift Keying (BPSK)
    • Binary Phase Shift Keying (BPSK) viii
    • Acumen Model for Binary Phase Shift Keying (BPSK)
    • MATLAB Model for Binary Phase Shift Keying (BPSK)
    • Simulink Model for Binary Phase Shift Keying (BPSK)
    • Comparison between the Three Models
  • Chapter 8: Binary Frequency Shift Keying (BFSK)
    • Binary Frequency Shift Keying (BFSK)
    • Acumen Model for Binary Frequency Shift Keying (BFSK)
    • MATLAB Model for Binary Frequency Shift Keying (BFSK)....................
    • Simulink Model for Binary Frequency Shift Keying (BFSK)
    • Comparison between the Three Models
  • Chapter 9: Conclusion and Future Work
    • Future Works
  • References
  • Appendix
    • Collection of Acumen Codes
  • Theory of Communication by Claude E. Shannon, 1949] Figure 1: The Fundamental Model of Communication System [Source: A Mathematical
  • Figure 2: The Acumen GUI
  • Figure 3: Basic RC Circuit
  • Figure 4: Acumen output from Simple RC Channel Model.................................................................
  • Figure 5: Simple RC channel block diagram
  • Figure 6: Simple RC Channel Model output (Simulink Model)
  • Figure 7: AM Modulator and Demodulator
  • Figure 8: AM signal (Acumen Model)
  • Figure 9: Amplitude Modulation Model (MATLAB)
  • Figure 10: AM Signal block diagram (Simulink)
  • Figure 11: AM Signal Simulink output
  • Figure 12: FM signal (Acumen)
  • Figure 13: FM signal (MATLAB)
  • Figure 14: Simulink Block Diagram for FM Signal
  • Figure 15: FM Signal (Simulink)...................................................................................................................
  • Figure 16: ASK Modulation and Demodulation (Acumen Model)...................................................
  • Figure 17: ASK receiver
  • Figure 18: ASK Modulation and Demodulation (MATLAB Model)
  • Figure 19: BASK Block Diagram
  • Figure 20: BASK Signal (Simulink)
  • Figure 21: BPSK Signal (Acumen Model)
  • Figure 22: BPSK Signal (MATLAB Model)
  • Figure 23: Basic Building Block Diagram for BPSK System...............................................................
  • Figure 24: BPSK Signal (Simulink Model)
  • Figure 25: Coherent Detector for a BFSK Signal
  • Figure 26: BFSK Signal (Acumen Model)
  • Figure 27: BFSK Signal (MATLAB Model)
  • Figure 28: BFSK Building Block Diagram
  • Figure 29: BFSK Signal (Simulink Model).................................................................................................
  • Model 1: Acumen Model for a simple channel List of Models
  • Model 2: A more Modular Acumen Model for simple RC channel
  • Model 3: Acumen Model for Amplitude Modulation
  • Model 4: MATLAB Model for Amplitude Modulation...........................................................................
  • Model 5: Acumen Model for FM Signal
  • Model 6: MATLAB Model for Frequency Modulation
  • Model 7: Acumen Model for BASK
  • Model 8: MATLAB Model for BASK
  • Model 9: Acumen Model for BPSK
  • Model 10: MATLAB Model for BPSK
  • Model 11: BFSK Signal with non-coherent detection (Acumen Model)
  • Model 12: BFSK Signal with coherent detection (Acumen Model)
  • Model 13: BFSK Signal (MATLAB Model)

1

Chapter 1: Introduction

Introduction

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.

Objective and Approach

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.

Related Work

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.

Thesis Outline

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).

Chapter 2:

Introduction

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

Chapter 2: A Basic Acumen Tutorial

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.

Comments and Punctuation

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.

Basic Operations and Mathematical functions

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 addition X + Y gives 30
  • Binary Subtraction X - Y gives - 10
  • Binary Multiplication X * Y gives 200

/ 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

Control Flow

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

Derivatives

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 Assignment

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.

Discrete Assignment

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 Behavior

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

Creating and Terminating Objects

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: