Single-Board-Heater-System/C2/Implementing-Proportional-Controller-on-SBHS-remotely/English
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. |