introduction to scicos, by rupak rokade and mahanand mali, iit

27
Introduction to Scicos Rupak Rokade and Mahanand Mali Indian Institute of Technology Bombay 15th April, 2010 Rupak Rokade and Mahanand Mali Introduction to Scicos

Upload: vuthuy

Post on 10-Feb-2017

231 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Introduction to Scicos

Rupak Rokade and Mahanand Mali

Indian Institute of Technology Bombay15th April, 2010

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 2: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

What is Scicos?

A Scilab connected object simulator

Used for block diagram simulation

Excellent GUI for Data processing

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 3: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Scicos window

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 4: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

First order Systems

Vo(s)

Vi (s)=

1

RCs + 1

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 5: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Step response of ’First order Systems’

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 6: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Scicos for open loop simulation (first order)

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 7: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Scicos Response for open loop simulation

Scicos simulation response for Transfer function 12s+1

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 8: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Second order Systems

Vo(s)

Vi (s)=

1

s2 + LCs + 1

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 9: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Continued.....

This second order transfer function can also be written in terms ofωn,undamped natural frequency and ζ ,damping ratio.

C (s)

R(s)=

ωn

s2 + 2ζωns + ω2n

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 10: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Step response of ’Second order Systems’

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 11: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Scicos for open loop simulation (second order)

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 12: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Scicos Response for open loop simulation

Scicos simulation response for Transfer function 1s2+2∗0.2∗1∗s+1

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 13: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Scicos Response for open loop simulation

Scicos simulation response for Transfer function 1s2+1

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 14: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Using Scilab and Scicos for ControlApplications

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 15: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Single Board Heater System

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 16: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Single Board Heater System (Hardware)

It is a lab in a box setup

The setup consists of a heater assembly, fan, temperaturesensor, microcontroller and associated circuitry

Microcontroller ATMega16 is used for operating the board

Serial Interface is available to communicate with thecomputer.

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 17: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Single Board Heater System (Software)

ATMega16 is an 8-bit microprocessor, hence only 28 = 256possibilities exist.

Command 253 is reserved for Fan speed

Command 254 is reserved for Heater Current

Command 255 is reserved for Temperature

A particular command is used to access a particular parameter

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 18: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Using Scilab for performing Control Experiments

Requires ‘Serial.dll’to establish serial communication betweencomputer and Hardware

‘Serial.dll ’can be downloaded from Scilab.org website

Building appropriate block diagram in Scicos, writingnecessary scilab code and performing the experiment

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 19: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Performing Step test on SBHS

Change the directory to the one which includes files1 ser init.sce2 step test.sci3 step test.cos

These files are available for download onhttp://fossee.in/moodle/course/view.php?id=3

Make sure that the directory also includes the serial.dll file.

Please note that the serial.dll file is only meant for Scilab 4.versions

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 20: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Scilab window

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 21: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Continued......

Open the Editor and load the files ser init.sce andstep test.sci in the given order in to scilab work space

Make sure you put the correct Com port number inser init.sce

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 22: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Continued......

Open the appropriate Scicos file and run it

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 23: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Continued......

Plot of various parameters for step test

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 24: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Performing PID control experiment on SBHS

Repeate the initial procedure as explained in the Step testexperiment

Do the PID tuning first to obtain the various PID parameters

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 25: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Continued.....

Scicos for PID experiment

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 26: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Continued.....

Plot of various parameters for PID

Rupak Rokade and Mahanand Mali Introduction to Scicos

Page 27: Introduction to Scicos, by Rupak Rokade and Mahanand Mali, IIT

Thank You

Rupak Rokade and Mahanand Mali Introduction to Scicos