Vous êtes sur la page 1sur 4

EXPERIMENT no.

ECE 424FL-01
Familiarization of SCILAB functions related to Control Systems
I.

II.

Objectives
1. To be familiar with the basic SCILAB functions, variables and
values related to control systems.
2. to make SCILAB programs to plot given functions.
Data and Results
1. Tabularize the function and define their uses/purpose.
Function
Plot

PLZR
Poly
SYSLIN
CSIM

Use/Purpose
plot plots a set of 2D curves. plot has
been rebuild to better handle Matlab
syntax
produces a pole-zero plot of the linear
system
calculates the value of a given
polynomial function
defines a linear system as a list and
checks consistency of data.
simulates time response of linear
system

2. Create a program (should not be the given examples in the


program) using the functions.
Plot:
Input
Program:
x=1:0.1:30;
//define your x
y1=sin(x)
y2=cos(x)
//define your y
plot(x,y1,x,y2)
//plot function will create a
graph of the defined variables

Output

Poly
Input
W=[1,2:3,2]
//define a matrix or set of numbers
poly(A,"v")
//poly function will initialize

Output
-->W=[1,2:3,2]
W =
1.

2.

3.

2.

-->poly(A,"v")
ans =
2
4 - 4v + v
csim
Input

Output

//csim
clf;
s=poly(0,'s');//set variable
G=3;H=3;//G and H are
constants
f=syslin('c',G/(1+H*s));
/transfer functions
t=0:0.001:15; //time range
y=csim('step',t,f);//function
response
plot(t,y)
plzr
Input

Output

//plzr
A=[2,1;12,3];B=[1,0;1,2];C=[36,5];
//initialize matrix A,B, and C
x=syslin('c',A,B,C);//list the transfer
function values of the matrices
plzr(x)//plot of transfer function

syslin
Input
a1=[1,2;3,4];
a2=[5,6;7,8];
a3=[9,10]; //specified matrices
h=syslin('d',a1,a2,a3)
Linear system definition

Output
->a1=[1,2;3,4];
-->a2=[5,6;7,8];

//

-->a3=[9,10]; //specified matrices


->h=syslin('d',a1,a2,a3)
Linear system definition
h =

h(1) (state-space system:)


!lss A B C D X0 dt !
h(2) = A matrix =
1.
3.

2.
4.
h(3) = B matrix =

5.
7.

6.
8.
h(4) = C matrix =

9.

10.
h(5) = D matrix =

0.

0.

//

h(6) = X0 (initial state) =


0.
0.
h(7) = Time domain =
d

III.

Observation
In this experiment we've found out that SCILAB has vast of functions
that help make engineers work easier such as plot, poly, plzr, csim,
syslin. Their purpose and complexity differ from each other. We've
found out that some functions are hard to understand but our research
made it easier but we still need practice in order to better understand
SCILAB.

IV.

Conclusion
We therefore conclude that SCILAB consists of functions that makes
work easier that include tables and graphs and other works done by
engineers that have tons of calculations that are complex but now
made simple through the aid of SCILAB. This activity made us be more
familiar with the functions. Plot simply plots the variables we defined.
Poly computes for the roots of the functions given. Plzr produces pole
zero plots. Csim simulates the time response system. Syslin defines a
linear system as a list and checks consistency of data.

Vous aimerez peut-être aussi