summaryrefslogtreecommitdiff
path: root/Modern_Communication_Circuits_by_J_R_Smith/7-Oscillators.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Modern_Communication_Circuits_by_J_R_Smith/7-Oscillators.ipynb')
-rw-r--r--Modern_Communication_Circuits_by_J_R_Smith/7-Oscillators.ipynb344
1 files changed, 344 insertions, 0 deletions
diff --git a/Modern_Communication_Circuits_by_J_R_Smith/7-Oscillators.ipynb b/Modern_Communication_Circuits_by_J_R_Smith/7-Oscillators.ipynb
new file mode 100644
index 0000000..6f1006f
--- /dev/null
+++ b/Modern_Communication_Circuits_by_J_R_Smith/7-Oscillators.ipynb
@@ -0,0 +1,344 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Oscillators"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.11: Oscillators_Ex_7_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Chapter 7:Oscillators\n",
+"//Example 7.11 page no 292\n",
+"disp('In order to convert the input waveform from 87.5MHz to 10.7MHz the local oscillator would need to be 76.8MHz(low side injection) or 98.2MHz (high side injection).To convert the input waveform from 108.0MHz the local oscilltor would need to be 97.3MHz (low side injection) or 118.7MHz (high side injection) ')\n",
+"L=0.05*10^-6//choosing value of indicator \n",
+"f1=76.8*10^6//starting frequency\n",
+"f2=97.3*10^6//ending frequency\n",
+"C1=((1/(2*%pi*f1))^2)/L//Capacitor value for starting frequency\n",
+"C2=((1/(2*%pi*f2))^2)/L//Capacitor value for ending frequency\n",
+"mprintf('The value of C is varies batween %3.2e F to %3.2e F ',C1,C2)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: Oscillators_Ex_7_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Chapter 7:Conditions for Oscillation\n",
+"//example 7.1 page no 247\n",
+"//given\n",
+"B=100//current gain \n",
+"f=20*10^6//oscillator frequency\n",
+"VT=26*10^-3\n",
+"Ic=1*10^-3//dc bias current\n",
+"ri=VT/Ic//common base inout resistance\n",
+"gm=ri^-1//transconductance\n",
+"GH=3//In oscillator design the loop gain is usually selected to be about 3,which allow for some error in the approximation so that (C1+C2)/C1=3\n",
+"C2=(2*%pi*f*8)^-1//second capacitor\n",
+"C1=C2/2//first capacitor\n",
+"Req=ri*((C1+C2)/C1)^2//equivalent resistor\n",
+"L=(((2*%pi*f)^2)*((C1*C2)/(C1+C2)))^-1//inductor\n",
+"mprintf('the value of second capacitor is %f pF \n the value of first capacitor is %f pF \n the value of equivalent resistor is %d ohm \n the value of indicator is %f uH',C2*1e12,C1*1e12,Req,L*1e6)\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: Oscillators_Ex_7_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Chapter 7:Conditions for Oscillation\n",
+"//example 7.2 page no 251 \n",
+"//given\n",
+"B=100\n",
+"f=5*10^6//oscillator frequency\n",
+"L=10*10^-6//inductor\n",
+"X=(L*(2*%pi*f)^2)^-1//Taking X=C1'*C2/(C1'+C2)\n",
+"r=3.14//series resistance of inductor \n",
+"C1=200*10^-12//first capacitor(asumming values of capacitors)\n",
+"C2=200*10^-12//second capacitor\n",
+"Y=(1+B)/(((2*%pi*f)^2)*C1*C2)\n",
+"Z=L/C1\n",
+"rpi=(Y-Z)*r^-1//resistance \n",
+"gm=rpi^-1//transconductance\n",
+"I=gm/40//bias current\n",
+"mprintf('the equivalent capacitance is %3.2e pF \n the resistance value is %3.2e ohm \n the bias current is %3.2e A',X,rpi,I)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: Oscillators_Ex_7_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Chapter 7:Conditions for Oscillation\n",
+"//example 7.3\n",
+"//given\n",
+"rpi=1000\n",
+"C1=200*10^-12\n",
+"r=3.14//series resistance\n",
+"C_1=C1/(1+(r/rpi))//capacitance\n",
+"\n",
+"mprintf('the capacitor value is %f pF',round(C_1*1e12))"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: Oscillators_Ex_7_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Chapter 7:Conditions for Oscillation\n",
+"//example 7.4 page no 255\n",
+"//given\n",
+"gm=6*10^-3\n",
+"r=4\n",
+"f=10^6\n",
+"disp('Assume (w*Cm)^-1=X')\n",
+"X=sqrt(r/gm)//minimum permissible reactance\n",
+"Cm=(2*%pi*f*X)^-1//maximum series capacitance\n",
+"mprintf('the minimum permissible reactance is %f ohm \n the maximum series capacitance is %f pF',X,Cm*1e12)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: Oscillators_Ex_7_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Chapter 7:Conditions for Oscillation\n",
+"//example 7.5 page no 265\n",
+"//given\n",
+"Co=3.2//shunt capacitance\n",
+"C1=0.008\n",
+"k=Co/C1//ratio\n",
+"fa=10^6//crystai's antiresonant frequency\n",
+"fs=1+(2*k)^-1//series resonant frequency\n",
+"mprintf('the series resonant frequency is %f MHz',fs)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: Oscillators_Ex_7_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Chapter 7:Conditions for Oscillation\n",
+"//example 7.6 page no 265\n",
+"//given\n",
+"f=5.7*10^6//given frequency\n",
+"Xs=4654//shunt reactance for shunt capacitacne of 6pF\n",
+"r=25//series resistance\n",
+"Q1=Xs/r//equivalent to crystal Q for easily expressing\n",
+"C1=21*10^-15\n",
+"XC1=(C1*2*%pi*f)^-1//capacitive reactance\n",
+"disp('C1 is much smaller than the shunt capacitance,so the inductive reactance is XL=1.3*10^6')\n",
+"Q=XC1/r//crystal Q\n",
+"mprintf('the crystal Q is %d ',Q)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.7: Oscillators_Ex_7_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//chapter 7:Crystal Oscillator Characteristics\n",
+"//Example 7.7 page no 266\n",
+"//given\n",
+"f=20*10^6//given frequency\n",
+"//If the crystal load capacitnace is specified to be 32pF, then the series combination of C1 and C2 must be 32pF. this could be satisfied by using 64pF capacitors for both C1 and C2.\n",
+"gm=1.5*10^-3//transconductance\n",
+"C1=64*10^-12\n",
+"C2=64*10^-12\n",
+"r1=gm/((2*%pi*f)^2*C1*C2)//series resistance of the crystal\n",
+"mprintf('The series resistnce is approximately %f ohm ',r1)\n",
+"disp('In order for oscillations to occur, the loop gain must still be greater than 1')\n",
+"G=gm*((2*%pi*f*C1)^-1)^2/r1//loop gain\n",
+"disp(G,'loop gain is ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8: Oscillators_Ex_7_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Chapter 7:Conditions for Oscillation\n",
+"//example 7.8 page no 270\n",
+"//given\n",
+"fa=5.7*10^6//parallel antiresonant frequency\n",
+"C1=21*10^-15\n",
+"Co=37.1*10^-12//here 32pF is parallel with 5.1pF so they get added\n",
+"CL=22*10^-12\n",
+"f_a=fa*((1+C1/(2*(Co+CL)))/(1+C1/(2*Co)))//new parallel antiresonant frequency\n",
+"r1=25\n",
+"Rp=r1*(1+((r1*2*%pi*f_a*(Co+CL))^-1)^2)//equivalent parallel resistance\n",
+"mprintf('the new parallel antiresonant frequency is %f MHz \n the equivalent parallel resistance is %f Kohm',f_a*1e-6,Rp*1e-3)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9: Oscillators_Ex_7_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Chapter 7:Conditions for Oscillation\n",
+"//example 7.9 page no 284\n",
+"//given\n",
+"rd=50*10^3\n",
+"gm=5*10^-3//transconductance\n",
+"f=16*10^6//frequency of oscillation\n",
+"Rs=15\n",
+"XC1=1*10^3//capacitive reactance of first capacitor\n",
+"XC2=Rs/(gm*XC1)//capacitive reactance of second capacitor\n",
+"C1=(2*%pi*f*XC1)^-1//value of first capacitor\n",
+"C2=(2*%pi*f*XC2)^-1//value of second capacitor\n",
+"mprintf('the value of first capacitor is %3.2e pF\n the value of second capacitor is %3.2e pF\n ',C1,C2)\n",
+"disp('This value of C1 may be so small that the transistor output capacitance has a effect. therefore it is desirable to incease C1.If C1 is increased by a factor of 10,so that XC1=100,then C2 must also be increased ')\n",
+"XC_2=Rs/(gm*100)//new value of reactance\n",
+"XL=100+XC_2//inductive reactance\n",
+"L=XL/(2*%pi*f)//value of inductor\n",
+"mprintf('the value of inductor is %3.2e H',L)"
+ ]
+ }
+],
+"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
+}