Scilab/C2/Xcos-Introduction/English
| |
|
|---|---|
| Introduction Slide | Welcome to the spoken tutorial on Xcos: Scilab Connected Object Simulator.
|
| Slide | In this tutorial you will learn
|
| Slide | To practice this tutorial, Scilab should be installed on your system.
|
| Open Scilab | Open the Scilab console window on your computer.
OR Type “xcos” in your Scilab console window and press Enter |
| Palette | By doing this, two windows will open.
|
| Collecting the blocks from different Pallete | We will now simulate a first order system with a step input.
|
| As per narration | Drag this block to the Untitled-Xcos window. |
| As per narration | Select the required source in the Sources palette.
|
| As per narration | I will drag and place it before the transfer function block. |
| As per narration | Similarly, the output is displayed using the CSCOPE block, which is available in Sinks palette.
|
| Point to the red input port. | The red input port in CSCOPE denotes that this block is an “event driven” block. |
| As per narration | It needs an event input for execution.
|
| As per narration | Drag and place this block above the CSCOPE block. |
| We have collected all the required blocks to do the simulation. | |
| Connect as per narration | Let us now connect the blocks together.
|
| Point to the green input port. | Notice that the selected input port gets highlighted in green colour. |
| As per narration | Similarly, connect the remaining blocks as shown. |
| Changing the parameter of step block | Now we will set the parameters of each block. |
| Double-click on step block | First, go to the step block and double-click on it. |
| Point the options in the Pop-up window | A pop up window appears, asking for the value of Step Time, Initial Value and Final Value. |
| Point to Step Time | Step Time is the time at which the step change will occur.
|
| Initial Value is the initial output value of the step function.
| |
| Final Value is the output of the step function, after the Step Time is lapsed.
We will change it to 2. Click on OK. | |
| Changing the parameter of Transfer function block | Follow the similar procedure to configure any other block. |
| As per narration | For transfer function block, the following configuration is required.
|
| As per narration | Denominator value in laplace domain has to entered.
We will change it to 2 asteric s plus 1. Click on OK. |
| Changing the parameter of scope | Double click on CSCOPE block, to configure the following parameters. |
|
Set Ymin to 0. |
The value of Ymin and Ymax should be set, depending on the range of the value, of the variable to be plotted.
Set the value of Ymin to 0. |
|
|
Since I have given step input as 2, to display the output on graph, I should change the Ymax to any higher value.
We will change it to 3. |
| Make a mental note of the default value of the refresh period.
| |
| We will keep the other parameters unchanged.
| |
| Changing the set up parameters | Now go to the Simulation in menu bar and click on Setup. |
| Pop up window. | A pop up window appears. |
| Point to Final integration time | We will change the value of Final integration time.
|
| Recall the value of refresh period of the CSCOPE block.
I will keep the value of Final integration time equal to the value of refresh period of CSCOPE block So, I will change it to 30. | |
| Keep the other parameters unchanged.
Click on OK. | |
| saving the Xcos file | Now press Control S to save the file, with a suitable file name.
|
| simulation | To start the simulation, click on the Start button, available on the menu bar of Xcos window. |
| A Graphic window will open, showing the step response of the first order transfer function. | |
|
Click on File >> Export to. |
We can save this plot as an image file.
|
| Name it firstorder.png | I will name it as firstorder.png and click on OK |
| There are certain parameters which we chose to keep as the default value.
For example In the Clock underscore c block, the period, which means the sampling period and initial time can be set. | |
| In the CSCOPE block, the output window number, position, size, buffer size , graph color etc can also be set. | |
| Slide | Pause the video here and solve the exercise given with the video. |
| Slide |
|
| Slide | Now let us summarize.
In this tutorial we have learnt to:
|
| Show slide |
|
| Show slide | The Spoken Tutorial Project Team
For more details, please write to contact at spoken hyphen tutorial dot org |
| Show slide | Spoken Tutorial Project is a part of the Talk to a Teacher project
|
| Hope you found this tutorial useful.
This is Rupak Rokade from IIT Bombay signing off.
|