<< Chapter < Page Chapter >> Page >
i = 0 N - 1 m [ i ] p ( t - i T ) cos ( 2 π f c t ) .

Since the channel is assumed to be ideal, this is equal to the received signal r ( t ) . This ideal transmitter is simulated in the first part of idsys.m .

% encode text string as T-spaced % PAM (+/-1, +/-3) sequencestr='01234 I wish I were an Oscar Meyer...      wiener 56789';m=letters2pam(str); N=length(m);    % 4-level signal of length N % zero pad T-spaced symbol sequence to create% upsampled T/M-spaced sequence of scaled % T-spaced pulses (with T = 1 time unit)M=100; mup=zeros(1,N*M); mup(1:M:N*M)=m;  % oversampling factor % Hamming pulse filter with T/M-spaced% impulse response p=hamming(M);                       % blip pulse of width Mx=filter(p,1,mup);                  % convolve pulse shape with data figure(1), plotspec(x,1/M)          % baseband signal spectrumt=1/M:1/M:length(x)/M;              % T/M-spaced time vector fc=20;                              % carrier frequencyc=cos(2*pi*fc*t);                   % carrier r=c.*x;                             % modulate message with carrier
idsys.m (part 1) idealized transmission system - the transmitter (download file)

Since M atlab cannot deal directly with analog signals, the “analog” signal r ( t ) is sampled at M times the symbol rate, and r ( t ) | t = k T s (the signal r ( t ) sampled at times t = k T s ) is the vector r in the M atlab code. The vector r is also the input to the digital portion of the receiver. Thus, the first sampling block in the receiver of [link] is implicit in the way M atlab emulates the analog signal. To be specific, k can be represented as the sum of an integer multiple of M and some positive integer ρ smaller than M such that

k T s = ( i M + ρ ) T s .

Since T = M T s ,

k T s = i T + ρ T s .

Thus, the received signal sampled at t = k T s is

r ( t ) | t = k T s = i = 0 N - 1 m [ i ] p ( t - i T ) cos ( 2 π f c t ) | t = k T s = i T + ρ T s = i = 0 N - 1 m [ i ] p ( k T s - i T ) cos ( 2 π f c k T s ) .

The receiver performs downconversion in the second part of idsys.m with a mixer that uses a synchronized cosine wave, followed bya lowpass filter that removes out-of-band signals. A quantizer makes hard decisions that are then decodedback from symbols to the characters of the message. When all goes well, the reconstructed message is the same asthe original.

% am demodulation of received signal r c2=cos(2*pi*fc*t);                   % synchronized cosine for mixingx2=r.*c2;                            % demod received signal fl=50; fbe=[0 0.1 0.2 1]; damps=[1 1 0 0 ];  % design of LPF parametersb=firpm(fl,fbe,damps);               % create LPF impulse response x3=2*filter(b,1,x2);                 % LPF and scale downconverted signal% extract upsampled pulses using correlation % implemented as a convolving filtery=filter(fliplr(p)/(pow(p)*M),1,x3);  % filter rec'd sig with pulse; normalize % set delay to first symbol-sample and% increment by M z=y(0.5*fl+M:M:end);                 % downsample to symbol ratefigure(2), plot([1:length(z)],z,'.')  % soft decisions% decision device and symbol matching % performance assessmentmprime=quantalph(z,[-3,-1,1,3])';    % quantize to +/-1 and +/-3 alphabetcvar=(mprime-z)*(mprime-z)'/length(mprime),  % cluster variance lmp=length(mprime);pererr=100*sum(abs(sign(mprime-m(1:lmp))))/lmp,  % percentage symbol errors % decode decision device output to text stringreconstructed_message=pam2letters(mprime)      % reconstruct message
idsys.m (part 2) idealized transmission system - the receiver (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