blob: 46a6ca00bd406c50ffd1596249d570b337401ac2 (
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
|
//Determine Circuit parameters for a circuit with a current source
clc;
clear;
I=2.5*(10^-3); // Current Source
R=100; // Resistance of the coil
L=1*(10^-3); // Inductance of the coil
fr=600*(10^3); // Resonance frequency
R2=60*(10^3); // Resistance in parallel with the coil
wr=2*%pi*fr;// Angular Resonance frequency
Q=wr*L/R; // For the coil
C=1/((wr^2)*L); // Capcitance in the circuit
Xc0=1/(wr*C);
Recc=Q*Xc0; // Equivalent resistance of coil and capacitor
Req=R*Recc/(R+Recc); //Equivalent resistance of the circuit
Qcir=wr*Req*C; // For the circuit
bw=fr/Qcir; // Bandwidth of the circuit
v=I*Req;
MaxE=C*(v^2); // Maximum energy stored by the capacitor
Pdr=(I^2)*Req; // Power dissipated in the resistor
// Textbook calculation for Equivalent resistance of C and Coil is wrong
printf('a) Q of the coil = %g\n',Q)
printf('b) Capacitance C = %g pF\n',C*(10^12))
printf('c) Q of the circuit = %g\n',Qcir)
printf('d) Bandwidth of the circuit = %g kHz\n',bw/1000)
printf('e) Maximum Energy stored in the capacitor = %g pJ\n',MaxE*(10^12))
printf('f) Power Dissipated in the resistor = %g mW\n',Pdr*1000)
|