Hello and welcome to the webinar similan for new users my name is Priyanka
I'm the product marketing manager for Simulink and hi
Michael Senior Product Marketing Manager also for Simulink and today
We are going to talk about how you can get started with Simulink
we'll use these four blocks here modeling simulation essentially three blocks and collaboration and
We will show you how to use some of the features get started with Simulink get running with building models
Right so, I think we want to present this in terms of you know how would you use Simulink?
Typically you would start building out a model
Designing a system and then simulating the model to make sure that that system is behaving the way you expect it to behave
And then once you are happy with the results and you want to share
Your model with others either in your team or across the organization
What's the best way to do that so yeah?
those different things yeah, so without further delay we can get started with
you know showing you how you can do these things within matlab so let me bring up matlab here and
Anyone who's used matlab
this is the
This is how the interface would look like we have this command window where you can start up in commands
and to get started with simulating first, I'll start typing Simulink here, and if I hit enter it opens up a
Simmering start page. Let's maximize it
What we have here are few templates that you that allow new users to get started with for example
We have a digital filter or feedback controller with some of the blocks already existing, so you don't have to open
blank Simulink model right and if you have
Other products besides Simulink as you scroll down there's different starting point templates
For the other products as well, but I think for our
Presentation today, we're just going to start with the blank model
Yeah, just to show how easy it is to set up a model. I would like to start with a blank model and
This is how a blank in canvas would look like?
As a first step. I just want to save my model
So I'll just call it my model and save it in the same current directory as I'm working
Sounds good, so so we have a blank model
and we need to
Put some blocks inside of here right and so the best way to do that start with a library browser
Right yes
so
Simulink is a block diagram
Environment whoo all you want to do is to bring some blocks and the blocks can be accessed from the simulant library browser
I just clicked the library browser from the menu here and that brings up this library browser
Which has not only similar
But all other products and several blocks that you can simply drag and drop
So you don't have to build some of these blocks on your own
but you can use some of the pre-existing blocks so what type of model you think we should build this as a
Starting point sample model. Yeah, so for the first example
Let's build a very simple model which takes in a sine wave input
amplifies it by a factor and
You know way to just work with signals. Okay, so for that. I'll use sources library, which has
different blocks that act as
signal source
As you can see you can have a constant value as a signal source you're looking for a sine sine wave yeah
So I'll just bring in the sine wave block. I'll just drag it and drop it and that will bring a block into my model
Okay, and when I did that it gave me an option of what my amplitude
Should be for the same sine wave I can
Simply ignore it and go with the default value which is 1 or I can give another value here
Now let's bring other blocks that allow
amplification of this wave
One of the nice ways you can bring in blocks
Is through a quick insert where you can just click on the canvas for one one time it will bring up a search
Magnifying glass you can start typing the names of the blocks if you already know what to use
okay, so
You know let's say we wanna add a game block right
Usually we know that gain is what is used to you know multiply a particular value by a factor
So I'll type that in and that showed me all the search results from various different libraries that are available
again
Just looking and mapping back to the library browser
right so it tells you everything with the word gain every block that has the word gain that and
To know which one to choose you can see underneath each name tells you the name of the product where that
Block exists, and then the sub library yeah
So I'll just use the math operations library and bring that game block in
Say you want to multiply it by a factor of 3
I can just enter 3 here similar to what you did for the sine. Wave
but if you
Miss that or just run for the default well
You can always double click and change the value here as you go through your modeling
Exercise you might want to try several values as it works for you do that so that little prompt that shows up
That's really just a convenience say you don't
Yeah, when you when you quickly want to build something you can use the
Convenience mechanism that comes in with the quick insert, but otherwise you can just use a block dialogues, okay?
so and then once you have a couple blocks here connecting these two is very simple drag signal and
Join it to the next block next to it sounds good
And now that we have an input and we have amplified it by a value
We want to visualize it theoretically we know that it should multiply that signal by 3 so for visualizing
Yeah, scope is the most popular way in which you can visualize signals within simmering, so I just search for it
It's in sinks library, and I'm adding it back to the model now
I'll add two ports for this because I want to visualize the
Output signal which is this and do you see this nice?
Guide that lets you like these signals whenever yeah anytime you align two blocks. Yeah, I'm gonna get
basically an alignment
Indicator yep - to help you create a nice clean-looking - yeah
And the good thing is you don't didn't I didn't have to drag the signal
It's just clicking it would connected yeah connect the block now to connect this block
I just simply drag that signal and add it to the scope block now that time the you didn't do a
Your basic left-click drag you did a right click drag
Yes, if I did left click that would just move the signal around
But if I do a right click that will branch off the signal and once you have a branch you can simply
Now drag it with the left click. Okay, so I'll just select the branch and delete it for now sounds good
And then I can use some of the keyboard shortcuts like spacebar to fit the whole model to view or you zoom and pan
Using the mouse wheel that's that you know allows you to look at your model. We want to maximize our space right right?
Yeah, the library browser open up our scope block so we can see our simulation results and
simply run the simulation
Once I run it you see the input which is a sine wave with amplitude of - it's my
Amplified by a factor of three you see the output here all right, but that's good so you run the simulation
just to
Make sure that everything is behaving the way we expected the behave right it is so we're pretty happy
This is a pretty common workflow, right yes. You build up your model
Anytime you're making changes you want to press play as as often as possible
So that it basically keeps you honest
Right you're always verifying to make sure that we're a building can be simulated yes
And that's kind of the power of Simulink to be honest if I just went here and change the value
Simply press the play button and quickly visualize it in scope lock so that's that's what you would want to do with Simulink