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 /Solid_State_Pulse_Circuits_by_D_A_Bell/2-RC_circuits.ipynb | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-master.tar.gz all-scilab-tbc-books-ipynb-master.tar.bz2 all-scilab-tbc-books-ipynb-master.zip |
Initial commit
Diffstat (limited to 'Solid_State_Pulse_Circuits_by_D_A_Bell/2-RC_circuits.ipynb')
-rw-r--r-- | Solid_State_Pulse_Circuits_by_D_A_Bell/2-RC_circuits.ipynb | 348 |
1 files changed, 348 insertions, 0 deletions
diff --git a/Solid_State_Pulse_Circuits_by_D_A_Bell/2-RC_circuits.ipynb b/Solid_State_Pulse_Circuits_by_D_A_Bell/2-RC_circuits.ipynb new file mode 100644 index 0000000..a7dd78d --- /dev/null +++ b/Solid_State_Pulse_Circuits_by_D_A_Bell/2-RC_circuits.ipynb @@ -0,0 +1,348 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: RC circuits" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10: Calculate_output_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Calculate output voltage for (a)10V and 1ms Pw (b)10V and 2ms PW (c)20V and 1ms PW\n", +"//Ex2.10\n", +"clc;\n", +"clear;\n", +"close;\n", +"e1=10//Voltage applied(in volts)\n", +"e0=0//Voltage at t=0sec(in volts)\n", +"t1=1//PW(in ms)\n", +"t2=2//PW(in ms)\n", +"e2=20//Input voltage(in volts)\n", +"r=10//Resistance(in kilo ohm)\n", +"c=20//Capacitance(in micro farad)\n", +"eo1=(e1-((e1-e0)*(2.718)^(-t1/(r*c))))*1000\n", +"eo2=(e1-((e1-e0)*(2.718)^(-t2/(r*c))))*1000\n", +"eo3=(e2-((e2-e0)*(2.718)^(-t1/(r*c))))*1000\n", +"disp(eo3,eo2,eo1,'Output voltage for(a)(in mv),(b)(in mv),(c)(in mv)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.11: Calculate_output_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Calculate output voltage for (a)10V and (b)20V\n", +"//Ex2.11\n", +"clc;\n", +"clear;\n", +"close;\n", +"E1=10//Input voltage(in volts)\n", +"E2=20//Input voltage(in volts)\n", +"c=1//Capacitance(in micro farad)\n", +"r=1//Resistance(in kilo ohm)\n", +"t=100//Pulse width(in ms)\n", +"i1=(c*E1*10^(-6))/(t*10^(-3))\n", +"eo1=i1*r*1000\n", +"disp(eo1,'Output voltage for (a)(in volts)=')\n", +"i2=(c*E2*10^(-6)/(t*10^(-3)))\n", +"eo2=i2*r*1000\n", +"disp(eo2,'Output voltage for (b)(in volts)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.12: Calculate_amplitude_of_output_waveform.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Calculate amplitude of output waveform for (a)Rise time (b)Fall time\n", +"//Ex2.12\n", +"clc;\n", +"clear;\n", +"close;\n", +"r=1//Resistance(in kilo ohm)\n", +"c=100//Capacitance(in pf)\n", +"tr=1//Rise time(in micro sec)\n", +"tf=3//Fall time(in micro sec)\n", +"e1=8//Change in voltage for rise time(in volts)\n", +"e2=-8//Change in voltage for fall time(in volts)\n", +"eo1=r*c*0.001*e1/tr\n", +"disp(eo1,'Amplitude of output waveform for (a)Rise time(in volts)=')\n", +"eo2=r*c*0.001*e2/tf\n", +"disp(eo2,'Amplitude of output waveform for (b)Fall time(in volts)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Calculate_voltage_after_8ms.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Calculate voltage after 8ms\n", +"//Ex:2.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"c=1//Capacitance of capacitor(in micro farad)\n", +"vs=6//Source voltage(in volts)\n", +"r=10//Resistor(in kilo ohm)\n", +"vi=-3//Initial voltage(in volts)\n", +"t=8//Time (in milli sec)\n", +"e=vs-((vs-vi)*2.718^(-t/(r*c)))\n", +"disp(e,'Voltage after 8ms(in volts)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Determine_EC.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Determine (a)Ec at 1.5ms (b)Ec at 6ms\n", +"//Ex2.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"r1=1//Resistor(in kilo ohm)\n", +"c1=1//Capacitance(in micro farad)\n", +"e1=10//Voltage(in volts)\n", +"r2=20//Resistor(in kilo ohm)\n", +"c2=0.1//Capacitance(in micro farad)\n", +"e2=12//Voltage(in volts)\n", +"t1=r1*c1*0.78\n", +"e=e1*1\n", +"ec1=e*t1\n", +"t2=r2*c2*0.025\n", +"E=e2*1\n", +"ec2=E*t2\n", +"disp(ec2,ec1,'(a)Ec at 1.5ms(in volts) and (b)Ec at 6ms(in volts)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Calculate_Rise_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Calculate Rise time,time for capacitor to charge to required amount and time required for complete charging\n", +"//Ex2.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"V=5//Voltage source(in volts)\n", +"r=39//Resistor(in kilo ohm)\n", +"c=500//Capacitance of capacitor(in pf)\n", +"tr=2.2*r*c*10^(-3)\n", +"t=r*c*10^(-3)\n", +"tc=5*r*c*10^(-3)\n", +"disp(tc,t,tr,'Rise time,time for 63.2% charging and time required for complete charging(in micro sec)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: Calculate_minimum_square_wave_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Calculate minimum square wave frequency\n", +"//Ex2.6\n", +"clc;\n", +"clear;\n", +"close;\n", +"C=1//Coupling capacitor(in micro farad)\n", +"R=1//Input resistance(in Mega ohm)\n", +"t=0.01//Tilt\n", +"PW=t*R*C\n", +"f=1/(2*PW)\n", +"disp(f,'Frequency required(in hertz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: Determine_fastest_rise_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Determine fastest rise time\n", +"//Ex2.7\n", +"clc;\n", +"clear;\n", +"close;\n", +"r=600//Output resistance(in ohms)\n", +"c=30//Input capacitance(in pf)\n", +"tr=2.2*r*c*10^(-3)\n", +"disp(tr,'Fastest rise time(in ns)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8: Calculate_voltage_at_14_ms.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Calculate voltage at 14 ms \n", +"//Ex2.8\n", +"clc;\n", +"clear;\n", +"close;\n", +"Eo=0//Voltage at t=0sec(in volt)\n", +"E=20//Peak voltage(in volts)\n", +"r=3.3//Resistance(in kilo ohm)\n", +"c=1//Capacitance(in micro farad)\n", +"t1=4//Time(in ms)\n", +"t2=2//Time(in ms)\n", +"e1=E-((E-Eo)*(2.718)^(-t1/(r*c)))\n", +"e2=Eo-((Eo-e1)*(2.718)^(-t1/(r*c)))\n", +"e3=E-((E-e2)*(2.718)^(-t1/(r*c)))\n", +"e3=Eo-((Eo-e3)*(2.718)^(-t2/(r*c)))\n", +"disp(e3,'Voltage at 14ms(in volts)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9: Determine_max_and_min_voltage_at_which_capacitor_voltage_will_settle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caption:Determine max and min voltage at which capacitor voltage will settle\n", +"//Ex2.9\n", +"clc;\n", +"clear;\n", +"close;\n", +"E=20//Peak voltage(in volts)\n", +"t=4//Time interval(in ms)\n", +"r=3.3//Resistance(in kilo ohms)\n", +"c=1//Capacitance(in micro farad)\n", +"Emax=E/(1+(2.718^(-t/(r*c))))\n", +"Emin=E-Emax\n", +"disp(Emin,Emax,'Maximum and minimum voltage(in volts)=')" + ] + } +], +"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 +} |