Hi i want to simulate small carrier offset in OFDM and see its effect on QAM constellations. How can is simulate carrier offset in MATLAB for OFDM signal.. is iterpolation - decimation technique helpful?? i want to introduce this offset after passing the signal through channel filter. i want to simulate by noninteger factor say 0.5 i.e shift of tones by 0.5 so that i can see spectral leakage and its consequnse on constellation diagram... anybody simulated such thing...? sandeep This message was sent using the Comp.DSP web interface on www.DSPRelated.com
simulation of carrier offset in OFDM
Started by ●August 17, 2005
Reply by ●August 17, 20052005-08-17
I believe you want the following let s(t) = Re{b(t) exp(j*W_c*t + theta_c)} where W_c = Carrier freq, theta_c = carrier phase and b(t) = a(t)exp(j*phi(t)) and represents the complex baseband information carrying signal. At the Rx you have the following r(t) = s(t) * exp(-jW_o + theta_o) where W_o and theta_o represent the estimate of the carrier freq and phase. after some jiggery pokery we end up with the following complex baseband signal r'(t) = 0.5 * b(t) exp(j*delta*t+th) where delta = W_c - W_o and th = theta_c - theta_o representing carrier offset and phase difference. This means that you can simply generate this exponential signal with the offset and phase that you desire and multiply your OFDM signal b(t) after the channel filter. I think that covers it all. col sandy80 wrote:> Hi > i want to simulate small carrier offset in OFDM and see its effect > on > QAM constellations. > How can is simulate carrier offset in MATLAB for > OFDM signal.. is iterpolation - decimation technique helpful?? > > i want to introduce this offset after passing the signal through channel > filter. > > i want to simulate by noninteger factor say 0.5 i.e shift of tones by 0.5 > so that i can see spectral leakage and its consequnse on constellation > diagram... > > anybody simulated such thing...? > > sandeep > > > This message was sent using the Comp.DSP web interface on > www.DSPRelated.com
Reply by ●August 18, 20052005-08-18
Hi col Thanks for insightful information. you have done the analysis in continous time domain,where, ofcourse,multiplication by exponential will shift my whole spectrum. but there are couple of issues when u try to do things in discrete domain>I believe you want the following > >let s(t) = Re{b(t) exp(j*W_c*t + theta_c)} > >where W_c = Carrier freq, theta_c = carrier phase and b(t) = >a(t)exp(j*phi(t)) and represents the complex baseband information >carrying signal. At the Rx you have the following > >r(t) = s(t) * exp(-jW_o + theta_o) > >where W_o and theta_o represent the estimate of the carrier freq and >phase.here youmean to say that to get a perfect baseband signal W_c = W_o as well both phases. and my carrier offset might be abs(W_c - W_o). but in matlab i cant genrate a carrier for morethan the (f/fs) =0.5 since all looks like same. after 0.5 like 0.6 is equivalent to 0.4 etc... after some jiggery pokery we end up with the following complex baseband>signal > >r'(t) = 0.5 * b(t) exp(j*delta*t+th) > >where delta = W_c - W_o and th = theta_c - theta_o representing carrier >offset and phase difference. This means that you can simply generate >this exponential signal with the offset and phase that you desire and >multiply your OFDM signal b(t) after the channel filter. I think that >covers it all.i have tried this thing and it is working well.. following is apiece of code... recv = channel2(symbol2); % pass the OFDM signal through channel. it will add AWGN and Multipath components indexx = 0:1:length(recv)-1; indexx = indexx * 0.1 ; % carrier offset 0.1 means ratio of f/fs . for sampling frequncy of 20 Mhz, offset = 2Mhz. recv = recv.* (exp(j*2*pi*indexx));% complex exponential multiplication recv = recv.* (exp(-j*2*pi*indexx)); data = recved(recv); % Recieve the signal from channel i am getting perfect constellation after i multiply with second exponential with negative frequncy.... why to multiply with 0.5 ,any intutive reasoning??? just want to ask, say my sampling freq is 20 MHz ,exp(j*2*pi*0.001) will mean offset of (10/0.5)*0.001 MHz = 20 Khz.... also i am getting rotated points in constelation diagram.... so i am doing things right?? Thanks a lot for help information.>col > > >sandy80 wrote: >> Hi >> i want to simulate small carrier offset in OFDM and see itseffect>> on >> QAM constellations. >> How can is simulate carrier offset in MATLABfor>> OFDM signal.. is iterpolation - decimation technique helpful?? >> >> i want to introduce this offset after passing the signal throughchannel>> filter. >> >> i want to simulate by noninteger factor say 0.5 i.e shift of tones by0.5>> so that i can see spectral leakage and its consequnse on constellation >> diagram... >> >> anybody simulated such thing...? >> >> sandeep >> >> >> This message was sent using the Comp.DSP web interface on >> www.DSPRelated.com > >This message was sent using the Comp.DSP web interface on www.DSPRelated.com
Reply by ●August 18, 20052005-08-18
> Hi > i want to simulate small carrier offset in OFDM and see its effect > on > QAM constellations.suppose the baseband digital signal is x in Matlab (may be FFT output, may have cyclic prefix, or may have other features depending on your algorithm) and suppose x has nsamp samples. Define a time index, define a carrier offset and the rest is easy. eg. cfo = 3e-3; % carrier frequency offset relative % to the sampling frequency cpo = pi/6; % carrier phase offset n = 0:nsamp-1; % time index w = 2*pi*cfo; % discrete CFO ejwn = exp(sqrt(-1)*((w*n) + cpo)); % offset modulator rx = ejwn.*x; % rx signal with CFO and CPO
Reply by ●August 18, 20052005-08-18
See comments below. sandy80 wrote:> Hi col > Thanks for insightful information. you have done the analysis in > continous time domain,where, ofcourse,multiplication by exponential will > shift my whole spectrum. but there are couple of issues when u try to do > things in discrete domain >Nope, the analysis is the same for both domains. You just have to be careful where the spectral images start falling after you sample in the digital domain.> > >I believe you want the following > > > >let s(t) = Re{b(t) exp(j*W_c*t + theta_c)} > > > >where W_c = Carrier freq, theta_c = carrier phase and b(t) = > >a(t)exp(j*phi(t)) and represents the complex baseband information > >carrying signal. At the Rx you have the following > > > >r(t) = s(t) * exp(-jW_o + theta_o) > > > >where W_o and theta_o represent the estimate of the carrier freq and > >phase. > > > here youmean to say that to get a perfect baseband signal W_c = W_o > > as well both phases. and my carrier offset might be abs(W_c - W_o).Correct.> > but in matlab i cant genrate a carrier for morethan the (f/fs) =0.5 since > all looks like same. after 0.5 like 0.6 is equivalent to 0.4 etc... >I still don't see the problem. Are you trying to generate carrier offsets that are greater than the sampling frequency?> after some jiggery pokery we end up with the following complex baseband > >signal > > > >r'(t) = 0.5 * b(t) exp(j*delta*t+th) > > > >where delta = W_c - W_o and th = theta_c - theta_o representing carrier > >offset and phase difference. This means that you can simply generate > >this exponential signal with the offset and phase that you desire and > >multiply your OFDM signal b(t) after the channel filter. I think that > >covers it all. > > i have tried this thing and it is working well.. > following is apiece of code... > > > > recv = channel2(symbol2); % pass the OFDM signal through channel. it > will add AWGN and Multipath components > > indexx = 0:1:length(recv)-1; > indexx = indexx * 0.1 ; % carrier offset 0.1 means ratio of f/fs > . for sampling frequncy of 20 Mhz, offset = 2Mhz. > > recv = recv.* (exp(j*2*pi*indexx));% complex exponential multiplication > > > recv = recv.* (exp(-j*2*pi*indexx)); > data = recved(recv); % Recieve the signal from channel > > > i am getting perfect constellation after i multiply with second > exponential with negative frequncy.... >Yep, this is what you would expect.> > why to multiply with 0.5 ,any intutive reasoning???1/2 falls out in the analysis, it doesn't change things, you just have to make sure that your scaling is correct at the output of the Rx low pass filter that's all. In fact, you can forget about the LPF because you're not really performing freq translation to passband and then demodulate back to baseband anyway. You just want to see what the baseband corruption would look like after you performed these operations, so that you can simulate them easily.> > just want to ask, say my sampling freq is 20 MHz ,exp(j*2*pi*0.001) > will mean offset of (10/0.5)*0.001 MHz = 20 Khz.... >see the example from porterboy to clear up the above.> > also i am getting rotated points in constelation diagram.... so i am doing > things right?? >hmmm...where does the rotation come from? You said previously that you're multiplying by the exp with negative freq. Are you adding an arbitrary phase with this? col <snipped>
Reply by ●August 19, 20052005-08-19
For all this analysis i had switched off CP i.e Zero gaurd interval, no multipath component ,with LOS CIR , no AWGN and data on only two succesive subcarriers of the same amplitude for all the symbols so that there is no spreading of subcarriers by virtue of either CP or data. yes adding the phase offset rotates my points in constellation diagram. i mean magnitude remains same but phase changes. This results in a single circle of points in the const diagram.... But adding a carrier offset also rotates my points but this time i have observed that they tend to form conecentric circles. i beleive this is because adding a fixed carrier offset will tend to leak energy of certain subcarriers in to other bins. how much energy any particular subcarrier leaks depends upon the amount of carrier offset.. after all this is discrete domain... and certain carriers still form a perfect circle with no DFT leakage... sandeep See comments below.> >sandy80 wrote: >> Hi col >> Thanks for insightful information. you have done the analysis in >> continous time domain,where, ofcourse,multiplication by exponentialwill>> shift my whole spectrum. but there are couple of issues when u try todo>> things in discrete domain >> > >Nope, the analysis is the same for both domains. You just have to be >careful where the spectral images start falling after you sample in the >digital domain. > >> >> >I believe you want the following >> > >> >let s(t) = Re{b(t) exp(j*W_c*t + theta_c)} >> > >> >where W_c = Carrier freq, theta_c = carrier phase and b(t) = >> >a(t)exp(j*phi(t)) and represents the complex baseband information >> >carrying signal. At the Rx you have the following >> > >> >r(t) = s(t) * exp(-jW_o + theta_o) >> > >> >where W_o and theta_o represent the estimate of the carrier freq and >> >phase. >> >> >> here youmean to say that to get a perfect baseband signal W_c = W_o >> >> as well both phases. and my carrier offset might be abs(W_c - W_o). > >Correct. > >> >> but in matlab i cant genrate a carrier for morethan the (f/fs) =0.5since>> all looks like same. after 0.5 like 0.6 is equivalent to 0.4 etc... >> > >I still don't see the problem. Are you trying to generate carrier >offsets that are greater than the sampling frequency? > >> after some jiggery pokery we end up with the following complexbaseband>> >signal >> > >> >r'(t) = 0.5 * b(t) exp(j*delta*t+th) >> > >> >where delta = W_c - W_o and th = theta_c - theta_o representingcarrier>> >offset and phase difference. This means that you can simply generate >> >this exponential signal with the offset and phase that you desire and >> >multiply your OFDM signal b(t) after the channel filter. I thinkthat>> >covers it all. >> >> i have tried this thing and it is working well.. >> following is apiece of code... >> >> >> >> recv = channel2(symbol2); % pass the OFDM signal through channel. it >> will add AWGN and Multipath components >> >> indexx = 0:1:length(recv)-1; >> indexx = indexx * 0.1 ; % carrier offset 0.1 means ratio off/fs>> . for sampling frequncy of 20 Mhz, offset = 2Mhz. >> >> recv = recv.* (exp(j*2*pi*indexx));% complex exponentialmultiplication>> >> >> recv = recv.* (exp(-j*2*pi*indexx)); >> data = recved(recv); % Recieve the signal from channel >> >> >> i am getting perfect constellation after i multiply with second >> exponential with negative frequncy.... >> > >Yep, this is what you would expect. > >> >> why to multiply with 0.5 ,any intutive reasoning??? > >1/2 falls out in the analysis, it doesn't change things, you just have >to make sure that your scaling is correct at the output of the Rx low >pass filter that's all. In fact, you can forget about the LPF because >you're not really performing freq translation to passband and then >demodulate back to baseband anyway. You just want to see what the >baseband corruption would look like after you performed these >operations, so that you can simulate them easily. > >> >> just want to ask, say my sampling freq is 20 MHz ,exp(j*2*pi*0.001) >> will mean offset of (10/0.5)*0.001 MHz = 20 Khz.... >> > >see the example from porterboy to clear up the above. > >> >> also i am getting rotated points in constelation diagram.... so i amdoing>> things right?? >> > >hmmm...where does the rotation come from? You said previously that >you're multiplying by the exp with negative freq. Are you adding an >arbitrary phase with this? > >col > ><snipped> > >This message was sent using the Comp.DSP web interface on www.DSPRelated.com
Reply by ●August 19, 20052005-08-19
i forgot to mention that after negative freq multiplication everything strightens up.. no rotaion whatsoever after multiplying the same negative carrier offset... sandeep>See comments below. > >sandy80 wrote: >> Hi col >> Thanks for insightful information. you have done the analysis in >> continous time domain,where, ofcourse,multiplication by exponentialwill>> shift my whole spectrum. but there are couple of issues when u try todo>> things in discrete domain >> > >Nope, the analysis is the same for both domains. You just have to be >careful where the spectral images start falling after you sample in the >digital domain. > >> >> >I believe you want the following >> > >> >let s(t) = Re{b(t) exp(j*W_c*t + theta_c)} >> > >> >where W_c = Carrier freq, theta_c = carrier phase and b(t) = >> >a(t)exp(j*phi(t)) and represents the complex baseband information >> >carrying signal. At the Rx you have the following >> > >> >r(t) = s(t) * exp(-jW_o + theta_o) >> > >> >where W_o and theta_o represent the estimate of the carrier freq and >> >phase. >> >> >> here youmean to say that to get a perfect baseband signal W_c = W_o >> >> as well both phases. and my carrier offset might be abs(W_c - W_o). > >Correct. > >> >> but in matlab i cant genrate a carrier for morethan the (f/fs) =0.5since>> all looks like same. after 0.5 like 0.6 is equivalent to 0.4 etc... >> > >I still don't see the problem. Are you trying to generate carrier >offsets that are greater than the sampling frequency? > >> after some jiggery pokery we end up with the following complexbaseband>> >signal >> > >> >r'(t) = 0.5 * b(t) exp(j*delta*t+th) >> > >> >where delta = W_c - W_o and th = theta_c - theta_o representingcarrier>> >offset and phase difference. This means that you can simply generate >> >this exponential signal with the offset and phase that you desire and >> >multiply your OFDM signal b(t) after the channel filter. I thinkthat>> >covers it all. >> >> i have tried this thing and it is working well.. >> following is apiece of code... >> >> >> >> recv = channel2(symbol2); % pass the OFDM signal through channel. it >> will add AWGN and Multipath components >> >> indexx = 0:1:length(recv)-1; >> indexx = indexx * 0.1 ; % carrier offset 0.1 means ratio off/fs>> . for sampling frequncy of 20 Mhz, offset = 2Mhz. >> >> recv = recv.* (exp(j*2*pi*indexx));% complex exponentialmultiplication>> >> >> recv = recv.* (exp(-j*2*pi*indexx)); >> data = recved(recv); % Recieve the signal from channel >> >> >> i am getting perfect constellation after i multiply with second >> exponential with negative frequncy.... >> > >Yep, this is what you would expect. > >> >> why to multiply with 0.5 ,any intutive reasoning??? > >1/2 falls out in the analysis, it doesn't change things, you just have >to make sure that your scaling is correct at the output of the Rx low >pass filter that's all. In fact, you can forget about the LPF because >you're not really performing freq translation to passband and then >demodulate back to baseband anyway. You just want to see what the >baseband corruption would look like after you performed these >operations, so that you can simulate them easily. > >> >> just want to ask, say my sampling freq is 20 MHz ,exp(j*2*pi*0.001) >> will mean offset of (10/0.5)*0.001 MHz = 20 Khz.... >> > >see the example from porterboy to clear up the above. > >> >> also i am getting rotated points in constelation diagram.... so i amdoing>> things right?? >> > >hmmm...where does the rotation come from? You said previously that >you're multiplying by the exp with negative freq. Are you adding an >arbitrary phase with this? > >col > ><snipped> > >This message was sent using the Comp.DSP web interface on www.DSPRelated.com