Department of Automobile Engineering
SRM IST, Kattankulathur – 603 203
Sub Code & Name: 18AUE317J - Automotive Control Engineering
Experiment No 01
Title of Experiment Introduction to SCI lab software
Name of the candidate
Register Number
Date of Experiment
Mark Split Up
S.No Description Maximum Mark Mark Obtained
1 Oral Viva 5
2 Execution 10
3 Results / Graphs 5
Total 20
Staff Signature with date
Aim
To understand about mathematical and simulation operation by using SCI lab software
Scilab:
Scilab is an open source, cross-platform numerical computational package and a high-
level, numerically oriented programming language. It can be used for signal processing,
statistical analysis, image enhancement, fluid dynamics simulations, numerical optimization,
and modelling, simulation of explicit and implicit dynamical systems and (if the corresponding
toolbox is installed) symbolic manipulations.
Scilab is one of the two major open-source alternatives to MATLAB, the other one
being GNU Octave. Scilab is similar enough to MATLAB that some book authors (who use it)
argue that it is easy to transfer skills between the two systems. Scilab however puts less
emphasis on (bidirectional) syntactic compatibility with MATLAB than Octave does.
Mathematical operation
Matrix operation
Commend 1 - Zeros(m,n) – creates m rows with n cols
Commend 2 - Eye(m,n) – creates identity matrix
Commend 3 - Ones(m,n) – creates matrix with all 1’s for all m rows and n cols
Commend 4 – Create 3 X 3 matrix
Commend 5 - Sin(z) – Retrieve the sine value for the given matrix / vector
Commend 6 - Exp(z) – Returns the exponential, element wise
Commend 7 - Sqrt(z) provides the square root for the matrix elements.
Polynomial operation
p = poly(r, 'x')
where r is a vector whose elements are specifying the roots of desired polynomial p,
and 'x' is the variable of the polynomial that we are specifying; poly(r, 'x') returns a row vector
whose elements are the coefficients of the polynomial of variable 'x'. For example,
-->r = [1 2 3];
-->p = poly(r, 'x'
Plot the Graph
Plot the single graph
plot(x, y)
xlabel('x = 0 : 2*pi')
-->ylabel('Sine of x')
-->title('Plot of the Sine function')
Plot the Multiple Graph-
-->x = 0 : %pi/100 : 2*%pi;
-->y1 = 2*cos(x); y2 = cos(x); y3 = 0.5*cos(x);
-->plot(x, y1, '--', x, y2, '-', x, y3, ':')
-->xlabel('0 <= x <= 2pi')
-->ylabel('Cosine functions')
-->legend('2cos(x)','cos(x)','0.5cos(x)')
-->title('Typical example of multiple plots')
Transfer function:
-->s = poly(0, 's');
-->num = (s^2) + (2*s);
-->den = (2*s^2) + (2*s) + 1;
-->sys_tf = syslin('c', num, den)
Lab Tasks
Task 1: Matrix Operations
1. Add 2, 3x4 matrices
2. Multiply 2 matrices of different dimensions
3. Find Inverse of matrix of order 4
4. Find rank of matrix
5. Find eigen values of matrix
Task 1
Task 2: Polynomial Operations
1. Find characteristics polynomial of matrix
2. Find roots of characteristic polynomial
Task 2
Task 3: Plot the graph
1. Reproduce the following curves in Scilab: (x = 0: %pi/100:5*%pi;)
Task 3
Result: