Problems with Matlab Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you Matlab Codes for Registered Members of this site only, at free service...Follow Me.

Digital Transmitter: MATLAB Exercise for Quadrature Phase-Shift Keying


MATLAB Simulation

MATLAB is commonly used to design filters and determine frequency responses of systems, but it is also very useful as a simulation tool.
Use the following MATLAB code skeleton to simulate the QPSK transmitter from Digital Transmitter: Introduction to Quadrature Phase-Shift Keying and fill in the incomplete portions. Note that the code is not complete and will not execute properly as written. How does the spectrum of the transmitted signal change with Tsymb? How do you interpret the figure created byplot(rI,rQ)?
    1  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  2  % MATLAB Code Skeleton for QPSK Digital Transmitter   3  4  % Generate random bits  5  bits_per_symbol=2;  6  num_symbols=128;  7  numbits=bits_per_symbol*num_symbols;  8  bits=rand(1,numbits)>0.5;  9    10  Tsymb = 16;                  % symbol length  11  omega = pi/2;                % carrier frequency  12  13  %%%%%%%%%%%%%%%%%%%%%%%%  14  % Transmitter section  15                             % initialize transmit sequence  16  t = zeros(1,num_symbols*Tsymb);  17  i = 1;                       % initialize bit index  18  n = 1;                       % initialize time index  19    20  while (n <= num_symbols*Tsymb)  21   if ( bits(i:i+1) == [ 0 0])  22       Igain = 1/sqrt(2);  23       Qgain = 1/sqrt(2);  24   % ------>Insert code here<-------  25  26   end;  27   i = i+2;                    % next 2 bits  28  29   % Generate symbol to be transmitted  30   t(n:n+Tsymb-1) =    %------>Insert code here<-------  31                    32   n = n+Tsymb;                % next symbol  33  end;  34  35  % Show the transmitted signal and its spectrum  36  % ------>Insert code here<-------  37  38  % Show the transmitted signal constellation   39  rI = t.*cos(omega*[1:num_symbols*Tsymb]);  40  rQ = t.*sin(omega*[1:num_symbols*Tsymb]);  41  42  % Filter out the double-frequency term  43  low_pass=fir1(512,0.5);  44  rI=conv(rI,low_pass);  45  rQ=conv(rQ,low_pass);  46  figure;  47  plot(rI,rQ);         

0 comments:

Post a Comment

Recent Comments

Popular Matlab Topics

Share your knowledge - help others

Crazy over Matlab Projects ? - Join Now - Follow Me

Sites U Missed to Visit ?

Related Posts Plugin for WordPress, Blogger...

Latest Articles

Special Search For Matlab Projects

MATLAB PROJECTS

counter

Bharadwaj. Powered by Blogger.