summaryrefslogtreecommitdiff
path: root/Engineering_Circuit_Analysis_by_W_Hayt/9-The_RLC_Circuit.ipynb
blob: 990424c51989fe045c7317285810f97c9db0c8e4 (plain)
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
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 9: The RLC Circuit"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 9.1: The_Source_free_parallel_circuit.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"//Example 9.1\n",
"//Calculate resistor values for underdamped and overdamped responses\n",
"printf('Given')\n",
"disp('L=10mH and C=100uF')\n",
"L=10*10^-3;C=100*10^-6\n",
"w0=sqrt(1/(L*C))\n",
"printf('w0=%drad/s\n',w0)\n",
"//alpha(a)=1/(2*R*C)\n",
"disp('For an overdamped response')\n",
"disp('a > w0')\n",
"//On solving\n",
"disp('Hence')\n",
"disp('R<5ohm')\n",
"disp('For an underdamped response')\n",
"disp('a < w0')\n",
"//On solving\n",
"disp('Hence')\n",
"disp('R>5ohm')"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 9.4: Graphical_Representation_of_Overdamped_response.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Example 9.4\n",
"//Calculate settling time\n",
"t=0:0.1:5\n",
"ic=2*exp(-t)-4*exp(-t)\n",
"plot(t,ic)\n",
"xtitle('ic vs t','t in s','ic in A')\n",
"//Let ts be the settling time\n",
"//From the graph the maximum value is|-2|=2A\n",
"//'ts' is the time when ic has decreased to 0.02A\n",
"//On solving for 'ts'\n",
"ts=-log(0.02/4)\n",
"printf('ts=%3.2f s\n',ts)"
   ]
   }
],
"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
}