diff options
Diffstat (limited to 'Basic_Electronics_by_R_D_S_Samuel/5-Amplifiers_and_Oscillators.ipynb')
-rw-r--r-- | Basic_Electronics_by_R_D_S_Samuel/5-Amplifiers_and_Oscillators.ipynb | 1189 |
1 files changed, 1189 insertions, 0 deletions
diff --git a/Basic_Electronics_by_R_D_S_Samuel/5-Amplifiers_and_Oscillators.ipynb b/Basic_Electronics_by_R_D_S_Samuel/5-Amplifiers_and_Oscillators.ipynb new file mode 100644 index 0000000..f1f6f5a --- /dev/null +++ b/Basic_Electronics_by_R_D_S_Samuel/5-Amplifiers_and_Oscillators.ipynb @@ -0,0 +1,1189 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Amplifiers and Oscillators" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_10: EX5_5_10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.10')\n", +"printf('\n')\n", +"disp('Calculate overall voltage gain in db & output voltage when input voltage is 1uV for cascaded amplifier')\n", +"printf('Given\n')\n", +"//Voltage gain of amplifier\n", +"Av1=10\n", +"Av2=100\n", +"Av3=1000\n", +"//input voltage\n", +"Vi=10^-6\n", +"//overall voltage gain\n", +"Av=Av1*Av2*Av3\n", +"//in db\n", +"Avdb=20*log10(Av)\n", +"//output voltage when input voltage is 10^-6V\n", +"Vo=Av*Vi\n", +"printf('overall voltage gain in dB \n%f dB\n',Avdb)\n", +"printf('output voltage \n%f volt\n',Vo)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_11: Calculate_overall_voltage_gain_in_db_of_cascaded_2_stage_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.11')\n", +"printf('\n')\n", +"disp('Calculate overall voltage gain in db of cascaded 2 stage amplifier')\n", +"printf('Given\n')\n", +"//Voltage gain\n", +"Av1=10\n", +"Av2=20\n", +"//overall voltage gain \n", +"Av=Av1*Av2\n", +"//in db\n", +"Avdb=20*log10(Av)\n", +"printf('Overall gain is \n%f dB\n',Avdb)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_12: EX5_5_12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.12')\n", +"printf('\n')\n", +"disp('Calculate overall voltage gain ,gain of 2nd & 3rd stage,input voltage of 2nd stage & all in db of three stage amplifier')\n", +"printf('Given\n')\n", +"//input voltage \n", +"Vi=0.05\n", +"//output voltage\n", +"Vo=150\n", +"//voltage gain of 1st stage\n", +"Av1=20\n", +"//input to 3rd stage\n", +"V2=15\n", +"//overall voltage gain \n", +"Av=Vo/Vi\n", +"//input to 2nd stage\n", +"V1=Av1*Vi\n", +"//voltage gain of 2nd stage\n", +"Av2=V2/V1\n", +"//voltage gain of 3rd stage\n", +"Av3=Vo/V2\n", +"//all stages gain in db\n", +"Av1db=20*log10(Av1)\n", +"Av2db=20*log10(Av2)\n", +"Av3db=20*log10(Av3)\n", +"//overall gain in db\n", +"Av=Av1db+Av2db+Av3db\n", +"printf('overall voltage gain \n%f\n',Av)\n", +"printf('voltage gain of 2nd & 3rd stages \n%f\n%f\n',Av2,Av3)\n", +"printf('input voltage of 2nd stage \n%f volt\n',V1)\n", +"printf('Decibal voltage gain of 1st, 2nd, 3rd stage \n%fdB\n%fdB\n%fdB\n',Av1db,Av2db,Av3db)\n", +"printf('Overall gain in db \n%f dB\n',Av)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_15: For_CE_amplifier_find_R1_R2_Re_and_Rc.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.15')\n", +"printf('\n')\n", +"disp('For CE amplifier shown in fig 5.5 find R1,R2,Re & Rc')\n", +"printf('Given\n')\n", +"Vcc=24\n", +"//load resistance\n", +"RL=120*10^3\n", +"//since Rc<<RL\n", +"Rc=RL/10\n", +"//select Ve & Vce\n", +"Ve=5\n", +"Vce=3\n", +"Vrc=Vcc-Vce-Ve //from circuit\n", +"Ic=Vrc/Rc\n", +"//find Re\n", +"Re=Ve/Ic\n", +"R2=10*Re\n", +"//Vbe for si transistor\n", +"Vbe=0.7\n", +"Vb=Vbe+Ve\n", +"I2=Vb/R2\n", +"R1=(Vcc-Vb)/I2\n", +"printf('The resistance values are\nR1=%f ohm\nR2=%f ohm\nRe=%f ohm\nRc=%f ohm\n',R1,R2,Re,Rc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_16: For_CE_amplifier_find_R1_R2_Re_and_Rc.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.16')\n", +"printf('\n')\n", +"disp('For CE amplifier shown in fig 5.5 find R1,R2,Re & Rc')\n", +"printf('Given\n')\n", +"Vcc=18\n", +"//load resistance\n", +"RL=56*10^3\n", +"//since Rc<<RL\n", +"Rc=RL/10\n", +"//select Ve & Vce\n", +"Ve=5\n", +"Vce=3\n", +"Vrc=Vcc-Vce-Ve //from circuit\n", +"Ic=Vrc/Rc\n", +"//find Re\n", +"Re=Ve/Ic\n", +"R2=10*Re\n", +"//Vbe for si transistor\n", +"Vbe=0.7\n", +"Vb=Vbe+Ve\n", +"I2=Vb/R2\n", +"R1=(Vcc-Vb)/I2\n", +"printf('The resistance values are\nR1=%f ohm\nR2=%f ohm\nRe=%f ohm\nRc=%f ohm\n',R1,R2,Re,Rc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_19: calculate_upper_cutoff_frequency_and_voltage_gain_at_lower_cutoff_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.19')\n", +"printf('\n')\n", +"disp('calculate upper cut-off frequency & voltage gain at lower cut-off frequency')\n", +"printf('Given\n')\n", +"//bandwidth of amplifier\n", +"BW=500*10^3\n", +"//lower cut-off frequency\n", +"f1=25\n", +"//midband gain\n", +"Ao=120\n", +"//upper cut-off frequency\n", +"f2=BW+f1\n", +"//voltage gain at lower cut-off frequency\n", +"A1=Ao/sqrt(2)\n", +"printf('upper cut-off frequency \n %f hz\n',f2)\n", +"printf('Voltage gain at lower cut-off frequency \n %f \n',A1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_23: calculate_closed_loop_gain_for_the_negative_feedback_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.23')\n", +"printf('\n')\n", +"disp('calculate closed-loop gain for the negative feedback amplifier')\n", +"printf('Given\n')\n", +"//voltage gain without feedback\n", +"Av=100000\n", +"//feedback factor\n", +"B=1/100\n", +"//voltage gain with feedback\n", +"Acl=Av/(1+(B*Av))\n", +"//when Av is changed by 50%\n", +"Av1=50*100000/100\n", +"Av2=Av+Av1\n", +"//voltage gain with feedback when Av changed by +50%\n", +"Acl1=Av2/(1+(B*Av2))\n", +"//voltage gain with feedback when Av changed by -50%\n", +"Av3=Av-Av1\n", +"Acl2=Av3/(1+(B*Av3))\n", +"printf('closed loop gain of negative feedback amplifier is \n %f \n',Acl2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_24: calculate_closed_loop_gain_for_the_negative_feedback_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.24')\n", +"printf('\n')\n", +"disp('calculate closed-loop gain for the negative feedback amplifier')\n", +"printf('Given\n')\n", +"//voltage gain without feedback\n", +"Av=1000\n", +"//feedback factor\n", +"B=0.1\n", +"//voltage gain with feedback\n", +"Acl=Av/(1+(B*Av))\n", +"printf('closed loop gain of negative feedback amplifier is \n %f \n',Acl)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_27: calculate_input_impedance_of_amplifier_with_negative_feedback.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.27')\n", +"printf('\n')\n", +"disp('calculate input impedance of amplifier with negative feedback')\n", +"printf('Given\n')\n", +"//input impedance without feedback\n", +"Zb=10^3\n", +"//open loop voltage gain\n", +"Av=100000\n", +"//feedback network resistance\n", +"RF1=56*10^3\n", +"RF2=560\n", +"//input side resistance\n", +"R1=68*10^3\n", +"R2=33*10^3\n", +"//feedback factor\n", +"B=RF2/(RF1+RF2)\n", +"//input impedance with feedback\n", +"Zi=Zb*(1+(B*Av))\n", +"//input impedance with feedback by considering R1 & R2\n", +"Rp=(R1*R2)/(R1+R2)\n", +"Zin=(Zi*Rp)/(Zi+Rp)\n", +"printf('input impedance with negative feedback \n%f ohm\n',Zin)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_29: calculate_input_and_output_impedance_of_amplifier_with_negative_feedback.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.29')\n", +"printf('\n')\n", +"disp('calculate input & output impedance of amplifier with negative feedback')\n", +"printf('Given\n')\n", +"//input impedance without feedback\n", +"Zb=10^3\n", +"//open loop voltage gain\n", +"Av=7533\n", +"//input side resistance\n", +"R1=68*10^3\n", +"R2=47*10^3\n", +"//feedback factor\n", +"B=1/101\n", +"//input impedance with feedback\n", +"Zi=Zb*(1+(B*Av))\n", +"//input impedance with feedback by considering R1 & R2\n", +"Rp=(R1*R2)/(R1+R2)\n", +"Zin=(Zi*Rp)/(Zi+Rp)\n", +"//output impedance without feedback\n", +"Zc=50*10^3\n", +"Rc=3.9*10^3\n", +"//output impedance with feedback\n", +"Zo=Zc/(1+(B*Av))\n", +"//output impedance with feedback by considering Rc\n", +"Zout=(Rc*Zo)/(Rc+Zo)\n", +"printf('input impedance with negative feedback \n%f ohm\n',Zin)\n", +"printf('output impedance with negative feedback \n%f ohm\n',Zout)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_35: Estimate_the_closed_loop_upper_cut_off_frequency_and_total_harmonic_distortion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.35')\n", +"printf('\n')\n", +"disp('Estimate the closed loop upper cut-off frequency & total harmonic distortion')\n", +"printf('Given\n')\n", +"//open loop gain\n", +"Av=60000\n", +"//closed loop gain\n", +"Acl=300\n", +"//open loop upper cut-off frequency\n", +"F2OL=15*10^3\n", +"//closed loop upper cut-off frequency & Av/Acl=(1+BAv)\n", +"F2CL=F2OL*Av/Acl\n", +"//total harmonic distortion with feedback if there is 10% distortion without feedback\n", +"HD=10/(Av/Acl)\n", +"printf('closed loop upper cut-off frequency \n%f hz\n',F2CL)\n", +"printf('total harmonic distortion with feedback if there is 10per distortion without feedback \n%f\n',HD)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_36: calculate_open_loop_cut_off_frequency_if_the_open_loop_gain_is_200000.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.36')\n", +"printf('\n')\n", +"disp('calculate open loop cut-off frequency if the open loop gain is 200000')\n", +"printf('Given\n')\n", +"//open loop gain\n", +"Av=200000\n", +"//closed loop gain \n", +"Acl=250\n", +"//upper cut-off frequency with feedback\n", +"F2CL=4*10^6\n", +"//upper cut-off frequency without feedback\n", +"F2OL=F2CL/(Av/Acl)\n", +"printf('upper cut-off frequency without feedback \n%f hz\n',F2OL)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_37: calculate_the_phase_shift_with_negative_feedback.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.37')\n", +"printf('\n')\n", +"disp('calculate the phase shift with negative feedback')\n", +"printf('Given\n')\n", +"//open loop phase shift\n", +"Po=15\n", +"//open loop gain\n", +"Av=60000\n", +"//closed loop gain\n", +"Acl=300\n", +"//to calculate phase shift with feedback\n", +"AvB=(Av/Acl)-1\n", +"k=((AvB*sin(Po*%pi/180))/(1+(AvB*cos(Po*%pi/180))))\n", +"Pcl=Po-(atan(k)*180/%pi)\n", +"printf('The phase shift with negative feedback=\t%f degree\n',Pcl)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_38: calculate_bandwidth_and_gain_and_harmonic_distortion_with_feedback.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.38')\n", +"printf('\n')\n", +"disp('calculate bandwidth,gain & harmonic distortion with feedback')\n", +"printf('Given\n')\n", +"//open loop gain\n", +"Av=1000\n", +"//bandwidth without feedback\n", +"BWol=500*10^3\n", +"//feedback factor\n", +"B=0.1\n", +"//bandwidth with feedback\n", +"BWcl=BWol*(1+(B*Av))\n", +"//closed loop gain\n", +"Acl=Av/(1+(B*Av))\n", +"//harmonic distortion if 15% negative feedback used\n", +"HDcl=15/(1+(B*Av))\n", +"printf('bandwidth with feedback is \n %f hz \n',BWcl)\n", +"printf('closed loop gain \n %f \n',Acl)\n", +"printf('Harmonic distortion with feedback \n %f \n',HDcl)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_3: Calculate_output_power_change_in_decibel_of_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.3')\n", +"printf('\n')\n", +"disp('Calculate output power change in decibel of amplifier')\n", +"printf('Given\n')\n", +"//output power when frequency is 5khz\n", +"P1=50*10^-3\n", +"//output power when frequency is 20khz\n", +"P2=25*10^-3\n", +"//output power change in decibel\n", +"delPo=10*log10(P2/P1)\n", +"printf('output power change \n%f dB\n',delPo)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_40: calculate_the_frequency_of_oscillation_and_feedback_factor_of_Hartley_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.50')\n", +"printf('\n')\n", +"disp('calculate the frequency of oscillation & feedback factor of Hartley oscillator')\n", +"printf('Given\n')\n", +"//inductance\n", +"L1=2*10^-3\n", +"L2=8*10^-3\n", +"//mutual inductance\n", +"M=100*10^-6\n", +"//capacitor\n", +"C=0.001*10^-6\n", +"//total inductance \n", +"L=L1+L2+M\n", +"//frequency of oscillation\n", +"f=1/(2*%pi*sqrt(L*C))\n", +"//feedback factor\n", +"B=L1/L2\n", +"printf('frequency of oscillation of hartley oscillator \n %f hz \n',f)\n", +"printf('feedback factor \n %f \n',B)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_43: calculate_the_frequency_of_oscillation_of_RC_phase_shift_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.43')\n", +"printf('\n')\n", +"disp('calculate the frequency of oscillation of RC phase shift oscillator')\n", +"printf('Given\n')\n", +"R=500\n", +"C=0.1*10^-6\n", +"//frequency of oscillation\n", +"f=1/(2*%pi*R*C*sqrt(6))\n", +"printf('frequency of oscillation \n%f hz\n',f)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_44: calculate_the_value_of_Capacitor_for_a_RC_phase_shift_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.44')\n", +"printf('\n')\n", +"disp('calculate the value of Capacitor for a RC phase shift oscillator')\n", +"printf('Given\n')\n", +"R=1000\n", +"//frequency of oscillation\n", +"f=5000\n", +"//capacitor value\n", +"C=1/(2*%pi*R*f*sqrt(6))\n", +"printf('Capacitor value \n%e farad \n',C)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_45: calculate_the_value_of_R_and_C_for_RC_phase_shift_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.45')\n", +"printf('\n')\n", +"disp('calculate the value of R & c for RC phase shift oscillator')\n", +"printf('Given\n')\n", +"//oscillating frequency\n", +"f=2000\n", +"//select Capacitor value\n", +"C=0.1*10^-6\n", +"//resistance value \n", +"R=1/(2*%pi*f*C*sqrt(6)) \n", +"printf('Resistance value \n%f ohm\n',R)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_49: EX5_5_49.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.49')\n", +"printf('\n')\n", +"disp('calculate frequency of oscillation,feedback factor & gain required for sustained oscillation of hartley oscillator')\n", +"printf('Given\n')\n", +"//inductance\n", +"L1=5*10^-3\n", +"L2=10*10^-3\n", +"//capacitor\n", +"C=0.01*10^-6\n", +"//frequency of oscillation\n", +"f=1/(2*%pi*sqrt((L1+L2)*C))\n", +"//feedback factor\n", +"B=L1/L2\n", +"//gain required for sustained oscillation\n", +"Av=L2/L1\n", +"printf('gain required for sustained oscillation=\t>%f\n',Av)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_4: Calculate_output_power_change_in_decibel_of_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.4')\n", +"printf('\n')\n", +"disp('Calculate output power change in decibel of amplifier')\n", +"printf('Given\n')\n", +"//output voltage of amplifier when frequency 3khz\n", +"V1=2\n", +"//output voltage of amplifier when frequency 50khz\n", +"V2=0.5\n", +"//output power change in decibel\n", +"delPo=20*log10(V2/V1)\n", +"printf('output power change \n%f dB\n',delPo)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_51: calculate_the_value_of_L1_and_L2_of_Hartley_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.51')\n", +"printf('\n')\n", +"disp('calculate the value of L1 & L2 of Hartley oscillator')\n", +"printf('Given\n')\n", +"//frequency of oscillation\n", +"f=25*10^3\n", +"C=0.02*10^-6\n", +"//feedback factor\n", +"B=0.2\n", +"//Total inductance\n", +"L=1/(4*(%pi)^2*f^2*C)\n", +"L1byL2=B\n", +"L1plusL2=L\n", +"//therefore\n", +"L2=L/1.2\n", +"L1=L-L2\n", +"printf('The values of L1=\t%f henry\nL2=\t%f henry\n',L1,L2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_53: Design_the_value_of_L1_L2_and_C_for_a_hartley_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.53')\n", +"printf('\n')\n", +"disp('Design the value of L1,L2 & C for a hartley oscillator')\n", +"printf('Given\n')\n", +"//frequency of oscillation\n", +"f=30*10^3\n", +"//then value of LC\n", +"LC=1/(4*(%pi)^2*f^2)\n", +"//select c as\n", +"C=0.1*10^-6\n", +"//Total inductance\n", +"L=LC/C\n", +"//let L1=L2\n", +"L1=L/2\n", +"L2=L1\n", +"printf('The values of L1=\t%f henry\nL2=\t%f henry\nC=\t%e farad\n',L1,L2,C)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_55: calculate_the_frequency_of_oscillation_of_Colpitts_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.55')\n", +"printf('\n')\n", +"disp('calculate the frequency of oscillation of Colpitts oscillator')\n", +"printf('Given\n')\n", +"//capacitor\n", +"C1=400*10^-12\n", +"C2=C1\n", +"//inductance\n", +"L=2*10^-3\n", +"//Total capacitance\n", +"C=C1*C2/(C1+C2)\n", +"//frequency of oscillation\n", +"f=1/(2*%pi*sqrt(L*C))\n", +"printf('frequency of oscillations \n%f hz\n',f)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_56: EX5_5_56.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.56')\n", +"printf('\n')\n", +"disp('calculate the frequency of oscillation,feedback factor & gain required for sustained oscillation')\n", +"printf('Given\n')\n", +"//Capacitance\n", +"C1=40*10^-12\n", +"C2=10*10^-12\n", +"//inductance\n", +"L=3*10^-3\n", +"//total effective capacitance\n", +"C=C1*C2/(C1+C2)\n", +"//frequency of oscillation\n", +"f=1/(2*%pi*sqrt(L*C))\n", +"//feedback factor\n", +"B=C2/C1\n", +"//gain required for sustained oscillation\n", +"Av=C1/C2\n", +"printf('gain required for sustained oscillation =\t>%f\n',Av)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_57: calculate_the_value_of_L_of_Colpitts_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.57')\n", +"printf('\n')\n", +"disp('calculate the value of L of Colpitts oscillator ')\n", +"printf('Given\n')\n", +"//capacitor\n", +"C1=100*10^-12\n", +"C2=60*10^-12\n", +"//total effective capacitance\n", +"C=C1*C2/(C1+C2)\n", +"//frequency of oscillation\n", +"f=40*10^3\n", +"//inductance\n", +"L=1/(4*(%pi)^2*f^2*C)\n", +"printf('inductance value is \n%f henry\n',L)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_58: calculate_the_value_of_C1_and_C2_of_Colpitts_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.58')\n", +"printf('\n')\n", +"disp('calculate the value of C1 & C2 of Colpitts oscillator')\n", +"printf('Given\n')\n", +"//inductance\n", +"L=5*10^-3\n", +"//frequency of oscillation\n", +"f=50*10^3\n", +"//total effective capacitance\n", +"C=1/(4*(%pi)^2*f^2*L)\n", +"//feedback factor \n", +"B=0.1\n", +"//then C2/C1=0.1, so substituting in C=C1C2/(C1+C2) we get\n", +"C1=1.1*C/0.1\n", +"C2=0.1*C1\n", +"printf('The value of C1=\t%e farad\nC2=\t%e farad\n',C1,C2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_59: calculate_the_value_of_L_and_C_for_a_colpitts_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.59')\n", +"printf('\n')\n", +"disp('calculate the value of L & C for a colpitts oscillator')\n", +"printf('Given\n')\n", +"//frequency of oscillation\n", +"f=40*10^3\n", +"LC=1/(4*(%pi)^2*f^2)\n", +"//select L\n", +"L=10*10^-3\n", +"//find C\n", +"C=1/(4*(%pi)^2*f^2*L)\n", +"//let C1=C2 so we get\n", +"C1=2*C\n", +"C2=C1\n", +"printf('The values of L=\t%f henry\nC1=\t%e farad\nC2=\t%e farad\n',L,C1,C2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_5: Calculate_power_gain_of_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.5')\n", +"printf('\n')\n", +"disp('Calculate power gain of amplifier')\n", +"printf('Given\n')\n", +"//have equal input & load resistance\n", +"//input voltage\n", +"Vi=100*10^-3\n", +"//output voltage\n", +"Vo=3\n", +"//power gain of amplifier\n", +"Apdb=20*log10(Vo/Vi)\n", +"printf('power gain of amplifier \n%f\n',Apdb)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_61: calculate_the_frequency_of_oscillation_for_Wein_Bridge_Oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.61')\n", +"printf('\n')\n", +"disp('calculate the frequency of oscillation for Wein_Bridge Oscillator')\n", +"printf('Given\n')\n", +"//Resistance\n", +"R=2*10^3\n", +"//capacitor\n", +"C=0.1*10^-6\n", +"//frequency of oscillation\n", +"f=1/(2*%pi*R*C)\n", +"printf('frequecy of oscillation \n%f hz\n',f)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_62: calculate_the_value_of_R_and_C_for_Wein_Bridge_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.62')\n", +"printf('\n')\n", +"disp('calculate the value of R & c for Wein-Bridge oscillator')\n", +"printf('Given\n')\n", +"//frequency of oscillation\n", +"f=1000\n", +"//find RC\n", +"RC=1/(2*%pi*f)\n", +"//select C<10^-6F\n", +"C=0.1*10^-6\n", +"//the value of R\n", +"R=1/(2*%pi*f*C)\n", +"printf('the value of c \n%f farad\n',C)\n", +"printf('the value of R \n%f ohm\n',R)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_65: calculate_the_Series_and_parallel_resonant_frequencies_of_Crystal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.65')\n", +"printf('\n')\n", +"disp('calculate the Series & parallel resonant frequencies of Crystal')\n", +"printf('Given\n')\n", +"//indutance\n", +"L=3\n", +"//Capacitor due to mechanical mounting of crystal\n", +"Cm=10*10^-12\n", +"//electrical equivalent capacitance of crystal compliance\n", +"Cs=0.05*10^-12\n", +"//electrical equivalent resistance of crystal structure internal friction\n", +"R=2*10^3\n", +"//series resonant frequency\n", +"fs=1/(2*%pi*sqrt(L*Cs))\n", +"Cp=Cm*Cs/(Cm+Cs)\n", +"//parallel resonant frequency\n", +"fp=1/(2*%pi*sqrt(L*Cp))\n", +"printf('series resonant frequency \n%f hz\n',fs)\n", +"printf('parallel resonant frequency \n%f hz\n',fp)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5_6: Calculate_new_level_of_output_voltage_when_it_has_fallen_by_4db.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"disp('Example 5.6')\n", +"printf('\n')\n", +"disp('Calculate new level of output voltage when it has fallen by 4db')\n", +"printf('Given\n')\n", +"//output voltage of an amplifier is 2V when frequency 1khz\n", +"V1=2\n", +"//power in db\n", +"Po=-4\n", +"//new level of output voltage\n", +"V2=10^(Po/20)*V1\n", +"printf('new output voltage \n%f volt\n',V2)" + ] + } +], +"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 +} |