### Related

R1:4300;

R2:475;

R3:105;

Calculate

##### cabs

z1: 3+4*%i;

z2: 2-%i;

cabs(z1+z2);

Calculate

sample : 32;

fpprintprec : 4 ;

Calculate

kill(all);

dB(x):= 20*log10(x);

Calculate

H(s):= 1/(s/f_to_w(10...

H(z):= 0.1*z^-1 + 0.5...

Calculate

R1:4300;

R2:475;

R3:105;

Calculate

V_in:24;

R_c1:500;

C_c1:2*10^-6;

Calculate

##### cabs-plot3d

plot3d(cabs(1+(-%i)*(...

Calculate

##### cabs-carg

b:4+3*%i;

cabs(b);

carg(b);

Calculate

kill(all);

dB(x):= 20*log10(x);

Calculate

### cabs

Run Example
```(%i1)kill(all);
(%o0)                                done
(%o1)          /usr/share/maxima/5.21.1/share/contrib/log10.mac
(%i2) H1(s):= 1/((s/1000+1)^2);
1
(%o2)                        H1(s) := -----------
s       2
(---- + 1)
1000
(%i3) H2(s):= (s/1000)/((s/1000+1)^2);
s
----
1000
(%o3)                        H2(s) := -----------
s       2
(---- + 1)
1000
(%i4) H3(s):= ((s/1000)^2)/((s/1000+1)^2);
s   2
(----)
1000
(%o4)                        H3(s) := -----------
s       2
(---- + 1)
1000
(%i5) H4(s):= H1(s)+H3(s);
(%o5)                       H4(s) := H1(s) + H3(s)
(%i6) plot2d([20*log10(cabs(H1(%i*f))),20*log10(cabs(H2(%i*f))),20*log10(cabs(H3(%i*f))),20*log10(cabs(H4(%i*f)))], [f, 10, 20000], [logx]);
plot```
Run Example
```load("log10");
(%o1)          /usr/share/maxima/5.21.1/share/contrib/log10.mac
(%i2) dB(x):= 20*log10(x);
(%o2)                        dB(x) := 20 log10(x)
(%i3) f_to_w(x):= 2*%pi*x;
(%o3)                        f_to_w(x) := 2 %pi x
(%i4) allroots(x^2 -1.99004745483398*x + 0.99007225036621);
(%o4) [x = 1.79564500253386E-4 %i + 0.99502372741699,
x = 0.99502372741699 - 1.79564500253386E-4 %i]
(%i5) allroots(x^2 -1.69065929318241*x + 0.73248077421585);
(%o5) [x = 0.13378551046297 %i + 0.84532964659121,
x = 0.84532964659121 - 0.13378551046297 %i]
(%i6) float(solve(exp(-x/48000) = 0.99502372741699,x)/(2*%pi));

rat: replaced -0.995023727417 by -8598/8641 = -0.995023724106
(%o6)               [0.1591549430919 x = 38.11085142032302]
(%i7) float(solve(exp(-x/48000) = 0.84532964659121,x)/(2*%pi));

rat: replaced -0.8453296465912 by -9783/11573 = -0.8453296465912
(%o7)               [0.1591549430919 x = 1283.644051295943]
(%i8) float(solve(exp(-x/48000) = 0.13378551046297,x)/(2*%pi));

rat: replaced -0.133785510463 by -1361/10173 = -0.1337855106655
(%o8)               [0.1591549430919 x = 15366.86120660835]
(%i9) H(s):= ((s^2)/(f_to_w(38.11085142032302)^2))/((s^2)/(f_to_w(38.11085142032302)^2) + s/(0.5*f_to_w(38.11085142032302)) + 1);
2
s
--------------------------
2
f_to_w (38.11085142032302)
(%o9) H(s) := --------------------------------------------------------------
2
s                              s
-------------------------- + ----------------------------- + 1
2                      0.5 f_to_w(38.11085142032302)
f_to_w (38.11085142032302)
(%i10) H2(s):= (1.52*(s^2)/(f_to_w(1283.644051295943)^2) + s/(0.13378551046297*f_to_w(1283.644051295943)) + 1)/((s^2)/(f_to_w(1283.644051295943)^2) + s/(0.5*f_to_w(1283.644051295943)) + 1);
(%o10) H2(s) :=
2
1.52 s                                  s
-------------------------- + ------------------------------------------ + 1
2                      0.13378551046297 f_to_w(1283.644051295943)
f_to_w (1283.644051295943)
---------------------------------------------------------------------------
2
s                              s
-------------------------- + ----------------------------- + 1
2                      0.5 f_to_w(1283.644051295943)
f_to_w (1283.644051295943)
(%i11) plot2d([dB(cabs(H(%i*f_to_w(f)))),dB(cabs(H2(%i*f_to_w(f))))],[f,10,24000],[logx,true]);
plot```
Run Example
```V_in:24;
(%o1)                                 24
(%i2) V_out:150;
(%o2)                                 150
(%o3)                                 0.1
(%i4) f_schalt: 100000;
(%o4)                               100000
(%i5) L_out:680*10^-6;
17
(%o5)                                -----
25000
(%i6) C_out: 94*10^-6;
47
(%o6)                               ------
500000
(%i7) ESR: 0.05;
(%o7)                                0.05
(%i8) D:(V_out-V_in)/V_out;
21
(%o8)                                 --
25
(%o9)                               1500.0
(%i10) D_: 1-D ;
4
(%o10)                                --
25
(%o11)                              12000.0
(%i12) w_z1: 1/(C_out*ESR);
(%o12)                         212765.9574468085
(%o13)                         56470.58823529411
(%o14)                         7.092198581560284
(%i15) Q: 1/(%pi*(D_*(3.320/1.515)+0.5-D));
94.09937888198716
(%o15)                         -----------------
%pi
(%i16) A_EA:38;
(%o16)                                38
(%i17) A_FB:1.26/V_out;
(%o17)                              0.0084
(%i18) A_DC_1: A_cm*A_EA*A_FB;
(%o18)                              3830.4
(%i19) A_DC_2: log(A_DC_1) / log(10);
8.250724515363654
(%o19)                         -----------------
log(10)
(%i20) A_DC_3: 20*A_DC_2;
165.0144903072731
(%o20)                         -----------------
log(10)
(%i21) ev(A_DC_3, numer);
(%o21)                         71.66488257452633
(%i22) w_z3: 1/(0.5*10^-6*1000);
(%o22)                              2000.0
(%i23) w_p2: 1/(0.5*10^-6*50000);
(%o23)                               40.0
(%i24) w_s: f_schalt*2*%pi;
(%o24)                            200000 %pi
(%i25) T(s):= (A_DC_1*((1+(s/w_z1))*(1-(s/w_z2))*(1+(s/w_z3)))/((1+(s/w_p1))*(1+(s/w_p2))*(1+(s/(Q*(w_s/2)))+(s^2/(w_s/2)^2))));
s          s          s
A_DC_1 ((1 + ----) (1 - ----) (1 + ----))
w_z1       w_z2       w_z3
(%o25)       T(s) := --------------------------------------------
2
s          s            s        s
(1 + ----) (1 + ----) (1 + ------- + ------)
w_p1       w_p2          w_s     w_s 2
Q (---)   (---)
2       2
(%i26) T(1);
3276.770780998678
(%o26)               ------------------------------------
1
---------------- + 1.000000106270627
2
10000000000 %pi
(%i27) plot2d(20 * log(cabs(T( %i * 2 * %pi * 10^x))) / log(10), [x,1,6]);
plotplot2d(carg(T( %i * 2 * %pi * 10^x)) / %pi * 180 + 360 - 180 , [x,1,6]);
plot```

Help for Cabs