Digital Communication VISIT: www.matlabassignmentexperts.com MAIL: info@matlabassignmentexperts.com Whatsapp: +1 3155576473
In this sample assignment solution on digital communication, we focus on the construction and application of biorthogonal codes. We explore the properties of Hadamard matrices, including their symmetry, orthogonality, and use in signal processing. The presentation covers rigorous proofs and calculations to demonstrate how these matrices are constructed and their significance in digital communication systems. By understanding the properties and applications of biorthogonal codes, students can gain valuable insights into their role in enhancing signal processing techniques. Digital Communication Through Biorthogonal Codes
Problem 1.1 How long does it take to double your money at an interest rate of P %? The bankers’ “Rule of 72” estimates that it takes about 72/P years; e.g., at a 5% interest rate compounded annually, it takes about 14.4 years to double your money.
(a) An engineer decides to interpolate the dB table above linearly for 1 ≤ 1 + p ≤ 1.25; ratio or multiplicative factor of 1 + p ↔ 4p dB. Show that this corresponds to a “Rule of 75;” e.g., at a 5% interest rate compounded annually, it takes 15 years to double your money Problem
Solutions: If your money compounds at a rate of x dB per year, then since doubling your money corresponds to a 3 dB gain, it will take about Y = 3/x years to double your money. The engineer’s approximation to the dB table is a linear approximation that is exact near p = 0.25 (P = 25%), where p = P/100. Under this approximation, it will take years to double your money. Thus this approximation corresponds to a “Rule of 75.” For example, it estimates that it takes Y = 75/5 = 15 years to double your money when P = 5%.
(b) A mathematician linearly approximates the dB table for p ≈ 0 by noting that as p → 0, ln(1 + p) → p, and translates this into a “Rule of N” for some real number N. What is N? Using this rule, how many years will it take to double your money at a 5% interest rate, compounded annually? What happens if interest is compounded continuously? Problem
As p → 0, we have Solutions: 10 log10(1 + p) = (10 log10 e) ln(1 + p)=4.34 ln(1 + p) → 4.34p, where we change the base of the logarithm from 10 to e (recall that x = 10log10 x = e , so log10 x = (log10 e)(ln x)), we read 10 log10 e = 4.34 from the dB table, and we use ln(1 + p) → p as p → 0. Thus we obtain a linear approximation
ratio or multiplicative factor of 1 + p ↔ 4.34p dB, which becomes exact as p → 0. This linear approximation translates to the estimate that it takes years to double your money, or a “Rule of 69.35.” For example, this rule estimates that it takes Y = 69.35/5 = 13.87 years to double your money when P = 5%.
A more precise calculation using natural logarithms yields or a “Rule of 69.31,” which estimates that it takes Y = 69.31/5 = 13.86 years to double your money when P = 5%.
Remark: Note that this “Rule of 69.31” becomes exact when interest is compounded continuously, so that after Y years your money has increased by a factor of epY , rather than the factor of (1 + p)Y that you get when interest is compounded annually.
(c) How many years will it actually take to double your money at a 5% interest rate, compounded annually? [Hint: 10 log10 7=8.45 dB.] Whose rule best predicts the correct result? Problem
Since 1.05 = 21/20, a factor of 1.05 is equivalent to Solutions: 10 log10 7 + 10 log10 3 − 10 log10 10 − 10 log10 2=8.45 + 4.77 − 10 − 3.01 = 0.21 dB. Thus it actually takes years to double your money when interest is compounded annually.
We see that this estimate is quite close to the estimate of Y = 14.4 years given by the “Rule of 72.” Thus the “Rule of 72” is equivalent to a linear approximation of the dB table that is exact near P = 5%. This is the range in which the “Rule of 72” is commonly used. The “Rule of 72” also has the advantage that 72 has many integer divisors (e.g., 2, 3, 4, 6, 8, 9, 12, ... ), so that its estimate of Y is an easily calculated integer for many common interest rates. So in this instance the bankers have been rather clever.
Problem 1.2 (Biorthogonal codes) A 2m × 2m {±1}-valued Hadamard matrix H2m may be constructed recursively as the m-fold tensor product of the 2 × 2 matrix as follows:
(a) Show by induction that: (i) (H2m)T = H2m, where T denotes the transpose; i.e., H2m is symmetric; (ii) The rows or columns of H2m form a set of mutually orthogonal vectors of length 2m; (iii) The first row and the first column of H2m consist of all +1s; (iv) There are an equal number of +1s and −1s in all other rows and columns of H2m; (v) H2mH2m = 2mI2m; i.e., (H2m)−1 = 2−mH2m, where −1 denotes the inverse.
We first verify that (i)-(v) hold for H2. We then suppose that (i)-(v) hold for H2m−1 . We can then conclude by induction that: Solutions: (i) (ii) The first 2m−1 rows of H2m are of the form hj = (gj , gj ), where gj is the corresponding row of H2m−1 , and the second 2m−1 rows of H2m are of the form hj+2m−1 = (gj , −gj ).
Suppose that the rows gj of H2m−1 are mutually orthogonal. Then the inner product = j <hj , hj> is 0 whenever j and j = j ± 2m−1, because the inner product is the sum of the inner products of the first half-rows and the second half-rows, which are both zero. If j = j − 2m−1, then the inner product is <hj , hj> = <gj , gj > + <gj , −gj > = <gj , gj >−<gj , gj > = 0, and similarly hj , hj = 0 when j = j + 2m−1. Thus hj , hj = 0 whenever j = j , so the rows of H2m form a set of mutually orthogonal vectors. Since (H2m)T = H2m, so do the columns.
(iii) The first row of H2m is h0 = (g0, g0), where g0 is the first row of H2m−1 . By the inductive hypothesis, g0 = (+1, +1,... , +1), so h0 = (+1, +1,... , +1); i.e., all columns of H2m have a +1 as their first component. Since (H2m)T = H2m, so do all the rows. (iv) The remaining rows of H2m are orthogonal to h0 by (ii), and thus must have an equal number of +1s and −1s. Since (H2m)T = H2m, so must the remaining columns.
(v) Since (H2m)T = H2m, the matrix H2mH2m = H2m(H2m)T is the matrix of inner products of rows of H2m. By (ii), all off-diagonal elements of this matrix are zero. The diagonal elements are the squared norms ||hj ||2 = 2m, since hj is a vector of length 2m in which each component has squared norm 1. Thus H2mH2m = 2mI2m.
(b) A biorthogonal signal set is a set of real equal-energy orthogonal vectors and their negatives. Show how to construct a biorthogonal signal set of size 64 as a set of {±1}- valued sequences of length 32. By (a)(ii), the rows of H32 form a set O of 32 orthogonal {±1}-valued sequences of length 32, each with energy 32. It follows that the rows of H32 and their negatives form a biorthogonal set B = ±O of 64 {±1}-valued sequences of length 32. Solutions: Problem
(c) A simplex signal set S is a set of real equal-energy vectors that are equidistant and that have zero mean m(S) under an equiprobable distribution. Show how to construct a simplex signal set of size 32 as a set of 32 {±1}-valued sequences of length 31. [Hint: The fluctuation O − m(O) of a set O of orthogonal real vectors is a simplex signal set.] Problem
Solutions: As in (b), the rows of H32 form a set O of 32 orthogonal equal-energy (and therefore equidistant) {±1}-valued sequences of length 32. By (a)(iii)-(iv), the mean of O is m(O) = (+1, 0, 0,... , 0), since all rows have +1 in the first column and an equal number of +1s and −1s in the remaining columns. Thus S = O−m(O) is a zero-mean, equal-energy and equidistant set of 32 row vectors of length 32 which have 0 in the first coordinate and the elements of the rows of H32 in the remaining coordinates. Since the first coordinate always has value 0, it may be deleted without affecting any norms, distances or inner products; in particular, the vectors remain zero-mean, equal-energy and equidistant. Thus we obtain a simplex signal set S consisting of a set of 32 {±1}-valued sequences of length 31.
(d) Let Y = X + N be the received sequence on a discrete-time AWGN channel, where the input sequence X is chosen equiprobably from a biorthogonal signal set B of size 2m+1 constructed as in part (b). Show that the following algorithm implements a minimumdistance decoder for B (i.e., given a real 2m-vector y, it finds the closest x B to y): ∈ (i) Compute z = H2my, where y is regarded as a column vector; (ii) Find the component zj of z with largest magnitude |zj |; (iii) Decode to sgn(zj )xj , where sgn(zj ) is the sign of the largest-magnitude component zj and xj is the corresponding column of H2m. Problem
Solutions: Given y, minimizing the squared distance ||y−x||2 over x B is equivalent to ∈ maximizing the inner product y, x, since and ||x||2 is equal to a constant (2m) for all x B. The vector z = H2my is the set ∈ of inner products y, x as x runs through the 2m rows of H2m. The set of inner products y, x as x runs through the 2m+1 elements of B are therefore just the elements of z and their negatives. Maximizing y, x is therefore equivalent to finding the element zj of z with largest magnitude |zj |, and deciding on the corresponding row xj of H2m if the sign of zj is positive, or on −xj if the sign is negative.
Remark. Note that the matrix multiplication z = H2my corresponds to implementing a bank of matched filters, one for each of the rows of H2m, which form the set of correlations of y with each of the rows of H2m. Since the rows of H2m span the signal space S B, by the theorem of irrelevance (see Chapter 2) ⊃ the outputs z of this bank of matched filters form a set of sufficient statistics for detection of a signal x S in the presence of AWGN. In this case we have been ∈ able to show directly that we can find an optimal decision rule based on z which is very simple.
(e) Show that a circuit similar to that shown in Figure 1 below for m = 2 can implement the 2m × 2m matrix multiplication z = H2my with a total of only m × 2m addition and subtraction operations. (This is called the “fast Hadamard transform,” or “Walsh transform,” or “Green machine.”) Figure 1. Fast 2m × 2m Hadamard transform for m = 2. Problem
This circuit is based on the following recursion for z = H4y: Solutions:
In other words, we first group the elements of y into pairs (y1, y2),(y3, y4),... . The first set of arithmetic elements computes the 2 × 2 Walsh-Hadamard transform of each pair; e.g., We then group the elements of y into pairs and again compute the 2 × 2 Walsh-Hadamard transform of each pair; e.g.,
Thus we can compute the 4 × 4 Walsh-Hadamard transform z = H4y by computing two stages of two 2 × 2 Walsh-Hadamard transforms, as illustrated in Figure 1. Similarly, we can compute a 2m × 2m Walsh-Hadamard transform z = H2my using the recursion by computing two 2m−1 × 2m−1 Walsh-Hadamard transforms, and then combining their outputs in one more stage involving 2m−1 2 × 2 Walsh- Hadamard transforms. If each m−1 × 2m−1 Walsh-Hadamard transform requires m − 1 stages of 2m−2 2 × 2 WalshHadamard transforms, then the 2m ×2m
Walsh-Hadamard transform requires m stages of m−1 2 × 2 Walsh-Hadamard transforms. Each 2 × 2 transform requires one addition and one subtraction, so a total of only m × 2m−1 × 2 additions and subtractions is required. Thus the complexity of an M = 2m-point Walsh-Hadamard transform is only of the order of M log2 M, rather than M2. This is why this algorithm is called “fast.”

Digital Communication Through Biorthogonal Codes: A MATLAB Assignment Solution

  • 1.
    Digital Communication VISIT: www.matlabassignmentexperts.com MAIL:info@matlabassignmentexperts.com Whatsapp: +1 3155576473
  • 2.
    In this sampleassignment solution on digital communication, we focus on the construction and application of biorthogonal codes. We explore the properties of Hadamard matrices, including their symmetry, orthogonality, and use in signal processing. The presentation covers rigorous proofs and calculations to demonstrate how these matrices are constructed and their significance in digital communication systems. By understanding the properties and applications of biorthogonal codes, students can gain valuable insights into their role in enhancing signal processing techniques. Digital Communication Through Biorthogonal Codes
  • 3.
    Problem 1.1 How longdoes it take to double your money at an interest rate of P %? The bankers’ “Rule of 72” estimates that it takes about 72/P years; e.g., at a 5% interest rate compounded annually, it takes about 14.4 years to double your money.
  • 4.
    (a) An engineerdecides to interpolate the dB table above linearly for 1 ≤ 1 + p ≤ 1.25; ratio or multiplicative factor of 1 + p ↔ 4p dB. Show that this corresponds to a “Rule of 75;” e.g., at a 5% interest rate compounded annually, it takes 15 years to double your money Problem
  • 5.
    Solutions: If your moneycompounds at a rate of x dB per year, then since doubling your money corresponds to a 3 dB gain, it will take about Y = 3/x years to double your money. The engineer’s approximation to the dB table is a linear approximation that is exact near p = 0.25 (P = 25%), where p = P/100. Under this approximation, it will take years to double your money. Thus this approximation corresponds to a “Rule of 75.” For example, it estimates that it takes Y = 75/5 = 15 years to double your money when P = 5%.
  • 6.
    (b) A mathematicianlinearly approximates the dB table for p ≈ 0 by noting that as p → 0, ln(1 + p) → p, and translates this into a “Rule of N” for some real number N. What is N? Using this rule, how many years will it take to double your money at a 5% interest rate, compounded annually? What happens if interest is compounded continuously? Problem
  • 7.
    As p →0, we have Solutions: 10 log10(1 + p) = (10 log10 e) ln(1 + p)=4.34 ln(1 + p) → 4.34p, where we change the base of the logarithm from 10 to e (recall that x = 10log10 x = e , so log10 x = (log10 e)(ln x)), we read 10 log10 e = 4.34 from the dB table, and we use ln(1 + p) → p as p → 0. Thus we obtain a linear approximation
  • 8.
    ratio or multiplicativefactor of 1 + p ↔ 4.34p dB, which becomes exact as p → 0. This linear approximation translates to the estimate that it takes years to double your money, or a “Rule of 69.35.” For example, this rule estimates that it takes Y = 69.35/5 = 13.87 years to double your money when P = 5%.
  • 9.
    A more precisecalculation using natural logarithms yields or a “Rule of 69.31,” which estimates that it takes Y = 69.31/5 = 13.86 years to double your money when P = 5%.
  • 10.
    Remark: Note thatthis “Rule of 69.31” becomes exact when interest is compounded continuously, so that after Y years your money has increased by a factor of epY , rather than the factor of (1 + p)Y that you get when interest is compounded annually.
  • 11.
    (c) How manyyears will it actually take to double your money at a 5% interest rate, compounded annually? [Hint: 10 log10 7=8.45 dB.] Whose rule best predicts the correct result? Problem
  • 12.
    Since 1.05 =21/20, a factor of 1.05 is equivalent to Solutions: 10 log10 7 + 10 log10 3 − 10 log10 10 − 10 log10 2=8.45 + 4.77 − 10 − 3.01 = 0.21 dB. Thus it actually takes years to double your money when interest is compounded annually.
  • 13.
    We see thatthis estimate is quite close to the estimate of Y = 14.4 years given by the “Rule of 72.” Thus the “Rule of 72” is equivalent to a linear approximation of the dB table that is exact near P = 5%. This is the range in which the “Rule of 72” is commonly used. The “Rule of 72” also has the advantage that 72 has many integer divisors (e.g., 2, 3, 4, 6, 8, 9, 12, ... ), so that its estimate of Y is an easily calculated integer for many common interest rates. So in this instance the bankers have been rather clever.
  • 14.
    Problem 1.2 (Biorthogonalcodes) A 2m × 2m {±1}-valued Hadamard matrix H2m may be constructed recursively as the m-fold tensor product of the 2 × 2 matrix as follows:
  • 15.
    (a) Show byinduction that: (i) (H2m)T = H2m, where T denotes the transpose; i.e., H2m is symmetric; (ii) The rows or columns of H2m form a set of mutually orthogonal vectors of length 2m; (iii) The first row and the first column of H2m consist of all +1s; (iv) There are an equal number of +1s and −1s in all other rows and columns of H2m; (v) H2mH2m = 2mI2m; i.e., (H2m)−1 = 2−mH2m, where −1 denotes the inverse.
  • 16.
    We first verifythat (i)-(v) hold for H2. We then suppose that (i)-(v) hold for H2m−1 . We can then conclude by induction that: Solutions: (i) (ii) The first 2m−1 rows of H2m are of the form hj = (gj , gj ), where gj is the corresponding row of H2m−1 , and the second 2m−1 rows of H2m are of the form hj+2m−1 = (gj , −gj ).
  • 17.
    Suppose that therows gj of H2m−1 are mutually orthogonal. Then the inner product = j <hj , hj> is 0 whenever j and j = j ± 2m−1, because the inner product is the sum of the inner products of the first half-rows and the second half-rows, which are both zero. If j = j − 2m−1, then the inner product is <hj , hj> = <gj , gj > + <gj , −gj > = <gj , gj >−<gj , gj > = 0, and similarly hj , hj = 0 when j = j + 2m−1. Thus hj , hj = 0 whenever j = j , so the rows of H2m form a set of mutually orthogonal vectors. Since (H2m)T = H2m, so do the columns.
  • 18.
    (iii) The firstrow of H2m is h0 = (g0, g0), where g0 is the first row of H2m−1 . By the inductive hypothesis, g0 = (+1, +1,... , +1), so h0 = (+1, +1,... , +1); i.e., all columns of H2m have a +1 as their first component. Since (H2m)T = H2m, so do all the rows. (iv) The remaining rows of H2m are orthogonal to h0 by (ii), and thus must have an equal number of +1s and −1s. Since (H2m)T = H2m, so must the remaining columns.
  • 19.
    (v) Since (H2m)T= H2m, the matrix H2mH2m = H2m(H2m)T is the matrix of inner products of rows of H2m. By (ii), all off-diagonal elements of this matrix are zero. The diagonal elements are the squared norms ||hj ||2 = 2m, since hj is a vector of length 2m in which each component has squared norm 1. Thus H2mH2m = 2mI2m.
  • 20.
    (b) A biorthogonalsignal set is a set of real equal-energy orthogonal vectors and their negatives. Show how to construct a biorthogonal signal set of size 64 as a set of {±1}- valued sequences of length 32. By (a)(ii), the rows of H32 form a set O of 32 orthogonal {±1}-valued sequences of length 32, each with energy 32. It follows that the rows of H32 and their negatives form a biorthogonal set B = ±O of 64 {±1}-valued sequences of length 32. Solutions: Problem
  • 21.
    (c) A simplexsignal set S is a set of real equal-energy vectors that are equidistant and that have zero mean m(S) under an equiprobable distribution. Show how to construct a simplex signal set of size 32 as a set of 32 {±1}-valued sequences of length 31. [Hint: The fluctuation O − m(O) of a set O of orthogonal real vectors is a simplex signal set.] Problem
  • 22.
    Solutions: As in (b),the rows of H32 form a set O of 32 orthogonal equal-energy (and therefore equidistant) {±1}-valued sequences of length 32. By (a)(iii)-(iv), the mean of O is m(O) = (+1, 0, 0,... , 0), since all rows have +1 in the first column and an equal number of +1s and −1s in the remaining columns. Thus S = O−m(O) is a zero-mean, equal-energy and equidistant set of 32 row vectors of length 32 which have 0 in the first coordinate and the elements of the rows of H32 in the remaining coordinates. Since the first coordinate always has value 0, it may be deleted without affecting any norms, distances or inner products; in particular, the vectors remain zero-mean, equal-energy and equidistant. Thus we obtain a simplex signal set S consisting of a set of 32 {±1}-valued sequences of length 31.
  • 23.
    (d) Let Y= X + N be the received sequence on a discrete-time AWGN channel, where the input sequence X is chosen equiprobably from a biorthogonal signal set B of size 2m+1 constructed as in part (b). Show that the following algorithm implements a minimumdistance decoder for B (i.e., given a real 2m-vector y, it finds the closest x B to y): ∈ (i) Compute z = H2my, where y is regarded as a column vector; (ii) Find the component zj of z with largest magnitude |zj |; (iii) Decode to sgn(zj )xj , where sgn(zj ) is the sign of the largest-magnitude component zj and xj is the corresponding column of H2m. Problem
  • 24.
    Solutions: Given y, minimizingthe squared distance ||y−x||2 over x B is equivalent to ∈ maximizing the inner product y, x, since and ||x||2 is equal to a constant (2m) for all x B. The vector z = H2my is the set ∈ of inner products y, x as x runs through the 2m rows of H2m. The set of inner products y, x as x runs through the 2m+1 elements of B are therefore just the elements of z and their negatives. Maximizing y, x is therefore equivalent to finding the element zj of z with largest magnitude |zj |, and deciding on the corresponding row xj of H2m if the sign of zj is positive, or on −xj if the sign is negative.
  • 25.
    Remark. Note thatthe matrix multiplication z = H2my corresponds to implementing a bank of matched filters, one for each of the rows of H2m, which form the set of correlations of y with each of the rows of H2m. Since the rows of H2m span the signal space S B, by the theorem of irrelevance (see Chapter 2) ⊃ the outputs z of this bank of matched filters form a set of sufficient statistics for detection of a signal x S in the presence of AWGN. In this case we have been ∈ able to show directly that we can find an optimal decision rule based on z which is very simple.
  • 26.
    (e) Show thata circuit similar to that shown in Figure 1 below for m = 2 can implement the 2m × 2m matrix multiplication z = H2my with a total of only m × 2m addition and subtraction operations. (This is called the “fast Hadamard transform,” or “Walsh transform,” or “Green machine.”) Figure 1. Fast 2m × 2m Hadamard transform for m = 2. Problem
  • 27.
    This circuit isbased on the following recursion for z = H4y: Solutions:
  • 28.
    In other words,we first group the elements of y into pairs (y1, y2),(y3, y4),... . The first set of arithmetic elements computes the 2 × 2 Walsh-Hadamard transform of each pair; e.g., We then group the elements of y into pairs and again compute the 2 × 2 Walsh-Hadamard transform of each pair; e.g.,
  • 29.
    Thus we cancompute the 4 × 4 Walsh-Hadamard transform z = H4y by computing two stages of two 2 × 2 Walsh-Hadamard transforms, as illustrated in Figure 1. Similarly, we can compute a 2m × 2m Walsh-Hadamard transform z = H2my using the recursion by computing two 2m−1 × 2m−1 Walsh-Hadamard transforms, and then combining their outputs in one more stage involving 2m−1 2 × 2 Walsh- Hadamard transforms. If each m−1 × 2m−1 Walsh-Hadamard transform requires m − 1 stages of 2m−2 2 × 2 WalshHadamard transforms, then the 2m ×2m
  • 30.
    Walsh-Hadamard transform requiresm stages of m−1 2 × 2 Walsh-Hadamard transforms. Each 2 × 2 transform requires one addition and one subtraction, so a total of only m × 2m−1 × 2 additions and subtractions is required. Thus the complexity of an M = 2m-point Walsh-Hadamard transform is only of the order of M log2 M, rather than M2. This is why this algorithm is called “fast.”