File Exchange

## MATLAB for Digital Communication

version 1.0 (147 KB) by

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

4.62745
57 Ratings

Updated

Editor's Note: Popular File 2010

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.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.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

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

NUI NGUYEN

### NUI NGUYEN (view profile)

Dear Mr.Won Yang

I'm a student . I'm learning channel estimation ( Least Square and Direct-decision )
But i don't know about code it . .
Please share code of it to me .

Thank you so much

Zaheer Ahmed Dayo

### Zaheer Ahmed Dayo (view profile)

Hello Sir, i have need of this book title MATLAB for Digital Communication. can you please send it to me on my email address. zaheer.dayo@nuaa.edu,cn.
many thanks.

Chandan Jha

### Chandan Jha (view profile)

Dear sir,
Thank you for such a helpful repository.
I was going through your code do_dfe.m .
1. Is this DFE implementation based on LMS ?
2. By default, the c (FFE coefficients) are initialized to all zeros. When I check the final c values, I always find the cursor to be on tap 3. Why is that so ?
3. And even if I initialize the c to [0 0 0 0 1], still I find the cursor on tap 3.

sai nikhil meda

Christos Vrettos

### Christos Vrettos (view profile)

Thank you for sharing Mr Won Yang

Jim

### Jim (view profile)

Thanks for all the fish!

The sim_FSK_bandpass_noncoherent.m script crashes, but it is a simple fix.

On line 28, put the "for n=1:Ns" portion at the end of the statement on a new line below.

Thanks - Great Stuff!

Jim

### Jim (view profile)

Thanks for all the fish.

miyagi

Cheng

Thanks!

Xinhai Wang

### Xinhai Wang (view profile)

Dear Won Yang
I am studying the code files sim_MSK.m. Could you give me an example about sim_MSK. Let it help me solve the '?'problem. Thank you.
(Email: xwang_nuaa@sina.com )

Xinhai Wang

### Xinhai Wang (view profile)

Thank you, Sir. I've got it.

Won Yang

### Won Yang (view profile)

Dear Xinhai Wang,
The part consisting of ?'s should be completed by replacing it with the same number of numbers/characters constituting some variable or function name so that the code can be run to yield a meaningful result. I assign the incomplete MATLAB codes to my students as homeworks. That is why I don't open the solutions. I believe you will be able to complete them and then get happy from the feeling of achievements.

Xinhai Wang

### Xinhai Wang (view profile)

Dear Won Yang
The Matlab codes are helpful for me. When I studied the code files sim_OQPSK.m and sim_MSK.m, there were some '?' in the file which made the matlab running wrong. Could you help me correct them. I'll really appreciate your help.

Xinhai Wang

### Xinhai Wang (view profile)

HELLO WON YANG.
I also want to know if its possible to create a single GUI for all these schemes.

imran

### imran (view profile)

Is this book available online? If you have pdf file can you please send me if possible.

MASBAH EAME

### MASBAH EAME (view profile)

Could you send the book please? I need it extremelly urgent. My e-mail is gerara87@gmail.com

Diego Mejia

### Diego Mejia (view profile)

Dear Wong Yang,

Could you send the book please? I need it extremelly urgent. My e-mail is diego.po@icloud.com

Diego.

Diego Mejia

### Diego Mejia (view profile)

Dear Wong Yang,

Could you send the book please? I need it extremelly urgent.

Diego.

Yongheng Wang

pattabi andra

Megha

### Megha (view profile)

Dear Wong Yang sir,

plz help me with the differential chaos shift keying performance analysis code.

Won Yang

### Won Yang (view profile)

Hi Minalee,
If you did not modify the function dfe(), such an error would not have happened, because the function generates the two output arguments c and b in a very simple way.

Minalee

### Minalee (view profile)

Hello Sir,
I simulated your code do_dfe.m and it showed the following error

Too many output arguments.

Error in decision (line 28)
[c,b]=dfe(c,b,ys,ds,e,delta); % DFE
Kindly help me out.

Won Yang

### Won Yang (view profile)

You can use the MATLAB built-in function berawgn() or use the following function prob_error():

function p=prob_error(SNRbdB,signaling,b,opt1,opt2)
% Finds the symbol/bit error probability for given SNRbdB=Eb/(N0/2)[dB](Table 7.1)
% Note that EbN0dB=SNRbdB-3.
% Copyleft: Won Y. Yang, wyyang53@hanmail.net, CAU for academic use only
if nargin<5, opt2 = 'coherent'; end % opt2='coherent' or 'noncoherent'
if nargin<4, opt1 = 'BER'; end % opt1='SER' or 'BER'
M=2^b; SNRb=10.^(SNRbdB/10); NSNR=length(SNRbdB);
for i=1:NSNR
p(i) = 2*(M-1)/M*Q(sqrt(3*b*SNRb(i)/(M^2-1))); % Eq. (7.1.5)
end
if lower(opt1(1))=='b', p = p/b; end
if b==1
for i=1:NSNR, p(i)=exp(-SNRb(i)/4)/2; end %Eq.(7.1.22)
end
end
elseif signaling(1:3)=='FSK'
tmp=M/2/(M-1);
f5251_=inline('Q(-sqrt(2)*x-sqrt(b*SNRb)).^(2^b-1)','x','SNRb','b');
%f7208=inline('Q(-sqrt(2)*x-sqrt(b*SNRb)).^(2^b-1).*exp(-x.^2)','x','SNRb','b');
if lower(opt2(1))=='c' % FSK coherent
if b==1
for i=1:NSNR, p(i)=Q(sqrt(SNRb(i)/2)); end %Eq.(7.2.9)
else
Tol=1e-8; % tolerance used for 'quad' integration
for i=1:NSNR
p(i) = 1-Gauss_Hermite(f5251_,10,SNRb(i),b)/sqrt(pi);
end
end
else % FSK noncoherent
for i=1:NSNR
p(i)=(M-1)/2*exp(-b*SNRb(i)/4);
tmp1=M-1;
for m=2:M-1
tmp1=-tmp1*(M-m)/m;
p(i)=p(i)+tmp1/(m+1)*exp(-m*b*SNRb(i)/2/(m+1)); % Eq.(7.2.19)
end
end
end
if lower(opt1(1))=='b'&b>1, p = p*tmp; end
elseif signaling(1:3)=='PSK'
for i=1:NSNR, p(i)=(1+(b>1))*Q(sqrt(b*SNRb(i))*sin(pi/M)); end %Eq.(7.3.7)
if lower(opt1(1))=='b'&b>1, p = p/b; end
elseif signaling(1:3)=='DPS' %DPSK
if b==1
for i=1:NSNR,
p(i)=exp(-SNRb(i)/2)/2; %Eq.(7.4.9)
%p1(i)=Q(sqrt(b*SNRb(i)/2)*sin(pi/M));
%p2(i)=2*Q(sqrt(2*b*SNRb(i))*sin(pi/sqrt(2)/M));
end
%discrepancy=norm(p-p1)/norm(p), norm(p-p2)/norm(p)
else
%for i=1:NSNR, p(i)=2*Q(sqrt(b*SNRb(i))*sin(pi/sqrt(2)/M)); end %Eq.(7.4.6)
%for i=1:NSNR, p(i)=2*Q(sqrt(b*SNRb(i))*sin(pi/M)); end
%for i=1:NSNR, p(i)=2*Q(sqrt(2*b*SNRb(i))*sin(pi/sqrt(2)/M)); end
for i=1:NSNR, p(i)=2*Q(sqrt(b*SNRb(i)/2)*sin(pi/M)); end
if lower(opt1(1))=='b', p = p/b; end
end
elseif signaling(1:3)=='QAM'
L = 2^(ceil(b/2)); N = M/L;
for i=1:NSNR
tmpL = 1-2*(L-1)/L*Q(sqrt(3*b/2/(L^2-1)*SNRb(i)));
tmpN = 1-2*(N-1)/N*Q(sqrt(3*b/2/(N^2-1)*SNRb(i)));
p(i) = 1-tmpL*tmpN; %Eq.(7.5.6)
end
if lower(opt1(1))=='b'&b>1, p = p/b; end
end
%function y = f5252_(x,SNRb,b)
%y=Q(-sqrt(2)*x-sqrt(b*SNRb)).^(2^b-1);
%function y =f7208(x,SNRb,b)
%y=Q(-sqrt(2)*x-sqrt(b*SNRb)).^(2^b-1).*exp(-x.^2); %Eq.(7.2.8)

Riyaz Shaik

### Riyaz Shaik (view profile)

hi sir
i simulated the your code "do_ofdm.m" it shows following error
"Undefined function or variable 'prob_error'.

Error in ofdmryz (line 21)
prob_error(SNRbdB,'QAM',b,'BER')
how to rectify that for correct execution

Riyaz Shaik

### Riyaz Shaik (view profile)

respected sir
please send me the matlab code for ber comparision(improvement )curves for 16-qam,64-qam,and 128-qam respectively with variations to ofdm parameters
for my project purpose

Riyaz Shaik

### Riyaz Shaik (view profile)

respected sir
please send me the matlab code for ber comparision(improvement )curves for 16-qam,64-qam,and 128-qam respectively
for my project purpose

Hello Sir,
I'm in search of Multi-Carrier SSB Transceiver using Phasing Method and Synchronous Detection. Can You Please send me the Matlab Code of it?

### Khair Mohammad Aimaq (view profile)

Good day Sir,

I need your help to understand implementation of Channel Coding in matlab, such as;

1. To load the source binary data then add channel coding block, and use (7,4) block coding after PCM block.
2. Then to decode the binary sequence and recover the quantization levels, to compare with yq at the
transmit side, having exact the same sequences.

3. If I assume the bit error rate of the channel 0.1. then I need to simulate the error probability by exploiting
the error correction capability of channel coding.

Since I don't have much experience in programming I will really appreciate your help to do the coding for this scenario.
Thanks

shahid ullah

### shahid ullah (view profile)

plz send Matlab code of Qpsk 2*2 MIMO system with no channel coding using MMSE receiver and hard detection(Relegh channel).........used bit error rate to show performance

brian herman

### brian herman (view profile)

How do I input (178angle0/53.852angle21.8) in matlab

electrokidz

### electrokidz (view profile)

good day sir,..

can you please share any information regarding OFDM/OQAM blind estimation techniques of symbol timing and cfo..

Wissem Cheheb

### Wissem Cheheb (view profile)

Sir thanks alot for this great effort.
Can I ask you for help, I need matlab codes for a CPM(continuous phase modulation) transmitter in a AWGN channel, and a decoder for CPM with Viterbi Algorithm
thanks alot

Won Yang

### Won Yang (view profile)

function [D,x,d_bp,d_pc]=Duobinary_EncDec(d)
% Precoded Duobinary coder and decoder
% d = Binary data sequence : precoder input
% c = duobinary coder output
% b_r = duobinary decoder output
N = length(d);
d_pc(1) = 0; % Initialized
for n=2:N
d_pc(n) = mod(-d_pc(n-1)+d(n),2); % Precoding by Eq.(6.1.21)
end
d_bp = 2*d_pc - 1; % Bipolarization
for n=2:N
x(n) = d_bp(n-1)+d_bp(n); % Duobinary coding by Eq.(6.1.23)
end
% Make a received signal with one error at a random position
r = x; ne = randi([3 N]);
if x(ne)==0, r(ne)=2; else r(ne)=0; end
% Duobinary decoder output
D = mod(round(r/2)+1,2); % Duobinary decoding by Eq.(6.1.25)
[d(2:end); D(2:end)] % Transmitted binary sequence and the decoding result at receiver
% Usage
%b=[1 1 1 0 0 1 0 1 0 0 0];
%D=Duobinary_EncDec(b);

Virupaksha

### Virupaksha (view profile)

I want Matlab code for Duobinary Encoding and Decoding?

or atleast modify this code. Please sir its urgent

CODE:
function [c,b_r]=Duobinary_EncDec(b)
% Precoded Duobinary coder and decoder
% b = input binary sequence:precoder input
% c = duobinary coder output
%b_r = duobinary decoder output
a(1) = xor(1,b(1));
if(a(1)==1)
a_volts(1) = 1;
end
for k =2:length(b)
a(k) = xor(a(k-1),b(k));
if(a(k)==1)
a_volts(k)=1;
else
a_volts(k)=-1;
end
end
a = a';
a_volts = a_volts';
disp(a,'Precoder output in binary form:')
disp(a_volts,'Precoder output in volts:')
% Duobinary coder output in volts
c(1) = 1+ a_volts(1);
for k =2:length(a)
c(k) = a_volts(k-1)+a_volts(k);
end
c = c';
disp(c,'Duobinary coder output in volts:')
% Duobinary decoder output by applying decision rule
for k =1:length(c)
if(abs(c(k))>1)
b_r(k) = 0;
else
b_r(k) = 1;
end
end
b_r = b_r';
disp(b_r,'Recovered original sequence at detector oupupt:')
endfunction

Won Yang

### Won Yang (view profile)

I can't see any relation between DP-16QAM and Kalman filter.

Roman

### Roman (view profile)

It's great manual. I have a question how we can apply phase estimation by DP-16QAM. for example with using Kalman filter?

Won Yang

### Won Yang (view profile)

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

Antoun Ghobrial

Chris Frailey

### Chris Frailey (view profile)

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

zou

Parag

### Parag (view profile)

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

hachemi

### hachemi (view profile)

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

Won Yang

### Won Yang (view profile)

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.

Shi

### Shi (view profile)

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.

Dragos

### Dragos (view profile)

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

Sidra Nawaz

### Sidra Nawaz (view profile)

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
%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];

nabeel

### nabeel (view profile)

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

marriam nayyer

marriam nayyer

marriam nayyer

Roshitha Pinto

### Roshitha Pinto (view profile)

please send matlab code for QPSK BER with OFDM modulation

Chengyan

### Chengyan (view profile)

thank you very much!

gatewick

### gatewick (view profile)

very detailed stuff, many thanks

Veenesh M.U.

### Veenesh M.U. (view profile)

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

Oleg Rasulov

Heyyo

### Heyyo (view profile)

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.

Bin

### Bin (view profile)

Fantastic works! Thank you very much!

Won Yang

### Won Yang (view profile)

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

Yang

### Yang (view profile)

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.

harsh

### harsh (view profile)

this is an fantastic work.

Won Yang

### Won Yang (view profile)

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

harsh

### harsh (view profile)

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

entisar salem

### entisar salem (view profile)

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

pravin Barmashe

### pravin Barmashe (view profile)

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

Won Yang

### Won Yang (view profile)

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.

Asuman

### Asuman (view profile)

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.

moonman

### moonman (view profile)

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

Roi

### Roi (view profile)

the files are not updated , and has allot of errors

zouhair

### zouhair (view profile)

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

Won Yang

### Won Yang (view profile)

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.

zouhair

### zouhair (view profile)

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)"

Won Yang

### Won Yang (view profile)

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

zouhair

### zouhair (view profile)

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

zouhair

### zouhair (view profile)

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

Won Yang

### Won Yang (view profile)

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(....)

zouhair

### zouhair (view profile)

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.

Eun-Ki Kim

### Eun-Ki Kim (view profile)

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

Won Yang

### Won Yang (view profile)

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.

Luís Miguel

### Luís Miguel (view profile)

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

Babu

### Babu (view profile)

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

Won Yang

Babu

### Babu (view profile)

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

Won Yang

### Won Yang (view profile)

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.

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 ?

Won Yang

### Won Yang (view profile)

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

Hali

### Hali (view profile)

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

Won Yang

### Won Yang (view profile)

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

Won Yang

### Won Yang (view profile)

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

Rupinder Singh

### Rupinder Singh (view profile)

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

Won Yang

### Won Yang (view profile)

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.

Luís Miguel

### Luís Miguel (view profile)

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.

Won Yang

### Won Yang (view profile)

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".

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.

herz101 gafai

herz101 gafai

### herz101 gafai (view profile)

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

Won Yang

### Won Yang (view profile)

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!

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.

Won Yang

### Won Yang (view profile)

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.

Maxwell Mishio

### Maxwell Mishio (view profile)

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

Won Yang

### Won Yang (view profile)

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.

Sravani

### Sravani (view profile)

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?

Won Yang

### Won Yang (view profile)

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

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 ;)

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

Won Yang

### Won Yang (view profile)

%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')

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

Zain

### Zain (view profile)

nice

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

Won Yang

### Won Yang (view profile)

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

Won Yang

### Won Yang (view profile)

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.

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?

Mohammed Usman

### Mohammed Usman (view profile)

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

Won Yang

### Won Yang (view profile)

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.

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.
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

Won Yang

### Won Yang (view profile)

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.

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

Won Yang

### Won Yang (view profile)

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

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

Won Yang

### Won Yang (view profile)

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.

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

Won Yang

### Won Yang (view profile)

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!

Noor Almansoor

### Noor Almansoor (view profile)

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.

Won Yang

### Won Yang (view profile)

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.

Lai

### Lai (view profile)

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

Cheng

Eric

zheng zhilong

### zheng zhilong (view profile)

Thank you very much

Won Yang

### Won Yang (view profile)

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.

Tapas Shome

### Tapas Shome (view profile)

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.

Won Yang

### Won Yang (view profile)

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'?

Tapas Shome

### Tapas Shome (view profile)

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.

Won Yang

### Won Yang (view profile)

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?

Won Yang

### Won Yang (view profile)

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?

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.

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.

James Gabriel

### James Gabriel (view profile)

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.

Won Yang

### Won Yang (view profile)

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

James Gabriel

### James Gabriel (view profile)

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

Won Yang

### Won Yang (view profile)

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

whisnu

### whisnu (view profile)

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.

William Cox

### William Cox (view profile)

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.

Examples Learn By

James Gabriel

### James Gabriel (view profile)

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.

James Gabriel

### James Gabriel (view profile)

Thank you very much

Won Yang

### Won Yang (view profile)

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

James Gabriel

### James Gabriel (view profile)

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

Won Yang

### Won Yang (view profile)

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

Yang Yang

### Yang Yang (view profile)

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

viet nguyen

### viet nguyen (view profile)

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!

viet nguyen

### viet nguyen (view profile)

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!

Won Yang

### Won Yang (view profile)

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.

rima assaf

### rima assaf (view profile)

could you please share chapter 4

minh kha huynh

### minh kha huynh (view profile)

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

Guillaume Ferre

### Guillaume Ferre (view profile)

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

### Montadar Abas Taher (view profile)

veeery good thank you very much

Lancez

Won Yang

### Won Yang (view profile)

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

Ustun Ozgur

### Ustun Ozgur (view profile)

Epic bookname fail.

haider mehraj

Erdal Bizkevelci

### Erdal Bizkevelci (view profile)

##### MATLAB Release
MATLAB 7.4 (R2007a)