06-14-2012 07:59 AM
Hi everyone,
These weeks I was struggling on a problem: how to demodulate a signal composed of different signals modulated by different schemes.
The frame of the signal is composed of two parts, as shown in the following figure:
The first part is the PLCP header, which is always modulated by 2GFSK, and the second part is the PSDU, which is modulated by 2GFSK or 4GFSK according to the speed it is transmitted: when the transmite rate is 1mbps, PSDU is 2GFSK modulated, and when it is 2mbps, it is 4GFSK modulated.
In the PLCL Header, there are sync bits and start frame delimiter, which can be used to synchronize the demodulator, and a PLW field which determines the length of PSDU, and a PSF bits which determines the transmission rate of the PSDU, i.e. when PSF=0, the transmission rate is 1mbps, and when PSF=2, the transmission rate is 2mbps.
Here are my two questions:
1) I can demodulate the PLCP header with the FSK demodulator in the modulation toolkit and get the PLW and PSF field correctly. The question is : how to demodulate the PSDU part?
My solution is: after retrieve the LW and PSF field, I locate the begining of PSDU by adding the starting of PLCP header and 128* (samples per symbol). Then use the 2GFSK demodulator or the 4GFSK demodulator according the value of PSF. After implementing and testing this solution, I found that when PSDU is modulated with 2GFSK, the demodulation output is correct, but when PSDU is modulated with 4GFSK, the demodulation output is not correct.I don't know why.
PS: when I demodulate the PSDU data, I set the reset parameter to TRUE, and set the synchronization sequence parameter of the demodulator to NULL, because there is no synchronization bits in the PSDU anymore. Is my setting to the parameter correct?
2) As the demodulation output is not as my want, so I do two tests the FSK demodulator on two different input signals, where the second signal is a subset of the first one. All the waveforms are 2GFSK signals and the frequency deviation is 160K, the dample rate is 16M samples/s, as shown in the following figure:
Signal 1
Signal 2
Firstly, I set the reset parameter to TRUE and synchronization sequence parameter to the correct SYNC and SFD bits, and use the demodulator to demodulate two signals, and finds that when the first signal is demodulated, the output bitstream is not correct, because the SYNC and SFD bits do not occur in the output, but the output of the second output is correct.
Then I set the synchronization sequence parameter to NULL and test the demodulator one the two signals again. I find that the output of the two test are both incorrect because the SYNC and SFD do not occurs in the output.
It is very strange that even the second input is a subset of the first input, the output of the second test is not a subset of the first test. Sometimes I even find that when the input signals get longer, the first some bits of the demodulation change. I don't why.
So Can anybody be kindly to help me on these questions? Why the length of the inpout effect on the first some bits of the demodulation output? How to set the synchronization parameter of the FSK demodulator when I want to demodulate PSDU correctly?
The code and test data are attached in the attachment.
Thanks in advance!
06-14-2012 09:52 AM
New progress:
I measured the spectrum of the two signals, and find that the center frequency of the two signals is not 0, but 2M Hz. Is that the reason that the above phenomenon happens? Do I need to convert the center frequency into 0? If I need to do this, how do do it?
Thanks!