2025
Computing Software Laboratory
Sheet-1 , Sheet-2 , sheet-3, sheet-5
KUNTAL GOSWAMI
302411102001 (2ND YEAR, 2ND SEMESTER)
DEPT. OF INSTRUMENTATION & ELECTRONICS
ENGG.
JADAVPUR UNIVERSITY
SHEET – 1
1. Design half wave and full wave bridge rectifier circuits using PSPICE. Observe the output
voltage for a given sinusoidal input voltage.
2. Design positive and negative, series and shunt, biased and unbiased clipper circuits using
PSPICE. Observe the output voltages for (a) sinusoidal input (b) square wave input voltage.
1. Half Wave Rectifier :
2. Full Wave Bridge Rectifier:
3. Positive Clipper positive biasing:
4. Positive clipper negative biasing:
5. Negative Clipper positive biasing:
6. Negative clipper negative biasing:
7. Shunt clipper:
Sheet- 2
1. Design an RC low pass filter using PSPICE and observe its output for (i) step, (ii) pulse and (iii)
rectangular wave.
2. Design an RC high pass filter using PSPICE and observe its output for (i) step, (ii) pulse and (iii)
rectangular wave.
3. Design a CE amplifier circuit using PSPICE in which the voltage gain is to be a minimum of 50
and the output signal voltage is to be riding on a dc level of 5 V. The maximum input signal
voltage at the base is 10 mV and Vcc=12 V.
1. RC low pass filter:
a. Pulse input :
b. Step input :
c. Triangular wave input :
2. RC high pass filter :
a. Pulse input:
b. Step input:
c. Rectangular wave input:
Sheet-3
1. Write MATLAB programs to generate the following signals:
(a) Unit step function (with and without delay)
(b) Ramp function
(c) ReLu function
(d) Leaky ReLu function
2. Write a MATLAB program to generate a sawtooth waveform which varies from –A to +A, and
plot the sequence using the ‘stem’ function. The input data specified by the user are the
desired length L, amplitude A and the period of observation N.
5. Write a MATLAB program to generate monotone signals in the audible range. Use
appropriate function to make the program output audible.
1. Unit step signal
Discret
1
0.8
0.6
amplitude
0.4
0.2
0
-5 -4 -3 -2 -1 0 1 2 3 4 5
samples
continous
1
0.8
0.6
amplitude
0.4
0.2
0
-5 -4 -3 -2 -1 0 1 2 3 4 5
time
2. A= [zeros(1,500) ones(1,501)]
3. t= 0:0.01:10
4. subplot(2,1,1)
5. stem(t-5,A)
6. xlabel(' samples')
7. ylabel('amplitude')
8. title ('Discret')
9. subplot(2,1,2)
10. plot(t-5,A)
11. xlabel('time')
12. ylabel('amplitude')
13. title ('continous')
14. grid on
2. RELU Function
for i=1:1:11
if (i>=0)
A(i)=i-1;
else (i<0)
A(i)= 0;
end
end
z=[zeros(1,10), A];
i=1:1:21
subplot(2,1,1)
plot(i-11,z)
xlabel('Time')
ylabel('amplitudes')
grid on
subplot(2,1,2)
stem(i-11,z)
xlabel('Samples')
ylabel('amplitudes')
grid on
10
6
amplitudes
0
-10 -8 -6 -4 -2 0 2 4 6 8 10
Time
10
6
amplitudes
0
-10 -8 -6 -4 -2 0 2 4 6 8 10
Samples
3. Ramp Function
for i=1:1:10
A(i)=i-1;
end
i=1:1:10;
subplot(2,1,1)
plot(i-1,A)
xlabel('Time')
ylabel('amplitudes')
grid on
subplot(2,1,2)
stem(i-1,A)
xlabel('Samples')
ylabel('amplitudes')
grid on
10
6
amplitudes
0
0 1 2 3 4 5 6 7 8 9
Time
10
6
amplitudes
0
0 1 2 3 4 5 6 7 8 9
Samples
4. Le. RELU Function
for i=1:1:21
k=i-11
if (k>=0)
A(i)= k;
else (k<0)
A(i)= 0.1*k;
end
end
% z=[zeros(1,10), A];
i=1:1:21
subplot(2,1,1)
plot(i-11,A)
xlabel('Time')
ylabel('amplitudes')
grid on
subplot(2,1,2)
stem(i-11,A)
xlabel('Samples')
ylabel('amplitudes')
grid on
10
5
amplitudes
-5
-10 -8 -6 -4 -2 0 2 4 6 8 10
Time
10
5
amplitudes
-5
-10 -8 -6 -4 -2 0 2 4 6 8 10
Samples
5. Sawtooth wave
T=10*(1/50);
Fs=1000;
dt=1/Fs;
t=0:dt:T-dt;
x=sawtooth(2*pi*50*t);
plot(t,x);
6. Monotone Signal in audible range :
A=1;
sf=50;
Fs=40000;
Val=[0];
for f=sf:50:1000
for n=0:1:5*Fs/f
x(n+1)= A*sin(2*pi*f*n/Fs);
Val=[Val x(n+1)];
end;
end;
plot(Val);
sound= audioplayer (Val,Fs);
play (sound);
Sheet-5
1. Develop a SIMULINK model for implementing the discrete-time system given by the following
input output relation:
(
y [ n ] =0.5 y [ n−1 ] +
x [ n]
y [ n−1 ] )
Show that the output y [ n ] of this system for an input x [ n ] =αu [ n ] with y [ −1 ] =1
converges to √ α as n → ∞, where α is a positive number.
2. Determine the impulse response of the LTI system, described by the following difference
equation, using SIMULINK
y [ n ] + 0.1 y [ n−1 ] −0.06 y [ n−2 ] =x [ n ] −2 x [n−1]
3. Using LABVIEW, demonstrate some basic logic gate operations.
(
1. y [ n ] =0.5 y [ n−1 ] +
x [ n]
)
y [ n−1 ]
:
2. y [ n ] + 0.1 y [ n−1 ] −0.06 y [ n−2 ] =x [ n ] −2 x [n−1] :
3. Using LABVIEW, demonstrate some basic logic gate
operations:
ALU DESIGN :
COMPARATOR:
FULL ADDER:
OR GATE:
SR FF: