summaryrefslogtreecommitdiff
path: root/3542/CH8
diff options
context:
space:
mode:
Diffstat (limited to '3542/CH8')
-rw-r--r--3542/CH8/EX8.1/8_1.jpgbin0 -> 80128 bytes
-rw-r--r--3542/CH8/EX8.1/Ex8_1.sce35
-rw-r--r--3542/CH8/EX8.2/8_2.jpgbin0 -> 93213 bytes
-rw-r--r--3542/CH8/EX8.2/Ex8_2.sce29
-rw-r--r--3542/CH8/EX8.3/8_3.jpgbin0 -> 47047 bytes
-rw-r--r--3542/CH8/EX8.3/Ex8_3.sce33
-rw-r--r--3542/CH8/EX8.4/8_4.jpgbin0 -> 53578 bytes
-rw-r--r--3542/CH8/EX8.4/Ex8_4.sce22
-rw-r--r--3542/CH8/EX8.5/8_5.jpgbin0 -> 49189 bytes
-rw-r--r--3542/CH8/EX8.5/Ex8_5.sce26
10 files changed, 145 insertions, 0 deletions
diff --git a/3542/CH8/EX8.1/8_1.jpg b/3542/CH8/EX8.1/8_1.jpg
new file mode 100644
index 000000000..b91b98943
--- /dev/null
+++ b/3542/CH8/EX8.1/8_1.jpg
Binary files differ
diff --git a/3542/CH8/EX8.1/Ex8_1.sce b/3542/CH8/EX8.1/Ex8_1.sce
new file mode 100644
index 000000000..a5348329a
--- /dev/null
+++ b/3542/CH8/EX8.1/Ex8_1.sce
@@ -0,0 +1,35 @@
+// Example no 8.1
+// To compute the mean square error distortion and output signal-to-distortion ratio.
+// Page no. 420
+
+
+clc;
+clear all;
+
+//Given data
+l1=1; // 1st Quantization level
+l2=3; // 2nd Quantization level
+l3=5; // 3rd Quantization level
+l4=7; // 4th Quantization level
+
+U1=(l1+l2)/2; // upper boundary of 1st level
+U2=(l2+l3)/2; // upper boundary of 2nd level
+U3=(l3+l4)/2; // upper boundary of 3rd level
+U4=l4+(U1-l1); // upper boundary of 4th level
+L1=l1-(U1-l1); // Lower boundary of 1st level
+
+D1=integrate('(x^3-2*x^2+x)/32','x',L1,U1); // Mean square error distortion of 1st level
+D2=integrate('(x^3-6*x^2+9*x)/32','x',U1,U2); // Mean square error distortion of 2nd level
+D3=integrate('(x^3-10*x^2+25*x)/32','x',U2,U3); // Mean square error distortion of 3rd level
+D4=integrate('(x^3-14*x^2+49*x)/32','x',U3,U4); // Mean square error distortion of 4th level
+D=D1+D2+D3+D4; // Total square error distortion
+
+P=integrate('x^3/32','x',L1,U4); // Signal power
+
+SDR=10*log10(P/D); // Output signal-to-distortion ratio.
+
+// Displaying the result in command window
+printf('\n The mean square error distortion = %0.3f',D);
+printf('\n The output signal-to-distortion ratio = %0.2f dB',SDR);
+printf('\n To minimize the distortion, we need to place the quantization levels closer at amplitudes close to 8 and farther at amplitudes close to zero.');
+printf('\n This quantizer would be optimal for an input with a uniform pdf.');
diff --git a/3542/CH8/EX8.2/8_2.jpg b/3542/CH8/EX8.2/8_2.jpg
new file mode 100644
index 000000000..0c7650158
--- /dev/null
+++ b/3542/CH8/EX8.2/8_2.jpg
Binary files differ
diff --git a/3542/CH8/EX8.2/Ex8_2.sce b/3542/CH8/EX8.2/Ex8_2.sce
new file mode 100644
index 000000000..2a1ccd39d
--- /dev/null
+++ b/3542/CH8/EX8.2/Ex8_2.sce
@@ -0,0 +1,29 @@
+// Example no 8.2
+// To compute transmission bit rate, average and peak signal to quantization noise ratio
+// Page no. 424
+
+clc;
+clear all;
+
+// Given data
+fs=8*10^3; // Sampling frequency in Hz
+n=8; // Number of bits per sample
+stepsize=10*10^-3; // Time after which step size is recomputed
+overhead=5; // Number of overhead bits
+
+N=fs*n; // Number of information bits pe second
+Toverhead=overhead/stepsize; // The number of overhead bits/second
+
+// Effective transmission bit rate
+bitrate=N+Toverhead; // Transmission bit rate in bps
+
+// Peak signal to quantization noise ratio
+PSQNR=6.02*n+4.77; // Peak signal to quantization noise ratio in dB
+
+// Average signal to quantization noise ratio
+ASQNR=6.02*n; // Average signal to quantization noise ratio in dB
+
+// Displaying the result in command window
+printf('\n Effective transmission bit rate = %0.1f kbps',bitrate*10^-3);
+printf('\n Peak signal to quantization noise ratio = %0.2f dB',PSQNR);
+printf('\n Average signal to quantization noise ratio = %0.2f dB',ASQNR);
diff --git a/3542/CH8/EX8.3/8_3.jpg b/3542/CH8/EX8.3/8_3.jpg
new file mode 100644
index 000000000..7c45cf4c6
--- /dev/null
+++ b/3542/CH8/EX8.3/8_3.jpg
Binary files differ
diff --git a/3542/CH8/EX8.3/Ex8_3.sce b/3542/CH8/EX8.3/Ex8_3.sce
new file mode 100644
index 000000000..a9e7966f5
--- /dev/null
+++ b/3542/CH8/EX8.3/Ex8_3.sce
@@ -0,0 +1,33 @@
+// Example no 8.3
+// To compute the minimum encoding rateof given 4 sub-band coder
+// Page no. 427
+
+clc;
+clear all;
+
+// Given data
+N=4; // Total number of sub-bands
+L1=225; // Lower limit of first sub-band
+U1=450; // Lower limit of first sub-band
+L2=450; // Lower limit of second sub-band
+U2=900; // Lower limit of second sub-band
+L3=1000; // Lower limit of third sub-band
+U3=1500; // Lower limit of third sub-band
+L4=1800; // Lower limit of fourth sub-band
+U4=2700; // Lower limit of fourth sub-band
+E1=4; // Encoding bit of first sub-band
+E2=3; // Encoding bit of second sub-band
+E3=2; // Encoding bit of third sub-band
+E4=1; // Encoding bit of fourth sub-band
+
+// Sampling rate of the sub-bands according to Nyquist theorem
+sr1=2*(U1-L1); // Sampling rate of first sub-band in samples/second
+sr2=2*(U2-L2); // Sampling rate of second sub-band in samples/second
+sr3=2*(U3-L3); // Sampling rate of third sub-band in samples/second
+sr4=2*(U4-L4); // Sampling rate of fourth sub-band in samples/second
+
+// Total encoding rate
+SR=sr1*E1+sr2*E2+sr3*E3+sr4*E4; // Total encoding rate in bps
+
+// Displaying the result in command window
+printf('\n Total encoding rate = %0.1f kbps',SR*10^-3);
diff --git a/3542/CH8/EX8.4/8_4.jpg b/3542/CH8/EX8.4/8_4.jpg
new file mode 100644
index 000000000..452729bb9
--- /dev/null
+++ b/3542/CH8/EX8.4/8_4.jpg
Binary files differ
diff --git a/3542/CH8/EX8.4/Ex8_4.sce b/3542/CH8/EX8.4/Ex8_4.sce
new file mode 100644
index 000000000..f6bed46ea
--- /dev/null
+++ b/3542/CH8/EX8.4/Ex8_4.sce
@@ -0,0 +1,22 @@
+// Example no 8.4
+// To find the upper bound of the transmission bit rate
+// Page no. 439
+
+clc;
+clear all;
+
+// Given data
+FL=810*10^6; // Lower limit of forward channel frequency band
+FU=826*10^6; // Upper limit of forward channel frequency band
+N=1150; // Number of simultaneous users;
+SE=1.68; // Spectral efficiency in bps/Hz
+CR=0.5; // Coder rate
+bandused=90/100; // 90% bandwidth is used
+
+bandwidth=bandused*(FU-FL); // Total bandwidth available for traffic channels in Hz
+Cbandwidth=bandwidth/N; // Maximum channel bandwidth in Hz
+ChannelDR=SE*Cbandwidth; // Maximum channel data rate in bps
+DR=ChannelDR*CR; // Maximum net data rate in bps
+
+// Displaying the result in command window
+printf('\n Maximum net data rate = %0.1f kbps',DR*10^-3);
diff --git a/3542/CH8/EX8.5/8_5.jpg b/3542/CH8/EX8.5/8_5.jpg
new file mode 100644
index 000000000..5f1a079f9
--- /dev/null
+++ b/3542/CH8/EX8.5/8_5.jpg
Binary files differ
diff --git a/3542/CH8/EX8.5/Ex8_5.sce b/3542/CH8/EX8.5/Ex8_5.sce
new file mode 100644
index 000000000..f0745fbd1
--- /dev/null
+++ b/3542/CH8/EX8.5/Ex8_5.sce
@@ -0,0 +1,26 @@
+// Example no 8.5
+// To compute the gross channel data rate
+// Page no. 439
+
+clc;
+clear all;
+
+// Given data
+t=20*10^-3; // Duration of encoding of one block in second
+B1=50; // The first bits in Type-1 channel
+CRC1=10; // Number of CRC bits in Type-1 channel
+FEC=0.5; // FEC rate for Type-1 channel
+B2=132; // Next bits in Type-2 channel
+CRC2=5; // Number of CRC bits in Type-2 channel
+B3=78; // The last bits in Type-3 channel
+
+N1=(B1+CRC1)/FEC; // Total number of bits transmitted in Type-1 channel
+N2=(B2+CRC2); // Total number of bits transmitted in Type-2 channel
+N3=B3; // Total number of bits transmitted in Type-3 channel
+N=N1+N2+N3; // Total number of channel bits transmitted enery t seconda
+
+// The gross channel data rate
+BR=N/t; // The gross channel data rate in bps
+
+// Displaying the result in command window
+printf('\n The gross channel bit rate = %0.2f kbps',BR*10^-3);