Difference between revisions of "Scilab/C4/Simulating-a-PID-controller-using-XCOS/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "'''Title of script''': <span style="color:#000000;">'''Simulating a PID controller using Xcos'''</span> '''Author: Rupak Rokade''' '''Keywords: Xcos, PID, Simulation, Closed...")
 
 
Line 1: Line 1:
'''Title of script''': <span style="color:#000000;">'''Simulating a PID controller using Xcos'''</span>
+
 
 +
'''Title of script''': '''Simulating a PID controller using Xcos'''
  
 
'''Author: Rupak Rokade'''
 
'''Author: Rupak Rokade'''
Line 12: Line 13:
 
| align=center style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | '''Narration'''
 
| align=center style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | '''Narration'''
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | Show Slide
+
| style="border:1pt solid #000001;padding:0.176cm;" | Show Slide
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Welcome to the spoken tutorial on </span><span style="color:#000000;">'''Simulating a PID controller using Xcos.'''</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Welcome to the spoken tutorial on '''Simulating a PID controller using Xcos.'''
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | Show Slide
+
| style="border:1pt solid #000001;padding:0.176cm;" | Show Slide
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">In this tutorial we will learn </span>h<span style="color:#000000;">ow to </span>i<span style="color:#000000;">mplement a </span><span style="color:#000000;">'''PID controller '''</span><span style="color:#000000;">in </span><span style="color:#000000;">'''Xcos'''</span><span style="color:#000000;">.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | In this tutorial we will learn how to implement a '''PID controller '''in '''Xcos'''.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | Show Slide
+
| style="border:1pt solid #000001;padding:0.176cm;" | Show Slide
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Ensure that </span><span style="color:#000000;">'''Scilab'''</span><span style="color:#000000;"> is installed on your computer.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Ensure that '''Scilab''' is installed on your computer.
  
  
<span style="color:#000000;">I am recording this tutorial on </span><span style="color:#000000;">This is just a declaration. The tutorial output will not change.</span><span style="color:#000000;">In the tutorial "Xcos introduction", these are not same.</span><span style="color:#000000;">'''Ubuntu 16.04 64-bit O</span>perating System<span style="color:#000000;"> '''</span><span style="color:#000000;">and using </span><span style="color:#000000;">'''Scilab </span>6.0.0'''
+
I am recording this tutorial on '''Ubuntu 16.04 64-bit Operating System '''and using '''Scilab 6.0.0'''
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | Show Slide
+
| style="border:1pt solid #000001;padding:0.176cm;" | Show Slide
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">As a pre-requisite, watch the tutorial </span>'''Xcos Introduction.'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | As a pre-requisite, watch the tutorial '''Xcos Introduction.'''
  
  
<span style="color:#000000;">This tutorial will make you comfortable with the </span><span style="color:#000000;">'''Xcos'''</span><span style="color:#000000;"> environment.</span>
+
This tutorial will make you comfortable with the '''Xcos''' environment.
  
  
<span style="color:#000000;">Also, we will use the </span><span style="color:#000000;">'''firstorder.xcos'''</span><span style="color:#000000;"> file created in that tutorial. </span>
+
Also, we will use the '''firstorder.xcos''' file created in that tutorial.  
  
  
<span style="color:#000000;">Hence, it is important that you practice the tutorial before continuing </span>so that<span style="color:#000000;"> you have the file with you.</span>
+
Hence, it is important that you practice the tutorial before continuing so that you have the file with you.
  
  
<span style="color:#000000;">Some basic knowledge of </span><span style="color:#000000;">'''PID controller'''</span><span style="color:#000000;"> is necessary.</span>
+
Some basic knowledge of '''PID controller''' is necessary.
  
  
<div style="color:#000000;">Assuming that you have satisfied the pre-requisites, let us begin with the tutorial.</div>
+
Assuming that you have satisfied the pre-requisites, let us begin with the tutorial.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Launch Scilab
+
| style="border:1pt solid #000001;padding:0.176cm;" | Launch Scilab
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | First of all, we will launch '''Scilab.'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | First of all, we will launch '''Scilab.'''
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Applications >> Xcos
+
| style="border:1pt solid #000001;padding:0.176cm;" | Applications >> Xcos
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Then g<span style="color:#000000;">o to </span>'''A<span style="color:#000000;">pplications '''</span><span style="color:#000000;">and select </span><span style="color:#000000;">'''Xcos'''</span>.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Then go to '''Applications '''and select '''Xcos'''.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Or in your '''Scilab console''' window, type '''Xcos '''and press '''Enter'''.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Or in your '''Scilab console''' window, type '''Xcos '''and press '''Enter'''.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">This is just a narration</span>Point to # <div style="margin-left:1.247cm;margin-right:0cm;">'''Palette Browser''' and </div>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Point to  
# <div style="margin-left:1.247cm;margin-right:0cm;">'''An Untitled-Xcos''' window </div>
+
# '''Palette Browser''' and  
 +
# '''An Untitled-Xcos''' window  
  
  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <div style="color:#000000;">By doing this, two windows will open.</div>
+
| style="border:1pt solid #000001;padding:0.176cm;" | By doing this, two windows will open.
 
+
 
+
# <div style="margin-left:1.247cm;margin-right:0cm;"><span style="color:#000000;">'''Palette Browser'''</span><span style="color:#000000;"> and </span></div>
+
# <div style="margin-left:1.247cm;margin-right:0cm;"><span style="color:#000000;">'''An Untitled-Xcos'''</span><span style="color:#000000;"> window </span></div>
+
  
 +
# '''Palette Browser''' and
 +
# '''An Untitled-Xcos''' window
  
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | '''Untitled-Xcos''' window>> click on '''File''' >> '''Open'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | '''Untitled-Xcos''' window>> click on '''File''' >> '''Open'''
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">On the </span><span style="color:#000000;">'''Untitled-Xcos'''</span><span style="color:#000000;"> window, click on </span><span style="color:#000000;">'''File'''</span><span style="color:#000000;"> and then click on </span><span style="color:#000000;">'''Open.'''</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | On the '''Untitled-Xcos''' window, click on '''File''' and then click on '''Open.'''
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Go to the saved folder>> click on the file >> OK
+
| style="border:1pt solid #000001;padding:0.176cm;" | Go to the saved folder>> click on the file >> OK
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Browse to the directory where the file </span><span style="color:#000000;">'''firstorder.xcos'''</span><span style="color:#000000;"> is saved. Choose th</span>at <span style="color:#000000;">file and click on </span><span style="color:#000000;">'''Ok'''</span><span style="color:#000000;">.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Browse to the directory where the file '''firstorder.xcos''' is saved. Choose that file and click on '''Ok'''.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Double-click '''transfer function block'''.  
+
| style="border:1pt solid #000001;padding:0.176cm;" | Double-click '''transfer function block'''.  
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Double-click on the '''transfer function block'''.  
+
| style="border:1pt solid #000001;padding:0.176cm;" | Double-click on the '''transfer function block'''.  
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Highlight the '''transfer function''' parameters
+
| style="border:1pt solid #000001;padding:0.176cm;" | Highlight the '''transfer function''' parameters
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Check that you are using the same </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> as I am using.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Check that you are using the same '''transfer function''' as I am using.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | For me, the numerator is 1 and denominator is '''2 asteric s plus 1'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | For me, the numerator is 1 and denominator is '''2 asteric s plus 1'''
  
Which is 2 multiplied by s plus one
+
Which is 2 multiplied by s plus one.
 +
 
 +
Click on '''Ok'''.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Highlight the '''step input''' parameters
+
| style="border:1pt solid #000001;padding:0.176cm;" | Highlight the '''step input''' parameters
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Double</span>-<span style="color:#000000;">click on the </span><span style="color:#000000;">'''Step block'''</span><span style="color:#000000;">. </span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Double-click on the '''Step block'''.  
  
<span style="color:#000000;">Check that you are using the same </span><span style="color:#000000;">'''step input'''</span><span style="color:#000000;"> parameters as I am using.</span>
+
Check that you are using the same '''step input''' parameters as I am using.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">For me the </span><span style="color:#000000;">'''Step time'''</span><span style="color:#000000;"> is 1, </span><span style="color:#000000;">'''Initial value'''</span><span style="color:#000000;"> is 0 and </span><span style="color:#000000;">'''Final value'''</span><span style="color:#000000;"> is 2.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | For me the '''Step time''' is 1, the '''Initial value''' is 0 and the '''Final value''' is 2.
  
Click on OK
+
Click on '''OK'''
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | '''Simulation''' tab >> choose '''Start'''  
+
| style="border:1pt solid #000001;padding:0.176cm;" | '''Simulation''' tab >> choose '''Start'''  
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Click on </span><span style="color:#000000;">'''Simulation'''</span><span style="color:#000000;"> tab and choose </span><span style="color:#000000;">'''Start'''</span><span style="color:#000000;"> to simulate the file. </span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on '''Simulation''' on the menu bar and choose '''Start''' to simulate the file.  
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | Expect a similar plot which ensures that the file has no mistakes.
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | Expect a similar plot which ensures that the file has no mistakes.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Switch to the '''Palette Browser.'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | Switch to the '''Palette Browser.'''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Switch to the </span><span style="color:#000000;">'''Palette Browser.'''</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Switch to the '''Palette Browser.'''
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Click on '''Continuous time systems '''>> drag-drop '''PID block '''inside '''Xcos'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on '''Continuous time systems '''>> drag-drop '''PID block '''inside '''Xcos'''
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Click on </span><span style="color:#000000;">'''Continuous time systems'''</span><span style="color:#000000;"> category. </span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on '''Continuous time systems''' category.  
  
  
<span style="color:#000000;">Drag and drop the </span><span style="color:#000000;">'''PID'''</span><span style="color:#000000;"> block</span>, which is here, <span style="color:#000000;">inside the </span><span style="color:#000000;">'''Xcos'''</span><span style="color:#000000;"> window</span>
+
Drag and drop the '''PID''' block, which is here, inside the '''Xcos''' window
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Click on '''Signal Routing >> '''drag-drop '''Mux''' block''' '''inside '''Xcos'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on '''Signal Routing >> '''drag-drop '''Mux''' block''' '''inside '''Xcos'''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Click on the </span><span style="color:#000000;">'''Signal Routing'''</span><span style="color:#000000;"> category. </span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on the '''Signal Routing''' category.  
  
  
<span style="color:#000000;">Drag and drop the </span><span style="color:#000000;">'''Mux'''</span><span style="color:#000000;"> block</span>, which is here,<span style="color:#000000;"> inside the </span><span style="color:#000000;">'''Xcos'''</span><span style="color:#000000;"> window</span>
+
Drag and drop the '''Mux''' block, which is here, inside the '''Xcos''' window.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Click on '''Mathematical Operations >> '''drag-drop '''Summation''' block''' '''inside '''Xcos'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on '''Mathematical Operations >> '''drag-drop '''Summation''' block''' '''inside '''Xcos'''
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Click on </span><span style="color:#000000;">'''Mathematical Operations'''</span><span style="color:#000000;"> category. </span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on '''Mathematical Operations''' category.  
 
+
 
+
<span style="color:#000000;">Drag and drop the </span><span style="color:#000000;">'''Summation'''</span><span style="color:#000000;"> block</span>, which is here,<span style="color:#000000;"> inside the </span><span style="color:#000000;">'''Xcos'''</span><span style="color:#000000;"> window.</span>
+
  
  
 +
Drag and drop the '''Summation''' block, which is here, inside the '''Xcos''' window.
  
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Note that this block, by default, subtracts the second input from the first input.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Note that this block, by default, subtracts the second input from the first input.
  
  
 
We will use this default configuration of the '''summation''' block.
 
We will use this default configuration of the '''summation''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Click on the line joining the '''step input''' block + '''transfer function''' block >> press '''Delete'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on the line joining the '''step input''' block + '''transfer function''' block >> press '''Delete'''
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Click on the line joining the </span><span style="color:#000000;">'''step input'''</span><span style="color:#000000;"> block and </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on the line joining the '''step input''' block and '''transfer function''' block.
  
  
Then <span style="color:#000000;">press the </span>'''D<span style="color:#000000;">elete'''</span><span style="color:#000000;"> button to delete it.</span>
+
Then press the '''Delete''' button to delete it.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Drag away
+
| style="border:1pt solid #000001;padding:0.176cm;" | Drag away
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Drag the </span><span style="color:#000000;">'''step input'''</span><span style="color:#000000;"> block away from the </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Drag the '''step input''' block away from the '''transfer function''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Click on the line joining the '''transfer function''' block and the '''cscope''' block >> press '''Delete '''
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on the line joining the '''transfer function''' block and the '''cscope''' block >> press '''Delete '''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Click on the line joining the </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block and the </span><span style="color:#000000;">'''cscope'''</span><span style="color:#000000;"> block.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on the line joining the '''transfer function''' block and the '''cscope''' block.
  
  
Then <span style="color:#000000;">press the </span>'''D<span style="color:#000000;">elete '''</span><span style="color:#000000;">button to delete it.</span>
+
Then press the '''Delete '''button to delete it.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Drag away
+
| style="border:1pt solid #000001;padding:0.176cm;" | Drag away
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Drag the </span><span style="color:#000000;">'''cscope'''</span><span style="color:#000000;"> and </span><span style="color:#000000;">'''clock input'''</span><span style="color:#000000;"> block away from the </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Drag the '''cscope''' and '''clock input''' block away from the '''transfer function''' block
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Place the </span><span style="color:#000000;">'''PID'''</span><span style="color:#000000;"> block before the </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Place the '''PID''' block before the '''transfer function''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Place the </span><span style="color:#000000;">'''summation'''</span><span style="color:#000000;"> block before the </span><span style="color:#000000;">'''PID'''</span><span style="color:#000000;"> block.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Place the '''summation''' block before the '''PID''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Place the </span><span style="color:#000000;">'''Mux'''</span><span style="color:#000000;"> block between the </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block and </span><span style="color:#000000;">'''cscope'''</span><span style="color:#000000;"> block.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Place the '''Mux''' block between the '''transfer function''' block and '''cscope''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | Adjust the blocks, if required, so that they all come in a line.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Adjust the blocks, if required, so that they all come in a line.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Connect the </span><span style="color:#000000;">'''step input'''</span><span style="color:#000000;"> block to the</span><span style="color:#000000;">Added new statement for clarification</span><span style="color:#000000;">It refers to '+' terminal of summation block. We might need to mention this.</span><span style="color:#000000;"> first </span><span style="color:#000000;">'''input port'''</span><span style="color:#000000;"> </span><span style="color:#000000;">of the </span><span style="color:#000000;">'''summation'''</span><span style="color:#000000;"> block.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Connect the '''step input''' block to the first '''input port''' of the '''summation''' block.
  
Note that this is the positive '''input port''' of the '''summation''' block
+
Note that this is the positive '''input port''' of the '''summation''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Connect the </span><span style="color:#000000;">'''output port'''</span><span style="color:#000000;"> of </span><span style="color:#000000;">'''summation'''</span><span style="color:#000000;"> block to the </span><span style="color:#000000;">'''input port'''</span><span style="color:#000000;"> of </span><span style="color:#000000;">'''PID'''</span><span style="color:#000000;"> block</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Connect the '''output port''' of '''summation''' block to the '''input port''' of '''PID''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Connect the </span><span style="color:#000000;">'''output port'''</span><span style="color:#000000;"> of </span><span style="color:#000000;">'''PID'''</span><span style="color:#000000;"> block to the </span><span style="color:#000000;">'''input port'''</span><span style="color:#000000;"> of </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Connect the '''output port''' of '''PID''' block to the '''input port''' of '''transfer function''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Connect the </span><span style="color:#000000;">'''output port'''</span><span style="color:#000000;"> of </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block to the lower </span><span style="color:#000000;">'''input port'''</span><span style="color:#000000;"> of </span><span style="color:#000000;">'''Mux'''</span><span style="color:#000000;"> block</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Connect the '''output port''' of '''transfer function''' block to the lower '''input port''' of '''Mux''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Connect the </span><span style="color:#000000;">'''output port'''</span><span style="color:#000000;"> of </span><span style="color:#000000;">'''Mux'''</span><span style="color:#000000;"> block to the</span><span style="color:#000000;">''' input port'''</span><span style="color:#000000;"> of the </span><span style="color:#000000;">'''cscope'''</span><span style="color:#000000;"> block</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Connect the '''output port''' of '''Mux''' block to the''' input port''' of the '''cscope''' block.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Locate the line <span style="color:#000000;">connecting the </span><span style="color:#000000;">'''step input'''</span><span style="color:#000000;"> block and the </span><span style="color:#000000;">'''summation'''</span><span style="color:#000000;"> block</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Locate the line connecting the '''step input''' block and the '''summation''' block.
  
  
Connect the '''input'''<span style="color:#000000;">Corrected</span><span style="color:#000000;">It should be input port of Mux.</span>''' port '''of '''Mux''' to that line.
+
Connect the '''input''' port of '''Mux''' to that line.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |  
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | Use the left mouse click to create line bends while making the connection.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Use the left mouse click to create line bends while making the connection.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Locate <span style="color:#000000;">the line joining the </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block and the </span><span style="color:#000000;">'''Mux'''</span><span style="color:#000000;"> block.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Locate the line joining the '''transfer function''' block and the '''Mux''' block.
  
  
Connect the second '''input port''' of '''summation''' block to that line.
+
Connect the second '''input port''' of the '''summation''' block to that line.
  
Use line bends wherever necessary
+
Use line bends wherever necessary.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Do as narrated
+
| style="border:1pt solid #000001;padding:0.176cm;" | Do as narrated
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Double-click on the '''PID''' block to open its parameter setting dialog box.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Double-click on the '''PID''' block to open its parameter setting dialog box.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Point to the respective gains.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Point to the respective gains.
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">Here you can set the </span><span style="color:#000000;">'''Proportional, Integral '''</span><span style="color:#000000;">and</span><span style="color:#000000;">''' Derivative'''</span><span style="color:#000000;"> gains.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Here you can set the '''Proportional, Integral '''and''' Derivative''' gains.
  
  
<span style="color:#000000;">Please note that the </span><span style="color:#000000;">'''Integral gain'''</span><span style="color:#000000;"> should be considered as 1 by </span><span style="color:#000000;">'''tau'''</span><span style="color:#000000;"> I, where </span><span style="color:#000000;">'''tau'''</span><span style="color:#000000;"> I is the </span><span style="color:#000000;">'''integral time'''</span><span style="color:#000000;">.</span>
+
Please note that the '''Integral gain''' should be considered as 1 by '''tau I''', where '''tau I''' is the '''integral time'''.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |  
  
  
  
 
Click on '''Cancel'''  
 
Click on '''Cancel'''  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | We will use the default settings.
+
| style="border:1pt solid #000001;padding:0.176cm;" | We will use the default settings.
  
  
<span style="color:#000000;">Click on </span><span style="color:#000000;">'''Cancel'''</span><span style="color:#000000;"> to use the default settings.</span>
+
Click on '''Cancel''' to use the default settings.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | We are now ready to run the simulation.
+
| style="border:1pt solid #000001;padding:0.176cm;" | We are now ready to run the simulation.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Highlight '''step input '''block
+
| style="border:1pt solid #000001;padding:0.176cm;" | Highlight '''step input '''block
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Notice that we are using the '''step input''' block as a '''setpoint''' variable.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Notice that we are using the '''step input''' block as a '''setpoint''' variable.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Highlight '''PID controller'''
+
| style="border:1pt solid #000001;padding:0.176cm;" | Highlight '''PID controller'''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">The </span><span style="color:#000000;">'''PID controller '''</span><span style="color:#000000;">will</span> generate an input to the '''Transfer Function''' block<span style="color:#000000;">.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | The '''PID controller '''will generate an input to the '''Transfer Function''' block.
  
  
It will be<span style="color:#000000;"> such that the output of the </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> block matches the </span><span style="color:#000000;">'''setpoint.'''</span>
+
It will be such that the output of the '''transfer function''' block matches the '''setpoint.'''
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Click on '''Start simulation''' button  
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on '''Start simulation''' button  
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Click on the '''Start simulation''' button available on the menu bar.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Click on the '''Start simulation''' button available on the menu bar.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Plot window
+
| style="border:1pt solid #000001;padding:0.176cm;" | Plot window
  
  
Line 233: Line 233:
  
 
Highlight transfer function
 
Highlight transfer function
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <div style="color:#000000;">Expect a graphic window to open.</div>
+
| style="border:1pt solid #000001;padding:0.176cm;" | Expect a graphic window to open.
  
<div style="color:#000000;">It will have two variables plotted in a single plot.</div>
+
It will have two variables plotted in a single plot.
  
  
<span style="color:#000000;">The step plot is the </span><span style="color:#000000;">'''setpoint'''</span><span style="color:#000000;"> which has a final value of 2.</span>
+
The step plot is the '''setpoint''' which has a final value of 2.
  
  
<span style="color:#000000;">The curved plot which i</span>s green in color, <span style="color:#000000;">is the output of the </span><span style="color:#000000;">'''transfer function'''</span><span style="color:#000000;"> which tries to meet the </span><span style="color:#000000;">'''setpoint'''</span><span style="color:#000000;"> value of 2.</span>
+
The curved plot which is green in color, is the output of the '''transfer function''' which tries to meet the '''setpoint''' value of 2.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |  
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">You can now change the </span><span style="color:#000000;">'''PID'''</span><span style="color:#000000;"> settings and learn how they affect the output.</span>
+
| style="border:1pt solid #000001;padding:0.176cm;" | You can now change the '''PID''' settings and learn how they affect the output.
  
 
Pause the video here and solve the given exercises.
 
Pause the video here and solve the given exercises.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Exercise slide
+
| style="border:1pt solid #000001;padding:0.176cm;" | Exercise slide
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Implement a '''Proportional Controller''' only
+
| style="border:1pt solid #000001;padding:0.176cm;" | Implement a '''Proportional Controller''' only
  
 
That is, only '''P''' and not '''PID'''
 
That is, only '''P''' and not '''PID'''
Line 255: Line 255:
 
Change the proportional gain such that the setpoint matches the output but without overshoots.
 
Change the proportional gain such that the setpoint matches the output but without overshoots.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Exercise slide
+
| style="border:1pt solid #000001;padding:0.176cm;" | Exercise slide
  
  
  
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Include the output of the '''summation''' block in the plot.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Include the output of the '''summation''' block in the plot.
  
 
You may use '''CMSCOPE''' to keep it separate.  
 
You may use '''CMSCOPE''' to keep it separate.  
Line 265: Line 265:
 
Compare it visually with the output of the '''PID''' block
 
Compare it visually with the output of the '''PID''' block
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |  
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | This brings us to the end of this tutorial.
+
| style="border:1pt solid #000001;padding:0.176cm;" | This brings us to the end of this tutorial.
  
 
Let us summarize.
 
Let us summarize.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Summary slide
+
| style="border:1pt solid #000001;padding:0.176cm;" | Summary slide
| style="background-color:#ffffff;border:1pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | <span style="color:#000000;">In this tutorial we learnt</span>-# <div style="margin-left:1.27cm;margin-right:0cm;">To m<span style="color:#000000;">odify the </span><span style="color:#000000;">'''firstorder.xcos'''</span><span style="color:#000000;"> file to implement a </span><span style="color:#000000;">'''PID'''</span><span style="color:#000000;"> controller</span></div>
+
| style="border:1pt solid #000001;padding:0.176cm;" | In this tutorial we learnt
# <div style="color:#000000;margin-left:1.27cm;margin-right:0cm;">Configure each block as per the simulation requirements</div>
+
# To modify the '''firstorder.xcos''' file to implement a '''PID''' controller
# <div style="color:#000000;margin-left:1.27cm;margin-right:0cm;">Setup the simulation parameters</div>
+
# Configure each block as per the simulation requirements
 +
# Setup the simulation parameters
  
  
Line 281: Line 282:
  
 
(About Spoken Tutorial Project)
 
(About Spoken Tutorial Project)
| style="border:1pt solid #000001;padding:0.176cm;" | <div style="color:#252525;">The video at the following link, summarizes the Spoken Tutorial project.</div>
+
| style="border:1pt solid #000001;padding:0.176cm;" | The video at the following link, summarizes the Spoken Tutorial project.
  
<div style="color:#252525;">Please download and watch it.</div>
+
Please download and watch it.
 
|-
 
|-
 
| style="border:1pt solid #000001;padding:0.176cm;" | Show Slide
 
| style="border:1pt solid #000001;padding:0.176cm;" | Show Slide
Line 289: Line 290:
  
 
(About Spoken Tutorial Forum)
 
(About Spoken Tutorial Forum)
| style="border:1pt solid #000001;padding:0.176cm;" | <div style="color:#252525;">The Spoken Tutorial Project Team conducts workshops and gives certificates.</div>
+
| style="border:1pt solid #000001;padding:0.176cm;" | The Spoken Tutorial Project Team conducts workshops and gives certificates.
  
<div style="color:#252525;">For more details, please write to us.</div>
+
For more details, please write to us.
 
|-
 
|-
 
| style="border:1pt solid #000001;padding:0.176cm;" | Show Slide 1
 
| style="border:1pt solid #000001;padding:0.176cm;" | Show Slide 1
  
 
FORUMS
 
FORUMS
| style="border:1pt solid #000001;padding:0.176cm;" | * <div style="color:#252525;margin-left:1.376cm;margin-right:0cm;">Do you have questions in THIS Spoken Tutorial?</div>
+
| style="border:1pt solid #000001;padding:0.176cm;" |  
* <div style="color:#252525;margin-left:1.376cm;margin-right:0cm;">Please visit http://forums.spoken-tutorial.org</div>
+
* Do you have questions in THIS Spoken Tutorial?
* <div style="color:#252525;margin-left:1.376cm;margin-right:0cm;">Choose the minute and second where you have the question</div>
+
* Please visit http://forums.spoken-tutorial.org
* <div style="color:#252525;margin-left:1.376cm;margin-right:0cm;">Explain your question briefly</div>
+
* Choose the minute and second where you have the question
* <div style="color:#252525;margin-left:1.376cm;margin-right:0cm;">Someone from our team will answer them</div>
+
* Explain your question briefly
 +
* Someone from our team will answer them
  
  
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;" | Show Slide 2
+
| style="border:1pt solid #000001;padding:0.176cm;" | Show Slide 2
  
 
FORUMS
 
FORUMS
| style="border:1pt solid #000001;padding:0.176cm;" | * <div style="color:#252525;margin-left:1.376cm;margin-right:0cm;">The Spoken Tutorial forum is for specific questions on this tutorial</div>
+
| style="border:1pt solid #000001;padding:0.176cm;" |  
* <div style="color:#252525;margin-left:1.376cm;margin-right:0cm;">Please do not post unrelated and general questions on them</div>
+
* The Spoken Tutorial forum is for specific questions on this tutorial
* <div style="color:#252525;margin-left:1.376cm;margin-right:0cm;">This will help reduce the clutter</div>
+
* Please do not post unrelated and general questions on them
* <div style="color:#252525;margin-left:1.376cm;margin-right:0cm;">With less clutter, we can use these discussions as instructional material</div>
+
* This will help reduce the clutter
 +
* With less clutter, we can use these discussions as instructional material
  
  
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" | Show slide
+
| style="border:1pt solid #000001;padding:0.176cm;" | Show slide
| style="border:1pt solid #000001;padding:0.176cm;color:#252525;" | Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.. More information on this mission is available at the link shown.
+
| style="border:1pt solid #000001;padding:0.176cm;" | Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.. More information on this mission is available at the link shown.
 
|-
 
|-
| style="background-color:#ffffff;border-top:1pt solid #000001;border-bottom:1pt solid #000001;border-left:1pt solid #000001;border-right:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;color:#000000;" |  
+
| style="border:1pt solid #000001;padding:0.176cm;" |  
| style="border:1pt solid #000001;padding:0.176cm;" | <div style="color:#252525;">This is Rupak Rokade signing off.</div>
+
| style="border:1pt solid #000001;padding:0.176cm;" | This is Rupak Rokade signing off.
  
<div style="color:#252525;">Thanks for joining.</div>
+
Thanks for joining.
 
|-
 
|-
 
|}
 
|}

Latest revision as of 15:58, 5 October 2017

Title of script: Simulating a PID controller using Xcos

Author: Rupak Rokade

Keywords: Xcos, PID, Simulation, Closed loop


Narration
Show Slide Welcome to the spoken tutorial on Simulating a PID controller using Xcos.
Show Slide In this tutorial we will learn how to implement a PID controller in Xcos.
Show Slide Ensure that Scilab is installed on your computer.


I am recording this tutorial on Ubuntu 16.04 64-bit Operating System and using Scilab 6.0.0

Show Slide As a pre-requisite, watch the tutorial Xcos Introduction.


This tutorial will make you comfortable with the Xcos environment.


Also, we will use the firstorder.xcos file created in that tutorial.


Hence, it is important that you practice the tutorial before continuing so that you have the file with you.


Some basic knowledge of PID controller is necessary.


Assuming that you have satisfied the pre-requisites, let us begin with the tutorial.

Launch Scilab First of all, we will launch Scilab.
Applications >> Xcos Then go to Applications and select Xcos.
Or in your Scilab console window, type Xcos and press Enter.
Point to
  1. Palette Browser and
  2. An Untitled-Xcos window


By doing this, two windows will open.
  1. Palette Browser and
  2. An Untitled-Xcos window
Untitled-Xcos window>> click on File >> Open On the Untitled-Xcos window, click on File and then click on Open.
Go to the saved folder>> click on the file >> OK Browse to the directory where the file firstorder.xcos is saved. Choose that file and click on Ok.
Double-click transfer function block. Double-click on the transfer function block.
Highlight the transfer function parameters Check that you are using the same transfer function as I am using.
For me, the numerator is 1 and denominator is 2 asteric s plus 1

Which is 2 multiplied by s plus one.

Click on Ok.

Highlight the step input parameters Double-click on the Step block.

Check that you are using the same step input parameters as I am using.

For me the Step time is 1, the Initial value is 0 and the Final value is 2.

Click on OK

Simulation tab >> choose Start Click on Simulation on the menu bar and choose Start to simulate the file.
Expect a similar plot which ensures that the file has no mistakes.
Switch to the Palette Browser. Switch to the Palette Browser.
Click on Continuous time systems >> drag-drop PID block inside Xcos Click on Continuous time systems category.


Drag and drop the PID block, which is here, inside the Xcos window

Click on Signal Routing >> drag-drop Mux block inside Xcos Click on the Signal Routing category.


Drag and drop the Mux block, which is here, inside the Xcos window.

Click on Mathematical Operations >> drag-drop Summation block inside Xcos Click on Mathematical Operations category.


Drag and drop the Summation block, which is here, inside the Xcos window.

Note that this block, by default, subtracts the second input from the first input.


We will use this default configuration of the summation block.

Click on the line joining the step input block + transfer function block >> press Delete Click on the line joining the step input block and transfer function block.


Then press the Delete button to delete it.

Drag away Drag the step input block away from the transfer function block.
Click on the line joining the transfer function block and the cscope block >> press Delete Click on the line joining the transfer function block and the cscope block.


Then press the Delete button to delete it.

Drag away Drag the cscope and clock input block away from the transfer function block
Do as narrated Place the PID block before the transfer function block.
Do as narrated Place the summation block before the PID block.
Do as narrated Place the Mux block between the transfer function block and cscope block.
Do as narrated Adjust the blocks, if required, so that they all come in a line.
Do as narrated Connect the step input block to the first input port of the summation block.

Note that this is the positive input port of the summation block.

Do as narrated Connect the output port of summation block to the input port of PID block.
Do as narrated Connect the output port of PID block to the input port of transfer function block.
Do as narrated Connect the output port of transfer function block to the lower input port of Mux block.
Do as narrated Connect the output port of Mux block to the input port of the cscope block.
Do as narrated Locate the line connecting the step input block and the summation block.


Connect the input port of Mux to that line.

Use the left mouse click to create line bends while making the connection.
Do as narrated Locate the line joining the transfer function block and the Mux block.


Connect the second input port of the summation block to that line.

Use line bends wherever necessary.

Do as narrated Double-click on the PID block to open its parameter setting dialog box.
Point to the respective gains. Here you can set the Proportional, Integral and Derivative gains.


Please note that the Integral gain should be considered as 1 by tau I, where tau I is the integral time.


Click on Cancel

We will use the default settings.


Click on Cancel to use the default settings.

We are now ready to run the simulation.
Highlight step input block Notice that we are using the step input block as a setpoint variable.
Highlight PID controller The PID controller will generate an input to the Transfer Function block.


It will be such that the output of the transfer function block matches the setpoint.

Click on Start simulation button Click on the Start simulation button available on the menu bar.
Plot window



Highlight setpoint


Highlight transfer function

Expect a graphic window to open.

It will have two variables plotted in a single plot.


The step plot is the setpoint which has a final value of 2.


The curved plot which is green in color, is the output of the transfer function which tries to meet the setpoint value of 2.

You can now change the PID settings and learn how they affect the output.

Pause the video here and solve the given exercises.

Exercise slide Implement a Proportional Controller only

That is, only P and not PID

Change the proportional gain such that the setpoint matches the output but without overshoots.

Exercise slide


Include the output of the summation block in the plot.

You may use CMSCOPE to keep it separate.

Compare it visually with the output of the PID block

This brings us to the end of this tutorial.

Let us summarize.

Summary slide In this tutorial we learnt
  1. To modify the firstorder.xcos file to implement a PID controller
  2. Configure each block as per the simulation requirements
  3. Setup the simulation parameters


Show Slide


(About Spoken Tutorial Project)

The video at the following link, summarizes the Spoken Tutorial project.

Please download and watch it.

Show Slide


(About Spoken Tutorial Forum)

The Spoken Tutorial Project Team conducts workshops and gives certificates.

For more details, please write to us.

Show Slide 1

FORUMS

  • Do you have questions in THIS Spoken Tutorial?
  • Please visit http://forums.spoken-tutorial.org
  • Choose the minute and second where you have the question
  • Explain your question briefly
  • Someone from our team will answer them


Show Slide 2

FORUMS

  • The Spoken Tutorial forum is for specific questions on this tutorial
  • Please do not post unrelated and general questions on them
  • This will help reduce the clutter
  • With less clutter, we can use these discussions as instructional material


Show slide Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.. More information on this mission is available at the link shown.
This is Rupak Rokade signing off.

Thanks for joining.

Contributors and Content Editors

Nancyvarkey, Rupakrokade