summaryrefslogtreecommitdiff
path: root/Electronic_Communication_Systems/Chapter1.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_Communication_Systems/Chapter1.ipynb')
-rwxr-xr-xElectronic_Communication_Systems/Chapter1.ipynb115
1 files changed, 115 insertions, 0 deletions
diff --git a/Electronic_Communication_Systems/Chapter1.ipynb b/Electronic_Communication_Systems/Chapter1.ipynb
new file mode 100755
index 00000000..0fff555e
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter1.ipynb
@@ -0,0 +1,115 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f852f2388a309880e4ed281d6cd6695038f25edc5aca1cbeddbb1a41de15396c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Introduction to Communication Systems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1, page no. 10 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "T = 1.00*pow(10,-3) # Time (s)\n",
+ "Tau = 500.00*pow(10,-6) # Pulse Width (s)\n",
+ "A = 10.00 # Amplitude (V)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Coeff1 = A*(Tau/T) # Coefficient 1\n",
+ "Coeff2 = 2*A*(Tau/T)*math.sin((Tau/T)*math.pi)/((Tau/T)*math.pi) # Coefficient 2\n",
+ "Coeff3 = 2*A*(Tau/T)*math.sin(2*(Tau/T)*math.pi)/(2*(Tau/T)*math.pi) # Coefficient 3\n",
+ "Coeff4 = 2*A*(Tau/T)*math.sin(3*(Tau/T)*math.pi)/(3*(Tau/T)*math.pi) # Coefficient 4\n",
+ "\n",
+ "# Result\n",
+ "print \"The Coefficients of First Four Terms in the Fourier Series are:\"\n",
+ "print \"Coeff1 =\",round(Coeff1)\n",
+ "print \"Coeff2 =\",round(Coeff2,3)\n",
+ "print \"Coeff3 =\",round(Coeff3)\n",
+ "print \"Coeff4 =\",round(Coeff4,3)\n",
+ "print \"f(t) = [\",round(Coeff1),\"] + [\",round(Coeff2,3),\"cos(2pi*10^3*t) ] + [\",round(Coeff3),\"] + [\",round(Coeff4,3),\"cos(6pi*10^3*t)\",\"]\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Coefficients of First Four Terms in the Fourier Series are:\n",
+ "Coeff1 = 5.0\n",
+ "Coeff2 = 6.366\n",
+ "Coeff3 = 0.0\n",
+ "Coeff4 = -2.122\n",
+ "f(t) = [ 5.0 ] + [ 6.366 cos(2pi*10^3*t) ] + [ 0.0 ] + [ -2.122 cos(6pi*10^3*t) ]\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2, page no. 12 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "f = 0.50*pow(10,3) # First Zero Crossing (Hz)\n",
+ "Fw_max = 8.00*pow(10,-3) # Amplitude (V)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Tau = 1/f # Pulse Duration (s)\n",
+ "A = Fw_max/Tau # Maximum Voltage (V) \n",
+ "\n",
+ "# Result\n",
+ "print \"The single pulse has a maximum voltage of\",round(A),\"V and a duration of\",round(Tau*pow(10,3)),\"ms.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The single pulse has a maximum voltage of 4.0 V and a duration of 2.0 ms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file