Simulink Tutorial

This page on simulink tutorial covers simulink basics, quick guide to use simulink, data types, simulink concepts, signal processing example and wimax simulation using simulink.

Simulink Basics

Simulink is part of MATLAB offering from MathWorks Inc. It is mainly designed for user to develop systems with graphical representation of the modules. It is GUI based drag and drop programming language. We will focus in this simulink tutorial on simulink concepts, library functions, source and sink functions, simulink functions in signal processing and implementation of wimax physical layer using simulink language.

Quick guide to how to start and use simulink

One can start simulink by typing simulink command on the command prompt of the MATLAB window. Or one can also click at simulink icon in the menu bar.
> > simulink
> > simulink window opens once you press enter after typing simulink.

Any simulink model will have input and output ports to provide data and take out data for display/interfacing. In addition sources and sinks blocks are must for following reasons.

1. Sources- which feeds data to the model under implementation.
2. Sinks- which plots the data processed by the model under implementation.
3. Each model will have input and output ports to connect signals and also useful to interface two different models.

Data types supported by simulink

Following are the data types supported by simulink.

double - double precision floating point
single - single precision floating point
int8- signed eight bit integer
uint8 -unsigned eight bit integer
int16- signed 16 bit integer
uint16- unsigned 16 bit integer
int32 - signed 32 bit integer
uint32 - unsigned 32 bit integer

Simulink also supports processing of complex signals. There are block set for Real-Imag to Complex conversion and complex to Real-Imag conversion functionality.

Simulink concepts

There are two ways processing happens on the data in simulink.

1. Sample based processing- in this processing, samples are processed one by one.
2. Frame based processing- in this processing, frames are processed one by one.
Pls. note that each frame is composed of sequence of samples which forms a single vector.
For example, sine wave block provides setting of Samples per frame. If we set this field to 100 then each frame will have 100 samples. This will complete simulation faster.
Double lines between two blocks represent frame based processing.
>> Let us build small system with source and sink as shown below.

simulink tutorial

One can find sine wave (DSP) under signal processing block set in DSP sources and vector scope block in DSP sinks. AWGN channel can be found in communication block set. Save the file as examplesinewave.mdl . Now set appropriate parameters so that model developed can be run easily.

Simulink backend parameters for simulation:
Select Simulation option on top of the model window and click 'configuration parameters' so that configuration dialog window opens up. Now following need to be set and then press OK.
Simulation Time: start time: 0 Stop time: inf
Solver options:
Type: Variable step
Max. Step Size: Auto
Solver: Discrete (No continuous states)

Sinewave (DSP) parameters:
Double click the sinewave icon to open up configuration window to set parameters.
1. Set Amplitude to 10.
2. Set Frequency to 100.
3. Set Samples per frame to 1000.
4. Click OK.

AWGN parameters:
Double click the AWGN channel icon to open up configuration window to set parameters.
Initial seed: 70
Mode: Signal to Noise Ratio
SNR (dB): 25
Input signal power in watts: 1

Simulink for signal processing

One can expand signal processing block set to view supported library functions in the simulink. Following are available in simulink signal processing library. Estimation modules
Filtering modules
Math functions
Signal management and signal processing modules.
Signal processing sources and sinks
Transform functions-FFT

Implementation of wimax physical layer using simulink/matlab

wimax simulation using simulink


One can download the simulink source code of the model mentioned below from download section of the RF Wireless world or click the following link to download.
WiMAX system simulink model with readme file

Cellular Telecommunications Tutorials -
RF Wireless World

WLAN  802.11ac  802.11ad  wimax  Zigbee  z-wave  GSM  LTE  UMTS  Bluetooth  UWB  IoT  satellite  Antenna  RADAR