Saturday, March 21, 2009

The Sinc





echo on
fnct='Normal';
a=-6;
b=6;
n=24;
tol=0.1;
xx=Fseries(fnct,a,b,n,tol,0,1);
xx1=xx(n+1:-1:2);
xx1=[conj(xx1),xx];
absxx1=abs(xx1);
pause
n1=[-n:n];
stem(n1,absxx1);
title('The Discrete Magnitude Spectrum')
phasexx1=angle(xx1);
pause



stem(n1,phasexx1)
title('The Discrete Phase Spectrum')



Lambda Function at Baseline=1



function y=lambda(x)
%        y=lambda(x) generates a triangular signal
y=(x+1).*(x>-1 & x<0)+(x==0)+(-x+1).*(x>0 & x<1);

Labels:


Discrete Magnitude and Phase Spectra



echo on
fnct='lambda';
a=-4;
b=4;
n=24;
tol=0.1;
xx=fseries(fnct,a,b,n,tol);
xx1=xx(n+1:-1:2);
xx1=[conj(xx1),xx];
absxx1=abs(xx1);
pause
n1=[-n:n];
stem(n1,absxx1);
title('The Discrete Magnitude Spectrum')
phasexx1=angle(xx1);
pause


stem(n1,phasexx1)
title('The Discrete Phase Spectrum')



******************************************************************************************************************************************************

echo on fnct='lambda'; a=-4; b=4; n=24; tol=0.1; xx=fseries(fnct,a,b,n,tol); xx1=xx(n+1:-1:2); xx1=[conj(xx1),xx]; absxx1=abs(xx1); pause n1=[-n:n]; stem(n1,absxx1); title('The Discrete Magnitude Spectrum') phasexx1=angle(xx1); pause



stem(n1,phasexx1) title('The Discrete Phase Spectrum')



******************************************************************************************************************************************************

Plot the Discrete Spectrum of the Signal





>> n=[-20:20];
>> x=abs(sinc(n/2)); 
>> stem(n,x)


Reference:

[1] J. Proakis and M. Salehi, "Contemporary Communication System using Matlab"

Labels:


Saturday, February 28, 2009

Pilot Directed Continuous Synchronization of OFDM

OFDM_Simulink
OFDM_Simulink.zip
This requires Communication Blockset and Toolbox plus Signal Processing Blockset and Toolbox!


This is submitted by Dick Benson, an Application Engineer of MathWorks.

"This model implements a generic OFDM TX and RX, which is not tied to any particular industry standard. The objective of this model is to develop and explore a continuous (not “bursty”) carrier and timing tracking synchronization scheme. The techniques incorporated can then be extended and modified to suite specific communications standards. The model uses an “acquisition” technique that exploits the correlation properties of the cyclic prefix to get a rough estimate of the frame boundary before attempting to accomplish the fine tracking algorithms. The model implements a 64 carrier OFDM waveform with a 16 point cyclic prefix. The OFDM symbol has 16 pilots, 3 guard tones (0 amplitude at band edge) and uses 4 QAM for the 45 remaining data streams. This latest model includes a fading channel, BER computation, and improved control loop dynamics."




Although the over-all design was a bit complicated, modifying the parameters to run the model is very easy. Furthermore, the zip file also includes documentation to make the whole thing easier!

From MATLAB Central Review



Well, no wonder why this submission got a 5.0 rating!

Friday, February 27, 2009

Introduction to Matlab

As defined by MathWorks website, "MATLAB® is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran".  


Well, C/C++ users will probably raise an eyebrow when you insist that " MATLAB is faster than C ". Based on experience and opinions from friends, running Matlab is kind of slower especially when you`re using its GUI. However, observing some correct practices, Matlab can come close in speed with performance languages like C in some problems.


Nevertheless, the cool thing about Matlab is the ease of development, and interactive debugging leading to "faster" results. The term "faster" here includes development, debugging, and result visualization editing, not just the code running time. Hence, if you want this conveniences then Matlab is a tool for you, else, stick with performance languages (C,C++, etc.).


A good basic introduction to Matlab can be viewed in this two part youtube video tutorial by Prof. Jake Blanchard.






Matlab is certainly not for everybody, but as for me,  I find it very useful in signal processing and in Communication System Simulations. 

How about you?  What is your thought about Matlab?






This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]