<< Chapter < Page | Chapter >> Page > |
Read in a large text file using the following M
atlab code.
(Use one of your own or use one of the included text files.)
Through the Looking Glass by Lewis Carroll (carroll.txt) and
Wonderful Wizard of Oz by Frank Baum (OZ.txt) are available on the
website. Make a plot of the symbol error rate as a function
of the bit error rate by running
redundant.m
for a variety
of values of
per
. Examine the resulting text. At what value
of
per
does the text become unreadable? What is the
corresponding symbol error rate?
b=[0.5 1 -0.6]; % define channelm=1000; s=sign(randn(1,m)); % binary source of length m
r=filter(b,1,s); % output of channeln=4; f=zeros(n,1); % initialize equalizer at 0
mu=.1; delta=2; % stepsize and delay deltafor i=n+1:m % iterate
rr=r(i:-1:i-n+1)'; % vector of received signal e=s(i-delta)-f'*rr; % calculate error
f=f+mu*e*rr; % update equalizer coefficientsend
LMSequalizer.m
find a LMS equalizer f for the channel b
(download file)
Thus, for English text encoded as ASCII characters, a significant number of errors can occur (about of the letters can be arbitrarily changed), without altering the meaning of the sentence. While these kinds oferrors can be corrected by a human reader, the redundancy is not in a form that iseasily exploited by a computer. Even imagining that the computer could look up wordsin a dictionary, the person knows from context that “It is clear” is a more likely phrase than“It is clean” when correcting Shannon's sentence with errors. The person can figure out from context that “cAf” (from the phrase with bit errors) must have had two errors by using the long term correlation of thesentence (i.e., its meaning). Computers do not deal readily with meaning. A more optimistic rendering of this sentence: “Computers do not yet deal readily with meaning.”
In the previous section, the information contained in a message was defined to depend on two factors: the number ofsymbols and their probability of occurrence. But this assumes that the symbols do not interact—that the letters areindependent. How good an assumption is this for English text? It is a poor assumption. As the preceding examples suggest,normal English is highly correlated.
It is easy to catalog the frequency of occurrence of the letters. The letter “e” is the most common.In Frank Baum's Wizard of Oz , for instance, “e” appears 20,345 times and “t” appears 14,811 times,but the letters “q” and “x” appear only 131 and 139 times, respectively. (“z” might be a bit more common in Baum's book than normalbecause of the title). The percentage of occurrence for each letter in the Wizard of Oz is as follows:
“Space” is the most frequent character, occurring
of the time. It was easier to use the following
M
atlab code in conjunction with
readtext.m
, than
to count the letters by hand.
% First run LMSequalizer.m to set channel b
% and equalizer ffinaleq=f; % test final filter f
m=1000; % new data pointss=pam(m,2,1); % new binary source of length m
r=filter(b,1,s); % output of channelyt=filter(f,1,r); % use final filter f to test
dec=sign(real(yt));% quantization
for sh=0:n % if equalizer is working, one% of these delays has zero error
err(sh+1)=0.5*sum(abs(dec(sh+1:end)... -s(1:end-sh)));
end
EqualizerTest.m
verify the operation of an equalizer f for the channel b
(download file)
Notification Switch
Would you like to follow the 'Software receiver design' conversation and receive update notifications?