{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter : 14 - Phase-Locked Loops (PLL)" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 14.1 : Page No - 525\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from numpy import sqrt, pi\n", "#Given data\n", "R_T = 10 # in k ohm\n", "R_T = R_T * 10**3 # in ohm\n", "C_T = 0.005 # in \u00b5F\n", "C_T = C_T * 10**-6 # in F\n", "C=10*10**-6 # in F\n", "f_out = 0.25/(R_T*C_T) # in Hz\n", "print \"Free Running frequency =\",int(f_out*10**-3),\"kHz\" \n", "# Part (ii)\n", "V=20 # in V\n", "f_L= 8*f_out/V # in Hz\n", "print \"Lock range in kHz = \u00b1\",int(f_L*10**-3),\"kHz\"\n", "# Part (iii)\n", "f_C= sqrt(f_L/(2*pi*3.6*10**3*C)) # in Hz\n", "print \"Capture range = \u00b1\",int(f_C),\"Hz\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Free Running frequency = 5 kHz\n", "Lock range in kHz = \u00b1 2 kHz\n", "Capture range = \u00b1 94 Hz\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 14.2 : Page No - 532\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import log\n", "#Given data\n", "f_out_max = 200 # in kHz\n", "f_out_min = 4 # in Hz\n", "f_CLK = 2.2*f_out_max # in kHz\n", "print \"Frequency of reference oscillation = %0.f kHz\" %f_CLK \n", "f_CLK= f_CLK*10**3 # in Hz\n", "# Formula f_out_min= f_CLK/2**n\n", "n=log(f_CLK/f_out_min)/log(2) \n", "print \"The number of bits required in the phase accumulator = %0.f\" %round(n)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Frequency of reference oscillation = 440 kHz\n", "The number of bits required in the phase accumulator = 17\n" ] } ], "prompt_number": 6 } ], "metadata": {} } ] }