23
Introduction to Xcos Rupak Rokade Indian Institute of Technology Bombay National Workshop on Scilab Fr. C. Rodrigues Institute of Technology,Vashi December 1, 2010 Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 1/23

Rupak Rokade Indian Institute of Technology Bombay

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Introduction to Xcos

Rupak Rokade

Indian Institute of Technology Bombay

National Workshop on ScilabFr. C. Rodrigues Institute of Technology,Vashi

December 1, 2010

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 1/23

What is Xcos?

A Scilab connected object simulator

Used for block diagram simulation

Excellent GUI for Data processing

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 2/23

Xcos window

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 3/23

Xcos palette browser

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 4/23

First order Systems

Vo(s)

Vi (s)=

1

RCs + 1

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 5/23

Step response of ’First order Systems’

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 6/23

Xcos for open loop simulation (first order)

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 7/23

Xcos Response for open loop simulation

Xcos simulation response for Transfer function 12s+1

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 8/23

Second order Systems

Vo(s)

Vi (s)=

1

s2 + LCs + 1

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 9/23

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 Indian Institute of Technology Bombay Introduction to Xcos 10/23

Step response of ’Second order Systems’

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 11/23

Xcos for open loop simulation (second order)

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 12/23

Xcos Response for open loop simulation

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

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 13/23

Xcos Response for open loop simulation

Xcos simulation response for Transfer function 1s2+1

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 14/23

Xcos for plotting overlapped multiple plots

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 15/23

Multiple plots in Xcos

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 16/23

Using scifunc in Xcos

Xcos simulation diagram with scifunc block

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 17/23

Configuring Scifunc block

Open the block properties of Scifunc block by double clickingon it

Click on ok and you will be prompted to ask to enter thefunction name.

Write, y = sine(u1)and click ok five times.

Open editor, write the code as shown in the slide 19 and saveit with some name (e.g. sine.sci).

After making sure that you are in the same directory wherethe .xcos and .sci file resides, run the .sci file.

After running the .sci file, open the xcos code and execute it.

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 18/23

Function code

Remember to use the same function name in the .sci as wellas .xcos file.

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 19/23

Response of Xcos simulation diagram with scifunc block

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 20/23

Xcos for closed loop controllers

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 21/23

Xcos response for closed loop controller

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 22/23

Thank You

Rupak Rokade Indian Institute of Technology Bombay Introduction to Xcos 23/23