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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 6: Sinusoidal Oscillators"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.3: Frequency_of_oscillaitor.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Exa 6.3\n",
"clc;\n",
"clear;\n",
"close;\n",
"// Given data\n",
"R3 = 6;// in k ohm\n",
"R4 = 2;// in k ohm\n",
"A = 1+(R3/R4);\n",
"if A>3 then\n",
" disp('The circuit will work as the oscillator')\n",
"end\n",
"R = 5.1;// in k ohm\n",
"R = R * 10^3;// in ohm\n",
"C = 0.001;// in µF\n",
"C = C * 10^-6;// in F\n",
"f = 1/(2*%pi*R*C);// in Hz\n",
"f = f * 10^-3;// in kHz\n",
"disp(f,'The frequency of oscillations in kHz is');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.4: Wien_Bridge_Oscillator.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Exa 6.4\n",
"clc;\n",
"clear;\n",
"close;\n",
"// Given data\n",
"C = 0.05;// in µF\n",
"C = C * 10^-6;// in F\n",
"f = 1;// in kHz\n",
"f = f * 10^3;// in Hz\n",
"R = 1/(2*%pi*f*C);// in ohm\n",
"R = R * 10^-3;// in k ohm\n",
"disp(R,'The value of R1 and R2 in kΩ is');\n",
"R4 = 10;// in k ohm\n",
"disp(R4,'The value of R3 in kΩ is');\n",
"R3 = 2*R4;// in k ohm\n",
"disp(R3,'The value of R4 in kΩ is');"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|