Communication Software and Design (Chapter 1)

Embed Size (px)

Citation preview

  • 7/28/2019 Communication Software and Design (Chapter 1)

    1/25

    Communication Software and

    Design

    (Software process and

    requirement)ECM650

    Dr Azlina Idris

    Faculty of Electrical Engineering, Universiti Teknologi MARA

  • 7/28/2019 Communication Software and Design (Chapter 1)

    2/25

    Introduction (1/2)

    Communication Software and Design

    Covers the concept of communication system design andsimulation. Includes communication system design

    fundamentals, simulation techniques and methods as well as

    system performance validation.

    Learning Outcomes:

    1. Describe the fundamental concepts of communication

    software design and explain methods of designing a

    communication system using computer software.

    2. Identify the problems involved in designing a communicationsystem and formulate the respective solution

    3. Design and validate a communication system using a

    design software.

    2

  • 7/28/2019 Communication Software and Design (Chapter 1)

    3/25

    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.

    3

  • 7/28/2019 Communication Software and Design (Chapter 1)

    4/25

    Types of simulations and design

    tools

    Design of microwave elements Design of physical layer, such as protocol, interfaces, timing

    related specifications.

    4

  • 7/28/2019 Communication Software and Design (Chapter 1)

    5/25

    Types of simulations and design tools

    - Design of the completecommunication system

    ECM420 Chapter1: Vector Algebra 5

    CommunicationSystem Design

    C++

    MATLAB

    System C

    Circuit Design

    Pspice

    OrCAD

    ADS

    RF, MicrowaveEngineering

    Genesis

    CST

    ADS

    EmbeddedSystem, FPGA,

    digital IC

    SILVACO

    VHDL

    Verilog

  • 7/28/2019 Communication Software and Design (Chapter 1)

    6/25

    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

    6

  • 7/28/2019 Communication Software and Design (Chapter 1)

    7/25

    MATLAB Workspace/Command Window

    7

    Workspace CommandWindow

    Command History

  • 7/28/2019 Communication Software and Design (Chapter 1)

    8/25

    Example of MATLAB coding

    8

    Variable definition

    Fundamental Arithmetic

    Plotting graphs

  • 7/28/2019 Communication Software and Design (Chapter 1)

    9/25

    Definition of variables

    Two general method:

    1) Define manually2) Using MATLAB built in functions.

    Manual method:

    By directly input at Matlab Command Prompt.

    Binded by several rules:

    9

    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

  • 7/28/2019 Communication Software and Design (Chapter 1)

    10/25

    (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

  • 7/28/2019 Communication Software and Design (Chapter 1)

    11/25

    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:

    11

    Functions Definitions

    Zeros

    Ones

    Eye

    DiagRandn

    Randn

    .

    .

    .

    Matrix of zeros

    Matrix of ones

    Matrix unit

    Diagnal matrixRandom

    Normalized random

    number

  • 7/28/2019 Communication Software and Design (Chapter 1)

    12/25

    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 (pseudonoise):>> randn(1,5)

    ans = 0.951 0.2211 0.6068 0.48600.8913

    12

  • 7/28/2019 Communication Software and Design (Chapter 1)

    13/25

    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

  • 7/28/2019 Communication Software and Design (Chapter 1)

    14/25

    Some useful operations of

    data

    Generated data can be manipulated using

    several easy operations.

    14

  • 7/28/2019 Communication Software and Design (Chapter 1)

    15/25

    Basic Arithmetic

    MATLAB is included with various types of arithmeticfunctions, including specialized ones.

    Example of commonly used arithmetic functions

    15

    Functions Definitions

    +-

    *

    / or \

    .*

    ./ or .\

    ^

    .^

    summinus

    multiplication

    division

    Multiplication of elements

    Division of elements

    Power

    Power (elements)

  • 7/28/2019 Communication Software and Design (Chapter 1)

    16/25

    Scalar Functions

    Example:

    16

    Functions Definitions

    sin, cos, tan

    asin, acos, atan

    Sinh, cosh, tanh

    expLog, log2, log10

    sqrt

    abs

    Conj

    Real, imag

    .

    .

    Trigonometric functions

    Inverse trigonometric functions

    Hyperbolic functions

    exponentialLog functions

    Square root

    Calculate absolute value

    Complex conjugate

    Dividing complex numbers to real

    and imaginary parts

  • 7/28/2019 Communication Software and Design (Chapter 1)

    17/25

    Plotting graphs

    Graphics functions: 2D,3D

    17

    Functions (2D plots) Definitions

    Plot

    Loglog

    Semilogx, semilogy

    Polar

    BarPie

    Hist

    Axis

    Grid

    subplot

    .

    .

    Linear plot

    Log plot

    Semilog plot

    Polar plot

    Bar plotPie plot

    Histogram plot

    Set range for axis

    Display grid line

    Plot graphs in a subwindow

  • 7/28/2019 Communication Software and Design (Chapter 1)

    18/25

    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

    18

    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

  • 7/28/2019 Communication Software and Design (Chapter 1)

    19/25

    Plotting graphs (cont)

    Subplot:

    subplot(2,1,1)

    plot(x,y)

    grid

    subplot(2,1,2)

    plot(x,y2)grid

    19

  • 7/28/2019 Communication Software and Design (Chapter 1)

    20/25

    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 M-

    File and compile. You should get the same result.

    20

  • 7/28/2019 Communication Software and Design (Chapter 1)

    21/25

    Introduction to Simulink

    A GUI base simulation tools insideMATLAB.

    Usage of blocks to assemble larger

    systems. Pre-generated blocks have several

    limitations.

    Can create customized blocks usingm-file, C and etc,

    21

  • 7/28/2019 Communication Software and Design (Chapter 1)

    22/25

    Simulink (cont)

    22

    Start Simulink by

    clicking on the

    icon at the toolbar

  • 7/28/2019 Communication Software and Design (Chapter 1)

    23/25

    Simulink (cont)

    Simulink library and model browser

    23

  • 7/28/2019 Communication Software and Design (Chapter 1)

    24/25

    Simulink (cont)

    Common types of Block Libraries inSimulink

    - Sources: Signal Sources

    - Sinks: Monitor and logging of signals- Discrete: Discrete Systems Blocks

    - Linear

    - Non-linear

    - Connections:

    Signal connections and management

    24

  • 7/28/2019 Communication Software and Design (Chapter 1)

    25/25

    Exercises:

    25