0% found this document useful (0 votes)
15 views7 pages

2 Ex 2

The document provides an introduction to Simulink, a MATLAB extension for modeling, simulating, and analyzing dynamical systems through a graphical user interface. It outlines the steps to create a simple model using various blocks, make connections, and run simulations, while emphasizing the importance of practice and exploration. Additionally, it includes precautions, prerequisite questions, and exercises to enhance understanding of Simulink functionalities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views7 pages

2 Ex 2

The document provides an introduction to Simulink, a MATLAB extension for modeling, simulating, and analyzing dynamical systems through a graphical user interface. It outlines the steps to create a simple model using various blocks, make connections, and run simulations, while emphasizing the importance of practice and exploration. Additionally, it includes precautions, prerequisite questions, and exercises to enhance understanding of Simulink functionalities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

EXPERI

MENT No-2
2.1 Objective 2.2 Software 2.3 Theory 2.4 Programming 2.5 Result
2.6 Precautions 2.7 Pre-requisite Questions 2.8 Post-requisite Questions

2.1 OBJECTIVE: Introduction of Simulink

2.2 SOFTWARE: MATLAB 2024b

2.3 THEORY:
Simulink (Simulation and Link) is an extension of MATLAB by MathWorks Inc. It works with
MATLAB to offer modelling, simulation, and analysis of dynamical systems under a graphical user
interface (GUI) environment. The construction of a model is simplified with click-and-drag mouse
operations. Simulink includes a comprehensive block library of toolboxes for both linear and
nonlinear analyses. Models are hierarchical, which allow using both top-down and bottom-up
approaches. As Simulink is an integral part of MATLAB, it is easy to switch back and forth during
the analysis process and thus, the user may take full advantage of features offered in both
environments.
Start using Simulink
To start a Simulink session, you'd need to bring up MATLAB program first. From MATLAB
command window, enter:
>> Simulink

Alternately, you may click on the Simulink icon located on the toolbar as shown:
Simulink's library browser window like one shown below will pop up presenting the block set for
model construction.

The Simulink Library Browser is the library where you find all the blocks you may use in Simulink.
Simulink software includes an extensive library of functions commonly used in modelling a system.
These include: Continuous and discrete dynamics blocks, such as Integration, Transfer functions,
Transport Delay, etc.
Math blocks, such as Sum, Product, Add, etc. Sources, such as Ramp, Random Generator, Step, etc

Create a new Model:


Click the New icon on the Toolbar in order to create a Simulink

A new window will appear on the screen. You will be constructing your model in this window.
Also in this window the constructed model is simulated. A screenshot of a typical working (model)
window is shown below:

To become familiarized with the structure and the environment of Simulink, you are encouraged to
explore the toolboxes and scan their contents. You may not know what they are all about at first,
but perhaps you could catch on the organization of these toolboxes according to their categories.
For instance, you may see that the Control System toolbox consists of the Linear Time Invariant
(LTI) system library and the MATLAB functions can be found under Function and Tables of the
Simulink main toolbox. A good way to learn Simulink (or any computer program in general) is to
practice and explore. Making mistakes is part of the learning curve. A simple model is used here to
introduce some basic features of Simulink. Please follow the steps below to construct a simple
model
STEP 1: CREATING BLOCKS
From BLOCK SET CATEGORIES section of the SIMULINK LIBRARY BROWSER window,
click on the "+" sign next to the Simulink group to expand the tree and select (click on) Sources.

A set of blocks will appear in the BLOCKSET group. Click on the Sine Wave block and drag it to
the workspace window (also known as model window).

Now you have established a source of your model.


I am going to save this model under the filename: "simexample1". To save a model, you may click
on the floppy diskette icon . or from FILE menu, select Save or using keystrokes CTRL+S. All
Simulink model file will have an extension “. mdl". Simulink recognizes file with. mdl extension as
a simulation model (similar to how MATLAB recognizes files with the extension .m as an MFile).
Continue to build your model by adding more components (or blocks) to your model window. We'll
continue to add a Scope from Sinks library, an Integrator block from Continuous library, and a Mux
block from Signal Routing library.
To move the blocks around, simply click on it and drag it to a desired location.
Once you've dragged over all necessary blocks, the workspace window should consist of the
following components:

You may remove (delete) a block by simply clicking on it once to turn on the "select mode" (with
four corner boxes) and use the DEL key or keys combination CTRL-X.
STEP 2: MAKING CONNECTIONS
To establish connections between the blocks, move the cursor to the output port represented by ">"
sign on the block. Once placed at a port, the cursor will turn into a cross "+" enabling you to make
connection between blocks. To make a connection: left-click while holding down the control key
(on your keyboard) and drag from source port to a destination port. The connected model is shown
below.

A sine signal is generated by the Sine Wave block (a source) and is displayed by the scope. The
integrated sine signal is sent to scope for display along with the original signal from the source via
the Mux, whose function is to multiplex signals in form of scalar, vector, or matrix into a bus.
STEP 3: RUNNING SIMULATION
You now may run the simulation of the simple system above by clicking on the play button .
Alternately, you may use keystrokes CTRL+T, or choose Start submenu (under Simulation menu).
Double click on the Scope block to display of the scope.

To view/edit the parameters, simply double-click on the block of interest.

Exercise:
1. Add a Constant block (Simulink > Sources) to the model. Change its Constant value parameter
to 3, and connect it to the new Signal Assessment block.2
2. Create a circuit for understanding the working of a scope block

2.4 PROGRAMMING:
The sheet of programming is attached as Annexure II

2.5 RESULT:
This sheet of result is attached as Annexure I

2.5 PRECAUTIONS:
1. Ensure you have the correct version of MATLAB and Simulink installed.
2. Verify that your system meets the hardware and software requirements for Simulink.
3. Regularly save your work to prevent data loss.
4. Use meaningful names for your models and blocks to keep your workspace organized.

2.6 PRE – REQUISITE QUESTIONS:


1. Are you familiar with the MATLAB environment and basic commands?
2. Do you understand how to create and run scripts in MATLAB?
3. Do you have a basic understanding of dynamic systems and how they are modeled?
4. Are you familiar with concepts like differential equations and transfer functions?

2.7 POST – REQUISITE QUESTIONS:


1. Can you explain the difference between continuous and discrete systems in Simulink?
2. How comfortable are you with creating and simulating basic models in Simulink?
3. Have you explored advanced Simulink features such as State flow, Simscape, or custom
block creation?
Annexure I

1.

2.
Annexure II
1.

2.

You might also like