#given
w=8e-3;#second
c1=0.1e-6;#farad
#determine r1
r1=w/(1.11*c1);
print'R1 ',round(r1/1e3),'Kohm'
#given
ra=5e3;#ohm
rb=ra;
c1=0.01e-6;#farad
#determine frequency dutycycle
freq=1.45/((ra+2*rb)*c1);#frequency
w=(ra+rb)/(ra+2*rb);#dutycycle
print'frequency ',round(freq/1e3,3),'Khz'
print'dutycycle ',round(w,3)
#given
freq=2e3;#hz
w=0.75;
c1=0.1e-6;#farad
#determine ra rb
#for 0.75 dutycycle rb=0.5*ra
ra=1.45/freq*(1/(c1*2));
rb=0.5*round(ra);
print'Ra ',round(ra/1e3,3),'Kohm'
print'Rb ',round(rb/1e3,3),'Kohm'
#given
ra=2.2e3;#ohm
rb=6.8e3;#ohm
c1=0.01e-6;#farad
#determine ontime offtime frequency dutycycle
t1=0.69*(ra+rb)*c1;#on time
t2=0.69*rb*c1;#tof
freq=1.45/((ra+2*rb)*c1);#frequency
w=ra/(ra+2*rb);#duty cycle
print'on time ',round(t1*1e3,3),'milisecond'
print'tof ',round(t2*1e3,3),'milisecond'
print'frequency ',round(freq/1e3,3),'Khz'
print'duty cycle ',round(w,3)
#given
t1=4;#second
t2=2;#second
c1=1e-6;#farad
#detemine ra rb
t12=t1+t2;
w=t1/t12;
#ra=0.97*rb
rb=(t1/(0.69*c1))/(1+0.97);
ra=0.97*rb;
print'Ra ',round(ra/1e6,3),'Mohm'
print'Rb ',round(rb/1e6,3),'Mohm'
#given
t1=6;#second
c1=10e-6;#farad
#determine r1
r1=t1/(1.11*c1);
print'R1 ',round(r1/1e3,1),'Kohm'
#given
en=20e-9;#volt/sqrt(z)
fce=20;#hz
inw=0.5e-12;#A/sqrt(hz)
fci=20e3
#determine voltage current spectraldensities rmsnoise
r1=r1;
import math
en=math.pow(fce*math.log(fci/fce)+(fci-fce),en);
print'rms voltage ',round(en,3),'volt'
#given
r1=9e3;#ohm
k1=1.38*1e-23
t1=298;#kelvin
#determine voltage current spectraldensities rmsnoise
r1=r1;
import math
er=math.sqrt(4*k1*t1*r1);#voltage
i1=er/r1;#current
er12=1/er;
w=20e3-20;#width constant
er1=r1/10e3;#rms voltage
print'voltage ',round(er*1e9,3),'nanovolt';
print'current ',round(i1*1e12,3),'pA';
print'rms voltage ',round(er1,3),'volt';#error in book
#given
fh=2e6;#hz
id=[1e-6,1e-9];
i=0;
import math
while i<2 :
In=math.sqrt(2*1.602e-19*id[i]*fh);
print'signal to noise id ',round((id[i]*1e6),3),' = ',round(20*math.log10(id[i]/In),3),'dB';
i=i+1;
#given
r1=100e3;#ohm
rf=250e3;#ohm
r3=70e3;#ohm
fce=200;#hz
fci=2e3;#hz
ft=1e6;#hz
enw=20e-9;
inw=0.5e-12;
f1=0.1;
#determine RMS voltage
import math
fa=ft/(1+(rf/r1));
rn=r1*rf/(r1+rf);
p=fce*math.log(fa/f1)+1.57*fa-f1;
q=(r3*r3+rn*rn)*(fci*math.log(fa/f1)+1.5*fa-f1);
r=1.65e-20*(r3+rn)*(1.57*fa-f1);
en=(1+rf/r1)*(enw*enw+p+inw*inw*q+r);
print'rms voltage ',round(math.sqrt(en),3),'μvolt';#error in book