0% found this document useful (0 votes)
53 views12 pages

Brief of Simulink

Simulink is a graphical extension of MATLAB used to model and simulate systems. In Simulink, systems are modeled as block diagrams where blocks represent system components. Common block types include sources, sinks, math operations, and continuous/discrete components. Models are created by dragging blocks from libraries and connecting them. Parameters can be modified and simulations run to obtain outputs. Examples demonstrate modeling transfer functions, gain blocks, and filtering circuits in Simulink.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views12 pages

Brief of Simulink

Simulink is a graphical extension of MATLAB used to model and simulate systems. In Simulink, systems are modeled as block diagrams where blocks represent system components. Common block types include sources, sinks, math operations, and continuous/discrete components. Models are created by dragging blocks from libraries and connecting them. Parameters can be modified and simulations run to obtain outputs. Examples demonstrate modeling transfer functions, gain blocks, and filtering circuits in Simulink.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Objective: To study the brief of Simulink and use in various applications

Required Software: MATLAB/Simulink (Any version)

Theory:
Simulink Basics:
Simulink is a graphical extension to MATLAB for modelling and simulation of
systems. One of the main advantages of Simulink is the ability to model a nonlinear
system, which a transfer function is unable to do. Another advantage of Simulink is
the ability to take on initial conditions. When a transfer function is built, the initial
conditions are assumed to be zero.
In Simulink, systems are drawn on screen as block diagrams. Many elements of
block diagrams are available, such as transfer functions, summing junctions, etc., as
well as virtual input and output devices such as function generators and
oscilloscopes. Simulink is integrated with MATLAB and data can be easily
transferred between the programs. In these tutorials, we will apply Simulink to the
examples from the MATLAB tutorials to model the systems, build controllers, and
simulate the systems
Starting Simulink:
Simulink is started from the MATLAB command by entering the following command:
simulink
Alternatively, you can hit the Simulink button at the top of the MATLAB window as
shown here:

When it starts, Simulink brings up a single window, entitled Simulink Start


Page which can be seen here.
Once you click on Blank Model, a new window will appear as shown below.

From the Simulation tab, select Save > Save as. In the File name text box, enter a
name for your model. For example, sim_model. Click Save. The model is saved with
the file extension .slx.
Open Simulink Library Browser
There are two major classes of items in Simulink: blocks and lines. Blocks are used
to generate, modify, combine, output, and display signals. Lines are used to transfer
signals from one block to another
Simulink provides a set of block libraries, organized by functionality in the Library
Browser
• Continuous — Blocks for systems with continuous states (transfer functions, state-
space models, PID controllers, etc.)
• Discrete — Blocks for systems with discrete states (discrete transfer functions,
discrete state-space models, etc.)
• Math Operations — Blocks that implement algebraic and logical equations (gain,
sum, product, etc.)
• Sinks — Blocks that store and show the signals that connect to them
• Sources — Blocks that generate the signal values that drive the model

1. From the Simulation tab, click the Library Browser button.

2.To browse through the block libraries, select a category and then a
functional area in the left pane.
To search all of the available block libraries, enter a search term. For example, find
the step block. In the search box on the browser toolbar, enter step, and then press
Enter. Simulink searches the libraries for blocks with step in their name or
description and then displays the blocks.
Get detailed information about a block. Right-click the step block, and then select
Help for the step block. The Help browser opens with the reference page for the
block. Blocks typically have several parameters. You can access all block
parameters by double-clicking the block.
Add Blocks to a Model
To start building the model, browse the library and add the blocks.
1. From the Sources library, drag the step block to the Simulink Editor, or right
click on step block and select add block to the model option. A copy of the
step block appears in your model.

2 Add the following blocks to your model using the same approach. Step, Transfer
Function, and Scope. Arrange the blocks by clicking and dragging each block. To
resize a block, drag a corner. Your model now has the blocks you need.
Unused input terminals are indicated by a small open triangle. Unused output
terminals are indicated by a small triangular point. The block shown below has an
unused input terminal on the left and an unused output terminal on the right.
Connect Blocks
Connect the blocks by creating lines between output ports and input ports.
1. Click the output port on the right side of the Pulse Generator block. The output
port and all input ports suitable for a connection are indicated by a blue chevron
symbol

2.Connects the blocks with a line and an arrow indicating the direction of signal flow.

3.Save your model. In the Simulation tab, click Save.

The simple model consists of three blocks: Step, Transfer Function, and Scope. The
Step is a Source block from which a step input signal originates. This signal is
transferred through the line in the direction indicated by the arrow to the Transfer
Function Continuous block. The Transfer Function block modifies its input signal
and outputs a new signal on a line to the Scope. The Scope is a Sink block used to
display a signal much like an oscilloscope.
Run Simulation.
After you define the configuration parameters, you are ready to simulate your model.
1 On the Simulation tab, set the simulation stop time by changing the value in the
toolstrip.

The default stop time of 10.0.It can be change to different value like 5,8,3 etc.
2 To run the simulation, click the Run button. The simulation runs and produces the
output. Output can be seen through scope block

Modifying Blocks
A block can be modified by double-clicking on it. For example, if you double-click on
the Transfer Function block in the Simple model, you will see the following dialog
box.

This dialog box contains fields for the numerator and the denominator of the block's
transfer function. By entering a vector containing the coefficients of the desired
numerator or denominator polynomial, the desired transfer function can be entered.
For example, to change the denominator to

(1)
enter the following into the denominator field
[1 2 4]
and hit the close button, the model window will change to the following,
which reflects the change in the denominator of the transfer function.
The Step block can also be double-clicked, bringing up the following dialog box.

The default parameters in this dialog box generate a step function occurring at time =
1 sec, from an initial level of zero to a level of 1 (in other words, a unit step at t = 1).
Each of these parameters can be changed. Close this dialog before continuing.

Example 2
Let’s build a very simple model which take in a sine wave input amplify by a factor.
1. From the Simulation tab, click the Library Browser button.
2. To search all of the available block libraries, enter a search term. For
example, find the sine wave block. In the search box on the browser toolbar,
enter sine wave, and then press Enter. Simulink searches the libraries for
blocks with sine in their name or description and then displays the blocks.
3. Drag the sine wave block Simulink Editor and set the amplitude 2 by double
click on that block.
4. Add gain block and change its amplitude to 3.
5. Another way to bring block in Simulink Editor just double click on Simulink
editor it will bring the search magnifying glass start typing the names of block
that to be used.

6. Connect scope block to gain block. Now click on scope block then click on
setting icon, from there change the no of input of scope.
7. Now connect the second input of scope directly to sine wave and run the
simulation see the result with gain or without gain in scope.

8. Now click on scope block then click on setting icon and to get the legend click
on legend icon.
Practice examples:
1. Perform Logical operations using Simulink.
2. Design a full wave Rectifier using Simulink and plot the output response under
different load conditions (R, RL, RLC).

3. Plot the response of the following differential equations

4. Display the output if threshold value is greater than input and lesser than input
using Switch block in Simulink

5. Design a RLC circuit and plot the output response.

Conclusion:

You might also like