<< 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 10 % 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 1 % errors. The person can figure out from context that “cAf” (from the phrase with 2 % 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:

a 6 . 47 h 5 . 75 o 6 . 49 v 0 . 59 b 1 . 09 i 4 . 63 p 1 . 01 w 2 . 49 c 1 . 77 j 0 . 08 q 0 . 07 x 0 . 07 d 4 . 19 k 0 . 90 r 4 . 71 y 1 . 91 e 10 . 29 l 3 . 42 s 4 . 51 z 0 . 13 f 1 . 61 m 1 . 78 t 7 . 49 g 1 . 60 n 4 . 90 u 2 . 05

“Space” is the most frequent character, occurring 20 % 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)

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Software receiver design. OpenStax CNX. Aug 13, 2013 Download for free at http://cnx.org/content/col11510/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Software receiver design' conversation and receive update notifications?

Ask