1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
{
"metadata": {
"name": "",
"signature": "sha256:78d18a14b78f673f5bd74601b5a29612b95caf61b293886366daec703c0960a4"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter-8 Non-Linear Circuits"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.2 - Page 258"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from numpy import pi\n",
"# Given data \n",
"R1= 5 # in k\u03a9\n",
"R2= 10.0 # in k\u03a9\n",
"V_peak= R1*R2/(R1+R2) # in V\n",
"Vav= V_peak/pi # in V\n",
"print \"Peak value of V1 = %0.2f V\" %V_peak\n",
"print \"Average value of Vo = %0.2f V\" %Vav"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Peak value of V1 = 3.33 V\n",
"Average value of Vo = 1.06 V\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.7 - Page 268"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"from math import exp\n",
"# Given data \n",
"t= 0 \n",
"Vc= 0 # in volts\n",
"Vo= 5 # in volts\n",
"R= 10 # in 2 \u03a9 (assume)\n",
"RC= 1 # (assume)\n",
"R3= 2*R # in \u03a9\n",
"R2= 3*R # in \u03a9\n",
"# From equation : T= 2*Rf*C*log[1+2*R3/R2]\n",
"T= 2*RC*math.log(1+2*R3/R2) \n",
"Vc_t= 2 # in volts\n",
"t= T/2 \n",
"#Voltage across capacitor,\n",
"# Vc_t= Vco*[1-%e**(-t/ReqC)]= 1/5*(VR+4*Vo)*[1-%e**(-t/4*RC/5)]\n",
"VR= Vc_t*5/(1-exp((-t/(4*RC/5))))-4*Vo \n",
"print \"The value of VR = %0.2f volts\" %VR"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of VR = -4.69 volts\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.9 - Page 270"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from __future__ import division\n",
"# Given data\n",
"# Part (c)\n",
"R1= 150 # in \u03a9\n",
"R2= 68*10**3 # in \u03a9\n",
"Vin= 50*10**-3 # in V\n",
"Vsat= 14 # in V\n",
"Vpositive= Vsat*(R1/(R1+R2)) # in V\n",
"V_UT= Vpositive # in V\n",
"Vpositive= -Vsat*(R1/(R1+R2)) # in V\n",
"V_LT= Vpositive # in V\n",
"print \"The value of V_UT = %0.4f V\" %V_UT\n",
"print \"The value of V_LT = %0.4f V\" %V_LT"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of V_UT = 0.0308 V\n",
"The value of V_LT = -0.0308 V\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.10 - Page 271"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data \n",
"V_UT= 5 # in V\n",
"V_LT= -5 # in V\n",
"# Hysteresis voltage,\n",
"Vhy= V_UT-V_LT # in V\n",
"print \"The hysteresis voltage = %0.f V\" %Vhy"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The hysteresis voltage = 10 V\n"
]
}
],
"prompt_number": 4
}
],
"metadata": {}
}
]
}
|