You are on page 1of 35

COMPUTER ASSIGNMENT NO 04

MATLAB/PSPICE SIMULATION

LAB NAME:

STUDENT NAME:

GROUP NO:

DATE OF SUBMISSION:

INSTRUCTORS NAME:

1
Objective:
To get Familiarize with PSPICE & MATLAB in designing of RLC & Op-Amp circuit to check their Future
responses at different values of parameters. Observe Importance of Transfer function & working in
s domain for easiness. Lastly, Configured convolution importance for given signals & check their
output for fulfilling requirements etc.

Simulations: PSpice

1. In PSpice, use a VPULSE1 voltage source to create the periodic signal vg(t) as shown in Figure 1b
and apply it to the series RLC circuit in Figure 1a. Perform a Parametric Sweep to plot v(t) for t
> 0 when R = 750Ω, R = 1250Ω, and R = 1500Ω. Please see the Appendix on how to run a
Parametric Sweep. Include vg(t) in the plot along with v(t) for all three cases of R. Assume that
v(0) = 0V and i(0) = 0A.

R 62.5mH

+
i (t)
v g (t ) 160nF v (t)

(a )
vg (t)( V )

t (ms)
0 2.5 5 7.5 10 12.5
(b )

Solution:

2
3
RESULTS:
From above figure It could be seen that as we Increase resistance of circuit pulses in systems become
stable with respect to reference point etc.
2. Use PSpice to find Io and Vo in the circuit below.

GIVEN CICUIT

𝑣 = 10𝑐𝑜𝑠𝐶103 + 3𝑣
Here voltage is connected to sin from cos
Therefore
𝑣 = 10𝑐𝑜𝑠𝐶103 + 1

𝑣 = 10𝑐𝑜𝑠𝐶103 + 1=10sin⁡(1037 − 900 )

𝑣 = 10𝐿−90

𝜔 = 103 ⁡ 𝑟𝑎𝑑⁄𝑠𝑒𝑐

Now Let node A and Bare Voltage of 𝑉𝐴 ⁡𝑎𝑛𝑑⁡𝑉𝐵


Apply KCL at A and B
𝑉𝐴 − 𝑉 𝑉𝐴 𝑉𝐴 − 𝑉𝐵
+ + =0
20 20 20
Apply KCL at B

4
𝑉𝐵 − 𝑉𝐴 𝑉𝐵
+ 𝐻𝑖𝑜 + =0
𝑍𝑐 30 + 𝑍𝐿
−𝑗
𝑍𝑐 = , 𝑍𝐿 = 𝐽𝑥𝑙
𝑋𝑐

1 1 1
𝑋𝑐 = = =
2𝜋𝑓𝑐 𝜔𝑐 103 𝑥50𝑥10−6

1 1000
𝑋𝑐 = −3
= =2
50𝑥10 50
𝑋𝑐 = 2𝜋
Now
At Node A
𝑉𝐴 − 𝑉 𝑉𝐴 (𝑉𝐴 − 𝑉𝐵 )2
+ + =0
20 20 −𝑗

𝑉𝐴 −10𝐿−90 𝑉
20
+ 20𝐴 + 𝑗2(𝑉𝐴 − 𝑉𝐵 ) = 0 ------------------------1

At node B
𝑉𝐵 − 𝑉𝐴 𝑉𝐵
+ 𝐻𝑖𝑜 + =0
𝑍𝑐 30 + 𝑍𝐿
𝑉𝐴
But here the value of 𝑖0 = 20

𝑉𝐵 − 𝑉𝐴 4𝑉𝐴 𝑉𝐵
+ + =0
𝑍𝑐 20 30 + 𝑗10
4𝑉𝐴 𝑉
(𝑉𝐴 − 𝑉𝐵 )𝑗2 =
20
𝐵
+ 30+𝑗10 = 0 ----------------------2

Now solve equation 1 & 2


From 1
𝑉𝐴 − 10𝐿 − 90 𝑉𝐴 𝑗𝑖𝑜(𝑉𝐴 − 𝑉𝐵 )
+ + =0
20 20 −𝑗
𝑉𝐴 − 10𝐿 − 90 + 𝑉𝐴 − 𝑗ℎ𝑜⁡𝑉𝐴⁡ − 𝑗ℎ𝑜⁡𝑉𝐵⁡ = 0
𝑉𝐴 + 10𝑗 + 𝑉𝐴 − 𝑗ℎ𝑜⁡𝑉𝐴⁡ − 𝑗ℎ𝑜⁡𝑉𝐵⁡ = 0
𝑉𝐴 [2 + 𝑗ℎ𝑜] − 40⁡𝑉𝐵⁡ = −10𝑗

5
𝑉𝐴 [2 + 𝑗ℎ𝑜] − ⁡𝑉𝐵⁡ = −10𝑗[−𝑗ℎ𝑜]=-10j ----------------------- (3)
𝑉𝐵
4𝑉𝐴 + + 2𝑗(𝑉𝐴 − 𝑉𝐵 ) = 0
30 + 𝑗10
120𝑉𝐴 + 40𝑗𝑉𝐴 + 𝑉𝐵 + (60𝑗 − 40)(𝑉𝐴 − 𝑉𝐵 ) = 0
120𝑉𝐴 + 40𝑗𝑉𝐴 + 𝑉𝐵 + 40𝑉𝐴 − 60𝑗𝑉𝐴 − 40𝑉𝐵 + 60𝑗𝑉𝐵 = 0
𝑉𝐴 [160 − 20𝑗] + ⁡𝑉𝐵⁡ [−39 + 60𝑗] = 0⁡⁡⁡⁡------------------ (4)

Now solve 3 & 4


𝑉𝐴 [2 − 𝑗ℎ𝑜] + ⁡𝑉𝐵⁡ [−𝑗ℎ𝑜] = −10𝑗⁡⁡⁡⁡ ----------------------- (3)
𝑉𝐴 [160 − 20𝑗] + ⁡𝑉𝐵⁡ [−39 + 60𝑗]=0 ----------------------- (4)
Let from 3
𝑉𝐵 𝑗ℎ𝑜 − 10𝑗=⁡𝑉𝐴 [2 + 𝑗ℎ𝑜]
⁡𝑉𝐴 (2 + 𝑗ℎ0) + 10𝑗
⁡𝑉𝐵 =
40𝑗
1 1
⁡𝑉𝐴 ( + 1) +
20𝑗 4𝑗
⁡𝑉𝐵 = ⁡𝑉𝐴 (1 − 0.05𝑗) + 0.25𝑗 --------------- (5)
Put ⁡𝑉𝐵 ⁡⁡𝑖𝑛 4
𝑉𝐴 [160 − 20𝑗] + ⁡𝑉𝐵⁡ [−39 + 60𝑗]
Put 5 in 4
𝑉𝐴 (160 − 20𝑗) + [𝑉𝐴 (1 − 0.05𝑗) + 0.25𝑗𝑗] − (−39 + 60𝑗) = 0
𝑉𝐴 (160 − 20𝑗) + [𝑉𝐴 (1 − 0.2𝑗)(−39 + 60𝑗)] = 0
𝑉𝐴 (160 − 20𝑗)+[−39𝑉𝐴 + 60𝑗𝑉𝐴 − 7.8𝑗 − 12] = 0
𝑉𝐴 (160 − 20𝑗)+[−39𝑉𝐴 + 60𝑗𝑉𝐴 − 7.8𝑗 − 12] = 0
𝑉𝐴 [160 − 20𝑗 + 60𝑗𝑉𝐴 − 7.8𝑗 − 12] = 0
𝑉𝐴 [121 + 40𝑗] − 7.8𝑗 − 12 = 0
𝑉𝐴 [121 + 40𝑗]=(12 + 7.8𝑗)
12 + 7.8𝑗
𝑉𝐴 =
121 + 40𝑗
𝑉𝐴 = 0.087 − 10𝑗

6
Now
0.087+0.1𝑗
Io=
20

Io=(0.000435+0.05j)A
In Rectangular form

Io=4.39x10−5Amp
Io=0.44 ma =>Magnitude
Now
𝑉0 = 𝐼30 𝑥30𝑜𝑚𝑒𝑔𝑎
𝑉𝐵
𝐼30 =
(30 + 𝑗𝑖𝑜)𝑜𝑚𝑒𝑔𝑎
𝑉𝐵
𝐼30 = 𝑥30
(30 + 𝑗𝑖𝑜)

We get
𝑉𝐴 (2 + 𝑗ℎ𝑜) + 10𝑖
𝑉𝐵 =
40𝑗
(0.087 + 0.1𝑗)[2 + 𝑗ℎ𝑜 + 10𝑗]
𝑉𝐵 =
40𝑗
𝑉𝐵 = −0.073 + 0.12𝑗
(0.6 + 0.12𝑗)(30)
𝑉0 =
30 + 𝑗10

−18+3.6𝑗 √336.96 18.35


𝑉0 = = =
30+𝑗10 √1000 31.6

𝑉0 = 4.8𝐿350

𝑉0 = 4.8𝐿350 V01+5
3. Use PSpice to find Vo in the circuit shown below. Let

vs1 = 240cos(100t + 90◦ ) V and vs2 = 160cos(100t) V

7
FIGURE 3

Solution:

Given circuit

𝑣31 = 290cos⁡(100 + 900 )

𝑣32 = 160cos⁡(100𝑡)

w=100, round/sec

𝑋𝐿1 = 𝑗𝑊𝐿1

𝑋𝐿1= j(100)(300x10−3 )

𝑋𝐿1 = 30𝑗

𝑋𝐿2 = 𝑗𝑊𝐿2

𝑋𝐿2=j(100)(400x10−3 )
8
𝑋𝐿3 = j(100)(200m)

𝑋𝐿3 = 20𝑗
1
𝑋𝑐 =
𝑗𝑤𝑐
1
𝑋𝑐 = = 20𝑗
𝑗(100)(50𝑥106 )

At node a by KCL we have


𝑉𝑎 − 240𝐿90 𝑉𝑎 𝑉𝑎 − 𝑉𝑏
+ + =0
20 30𝑗 40𝑗
𝑉𝑎 −240𝐿90
 6( ) + (−𝑗)(4𝑣𝑎) + (−𝑗(3(𝑉𝑎 − 𝑉𝑏 ) = 0
20

 6𝑉𝑎 − 4𝑗𝑣𝑎 − 3𝑗𝑣𝑎 + 3𝑗𝑣𝑏 = 2 + 0𝐿90𝑥6 = 1440𝐿90


 𝑉𝑎 (6 − 4𝑗 − 3𝑗) + 𝑉𝑏 3𝑗 = 1440𝐿90
 𝑉𝑎 (6 − 7𝑗) + 𝑉𝑏 3𝑗 = 1440𝐿90
1440𝐿90 −𝑉𝑏 (3𝑗)
 𝑉𝑎 = (6−3𝑗)

𝑉𝑎 − 𝑉𝑏 𝑉𝑏 𝑉𝑏 − 160
+ + =0
40𝑗 −20𝑗 (10 + 20𝑗)

(𝑉𝑎 − 𝑉𝑏 ) 𝑗(𝑉𝑏 ) (10 − 20𝑗)(𝑉𝑏 − 160)


−𝑗 + + =0
40 20 500

−𝑗25(𝑉𝑏 −𝑉𝑎 )+50𝑗(𝑉𝑏 )+2(10−20𝑗)(𝑉𝑏 −160)


=0
1000

25𝑗𝑉𝑎 + 𝑉𝑏 (25𝑗 + 50𝑗 + 10 − 40𝑗)⁡=3200-6400j


25𝑗𝑉𝑎 + 𝑉𝑏 (10 − 50𝑗) = 3200 − 6400𝑗)
Substitute 𝑉𝑎 in above equation
1440(900 −𝑉𝑏 (3𝑗)
 25j( (6−7𝑗)
)+ 𝑉𝑏 (10 − 15𝑗) = 3200 − 6400𝑗

 =39040.748𝐿−130.6 + 𝑉𝑏 (5.29 + 6.176) + 𝑉𝑏 (10 − 15𝑗))=3200 − 6400𝑗


 𝑉𝑏 (5.2941 − 8.8235𝑗) = (3200 − 6400𝑗) − (3904071𝐿 − 130.6
 5741.104-3435.292j
 𝑉𝑏 = 378.911𝐿−0.91129

9
4. Use PSpice to find the magnitude response |H(jω)| and the phase response H(jω)◦ in the
circuit shown below. Use the generic OPAMP part under the ANALOG.OLB library.

Solution:

10
Simulation Waveform:

Simulation Circuit Vs Waveform:

Simulations: MATLAB

5. The operational amplifier in the circuit in Figure 5 is ideal and is operating within its linear
region.

11
10nF

250nF
10 kΩ 100kΩ

+
vi +
20 kΩ vo

Figure 5

(a) Calculate the transfer function H(s) = Vo(s)/Vi(s).


(b) Find vo(t) due to a unit step input.
(c) Find vo(t) due to a unit ramp input.
(d) If vi(t) = 2cosωt V, what is the steady-state expression for vo(t) when ω = 100, 200, 400,
800, 1600, 3200, 6400, 12800, 25600, 51200, and 102400 rad/s?
Solution:
10𝑠
109 (100𝑘𝑜ℎ𝑚)( 𝑠 ) (100𝑘⁡𝑥(109 )
1𝑜𝑘𝑜ℎ𝑚 + & 10
10𝑠 ⁡=⁡
250𝑠 10𝑘𝑜ℎ𝑚 10𝑠(100𝑘𝑜ℎ𝑚)+109
10𝑠

𝑉𝑖 𝑠 − 𝑜 𝑉𝑖 𝑠 − 𝑜
9 =
10 10𝑘 + 109
10𝑘 +
250𝑠 1000𝑘𝑠 + 109
𝑉0 𝑠
𝑇(𝑠) =
𝑉𝑖 𝑠
100𝑘𝑥109
𝑉0 𝑠 −( )
= 1000𝑘𝑠 + 109
𝑉𝑖 𝑠 250𝑠𝑥1014 + 109
−( )
250𝑠

𝑉0 𝑠 −108 250𝑠
= 𝑥
𝑉𝑖 𝑠 𝑠 + 10 250𝑥104 (𝑆 + 400)
3

𝑉0 𝑠 −108 𝑥104 − 𝑠
=
𝑉𝑖 𝑠 (𝑠 + 1000)(𝑠 + 400)

12
𝑉0 𝑠 104 𝑠
=
𝑉𝑖 𝑠 (𝑠 + 1000)(𝑠 + 400)
𝑉0 (𝑡) if 𝑉𝑖 =𝜇(𝑡)
1
𝑉𝑖 (𝑠) =
𝑠

−104 𝑠(𝑉𝑖 (𝑠))


𝑉0 (𝑠) =
(𝑠 + 1000)(𝑠 + 400)

−104
𝑉0 (𝑠) =
(𝑠 + 1000)(𝑠 + 400)
Next step to get Partial Function

−50/3 50/3
𝑉0 (𝑠) = +
(𝑠 + 400) (𝑠 + 1000)

1 1
𝑉0 (𝑠) = 50/3 [ − ]
(𝑠 + 1000) (𝑠 + 400)
𝑉0 (𝑠) = 50/3[𝑒 −1000𝑡 − 𝑒 −400𝑡 ]
𝑉0 (𝑡) if 𝑉𝑖 =𝑟(𝑡)
1
−104 𝑠( 𝑠 ) −104
𝑉0 (𝑠) = =
(𝑠 + 400)(𝑠 + 1000) 𝑠(𝑠 + 400)(𝑠 + 1000)
Get Potential Fractions

1 1 1
(40) ( ) (60) −104
𝑉0 (𝑠) = + 24 − =
𝑠 𝑠 + 400 𝑠 + 1000 𝑠(𝑠 + 400)(𝑠 + 1000)

1 1 1
𝑉0 (𝑡) = − 40 𝑢(𝑡) + 24 𝑒 −400𝑡 − 60 𝑒 −1000𝑡

d)⁡𝑽𝒊 = 𝟐𝒄𝒐𝒔𝒘𝒕⁡𝑽
𝑽𝟎 (𝒕) =?

W=100, 200, 400,800,1600,3200,6400,12800,2500,5200 and 102400 rad/sec


Input is sinusoidal output is also sinusoidal for linear systems only change in magnitude
And phase
−104
|𝐻(𝑗𝑤)| = 9⁡⁡⁡; 𝐻(𝑠) =
(𝑠 + 400)(𝑠 + 1000)

13
−104 𝑗𝑤
𝐻(𝑗𝑤) =
(𝑗𝑤 + 400)(𝑗𝑤 + 1000)
−104 𝑗𝑤
|𝐻(𝑗𝑤)| =
√𝑤 2 + (400)2 √𝑤 2 + (1000)2

𝑤
|𝐻(𝑗𝑤)| = −90 − tan−1
400
W=100
104 𝑤 ∗ ⁡2 𝑤 𝑤
𝑉0 (𝑡) = cos⁡(𝑤𝑡 − 90 − tan−1 ( ) − tan−1( )
√𝑤 2 + (400)2 √𝑤 2 + (1000)2 400 1000

𝑤
104 ∗ ⁡100 ∗ 2 −1
𝑤 −1 ( ) ,⁡⁡⁡⁡⁡𝑤 = 100
𝑉0 (𝑡) = cos⁡(𝑤𝑡 − 90 − tan ( ) − tan 1000
√1002 + (400)2 √1002 + (1000)2 400

𝑉0 (𝑡) = 4.82 cos(100𝑡 − 109.740)


W=200,

𝑉0 (𝑡) = 8.78 cos(200𝑡 − 127.87)


W=400
𝑉0 (𝑡) = 13.13 cos(400𝑡 − 156.80)
W=1600
𝑉0 (𝑡) = 10.28 cos(1600𝑡 − 223.95)
W=3200
𝑉0 (𝑡) = 5.92 cos(3200𝑡 − 245.52)
W=6400
𝑉0 (𝑡) = 3.08 cos(6400𝑡 − 256.80)
W=12800
𝑉0 (𝑡) = 1.556 cos(12800𝑡 − 263.74)
W=25600
𝑉0 (𝑡) = 0.7805 cos(25600𝑡 − 266.80)
W=51200
𝑉0 (𝑡) = 0.3905 cos(51200𝑡 − 268.80)
W=102400
𝑉0 (𝑡) = 0.19533 cos(102400𝑡 − 269.80)
6. Find y(t) = x(t) ∗ h(t) for each paired x(t) and h(t) in Figure 6.

x(t) h(t)

t
1
14
t
0 1 0 1
a) Find y(t)= x(t)*h(t).

Fold the signal h(λ) & draw.

By shifting the signal t units & drawing

Mathematical expression for h (t-λ) is

𝑡 − λ,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡t − 1 < λ < t,


h(t − λ) = { ⁡
1,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡ − ∞ < λ < t − 1.

For −∞ < t < 0⁡the two signals will not overlap.

Hence,
Y (t) = 0, −∞ < t < 0.

For 0<t<1, the two signals will overlap between 0 & t.

15
Calculate the value of y(t) for 0<t<1.

Obtain y(t) by integrating the overlap area.

𝑡
y(t) ⁡ = ∫ (t − λ)(1)dλ⁡
0

𝑡 𝑡
y(t) = t ∫ dλ − ∫ λ⁡dλ⁡
0 0

𝑡
t[λ2 ]0 𝑡2 𝑡2
y(t) = t[λ]𝑡0 − = 𝑡2 − =
2 2 2

For 1<t<2 the two signals will overlap b/w 0 to 1 via t-1.

Now calculate the value of y(t) for 1<t<2.

Obtain y(t) by Integrating the Overlap area.

1
y(t) ⁡ = ∫ ℎ(t − λ)⁡x(λ)⁡
0

𝑡−1 1
y(t) ⁡ = ∫ ℎ(t − λ)⁡x(λ)dλ + ⁡∫ ℎ(t − λ)⁡x(λ)dλ
0 𝑡−1

𝑡−1 1
y(t) ⁡ = ∫ (1)⁡(1)⁡dλ + ∫ (𝑡 − λ)⁡(1)dλ
0 𝑡−1

16
𝑡−1 1 1
y(t) ⁡ = ∫ dλ + t ∫ dλ⁡ − ∫ λ⁡dλ
0 𝑡−1 𝑡−1

[λ2 ]1𝑡−1
y(t) = ⁡ [λ]𝑡−1
0 + 𝑡[λ]1𝑡−1 −
2

1 − ( 𝑡 − 1) 2
y(t) = ⁡t − 1 + t⁡[1 − (t − 1)] −
2

2𝑡 − 𝑡2
y(t) = ⁡t − 1 + 2t − t 2 −
2

2
𝑡2 ⁡
y(t) = ⁡ −t + + 3𝑡 − 𝑡 − 𝑡
2

𝑡2 ⁡
y(t) = ⁡ − + 2𝑡 − 1
2

For 2 < 𝑡 < ∞,⁡ the two signals will overlap between 0 to 1.

Calculate the value of y(t) for 2 < 𝑡 < ∞,⁡

Obtain y(t) by integrating the overlap area.


1
y(t) ⁡ = ∫ ℎ(t − λ)⁡x(λ) 𝑑λ
0

1
y(t) ⁡ = ∫ (1)⁡(1) 𝑑λ
0

1
y(t) = ∫ 𝑑λ = [λ]10 = 1
0

Therefore,

17
0,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡ − ∞ < 𝑡 < 0
𝑡2 ⁡
,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡0 < 𝑡 < 1,
2
y (t ) =
𝑡2 ⁡
− + 2𝑡 − 1, 1 < 𝑡 < 2,
2
{1,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡2 < 𝑡 < ∞

h (t )

x (t) 2
2e− t
1

t t
0 0
(b )

Find y(t)= x(t)*h(t).

Fold the signal h(λ) & draw.

By shifting the signal t units & drawing

Mathematical expression for h (t-λ) is


−(𝑡−λ)
h(t − λ) = {2𝑒 ,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡ − ∞ < λ < t,⁡
0,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑡 < λ < ∞.
18
For −∞ < t < 0⁡the two signals will not overlap.

Hence,
Y (t) = 0, −∞ < t < 0.

For 0<t<∞, the two signals will overlap between 0 & t.

Calculate the value of y (t) for 0<t<∞

Obtain y (t) by integrating the overlap area.

𝑡
y(t) ⁡ = ∫ ℎ(t − λ)⁡𝑥(λ)dλ⁡
0

𝑡
y(t) ⁡ = ∫ (2𝑒 −(𝑡−λ) )(1)dλ
0

𝑡
y(t) ⁡ = 2 ∫ 𝑒 −(𝑡−λ) ⁡dλ
0

𝑡
[𝑒 −(𝑡−λ) ]0
y(t) ⁡ = 2
−(−1)

y(t) ⁡ = 2[1 − e−t ]

Therefore,

19
0,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡ − ∞ < 𝑡 < 0,
y (t ) = { [
2 1 − e−t ],⁡⁡⁡⁡0 < 𝑡 < ∞.
7. Obtain the convolution of the pairs of signals in Figure 7.

x(t) h(t)

1 1

t 0 t
0 1 1 2
−1

(a )
x(t) h(t)

Solution:

From figure 1, x [t-⁡λ] & h(λ) overlaps in the interval 0<t<1 as follows

Figure 1

Calculate y(t) in the interval 0<t<1.

y(t) = x(t) ∗ ℎ(𝑡)


1
y(t) ⁡ = ∫ (1)⁡(1)dλ⁡
0

y(t) = [λ]𝑡0 ⁡

y(t) = t⁡

From figure 2, x(𝑡 − λ) & ℎ(λ) overlap in the Intervals 1<t<2 as follows
20
Figure 2

Calculate y(t) in the interval 1<t<2

y(t) = x(t) ∗ ℎ(𝑡)


1 𝑡
y(t) = ∫ (1)⁡(1)dλ + ∫ (−1)⁡(1)dλ
𝑡−1 1

y(t) = [λ]1𝑡−1 + [λ]1𝑡 ⁡⁡

y(t) = 3 − 2t

From figure 3, x(𝑡 − λ) & ℎ(λ) overlap in the Intervals 2<t<3 as follows

Figure 3

Calculate y(t) in the interval 2<t<3

y(t) = x(t) ∗ ℎ(𝑡)

21
2
y(t) = ∫ (1)⁡(−1)dλ
𝑡−1

y(t) = [−λ]2𝑡−1 ⁡⁡

y (t ) = t − 3

Hence,
𝑡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡0 < 𝑡 < 1
3 − 2𝑡,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡1 < 𝑡 < 2,
y(t) = {
𝑡 − 3⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡2 < 𝑡 < 3,
0⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒⁡

Hence required convolution has been determined.


b) Part B

t
1

t
0 1 0 1 2 3 4 5
(b)

Figure 7: Signal pairs

Solution:

Determine 𝑓1 (𝑡)
1−0
𝑓1 (𝑡) − 0 = (𝑡 − 0)
1−0
𝑓1 (𝑡) = 𝑡

Now determine 𝑓1 (𝑡 − λ).

𝑓1 (𝑡 − λ) = 𝑡 − λ
For t<2 there is no overlap between 𝑓1 (𝑡 − λ) & 𝑓2 (λ)

So, y(t) = 0

22
From Figure 4, 𝑓1 (𝑡 − λ) & 𝑓2 (λ)⁡overlaps in the Interval 2<t<3 as follows

Figure 4

Calculate y(t) in the interval 2<t<3

y(t) = 𝑓1 (𝑡) ∗ 𝑓2 (𝑡)


𝑡
y(t) = ∫ 𝑓1 (𝑡 − λ)⁡. 𝑓2 (λ)dλ
2

𝑡
y(t) = ∫ (𝑡 − λ)⁡. (1)dλ
2

𝑡
λ2
( )
y t = [λ𝑡 − ]
2 2

t2 2
y(t) = [𝑡 − − (2𝑡 − 2)]
2

t2
y(t) = [ − 2𝑡 + 2)]
2

From Figure 5, 𝑓1 (𝑡 − λ) & 𝑓2 (λ)⁡overlaps in the Interval 3<t<5 as follows

FIGURE 5
23
Calculate y(t) in the interval 3<t<5
𝑡
y(t) = ∫ 𝑓1 (𝑡 − λ)⁡. 𝑓2 (λ)dλ
𝑡−1

𝑡
y(t) = ∫ (𝑡 − λ)⁡. (1)dλ
𝑡−1

𝑡
λ2
( )
y t = [λ𝑡 − ]
2 𝑡−1

1
y (t ) =
2
From Figure 6, 𝑓1 (𝑡 − λ) & 𝑓2 (λ)⁡overlaps in the Interval 5<t<6 as follows

Figure 6

Calculate y(t) in the interval 3<t<5


5
y(t) = ∫ 𝑓1 (𝑡 − λ)⁡. 𝑓2 (λ)dλ
𝑡−1

5
y(t) = ∫ (𝑡 − λ)⁡. (1)dλ
𝑡−1

5
λ2
y(t) = [λ𝑡 − ]
2 𝑡−1

24
t2
y (t ) = − + 5𝑡 − 12
2
0,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑡 < 2
𝑡2 ⁡
− 2𝑡 + 2,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡2 < 𝑡 < 3,
2
1
y (t ) = ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡3 < 𝑡 < 5 ⁡
2
𝑡2 ⁡
− + 5𝑡 − 12⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡5 < 𝑡 < 6,
2
{0⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

8. Let x(t) and h(t) be as shown below. Find y(t) = x(t) ∗ h(t).

h(t)
4

x(t) 0 t
2 4 6 8 10
2

t −4
0 2 4 6
Figure8
Solution:

Lets Fold X(t) and slide on y(t) . For t>0 no overlapping occur as shown below
x(t)=0.

For 0<t<2 there would be overlapping as shown in below figure.


25
𝑡
𝑧(𝑡) = ∫ (2)(4)𝑑𝑡 = 8𝑡
0

For 2<t<6 two functions will overlap as shown in below figure.

2 𝑡
𝑧(𝑡) = ∫ (2)(4)𝑑λ + ∫ (2)(−4)𝑑λ = 16 − 8𝑡
0 0

For 6>t>8 overlapping given below as shown in below figure.

26
2 6 𝑡
𝑧(𝑡) = ∫ (2)(4)𝑑λ + ∫ (2)(−4)𝑑λ + ∫ (2)(4)𝑑λ
𝑡−6 2 6

2 6 𝑡
𝑧(𝑡) = 8λ | ⁡− 8λ | + 8λ | = −16
𝑡−6 2 6

For 8>t>12 overlapping given below

6 8
𝑧(𝑡) = ∫ (2)(−4)𝑑λ + ∫ (2)(4)𝑑λ
𝑡−6 6

6 8
𝑧(𝑡) = −8λ | + 8λ | = 8𝑡 − 80
𝑡−6 6

For 12<t<14 overlapping given below

27
8
𝑧(𝑡) = ∫ (2)(4)𝑑λ
𝑡−6

8
𝑧(𝑡) = 8λ | = 112 − 8𝑡
𝑡−6

Hence,

8𝑡,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡0 > 𝑡 > 2


16 − 8𝑡,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡2 > 𝑡 > 6,
−16⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡6 > 𝑡 > 8
z(t) =
8𝑡 − 80⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡8 > 𝑡 > 12
112 − 8𝑡,⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡12 > 𝑡 > 14
{ 0⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

9. Given the following input voltage and circuit shown in Figure 9:

vs(t)

3V

t [s ]
0 1
(a )

28
1Ω
+

v s (t ) 1F 2Ω vo (t)

(b )

Figure 9: (a) Input voltage and (b) RLC Circuit.

(a) Find the Laplace Transform of the voltage shown in Figure 9a.
(b) Using that value of vs(t) in the circuit shown in Figure Figure 9b, find the value of vo(t).
Solution:

Figure 1:

A) According to above graphs if we subtract graph 2 from graph 1 than we get graph given in
figure 1. As
𝑉𝑠 (𝑡 ) = 3𝑢(𝑡 ) − 3𝑢(𝑡 − 1)________(𝑖)
B taking Inverse Laplace Transform of figure given in equation I we get.

29
3 3𝑒 −𝑠
𝑉𝑠 (𝑡 ) = − ________(𝑖𝑖)
𝑠 𝑠
Appling Kirchhoff current law at node 1 of Figure 9(b). As all current are taken
outgoing. So, outgoing currents value will be positive & Vice versa.
Calculating Vo(t) . From node Voltages
[𝑉𝑜(𝑡 ) − 𝑉𝑠(𝑡 )] 𝑉𝑜(𝑡 ) 𝑉𝑜(𝑡 )
+ + =0
1 2 𝑋𝑐
1
𝑉𝑜(𝑡 ) [1 + + 𝑗𝑤] = 𝑉𝑠(𝑡)⁡
2
[𝟑𝒖(𝒕) − 𝟑𝒖(𝒕 − 𝟏)]
𝑽𝒐(𝒕) =
𝟏 + 𝟎. 𝟓 + 𝒋𝒘

[𝟑𝒖(𝒕) − 𝟑𝒖(𝒕 − 𝟏)]


𝑽𝒐(𝒕) =
𝟏. 𝟓 + 𝒋𝒘

Analysis:
From the above PSpice simulation. It could be seen that for given RLS
circuit as we change an of parameters like R, C or L response of output voltages get
changed according to its reference level towards stability. From 2nd solution by use of
Transfer function relation & KCL & KVL we get values of Io & Vo with respect to time.
Next according to Solution of question 4 we successful draw magnitude & phase
response of transfer function for the given values of Input & results are added below.
From MATLAB portion b use of convolution relation step by step multiplied signal &
received inverted output. Also check response of output voltages at different value of
omega etc.
Conclusion:

After performing this assignment I learned about importance of simulation results for
PSPICE & MATLAB. I learned that in case of simulation we can get an unknown
parameter present in circuit particularly voltages & current. I learned at various input

30
to simulation circuit its output response would differ. In case of MATLAB if properly
signals are given in discrete form we can check their response by their default
MATLAB function etc.

Appendix

Example For the source-free parallel RLC circuit shown below, perform a Parametric Sweep to plot
v(t) for t > 0, assuming v(0) = 5V, i(0) = 0A. Consider these cases: R = 1.923Ω, R = 5Ω, and R = 6.25Ω.

v(t)

+ +
+

R v 1H v I 0 10 mF V0


− −

Figure10

Solution Wire the circuit in PSpice as follows:

CMAX
L5
R7 1H C4
1k 10m
IC = 0A IC = 5V

Figure 11

Next, change the resistor value from 1kΩ to {Rvar} as shown below:

CMAX
L5
R7 1H C4
{Rvar } 10m
IC = 0A IC = 5V

31
0

Figure 12

The next step is to place a part named PARAM from the SPECIAL.OLB library:

PARAMETERS:

CMAX
L5
R7 1H C4
{Rvar } 10m
IC = 0A IC = 5V

Figure 13

Select and double-click on PARAMETERS. This will open the Property Editor tab.

Figure 14

Click on New Property, and under Name, type Rvar. Under Value you need to type any resistor value,
therefore simply type 1k. Click OK.

32
Figure 15

The New Property will be added in alphabetical order, thus simply scroll to the right to locate your
new added property Rvar. Once the property is located, select it, and hit right-click. Then select
Display.

Figure 16

In the new window select Name and Value. Click OK.

Figure 17

Now, go back to your schematic. We can see that the Rvar is now present.

PARAMETERS:
Rvar = 1k

CMAX
L5
R7 1H C4
{Rvar } 10m
IC = 0A IC = 5V

33
Figure 18

Next, create a new simulation profile. Make sure the analysis type is set to Time Domain (Transient).
Under options, check the Parametric Sweep option. Under Sweep variable select Global parameter,
and type Rvar in the Parameter name field. Finally, under Sweep type select Value list and type the
resistor values separated by a comma.

Figure 19

Finally, click OK. We are now ready to simulate. Hit the play button and wait for the simulation
window to pop-up. You will get the following message:

Figure 20

In this window you can select individual cases for R. With all three cases selected, click OK.
Now place a Voltage Marker at the top node:
PARAMETERS:

34
Rvar = 1k

CMAX
L5
R7 1H C4
{Rvar } 10 m
IC = 0A IC = 5V

Figure 21

In the simulation window you should see all three plots in the same graph for the different values of
R.
5.0V

4.0V

3.0V

2.0V

1.0V

0V

-1.0V
0s 0.2s 0.4s 0.6s 0.8s 1.0s
V(L5:1)
Time

Figure 22

35

You might also like