Digital Signal Processing Reference
In-Depth Information
Example 4.9. LetN=20,F=7,A=2andB=5.Formthesignal S and decode it in accordance with
the equations above.
A basic script to demonstrate this is
function LVOrthogSigXmissBasic(N,F,A,B)
% LVOrthogSigXmissBasic(20,7,2,5)
n = 0:1:N-1; C1 = cos(2*pi*n*F/N);
C2 = sin(2*pi*n*F/N); S = A*C1 - B*C2;
Sr1 = (2/N)*sum(S.*C1)
Sr2 = -(2/N)*sum(S.*C2)
A slightly longer script that allows A and B to be equal length row vectors of real numbers is
function [Sr1,Sr2] = LVOrthogSigXmiss(N,F,A,B)
% [Sr1,Sr2] = LVOrthogSigXmiss(20,7,[2,-1,3,0,7],[5,2,-6,3,1])
if ˜(length(A)==length(B))
error('A and B must be the same length'); end
n = 0:1:N-1; C1 = cos(2*pi*n*F/N);
C2 = sin(2*pi*n*F/N);
C1Mat = (C1')*(ones(1,length(A)));
C2Mat = (C2')*(ones(1,length(B)));
AMat = ones(N,1)*A; BMat = ones(N,1)*B;
S1 = C1Mat.*(AMat); S1 = S1(:);
S2 = C2Mat.*(BMat); S2 = S2(:);S=S1-S2;
% must break S into one cycle (or symbol) frames
SigMat = reshape(S,N,fix(length(S)/N));
Sr1 = (2/N)*sum(SigMat.*C1Mat)
Sr2 = -(2/N)*sum(SigMat.*C2Mat)
A more extensive project for the student is found in the exercises below, in which two audio signals
are encoded and decoded. The principle of orthogonal signal transmission is found in many applications,
from modems on the digital data side to analog systems, such as the briefly proposed FMX system on the
1980s. There are many other types of orthogonal waves besides pure sinusoids, such as Walsh functions,
chirps, and pseudorandom sequences, for example. A discussion of these is beyond the scope of this topic,
but many topics and other references may be readily found.
4.5
THE CORRELATION SEQUENCE
The Correlation Sequence of two sequences is obtained by laying one sequence atop the other, computing
a correlation (as at the zeroth lag, for example), shifting one of the sequences one sample to the left while
the other sequence remains in place, computing the correlation value again, shifting again, etc.
We can define the k -th value of the Correlation Sequence C as
N
1
C
[
k
]=
A
[
n
]
B
[
n
+
k
]
(4.14)
n
=
0
Search WWH ::




Custom Search