diff options
author | Prashant S | 2020-04-14 10:25:32 +0530 |
---|---|---|
committer | GitHub | 2020-04-14 10:25:32 +0530 |
commit | 06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /The_Field_of_Electronics_by_R_Morrison | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.gz all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.bz2 all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.zip |
Initial commit
Diffstat (limited to 'The_Field_of_Electronics_by_R_Morrison')
6 files changed, 3682 insertions, 0 deletions
diff --git a/The_Field_of_Electronics_by_R_Morrison/1-Electric_field.ipynb b/The_Field_of_Electronics_by_R_Morrison/1-Electric_field.ipynb new file mode 100644 index 0000000..14902df --- /dev/null +++ b/The_Field_of_Electronics_by_R_Morrison/1-Electric_field.ipynb @@ -0,0 +1,630 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Electric field" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"a=20; //amplitude in cm\n", +"n=6; //frequency per second\n", +"w=2*(%pi)*n; //omega in radians/sec\n", +"disp(w,'Omega in radians/sec = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: calculating_power_dissipated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"a=6; //amplitude in cm\n", +"n=9; //frequency in Hz.\n", +"vmax=2*(%pi)*n*6; //calculating velocity in cm/sec\n", +"acc=-((18*(%pi))^2)*6; //calculating acc. in m/sec square\n", +"disp(vmax,'Maximum velocity in cm/sec = '); //displaying result\n", +"disp('Velocity at extreme position = 0'); //displaying result\n", +"disp('Accelaration at mean position = 0'); //displaying result\n", +"disp(acc,'Accelaration at extreme position in m/sec square = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: calculating_power_dissipated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"g=9.8; //gravitational constant\n", +"m=50; //mass in kg\n", +"l=0.2; //length in m\n", +"T=0.6; //time period\n", +"k=(m*g)/l; //calculating constant\n", +"m=2450*((T/(2*(%pi)))^2); //calcualting mass using given time period\n", +"disp(m,'Mass of body in kg = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: calculating_the_power_level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=4; //volts\n", +"t=8; //time in sec\n", +"ch=4; //charge in Coloumb\n", +"c=ch/t; //current\n", +"p=c*v; //power\n", +"e=p*t; //energy\n", +"disp(c,'Current in Ampere = '); //displaying current\n", +"disp(p,'Power in Watt = '); //displaying power\n", +"disp(e,'Energy in Joule = '); //displaying energy" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: finding_configuration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('In a)parallel b)series c)Two pairs of parallel and then in series'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15: no_of_resistances.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"p=1/8; //power disipation per resistor\n", +"v=sqrt(100/8); //voltage across each resistor\n", +"disp(14.14,'a)Voltage in Series in Ohm = '); //displaying result\n", +"disp(v,'b)Voltage in Parallel in Ohm ='); //displaying result\n", +"disp(7.07,'c)Voltage in Series-Parallel in Ohm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16: calculating_wattage_rating.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=10; //voltage in volt\n", +"t=2; //time in sec\n", +"r=40; //resistance in ohm\n", +"p=(v^2)/r; //power\n", +"e=5/5; //energy in Watt\n", +"disp(p,'Power in Watt = '); //displaying power\n", +"disp('2 W resistor is adequate.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.17: calculating_power_dissipation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=24; //voltage in volt\n", +"t=2; //time in sec\n", +"r=48; //resistance in ohm\n", +"p=(v^2)/r; //calculating power\n", +"disp(p,'Power in Watt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.18: calculating_joules.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"i=60; //current in ampere\n", +"v=12; //voltage in volt\n", +"t=3600; //time in sec\n", +"p=i*v*t; //calculating power\n", +"disp(p,'Number of joules = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.19: calculating_wattage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=12; //voltage in volt\n", +"ah=720; //ampere-hours\n", +"am=ah/24; //calculating amperage\n", +"r=v/am; //calculating resistance\n", +"disp(r,'Load in Ohm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: calculating_Electric_field_intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"n=512; //frequency in Hz\n", +"l=67; //wavelength in cm\n", +"v=n*l; //calculating velocity\n", +"disp(v,'Velocity in cm/sec = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.20: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"p=200; //power in Watt\n", +"v=12; //voltage in volt\n", +"i=p/v; //calculating current in Ampere\n", +"I=p/6; //calculating\n", +"disp(i,'Current in Ampere = '); //displaying\n", +"disp(I,'Current in Ampere if voltage were 6V = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.21: calculating_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"E=10^6; //in volt/m\n", +"e=8.85*10^-12; //constant in F/m\n", +"v=10^-5; //volume in m cube\n", +"en=(1/2)*e*E*E*v; //calculating energy\n", +"disp(en,'Energy in Joule = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.22: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"en=4.42*10^-5; //energy in Joule\n", +"v=10^6;\n", +"q=(2*en)/v; //calculating q\n", +"disp(q,'Charge in Coloumb = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.23: calculating_force.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"e=4.42*10^-5; //energy in Joule\n", +"v=1.1*10^-5; //volume in m cube\n", +"dv=(10/100)*e; //calculating change in energy\n", +"dd=10^-4; //change in dimension in metre\n", +"f=dv/dd; //calculating force\n", +"disp(f,'Force in kg = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.24: calculating_average_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('a)1A for 1 sec = 10J/sec '); //displaying\n", +"disp('b)10A for 0.1 sec = 100 J/sec'); //displaying\n", +"disp('c)100A for 0.01 sec = 1000 J/sec'); //displaying" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.25: calculating_peak_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Peak power is when 100 A flows for 0.01 sec = 1000J/sec'); //displaying" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=340; //velocity in m/sec\n", +"l=0.68; //wavelength in m\n", +"n=v/l; //calculating frequency\n", +"disp(n,'Frequency in Hz = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: calculating_resistance_and_conductance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=3*10^8; //velocity in m/sec\n", +"n=500*10^3; //frequency in Hz\n", +"l=v/n; //calculating wavelength\n", +"disp(l,'Wavelength in m = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=330; //velocity in m/sec\n", +"n=560; //frequency in Hz\n", +"l=v/n; //calculating wavelength\n", +"disp(l*30,'Distance travelled in 30 vibrations in m = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: calculating_work.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"s=90; //distance in m\n", +"u=0; //initial velocity in m/sec\n", +"t=sqrt(90/4.9); //calculating time using kinematical equation\n", +"t1=4.56-t; //calculating time taken by sound to travel\n", +"v=s/t1; //calculating velocity\n", +"disp(v,'Velocity in m/sec = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: calculating_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"l1=1.5; //wavelength in m\n", +"l2=2; //wavelength in m\n", +"v1=120; //velocity in m/sec\n", +"n=v1/l1; //calculating frequency\n", +"v2=n*l2; //calculating velocity\n", +"disp(v2,'Velocity in m/sec = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"l=5641*10^-10; //wavelength in m\n", +"c=3*10^8; //velocity in m/sec\n", +"n=c/l; //calculating frequency\n", +"u=1.58; //refractive index of glass\n", +"cg=c/u; //calculating velocity of light in glass\n", +"l1=cg/n; //calculating wavelegth in glass\n", +"disp(l1*10^10,'Wavelength in glass in Angstrom ='); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"n=12*10^6; //frequency in Hz\n", +"v=3*10^8; //velocity in m/sec\n", +"l=v/n; //calculating wavelength\n", +"disp(l,'Wavelength in m = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: calculating_internal_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"n=400; //frequency in Hz\n", +"v=300; //velocity in m/sec\n", +"l=v/n; //calculating wavelength\n", +"disp(l,'Wavelength in m = '); //displaying result" + ] + } +], +"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 +} diff --git a/The_Field_of_Electronics_by_R_Morrison/2-Capacitance.ipynb b/The_Field_of_Electronics_by_R_Morrison/2-Capacitance.ipynb new file mode 100644 index 0000000..38f3bc9 --- /dev/null +++ b/The_Field_of_Electronics_by_R_Morrison/2-Capacitance.ipynb @@ -0,0 +1,592 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Capacitance" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10: calculating_H_field_intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"i=0.1; //current in Ampere\n", +"r=0.05; //radius in metre\n", +"h=(i*100)/(2*(%pi)*r); //calculating h\n", +"disp(h,'H field intensity for 100 turns in A/metre = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.11: calculating_H_field_intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Radius is doubled.Therefore, H filed becomes half = 16 A/metre.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.12: calculating_H_field_intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('H field at the center is nearly the same.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.13: calculating_H_field_intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"i=10; //current\n", +"r=0.005; //radius in metre\n", +"h1=(i)/(4*2*(%pi)*r); //at half radius H is (1/4)th\n", +"disp(h1,'H field intensity at one half of radius in A/metre = '); //displaying result\n", +"h2=(i)/(2*(%pi)*0.01); //calculating H at surface\n", +"disp(h2,'H field intensity at surface in A/metre = '); //displaying result\n", +"disp('H field intensity is proportional to radius.Therefore, it is zero at the center.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.14: calculating_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=2; //voltage in volts\n", +"l=10^-3; //inductance in Henry\n", +"i=10*10^-3; //current\n", +"di=v/l; //change in current in A/sec\n", +"t=i/di; //calculating time\n", +"disp(t,'Time required to reach 0.01 A in sec = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.15: calculating_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=2; //voltage in volts\n", +"l=10^-3; //inductance in Henry\n", +"i=10*10^-3; //current\n", +"e=(1/2)*l*i*i; //calculating energy\n", +"disp(e,'Energy in Joule = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.16: calculating_H_field.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"p=20*10^-2; //path length in metre\n", +"m=20000; //relative permeability of magnetic material\n", +"i=2*10^-3; //current in Ampere\n", +"n=500; //no of turns\n", +"h=n*i; //calculating A/turn for 20 cm\n", +"disp(h,'H for 20 cm in A/turn = '); //displaying result\n", +"a=h/(20*10^-2); //calculating H per metre\n", +"disp(a,'H field per metre in A/metre = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.17: calculating_B_field.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"mo=(4*(%pi)*10^-7); //relative permeability of free space\n", +"p=20*10^-2; //path length in metre\n", +"m=20000; //relative permeability of magnetic material\n", +"i=2*10^-3; //current in Ampere\n", +"n=500; //no of turns\n", +"H=n*i; //calculating A/turn for 20 cm\n", +"disp(H,'H for 20 cm in A/turn = '); //displaying result\n", +"a=H/(20*10^-2); //calculating H per metre\n", +"disp(a,'H field per metre in A/metre = '); //displaying result\n", +"B=(m*mo*a); //calculating flux\n", +"disp(B,'Flux in Tesla = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.18: calculating_flux.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"area=5*10^-4; //area\n", +"mo=(4*(%pi)*10^-7); //relative permeability of free space\n", +"p=20*10^-2; //path length in metre\n", +"m=20000; //relative permeability of magnetic material\n", +"i=2*10^-3; //current in Ampere\n", +"n=500; //no of turns\n", +"H=n*i; //calculating A/turn for 20 cm\n", +"disp(H,'H for 20 cm in A/turn = '); //displaying result\n", +"a=H/(20*10^-2); //calculating H per metre\n", +"disp(a,'H field per metre in A/metre = '); //displaying result\n", +"B=(m*mo*a); //calculating flux\n", +"disp(B,'Flux in Tesla = '); //displaying result\n", +"l=B*area; //calculating flux density\n", +"disp(l,'Flux Density in Weber/metre = '); //diaplaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.19: calculating_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=0.04; //voltage per turn in Volt\n", +"area=5*10^-4; //metre square\n", +"B=v/area; //calculating B\n", +"disp(B,'B in Tesla/sec = '); //displaying result\n", +"H=B/(4*(%pi)*10^-7*20000); //calculating H\n", +"disp(H,'H in A/m = '); //displaying result\n", +"disp('Therefore, for 500 turns and 20 cm = 1.27 A/sec.25.4 ms for 20 mA and 38.1 ms for 30 mA'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: calculating_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Example 2.1');\n", +"v=3000; //volume in metre cube.\n", +"theta=0.2; //theta in owu(open window unit).\n", +"s=1850; //area in metre cube.\n", +"as=theta*s; //calculating total absorbtion of surface.\n", +"T=(0.165*v)/as //calculating T using Sabine formula\n", +"disp(T,'Reverberation time of Room = '); //Displaying Result." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.20: calculating_lowest_frequency_square_wave.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"phi=0.5; //flux density in Tesla\n", +"v=10; //peak to peak voltage\n", +"disp('At 80 Tesla/sec it takes 1/160 sec to reach 0.5 Tesla.Therefore,to reach maximum B in opposite sense and return to zero it will take 4/160 sec.'); //displaying result\n", +"disp('This is a frequency of 40 Hz.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21: calculating_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=7.5*10^-5; //volume in metre cube\n", +"b=1; //flux in tesla\n", +"mo=4*(%pi)*10^-7; //permeability of free space\n", +"m=20000; //permeability of material\n", +"h=b/(m*mo); //calculating field intensity\n", +"e=(1/2)*b*h*v; //calculating energy\n", +"disp(e,'Energy in Joule = '); //displaying energy" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.22: calculating_H_field.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=7.5*10^-5; //volume in metre cube\n", +"b=1; //flux in tesla\n", +"mo=4*(%pi)*10^-7; //permeability of free space\n", +"m=20000; //permeability of material\n", +"h=b/(m*mo); //calculating field intensity\n", +"e=(1/2)*b*h*v; //calculating energy\n", +"disp(e,'Energy in Joule = '); //displaying energy\n", +"disp(h,'Field in the gap = '); //displaying field intensity\n", +"disp(h*10^-2,'Current per metre = Therefore in the gap of 0.001 m current required in mA = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: calculating_charge.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Example 2.2');\n", +"v=120000; //volume in metre cube.\n", +"t=1.5; //time in second.\n", +"s=25000; //area in metre cube.\n", +"a=(0.16*v)/(t*s); //using Sabine formula for calculating a\n", +"disp(a,'Average Absorbing Power of Surface = '); //Displaying Result." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: calculating_D.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Example 2.3');\n", +"v=6000 //Volume in metre cube.\n", +"as=20 //surface absorbtion in owu(open window unit).\n", +"T=(0.165*v)/(as); //calculating T using Sabine Formula.\n", +"disp(T,'Reverberation Time = '); //Displaying Result." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Example2.4');\n", +"v=3500; //volume in metre cube.\n", +"n1=370-300; //no. of audience on wooden seats.\n", +"n2=300-70; //no. of empty wooden seats.\n", +"a1s1=0.04*60; //absorption due to wooden doors.\n", +"a2s2=0.03*700; //absorption due to plastered walls.\n", +"a3s3=0.06*50; //absorption due to glass work.\n", +"a4s4=4.2*370; //absorption due to audience on spungy and wooden \n", +"//seats.\n", +"a5s5=2*230; //absorption due to empty seats.\n", +"sum=a1s1+a2s2+a3s3+a4s4+a5s5; //total absorption of cinema hall.\n", +"T=(0.165*v)/sum; //calculating T using Sabine Formula.\n", +"disp(T,'Reverberation Time = '); //Displaying Result." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: calculating_time_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Example 2.5');\n", +"l=10; //length in centimetres.\n", +"Y=20*10^11; //Young's Modulus in dyne/cm square.\n", +"R=8; //Density in gram/cc\n", +"n=(1/(2*l))*sqrt(Y/R); //calculating frequency of vibration using \n", +"//young's modulus.\n", +"disp(n,'Frequency of vibration in Hz.'); //Displaying Result. " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Example 2.7');\n", +"t=0.1; //thickness in centimetre.\n", +"Y=8.75*10^11; //Young's Modulus in dyne/cm square.\n", +"R=2.654; //Density in gram/cm square.\n", +"n=(1/(2*t))*sqrt(Y/R); //calculating frequency using Young's modulus.\n", +"disp(n,'Frequency of Vibration in Hz = '); //Displaying Result." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: calculating_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Example 2.7');\n", +"K=2.026*10^9; //Bulk Modulus in N/m square.\n", +"R=10^3; //Density in Kg/m cube.\n", +"V=sqrt(K/R); //Calculating speed using Bulk Modulus.\n", +"disp(V,'Velocity of sound waves in water in m/sec = '); //displaying result." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8: calculating_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Example 2.8');\n", +"Y=1.41; //Young's Modulus.\n", +"R=1.293*10^-3; //Density of air in g/centimetre cube.\n", +"P=76*13.6*980; //atmospheric pressure in dyne/cm square.\n", +"V=sqrt((Y*P)/R); //calculating speed using young's modulus.\n", +"disp(V,'Speed of ultrasonic wave in air at n.t.p. in cm/sec = '); //displaying result. \n", +"disp(V*10^-2,'Speed in m/sec'); //displaying result." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9: finding_H_field_intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"r=0.1; //in metre\n", +"H=3/(2*(%pi)*r); //calculating H field intensity\n", +"disp(H,'H field intensity in A/metre = '); //displaying result" + ] + } +], +"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 +} diff --git a/The_Field_of_Electronics_by_R_Morrison/3-Utility_power_and_circuit_concepts.ipynb b/The_Field_of_Electronics_by_R_Morrison/3-Utility_power_and_circuit_concepts.ipynb new file mode 100644 index 0000000..07fb10d --- /dev/null +++ b/The_Field_of_Electronics_by_R_Morrison/3-Utility_power_and_circuit_concepts.ipynb @@ -0,0 +1,757 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Utility power and circuit concepts" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10: calculating_resonant_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"fo=0.5; //focal length of eye lens\n", +"D=25; //distance of distinct vision\n", +"L=15; //length in cm\n", +"m=375; //magnification\n", +"fe=(-L*D)/(fo*((L/fo)-m)); //calculating fe\n", +"disp(fe,'Focal length of eye lens in cm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11: calculating_natural_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"m=5; //magnifying power\n", +"L=24; //length in cm\n", +"fe=4; //focal length in cm\n", +"fo=5*fe; //calculating fo\n", +"disp(fo,'Focal length of lens in cm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"D=25; //distance of distinct vision in cm\n", +"fo=140; //focal length of eye lens\n", +"fe=5; //focal length in cm\n", +"m=-(fo/fe); //calculating magnifying power\n", +"disp(m,'Magnifying power at normal adjustment = '); //displaying result\n", +"m1=-(fo/fe)*(1+(fe/D)); //calculating magnifying power\n", +"disp(m1,'Magnifying power atleast distance of distinct vision = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13: calculating_phase_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"M=5; //Magnifying power\n", +"fo=10; //focal length of eye lens\n", +"fe=fo/M; //calculating fe\n", +"disp(fe,'Focal length of eye lens in cm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.14: calculating_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"fo=75; //focal length of eye lens\n", +"D=25; //distance of distinct vision\n", +"fe=5; //focal of eye lens in cm\n", +"M=-(fo/fe)*(1+(fe/D)); //calculating M\n", +"disp(M,'Magnifying power = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15: calculating_reactance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"M=7; //magnifying power\n", +"L=40; //length\n", +"fe=(40/8); //focal length of eye lens in cm\n", +"fo=(7*fe); //calculating focal length\n", +"disp(fo,'Focal Length of lens in cm ='); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16: calculating_phase_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"f=10^3; //frequency in Hz\n", +"l=0.1; //inductance in Henry\n", +"x=2*(%pi)*f*l; //calculating reactance\n", +"disp(x,'Reactance in Ohm = '); //displaying result\n", +"disp('Frequency needs to be raised by the ratio 2000/628 for the frequency to equal the resistance.');\n", +"r=2000/x;\n", +"disp(r,'The frequency in Hz = '); //displaying result\n", +"disp('At this frequency the phase angle is 45 degree.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17: calculating_rms_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"vpp=25; //peak to peak voltage in volt\n", +"vp=vpp/2; //calculating peak value in volt\n", +"rms=vp/sqrt(2); //calculating rms value\n", +"disp(rms,'Rms value in volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18: calculating_peak_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=118; //voltage in volt\n", +"vp=v*sqrt(2); //calculating peak voltage\n", +"disp(vp,'Peak voltage in volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19: calculating_rms_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"r=1; //reisstance in Ohm\n", +"p1=1/4; //power for 1 Watt\n", +"p2=(2*2)/4; //power for 2 Watt\n", +"p3=(3*3)/4; //power for 3 Watt\n", +"p4=(4*4)/4; //power for 4 Watt\n", +"tp=p1+p2+p3+p4; //calculating total power\n", +"p=sqrt(tp); //calculating rms value\n", +"disp(p,'RMS value in volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: calculating_reactance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"f=15; //focal length in cm\n", +"v=10; //image distance in cm\n", +"u=(150/5); //calculating u using (1/f)=(1/v)-(1/u)\n", +"disp(u,'Object Distance in cm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20: calculating_rms_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v1=6; //voltage in volt\n", +"v2=8; //voltage in volt\n", +"v=sqrt((v1*v1)+(v2*v2)); //calculating rms valu\n", +"disp(v,'RMS value in volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.21: calculating_average_dc_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=12; //voltage in volt\n", +"f=60; //frequency in Hz\n", +"vt=v*sqrt(2); //true voltage\n", +"vs=vt/10; //sagging voltage\n", +"disp(vs);\n", +"av=vt-(vs/2); //calculating average value\n", +"disp(av,'Average voltage in volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.22: calculating_rms_heating.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=10; //voltage in volt\n", +"t=0.001; //lasting time in sec\n", +"t1=0.01; //recuring time in sec\n", +"r=1; //resistance in Ohm\n", +"p=10; //average power in Watt\n", +"v=sqrt(p/r); //calculating dc voltage\n", +"disp(v,'DC Voltage in Volt = '); //displaying result\n", +"disp(v,'Therefore, the RMS value = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.23: calculating_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"l=10; //length in metre\n", +"s=0.3; //speed of energy in m/ns\n", +"tl=2*l; //length of round trip\n", +"t=tl/s; //time taken\n", +"disp(t,'Time taken for round trip in ns = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.24: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"z=50; //impedance in Ohm\n", +"l=10; //length in metre\n", +"v=10; //voltage in volt\n", +"t=0.3*10^-6; //time in sec\n", +"i=v/z; //calaulating current\n", +"disp(i,'Current on initial wave in Ampere = '); //displaying result\n", +"disp('It takes 0.13*10^-6 for a round trip.There are two round trips in 0.3*10^-6. The current triples for each round trip. At 0.3 ¹s the current is multiplied by 6, or 1.2 A.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.25: calculating_H_field_and_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"f=300; //frequency in Hz\n", +"r=1; //distance in metre\n", +"i=2; //current in Ampere\n", +"area=0.1; //area in metre square\n", +"mo=4*(%pi)*10^-7; //constant\n", +"H=i/(2*(%pi)*r); //calcualting H field rms\n", +"disp(H,'H field intensity (rms) in A/m = '); //displaying H field\n", +"Hp=H*sqrt(2); //peak H\n", +"disp(Hp,'H field intensity (peak) in A/m = '); //displaying result\n", +"Bp=(Hp*mo); //calculating B peak in Tesla\n", +"disp(Bp,'Flux peak in Tesla = '); //displaying B\n", +"vp=2*(%pi)*f*Bp; //calculating v peak\n", +"disp(vp,'Peak voltage in volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.26: calculating_peak_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=10^-5; //ac voltage\n", +"di=10*10^-3; //discharge rate of current\n", +"t=10*10^-3; //time in sec\n", +"ch=(14.14-0.6); //charge of capacitor\n", +"q=ch*v; //charge\n", +"disp(q,'Charge in Coloumb = '); //displaying result\n", +"qt=di*t; //charge for 10 ms\n", +"rc=q-qt; //remaining charge\n", +"disp(qt,'Charge for 10 ms = '); //displaying result\n", +"disp(rc,'Remaining charge in Coloumb = '); //displaying result\n", +"a=(rc/q)*10; //voltage\n", +"disp(a,'Voltage in volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.27: calculating_power_dissipated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"s=12; //sum of squares\n", +"hv=sqrt(s); //heating voltage =sum of square roots\n", +"disp(hv,'Heating voltage in volts = '); //displaying result\n", +"disp(s/10,'Power dissipated in Watt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.28: calculating_total_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"vp=10; //peak voltage\n", +"v=vp*sqrt(2); //voltage\n", +"hc=10+7.07; //horizontal components\n", +"disp(hc,'Hrizontal Components = '); //horizontal components\n", +"vc=sqrt((hc*hc)+(7.07*7.07)); //vertical components\n", +"disp(vc,'Vertical Components = '); //vertical components" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.29: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"c=5*10^-12; //capacitanec in Farad\n", +"p=10*10^6; //pulse in V/sec\n", +"i=c*p; //current\n", +"disp(i,'Current in Ampere = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: calculating_reactance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"f=80; //focal length in cm\n", +"f1=20; //focallength of first lens in cm\n", +"f2=(80/3); //using (1/F)=(1/f1)+(1/f2)\n", +"P=(100/f); //power in D\n", +"P1=100/20; //power of first lens\n", +"P2=P1-P; //power in D\n", +"disp(P2,'Power in D = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: calculating_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"P=2.5; //Power in D\n", +"f=-(1/P); //calculating f in m\n", +"disp(f,'Focal length in m = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: calculating_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"m=4; //magnigication\n", +"f=20; //focal length in cm\n", +"u=(20*3)/(4); //on simplifying (1/f)=(1/v)-(1/u)\n", +"v=(4*u); //calculating v in cm\n", +"disp(u,'Object distance in cm = '); //displaying result\n", +"disp(v,'Image distance in cm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: calculating_peak_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"u=14; //object distance in cm\n", +"f=-21; //focal distance in cm\n", +"v=(-5/42); //simplifying(1/f)=(1/v)-(1/u)\n", +"I=(3*-8.4)/(-14); //using m=(1/0)=(v/u);\n", +"disp(v,'Image distance in cm = '); //displaying result\n", +"disp(I,'I in cm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: calculating_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"fe=5; //focal length in cm\n", +"D=25; //distance od distinct vision in cm\n", +"m=1+(D/fe); //calculating magnifying power\n", +"disp(m,'magnifying Power = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7: calculating_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"fe=5; //focal length in cm\n", +"D=25; //distance od distinct vision in cm\n", +"mo=30/(1+(D/fe)); //calculating magnification of objective lens\n", +"disp(mo,'Magnification produced by objective lens = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: calculating_reactance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"u=-6; //object distance in cm\n", +"fo=4; //focal distance in cm\n", +"fe=6; //focal length in cm\n", +"D=25; //distance of distinct vision in cm\n", +"v=(12); //using (1/f)=(1/v)-(1/u)\n", +"m=(v/u)*(1+(D/fe)); //calculating m\n", +"disp(v,'Image distance in cm = '); //displaying result\n", +"disp(-m,'Magnifying Power = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9: calculating_slope.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"D=25; //distance of distinct vision\n", +"u=-9; //object distance in cm\n", +"fe=10; //focal length in cm\n", +"v=(-90/1); //using (1/f)=(1/v)-(1/u)\n", +"m=(v/u); //calculating m\n", +"M=D/u; //calculating Magnifying power of lens\n", +"disp(m,'Magnification of lens = '); //displaying result\n", +"disp(-M,'Magnifying Power = '); //displaying result" + ] + } +], +"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 +} diff --git a/The_Field_of_Electronics_by_R_Morrison/4-A_few_more_tools.ipynb b/The_Field_of_Electronics_by_R_Morrison/4-A_few_more_tools.ipynb new file mode 100644 index 0000000..bab3415 --- /dev/null +++ b/The_Field_of_Electronics_by_R_Morrison/4-A_few_more_tools.ipynb @@ -0,0 +1,700 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: A few more tools" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10: calculating_wave_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"q1=(2*10^-8); //charge in coulomb\n", +"q2=(-2*10^-8); //charge in coulomb\n", +"q3=(3*10^-8); //charge in coulomb\n", +"q4=(6*10^-8); //charge in coulomb\n", +"s=1; //side in m\n", +"V=(9*10^9)*(1/s)*(q1+q2+q3+q4); //calculating voltage\n", +"disp(V,'Voltage in Volts = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11: calculating_wave_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"eo=8.85*10^-12; //constant\n", +"q=2*10^-6; //charge in coulomb\n", +"l=9; //length in cm\n", +"fi=(q/eo); //calcualting flux in (N m square)/c\n", +"disp(fi,'Flux through the surface in (N m square)/c = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12: calculating_H.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"eo=8.85*10^-12; //constant\n", +"r=1.2; //r in m\n", +"t=80*10^-6; //surface sharge density in c/m square\n", +"q=t*4*(%pi)*(r^2); //calculating charge\n", +"fi=q/eo; //calculating flux\n", +"disp(fi,'Flux in N m square/c = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13: calculating_field_strength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"eo=8.85*10^-12; //constant\n", +"E=9*10^4; //Electric field in N/C\n", +"r=2*10^-2; //r in m\n", +"L=2*(%pi)*E*eo*r; //calculating linear charge density\n", +"disp(L,'Linear charge density per cm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14: calculating_E.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"o=17*10^-22; //surface charge density in cm^-2\n", +"eo=8.85*10^-12; //constant\n", +"E=o/eo; //calculating electric intensity in region III\n", +"disp('Electric Intensity in regions I and II = 0'); //displaying result\n", +"disp(E,'Electric Intensity in region III in N/C = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15: calculating_E.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"r=0.05; // in m\n", +"eo=8.85*10^-12; //constant\n", +"q=10^-9; //charge at point P in Coulomb\n", +"E=q/(4*(%pi)*eo*(r^2)); //calculating electric field\n", +"disp(E,'Electric field in v/m = '); //displaying result\n", +"r1=0.2; //in m\n", +"V1=q/(4*(%pi)*eo*r1); //calculating potential difference\n", +"disp(V1,' Potential difference between two points in Volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.16: calculating_one_skin_depth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"eo=8.85*10^-12; //constant\n", +"o=80*10^-6; //surface charge density in c/ square\n", +"r=1.2; //in m\n", +"q=o*(%pi)*(r^2); //calculating charge in Coulomb\n", +"fi=q/eo; //calculating electric flux\n", +"disp(q,'Charge in Coulomb = '); //displaying result\n", +"disp(fi,'Electric flux in N m square/c = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.17: calculating_one_skin_depth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"V=250; //potential difference in Volt\n", +"C=10^-11; //capacitance in farad\n", +"q=C*V; //calculating charge\n", +"disp(q,'Charge in Coulomb = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.18: calculating_skin_depth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"r=6.4*10^6; //in m\n", +"C=r/(9*10^9); //calculating charge\n", +"disp(C,'Capacitance in Farad = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.19: calculating_WCC.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"C=2; //capacitance in Farad\n", +"d=0.5*10^-2; //distance in m\n", +"eo=8.85*10^-12; //constant\n", +"A=(C*d)/(eo); //calculating area\n", +"disp(A,'Area in m square = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: calculating_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"q=1; //no of coulomb\n", +"e=1.6*10^-19; //charge on an electron\n", +"n=(q/e); //calculating no of electrons\n", +"disp(n,'No of electrons = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.20: calculating_WCC.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"A=0.02; //area in m square\n", +"r=0.5; //r in m\n", +"d=(A/(4*(%pi)*r)); //calculating distance\n", +"disp(d,'Distance between the plates in m = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.21: calculating_WCC.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"eo=8.85*10^-12; //constant\n", +"A=1; //area in m square\n", +"d=2*10^-3; //r in m\n", +"K=4; //constant\n", +"C=(K*eo*A)/d; //calculating capacitance\n", +"disp(C,'Capacitance in Farad = = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.22: calculating_WCC.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"cm=10*10^-6; //capacitance in Farad\n", +"K=2; //constant\n", +"co=cm/K; //calculating co\n", +"disp(co,'capacity of capacitor with air between the plates in Farad = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.23: calculating_magnetising_current_max.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=100; //v in volt\n", +"c1=8*10^-6; //capacitance in Farad\n", +"c2=12*10^-6; //capacitance in Farad\n", +"c3=24*10^-6; //capacitance in Farad\n", +"cs=4/(10^6); //calculating series capacitance\n", +"cp=(c1+c2+c3); //calculating parallel capacitance\n", +"disp(cs,'Equivalent Series capacitance in farad = '); //displaying result\n", +"disp(cp,'Equivalent parallel capacitance in farad = '); //displaying result\n", +"qs=cs*v; //calculating charge\n", +"disp(qs,'charge on plate in Coulomb = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.24: calculating_peak_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"C=9*10^-10; //capacitance in farad\n", +"V=100; //in volt\n", +"U=(1/2)*(C*(V^2)); //calculating energy stored\n", +"disp(U,'Energy stored in Joule = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.25: calculating_radiation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"eo=8.85*10^-12; //constant\n", +"A=90*10^-4; //area in m square\n", +"d=2.5*10^-3; //distance in m\n", +"V=400; //in volt\n", +"C=(eo*A)/d; //calculating capacitance\n", +"disp(C,'Capacitance in Farad = '); //displaying result\n", +"W=(1/2)*(C*(V^2)); //calculating electrical energy stored\n", +"disp(W,'Electrical Energy stored in capacitor in Joule = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.26: calculating_primary_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=100; //v in volt\n", +"c1=1*10^-6; //capacitance in Farad\n", +"c2=2*10^-6; //capacitance in Farad\n", +"c3=3*10^-6; //capacitance in Farad\n", +"cs=6/11; //calculating series capacitance\n", +"cp=(c1+c2+c3); //calculating parallel capacitance\n", +"disp(cs,'Equivalent Series capacitance in farad = '); //displaying result\n", +"disp(cp,'Equivalent parallel capacitance in farad = '); //displaying result\n", +"disp('Therefore Cp=(11*Cs)'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.27: calculating_radiation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"eo=8.85*10^-12; //constant\n", +"V=6; //v in volt\n", +"A=25*10^-4; //area in m square\n", +"d=10^-3; //distance in m\n", +"q=(eo*A*V)/d; //calculating charge\n", +"W=q*V; //calculating work done\n", +"disp(q,'Charge through battery in Coulomb = '); //displaying result\n", +"disp(W,'Work done by Battery in Joule = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: calculating_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"F=4.5*9.8; //in Newton\n", +"q=sqrt(((0.03^2)*4.5*9.8)/(9*10^9)); //calculating q using F=(1/4*3.14*eo)*((q1*q2)/(r^2))\n", +"disp(q,'Charge in coulomb = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: calculating_inductance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"q1=2*10^-7; //charge in C\n", +"q2=3*10^-7; //charge in C\n", +"r=30*10^-2; //r in m\n", +"F=(9*10^9)*((q1*q2)/r^2); //calculating F\n", +"disp(F,'Force in Newton = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: calculating_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"q1=1; //charge in C\n", +"q2=1; //charge in C\n", +"r=1; //r in m\n", +"F=(9*10^9)*((q1*q2)/r^2); //calculating F\n", +"disp(F,'Force in Newton = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: calculating_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"m=9*10^-31; //mass of electron in kg\n", +"q=-3.2*10^-7; //charge in C\n", +"e=-1.6*10^-19; //charge on electron in C\n", +"n=(q/e); //calculating n\n", +"M=n*m; //calculating mass transfered\n", +"disp(n,'no. of electrons = '); //displaying result\n", +"disp(M,'Mass transfered to polythene in kg = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: calculating_H.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"q1=1.6*10^-19; //charge in C\n", +"q2=-1.6*10^-19; //charge in C\n", +"r=10^-9; //r in m\n", +"F=(9*10^9)*((q1*q2)/r^2); //calculating F\n", +"disp(F,'Force in Newton = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: calculating_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Va=-10; //voltage in volts\n", +"W=100; //work in Joule\n", +"q=2; //charge in Coulomb\n", +"v=(Va)+(W/q); //calculating v\n", +"disp(v,'Voltage in Volts = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: calculating_H.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"eo=(8.854*10^-12); //constant\n", +"E=2; //magnitude of electric field in N/C\n", +"r=0.5; //r in m\n", +"q=E*4*(%pi)*(eo)*(r^2); //calculating charge\n", +"disp(q,'Charge in Coulomb = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9: calculating_distance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"e=-1.6*10^-19; //charge on electron in Coulomb\n", +"q=20*10^-6; //charge in Coulomb\n", +"r1=0.1; //r1 in m\n", +"r2=0.05; //r2 in m\n", +"Va=9*10^9*(q/r1); //calculating voltage at A\n", +"Vb=9*10^9*(q/r2); //calculating voltage at B\n", +"V=Va-Vb; //potential difference\n", +"W=V*e; //calculating work done in joule\n", +"disp(W,'Work done to take the electron from A to B in Joule = '); //displaying result" + ] + } +], +"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 +} diff --git a/The_Field_of_Electronics_by_R_Morrison/5-Analog_Design.ipynb b/The_Field_of_Electronics_by_R_Morrison/5-Analog_Design.ipynb new file mode 100644 index 0000000..c995951 --- /dev/null +++ b/The_Field_of_Electronics_by_R_Morrison/5-Analog_Design.ipynb @@ -0,0 +1,531 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Analog Design" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10: calculating_output_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Rs=40; //resisitance in Ohm\n", +"disp('R2=8 when R1=32, R2=32 when R1=8 Resisitance in Ohm '); //displaying result using (1/Rp)=(1/R1)+(1/R2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11: calculating_output_inductance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"V=2; //in volts\n", +"R1=30; //resisitance in Ohm\n", +"R2=60; //resistance in Ohm\n", +"Rp=(30*60)/(30+60); //calculating parallel resistance\n", +"disp(Rp,'Resisitance in Ohm = '); //displaying result\n", +"I=V/Rp; //Ohm's law\n", +"disp(I,'Current in Ampere = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12: calculating_input_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"R1=2; //resisitance in Ohm\n", +"R2=3; //resistance in Ohm\n", +"R3=1; //resistance in Ohm\n", +"Rp=(R1*R2)/(R1+R2); //calculating parallel resistance\n", +"R=Rp+1; //1 Ohm in series\n", +"disp(R,'(1)Equivalent Resisitance in Ohm = '); //displaying result\n", +"Rs=(R1+R2+R3); //series resistances\n", +"disp(Rs,'(2)All resistances in series in Ohm = '); //displaying result\n", +"Rp=(1/R1)+(1/R2)+(1/R3); //calculating parallel resistance\n", +"disp((1/Rp),'(3)All in Parallel in Ohm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13: calculating_size.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"V=20; //voltage in Volts\n", +"R1=2; //resisitance in Ohm\n", +"R2=4; //resistance in Ohm\n", +"R3=5; //resistance in Ohm\n", +"Rp=(1/R1)+(1/R2)+(1/R3); //calculating parallel resistance\n", +"R=1/Rp; //Parallel\n", +"disp(R,'(a)Equivalent Resisitance in Ohm = '); //displaying result\n", +"I1=V/R1; //calculating current through R1\n", +"I2=V/R2; //calculating current through R2\n", +"I3=V/R3; //calculating current through R3\n", +"I=V/R; //calculating total current\n", +"disp(I1,'Current through R1 in Ampere = '); //displaying result\n", +"disp(I2,'Current through R2 in Ampere = '); //displaying result\n", +"disp(I3,'Current through R3 in Ampere = '); //displaying result\n", +"disp(I,'Total current in Ampere = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14: calculating_radiation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Rp = 6/n'); //resistance in parallel\n", +"disp('R=7'); //total resistance\n", +"disp('From 1 and 2 we get n=3'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.15: calculating_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"R1=2; //resistance in Ohm\n", +"R2=6; //resistance in Ohm\n", +"R3=3; //resistance in Ohm\n", +"V=24; //voltage in volts\n", +"R=8; //resistance in Ohm\n", +"I=V/R; //Ohm's Law\n", +"disp(I,'Current in Ampere = '); //displaying result\n", +"V1=I*R1; //Ohm's Law\n", +"disp(V1,'Voltage drop across R1 in Volts = '); //displaying result\n", +"V2=I*R2; //Ohm's Law\n", +"disp(V2,'Voltage drop across R2 in Volts = '); //displaying result\n", +"V3=I*R3; //Ohm's Law\n", +"disp(V3,'Voltage drop across R3 in Volts = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.16: calculating_max_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"R=15; //resistance in Ohm\n", +"disp('KVL: 16I1+15I2=6 (1)'); //KVL equation\n", +"I1=-1.66; //from(1)\n", +"I2=2.17; //from (1)\n", +"disp(I1); //current in Ampere\n", +"disp(I2)\n", +"V=(I1+I2)*R; //calculating potential difference\n", +"disp(V,'Potential difference in Volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17: calculating_max_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('3I1-I2-1=0 (1)'); //KVL equation\n", +"disp('3I1-I2+2I=2 (2)'); //KVL equation\n", +"disp('3I1-I1+2I=2 (3)'); //KVL equation\n", +"I1=0.2352; //from (1)(2)(3)through AB \n", +"I2=-0.11764; //from (1)(2)(3)through BD\n", +"I=0.58823; //from (1)(2)(3)through main circuit\n", +"Ig=-0.117647; //current in Ampere\n", +"Ibc=I1-I2; //calculating current in BC\n", +"Iad=I-I1; //calculating current in AD\n", +"Idc=I-I1-Ig; //calculating current in DC\n", +"disp(Ibc,'Current in branch BC in Ampere = '); //displaying result\n", +"disp(Iad,'Current in branch AD in Ampere = '); //displaying result\n", +"disp(Idc,'Current in branch DC in Ampere = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18: calculating_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"P=10; //Ohm\n", +"Q=3; //Ohm\n", +"R=12; //Ohm\n", +"S=6; //Ohm\n", +"G=20; //Ohm\n", +"disp('-12I+22I1+IgG=0 (1)'); //KVL\n", +"disp('6I-9I1+29Ig=0 (2)'); //KVL\n", +"disp('13I1-3Ig=2 (3)'); //KVL\n", +"Ig=7.797*10^-3; //from (1)(2)(3)\n", +"disp(Ig,'Current through Galvanometer in Ampere = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19: calculating_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"P=500; //power in Watts\n", +"V=200; //voltage in Volts\n", +"R=(V^2)/P; //using P=V^2*R\n", +"disp(R,'Resistance in Ohm = '); //displaying result\n", +"V1=160; //voltage in Volts\n", +"P1=(V1^2)/R; //calculating power\n", +"Dp=500-P1; //drop in heat\n", +"D=(Dp*100)/500; //percentage drop\n", +"disp(D,'% Drop in heat production = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: calculating_delay.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"n=10^6; //no. of electrons\n", +"e=1.6*10^-19; //charge on an electron in C\n", +"q=n*e; //calculating total charge\n", +"t=10^-3; //time in second\n", +"I=q/t; //calculating current\n", +"disp(I,'Current flowing in Ampere = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: calculating_output_signal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"I=300*10^-3; //current n Ampere\n", +"t=60; //time in second\n", +"e=1.6*10^-19; //chatge on electron in C\n", +"q=I*t; //calculating charge\n", +"n=q/e; //calculating no of electrons\n", +"disp(n,'No. of electrons = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: calculating_output_common_mode_signal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"V=200; //voltage in volt\n", +"R=100; //resistance in Ohm\n", +"e=1.6*10^-19; //charge on an electron in C\n", +"I=V/R; //Ohm's law\n", +"t=1; //time in second\n", +"q=I*t; //calculating charge\n", +"n=q/e; //calculating no of electrons\n", +"disp(n,'No. of electrons = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: calculating_output_signal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"l=15; //length in m\n", +"A=6*10^-7; //area in m square\n", +"R=5; //resistance in Ohm\n", +"p=(A*R)/l; //calculating resistivity\n", +"disp(p,'Resistivity in Ohm metre = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: calculating_energy_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"l=0.1; //length in m\n", +"A=10^-4; //area in m square\n", +"R=0.01; //resistance in Ohm\n", +"p=(A*R)/l; //calculating resistivity\n", +"disp(p,'Resistivity in Ohm metre = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: calculating_max_peak_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"L=1; //length in m\n", +"r=0.2*10^-3; //radius in m\n", +"A=%pi*(r)^2; //calculating area\n", +"disp(A)\n", +"R=2; //resistance in Ohm\n", +"P=(R*A)/L; //calculating resistivity\n", +"disp(P,'Resistivity in Ohm. metre = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: calculating_size.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"R1=5; //resisitance in Ohm\n", +"R2=9*5; //calculating using R2/A1=(l2/A2)*(A1/l1)\n", +"disp(R2,'Resisitance in Ohm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: calculating_rms_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"R1=5; //resisitance in Ohm\n", +"R2=4*5; //calculating using R2/A1=(l2/A2)*(A1/l1)\n", +"disp(R2,'Resisitance in Ohm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"R1=2; //resisitance in Ohm\n", +"R2=4; //resistance in Ohm\n", +"R3=5; //resistance in Ohm\n", +"R=(R1^-1)+(R2^-1)+(R3^-1); //calculating parallel resistance\n", +"Rp=(1/R);\n", +"disp(Rp,'Resisitance in Ohm = '); //displaying result" + ] + } +], +"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 +} diff --git a/The_Field_of_Electronics_by_R_Morrison/6-Digital_Design.ipynb b/The_Field_of_Electronics_by_R_Morrison/6-Digital_Design.ipynb new file mode 100644 index 0000000..6675afd --- /dev/null +++ b/The_Field_of_Electronics_by_R_Morrison/6-Digital_Design.ipynb @@ -0,0 +1,472 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Digital Design" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10: calculating_radiation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=5; //in volt\n", +"sp=2*10^-3; //spacing in m\n", +"d=1; //distance in metre\n", +"hw=7.5; //half wavelength in metre\n", +"f=10.6*10^6; //frequency in Hz\n", +"a=0.3; //area in centimetre square\n", +"r=316; //standard model radiation in (V*10^-6)/metre\n", +"n=316*(500*a*v)/(89*3.3); //calculating radiation\n", +"disp(n,'Radiation in (V*10^-6)/metre = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11: calculating_H_field.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"mo=1/(4*(%pi)*10^-7); //constant\n", +"a=0.01; //area in m square\n", +"v=0.2; //in volt\n", +"f=2*10^6; //frequency in Hz\n", +"vp=v*sqrt(2); //calculating peak voltage\n", +"disp(vp,'Peak voltage in volt = '); //displaying result\n", +"b=vp/a; //change in B field\n", +"disp(b,'Change in B field in Tesla/sec = '); //displaying result\n", +"h=b*mo; //calculating H field\n", +"disp(h,'H field is changing in A/m per sec'); //displaying result\n", +"disp('At 2 MHz the H-field peak is 1.79 A/m.'); //displaying result\n", +"disp('This is 1.26 A/m rms.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12: calculating_WCC.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"dia=1; //diameter in cm\n", +"f=300*10^6; //frequency in Hz\n", +"i=5; //current in Ampere\n", +"dis=10; //in cm\n", +"dim=0.56; //aperture dimension in cm\n", +"r=(dia*10^-2)/2; //calculating radius in metre\n", +"h=(0.25)/(2*(%pi)*r); //H field\n", +"disp(h,'H field in A/metre = '); //displaying result\n", +"disp('For a plane wave the E field is 377 H = 3000V/m'); //displaying\n", +"att=75/dim; //attenuation\n", +"disp(att,'Attenuation = '); //displaying result\n", +"disp('Thus, the field is 22.4 V/metre'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13: finding_the_mode_of_coupling.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"ap=2; //aperture length in cm\n", +"f=(2/75)*3000; //field\n", +"disp(f,'Field is coupled with in V/metre = '); //displaying result\n", +"disp('For an area of 2 cm square,the voltage coupled is 2.13 V.'); //displaying result \n", +"disp('This can damage a circuit.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14: determining_the_type_of_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('The filter must attenuate the signal by a factor of 10.'); //displaying result\n", +"f=300*10^6; //frequency in Hz\n", +"disp(' If R = 100 Ohm ,then the reactance of the capacitor should be about 10 Ohm.'); //displaying result\n", +"c=1/(2*(%pi)*f*10); //calculating capacitance\n", +"disp(c,'At 300 MHz, this is in Farad = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15: calculating_common_mode_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"i=54946; //current in Ampere\n", +"d=1; //distance in ft\n", +"r=0.33; //in metre\n", +"f=425.89; //frequency in Hz\n", +"h=i/(2*(%pi)*r); //calculating H field\n", +"disp(h,'H field in A/metre = '); //displaying result\n", +"mo=(4*(%pi)*10^-7); //constant\n", +"b=mo*h; //calculating B field\n", +"disp(b,'B field in Tesla = '); //displaying result\n", +"area=0.02; //area in metre square\n", +"flux=b*area; //calculatin flux\n", +"disp(flux,'Flux in Wb = '); //displaying result\n", +"v=(2*(%pi)*f); //calculating voltage\n", +"disp(v,'Voltage in volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16: observing_output.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('The reactance at 640 kHz is 75.4 Ohm.'); //displaying result\n", +"disp('For 20,000 A, the voltage drop is 1.5*10^6 Volt.'); //displaying result\n", +"disp('The breakdown voltage for 6 in. is 300,000 V.Lightning will jump through the concrete.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: calculating_dielectric_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"c=500*10^-12; //capacitance in Farad\n", +"d=0.01; //spacing in inch\n", +"eo=8.854*10^-12; //dielectric constant of air in Farad per metre\n", +"er=7.1*10^-12; //dielectric constant of material\n", +"area=0.02*d; //in metre square\n", +"C=697*er; //calculating capacitance\n", +"disp(C,'Capacitance in Farad = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: calculating_output.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"r=100; //resistance in Ohm\n", +"v=10; //in volt\n", +"d=10; //distance in feet\n", +"c=10*10^-6; //capacitor in Farad\n", +"i=v/r; //current\n", +"disp(i,'The wave travels the length of the line in 20 ns. The current that flows in the capacitor is the short-circuit current = '); //displaying result\n", +"ch=40*10^-9*0.1; //charge\n", +"disp(ch,'The charge that flows in 40 ns = '); //displaying result\n", +"v1=ch/c; //voltage\n", +"disp(v1,'Voltage in a 10*10^-6 Farad Capacitor = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: calculating_size.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"i=20*10^-3; //current\n", +"vd=1; //voltage drop\n", +"t=10^-3; //time in sec\n", +"q=i*t; //charge\n", +"c=q/vd; //capacitance\n", +"disp(c,'Capacitance in Farad = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"c=15*10^-12; //capacitance in F/ft\n", +"v=10; //in volt\n", +"f=10*10^6; //frequency in Hz\n", +"t=10*10^-9; //time\n", +"imp=100; //impedance in Ohm\n", +"l=3; //length in metre\n", +"i=c*10^9; //current\n", +"disp(i,'Current in Ampere = '); //displaying result\n", +"disp('This is 1.5 V in 100 .'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: calculating_radiation_level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=10; //in volt\n", +"i=20*10^-3; //current in Ampere\n", +"t=10*10^-9; //time in sec\n", +"s=0.05; //spacing in inch\n", +"l=50; //length in cm\n", +"disp('The radiation using the standard model is 316*10^-6V.'); //displaying result\n", +"f=1/((%pi)*t); //frequency\n", +"disp(f,'Frequency in Hz = '); //displaying result\n", +"rad=(316*57*0.6*10)/(3.33*9.9); //radiation\n", +"disp(rad,'radiation level at 10 metre in (V*10^-6 metre) = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: calculating_radiation_level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=10; //in volt\n", +"i=20*10^-3; //current in Ampere\n", +"t=10*10^-9; //time in sec\n", +"s=0.05; //spacing in inch\n", +"l=50; //length in cm\n", +"disp('The radiation using the standard model is 316*10^-6V.'); //displaying result\n", +"f=1/((%pi)*t); //frequency\n", +"disp(f,'Frequency in Hz = '); //displaying result\n", +"rad=(316*57*0.6*10)/(3.33*9.9); //radiation\n", +"disp(rad,'radiation level at 10 metre in (V*10^-6 metre) = '); //displaying result\n", +"w=364; //ratio of areas\n", +"disp(w,'If the adjacent conductor is 0.05 in. away, the field is reduced by the ratio of areas in (10^-6*V/metre)= '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"imp=0.2; //transfer impedance in Ohm/metre\n", +"f=50*10^6; //frequency in Hz\n", +"i=10*10^-3; //current in Ampere\n", +"l=2; //length in metre\n", +"disp('The voltage coupled to the cable is 0.02 V/m.'); //displaying\n", +"disp(' This is 0.04 V in 2 m.'); //displaying result\n", +"disp('Half of the energy goes in each direction.'); //displaying result\n", +"disp('At the unterminated end, the voltage doubles.'); //displaying result\n", +"disp('Thus, The result is 0.04 V.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"hw=7.5; //half wavelength in metre\n", +"f=20*10^6; //frequency in Hz\n", +"a=0.03; //area in metre square\n", +"v=hw*a; //calculating voltage\n", +"disp(v,'Voltage in volt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.9: calculating_WCC_radiation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=5; //in volt\n", +"sp=2*10^-3; //spacing in m\n", +"d=1; //distance in metre\n", +"hw=7.5; //half wavelength in metre\n", +"f=10.6*10^6; //frequency in Hz\n", +"a=0.8; //area in centimetre square\n", +"r=316; //standard model radiation in (V*10^-6)/metre\n", +"n=316*(125*a*v*d)/(89*3.3); //calculating radiation\n", +"disp(n,'Radiation in (V*10^-6)/metre = '); //displaying result" + ] + } +], +"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 +} |