Code covered by the BSD License  

Highlights from
MATLAB for Digital Communication

4.51351

4.5 | 40 ratings Rate this file 286 Downloads (last 30 days) File Size: 147 KB File ID: #25293
image thumbnail

MATLAB for Digital Communication

by

 

The MATLAB programs in "MATLAB/Simulink for Digital Communication" authored by Won Y. Yang et. al

| Watch this File

File Information
Description

CHAPTER 1: FOURIER ANALYSIS
1.1 CONTINUOUS-TIME FOURIER SERIES (CTFS)
1.2 PROPERTIES OF CTFS
       1.2.1 Time-Shifting Property
       1.2.2 Frequency-Shifting Property
       1.2.3 Modulation Property
1.3 CONTINUOUS-TIME FOURIER TRANSFORM (CTFT)
1.4 PROPERTIES OF CTFT
       1.4.1 Linearity
       1.4.2 Conjugate Symmetry
       1.4.3 Real Translation and Complex Translation
       1.4.4 Real Convolution and Correlation
       1.4.5 Complex Convolution – Modulation/Windowing
       1.4.6 Duality
       1.4.7 Parseval Relation - Power Theorem
1.5 DISCRETE-TIME FOURIER TRANSFORM (DTFT)
1.6 DISCRETE-TIME FOURIER SERIES - DFS/DFT
1.7 SAMPLING THEOREM
       1.7.1 Relationship between CTFS and DFS
       1.7.2 Relationship between CTFT and DTFT
       1.7.3 Sampling Theorem
1.8 POWER, ENERGY, AND CORRELATION
1.9 LOWPASS EQUIVALENT OF BANDPASS SIGNALS

CHAPTER 2: PROBABILITY AND RANDOM PROCESSES
2.1 PROBABILITY
2.2 LINEAR FILTERING AND PSD OF A RANDOM PROCESS
2.3 FADING EFFECT OF A MULTI-PATH CHANNEL
CHAPTER 3: ANALOG MODULATION
3.1 AMPLITUDE MODULATION (AM)
       3.1.1 DSB (Double Sideband)-AM (Amplitude Modulation)
       3.1.2 Conventional AM (Amplitude Modulation)
       3.1.3 SSB (Single Sideband)-AM(Amplitude Modulation)
3.2 ANGLE MODULATION - FREQUENCY/PHASE MODULATIONS

CHAPTER 4: ANALOG-TO-DIGITAL CONVERSION
4.1 QUANTIZATION
       4.1.1 Uniform Quantization
       4.1.2 Non-uniform Quantization
       4.1.3 Non-uniform Quantization Considering Relative Errors
4.2 Pulse Code Modulation (PCM)
4.3 Differential Pulse Code Modulation (DPCM)
4.4 Delta Modulation (DM)

CHAPTER 5: BASEBAND DIGITAL TRANSMISSION
5.1 RECEIVER (RCVR) and SNR
       5.1.1 Receiver of Filter Type
       5.1.2 Receiver of Matched Filter Type
       5.1.3 Signal Correlator
5.2 SIGNALING AND ERROR PROBABILITY
       5.2.1 Antipodal (Bipolar) Signaling
       5.2.2 OOK(On-Off Keying)/Unipolar Signaling
       5.2.3 Orthogonal Signaling
       5.2.4 Signal Constellation Diagram
       5.2.5 Simulation of Binary Communication
       5.2.6 Multi-level(amplitude) PAM Signaling
       5.2.7 Multi-dimensional Signaling
       5.2.8 Bi-orthogonal Signaling

CHAPTER 6: BANDLIMITED CHANNEL AND EQUALIZER
6.1 BANDLIMITED CHANNEL
       6.1.1 Nyquist Bandwidth
       6.1.2 Raised-Cosine Frequency Response
       6.1.3 Partial Respone Signaling - Duobinary Signaling
6.2 EQUALIZER
       6.2.1 Zero-Forcing Equalizer (ZFE)
       6.2.2 MMSE Equalizer (MMSEE)
       6.2.3 Adaptive Equalizer (ADE)
       6.2.4 Decision Feedback Equalizer (DFE)

CHAPTER 7: PASSBAND DIGITAL TRANSMISSION
7.1 AMPLITUDE MODULATION - AMPLITUDE SHIFT KEYING (ASK)
7.2 FREQUENCY MODULATION - FREQUENCY SHIFT KEYING (FSK)
7.3 PHASE MODULATION - PHASE SHIFT KEYING (PSK)
7.4 DIFFERENTIAL PHASE SHFT KEYING (DPSK)
7.5 QUADRATURE AMPLITUDE MODULATION (QAM) - PAM/PSK
7.6 COMPARISON OF VARIOUS SIGNALINGS

CHAPTER 8: CARRIER RECOVERY AND SYMBOL SYNCHRONIZATION
8.1 INTRODUCTION
8.2 PLL (PHASE-LOCKED LOOP)
8.3 ESTIMATION OF CARRIER PHASE USING PLL
8.4 CARRIER PHASE RECOVERY
       8.4.1 Carrier Phase Recovery Using Squaring Loop for BPSK
       8.4.2 Carrier Phase Recovery Using Costas Loop for PSK
       8.4.3 Carrier Phase Recovery for QAM Signals
8.5 SYMBOL SYNCHRONIZATION (TIMING RECOVERY)
       8.5.1 Early-Late Gate Timing Recovery for BPSK Signals
       8.5.2 NDA-ELD Synchronizer for PSK Signals

CHAPTER 9: INFORMATION AND CODIN
9.1 MEASURE OF INFORMATION - ENTROPY
9.2 SOURCE CODING
       9.2.1 Huffman Coding
       9.2.2 Lempel-Zip-Welch Coding
       9.2.3 Source Coding vs. Channel Coding
9.3 CHANNEL MODEL AND CHANNEL CAPACITY
9.4 CHANNEL CODING
       9.4.1 Waveform Coding
       9.4.2 Linear Block Coding
       9.4.3 Cyclic Coding
       9.4.4 Convolutional Coding and Viterbi Decoding
       9.4.5 Trellis-Coded Modulation (TCM)
       9.4.6 Turbo Coding
       9.4.7 Low-Density Parity-Check (LDPC) Coding
       9.4.8 Differential Space-Time Block Coding (DSTBC)
9.5 CODING GAIN

CHAPTER 10: SPREAD-SPECTRUM SYSTEM
10.1 PN (Pseudo Noise) Sequence
10.2 DS-SS (Direct Sequence Spread Spectrum)
10.3 FH-SS (Frequency Hopping Spread Spectrum)

CHAPTER 11: OFDM SYSTEM
11.1 OVERVIEW OF OFDM
11.2 FREQUENCY BAND AND BANDWIDTH EFFICIENCY OF OFDM
11.3 CARRIER RECOVERY AND SYMBOL SYNCHRONIZATION
11.4 CHANNEL ESTIMATION AND EQUALIZATION
11.5 INTERLEAVING AND DEINTERLEAVING
11.6 PUNCTURING AND DEPUNCTURING
11.7 IEEE STANDARD 802.11A - 1999

Required Products Communications Blockset
Communications System Toolbox
DSP System Toolbox
Signal Processing Toolbox
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (127)
10 Jun 2014 Won Yang

The book can be bought from Won (wyyang53@hanmail.net) via PayPal.

25 Apr 2014 Antoun Ghobrial  
19 Mar 2014 Padmapriya  
30 Jan 2014 Chris Frailey

Hello. I would like to know if this book is still available for purchase? It is out of stock on Amazon and I didn't see any copies on ebay as well. If there is another distributor could you please let me know. Regards, Chris

07 Dec 2013 zou  
25 Nov 2013 Parag

i want code for Joint Decoding of LDPC Code and Phase Factors for OFDM Systems With PTS PAPR Reduction

30 Oct 2013 hachemi

dear sir,
this is a great effort that you have provided here.
Please can you provide me chapter 9 , I am working on like-ldpc type algorihm so it will be very helpfull to me if I have some good reference. Also have you experienced some treatment of Map solution when the matrix is not binary one so we obtain an arithmetic vector
result.
Thanks

23 Oct 2013 Won Yang

In p434 (index), you can find the page number containing 'do_square_filter_clock.m', which is 68. You can find 'do_square_filter_clock.m' in page 68.

23 Oct 2013 Shi

Hi,sir:
I buy this book in korea, but I can't find 'do_square_filter_clock.m' in this book,can you tell me that where is it in this book.
If I want to use Pilot insertion method for carrier synchronization,can you tell me how to do this.
Thank you.

27 Jun 2013 Dragos

please send matlab code for QPSK BER with OFDM modulation and also if you have any matlab code with synchronization, PAPR, CFO or other. thank you

17 Jun 2013 Sidra Nawaz

hi, how can i access this book .
i have code for v blast zero forcing can u help me understand it please.
k=zeros(1,M);
G=Eb*H'*pinv(Eb*H*H'+N0(T)*eye(N))
%G=pinv(H);
% G=(pinv(H'*H))*H';
for i=1:M %i loop
for J=1:M
n(J)=(norm(G(J,:)))^2; % Checking the best SNR
end

for t=1:i-1
n(k(t))= Inf;
end
[ Y,I]=min(n);
k(i)=I;
w=G(I,:);
y=w*r1

y_temp(I)=y; % Post combining process, y being stored

if repi>2

y = (y + y_temp1(:,I)); % for a retrans old soft values of y
%being added to latest valuebefore
%detection

y_temp(I)=y ; % Soft Values saved for 3rd and 4th repitions
end

b(I)=sign(real(y))+j*sign(imag(y)); % Descision of symbol
r1=r1-b(I)*H(:,I) ; %%%%%%r1

H(:,I)=0;
% G=(pinv(H'*H))*H';
G=Eb*H'*pinv(Eb*H*H'+N0(T)*eye(N));
%G=pinv(H);
end

data_rec=[b];

13 Jun 2013 Muhammad Nabeel

Respected Won Yang,

I am working in Simulink. At transmitter side I have some digital data which I can see through scope as unipolar digital data. On receiver side let suppose I am unaware what was originally transmitted digital data but what I know is that the transmitted digital sequence must be from one of the ten known signals on receiver side. So I want to compare the received signal with ten known sequences one by one to check which digital signal among them was actually transmitted. I am not that much expert.
Kindly tell me should I use correlation for comparison of this digital data or any other thing. I will wait for your response.
Thanks

25 May 2013 marriam nayyer  
25 May 2013 marriam nayyer  
25 May 2013 marriam nayyer  
28 Apr 2013 Roshitha Pinto

please send matlab code for QPSK BER with OFDM modulation

11 Apr 2013 Anadol91  
15 Jan 2013 Chengyan

thank you very much!

12 Dec 2012 gatewick

very detailed stuff, many thanks

29 Sep 2012 Veenesh M.U.

Sir can you tell me that among PSK and QAM which is better for high data rates in terms of high throughput and less noise.I need your help sir

24 Sep 2012 Oleg Rasulov  
07 Jun 2012 Onur

Thank you very much Prof. Won Yang for your really valuable contribution. Since I am working on timing recovery, it would be really good if I can get especially the PPT slides for chapter 8 and 9.

22 May 2012 Bin

Fantastic works! Thank you very much!

16 Mar 2012 Won Yang

It is working well on my PC. What error message(s) do you see? You know it may take some time and your patience.

16 Mar 2012 Yang

Hello dear Mr. Won Yang,

The m file do_OFDM1 is not working at all, could you please make necessary changes? Thank you very much in advance.

12 Dec 2011 harsh

this is an fantastic work.

05 Dec 2011 Won Yang

png is a function saved in an M-file named 'png'. If you had downloaded, it would be automatically run whenever the main program "DS_SS" is run. If you don't have the function, drag and paste the following:

function c=png(gm,Kc,x)
%generates an m-sequence from a feedback-shift register if Kc=0
% or from a high-speed feedback shift generator if KC>0
% gm: a generator tap coefficient vector
% or a set of connected tap position numbers
%Copyleft: Won Y. Yang, wyyang53@hanmail.net, CAU for academic use only
if sum(gm>1)>0, g(gm)=1; % say, if gm=[1 2 4 5]
else g=gm; % if gm=[1 1 0 1 1]
end
m=length(g); % Number of feedback shift-registers
if nargin==2
if length(Kc)>1, x=Kc; Kc=0; % If x0 is given as 2nd input argument
else x=[zeros(1,m-1) 1]; % Initial state of the shift register
end
elseif nargin<2, Kc=0; x=[zeros(1,m-1) 1];
end
x=x(end:-1:1); N=2^m-1;
if Kc==0 % Feedback shift register
g=fliplr(g); for i=1:N, c(i)=x(1); x=[x(2:m) rem(g*x',2)]; end
elseif Kc<0
g=fliplr(g); c=x;
for i=m+1:N, x=[x(2:m) rem(g*x',2)]; c(i)=x(m); end
else % High-speed feedback shift generator
c=x;
for i=m+1:N, c(i)=x(1); x=[rem(x(2:m)+g(1:m-1)*x(1),2) x(1)]; end
end

05 Dec 2011 harsh

Hello every body can anybody tell me what is png command in DS_ss.m file.It is not available in matlab 2007

16 Oct 2011 entisar salem

I have a smal question about the turbo code . in case of block fading do I need to make changes in the logmap function

07 Sep 2011 pravin Barmashe

Plz can anyone help me in V-Blast algorithm code. plz if u have email me at pbarmashe@gmail.com.

14 Jul 2011 Won Yang

I am sorry that I have no MATLAB codes on DAPSK/OQAM. However, if I could help you in composing the MATLAB codes on DAPSK/OQAM and there was any possibility that I can be a coauthor in your research paper, I would consider trying to compose the codes under your guidance
even if I am not so confident of my capability.
Thanks for being my reader.

29 Jun 2011 Asuman

Dear Won Yang.
I am studying DAPSK and OQAM modulation in OFDM systems.
I have your book: MATLAB for digital communication, thank you for
this book. My question is have you finished any matlab code for
DAPSK or OQAM, I need your help Sir.
Many thanks.

28 May 2011 moonman

What about the softcopy of ur book? is it available on internet

20 May 2011 Roi

the files are not updated , and has allot of errors

12 May 2011 zouhair

I think it is time for you to be a bit polite

11 May 2011 Won Yang

The program "LDPC_demo.m" runs well with inv_GF2() as it is. This is your 4th question. I think it is time for you to be a bit polite to my long-time efforts by rating my codes overall this time.

11 May 2011 zouhair

Hi Sir. There is a problem with the LDPC code, so, please if you try to fix it. The problem is in the function " AI=inv_GF2(A)"

06 May 2011 Won Yang

I see no problem as far as the last line computing the BER is concerned. ber_QPSK_theory = prob_error(SNRbdB,'PSK',K,'BER')

gen_LDPC is what was made not by me:
function H=gen_ldpc(M,N)
%For examples and more details, please refer to the LDPC toolkit tutorial at
%http://arun-10.tripod.com/ldpc/ldpc.htm
bits_per_col=3;
for i=1:M
row_flag(i)=0; for j=1:N, H(i,j)=0; end
end
%add bits_per_col 1's to each column with the only constraint
% being that the 1's should be placed in distinct rows
for i=1:N
a=randperm(M);
for j=1:bits_per_col, H(a(j),i)=1; row_flag(a(j))=row_flag(a(j))+1; end
end
%row_flag
max_ones_per_row=ceil(N*bits_per_col/M);
%H

%add 1's to rows having no 1(a redundant row) or only one 1(that bit in the codeword becomes
%zero irrespective of the input)
for i=1:M
if row_flag(i)==1
j=unidrnd(N);
while H(i,j)==1, j=unidrnd(N); end
H(i,j)=1; row_flag(i)=row_flag(i)+1;
end
if row_flag(i)==0
for k=1:2
j=unidrnd(N);
while H(i,j)==1, j=unidrnd(N); end
H(i,j)=1; row_flag(i)=row_flag(i)+1;
end
end
end

%try to distribute the ones so that the number of ones per row is as uniform as possible
for i=1:M
j=1; a=randperm(N);
while row_flag(i)>max_ones_per_row;
if H(i,a(j))==1
H(i,a(j))=0; row_flag(i)=row_flag(i)-1; newrow=unidrnd(M);
k=0;
while row_flag(newrow)>=max_ones_per_row | H(newrow,a(j))==1
newrow=unidrnd(M); k=k+1;
if k>=M, break; end
end
if H(newrow,a(j))==0, H(newrow,a(j))=1; row_flag(newrow)=row_flag(newrow)+1;
else H(i,a(j))=1; row_flag(i)=row_flag(i)+1;
end
end%if loop
j=j+1;
end%while loop
end%for loop
%row_flag, H
%try to eliminate cycles of length 4 in the factor graph
for loop=1:10
ones_position(1)=0;
for r=1:M
ones_count=0;
for c=1:N
if H(r,c)==1
ones_count=ones_count+1; ones_position(ones_count)=c;
end
end
for i=1:r-1
common=0;
for j=1:ones_count
if H(i,ones_position(j))==1
common=common+1 ;
if common==1, thecol=ones_position(j); end
end
if common==2
common=common-1;
if (round(rand)==0), coltoberearranged=thecol; thecol=ones_position(j);
else coltoberearranged=ones_position(j);
end
H(i,coltoberearranged)=3;
%make this entry 3 so that we dont use of this entry again while getting rid of other cylces
newrow=unidrnd(M);
%while ((newrow==i)|(H(newrow,ones_position(j))==1))
iteration=0;
while H(newrow,coltoberearranged)~=0
newrow=unidrnd(M); iteration=iteration+1;
if iteration==5, break; end
end
if iteration==5
while H(newrow,coltoberearranged)==1, newrow=unidrnd(M); end
end
H(newrow,coltoberearranged)=1;
end
end
end
for i=r+1:M
common=0;
for j=1:ones_count
if H(i,ones_position(j))==1
common=common+1 ;
if common==1, thecol=ones_position(j); end
end
if common==2
common=common-1;
if (round(rand)==0), coltoberearranged=thecol; thecol=ones_position(j);
else coltoberearranged=ones_position(j);
end
H(i,coltoberearranged)=3;
%make this entry 3 so that we dont use of this entry again while getting rid of other cylces
newrow=unidrnd(M);
%while ((newrow==i)|(H(newrow,ones_position(j))==1))
iteration=0;
while H(newrow,coltoberearranged)~=0
newrow=unidrnd(M); iteration=iteration+1;
if iteration==5, break; end
end
if iteration==5
while H(newrow,coltoberearranged)==1, newrow=unidrnd(M); end
end
H(newrow,coltoberearranged)=1;
end
end
end
end
end;
%H;
for i=1:M
row_flag(i)=0;
for j=1:N
if H(i,j)==1, row_flag(i)=row_flag(i)+1; end
if eq(H(i,j),3), H(i,j)=0; end %replace the 3's with 0's
end
end

06 May 2011 zouhair

Hi Sir. I want to use " LDPC_demo" but could not find the following algorithm "H=gen_ldpc(M,N);". Can you help please.

06 May 2011 zouhair

Hi again. Also the last line in "sim_TCM.m" which is to compute the BER theoretically is wrong.

06 May 2011 Won Yang

Hi Mr. Zouhair, I am sorry for the bug in the 'TCM_encoder()' where the first output variable name 'output' should be 'outputs'. Thanks for letting me realize my mistake. My book will be improved by the interests of the readers like you.
function [outputs,state]=TCM_encoder(....)

06 May 2011 zouhair

Hi Sir. I want to run "sim_TCM.m" but it seems that there are an error in the last two lines. The decoded sequence returns 2 bits only whereas the message length can be 10 000 bits.

24 Apr 2011 Eun-Ki Kim

Hello! I'm a wireless modem researcher. If you give your source code to me, my work will be much easier. Thank you very much.
neoikaro@naver.com

12 Mar 2011 Won Yang

Actually, I am not a specialist in OFDM. However, as far as I know, the aim of OFDM technique is to increase the data rate and bandwidth efficiency rather than to increase the BER performance. I hope you will refer to many other references on OFDM.

10 Mar 2011 Luís Miguel

Hello!

I'm studying the OFDM and I have a question ... I do not know why the simulation OFDM AWGN has the same performance without OFDM, knows me explain?
Thanks

Luis

08 Mar 2011 Babu

Thank u for reply sir.. looking forward for ur help:)

05 Mar 2011 Won Yang

I wish I could help you. However, neither time nor capability to help you do I have. Cheers!

04 Mar 2011 Babu

Dear Prof Won Yang,
i am working in turbo codes in QAM. can u help me with this.. In BPSK we just encode the bits into +1/-1. But in QAM the case is different. I want your help professor

Thanks
Babu

01 Mar 2011 Won Yang

I like to see one of my readers in the middle of my book.
1) The purpose of multiplying T before going into the loop is just to save the computation time by removing the necessity of performing the same multiplication repetitively for every bit inside the loop.
2) To simulate the continuous-time white noise having infinite correlation at tau=0, its magnitude must be increased as the sampling period decreases.
3) Thanks for being my reader. I hope you will continue to be happy on the bridge between communication stuff and MATLAB made by my book.

27 Feb 2011 Karthi

Dear Prof Won Yang,

Referring to your code in the Matlab file named 'sim_PSK_passband.m' :

1)The following line is written in the code:
suT= su*T;
The unit basis signal here is multiplied by T so that when the correlation is calculated, the correlation will be an unbiased estimate and not just the raw unscaled value. Is the reasoning right ? Or if it is wrong, what is the purpose of multiplying by T ?

2) The following line is written
sgmsT=sqrt(sigma2/T);
What is the purpose of dividing by T here ? Can you please explain mathematically ? I know that the noise power is being varied for every iteration by changing the SNR. But why do we specifically divide the noise power(sigma2)by T before applying it to the random noise generated in the code ?

Thanks for your help.

25 Feb 2011 Won Yang

Would you please correct 'temp_state' into 'tmp_state'? Sorry for the typo error.

24 Feb 2011 Hali

Hello Mr. Won Yang,

I'm also trying to simulate your code for Turbo codes and are giving me the following error:
?? Undefined function or variable 'temp_state'.

Error in ==> drubbing at 48
pu = pinput (tmp_state, k + j +1); tmp_state = ps (temp_state, pu +1);

Error in ==> turbo_code_demo at 36
Sova else L_A1 = (Ly (1,:), G, LU1, 1);% all information

Thanks
-------------------------------
Haji Rico

24 Feb 2011 Won Yang

function [nout,nstate,pout,pstate] = trellis(G)
% copyright Nov. 1998 Yufei Wu, MPRG lab, Virginia Tech for academic use only
[N,L] = size(G);
M = L-1; Ns = 2^M;

for state_i=1:Ns
state_b = deci2bin(state_i-1,M); for input_bit=0:1
d_k = input_bit; a_k = rem(G(1,:)*[d_k state_b]',2);
out(input_bit+1,:) = [d_k rem(G(2,:)*[a_k state_b]',2)];
state(input_bit+1,:) = [a_k state_b(1:M-1)];
end
nout(state_i,:) = 2*[out(1,:) out(2,:)]-1;
nstate(state_i,:) = [bin2deci(state(1,:)) bin2deci(state(2,:))]+1;
end

for input_bit=0:1
bN = input_bit*N; b1 = input_bit+1;
for state_i=1:Ns
pstate(nstate(state_i,b1),b1) = state_i;
pout(nstate(state_i,b1),bN+[1:N]) = nout(state_i,bN+[1:N]);
end
end

24 Feb 2011 Won Yang

On my side, the programs work fine. The variable out is well defined in the 3rd line to the line 'nout(state)i,:)= ....'.

20 Feb 2011 Rupinder Singh

Hello Mr. Won Yang,

I made the edit for turbo codes as you just suggested. But even after the edit, I'm getting the following error:

Undefined function or variable "out".

Error in ==> trellis at 22
nout(state_i,:) = 2*[out(1,:) out(2,:)]-1; % bipolarize

It would be great if you could share some insight on resolving this issue.
Thank you

19 Feb 2011 Won Yang

I am sorry for the mistake. Would you please change the statement
lm=lu-M; % Length of message
into
L_info=lu-M; % Length of information
I mean that 'lm' should be changed into L_info in the 9th line.

18 Feb 2011 Luís Miguel

Hello Mr Won Yang,

I am student and am trying to do the turbo code. Your file simulation gives me the following error: "Undefined function or variable 'L_info'" Please help me, thank you.

03 Feb 2011 Won Yang

Hi Mr. Muhammad usman,
I remember that I answered your question about the combnk function, but you have not yet acknowledged it by ranking my file. Anyway, the simulation result of the early-late algorithm for symbol synchronization implies that wherever (at t=2.1, 2.9, or 3.1) the sampling starts, the sampling instant converges to the closest mid-point 2.5 or 3.5 where the mid-points are supposed to be the optimal sampling instants as the peak points of each raised-cosine waveform. I hope this answer is good enough to make you feel like ranking this file or my book "MATLAB/Simulink for Digital Communication".

31 Jan 2011 Muhammad usman

hi Mr Won
i've tried to run this file but i can't understand its results, can you please explain it a bit more?and how can i use it for symbol recovery? sim_sym_sync_earlylate.m

thanx very much.

07 Jan 2011 herz101 gafai  
04 Jan 2011 herz101 gafai

Dear Mr Won Yang
I am a graduate student currently using your book which bought on amazon.com. I am interested in realizing an OFDM system with carrier frequency offset estimation and compensation in simulink. Though the model its in the book i am still having problems implementing it. Can you be so kind as to send me the model?. My email is ssnegus_2009@live.com
Thank you very much in advance and happy new year

01 Jan 2011 Won Yang

Dear Karthi, thanks a lot for giving the highest rank to my codes. However, I cannot help you due to the limitation of my time and capability. I am now tied up with authoring "MATLAB/Simulink for DSP". Also the codes listed in the book are almost the maximum of my programming capability. I can never be a universal solver. I can just help the beginners to start thinking about digital communication in the MATLAB language. It is the readers' job to modify/improve/ develop their own codes. I am sure you can ultimately do your job since you have an eye for my book. Happy New Year of 2011!

28 Dec 2010 Karthi  
28 Dec 2010 Karthi

Dear Prof Won Yang,

I am a graduate student who is currently using your book titled “Matlab/Simulink for Digital Communication” to program in Matlab an efficient equalizer for a bandlimited signal distorted by severe Inter Symbol Interference (ISI). I had followed your example code for symbol spaced adaptive linear and DFE LMS equalizers in Chapter 6: ‘Bandlimited Channel and Equalizer’ of your book.

Request 1: I would like to implement a fractionally spaced adaptive linear and DFE LMS equalizer. Can you kindly upload a Matlab code file showing how to realize a fractionally spaced (i.e. equalizer tap weights spaced at T/2, T being symbol period. The incoming signal is oversampled at 2 samples per symbol.) linear and DFE LMS equalizers for a baseband binary(+1/-1) pulse amplitude modulated signal.

Request 2: I would like to also implement a fractionally spaced (i.e. equalizer tap weights spaced at T/2, T being symbol period.) adaptive Fast RLS (Kalman) DFE equalizer for a baseband binary(+1/-1) pulse amplitude modulated signal. Can you also kindly upload a Matlab code file showing how to achieve this in Matlab.

Your help will be greatly appreciated. Thank you.

28 Nov 2010 Won Yang

If you have my book, you can see a MATLAB program "do_PLL.m" (p229) and a Simulink model "PLL_sim.mdl" (p247) simulating a PLL in Chapter 8.

26 Nov 2010 Maxwell Mishio

Please i have been trying to write matlab codes for phase-locked loop, but i am still not getting the picture, kindly help me

24 Nov 2010 Won Yang

As can be seen Fig. 11.21.1 (Simulink model "do_OFDM1_sim.mdl") of my book, the decision type of the Viterbi decoder should be neither 'hard' nor 'soft' but 'unquantized' so that setting the punctured bits to zero in the depuncture block can be regarded as declaring a neutral state between +1 and -1. If you have a different opinion, I would like to listen to it.

24 Nov 2010 Sravani

Hi Mr.Won Yang...
Can u clarify whether puncturing and depuncturing can be used with hard decision viterbi decoding.Is puncturing to be used only with soft decision decoding?

11 Nov 2010 Won Yang

I have made no program related with Section 9.4.1 on waveform coding.

09 Nov 2010 fie ahmad

Hi Mr Yang. I'm Hafisoh. I have try to open the channel code that you provided but unfortunately, it failed. Can you teach me to overcome this problem ( probably on chapter 9 (9.4.1) )?Thanks again ;)

29 Oct 2010 amer aswadi

thank you Mr. won Yang again for replay and great help
my regard

26 Oct 2010 Won Yang

%You can run the following program in which
% the MATLAB built-in routine 'berawgn()' and my routine 'prob_error()' have been used.
% These two routines yield a bit different BER curves for less than SNR<=8dB or EbN0<=5dB. I am not sure why they are different and even which one is true. The BER equation for PSK signaling is
pobet= (1+(b>1))/b*Q(sqrt(b*SNRbt)*sin(pi/M));
which is Eq.(7.3.7) in my book. You can see this equation in any Communication book. If you want to simulate 16PSK signaling, modify the program "sim_PSK_passband.m" in my book appropriately.
%--------------------------------------------------------
clear, clf
signaling='PSK';
b=4; M=2^b;
SNRdB=0:0.1:20; EbN0dB=SNRdB-3; %-10*log10(b);
ber1=prob_error(SNRdB,signaling,b);
ber2=berawgn(EbN0dB,signaling,M,'nondiff');
semilogy(SNRdB,ber1, SNRdB,ber2,'r')

25 Oct 2010 amer aswadi

Dear Mr. Won Yang
i Want ask about BER for 16-PSK. i search on the library and Internet for any book talk about BER for 16-PSK but i did not find it, i just find BER for 16-QAM. is it same BER with 16-PSK ?
can you recommend any book talking about 16-PSK.
thank you
my regard

22 Oct 2010 Zain

nice

12 Oct 2010 amer aswadi

thank you Mr.won yang for this helpful information, its really help me to understand
thank you again

12 Oct 2010 Won Yang

Hi Mr. Mohammed Usman, combnk is a Statistic toolbox function. It can be replaced with nchoosek().

12 Oct 2010 Won Yang

Hi Mr. Amer Aswadi, the BER of DPSK is 3dB worse along the SNR axis than that of PSK because the difference between successively received symbols contains doubled noise power compared with the noise power of each symbol, as every communication book says.

12 Oct 2010 amer aswadi

Mr. Won Yang
can ask you why the BER rate in DBPSK system is higher then BPSK system? is it because the data in DBPSK is encoded before the modulation and decoded before demodulated?

12 Oct 2010 Mohammed Usman

The file for the combnk function (which is called from the combis function) seems to be missing. Could you please provide this file/function. Thanks

08 Oct 2010 Won Yang

Why do we use complex quantities? (Good question) I think they are useful because the complex (real & imaginary) quantity makes the expression and calculation involving cos(wc*t) and sin(wc*t) simple and easy, as illustrated by the phasor repesentation of AC voltage/current. I wonder how other people think about and would answer your question.

06 Oct 2010 amer aswadi

thank you Mr.won yang about this information, in these days difficult to find some one answer you or help you to understand
I know I begins to bother you but believe me i ask a lot of people but they just keep quite or Gives answers are not convincing.
so could you please answer this question.
can you explain why we use the imaginary and real in mathematical and simulation but not in practical life ? and the imaginary part whats use for?
thank you
my regard

06 Oct 2010 Won Yang

I am happy that my book or program has made me a cell phone through which I can discuss these academic stuffs with a complete stranger like you. Besides, I am more happy that you seem to be full of academic curiosity. However, I am afraid that I am not so capable of giving you a good answer. You know there is no imaginary numbers involved in a BPSK system. Most probably, your question is about the QPSK or QAM. As far as I know, every physical signal is not imaginary but real. It is for our convenience of mathmatical derivation, expression, or simulation that the real-valued signals are expressed as complex numbers where the real and imaginary numbers stand for real-valued signals transmitted in cos(wc*t) and sin(wc*t), respectively. I hope that my answer will be of a help to satisfy your academic curiosity.

04 Oct 2010 amer aswadi

Mr.won yang
thanks for the replay, i know now the answer for my last question.
i have this question and really confuse me
why we use real and imaginer channels in the BPSK system. we just use one of them real or imagine.
it will be less expensive and easy to implement?
thank you
my regard

26 Sep 2010 Won Yang

I would like you to email me your question more specifically. I could not understand what the problem is.

24 Sep 2010 amer aswadi

thanks for replay i have just one question
in the books (Theoretical) they write
they using to design DPSK system XNOR (Theoretical) to encode the signal but when i design the system I used it XOR and the result its good but when I used it XNOR as the books the out out not correct?
i hope you can answer me because its confuse me
thanks agin

24 Sep 2010 Won Yang

Carrier frequency? Bit Time interval Tb? I think they are often given as design specifications. As far as the programs "sim_PSK_pasband.m" and "sim_DPSK_passband.m" are concerned, you can change Tb as you like, say, Tb=1e-8 corresponding 100Mbits/sec. Then other parameters including the carrier frequency will change correspondingly so that the simulation can be performed properly. You know that my primary objective to achieve through the programs I composed is just to show the working principle of each communication system and therefore, it may be far from designing communication systems.

23 Sep 2010 amer aswadi

sorry for disturb iam designing DPSK and QPSK system my question is how i calculate the sample time for the source and the carer?
my second question is how i calculate the frequency for the carer?
thanks

17 Sep 2010 Won Yang

No problem! Your complimentary remark is more meaningful to me since I think it is marvelous and valuable that some people are studying hard in the battle fields like your country. May Allah bless you and your people!

16 Sep 2010 Noor Almansoor

I am very sorry because I put my comment on tags field .
I'm from Iraq and just want to thank you so much for this file.

13 Sep 2010 Won Yang

The full set of PPT slides are presented only to those who have bought the book "MATLAB/Simulink for Digital Communication" (from ccy110) and upload a fair review about the book on Amazon.

13 Sep 2010 Lai

Very nice material! Very helpful for digital communication coding. Thank you very much!
Can I share the ppt?
laixu@unm.edu

24 Aug 2010 Cheng  
12 Aug 2010 Eric  
15 Jul 2010 zheng zhilong

Thank you very much

02 Jul 2010 Won Yang

I can't find your name in the list of my customers. All my customers must know other means like email than indirect communication through tihis MATLAB file exchange site. Anyway, I do not present the Simulink model files to my readers unless they are instructors who adopted my book as the text for their teaching since almost all the Simulink block diagrams in my book contain the parameters to be set and they are supposed to be composed by the readers as homework assignments. You know that most of my target buyers are students. If you are a professional who bought my book, I would give you a Simulink model you choose.

01 Jul 2010 Tapas Shome

I have bought Two copies of your book for the Digital communication Research I am doing at Univ of Manitoba and IAS-Research.
I am working on the OFDM Model and Would appreciate the simulink models.
It was only for the simulink model of OFDM that I bought the book from Amazon.

01 Jul 2010 Won Yang

As I told several times above, the slides and programs are only the baits to fish the potential book buyers with. Even if you had bought the book "MATLAB / Simulink for Digital Communication" on Amazon, I would present you with the Simulink model files only in the case where you are an instructor who has adopted my book as the text for your teaching. Thanks for being interested in my book. BTW, how do you know that my book contains the model file 'do_OFDM0_sim.mdl'?

30 Jun 2010 Tapas Shome

I am unable to find OFDM Simulink File
do-OFDM0-sim.mdl files as mentioned in Chapter 11.
In fact I am unable to find any MDL files.
Please help.

12 Jun 2010 Won Yang

As I told above, the slides and programs are only the baits to fish the potential book buyers with. Even if you had bought the book "MATLAB / Simulink for Digital Communication" on Amazon, it is not easy for me to help you since I am tied up with authoring another book "MATLAB/Simulink for Digital Signal Procesing". However, in case you buy the book and send me the paper you mentioned above, I will take a glance at it to see what I can do. In any case, I do not guarantee I can help you. It is your job to modify the programs in the book in such a way they can accomodate your problems.

12 Jun 2010 Mohammad Al-Jarrah

Thanx Mr. Yang; i think that the book and matlab codes are very important for the communication engineering students; graduate and under graduate. and they are very useful.

i want to ask you if i want to obtain the results made by Vahid Tarokh and Hamid Jafarkhani in their paper "A Differential Detection Scheme for Transmit Diversity", what are things can be changed in your code?

12 Jun 2010 Won Yang

test_DSTBC_H4_PSK.m is supposed to be completed by the students as for a end-of-chapter Problem 9.10. You have only to replace the question marks by some numbers based on the corresponding equations given in problem 9.10. Thanks for being interested in my book. How would you rate this set of MATLAB codes?

11 Jun 2010 Mohammad Al-Jarrah

Dear Mr. Yang, when I run the file test_DSTBC_H4_PSK.m, Matlab gives me an error message :

??? Error: File: test_DSTBC_H4_PSK.m Line: 28 Column: 18
Unbalanced or unexpected parenthesis or bracket.

please if you can help me about this error.

Also i want the figures of differential STBC made by Vahid Tarokh and Hamid Jafarkhani, can the code modified so that i can get these figures.

11 Jun 2010 James Gabriel

oh,I am so sorry,please forgive me.
Your set of codes are great.
I really highly appreciate your contribution to the community.
One more time,great thanks to you.

10 Jun 2010 Won Yang

It is strange. I run the program with puncture=1 two times, once with EbN0dBs=2.6 and once with EbN0dBs=10 to get the following results, which seems fine since the BER has turned to decrease as the SNR increases. By the way, have you bought the book? If so, you must have got my email address. It seems that you have never rate this set of codes.

>> turbo_code_demo
----------------------------------------------------
=== SOVA decoder ===
with Code generator G:
1 1 1
1 0 1
Punctured, Code rate = 1/2
Eb/N0[dB] = 2.5000
************** Eb/N0 = 2.50 dB **************
Bit Error Rate (from iteration 1 to iteration 4):
Frame # 50: 1.4409e-002 1.7234e-003 4.0080e-004 2.8056e-004
Frame # 100: 1.4058e-002 1.4930e-003 3.5070e-004 1.5030e-004
Frame # 150: 1.2939e-002 1.1890e-003 2.7388e-004 1.3360e-004
Frame # 200: 1.2485e-002 1.1974e-003 2.3046e-004 1.1523e-004
Frame # 250: 1.2437e-002 1.2986e-003 2.9659e-004 1.3627e-004
Frame # 300: 1.2391e-002 1.2325e-003 2.8724e-004 1.4362e-004

>> turbo_code_demo
----------------------------------------------------
=== SOVA decoder ===
with Code generator G:
1 1 1
1 0 1
Punctured, Code rate = 1/2
Eb/N0[dB] = 10
************** Eb/N0 = 10.00 dB **************
Bit Error Rate (from iteration 1 to iteration 4):
Frame # 50: 0.0000e+000 0.0000e+000 0.0000e+000 0.0000e+000
Frame # 100: 0.0000e+000 0.0000e+000 0.0000e+000 0.0000e+000
Frame # 150: 0.0000e+000 0.0000e+000 0.0000e+000 0.0000e+000
Frame # 200: 0.0000e+000 0.0000e+000 0.0000e+000 0.0000e+000
Frame # 250: 0.0000e+000 0.0000e+000 0.0000e+000 0.0000e+000
Frame # 300: 0.0000e+000 0.0000e+000 0.0000e+000 0.0000e+000

10 Jun 2010 James Gabriel

Dear Won Yang,
I have run the file turbo_code_demo.m,and it seems to be not right when choose PUNCTURE (puncture=1),i have run from low EbNo to high EbNo like 25 30dB,but it didnot work,Ber always very high,bigger than 0.1.
But without puncture(puncture=0) it works very well(ber=10^-5 round EbNo= 3 or 4 dB)
Could u please check and find the mistake in this code?
Many thanks

02 Jun 2010 Won Yang

The slides and programs are the baits to fish the potential book buyers with. You can buy the book "MATLAB / Simulink for Digital Communication" at
http://www.amazon.com/gp/product/8957612769/ref=s9_simh_gw_p14_i1?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-2&pf_rd_r=1E0T2J3H87KWSSPM2HF4&pf_rd_t=101&pf_rd_p=470938631&pf_rd_i=507846

02 Jun 2010 whisnu

Dear Won Yang,
Now I'm doing thesis about WCDMA system using Zero Forcing Equalizer for the Multi-user Detection, so maybe the chapter 6 of your books wold be very useful for me.
Would you kindly share the chapter 6 of your book please.
Many thanks for your kindness.

01 Jun 2010 William Cox

There's a whole bunch of stuff here, but the files are cryptic and very poorly commented. It's pretty useless without the textbook, which I hope explains things a bit.

26 May 2010 Examples Learn By

It's very good material
http://learnbyexamples.org/matlab/matlab-tutorial-index.html

16 May 2010 James Gabriel

Dear Won Yang.
I am studying about CODING in MIMO system.
Have you finished any matlab code about turbo code with 2 transmit antenna and 2 receive antenna?
It doesn't need the diversity,just replace turbo code on lconvolution code as usual.
Many thanks.

09 May 2010 James Gabriel

Thank you very much

09 May 2010 Won Yang

Sorry that 'bin2deci.m is missing, too.
function y=bin2deci(x,b)
%converts a sequence of b-bit binary numbers into a sequence of decimal numbers
if nargin<2, b=length(x); end
y= [];
while length(x)>=b
x1= x(1:b); x=x(b+1:end);
y=[y x1*2.^[b-1:-1:0]'];
end

09 May 2010 James Gabriel

Could you please check,the file bin2deci.m is missing?
It is used in file trellis.m
Thanks

29 Apr 2010 Won Yang

probably due to the missing of one M-file with the following contents:
function y=deci2bin1(x,l)
%converts a given decimal number into a binary number of l bits
if x==0, y=0;
else
y=[];
while x>=1
y=[rem(x,2) y];
x=floor(x/2);
end
end
if nargin>1, y=[zeros(size(x,1),l-size(y,2)) y]; end

29 Apr 2010 Yang Yang

Hello!
I can not run turbo_code_demo.m
Could you help me?
Many thanks

24 Apr 2010 viet nguyen

hi ! Im a student and my graduation project is imroving the detector (depressing noise )due to the characteristics of bispectrum, use the hosa toolbox. So if you can, share me chapter 7. I try this model with FSK modulation.thanks a lot!

24 Apr 2010 viet nguyen

hi ! Im a student and my graduation project is imroving the detector (depressing noise )due to the characteristics of bispectrum, use the hosa toolbox. So if you can, share me chapter 7. I try this model with FSK modulation.thanks a lot!

17 Apr 2010 Won Yang

If you buy the book from the seller with ID ccy110 at Amazon, you will be entitled to get some PPT slides. Additionally, if you upload a fair review about my book, I will send you the slides for up to Chapter 10. I confess that the slides are actually baits to fish the potential book buyers. Thanks for being interested in my book.

16 Apr 2010 rima assaf

could you please share chapter 4

11 Apr 2010 minh kha huynh

Thank you very much !
Can you share for me that Book ?
my email: minhkha_vt@yahoo.com

02 Apr 2010 Guillaume Ferre

Excellent job, the different topics are very well written and explained

30 Mar 2010 Montadar Taher

veeery good thank you very much

20 Mar 2010 Lancez  
22 Feb 2010 Won Yang

The value of this material will be exploded with the corresponding PPT slide (like #26384).

30 Jan 2010 Ustun Ozgur

Epic bookname fail.

22 Oct 2009 haider mehraj  
15 Oct 2009 Erdal Bizkevelci  

Contact us