summaryrefslogtreecommitdiff
path: root/3446/CH8
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3446/CH8
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3446/CH8')
-rw-r--r--3446/CH8/EX8.1/Ex8_1.sce17
-rw-r--r--3446/CH8/EX8.2/Ex8_2.sce29
-rw-r--r--3446/CH8/EX8.3/Ex8_3.sce38
3 files changed, 84 insertions, 0 deletions
diff --git a/3446/CH8/EX8.1/Ex8_1.sce b/3446/CH8/EX8.1/Ex8_1.sce
new file mode 100644
index 000000000..625e0c86c
--- /dev/null
+++ b/3446/CH8/EX8.1/Ex8_1.sce
@@ -0,0 +1,17 @@
+// Exa 8.1
+// To calculate coverage gain in dB.
+
+clc;
+clear all;
+
+Pdiff=-3; //in dB
+AMR1=12.2; //in kbps
+AMR2=7.95; //in kbps
+AMR3=4.75; //in kbps
+
+//solution
+//CG(dB)=10log{(DPDCH(kbps)+DPCCH)/(DPDCH(AMR bit rate (kbps))+ DPCCH)}
+CG1=10*log10((AMR1+AMR1*10^(Pdiff/10))/(AMR2+AMR1*10^(Pdiff/10)));
+CG2=10*log10((AMR1+AMR1*10^(Pdiff/10))/(AMR3+AMR1*10^(Pdiff/10)));
+printf('By reducing the AMR bit rate from 12.2 to 7.95 kbps coverage gain becomes %.2f dB \n ',CG1);
+printf('By reducing the AMR bit rate from 7.95 to 4.75 kbps coverage gain becomes %.2f dB \n ',CG2);
diff --git a/3446/CH8/EX8.2/Ex8_2.sce b/3446/CH8/EX8.2/Ex8_2.sce
new file mode 100644
index 000000000..e1b93ebf1
--- /dev/null
+++ b/3446/CH8/EX8.2/Ex8_2.sce
@@ -0,0 +1,29 @@
+// Exa 8.2
+// To calculate the output of the encoder.
+
+clc;
+clear all;
+
+K=4; //constraint length
+r=1/2; //code rate(n/k)
+x=poly(0,"x");//Defining x as a ploynomial variable
+G1=1+x^2+x^3;
+G2=1+x+x^2+x^3;
+in=[1 0 1 1 1];//input(first bit first)
+
+//solution
+//with reference to Fig 8.9 on page no 239
+g1=[1 0 1 1]; //converting from G1 polynomial to bit form
+g2=[1 1 1 1];////converting from G2 polynomial to bit form
+x1=round(convol(g1,in));
+x2=round(convol(g2,in));
+V1=modulo(x1,2);
+V2=modulo(x2,2);
+disp("Multiplexing the V1 and V2 to get required output sequence as ");
+ a=5;
+for i= 1:5
+ printf('%d%d',V2(a),V1(a));
+ a=a-1;
+
+end
+
diff --git a/3446/CH8/EX8.3/Ex8_3.sce b/3446/CH8/EX8.3/Ex8_3.sce
new file mode 100644
index 000000000..43e6a72fb
--- /dev/null
+++ b/3446/CH8/EX8.3/Ex8_3.sce
@@ -0,0 +1,38 @@
+// Exa 8.3
+// To demostrate 4X4 Bit interleaving/de-interleving.
+
+clc;
+clear all;
+
+BitStream= [0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1];//Last bit to first bit
+
+//solution
+disp("Interleaving is performed by storing the data in a table containing rows and columns at the transmitter. The data is written in rows and transmitted in a vertical direction (according to columns). At the receiver, the data is written and read in the opposite manner. ")
+
+// Interleaver
+ Input1=[1 0 0 0 //Writing data row wise
+ 1 0 0 0
+ 1 1 1 0
+ 0 0 0 0];
+disp("GIven Bit stream is")
+disp(BitStream);
+disp("Input to interleaver is")
+disp(Input1);
+
+Output1=[0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1]; // Reading data column wise
+disp("Output of interleaver is");
+disp(Output1);
+//De-interleaver
+ Input2=[1 1 1 0 //Writing o/p data row wise
+ 0 0 1 0
+ 0 0 1 0
+ 0 0 0 0];
+ // Let From 6th to 9th bits have Burst Error
+ disp("Input to de-interleaver is");
+ disp(Input2);
+ //Output of deinterleaver
+
+Output2= [0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1];
+disp("Output of de-interleaver is")
+disp(Output2);
+disp( "Bits with Burst error were from 6th to 9th. But in output of de-interleaver, they relocated to positions 3rd, 6th, 10th and 14th.");