diff options
Diffstat (limited to 'Electronic_Principles_/Chapter_22_New.ipynb')
-rw-r--r-- | Electronic_Principles_/Chapter_22_New.ipynb | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/Electronic_Principles_/Chapter_22_New.ipynb b/Electronic_Principles_/Chapter_22_New.ipynb index 789ac110..ebbb0124 100644 --- a/Electronic_Principles_/Chapter_22_New.ipynb +++ b/Electronic_Principles_/Chapter_22_New.ipynb @@ -27,22 +27,17 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#Example 22.4.py\n",
- "#Input voltage is a sine wave with a peak value of 10V. what is the trip point & cutoff frequency of bypass circuit?\n",
"import math\n",
"\n",
- "#Variable declaration\n",
"Vin=10 #ac input(V)\n",
"Vs=15 #non-inverting input voltage(V)\n",
"R1=200.0*10**3 #non-inverting input resistance R1(Ohm)\n",
"R2=100.0*10**3 #non-inverting input resistance R2(Ohm)\n",
"C=10*10**-6 #capacitance at non-inverting input(F)\n",
"\n",
- "#Calculation\n",
"Vref=Vs/3 #reference voltage at trip point(V)\n",
"fc=(2*math.pi*((R1**-1+R2**-1)**-1)*C)**-1 #cutoff frequency(Hz)\n",
"\n",
- "#Result\n",
"print 'trip point voltage Vref = ',Vref,'V'\n",
"print 'cutoff frequency of bypass circuit fc = ',round(fc,2),'Hz'"
],
@@ -72,22 +67,15 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#Example 22.5.py\n",
- "#what is the duty cycle of output waveform in figure 22-15b?\n",
"\n",
"import math\n",
"\n",
- "#Variable declaration\n",
"Vp=10.0 #sine peak(V)\n",
"Vin=5.0 #input voltage(V) \n",
"\n",
- "#Calculation\n",
- "#1st solution\n",
"theta=math.ceil((math.asin(Vin/Vp))*180/math.pi) #angle theta (deg)\n",
- "#2nd solution\n",
"D=(150-theta)/360.0 #duty cycle\n",
"\n",
- "#Result\n",
"print 'theta = ',theta,'degrees'\n",
"print 'duty cycle D = ',round((D*100),2),'%'"
],
@@ -117,21 +105,16 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#Example 22.6.py\n",
- "#If Vsat=13.5V, what are the trip points & hysteresis in figure 22-21?\n",
"\n",
- "#Variable declaration\n",
"R1=1.0 #non-inverting input resistance R1(KOhm)\n",
"R2=47.0 #feedback path resistance R2(KOhm)\n",
"Vsat=13.5 #saturation voltage(V)\n",
"\n",
- "#Calculation\n",
"B=R1/(R1+R2) #feedback fraction\n",
"UTP=B*Vsat #upper trip point\n",
"LTP=-B*Vsat #lower trip point\n",
"H=UTP-LTP #hysteresis\n",
"\n",
- "#Result\n",
"print 'lower trip point LTP = ',round(LTP,2),'V'\n",
"print 'upper trip point LTP = ',round(UTP,2),'V'\n",
"print 'hysteresis is ',round(H,2),'V'"
@@ -163,22 +146,16 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#Example 22.7.py\n",
- "#what is the output voltage at end of input pulse & closed loop time constant of integrator? \n",
- "#open loop voltage gain of 100,000.\n",
"\n",
- "#Variable declaration\n",
"R=2 #inverting input resistance R1(KOhm)\n",
"C=1*10**-6 #feedback path capacitance (F)\n",
"T=1*10**-3 #time period(s)\n",
"Vin=8 #input pulse voltage(V)\n",
"AVOL=100000 #open loop voltage gain\n",
"\n",
- "#Calculation\n",
"V=Vin*T/(R*C)/1000 #output voltage(V)\n",
"t=R*C*(AVOL+1)*1000 #time constant(s)\n",
"\n",
- "#Result\n",
"print 'Magnitude of negative output voltage at end of the pulse = ',V,'V'\n",
"print 'closed loop time constant = ',t,'s'"
],
@@ -208,20 +185,15 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#Example 22.5.py\n",
- "#what is the output voltage in figure 22-30 if the input frequency is 1 KHz?\n",
"\n",
- "#Variable declaration\n",
"R1=1*10**3 #inverting input resistance R1(Ohm)\n",
"R2=10*10**3 #feedback path resistance R2(Ohm)\n",
"C=10*10**-6 #feedback path capacitance (F)\n",
"Vin=5 #input pulse voltage(V)\n",
"f=1*10**3 #input frequency(Hz)\n",
"\n",
- "#Calculation\n",
"Vout=Vin/(2*f*R1*C) #output voltage(V)\n",
"\n",
- "#Result\n",
"print 'peak to peak output voltage = ',Vout,'Vpp'"
],
"language": "python",
@@ -249,24 +221,17 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#Example 22.9.py\n",
- "#The variable resistance has a maximum value of 10 KOhm. \n",
- "#what is duty cyale when wiper is at middle of its range for traingular input frequency = 1KHz.\n",
"\n",
- "#Variable declaration\n",
"Vs=15.0 #non-inverting input voltage(V)\n",
"Rw=5.0*10**3 #inverting input wiper resistance(Ohm)\n",
"R1=10.0*10**3 #inverting input resistance R1(Ohm)\n",
"f=1.0 #input frequency(KHz) \n",
"\n",
- "#Calculation\n",
"Vref=Vs*(Rw/(Rw+R1)) #reference voltage(V)\n",
"T=1/f #period of signal(s)\n",
- "#As per geometry in 22-31b\n",
"W=2*(T/2)*((Vs/2)-Vref)/Vs #output pulse width\n",
"D=W/T #duty cycle\n",
"\n",
- "#Result\n",
"print 'duty cycle D = ',round((D*100),2),'%'"
],
"language": "python",
@@ -294,23 +259,18 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#Example 22.10.py\n",
- "#In figure 22-34, what is the frequency of output signal?\n",
"\n",
"import math\n",
"\n",
- "#Variable declaration\n",
"R1=18.0 #non-inverting input resistance R1(KOhm)\n",
"R2=2.0 #feedback path resistance R2(KOhm)\n",
"R=1.0 #feedback path resistance R(KOhm)\n",
"C=0.1*10**-6 #feedback path capacitance (F)\n",
"\n",
- "#Calculation\n",
"B=R1/(R1+R2) #feedback fraction\n",
"T=10**9*2*R*C*math.log((1+B)/(1-B)) #period of output(us)\n",
"f=1000*1/T #frequency(KHz)\n",
"\n",
- "#Result\n",
"print 'period T = ',round(T,2),'us'\n",
"print 'frequency f = ',round(f,2),'KHz'"
],
@@ -340,20 +300,14 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#Example 22.11.py\n",
- "#In figure 22-33 peak outout voltage is 13.5V. R4=10KOhm,C2=10uF,\n",
- "#what is the peak to peak value of triangular output wave?\n",
"\n",
- "#Variable declaration\n",
"Vsat=13.5 #saturation voltage given(V)\n",
"R4=10*10**3 #given resistance R4(Ohm)\n",
"C2=10*10**-6 #given capacitance C2(F)\n",
"T=589*10**-6 #period from preceding example(s)\n",
"\n",
- "#Calculation\n",
"Vout=Vsat*T/(2*R4*C2) #output voltage (V) \n",
"\n",
- "#Result\n",
"print 'Output voltage = ',round((Vout*1000),2),'mVpp'"
],
"language": "python",
@@ -381,22 +335,16 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#Example 22.12.py\n",
- "#In figure 22-35a R1=1KOhm, R2=100KOhm, R3=10KOhm, R4=100KOhm and C=10uF.\n",
- "#what is peak to peak output if Vsat =13V? what is frequency of triangular wave?\n",
"\n",
- "#Variable declaration\n",
"R1=1*10**3 #resistance R1(Ohm)\n",
"R2=100*10**3 #resistance R2(Ohm)\n",
"R3=10*10**3 #resistance R3(Ohm)\n",
"C=10*10**-6 #capacitance (F)\n",
"\n",
- "#Calculation\n",
"UTP=Vsat*R1/R2 #UTP value (V)\n",
"Vout=2*UTP #output voltage/hysteresis (V)\n",
"f=R2/(4*R1*R3*C) #frequency(Hz)\n",
"\n",
- "#Result\n",
"print 'Vout = H = ',Vout,'V'\n",
"print 'frequency f = ',f,'Hz'"
],
|