summaryrefslogtreecommitdiff
path: root/1319/CH1/EX1.14/1_14.sce
blob: 7e1c58a0128d82dcf74ff31e3a7b373a2ebe4319 (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
//Series Resonance in RLC circuit to find inductance and power

clc;
clear;

R=5;
C=50*(10^-6);
f0=100;
w=2*%pi*f0;

L=1/(C*(w^2));

V=200;
Xc=1/(C*w);
Xl=L*w;

I=V/R;

P=(I^2)*R;

Vc=I*Xc;

Zc=R+(Xl*%i);

Vz=I*(Zc);

Q0=Xl/R;

bw=f0/Q0;

printf('a) The inductance of the coil = %f mH \n',(10^3)*L)
printf('b) The power delivered to the coil = %f kW \n',(10^-3)*P)
printf('c) The voltage magnitude across the capacitor = %f V \n The voltage magnitude of the coil = %f V \n',Vc,abs(Vz)) // Magnitudes with at most accuracy
printf('d) The bandwidth of the circuit = %f \n',bw)