Communication Software and Design (Software process and requirement) ECM650
Dr Azlina Idris Faculty of Electrical Engineering, Universiti Teknologi MARA
Introduction (1/2)
Communication Software and Design Covers the concept of communication system design and simulation. Includes communication system design fundamentals, simulation techniques and methods as well as system performance validation. Learning Outcomes: Describe the fundamental concepts of communication software design and explain methods of designing a communication system using computer software. Identify the problems involved in designing a communication system and formulate the respective solution Design and validate a communication system using a design software.
1.
2. 3.
Introduction (2/2)
Importance of software in communication system design:
Analysis, testing and verification prior to hardware design process. Optimization of hardware design. Performance prediction of a system.
Types of simulations and design tools
Design of microwave elements Design of physical layer, such as protocol, interfaces, timing related specifications.
Types of simulations and design tools
Communication System Design
- Design of the complete communication system
Circuit Design RF, Microwave Engineering
Embedded System, FPGA, digital IC
C++
Pspice
Genesis
SILVACO
MATLAB
OrCAD
CST
VHDL
System C
ADS
ADS
Verilog
ECM420 Chapter1: Vector Algebra
Introduction to MATLAB
MATLAB is a numerical computing environment and 4thGeneration programming language. Developed by MathWorks and this program (MATLAB) allows:matrix manipulations plotting of functions and data
implementation of algorithms
creation of user interfaces interfacing with programs written in other languages, including C, C++, Java and Fortran. Advantages of MATLAB: - Pre-defined built-in functions.
- Easy to create user-defined custom functions.
- User friendly coding methods. - Integration with Simulink
MATLAB Workspace/Command Window
Workspace
Command Window
Command History
Example of MATLAB coding
Variable definition Fundamental Arithmetic Plotting graphs
Definition of variables
Two general method: 1) Define manually 2) Using MATLAB built in functions. Manual method: By directly input at Matlab Command Prompt. Binded by several rules:
Each element must be separated using a blank, tab, or comma. All defined elements must be inside [ ] Every end of each row is marked by ; . If ; is used at the end of statement, the output will not be shown
9
(a) Matrix of real numbers >> A = [1 2 3; 4 5 6; 7 8 0] or A = [1,2,3 ; 4,5,6; 7,8,0] A= 1 2 3 4 5 6 7 8 0 (b) Matrix of complex numbers >> F = [ 1+i 2+3i ; 3+2i 4 + 4i ] F= 1+ i 2+3i 3+2i 4+4i
10
Definition of variables (cont)
Using functions method: Various already created built-in functions existed in MATLAB. These functions can be used to create various types of data stream including random numbers, and special matrix. Commonly used built-in functions:
Functions
Zeros Ones Eye Diag Randn Randn . . .
Definitions
Matrix of zeros Matrix of ones Matrix unit Diagnal matrix Random Normalized random number
11
Examples
2 x 3 matrix of all zeros: >> zeros (2,3) ans = 0 0 0 0 0 0 3 x 3 matrix of all ones: >> ones (3) ans = 1 1 1 1 1 1 1 1 1 1 x 5 matrix of random numbers (pseudo noise): >> randn(1,5) ans = 0.951 0.2211 0.6068 0.4860 0.8913
12
Examples
Data with a constant increment can be generated easily using the below format: >> initial value : increment : final value Vector data consist of {1,2,3,4,..9,10}: >> h = 1 : 1 : 10 or >> h = 1: 10 (applies only for increment of 1) ans = 1 2 3 4 5 6 7 8 9 10
13
Some useful operations of data
Generated data can be manipulated using several easy operations.
14
Basic Arithmetic
MATLAB is included with various types of arithmetic functions, including specialized ones. Example of commonly used arithmetic functions
Functions + * / or \ .* ./ or .\ ^ .^ Definitions sum minus multiplication division Multiplication of elements Division of elements Power Power (elements)
15
Scalar Functions
Example:
Functions sin, cos, tan asin, acos, atan Sinh, cosh, tanh exp Log, log2, log10 sqrt abs Conj Real, imag . . Definitions Trigonometric functions Inverse trigonometric functions Hyperbolic functions exponential Log functions Square root Calculate absolute value Complex conjugate Dividing complex numbers to real and imaginary parts
16
Plotting graphs
Graphics functions: 2D,3D
Functions (2D plots) Definitions Plot Loglog Semilogx, semilogy Polar Bar Pie Hist Axis Grid subplot . . Linear plot Log plot Semilog plot Polar plot Bar plot Pie plot Histogram plot Set range for axis Display grid line Plot graphs in a subwindow
17
Plotting Graphs (cont)
Plotting a sine graph: x = 0:pi/100:20*pi; y = sin(x); plot(x,y) axis([0 20*pi -1 1]) grid
Plotting two sine graph: x = 0:pi/100:20*pi; y = sin(x); y2 = 0.5*sin(2*x); plot(x,y,x,y2) axis([0 20*pi -1 1]) grid
18
Plotting graphs (cont)
Subplot: subplot(2,1,1) plot(x,y) grid subplot(2,1,2) plot(x,y2) grid
19
M-file
Two types: script m-file, function m-file Script m-file: write commands simultaneously beforehand, and compile in one file. Save the file as extension *.m. Benefit: Able to do repeated operation with the use of variables. * variables defined inside an M-file will also be recognized as a global variable. Example: Copy and paste the commands in previous exercises in an MFile and compile. You should get the same result.
20
Introduction to Simulink
A GUI base simulation tools inside MATLAB. Usage of blocks to assemble larger systems. Pre-generated blocks have several limitations. Can create customized blocks using m-file, C and etc,
21
Simulink (cont)
Start Simulink by clicking on the icon at the toolbar
22
Simulink (cont)
Simulink library and model browser
23
Simulink (cont)
Common types of Block Libraries in Simulink - Sources: Signal Sources - Sinks: Monitor and logging of signals - Discrete: Discrete Systems Blocks - Linear - Non-linear - Connections: Signal connections and management
24
Exercises:
25