<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Scilab%2FC4%2FSimulating-a-PID-controller-using-XCOS%2FEnglish-timed</id>
		<title>Scilab/C4/Simulating-a-PID-controller-using-XCOS/English-timed - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Scilab%2FC4%2FSimulating-a-PID-controller-using-XCOS%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Scilab/C4/Simulating-a-PID-controller-using-XCOS/English-timed&amp;action=history"/>
		<updated>2026-04-29T19:53:48Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Scilab/C4/Simulating-a-PID-controller-using-XCOS/English-timed&amp;diff=43248&amp;oldid=prev</id>
		<title>PoojaMoolya: Created page with &quot;{| border=1 |- | Time |  '''Narration'''  |- | 00:01 | Welcome to the spoken tutorial on '''Simulating a PID controller using Xcos.'''  |- | 00:07 | In this tutorial we will l...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Scilab/C4/Simulating-a-PID-controller-using-XCOS/English-timed&amp;diff=43248&amp;oldid=prev"/>
				<updated>2018-05-24T10:39:27Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| border=1 |- | Time |  &amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039;  |- | 00:01 | Welcome to the spoken tutorial on &amp;#039;&amp;#039;&amp;#039;Simulating a PID controller using Xcos.&amp;#039;&amp;#039;&amp;#039;  |- | 00:07 | In this tutorial we will l...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=1&lt;br /&gt;
|-&lt;br /&gt;
| Time&lt;br /&gt;
|  '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:01&lt;br /&gt;
| Welcome to the spoken tutorial on '''Simulating a PID controller using Xcos.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:07&lt;br /&gt;
| In this tutorial we will learn how to implement a '''PID controller '''in '''Xcos'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:13&lt;br /&gt;
|  Ensure that '''Scilab''' is installed on your computer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:17&lt;br /&gt;
| I am recording this tutorial on '''Ubuntu 16.04 64-bit Operating System '''and using '''Scilab 6.0.0'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:27&lt;br /&gt;
|  As a pre-requisite, watch the tutorial '''Xcos Introduction.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:32&lt;br /&gt;
| This tutorial will make you comfortable with the '''Xcos''' environment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:37&lt;br /&gt;
| Also, we will use the '''firstorder.xcos''' file created in that tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:43&lt;br /&gt;
| Hence, it is important that you practice the tutorial before continuing so that you have the file with you.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:50&lt;br /&gt;
| Some basic knowledge of '''PID controller''' is necessary.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:54&lt;br /&gt;
| Assuming that you have satisfied the pre-requisites, let us begin with the tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:59&lt;br /&gt;
|  First of all, we will launch '''Scilab.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:03&lt;br /&gt;
|  Then go to '''Applications '''and select '''Xcos'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:08&lt;br /&gt;
|  Or in your '''Scilab console''' window, type '''Xcos '''and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:15&lt;br /&gt;
|  By doing this, two windows will open.&lt;br /&gt;
&lt;br /&gt;
# '''Palette Browser''' and # '''An Untitled-Xcos''' window &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:23&lt;br /&gt;
| On the '''Untitled-Xcos''' window, click on '''File''' and then click on '''Open.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:30&lt;br /&gt;
| Browse to the directory where the file '''firstorder.xcos''' is saved. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:36&lt;br /&gt;
| Choose that file and click on '''Ok'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:40&lt;br /&gt;
| Now, Double-click on the '''transfer function block'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:44&lt;br /&gt;
|  Check that you are using the same '''transfer function''' as I am using.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:49&lt;br /&gt;
|  For me, the numerator is 1 and denominator is '''2 asteric s plus 1'''&lt;br /&gt;
&lt;br /&gt;
Which is 2 multiplied by s plus one.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:01&lt;br /&gt;
| Click on '''Ok'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:03&lt;br /&gt;
|  Double-click on the '''Step block'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:06&lt;br /&gt;
| Check that you are using the same '''step input''' parameters as I am using.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:11&lt;br /&gt;
|  For me the '''Step time''' is 1, the '''Initial value''' is 0 and the '''Final value''' is 2.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK'''&lt;br /&gt;
|-&lt;br /&gt;
| 02:20&lt;br /&gt;
| Click on '''Simulation''' on the menu bar and choose '''Start''' to simulate the file. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:27&lt;br /&gt;
|  Expect a similar plot which ensures that the file has no mistakes.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:32&lt;br /&gt;
|  Switch to the '''Palette Browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:35&lt;br /&gt;
| Click on '''Continuous time systems''' category. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:39&lt;br /&gt;
| Drag and drop the '''PID''' block, which is here, inside the '''Xcos''' window&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:46&lt;br /&gt;
|  Click on the '''Signal Routing''' category. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:49&lt;br /&gt;
| Drag and drop the '''Mux''' block, which is here, inside the '''Xcos''' window.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:55&lt;br /&gt;
| Click on '''Mathematical Operations''' category. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:00&lt;br /&gt;
| Drag and drop the '''Summation''' block, which is here, inside the '''Xcos''' window.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:07&lt;br /&gt;
| Note that this block, by default, subtracts the second input from the first input.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:14&lt;br /&gt;
| We will use this default configuration of the '''summation''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:18&lt;br /&gt;
| Click on the line joining the '''step input''' block and '''transfer function''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:24&lt;br /&gt;
| Then press the '''Delete''' button to delete it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:27&lt;br /&gt;
|  Drag the '''step input''' block away from the '''transfer function''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:31&lt;br /&gt;
|  Click on the line joining the '''transfer function''' block and the '''cscope''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:36&lt;br /&gt;
| Then press the '''Delete '''button to delete it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:40&lt;br /&gt;
| Drag the '''cscope''' and '''clock input''' block away from the '''transfer function''' block&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:46&lt;br /&gt;
|  Place the '''PID''' block before the '''transfer function''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:50&lt;br /&gt;
| Place the '''summation''' block before the '''PID''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:54&lt;br /&gt;
|  Place the '''Mux''' block between the '''transfer function''' block and '''cscope''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:59&lt;br /&gt;
| Adjust the blocks, if required, so that they all come in a line.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:04&lt;br /&gt;
| Connect the '''step input''' block to the first '''input port''' of the '''summation''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:10&lt;br /&gt;
| Note that this is the positive '''input port''' of the '''summation''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:15&lt;br /&gt;
| Connect the '''output port''' of '''summation''' block to the '''input port''' of '''PID''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:21&lt;br /&gt;
| Connect the '''output port''' of '''PID''' block to the '''input port''' of '''transfer function''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:27&lt;br /&gt;
| Connect the '''output port''' of '''transfer function''' block to the lower '''input port''' of '''Mux''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:33&lt;br /&gt;
|  Connect the '''output port''' of '''Mux''' block to the''' input port''' of the '''cscope''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:39&lt;br /&gt;
| Locate the line connecting the '''step input''' block and the '''summation''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:44&lt;br /&gt;
| Connect the '''input''' port of '''Mux''' to that line.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:48&lt;br /&gt;
| Use the left mouse click to create line bends while making the connection.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:54&lt;br /&gt;
| Locate the line joining the '''transfer function''' block and the '''Mux''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:59&lt;br /&gt;
| Connect the second '''input port''' of the '''summation''' block to that line. Use line bends wherever necessary.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:08&lt;br /&gt;
| Double-click on the '''PID''' block to open its parameter setting dialog box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:14&lt;br /&gt;
| Here you can set the '''Proportional, Integral '''and''' Derivative''' gains.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:18&lt;br /&gt;
| Please note that the '''Integral gain''' should be considered as 1 by '''tau I''', where '''tau I''' is the '''integral time'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:28&lt;br /&gt;
|  We will use the default settings. Click on '''Cancel''' to use the default settings.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:34&lt;br /&gt;
|  We are now ready to run the simulation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:37&lt;br /&gt;
|  Notice that we are using the '''step input''' block as a '''setpoint''' variable.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:42&lt;br /&gt;
|  The '''PID controller '''will generate an input to the '''Transfer Function''' block.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:47&lt;br /&gt;
| It will be such that the output of the '''transfer function''' block matches the '''setpoint.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:53&lt;br /&gt;
| Click on  '''Start simulation''' button available on the menu bar.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:58&lt;br /&gt;
| Expect a graphic window to open. It will have two variables plotted in a single plot.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:07&lt;br /&gt;
| The step plot is the '''setpoint''' which has a final value of 2.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:12&lt;br /&gt;
| The curved plot which is green in color, is the output of the '''transfer function''' which tries to meet the '''setpoint''' value of 2.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:22&lt;br /&gt;
| You can now change the '''PID''' settings and learn how they affect the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:28&lt;br /&gt;
| Pause the video here and solve the given exercises.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:33&lt;br /&gt;
| Implement a '''Proportional Controller''' only. That is, only '''P''' and not '''PID'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:40&lt;br /&gt;
| Change the proportional gain such that the setpoint matches the output but without overshoots.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:47&lt;br /&gt;
| Include the output of the '''summation''' block in the plot.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:51&lt;br /&gt;
| You may use '''CMSCOPE''' to keep it separate. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:55&lt;br /&gt;
| Compare it visually with the output of the '''PID''' block&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:59&lt;br /&gt;
| This brings us to the end of this tutorial. Let us summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:04&lt;br /&gt;
| In this tutorial we learnt : To modify the '''firstorder.xcos''' file to implement a '''PID''' controller&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:12&lt;br /&gt;
|  Configure each block as per the simulation requirements&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:16&lt;br /&gt;
|  Setup the simulation parameters&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:19&lt;br /&gt;
| The video at the following link, summarizes the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:26&lt;br /&gt;
| The Spoken Tutorial Project Team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:34&lt;br /&gt;
|  Do you have questions in THIS Spoken Tutorial?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:37&lt;br /&gt;
|  Please visit http://forums.spoken-tutorial.org&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:43&lt;br /&gt;
|  Choose the minute and second where you have the question&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:47&lt;br /&gt;
|  Explain your question briefly&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:50&lt;br /&gt;
| Someone from our team will answer them&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:53&lt;br /&gt;
|  The Spoken Tutorial forum is for specific questions on this tutorial&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:58&lt;br /&gt;
|  Please do not post unrelated and general questions on them&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:03&lt;br /&gt;
|  This will help reduce the clutter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:05&lt;br /&gt;
|  With less clutter, we can use these discussions as instructional material&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:11&lt;br /&gt;
| Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.. More information on this mission is available at the link shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:23&lt;br /&gt;
| This is Rupak Rokade signing off. Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>PoojaMoolya</name></author>	</entry>

	</feed>