Difference between revisions of "Single-Board-Heater-System/C2/Implementing-Proportional-Controller-on-SBHS-remotely/English"
Rupakrokade (Talk | contribs) (Created page with "'''Title of script''': '''Implementing proportional controller on SBHS Remotely''' '''Author: Rupak Rokade''' '''Keywords: SBHS, Virtual labs, tutorial''' {| style="borde...") |
Nancyvarkey (Talk | contribs) |
||
Line 19: | Line 19: | ||
| style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| In this tutorial we will learn to: | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| In this tutorial we will learn to: | ||
− | + | # Use '''Ziegler-Nichols tuning method''' to calculate '''proportional controller gain''' | |
− | # Use '''Ziegler-Nichols''' | + | # Modify '''step test''' code to design a '''proportional controller''' |
− | + | # Implement this '''proportional controller''' on '''SBHS''' | |
− | + | ||
− | + | ||
− | # Implement this '''proportional | + | |
− | + | ||
− | + | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show Slide |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Ensure that '''Scilab''' is installed on your computer. | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| |
+ | Ensure that '''Scilab''' is installed on your computer. | ||
− | Also, ensure that you have internet connectivity before you begin with this tutorial. | + | Also, ensure that you have '''internet''' connectivity before you begin with this tutorial. |
Line 39: | Line 35: | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show Slide |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| As a pre-requisite, watch the tutorial on | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| As a pre-requisite, watch the tutorial on '''Using SBHS Virtual labs on Windows OS''' |
− | This tutorial is available on the | + | This tutorial is available on the '''Spoken Tutorial''' website. |
− | It will teach you how to do a basic '''step test''' experiment on '''SBHS,''' remotely | + | It will teach you how to do a basic '''step test''' experiment on '''SBHS,''' remotely. |
− | You also need to have basic knowledge of '''PID''' tuning | + | You also need to have basic knowledge of '''PID''' tuning. |
|- | |- | ||
Line 62: | Line 58: | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Browse to the folder, as per narration |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| In my machine, the '''data file''' is within ''' | + | |
+ | Point to the file. | ||
+ | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| In my machine, the '''data file''' is within the '''Scilab_codes_windows '''folder >> '''step test '''folder >> '''logs''' folder. | ||
Line 76: | Line 74: | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on '''Downloads''' | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on '''Downloads''' on LHS. |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| On the left hand side, click on '''Downloads''' | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| On the left hand side, click on '''Downloads.''' |
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on '''SBHS Analysis Code '''link | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on '''SBHS Analysis Code '''link >> save on '''Desktop'''. |
| style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Download the file '''SBHS Analysis Code '''and save it on the '''Desktop.''' | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Download the file '''SBHS Analysis Code '''and save it on the '''Desktop.''' | ||
Line 87: | Line 85: | ||
− | The file downloaded will be in zip format. | + | The file downloaded will be in '''zip''' format. |
|- | |- | ||
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Right click on the zip file | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Right click on the zip file >> choose '''Extract here'''. |
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Right-click and extract the contents of the zip file. | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Right-click and extract the contents of the '''zip''' file. |
Line 104: | Line 102: | ||
− | The '''Step Analysis''' folder will have few more folders | + | The '''Step Analysis''' folder will have few more folders. |
|- | |- | ||
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Copy-paste the '''data file'''inside '''Kp tau order1 '''folder. |
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Copy-paste the '''data file''' generated earlier inside '''Kp tau order1 '''folder. | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Copy-paste the '''data file''' generated earlier inside '''Kp tau order1 '''folder. | ||
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Double click on the file '''firstorder.sce''' | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Double click on the file '''firstorder.sce''' | ||
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Double click on the '''Scilab''' file '''firstorder''' | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Double click on the '''Scilab''' file '''firstorder'''. |
Line 118: | Line 116: | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on '''File >> Open a file>>''' click on '''firstorder '''>> '''Open.''' |
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| If it doesn't open the file, click on '''File''' menu then on '''Open a file.''' | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| If it doesn't open the file, click on '''File''' menu then on '''Open a file.''' | ||
Line 125: | Line 123: | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Change the '''filename''' argument with '''data file''' name | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Change the '''filename''' argument with '''data file''' name. |
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Locate the variable '''filename''' and change its value to the filename of your '''data file'''. | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Locate the variable '''filename''' and change its value to the filename of your '''data file'''. | ||
− | I will copy paste the | + | I will copy paste the filename to avoid spelling mistakes. |
− | Keep the .txt extension. | + | Keep the '''.txt''' extension. |
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on exeute button | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on '''exeute''' button. |
| style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Save and execute this '''Scilab''' code. | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Save and execute this '''Scilab''' code. | ||
Line 145: | Line 143: | ||
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| This plot window will show two graphs, | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| This plot window will show two graphs, | ||
− | * the '''SBHS''' | + | * the '''SBHS temperature plot''' which has '''noise''' |
− | * output of '''SBHS | + | * and output of '''SBHS first order model''' which is a smooth curve. |
+ | |||
This code basically does the job of fitting a '''first order transfer function''' using the '''data file'''. | This code basically does the job of fitting a '''first order transfer function''' using the '''data file'''. | ||
− | The value of '''time constant | + | The value of '''time constant tau''' and '''gain Kp''' is displayed on the top. |
− | In this tutorial we will not use the '''first order transfer function'''. | + | In this tutorial, we will not use the '''first order transfer function'''. |
Line 167: | Line 166: | ||
− | We don't want the prediction output to appear on the plot | + | We don't want the '''prediction''' output to appear on the plot. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | Comment out this line by putting two '''forward slashes''' at the beginning of the line. | ||
|- | |- | ||
Line 180: | Line 176: | ||
− | Switch to the plot window | + | Switch to the '''plot''' window. |
− | Notice that the plot window now has only the '''SBHS''' | + | Notice that the '''plot''' window now has only the '''SBHS temperature plot'''. |
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| click on the '''File'''>>choose '''Export to'''>> type '''sbhsplot'''>>click on '''Files of type '''and choose '''PNG'''>> choose '''Desktop'''>> click on '''Save.''' |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| To save this image click on the '''File''' menu. | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| To save this image, click on the '''File''' menu. |
Line 207: | Line 203: | ||
I will choose '''Desktop '''and click on '''Save.''' | I will choose '''Desktop '''and click on '''Save.''' | ||
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Go to '''Desktop'' >> point to file. | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Let us open and see if the image file is created on the '''Desktop''' | ||
− | |||
+ | Here it is. | ||
− | + | |- | |
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Close window | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Close the image window. | ||
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"|Switch to the slides | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Let me now switch to the slides. | ||
− | + | |- | |
− | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | |
− | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Let us calculate the value of '''proportional gain''' using '''Ziegler-Nichols tuning method.''' | |
− | + | ||
− | + | ||
− | + | ||
− | Let us calculate the value of '''proportional''' | + | |
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | ||
| style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| There are two tuning rules given by '''Ziegler-Nichols''' to calculate the '''PID''' parameters. These are | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| There are two tuning rules given by '''Ziegler-Nichols''' to calculate the '''PID''' parameters. These are | ||
+ | * '''Reaction curve '''method and | ||
+ | * '''Instability '''method. | ||
− | + | We will see the '''Reaction curve '''method. | |
− | + | ||
− | + | ||
− | We will see the '''Reaction curve '''method | + | |
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | ||
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| In this method a '''step input''' is given to the system and its output is observed over a period of time. | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| In this method, |
+ | *a '''step input''' is given to the system | ||
+ | *and its output is observed over a period of time. | ||
Line 240: | Line 241: | ||
− | A '''tangent''' is drawn at the point of '''inflection | + | A '''tangent''' is drawn at the point of '''inflection'''. |
+ | |||
+ | That is, when the curve changes from '''convex''' to '''concave'''. | ||
Line 246: | Line 249: | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide with figure. |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| This is illustrated in this figure | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| This is illustrated in this figure. |
− | This is the tangent line drawn at the | + | This is the tangent line drawn at the point of '''inflection''' . |
Line 257: | Line 260: | ||
* T is the '''time constant''' | * T is the '''time constant''' | ||
− | + | |- | |
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Replicate this on the '''SBHS''' output figure we just saved on the '''Desktop.''' | ||
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Open image | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Open image | ||
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| I have already done this. |
− | + | Let me open this file. | |
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| I have used '''paint brush''' which is a default image editing tool on '''Windows'''. | ||
− | + | |- | |
− | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Point to relevant info on the figure. | |
− | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| I have got the values of | |
− | + | ||
− | + | ||
− | + | ||
− | I have got the values of | + | |
− | * gain equal to 2.78 | + | * '''gain''' equal to 2.78 |
− | * '''dead time''' equal to | + | * '''dead time''' equal to 1 second |
− | * and '''time constant''' equal to | + | * and '''time constant''' equal to 50 seconds |
Note that these are all approximate values. | Note that these are all approximate values. | ||
− | The values depend on the accuracy with which you draw the tangent line at the inflection point. | + | The values depend on the accuracy with which you draw the tangent line at the '''inflection point'''. |
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | ||
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| After you get the required values, refer to the table given by '''Ziegler-Nichols''' to calculate the value of ''' | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| After you get the required values, |
+ | *refer to the table given by '''Ziegler-Nichols''' | ||
+ | *to calculate the value of '''proportional gain'''. | ||
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to the slides | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Let me switch to the slides. | ||
− | |||
+ | For a '''proportional controller''', we need to calculate only the value of '''proportional gain'''. | ||
− | |||
+ | In my case the value of '''proportional gain''' comes out to be 18. | ||
− | + | |- | |
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|Now let us see how to implement the '''proportional controller''' on '''SBHS'''. | ||
− | + | We would modify the '''step test''' code for this. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to '''step test''' code folder>> make a copy >> rename as '''proportional '''and open it |
| style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the folder where you have the '''step test''' code. | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the folder where you have the '''step test''' code. | ||
− | Make a copy of this folder | + | Here it is. Make a copy of this folder. |
Line 320: | Line 322: | ||
− | Rename | + | |- |
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Rename '''stepc''' as '''proportional '''>> '''steptest.sci''' as '''proportional '''>> '''steptest.xcos''' as '''proportional ''' | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Rename the '''stepc''' file to '''proportional'''. | ||
− | Rename the '''steptest | + | Rename the '''steptest dot sci''' file to '''proportional'''. |
− | Rename the '''steptest | + | Rename the '''steptest dot xcos''' file to '''proportional'''. |
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration >> Double-click on '''proportional.sce''' |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Close '''Scilab''' if already running | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Close '''Scilab''' if already running. |
− | Double click on the '''proportional | + | Double-click on the '''proportional dot sce''' file. |
− | This should launch '''Scilab''' automatically and also open the file in '''Scilab''' editor | + | This should launch '''Scilab''' automatically and also open the file in '''Scilab''' editor. |
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on '''File''' >> '''Open a file''' | ||
+ | >> Choose '''proportional.sce '''>> '''Open''' | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|If it doesn't open the file, click on '''File''' menu then on '''Open a file.''' | ||
− | |||
+ | Choose the file '''proportional dot sce '''and click on '''Open.''' | ||
− | + | |- | |
+ | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Change '''exec''' command>> '''steptest.sci''' as '''proportional.sci''' | ||
+ | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Change the '''exec''' command to execute '''proportional.sci''' file instead of '''steptest.sci''' file. | ||
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Change '''xcos''' command>> '''steptest.xcos''' as '''proportional.sci''' >> Save file. | ||
+ | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Change the '''xcos''' command to execute '''proportional.xcos''' file instead of '''steptest.xcos''' file. | ||
+ | Save this file. | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top: | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on '''File''' >> '''Open''' |
− | | style="background-color:#ffffff;border | + | >> Choose '''proportional.sci '''>> '''Open'''>> Change '''steptest''' to '''proportional'''. |
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Click on '''File''' menu and choose '''Open'''. | ||
− | + | Select the file '''proportional.sci''' file and click on '''Open'''. | |
− | + | Change the function name from '''steptest''' to '''proportional'''. | |
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Change '''heat'' as '''setpoint'''>>type '''global space temp'''>> press '''Enter''' |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|Delete the input variable '''heat''' from the '''proportional''' function input and type '''setpoint'''. |
− | + | In the next line, type '''global''', leave a '''space''' and then type '''temp''' and press '''Enter'''. | |
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|In the next line type '''err equal to setpoint minus temp'''. | ||
− | |||
+ | Add '''semicolon''' at the end and press '''Enter'''. | ||
− | + | |- | |
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|In the next line type '''heat equal to 18''' multiplied by '''err''' | ||
− | + | Add '''semicolon''' at the end. | |
− | + | Here 18 is the value of the '''proportional gain''' for my '''SBHS'''. | |
− | + | You may change it according to what you would have calculated for your '''SBHS'''. | |
− | + | |- | |
− | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"|Add a space after '''temp''' and type '''setpoint''' | |
− | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|Add '''setpoint''' in the input variable of the '''plotting function '''inside its '''function call.''' | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | Add '''setpoint''' in the input variable of the '''plotting function '''inside its '''function call.''' | + | |
To do so, add a space after '''temp''' and type '''setpoint'''. | To do so, add a space after '''temp''' and type '''setpoint'''. | ||
− | + | |- | |
− | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Save this file. | |
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|Save this file. | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to '''Scilab console'''>> Type '''xcos'''> press '''Enter'''>> Close '''palette'''. |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the '''Scilab | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the '''Scilab console'''. |
− | '''xcos''' | + | Type '''xcos''' and press '''Enter'''. |
− | + | '''xcos''' window will open. | |
− | + | Close the '''palette''' window. | |
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| click on '''File'''>> '''Open'''>> '''proportional''' directory >>Select '''proportional.xcos''' >> click on '''Open'''. | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|On the '''xcos untitled''' window, click on '''File''' menu and choose '''Open'''. | ||
− | |||
+ | Browse to the '''proportional''' directory. | ||
− | |||
+ | Select '''proportional.xcos''' and click on '''Open'''. | ||
− | |||
+ | '''Xcos''' file will open. | ||
− | Double click on the label '''Heat | + | |- |
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|Double-click on the label '''Heat input in percentage'''. | ||
− | Delete it and type '''setpoint''' | + | Delete it and type '''setpoint'''. |
− | Click once anywhere on the '''xcos''' window to save the label | + | Click once anywhere on the '''xcos''' window to save the label. |
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | ||
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Double click on the '''step input''' block to open its | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Double click on the '''step input''' block to open its '''Properties''' window. |
− | Change the '''initial value''' to 30 and '''final value''' to 40 | + | Change the '''initial value''' to 30 and '''final value''' to 40. |
− | Keep step time as 300 | + | Keep '''step time''' as 300. |
− | + | Click on '''Ok'''. | |
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | ||
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Double click on the '''function''' block | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Double click on the '''function''' block. |
− | A window will appear. | + | A window will appear. Click on '''OK'''. |
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|Another window will appear. | ||
− | |||
+ | Here there is an option to enter the function name to be called by this '''xcos''' block. | ||
− | |||
+ | Change the function name from '''step test '''to''' proportional'''. | ||
− | |||
+ | Click on '''Ok'''. | ||
− | + | |- | |
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|Another window will open. | ||
− | + | Keep clicking on '''Ok''' three times to finish configuring the '''function''' block. | |
Line 469: | Line 489: | ||
− | Close the '''xcos | + | Close the '''xcos untitled''' window as well. |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on '''Virtual labs'''>> Login >> Book a slot. |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the web browser | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the web browser. |
− | On the left hand side, click on '''Virtual labs''' | + | On the left hand side, click on '''Virtual labs'''. |
− | Login with your registered '''username''' and '''password''' | + | Login with your registered '''username''' and '''password'''. |
− | Book a | + | Book a '''slot'''. |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to '''proportional''' folder >> run |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the '''proportional''' folder | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the '''proportional''' folder. |
− | Double click on the file '''run''' | + | Double click on the file '''run'''. |
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Login >> Point to message | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|This will open the '''SBHS''' client application. | ||
− | |||
+ | Login with your '''username''' and '''password'''. | ||
− | |||
+ | Make sure you are logging in at the booked '''slot''' time. | ||
− | |||
− | + | Expect the message '''Ready to execute Scilab code'''. | |
− | Expect the message '''Ready to execute Scilab code''' | + | |
|- | |- | ||
− | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| On '''Scilab console''' >> type as per narration |
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the '''Scilab''' | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Switch to the '''Scilab console'''. |
− | Type ''' | + | Type '''get d space dot dot slash common files''' |
− | Press ''' | + | Press '''Enter''' |
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Execute '''proportional.sce''' on '''Scilab''' editor >> execute '''xcos''' diagram. | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|Switch to the '''Scilab''' editor. | ||
− | |||
+ | Execute the file '''proportional.sce''' | ||
− | |||
+ | If the network is fine, then it will automatically open the '''xcos''' window with '''proportional controller xcos''' diagram. | ||
− | |||
− | + | Execute the '''xcos''' diagram and expect a plot window. | |
− | + | ||
− | + | ||
− | Execute the '''xcos''' diagram and expect a plot window | + | |
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Point on various plots on graph | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Point on various plots on graph | ||
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| The plot window will have three plots '''heat fan temperature''' | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| The plot window will have three plots '''heat, fan, temperature'''. |
− | Setpoint will also be plotted in the temperature graph | + | '''Setpoint''' will also be plotted in the '''temperature''' graph. |
− | Observe that the '''proportional | + | Observe that the '''proportional controller''' |
+ | *computes the value of '''heat''' | ||
+ | *in order to achieve the '''setpoint''' value of '''temperature'''. | ||
+ | |- | ||
+ | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | ||
+ | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|Run this experiment long enough to observe what happens after a '''step change''' in '''setpoint''' occurs. | ||
− | + | |- | |
− | + | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Demo as per narration | |
− | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"|I will now pause this recording until the experiment is executed for sufficient time. | |
− | I will now pause this recording until the experiment is executed for sufficient time | + | |
|- | |- | ||
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | ||
− | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| You can see that the '''proportional | + | | style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| You can see that the '''proportional controller''' has responded to the change in '''setpoint'''. |
− | You can observe that the '''proportional | + | You can observe that the '''proportional controller''' inherently has the property of '''offset'''. |
− | A '''proportional | + | A '''proportional controller''' will always have an '''offset''' between the '''setpoint''' value and the actual value. |
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | ||
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Now let us summarize, In this tutorial we learnt to | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Now let us summarize, In this tutorial we learnt to- |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | # Use '''Ziegler-Nichols''' tuning method to calculate '''proportional controller gain''' for '''SBHS''' | ||
+ | # Modify '''step test''' code to design a '''proportional controller''' | ||
+ | # Implement the designed '''proportional controller''' on '''SBHS''' | ||
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | ||
− | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Watch the video available at the following link | + | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| Watch the video available at the following link. |
Line 577: | Line 593: | ||
− | If you do not have good bandwidth, you can download and watch it | + | If you do not have good bandwidth, you can download and watch it. |
|- | |- | ||
| style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | | style="background-color:#ffffff;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show slide | ||
| style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| The Spoken Tutorial Project Team | | style="background-color:#ffffff;border:1pt solid #000000;padding:0.097cm;"| The Spoken Tutorial Project Team | ||
− | + | *Conducts workshops using spoken tutorials. | |
− | + | *Gives certificates to those who pass an online test. | |
− | Conducts workshops using spoken tutorials. | + | |
− | + | ||
− | + | ||
− | Gives certificates to those who pass an online test | + | |
Line 597: | Line 609: | ||
− | It is supported by the National Mission on Education through ICT, MHRD, Government of India | + | It is supported by the National Mission on Education through ICT, MHRD, Government of India. |
More information on this Mission is available at: [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] | More information on this Mission is available at: [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] | ||
Line 603: | Line 615: | ||
Thanks for joining, This is Rupak Rokade from IIT Bombay signing off. | Thanks for joining, This is Rupak Rokade from IIT Bombay signing off. | ||
− | Thank You | + | Thank You. |
|} | |} |
Latest revision as of 17:42, 9 February 2015
Title of script: Implementing proportional controller on SBHS Remotely
Author: Rupak Rokade
Keywords: SBHS, Virtual labs, tutorial
| |
Show Slide | Welcome to the spoken tutorial on Implementing proportional controller on SBHS remotely. |
Show Slide | In this tutorial we will learn to:
|
Show Slide |
Ensure that Scilab is installed on your computer.
|
Show Slide | As a pre-requisite, watch the tutorial on Using SBHS Virtual labs on Windows OS
|
Show Slide | You should have the step test experiment code folder available with you.
|
Browse to the folder, as per narration
Point to the file. |
In my machine, the data file is within the Scilab_codes_windows folder >> step test folder >> logs folder.
|
Open web browser and browse to sbhs.os-hardware.in | Let us now download the Analysis code from the website.
|
Click on Downloads on LHS. | On the left hand side, click on Downloads. |
Click on SBHS Analysis Code link >> save on Desktop. | Download the file SBHS Analysis Code and save it on the Desktop.
|
Right click on the zip file >> choose Extract here. | Right-click and extract the contents of the zip file.
|
Paste the data file inside Kp tau order1 folder | Open this folder.
|
Copy-paste the data fileinside Kp tau order1 folder. | Copy-paste the data file generated earlier inside Kp tau order1 folder. |
Double click on the file firstorder.sce | Double click on the Scilab file firstorder.
|
Click on File >> Open a file>> click on firstorder >> Open. | If it doesn't open the file, click on File menu then on Open a file.
|
Change the filename argument with data file name. | Locate the variable filename and change its value to the filename of your data file.
|
Click on exeute button. | Save and execute this Scilab code.
|
Point at respective information available on the plot | This plot window will show two graphs,
|
Switch to editor and comment the line plot2d(t,prediction) | Switch to the Scilab editor.
|
Execute the code and show the plot | Save and execute the Scilab code.
|
click on the File>>choose Export to>> type sbhsplot>>click on Files of type and choose PNG>> choose Desktop>> click on Save. | To save this image, click on the File menu.
|
Go to 'Desktop >> point to file. | Let us open and see if the image file is created on the Desktop
|
Close window | Close the image window. |
Switch to the slides | Let me now switch to the slides. |
Let us calculate the value of proportional gain using Ziegler-Nichols tuning method. | |
Show slide | There are two tuning rules given by Ziegler-Nichols to calculate the PID parameters. These are
|
Show slide | In this method,
That is, when the curve changes from convex to concave.
|
Show slide with figure. | This is illustrated in this figure.
|
Replicate this on the SBHS output figure we just saved on the Desktop. | |
Open image | I have already done this.
|
I have used paint brush which is a default image editing tool on Windows. | |
Point to relevant info on the figure. | I have got the values of
Note that these are all approximate values.
|
Show slide | After you get the required values,
|
Switch to the slides | Let me switch to the slides.
|
Now let us see how to implement the proportional controller on SBHS.
| |
Switch to step test code folder>> make a copy >> rename as proportional and open it | Switch to the folder where you have the step test code.
|
Rename stepc as proportional >> steptest.sci as proportional >> steptest.xcos as proportional | Rename the stepc file to proportional.
|
Demo as per narration >> Double-click on proportional.sce | Close Scilab if already running.
|
Click on File >> Open a file
>> Choose proportional.sce >> Open |
If it doesn't open the file, click on File menu then on Open a file.
|
Change exec command>> steptest.sci as proportional.sci | Change the exec command to execute proportional.sci file instead of steptest.sci file. |
Change xcos command>> steptest.xcos as proportional.sci >> Save file. | Change the xcos command to execute proportional.xcos file instead of steptest.xcos file.
|
Click on File >> Open
>> Choose proportional.sci >> Open>> Change steptest to proportional. |
Click on File menu and choose Open.
|
Change heat as setpoint'>>type global space temp>> press Enter | Delete the input variable heat from the proportional function input and type setpoint.
|
Demo as per narration | In the next line type err equal to setpoint minus temp.
|
Demo as per narration | In the next line type heat equal to 18 multiplied by err
|
Add a space after temp and type setpoint | Add setpoint in the input variable of the plotting function inside its function call.
|
Save this file. | Save this file. |
Switch to Scilab console>> Type xcos> press Enter>> Close palette. | Switch to the Scilab console.
|
click on File>> Open>> proportional directory >>Select proportional.xcos >> click on Open. | On the xcos untitled window, click on File menu and choose Open.
|
Demo as per narration | Double-click on the label Heat input in percentage.
Delete it and type setpoint.
|
Demo as per narration | Double click on the step input block to open its Properties window.
|
Demo as per narration | Double click on the function block.
|
Demo as per narration | Another window will appear.
|
Demo as per narration | Another window will open.
|
Click on Virtual labs>> Login >> Book a slot. | Switch to the web browser.
|
Switch to proportional folder >> run | Switch to the proportional folder.
|
Login >> Point to message | This will open the SBHS client application.
|
On Scilab console >> type as per narration | Switch to the Scilab console.
|
Execute proportional.sce on Scilab editor >> execute xcos diagram. | Switch to the Scilab editor.
|
Point on various plots on graph | The plot window will have three plots heat, fan, temperature.
|
Demo as per narration | Run this experiment long enough to observe what happens after a step change in setpoint occurs. |
Demo as per narration | I will now pause this recording until the experiment is executed for sufficient time. |
You can see that the proportional controller has responded to the change in setpoint.
| |
Now let us summarize, In this tutorial we learnt to-
| |
Show slide | Watch the video available at the following link.
|
Show slide | The Spoken Tutorial Project Team
|
Show slide | Spoken Tutorial Project is a part of the Talk to a Teacher project.
More information on this Mission is available at: http://spoken-tutorial.org/NMEICT-Intro Thanks for joining, This is Rupak Rokade from IIT Bombay signing off. Thank You. |