Modeling digital communication systems using Simulink | applied electronics engineering

Latest

Modeling digital communication systems using Simulink

By Applied Electronics - Monday, March 6, 2017 No Comments
Matlab simulink is a great graphical system design and simulation software. You can model different kinds of system such as electronics circuits, electromechanical systems, digital signal processing system etc with simulink. Here we want to use simulink for modelling digital communication system. One can use matlab programming language on scripts to create digital communication systems but the advantage of using simulink model is that you can better see the overall design and feel like creating something phyical. If you are interested in using matlab code then see matlab code for qpsk modulation and demodulation or the matlab tutorial page.

This is the first part of the tutorial on how to create and simulate digital communication system using simulnk.

See the full list of tutorials in Modeling digital communication systems using Simulink.

In this part of the tutorial we introduce Matlab Simulink. We will explains how to start simulink, how to insert blocks from simulink library, explain some of the libraries that are important for modeling digital communication systems and the steps to be followed in building and running the model. In this example tutorial a simple simulink model for generation of a sinusoidal signal is illustrated.

In later tutorials we show how to design communications systems utilizing Communications System Toolbox and the DSP System Toolbox.

What is Simulink?


Simulink is a block diagram environment that allows you to create and simulate single or multi-domain Model-Based Design. Simulink supports system-level design, simulation, automatic code generation, and continuous test and verification of embedded systems. It also provides a graphical editor, customizable block libraries, and solvers formodeling and simulating dynamic systems. It is integrated with MATLAB, enabling you to incorporate MATLAB algorithms into models and export simulation results toMATLAB for further analysis.

Where to find Simulink and how to open it?


Assuming that you have opened Matlab software, the Simulink is under the New tab if you want to create a new simulink model. Optionally you can also open first the Simulink Library and then there create a new simulink model. See figure below.


 If you open the Simulink Library you will see the following library window.


 Now there are lots of different libraries which you can see on the left hand side(the right hand side is showing the content for the library selected on the left side). But for the purpose of modeling digital communication system we are interested primarily in source library, sink library, communication system toolbox and DSP toolbox libraries.

How to build a new Simulink model


Now we show how you can build your first new simulink model. To begin building a new Simulink model, on the MATLAB software toolbar, under the HOME tab, pull down New and select Simulink Model. This will open a blank Simulink model window, shown in figure below.



Now if you look at the top bar of the window, it says untitled. To rename this model, on the toolbar, select File or File:save as and enter the model name First_Simulink_Model, then save. The renamed model is shown below. Also in the model window, you can see the simulation run time which is set by default to 10. The user(you) may select the duration of the model execution, shown here to be set at 10(second) to other values as will illustrated later.


First Simulink Model: Sine wave

Now we are ready to create our first simulink model- A simple sine signal simulink model.

The first thing we will do is to insert the sine signal source and a time scope to view the sine signal. First to insert/put a sine wave signal source form the Simulink/Sources library into the simulink model by dragging into the model or by right click and clicking on insert into model, or using Ctrl+I keyboard shortcut.


 Next add the Scope block which you will find in the Simulink/Sinks library.Your model should look like the following.




Now we will set the properties of our sine wave. Double-click on the Sine Wave icon; this opens an
information window for the Sine Wave block, as shown below. In the window, the Amplitude and Bias of the sinusoidal source are selected as 1 and 0, respectively.  The Sine type and Time (t) selections shown in the figure will be suitable for most simulations.The other properties will be explained and used in the next tutorial. For this tutorial we will use the default values.


Next we need to set up the Scope block. Double click on the scope block. There you should see a gear box. To set up the properties of the scope block click on the gear box.





You should see the following scope properties window.


On the General tab as shown in figure above, the user is able to set the number of axes to be displayed in the Scope display, the simulation time range to be displayed, and to specify where Tick labels are to be applied in the display. Since the scope can be set to display multiple axes (for multiple inputs), the time ticks might be applied to all axes (select all), or to none, or to the bottom axis only.

The History page of the Scope Parameters window is shown in figure below. Here the user can specify the number of simulation data points to be displayed on the scope and can elect to have the data stored to workspace.


On the Style page of the Scope Parameters window, shown in figure below, the user has various options as to colors, line styles and choice of markers to be used in the scope display.





Running the Simulink Model

After the sine source block and sink properties have been set the next thing to do is to run the simulink model. To execute the simple Sine Wave model, in the model window, click on the dark arrow button near the center of the toolbar, as shown in figure below.


Double-clicking on the Scope block opens the Scope display window, shown in figure below. Examining the signal trace on the Scope display confirms the signal source settings made in Figure 1.7: Amplitude = 1, and Frequency = 1 rad/s.


Next see the 2nd part of the tutorial- How to generate multiple sinusoid signal in simulink.

No Comment to " Modeling digital communication systems using Simulink "