summaryrefslogtreecommitdiff
path: root/929/CH8/EX8.3/Example8_3.sce
blob: 1524bb0688c9a84c3bacd6af20aaa158168498b8 (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
//Example 8.3

clear;

clc;

R1=30*10^3;

R2=R1;

Cext=3*10^(-12);

GBP=20*10^6;

Cd=7*10^(-12);

Cc=12*10^(-12);

Cn=Cext+Cd+(Cc/2);

Rp=(R1*R2)/(R1+R2);

Cf1=0;

fz1=1/(2*%pi*Rp*(Cn+Cf1));

ft=20*10^6;

Q=sqrt((ft)/(2*fz1));

pm=(180/%pi)*acos((sqrt(1+(1/(4*Q^4))))-(1/(2*Q^2)));

Cf2=(R1/R2)*Cn;

fp=1/(2*%pi*R2*Cf2);

x=poly(0,'f');

A=-1/[(1+(%i*(x/fp)))*(1+(%i*(x/(0.5*ft))))];

printf("(a) Phase Margin with Cf absent=%.1f degrees",pm);

printf("\n(b) Cf for PM=90 degrees=%.2f pF",Cf2*10^12);

printf("\n(c) A(jf)=");

disp(A);