summaryrefslogtreecommitdiff
path: root/Electronic_Communication_Systems_by_Roy_Blake/Chapter3.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_Communication_Systems_by_Roy_Blake/Chapter3.ipynb')
-rw-r--r--Electronic_Communication_Systems_by_Roy_Blake/Chapter3.ipynb414
1 files changed, 414 insertions, 0 deletions
diff --git a/Electronic_Communication_Systems_by_Roy_Blake/Chapter3.ipynb b/Electronic_Communication_Systems_by_Roy_Blake/Chapter3.ipynb
new file mode 100644
index 00000000..c0bd9d20
--- /dev/null
+++ b/Electronic_Communication_Systems_by_Roy_Blake/Chapter3.ipynb
@@ -0,0 +1,414 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3 : The Amplitude Modulation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1 : pg 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V(t) = ( 2.83 + 1.41 *sin( 3142.0 *t))*sin( 9424778.0 *t) V\n"
+ ]
+ }
+ ],
+ "source": [
+ "# page no 105\n",
+ "# prob no 3.1\n",
+ "#calculate the Voltage equation\n",
+ "from math import pi, sqrt\n",
+ "# given\n",
+ "Erms_car=2; f_car=1.5*10**6;f_mod=500;Erms_mod=1;\n",
+ "# Equation requires peak voltages & radian frequencies\n",
+ "#calculations\n",
+ "Ec=sqrt(2)*Erms_car; Em=sqrt(2)*Erms_mod;\n",
+ "wc=2*pi*f_car; \n",
+ "wm=2*pi*f_mod;t=1;\n",
+ "#results\n",
+ "# Therefore the equation is \n",
+ "print 'V(t) = (',round(Ec,2),'+ ',round(Em,2),'*sin(',round(wm),'*t))*sin(',round(wc),'*t) V'\n",
+ "#print 'v(t) = (2.83+1.41*sin(3.14*10**3*t))*sin(9.42*10**6*t) V'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2 : pg 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "m = 0.5\n",
+ "The equation can be obtained as v(t) = 2.83(1+ 0.5 *sin(3.14*10**3*t))*sin(9.42*10**6*t) V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#page no 106\n",
+ "#prob no 3.2\n",
+ "#calculate the voltage equation\n",
+ "# To avoid the round-off errors we should use the original voltage values\n",
+ "#given\n",
+ "Em=1.;Ec=2.;\n",
+ "#Calculations\n",
+ "m=Em/Ec;\n",
+ "#results\n",
+ "print 'm =',m\n",
+ "print 'The equation can be obtained as','v(t) = 2.83(1+ ',m,'*sin(3.14*10**3*t))*sin(9.42*10**6*t) V',"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3 : pg 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The modulation index is 0.374\n"
+ ]
+ }
+ ],
+ "source": [
+ "#page no 109\n",
+ "#prob no 3.3\n",
+ "#calculate the modulation index\n",
+ "from math import sqrt\n",
+ "#given\n",
+ "E_car=10.;E_m1=1.;E_m2=2.;E_m3=3.;\n",
+ "#calculations\n",
+ "m1=E_m1/E_car;\n",
+ "m2=E_m2/E_car;\n",
+ "m3=E_m3/E_car;\n",
+ "mT=sqrt(m1**2+m2**2+m3**2);\n",
+ "#results\n",
+ "print 'The modulation index is',round(mT,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4 : pg 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The modulation index is 0.364\n"
+ ]
+ }
+ ],
+ "source": [
+ "#page no 110\n",
+ "#prob no 3.4\n",
+ "#calculate the modulation index\n",
+ "#refer fig 3.2\n",
+ "#given\n",
+ "E_max=150.; E_min=70;# voltages are in mV\n",
+ "#calculations\n",
+ "m=(E_max-E_min)/(E_max+E_min);\n",
+ "#results\n",
+ "print 'The modulation index is',round(m,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6 : pg 114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum modulation freq is 5000.0 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#page no 114\n",
+ "#prob no 3.6\n",
+ "#calculate the max modulation frequency\n",
+ "#given\n",
+ "B=10.*10**3;\n",
+ "#calculations\n",
+ "# maximum modulation freq is given as \n",
+ "fm=B/2;\n",
+ "#results\n",
+ "print 'The maximum modulation freq is',fm,'Hz'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7 : pg 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The total power is 66.0 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "#page no 116\n",
+ "#prob no 3.7\n",
+ "# AM broadcast transmitter\n",
+ "#calculate the total power\n",
+ "#given\n",
+ "Pc=50.;m=0.8;#power is in kW\n",
+ "#calculations\n",
+ "Pt=Pc*(1+m**2 /2);\n",
+ "#results\n",
+ "print 'The total power is',Pt,'kW'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8 : pg 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Signal Frequency in Hz = 426000\n"
+ ]
+ }
+ ],
+ "source": [
+ "# page no 118\n",
+ "# prob no 8.6\n",
+ "#calculate the signal frequency\n",
+ "#2 kHz tone is present on channel 5 of group 3 of supergroup\n",
+ "#signal is lower sided so\n",
+ "#given\n",
+ "fc_channel_5=92*10**3;\n",
+ "#calculations\n",
+ "fg=fc_channel_5 - (2*10**3);# 2MHz baseband signal\n",
+ "# we know group 3 in the supergroup is moved to the range 408-456 kHz with a suppressed carrier frequency of 516kHz\n",
+ "f_s_carr=516*10**3;\n",
+ "fsg=f_s_carr - fg;\n",
+ "#results\n",
+ "print'The Signal Frequency in Hz =',fsg;"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9 : pg 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The total power is 200.0 uW\n",
+ "The modulating freq is 2.0 kHz\n",
+ "The carrier freq 10.0 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#page no 122\n",
+ "#prob no. 3.9\n",
+ "#calculate the total power, modulating frequency and carrier frequency\n",
+ "# refer fig 3.14\n",
+ "#given\n",
+ "# from spectrum we can see that each of the two sidebands is 20dB below the ref level of 10dBm. \n",
+ "#Therefore each sideband has a power of -10dBm i.e. 100uW.\n",
+ "power_of_each_sideband = 100.;\n",
+ "#calculations and results\n",
+ "Total_power = 2.* power_of_each_sideband;\n",
+ "print 'The total power is',Total_power,'uW'\n",
+ "div=4; freq_per_div=1.;\n",
+ "sideband_separation = div * freq_per_div;\n",
+ "f_mod= sideband_separation/2;\n",
+ "print 'The modulating freq is ',f_mod,'kHz'\n",
+ "# Even if this siganl has no carrier, it still has a carrier freq which is midway between the two sidebands. Therefore\n",
+ "carrier_freq = 10.;\n",
+ "print 'The carrier freq',carrier_freq,'MHz'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10 : pg 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The o/p freq f_out1 is 7 MHz\n",
+ "The o/p freq f_out2 is 7.9965 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "# page no 126\n",
+ "# prob no 3.10\n",
+ "#calculate the o/p frequency in both cases\n",
+ "#given\n",
+ "f_car=8*10**6;f_mod1=2*10**3;f_mod2=3.5*10**3;\n",
+ "#calculations\n",
+ "#Signal is LSB hence o/p freq is obtained by subtracting f_mod from f_car\n",
+ "f_out1=f_car-f_mod1; \n",
+ "f_out2=f_car-f_mod2; \n",
+ "#results\n",
+ "print 'The o/p freq f_out1 is ',f_out1/(10**6),'MHz'\n",
+ "print 'The o/p freq f_out2 is ',f_out2/(10**6),'MHz'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11 : pg 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of average power of signal is 1.5625 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "# page no 127\n",
+ "# prob no 3.11\n",
+ "#calculate the value of average power of signal\n",
+ "from math import sqrt\n",
+ "#Refering the fig. 3.17\n",
+ "#From fig it is clear that thee waveform is made from two sine waves \n",
+ "#given\n",
+ "Vp=12.5;#Since Vp-p is 25V from fig hence individual Vp is half of Vp-p\n",
+ "Rl=50.;#Load resistance is 50 ohm\n",
+ "#Determination of average power\n",
+ "#calculations\n",
+ "Vrms=Vp/sqrt(2);\n",
+ "P=((Vrms)**2)/Rl;\n",
+ "#results\n",
+ "print 'The value of average power of signal is ',P,'W'"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}