File Exchange

## MATLAB for Digital Communication

version 1.0.0.0 (147 KB) by
The MATLAB programs in "MATLAB/Simulink for Digital Communication" authored by Won Y. Yang et. al

179 Downloads

Updated 11 Sep 2009

View License

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

### Cite As

Won Yang (2021). MATLAB for Digital Communication (https://www.mathworks.com/matlabcentral/fileexchange/25293-matlab-for-digital-communication), MATLAB Central File Exchange. Retrieved .

### Comments and Ratings (199)

Dear Mr.Won Yang

I'm a student . I'm learning blast-wave model with the Boltzmann-Gibbs statistics time But i don't know about code it .

Howard Labido

Just wondering, can I use it on common objects like used plastic bottles?
I have a waste treatment project where early detection and removal of certain waste is needed.
https://www.wiscon-tech.com/system-solution/

Lucy zeng

yasi jafarian

Dear Mr.Won Yang

I'm a student . I'm learning average syncronization time in spread spectrum
But i don't know about code it . Could you please share code of it to me .
this is my mail f.jafarian71@gmail.com
Thank you so much

Won Yang

My books are available via PayPal (by starting with an email to @wyyang53@hanmail.net) or on the Amazon.
Refer to https://wyyang53.wixsite.com/mysite

Hola soy estudiante de Ingeniería de Computación y llevo actualmente la materia de modulación digital. agradecería si me pudiera enviar el capitulo 3.
mi correo es : laguileram1200@alumno.ipn.mx

Hasan Dwi Cahyono

Seeing the previous comments, hard not to put 5 stars. I'll happily select 10 stars if this site has it.

Sai Prasanna

Dear Mr.Won Yang

I'm a student . I'm learning channel estimation ( Decision-Directed and DFT-based Interpolation)
But i don't know about code it . Could you please share code of it to me .
this is my mail mpavani140@gmail.com
Thank you so much

Satheesh Thallapally

Dear Won Yang,
I am a student, could you please help me with the code in order to avoid long sequences of the same level by adding redundancy bits in I&Q for 16qam.
Thanks in advance

sarah tariq

hi i need help in completing my assignment regarding digital communication can any one help me out ?

Abdelwahab Afifi

@nike zhang
please send me the code if you get it
abdelwahab.fawzy@yahoo.com

nike zhang

Dear Mr.Won Yang
I'm a student . I'm learning channel estimation using LS and equalization using DFE
But i don't know about code it . .
Please share code of it to me .
this is my mail zhangyikun@bit.edu.cn
Thank you so much

panteha eftekhar

Hello sir,
I need chapter 5 baseband digital transmission, I am a student, I bought this book now from Amazon, but it will deliver to me on April 3rd, I have to hand in my project on April 4th, I really appreciate it if you send me chapter 5, my email address is panteha100@gmail.com
Thank you very much

nishika

Hello sir,
please tell me in turbo coding code where demodulation is done because i want to do qam demodulation instead of bpsk.

Rajendra Yelalwar

Hello Sir, i have need of this book title MATLAB for Digital Communication. can you please send it to me on my email address. ryelalwar@rediffmail.com.
it will be a great help sir, please....
many thanks.

Nea R

zlong shen

HaeC Kwon

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 .
this is my mail khanm1406@gmail.com
Thank you so much

GHARBI HAFSA

salem
i need a code of chaotic modulation

for my projject
this is my mail hafsatelecom@yahoo.fr
thanks
you are my last hope sir

GHARBI HAFSA

sir
this is my mail
hafsatelecom@yahoo.fr
i need chaotic modulation code to complete my work
i am late
help me please

Won Yang

Hi Juveria Fatima,

Usage of huffman_code:
Huffman_code([0.1 0.2 0.3 0.4])
Like this, it should be used with an input argument, which is supposed to be a vector p whose entry is the probability of each symbol and the sum of the probabilities should be unity.

juveria fatima

hello sir,
a very good day to you
am trying to run huffman code its showing error as
>> huffman_code
Not enough input arguments.

Error in huffman_code (line 8)
if abs(sum(p)-1)>1e-6

>> pls help me to resolve the error

z m

Hello Sir,
I am student and I trying to do the turbo decode for Log_MAP algorithm ( logmap ). Your file simulation gives me the following error: " Assignment has more non-singleton rhs dimensions than non-singleton subscripts" at the line of
" gam(ps(s2,1),s2,k) = Lyk.*[-1 pout(s2,2)].' + Le1(k-1); "
Please help me.
Thank you.

Won Yang

The following books are available directly from me via PayPal:

1. Applied Numerical Methods Using MATLAB, Wiley, 2005 (very clean used book) +\$95.00
2. Circuit System with MATLAB and PSpice, Hongrung, 2012 +\$80.00
3. MATLAB and PSpice for Electronic Circuits, Hongrung, 2012 +\$60.00
4. MATLAB/Simulink for Digital Communication (Black/White-printed), Hongrung, 2013 +\$80.00
5. MATLAB/Simulink for Digital Signal Processing, Hongrung (Color-printed), 2012 +\$90.00
6. Signals and Systems with MATLAB, Springer, 2009 +\$85.

Maggie Wu

If one uses "convenc" function, the first parameter should be a vector.
in do_OFDM1.m
else [coded_msg,state] = convenc(msg,trel,state);
msg in this m file is a matrix.
Therefore, there is an error while I run this code.
Could you please tell me how to solve this problem?

Thank you very much.

Javier Pérez

Dear Mr. Won Yang,

I am a student at Hanyang University and I have an assignment where severeal of these topics need to be coded and explained. I would highly appreciate if you could provide me with the book. My e-mail address is: 4bjape@gmail.com

Yours sincerely,

Javier Pérez

yuanfang Huang

hello,how can i get this book?can you send it to my email:huangyuanfang15@mails.ucas.ac.cn

Dmitriy Kostyuk

jing zhang

aneeqa ramzan

Hello Sir,
I am doing research on LDPC coded OFDM system, Is it possible for you to send MATLAB code of BER on AWGN channel for some # of iterations: (258,126) LDPC, R=1/2 Turbo code
reference paper: http://ieeexplore.ieee.org/document/956560/
i am trying to implement this paper and your help is needed

Be Asmaa

Dear Mr Won Yang,
Good morning Sir,
please ,I need this book ("MATLAB/Simulink for Digital Communication" ).
My e-mail adress : asmaa_benieddi@yahoo.com
Regards

NUI NGUYEN

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

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

Dear sir,
Thank you for such a helpful repository.
I was going through your code do_dfe.m .
Can you please help me to clarify following things :
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.

Can you please help me to understand the underlying principle.

sai nikhil meda

Christos Vrettos

Thank you for sharing Mr Won Yang

AbdulRahaman Nada

AbdulRahaman Nada

Jim

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

Thanks for all the fish.

miyagi

how to download the file?

Cheng

How do I download the file?
Thanks!

Xinhai Wang

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

Thank you, Sir. I've got it.

Won Yang

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

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

HELLO WON YANG.
PLEASE I NEED MATLAB CODE FOR ASK, OOK, FSK AND QAM.
I also want to know if its possible to create a single GUI for all these schemes.
email babyadjokatse1@gmail.com

Imran Kanjoo

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

MASBAH EAME

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

Diego Mejia

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

Dear Wong Yang,

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

Diego.

Yongheng Wang

pattabi andra

please send me sir .matlab for digital communication text book . please sir please............

Megha

Dear Wong Yang sir,

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

Won Yang

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

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

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);
if signaling(1:3)=='ASK' % ASK (PAM)
if lower(opt2(1))=='c' % ASK coherent
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
else % ASK noncoherent
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);
%p(i) = 1-adapt_smpsn('f7208',-20,20,Tol,SNRb(i),b)/sqrt(pi); % Eq.(7.2.8)
%p(i) = 1-quadl('f7208',-20,20,Tol,[],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

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

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
and ofdm simulink model in detail with inner blocks also please
thanks in advance

Riyaz Shaik

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
and ofdm simulink model in detail with inner blocks also please
thanks in advance

Adluri Sathwik

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?

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

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

Patrick Adebayo

brian herman

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

electrokidz

good day sir,..

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

Wissem Cheheb

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
it's Urgent please
thanks alot

Won Yang

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

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

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

Roman

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

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

Antoun Ghobrial

Padmapriya

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

zou

Parag

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

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

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.

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.

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

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

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

marriam nayyer

marriam nayyer

marriam nayyer

Roshitha Pinto

please send matlab code for QPSK BER with OFDM modulation

Anadol91

Chengyan

thank you very much!

gatewick

very detailed stuff, many thanks

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

Oleg Rasulov

Heyyo

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

Fantastic works! Thank you very much!

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.

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.

harsh

this is an fantastic work.

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

harsh

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

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

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

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.

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.

moonman

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

Roi

the files are not updated , and has allot of errors

zouhair

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

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.

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

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

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.

zouhair

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

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

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.

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

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.

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

Babu

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

Won Yang

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

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

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.

Adai

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.

Won Yang

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

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

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

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,:)= ....'.

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

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.

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.

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

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.

herz101 gafai

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

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!

Adai

Adai

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

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

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

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

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

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

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

amer aswadi

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

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

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

Zain

nice

amer aswadi

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

Won Yang

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

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.

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?

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

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.

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

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.

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

Won Yang

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

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

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.

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

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!

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.

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.

Lai

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

Thank you very much

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.

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.

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

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.

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.

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?

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?

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.

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.

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

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

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

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.

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.

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.

James Gabriel

Thank you very much

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

James Gabriel

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

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

Yang Yang

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

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!

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!

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.

rima assaf

could you please share chapter 4

minh kha huynh

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

Guillaume Ferre

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

Montadar Abas Taher

veeery good thank you very much

Lancez

Won Yang

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

Ustun Ozgur

Epic bookname fail.

haider mehraj

Erdal Bizkevelci

##### MATLAB Release Compatibility
Created with R2007a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!