summaryrefslogtreecommitdiff
path: root/Linear_Integrated_Circuit_by_M_S_Sivakumar/4-Operational_Amplifier.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Linear_Integrated_Circuit_by_M_S_Sivakumar/4-Operational_Amplifier.ipynb')
-rw-r--r--Linear_Integrated_Circuit_by_M_S_Sivakumar/4-Operational_Amplifier.ipynb349
1 files changed, 349 insertions, 0 deletions
diff --git a/Linear_Integrated_Circuit_by_M_S_Sivakumar/4-Operational_Amplifier.ipynb b/Linear_Integrated_Circuit_by_M_S_Sivakumar/4-Operational_Amplifier.ipynb
new file mode 100644
index 0000000..b60d6d0
--- /dev/null
+++ b/Linear_Integrated_Circuit_by_M_S_Sivakumar/4-Operational_Amplifier.ipynb
@@ -0,0 +1,349 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Operational Amplifier"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: EX4_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.1 // For an op-amp circuit find a) closed loop gain Acl b) input impedance Zin c) output impedance Zo\n",
+"clc ;\n",
+"clear ;\n",
+"close ;\n",
+"ro = 85 ; // ohm\n",
+"A = 150*10^3 ; // ohm\n",
+"R2 = 350*10^3 ; // ohm // Feedback resistance\n",
+"R1 = 10*10^3 ; // ohm // Input resistance\n",
+"\n",
+"// a) closed loop gain\n",
+"// ACL = abs(Vo/Vin) = abs(R2/R1)\n",
+"ACL = abs(R2/R1) ;\n",
+"disp(' closed loop gain of an op-amp is = '+string(ACL)+' '); // 1/beta = ACL\n",
+"beta = (1/ACL) ;\n",
+"\n",
+"// b) the input impedance Zin\n",
+"Zin = R1 ;\n",
+"disp(' the input impedance Zin = '+string(Zin)+' ohm ');\n",
+"\n",
+"// c0 the output impedance Z0\n",
+"Z0 = (ro)/(1+(beta*A));\n",
+"disp(' the output impedance Z0 = '+string(Z0)+' ohm ');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Determine_the_differece_voltage_and_open_loop_gain_of_an_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.2 // Determine the differece voltage and open loop gain of an op-amp\n",
+"clc ;\n",
+"clear ;\n",
+"close ;\n",
+"V1 = -5 ; // volt // input voltage\n",
+"V2 = 5 ; // volt\n",
+"Vo = 20 ; //volt // output voltage\n",
+"\n",
+"// the difference voltage is given by \n",
+" Vd = V2-V1 ;\n",
+"disp(' The difference voltage is = '+string(Vd)+' V ');\n",
+"\n",
+"// open loop gain \n",
+"A = (Vo/Vd);\n",
+"disp(' The open loop gain is = '+string(A)+' ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: Determine_the_differece_voltage_and_open_loop_gain_of_an_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.3 // Determine the differece voltage and open loop gain of an op-amp\n",
+"clc ;\n",
+"clear ;\n",
+"close ;\n",
+"V1 = -5 ; // volt // input voltage\n",
+"V2 = 0 ; // volt // GND\n",
+"Vo = 20 ; //volt // output voltage\n",
+"\n",
+"// the difference voltage is given by \n",
+" Vd = V2-V1 ;\n",
+"disp(' The difference voltage is = '+string(Vd)+' V ');\n",
+"\n",
+"// open loop gain \n",
+"A = (Vo/Vd);\n",
+"disp(' The open loop gain is = '+string(A)+' ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: Determine_the_differece_voltage_and_open_loop_gain_of_an_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.4 // Determine the differece voltage and open loop gain of an op-amp\n",
+"clc ;\n",
+"clear ;\n",
+"close ;\n",
+"V1 = 0 ; // volt // input voltage // GND\n",
+"V2 = 5 ; // volt \n",
+"Vo = 20 ; //volt // output voltage\n",
+"\n",
+"// the difference voltage is given by \n",
+" Vd = V2-V1 ;\n",
+"disp(' The difference voltage is = '+string(Vd)+' V ');\n",
+"\n",
+"// open loop gain \n",
+"A = (Vo/Vd);\n",
+"disp(' The open loop gain is = '+string(A)+' ');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Determine_the_differece_voltage_and_open_loop_gain_of_an_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.5 // Determine the differece voltage and open loop gain of an op-amp\n",
+"clc ;\n",
+"clear ;\n",
+"close ;\n",
+"V1 = 5 ; // volt // input voltage // GND\n",
+"V2 = -5 ; // volt \n",
+"Vo = -20 ; //volt // output voltage\n",
+"\n",
+"// the difference voltage is given by \n",
+" Vd = V2-V1 ;\n",
+"disp(' The difference voltage is = '+string(Vd)+' V ');\n",
+"\n",
+"// open loop gain \n",
+"A = (Vo/Vd);\n",
+"disp(' The open loop gain is = '+string(A)+' ');\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: To_find_closed_loop_gain_and_output_voltage_Vo_of_an_inverting_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example4.6 // To find closed loop gain and output voltage Vo of an inverting op-amp\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"R1 = 10 ; //kilo ohm // input resistance\n",
+"R2 = 25 ; // kilo ohm // feedback resistance\n",
+"Vin = 10 ; //volt // input voltage\n",
+"\n",
+"// Closed loop gain of an inverting op-amp\n",
+"Ac = -(R2/R1) ;\n",
+"disp('The Closed loop gain of an inverting op-amp is = '+string(Ac)+' ');\n",
+"Ac = abs(Ac);\n",
+"disp('The |Ac| Closed loop gain of an inverting op-amp is = '+string(Ac)+' ');\n",
+"\n",
+"// the output voltage of an inverting op-amp\n",
+"Vo = -(R2/R1)*Vin ;\n",
+"disp(' The output voltage of an inverting op-amp is = '+string(Vo)+' V ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: To_find_closed_loop_gain_and_output_voltage_Vo_of_an_non_inverting_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example4.7 // To find closed loop gain and output voltage Vo of an non-inverting op-amp\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"R1 = 10 ; //kilo ohm // input resistance\n",
+"R2 = 25 ; // kilo ohm // feedback resistance\n",
+"Vin = 10 ; //volt // input voltage\n",
+"\n",
+"// Closed loop gain of an non-inverting op-amp\n",
+"Ac = 1+(R2/R1) ;\n",
+"Ac = abs(Ac);\n",
+"disp('The Closed loop gain of an non-inverting op-amp is = '+string(Ac)+' ');\n",
+"\n",
+"// the output voltage of an inverting op-amp\n",
+"Vo = (1+R2/R1)*Vin ;\n",
+"disp(' The output voltage of an non-inverting op-amp is = '+string(Vo)+' V ');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: to_find_out_closed_loop_gain_and_output_voltage_Vo.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example4.8 // to find out closed loop gain and output voltage Vo\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"R1 = 10 ; //kilo ohm // input resistance\n",
+"R3 = 10 ; //kilo ohm // input resistance\n",
+"R2 = 25 ; // kilo ohm // feedback resistance\n",
+"R4 = 25 ; // kilo ohm // feedback resistance\n",
+"Vin2 = 10 ; //volt // input voltage\n",
+"Vin1 = -10 ; //volt // input voltage\n",
+"\n",
+"// closed loop gain of differntial op-amp is given by\n",
+"Ac = (R2/R1) ;\n",
+"Ac = abs(Ac); \n",
+"disp('The closed loop gain of differntial op-amp is = '+string(Ac)+' ');\n",
+"\n",
+"// the output voltage of an non-inverting op-amp is given by\n",
+"Vo = (R2/R1)*(Vin2-Vin1) ;\n",
+"disp('The output voltage of an non-inverting op-amp is= '+string(Vo)+' V ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: Determine_the_non_inverting_input_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example4.9 // Determine the non-inverting input voltage\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"R1 = 10 ; //kilo ohm // input resistance\n",
+"R2 = 25 ; //kilo ohm // feedback resistance\n",
+"Voh = 10 ; // volt //output voltage\n",
+"Vol = -10 ; // volt // output voltage\n",
+"\n",
+"// upper voltage\n",
+"V = (R1/(R1+R2)*Voh) ;\n",
+"disp(' The upper voltage is = '+string(V)+' V ');\n",
+"\n",
+"// Lower voltage\n",
+"V = (R1/(R1+R2)*Vol) ;\n",
+"disp(' The lower voltage is = '+string(V)+' V ');\n",
+""
+ ]
+ }
+],
+"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
+}