From 476705d693c7122d34f9b049fa79b935405c9b49 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 14 Apr 2020 10:19:27 +0530 Subject: Initial commit --- .../10-Amplifiers.ipynb | 511 +++++++++++++++++++++ 1 file changed, 511 insertions(+) create mode 100644 Basics_of_Electrical_by_Electronics_and_Communication_Engineering/10-Amplifiers.ipynb (limited to 'Basics_of_Electrical_by_Electronics_and_Communication_Engineering/10-Amplifiers.ipynb') diff --git a/Basics_of_Electrical_by_Electronics_and_Communication_Engineering/10-Amplifiers.ipynb b/Basics_of_Electrical_by_Electronics_and_Communication_Engineering/10-Amplifiers.ipynb new file mode 100644 index 0000000..c63504e --- /dev/null +++ b/Basics_of_Electrical_by_Electronics_and_Communication_Engineering/10-Amplifiers.ipynb @@ -0,0 +1,511 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: Time_constant_and_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.10\n", +"clc;clear;close;\n", +"format('v',5);\n", +"C=10;//micro F\n", +"R=1;//kohm\n", +"T=C*10^-6*R*1000;//seconds\n", +"disp(T,'Time constant(seconds)');\n", +"omega_c=1/T;//rads/s\n", +"disp(omega_c,'omega_c(rads/s)');\n", +"fc=1/2/%pi/T;//Hz\n", +"disp(fc,'fc(Hz)');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: Determine_frequencies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.11\n", +"clc;clear;close;\n", +"format('v',5);\n", +"//(a)\n", +"f=1;//kHz\n", +"n=1;//no. of octave(above)\n", +"f1=f*2^n;//Hz\n", +"disp(f1,'(a) An octave above 1 kHz (in kHz)= ');\n", +"//(b)\n", +"f=10;//Hz\n", +"n=3;//no. of octave(above)\n", +"f1=f*2^n;//Hz\n", +"disp(f1,'(b) Three octave above 10 Hz (in Hz)= ');\n", +"//(c)\n", +"f=100;//Hz\n", +"n=1;//no. of octave(below)\n", +"f1=f/2^n;//Hz\n", +"disp(f1,'(c) An octave below 100 Hz (in Hz)= ');\n", +"//(d)\n", +"f=20;//kHz\n", +"n=1;//no. of decade(above)\n", +"f1=f*10^n;//Hz\n", +"disp(f1,'(d) An decade above 20 Hz (in Hz) = ');\n", +"//(e)\n", +"f=1;//MHz\n", +"n=3;//no. of decade(below)\n", +"f1=f/10^n;//Hz\n", +"disp(f1*1000,'(e) Three decade below 1 MHz (in kHz) = ');\n", +"//(f)\n", +"f=50;//kHz\n", +"n=2;//no. of decade(above)\n", +"f1=f*10^n;//Hz\n", +"disp(f1/1000,'(f) Two decade above 50 Hz (in kHz) = ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: Time_constant_and_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.12\n", +"clc;clear;close;\n", +"format('v',5);\n", +"C=10;//micro F\n", +"R=1;//kohm\n", +"T=C*10^-6*R*1000;//seconds\n", +"disp(T,'Time constant(seconds)');\n", +"omega_c=1/T;//rads/s\n", +"disp(omega_c,'omega_c(rads/s)');\n", +"fc=1/2/%pi/T;//Hz\n", +"disp(fc,'fc(Hz)');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13_1: Effect_of_overall_gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.13 at page 1.47\n", +"clc;clear;close;\n", +"format('v',6);\n", +"G=100;//stable voltage gain\n", +"A=100000:200000;//variable gain\n", +"B=1/G;//Unitless\n", +"disp('When the gain of amplifier(A) is 100000');\n", +"G1=min(A)/(1+min(A)*B);//overall gain\n", +"disp(G1,'The overall gain(G) is ');\n", +"disp('When the gain of amplifier(A) is 200000');\n", +"G2=max(A)/(1+max(A)*B);//overall gain\n", +"disp(G2,'The overall gain(G) is ');\n", +"change=(G2-G1)/G*100;//% Change in gain\n", +"disp('Effect of variable gain :');\n", +"disp(change,'Corresponding to 100% Change in gain of active amplifier, Change in overall gain is(%) ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: SN_ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.13\n", +"clc;clear;close;\n", +"format('v',5);\n", +"format('v',5);\n", +"Vs=2.5;//V\n", +"Vn=10;//mV\n", +"SNratio=20*log10(Vs/(Vn/1000));//dB\n", +"disp(SNratio,'S/N ratio(dB)');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: Overall_gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.14\n", +"clc;clear;close;\n", +"format('v',5);\n", +"A=10000;//stable voltage gain\n", +"B=1/A;//unitless\n", +"//For A=100000;//gain\n", +"A=100000;//gain\n", +"G=A/(1+A*B);//overall gain\n", +"disp(G,'When the gain of amplifier is 100000, Overall gain will be');\n", +"A=200000;//gain\n", +"G=A/(1+A*B);//overall gain\n", +"disp(G,'When the gain of amplifier is 200000, Overall gain will be');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: Output_Voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.1\n", +"clc;clear;close;\n", +"format('v',5);\n", +"Av=10;//voltage gain\n", +"Ri=1;//kohm\n", +"Ro=10;//ohm\n", +"Vs=2;//V(Sensor voltage)\n", +"Rs=100;//ohm(Sensor resistance)\n", +"RL=50;//ohm\n", +"Vi=Vs*Ri*1000/(Rs+Ri*1000);//V\n", +"Vo=Av*Vi*RL/(Ro+RL);//V\n", +"disp(Vo,'Output voltage of amplifier(V)');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Voltage_Gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.2\n", +"clc;clear;close;\n", +"format('v',5);\n", +"Av=10;//voltage gain\n", +"Ri=1;//kohm\n", +"Ro=10;//ohm\n", +"Vs=2;//V(Sensor voltage)\n", +"Rs=100;//ohm(Sensor resistance)\n", +"RL=50;//ohm\n", +"Vi=Vs*Ri*1000/(Rs+Ri*1000);//V\n", +"Vo=Av*Vi*RL/(Ro+RL);//V\n", +"Av=Vo/Vi;//voltage gain of circuit\n", +"disp(Av,'Voltage gain of circuit');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Output_Voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.3\n", +"clc;clear;close;\n", +"format('v',5);\n", +"Av=10;//voltage gain\n", +"Ri=%inf;//ohm\n", +"Ro=0;//ohm\n", +"Vs=2;//V(Sensor voltage)\n", +"Rs=100;//ohm(Sensor resistance)\n", +"RL=50;//ohm\n", +"//Vi=Vs*Ri/(Rs+Ri) leads to Vi approximately equals to Vs as Ri=%inf\n", +"Vi=Vs;//V\n", +"Vo=Av*Vi*RL/(Ro+RL);//V\n", +"disp(Vo,'Output voltage of amplifier(V)');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Current_Circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.4\n", +"clc;clear;close;\n", +"format('v',5);\n", +"VOC=10;//V(open circuit voltage)\n", +"//VOC=source voltage here\n", +"R=1;//kohm\n", +"ISC=VOC/R;//mA\n", +"disp(ISC,'Current generated by the circuit(mA)');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: Output_Power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.5\n", +"clc;clear;close;\n", +"format('v',4);\n", +"Av=10;//voltage gain\n", +"Ri=1;//kohm\n", +"Ro=10;//ohm\n", +"Vs=2;//V(Sensor voltage)\n", +"Rs=100;//ohm(Sensor resistance)\n", +"RL=50;//ohm\n", +"Vi=Vs*Ri*1000/(Rs+Ri*1000);//V\n", +"Vo=Av*Vi*RL/(Ro+RL);//V\n", +"Po=Vo^2/RL;//W\n", +"disp(Po,'Output power(W)');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: Power_gain_of_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.6\n", +"clc;clear;close;\n", +"format('v',5);\n", +"Av=10;//voltage gain\n", +"Ri=1;//kohm\n", +"Ro=10;//ohm\n", +"Vs=2;//V(Sensor voltage)\n", +"Rs=100;//ohm(Sensor resistance)\n", +"RL=50;//ohm\n", +"Vi=Vs*Ri*1000/(Rs+Ri*1000);//V\n", +"Vo=Av*Vi*RL/(Ro+RL);//V\n", +"Po=Vo^2/RL;//W\n", +"Pi=Vi^2/Ri;//mW\n", +"Ap=Po*1000/Pi;//Power gain\n", +"disp(Ap,'Power gain');\n", +"//Answer in the book is wrong." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: Power_gain_in_decibels.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.7\n", +"clc;clear;close;\n", +"format('v',5);\n", +"Ap=1400;//Power gain\n", +"Ap_dB=10*log10(Ap);//dB\n", +"disp(Ap_dB,'Power gain(dB)');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: Gain_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.8\n", +"clc;clear;close;\n", +"format('v',4);\n", +"Ap1=5;//Power gain\n", +"Ap1_dB=10*log10(Ap1);//dB\n", +"disp(Ap1_dB,'Power gain of 5 in dB');\n", +"Ap2=50;//Power gain\n", +"Ap2_dB=10*log10(Ap2);//dB\n", +"disp(Ap2_dB,'Power gain of 50 in dB');\n", +"Ap3=500;//Power gain\n", +"Ap3_dB=10*log10(Ap3);//dB\n", +"disp(Ap3_dB,'Power gain of 500 in dB');\n", +"Av1=5;//Voltage gain\n", +"Av1_dB=20*log10(Av1);//dB\n", +"disp(Av1_dB,'Voltage gain of 5 in dB');\n", +"Av2=50;//Voltage gain\n", +"Av2_dB=20*log10(Av2);//dB\n", +"disp(Av2_dB,'Voltage gain of 50 in dB');\n", +"Av3=500;//Voltage gain\n", +"Av3_dB=20*log10(Av3);//dB\n", +"disp(Av3_dB,'Voltage gain of 500 in dB');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: Power_gain_and_voltage_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Part B Ex 1.9\n", +"clc;clear;close;\n", +"format('v',6);\n", +"G1=20;//dB\n", +"G2=30;//dB\n", +"G3=40;//dB\n", +"Ap1=10^(G1/10);//Power Gain\n", +"disp(Ap1,'Power gain for 20 dB');\n", +"Av1=10^(G1/20);//Voltage Gain\n", +"disp(Av1,'Voltage gain for 20 dB');\n", +"Ap2=10^(G2/10);//Power Gain\n", +"disp(Ap2,'Power gain for 30 dB');\n", +"Av2=10^(G2/20);//Voltage Gain\n", +"disp(Av2,'Voltage gain for 30 dB');\n", +"Ap3=10^(G3/10);//Power Gain\n", +"disp(Ap3,'Power gain for 40 dB');\n", +"Av3=10^(G3/20);//Voltage Gain\n", +"disp(Av3,'Voltage gain for 40 dB');" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} -- cgit