Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab code for Baseband frequency offset and correction

Status
Not open for further replies.

babyeric

Junior Member level 1
Joined
Dec 21, 2007
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,469
frequency offset matlab

Hi to all experts,

I am very new in this topic. I am writing a matlab simulation program for baseband QPSK modulation signal through AWGN channel. I would like to seek all your helps of how to add in frequency offset in my code and how to correct it..

I had read some info on it.. There are people writing in this way for frequency offset:

A = 1; %symbol
Amod = exp (j*(2*pi*A/4 + pi/4)); %QPSK signal
f_offset = exp (j*2*pi*0.1); %assume 0.1 is the normalised frequency offset
A_noisy = awgn(Amod, 3, 'measured'); %assumed in EbNo=3dB
A_foffset = A_noisy*f_offset;

This is the correct way to do a frequency offset or is there other way??and how can i do the correction assumed that I do not know what is the frequency offset. Hope you can help. Thanks in advance.
 

frequency offset estimation matlab

I can't understand your code, and maybe I am wrong but it is probably the code is completely wrong.

At least there should be a modulation signal such as random bit sequence. And then the bit sequence is modulated with QPSK format on a carrier. Then the frequency offset should be added to the carrier. You can assume the carrier is 0 Hz.

The frequency offset correction can be done with a costas loop, which is introduced in many digital communication book.

Added after 11 seconds:

I can't understand your code, and maybe I am wrong but it is probably the code is completely wrong.

At least there should be a modulation signal such as random bit sequence. And then the bit sequence is modulated with QPSK format on a carrier. Then the frequency offset should be added to the carrier. You can assume the carrier is 0 Hz.

The frequency offset correction can be done with a costas loop, which is introduced in many digital communication book.
 

carrier frequency offset matlab

Hi hi, thanks for replying.

hmmm..you are right..I wrote these lines only for a single bit modulation. My original codes are

A=randint(1,10000,4); % 10000 data bits
Am=pskmod(A,4); % QPSK modulation
t=0:1/10000:1-1/10000; % time frame
f_offset=exp(j*2*pi*0.1*t); % frequency offset=0.1
Af=Am.*f_offset; % frequency offset of QPSK modulation
An=awgn(Af,3,'measured'); % add in noise

Can I ask by doing these, is it frequency offset my original data bits?

I tried one method which I found from the webpage of estimating the frequency offset but do not really understand it. The code was as follow:

yk=conj(Am).*An; % assumed the receiver know what are the data bits.
zk=10000/(2*pi).*angle(An(2:end).*conj(An(1:end-1)));
% estimating the frequency offset..This part I do not understand at all. In the webpage it say that the I can get estimate what is the frequency offset, but I can't get the frequency offset of 0.1. So hope you can advise me how really does it work.

As for coastas loop, I had read abt it, but I dun really understand as well. Maybe you and briefing explained to me..Hope you can spend some previous time of urs to guide me. Thank you so much.

Best Regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top