zero padding ofdm matlab
Hi aya2002,
Usually one will think zero padding will be done at the end.
ofcourse DFT operates on periodic sequence only( even though aperiodic sequence is there i.e., by making them (aperiodic) circularly symmetric)
by taking this circular symmetric property as advantage, we reduce the DFT computation into half (saving 50% computation and storage)
so when L=i/p seq length =6; it is advisable we dont need to pad zeros. if U want to pad zeros still for better display
we pad zeros symmetrically (rather than at the end; as it changes the transform itself). if your original data is x[n]={1,2,10,5} here L=4; also this is even sequence
If U want to make the seq N=8; then padded symmetrical seq. is
x[n]= {1,2,10,2.5,0,2.5,10,2} here zero is padded at the centre, by taking advantage the dft symmetricity it is enough if we take 1 to (N/2+1) i.e., 1 to 5 (Unique sequences). (In matlab starting array element is 1 )
while remaining seq are redundant data points, whose spectum will b conjugate symmetric.
reason:
If you have a N point real valued input waveform, your samples are the
real valued inputs to the DFT or FFT, and the imaginary parts are set
to zero. e.g.: with N even, outputs 0 and N/2 will be
real and unique, and outputs 1 to N/2-1 will be conjugate symmetric
with outputs N-1 to N/2+1).
if U want to find DFT with N=16;
then the seq would be x[n]={1,2,10,2.5,0,0,0,0,0,0,0,0,0,2.5,10,2}
Here we will take data points 1 to N/2 +1 and then perform DFT. i.e., only first 9 points are considered.
one can wonder at wha point the above spectrum is symmetric.
It is symmetric with respect ot N/2(nyquist point). so to make spectrum to be symmetric around zero one has to introduce the phase lag of N/2 additionally.
then plot will look like from -N/2 to N/2.
till now i told about even seq (x[N-n]=x[n]) ; i didnt mention about odd seq.
x[N-n]= - x[n] for n= 1 to N-1
symmetric odd seq L=5; x[n]={0,2,4,-4,-2}. This element is DC component is set to zero. also there is no nyquist freq. (without zero padding)
if want to padd zero symmetrically, for even N =8;
x[n]={ 0,2,4,0,0,0,-4,-2} while intentionally making nyquist frq and dc component to be zero. here Unique data points are ceil (N+1)/2 i.e., 5 data ponts ( 1 to 5 elements in MATLAB) take first five data points and find fft of that seq. since we know the rest 3 data points exhibit conjugate symmetric. therby it reduces the computation of DFT and memory storage as well.
a word of caution :
zero padding is advisable only whenever the i/p seq length is closer to DFT N-point length.
In ofdm, i think zero padding will related to cyclic prefix(of course i dont know much about cyclic prefix in detail) so that orthogonality is maintained.
Happy learning