|
|
Line 1: |
Line 1: |
− | | + | {| border=1 |
− | {| style="border-spacing:0;" | + | ! <center>Visual Cue </center> |
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Visual Cue'''
| + | ! <center>Narration</center> |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| <center>'''Narration'''</center>
| + | |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Introduction Slide''' | + | |Introduction Slide |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Welcome to the spoken tutorial on Xcos, Scilab Connected Object Simulator. ''' | + | |Welcome to the spoken tutorial on''' Xcos: Scilab Connected Object Simulator.''' |
| | | |
− | '''Xcos is a Scilab package for modeling and simulation of dynamical systems. '''
| |
| | | |
− | '''It includes both continuous and discrete systems.''' | + | '''Xcos''' is a '''Scilab package''' for modeling and simulation of dynamical systems. |
| | | |
− | |-
| |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Slide'''
| |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''In this tutorial you will learn'''
| |
| | | |
− | * '''What is XCOS.'''
| + | It includes both '''continuous''' and '''discrete''' systems. |
− | * '''What is palette.'''
| + | |
− | * '''Build block diagrams in Xcos'''
| + | |
− | * '''Setup the parameters of blocks.'''
| + | |
− | * '''Setup the simulation parameters.'''
| + | |
− | * '''Simulate the constructed block diagram.'''
| + | |
| | | |
| + | |- |
| + | |Slide |
| + | |In this tutorial you will learn |
| | | |
| + | * What is '''XCOS'''. |
| + | * What is '''palette'''. |
| + | * Build block diagrams in '''Xcos''' |
| + | * Setup the parameters of blocks. |
| + | * Setup the simulation parameters. |
| + | * Simulate the constructed block diagram. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Slide''' | + | | Slide |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''To practice this tutorial, Scilab should be installed on your system. ''' | + | | To practice this tutorial, Scilab should be installed on your system. |
| + | |
| | | |
− | '''I am using Ubuntu Linux 12.04 and Scilab version 5.3.3 for demonstration'''
| + | I am using Ubuntu Linux 12.04 and Scilab version 5.3.3 for demonstration. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Open Scilab''' | + | | Open Scilab |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Open the scilab console window on your computer'''
| + | | Open the '''Scilab console''' window on your computer. |
| | | |
− | '''Go to applications and select Xcos or type “xcos” in your scilab console window and press enter '''
| |
| | | |
| + | Go to applications and select '''Xcos''' |
| | | |
| + | OR |
| | | |
| + | Type “xcos” in your '''Scilab console''' window and press '''Enter''' |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Palette''' | + | |Palette |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''By doing this, two windows will open. ''' | + | |By doing this, two windows will open. |
| | | |
− | '''The two windows are'''
| |
| | | |
| + | The two windows are |
| # '''Palette browser''' and | | # '''Palette browser''' and |
− | # '''Untitled-Xcos''' '''window''' | + | # '''Untitled-Xcos''' window |
| | | |
− | '''In palette browser you will find different types of blocks'''
| |
| | | |
| + | In '''Palette browser''', you will find different types of blocks |
| * '''Commonly Used Blocks''' | | * '''Commonly Used Blocks''' |
| * '''Continuous time system blocks''' | | * '''Continuous time system blocks''' |
− | * '''Discrete time systems blocks and many more.''' | + | * '''Discrete time systems blocks''' |
| + | * and many more. |
| | | |
− | '''The other window, Untitled-Xcos is blank with grids'''
| + | |
| + | The other window, '''Untitled-Xcos''' is blank, with grids. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Collecting the blocks from different Pallete''' | + | |Collecting the blocks from different Pallete |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''We will now simulate a first order system with a step input.''' | + | |We will now simulate a '''first order system''' with a''' step input'''. |
| | | |
− | '''To begin I will select a transfer function block from the Continuous time systems palette.'''
| |
| | | |
− | '''Drag this block to the Untitled-Xcos window. ''' | + | To begin, I will select a '''transfer function block''' from the '''Continuous time systems palette'''. |
| | | |
− | '''Select the required source in the Sources palette. ''' | + | |- |
| + | |As per narration |
| + | |Drag this block to the '''Untitled-Xcos''' window. |
| | | |
− | '''I will scroll down and use the step function block''' | + | |- |
| + | |As per narration |
| + | |Select the required source in the '''Sources palette'''. |
| | | |
− | '''I will drag and place it before the transfer function block. '''
| |
| | | |
− | '''Similarly, the output is displayed using the CSCOPE block which is available in Sinks palette. ''' | + | I will scroll down and use the '''STEP FUNCTION block'''. |
| | | |
− | '''The CSCOPE block is placed after the transfer function block. ''' | + | |- |
| + | |As per narration |
| + | |I will drag and place it before the '''transfer function block.''' |
| | | |
− | '''The red input port in CSCOPE denotes that this block is an “event driven” block. ''' | + | |- |
| + | |As per narration |
| + | |Similarly, the output is displayed using the '''CSCOPE block''', which is available in '''Sinks palette.''' |
| | | |
− | '''It needs an event input for execution. '''
| |
| | | |
− | '''An event generator block is available in event handling palette. ''' | + | The '''CSCOPE block''' is placed after the '''transfer function block.''' |
| | | |
− | '''The name of this block is clock underscore c''' | + | |- |
| + | |Point to the red input port. |
| + | |The red input port in '''CSCOPE''' denotes that this block is an '''“event driven” block.''' |
| | | |
− | '''Drag and place this block above the CSCOPE block. ''' | + | |- |
| + | |As per narration |
| + | |It needs an '''event''' input for execution. |
| | | |
− | '''We have collected all the required blocks to do the simulation.'''
| |
| | | |
− | '''Let us now connect the blocks together''' | + | An '''event generator block''' is available in the '''Event handling palette.''' |
| | | |
− | '''Select the output port of step function block and connect it to the input port of the transfer function block. '''
| |
| | | |
− | '''Notice that the selected input port gets highlighted in green colour.''' | + | The name of this block is '''Clock underscore c'''. |
| | | |
− | '''Similarly, connect the remaining blocks as shown'''
| + | |- |
| + | |As per narration |
| + | |Drag and place this block above the CSCOPE block. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Changing the parameter of step block''' | + | | |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Now we will set the parameters of each block. '''
| + | |We have collected all the required blocks to do the simulation. |
| | | |
− | '''First, go to the step block and double click on it. '''
| + | |- |
| + | |Connect as per narration |
| + | |Let us now connect the blocks together. |
| | | |
− | '''A pop up window appears asking for the value of step time, initial value and final value'''
| |
| | | |
− | '''Step time is the time at which the step change will occur''' | + | Select the '''output port''' of '''step function block''' and connect it to the '''input port''' of the '''transfer function block.''' |
| | | |
− | '''We will keep it as 1 which is the default value''' | + | |- |
| + | |Point to the green input port. |
| + | |Notice that the selected '''input port''' gets highlighted in green colour. |
| | | |
− | '''Initial value is the initial output value of the step function '''
| + | |- |
| + | |As per narration |
| + | |Similarly, connect the remaining blocks as shown. |
| | | |
− | '''We will keep it as 0 which is the default value'''
| + | |- |
| + | |Changing the parameter of step block |
| + | |Now we will set the parameters of each block. |
| | | |
− | '''Final value is the output of the step function after the step time is lapsed''' | + | |- |
| + | |Double-click on step block |
| + | |First, go to the '''step block''' and double-click on it. |
| | | |
− | '''We will change it to 2''' | + | |- |
− | | + | |Point the options in the Pop-up window |
− | '''Click on OK.''' | + | |A pop up window appears, asking for the value of '''Step Time, Initial Value''' and '''Final Value'''. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Changing the parameter of Transfer function block''' | + | |Point to Step Time |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Follow the similar procedure to configure any other block.'''
| + | |'''Step Time''' is the time at which the '''step change''' will occur. |
| | | |
− | '''For transfer function block, the following configuration is required.'''
| |
| | | |
− | '''Numerator value in laplace domain has to be entered. '''
| + | We will keep it as 1, which is the default value. |
| | | |
− | '''We will keep it as 1 which is the default value''' | + | |- |
− | | + | | |
− | '''Denominator value in laplace domain has to entered. ''' | + | |'''Initial Value''' is the initial output value of the '''step function'''. |
| | | |
− | '''We will change it to 2 asteric s plus 1'''
| |
| | | |
− | '''Click on OK.'''
| + | We will keep it as 0, which is the default value. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Changing the parameter of scope''' | + | | |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Double click on CSCOPE to configure for the following parameters'''
| + | |'''Final Value''' is the output of the '''step function''', after the '''Step Time''' is lapsed. |
| | | |
− | '''The value of y min and y max should be set depending on the range of the value of the variable to be plotted'''
| + | We will change it to 2. |
| | | |
− | '''Set the value of Ymin to 0''' | + | Click on '''OK'''. |
| | | |
− | '''Since I have given step input as 2, to display the output on graph I should change the y max to any higher value.'''
| + | |- |
| + | |Changing the parameter of Transfer function block |
| + | |Follow the similar procedure to configure any other block. |
| | | |
− | '''We will change it to 3.''' | + | |- |
| + | |As per narration |
| + | |For '''transfer function block,''' the following configuration is required. |
| | | |
− | '''Make a mental note of the default value of the refresh period'''
| |
| | | |
− | '''The default vlaue is 30''' | + | '''Numerator''' value in''' laplace domain''' has to be entered. |
| | | |
− | '''We will keep the other parameters unchanged'''
| |
| | | |
− | '''Click on OK'''
| + | We will keep it as 1, which is the default value. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Changing the set up parameters''' | + | |As per narration |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Now go to the simulation in menu bar and click on setup. '''
| + | |'''Denominator''' value in '''laplace domain''' has to entered. |
| | | |
− | '''A pop up window appears.''' | + | We will change it to '''2 asteric s plus 1'''. |
| | | |
− | '''We will change the value of final integration time''' | + | Click on '''OK'''. |
| | | |
− | '''Final integration time decides how long the simulation will run''' | + | |- |
| + | |Changing the parameter of scope |
| + | |Double click on '''CSCOPE block,''' to configure the following parameters. |
| | | |
− | '''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''' | + | 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. |
| | | |
− | '''So, I will change it to 30.''' | + | Set the value of '''Ymin''' to 0. |
| | | |
− | '''Keep the other parameters unchanged.'''
| + | |- |
| + | | |
| | | |
− | '''Click on OK.'''
| |
| | | |
− | |-
| + | Set Ymax to 3. |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''saving the Xcos file''' | + | |Since I have given '''step input''' as 2, to display the output on graph, I should change the '''Ymax''' to any higher value. |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Now press control s to save the file with a suitable file name.'''
| + | |
| | | |
− | '''I will save it as firstorder.xcos'''
| + | We will change it to 3. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''simulation''' | + | | |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''To start the simulation, click on the start button available on the menu bar of xcos window'''
| + | |Make a mental note of the default value of the '''refresh period'''. |
| | | |
− | '''A Graphic window will open showing the step response of the first order transfer function '''
| |
| | | |
− | '''We can save this plot as an image file'''
| + | The default value is 30. |
| | | |
− | '''To save the graph, go to the file menu and click on “Export to” option '''
| + | |- |
| + | | |
| + | |We will keep the other parameters unchanged. |
| | | |
− | '''I will name it as firstorder.png and click on Ok'''
| |
| | | |
− | '''There are certain parameters which we chose to keep as the default value.''' | + | Click on '''OK'''. |
| | | |
− | '''These can be changed. For example ''' | + | |- |
| + | |Changing the set up parameters |
| + | |Now go to the '''Simulation''' in menu bar and click on '''Setup'''. |
| | | |
− | '''In the Clock_c block, the period which means the sampling period and initial time can be set'''
| + | |- |
− | | + | |Pop up window. |
− | '''In the CSCOPE block, the output window number, position, size, buffer size , graph color etc can also be set'''
| + | |A pop up window appears. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Slide''' | + | |Point to Final integration time |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Pause the video here and solve the exercise given with the video.'''
| + | |We will change the value of '''Final integration time'''. |
− | | + | |
| | | |
| | | |
| + | '''Final integration time''' decides how long the simulation will run. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Slide''' | + | | |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Simulate a second order transfer function with damping ratio of 0.5 and angular frequency equal to 1. '''
| + | |Recall the value of '''refresh period''' of the''' CSCOPE block.''' |
| | | |
− | '''Try changing the color of output graph. ''' | + | I will keep the value of '''Final integration time''' equal to the value of '''refresh period''' of '''CSCOPE block''' |
| | | |
− | '''Using the first exercise, plot the Step input and the output in a single plot window.'''
| + | So, I will change it to 30. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Slide''' | + | | |
− | | style="background-color:#ffffff;border-top:0.05pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Now let us summarize.''' | + | |Keep the other parameters unchanged. |
| | | |
− | '''In this tutorial we have learnt to:''' | + | Click on '''OK'''. |
| | | |
− | '''Create xcos simulation diagrams using the palette browser''' | + | |- |
| + | |saving the Xcos file |
| + | |Now press '''Control S''' to save the file, with a suitable file name. |
| | | |
− | '''Configure each block as per the simulation requirements'''
| |
| | | |
− | '''Setup the simulation parameters''' | + | I will save it as '''firstorder.xcos''' |
| | | |
− | '''Save the output plot.''' | + | |- |
| + | |simulation |
| + | |To start the simulation, click on the '''Start''' button, available on the menu bar of '''Xcos''' window. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| <center>'''Show slide'''</center> | + | | |
| + | |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. |
| | | |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Watch the video available at the following link '''
| |
| | | |
− | * '''It summarizes the Spoken Tutorial project '''
| + | To save the graph, go to the '''File''' menu and click on '''“Export to”''' option. |
− | | + | |
− | * '''If you do not have good bandwidth, you can download and watch it '''
| + | |
| | | |
| | | |
| + | |- |
| + | |Name it firstorder.png |
| + | |I will name it as firstorder.png and click on '''OK''' |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| <center>'''Show slide '''</center> | + | | |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''The Spoken Tutorial Project Team ''' | + | |There are certain parameters which we chose to keep as the default value. |
| | | |
− | * '''Conducts workshops using spoken tutorials '''
| |
| | | |
− | * '''Gives certificates for those who pass an online test '''
| + | These can be changed. |
| | | |
− | * '''For more details, please write to contact at spoken hyphen tutorial dot org '''
| + | 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. |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| <center>'''Show slide'''</center> | + | |Slide |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Spoken Tutorial Project is a part of the Talk to a Teacher project ''' | + | |Pause the video here and solve the exercise given with the video. |
| | | |
− | * '''It is supported by the National Mission on Education through ICT, MHRD, Government of India '''
| + | |- |
| + | |Slide |
| + | | |
| + | #Simulate a '''second order transfer function''' with '''damping ratio''' of 0.5 and '''angular frequency''' equal to 1. |
| + | #Try changing the color of output graph. |
| + | #Using the first exercise, plot the '''Step input''' and the '''output''' in a single plot window. |
| | | |
− | * '''More information on this Mission is available at '''
| + | |- |
| + | |Slide |
| + | |Now let us summarize. |
| | | |
− | * '''spoken hyphen tutorial dot org slash NMEICT hyphen Intro '''
| + | In this tutorial we have learnt to: |
| | | |
| + | *Create '''Xcos simulation''' diagrams using the '''palette browser''' |
| + | *Configure each block as per the simulation requirements |
| + | *Setup the simulation parameters |
| + | *Save the output plot. |
| + | |
| + | |- |
| + | | Show slide |
| + | | |
| + | *Watch the video available at the following link |
| + | * It summarizes the Spoken Tutorial project |
| + | * If you do not have good bandwidth, you can download and watch it |
| + | |
| + | |- |
| + | | Show slide |
| + | | The Spoken Tutorial Project Team |
| + | * Conducts workshops using spoken tutorials |
| + | * Gives certificates for those who pass an online test |
| + | |
| + | 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 |
| | | |
| + | * It is supported by the National Mission on Education through ICT, MHRD, Government of India |
| + | * More information on this Mission is available at spoken hyphen tutorial dot org slash NMEICT hyphen Intro |
| | | |
| |- | | |- |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:0.05pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"|
| + | | |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.095cm;padding-right:0.095cm;"| '''Hope you found this tutorial useful. ''' | + | | Hope you found this tutorial useful. |
| | | |
− | '''This is Rupak Rokade from IIT Bombay signing off. '''
| + | This is Rupak Rokade from IIT Bombay signing off. |
| | | |
| | | |
− | '''Thank You.'''
| + | Thank You. |
| | | |
| |} | | |} |
Visual Cue
|
Narration
|
Introduction Slide
|
Welcome to the spoken tutorial on Xcos: Scilab Connected Object Simulator.
Xcos is a Scilab package for modeling and simulation of dynamical systems.
It includes both continuous and discrete systems.
|
Slide
|
In this tutorial you will learn
- What is XCOS.
- What is palette.
- Build block diagrams in Xcos
- Setup the parameters of blocks.
- Setup the simulation parameters.
- Simulate the constructed block diagram.
|
Slide
|
To practice this tutorial, Scilab should be installed on your system.
I am using Ubuntu Linux 12.04 and Scilab version 5.3.3 for demonstration.
|
Open Scilab
|
Open the Scilab console window on your computer.
Go to applications and select Xcos
OR
Type “xcos” in your Scilab console window and press Enter
|
Palette
|
By doing this, two windows will open.
The two windows are
- Palette browser and
- Untitled-Xcos window
In Palette browser, you will find different types of blocks
- Commonly Used Blocks
- Continuous time system blocks
- Discrete time systems blocks
- and many more.
The other window, Untitled-Xcos is blank, with grids.
|
Collecting the blocks from different Pallete
|
We will now simulate a first order system with a step input.
To begin, I will select a transfer function block from the Continuous time systems palette.
|
As per narration
|
Drag this block to the Untitled-Xcos window.
|
As per narration
|
Select the required source in the Sources palette.
I will scroll down and use the STEP FUNCTION block.
|
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.
The CSCOPE block is placed after the transfer function block.
|
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.
An event generator block is available in the Event handling palette.
The name of this block is Clock underscore c.
|
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.
Select the output port of step function block and connect it to the input port of the transfer function block.
|
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.
We will keep it as 1, which is the default value.
|
|
Initial Value is the initial output value of the step function.
We will keep it as 0, which is the default value.
|
|
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.
Numerator value in laplace domain has to be entered.
We will keep it as 1, which is the default value.
|
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.
|
Set Ymax to 3.
|
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.
The default value is 30.
|
|
We will keep the other parameters unchanged.
Click on OK.
|
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.
Final integration time decides how long the simulation will run.
|
|
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.
I will save it as firstorder.xcos
|
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.
To save the graph, go to the File menu and click on “Export to” option.
|
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.
These can be changed.
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
|
- Simulate a second order transfer function with damping ratio of 0.5 and angular frequency equal to 1.
- Try changing the color of output graph.
- Using the first exercise, plot the Step input and the output in a single plot window.
|
Slide
|
Now let us summarize.
In this tutorial we have learnt to:
- Create Xcos simulation diagrams using the palette browser
- Configure each block as per the simulation requirements
- Setup the simulation parameters
- Save the output plot.
|
Show slide
|
- Watch the video available at the following link
- It summarizes the Spoken Tutorial project
- If you do not have good bandwidth, you can download and watch it
|
Show slide
|
The Spoken Tutorial Project Team
- Conducts workshops using spoken tutorials
- Gives certificates for those who pass an online test
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
- It is supported by the National Mission on Education through ICT, MHRD, Government of India
- More information on this Mission is available at spoken hyphen tutorial dot org slash NMEICT hyphen Intro
|
|
Hope you found this tutorial useful.
This is Rupak Rokade from IIT Bombay signing off.
Thank You.
|