{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 8: Phase Locked Loops" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.1: PLL_Ex_8_1.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "//Chapter 8:Linear model of phase locked loop\n", "//example 8.1 page no 314\n", "//given\n", "fo=1*10^6//output frequency\n", "fr=25*10^3//reference frequency\n", "N=fo/fr\n", "Kd=2//phase detector gain factor\n", "Ko=100//VCO gain factor\n", "thetao=(2*100*2*%pi)//output phase\n", "s=poly(0,'s')\n", "thetar=s+(2*100*2*%pi)/N//input phase\n", "Tf=thetao/thetar\n", "disp(Tf,'the closed loop transfer function is ')\n", "Kv=Kd*Ko/N//bandwidth\n", "mprintf('the synthesizer bandwidth will be %d Hz',Kv)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.2: PLL_Ex_8_2.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "//Chapter 8:Linear model of phase locked loop\n", "//example 8.2 page no 316\n", "//given\n", "zeta=0.707//damping ratio for butterworth filter\n", "Kv=10*%pi//bandwidth\n", "wL=Kv*(2*zeta)^2//low pass filter bandwidth\n", "wn=sqrt(Kv*wL)//bandwidth of closed loop system \n", "tr=2.2/wn//rise time\n", "mprintf('low pass filter bandwidth is %f rad/s \n bandwidth of closed loop system is %f rad/s \n the system rise time is %3.2e s',wL,wn,tr)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.4: PLL_Ex_8_4.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "//Chapter 8:Linear model of phase locked loop\n", "//example 8.6 page no 349\n", "//given\n", "//The VCO is designed to oscillate at 100kHz\n", "R1=10.8*10^3\n", "R2=10.8*10^3\n", "C=1*10^-9\n", "N=2//order of filter\n", "fmin=(R2*(C+32*10^-12))^-1//minimum frequency\n", "fmax=fmin+(R1*(C+32*10^-12))^-1//maximum frequency\n", "VDD=9//regulated power supply\n", "Kvco=(2*%pi*(fmax-fmin))/(VDD-2)\n", "Kv=Kvco*(VDD/%pi)/N\n", "zeta=0.707//damping ratio for butterworth filter\n", "wL=Kv*(2*zeta)^2//low pass filter bandwidth\n", "wn=sqrt(Kv*wL)//bandwidth of closed loop system \n", "mprintf('low pass filter bandwidth is %3.2e rad/s \n bandwidth of closed loop system is %3.2e rad/s',wL,wn)\n", "thetao=(10.6*10^9)//output phase\n", "s=poly(0,'s')\n", "thetar=s^2+s*2.3*10^4+2.66*10^8//input phase\n", "Tf=thetao/thetar\n", "disp(Tf,'the closed loop transfer function is ')" ] } ], "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 }