Professional Documents
Culture Documents
ETC
Subject Teacher
Mr. Amol Dhankar
Vision and Mission of Department
VISION Assistant Professor, ETC
To be a Department providing high quality & globally competent knowledge of concurrent technologies in the field of
Electronics and Telecommunication.
MISSION
1. To provide quality teaching learning process through well developed educational environment and dedicated faculties.
2. To produce competent technocrats of high standards satisfying the needs of all stakeholders.
List of Experiments:
SCILAB
1 Introduction to SCILAB Environment
2 To study simple matrix and array manipulations using SCILAB
3 Programming using SCILAB
4 Calculus using SCILAB
5 To plot signals: discrete and continuous using SCILAB
6 Function programming and SCILAB
7 Signal Manipulation using SCILAB
Spice
1 Design and simulation of resistive circuit
2 Plotting of VI characteristics of diode
3 Plotting of VI characteristics of BJT/FET
4 Plotting of VI characteristics of UJT/SCR
5 Design and simulation of half wave & full wave rectifier
6 Design and simulation of clipper and clamper circuits
7 Simulation of frequency response of a transistorized RC coupled amplifier
Experiment No: 1 Introduction to SCILAB Environment
What is SCILAB?
=
10.
--
>A(:,
2)
ans
=
11.
Matrix Addressing:
-->A(2,:)
ans =
4. 7. 10.
2.
-->A(9)
ans =
0.
-->A(1:2,1:2)
ans =
3. 11.
4. 7.
Vectors and matrices ……contd.
-->B=A(3:-1:1,1:4)
B =
13. 9. 0.
8.
4. 7.
10. 2.
3. 11. 6.
5.
-->B=A(3:-1:1,1:4)
B =
13. 9. 0.
8.
4. 7.
10. 2.
4. 7. 10.
3. 11. 6.
13. 9. 5. 0.
-->A(1:3,4)=[]
A =
3.
Vectors and matrices ……contd.
-->eye(2,2)
ans =
1.
0.
0.
1.
-->ones(2,3)
ans =
1. 1.
1.
1. 1.
1.
-->zeros(3,3)
ans =
0. 0.
0.
0. 0.
3. 4. 0. 5.
0. 0. 6.
0.
-->A=[1 2;3
4]; B=[2 3; 5
Vectors and matrices ……contd.
-->A=rand(2,3)
A =
0.8497452 0.8782165 0.5608486
0.6857310 0.0683740 0.6623569
| Or
~ Not
deff('[r,theta]=cartpol(x,y)',['r=sqrt(x^2+y^2)';
'theta=atan(y,x)']) <enter> [radius,angle] = cartpol(3., 4.)
<enter>
Global and local variables
A global variable is one define in the main SCILAB environment,
while a local variable is one defined within a function.
If a variable in a function is not defined, or is not among the input
parameters, then it takes the value of a variable of the same name
that exist in the calling environment.
This variable remains local in the sense that modifying it within
the function does not alter its value in the calling environment
unless the command resume is used.
For example, using the function sphercart, try the following:
function [x, y, z]=sphecart(r, theta,
rho) x = r*cos(rho); y =
r*cos(rho)*sin(theta); z = r*sin(rho);
endfunction
3. Subplots
plot2d()
subplot(2,2,1)
plot2d()
subplot(2,2,2)
plot2d()
subplot(2,2,3)
plot2d()
subplot(2,2,4) plot2d()
4. Saving Plots
x=linspace(-3*%pi,3*%pi,100)
plot(x,sin(x))
save fig()
save fig(sine.png)
Exercise :
Qus: Draw two plots for given form
1) First plot is a parabola of the form Y = 4x2
2) Second plot is a straight line of the form Y = 2x+3 in the range -5
to 5.
3) Use legend to indicate each plot.
x=linspace(-5,5,10)
plot(x,4*(x^2))
plot(x,(2*x+3))
legend("y=4*(x^2)","y=2*x+3")
Plot the Bode plot for the function
Program:
clc,clf;
w = logspace(-1,3,100); // Define log scale for w
s = %i*w; // Define imaginary s
G = 100../((s-10).*(s-90)); // Define G(s)
y = 20*log10(abs(G)); // Define dB scale for y
plot2d(w,y,5,logflag='ln') // Plot y=f(w)
xtitle("Bode plot for G(s)=100/((s-10)(s-90))","w,...
log scale","y, dB scale")
xgrid() // Add grid
where s = iω and the angular frequency ω = 0.1 … 1000.
Note double dots 100../(s-10) in the G command. First dot is a
decimal point, then comes the Dot Operator.
Put the logarithmic ω-axis horizontally and the decibel scale
y=20log(|G(ωi)|) vertically.
Polar Plot :
Polar coordinates are used frequently in some areas of
engineering, e.g. to present antenna lobe diagrams.
Plotting in polar coordinates is done by the command polarplot().
Program:
clc,clf;
x = 0:0.07:2*%pi;
polarplot(x,1-cos(x),style=[-3]) // r = 1 - cos(x), for x = 0...2pi /
legend('y = 1-cos(x)',4)