LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fsk demodulator

Hello Sambeiro,

 

The problem will actually resolve itself in real-life:

- Now you were exactly sending what you modulated and thereore wanted to receive

- In real life you will receive (random) bits before this and (random) bits after this.

 

So for testing purposes you can now just "pad" your series of bits with some extra bits after (and preferably also before) the current bit-sequence.

In the captured png this was done with zeros, but you can also do this with random bits.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 41 of 55
(1,635 Views)

Hello ThiCop,

Thanks for your answer. Also I would like to filter this random bits that appear before and after the sequence of bits. Which is the best way to do it?
Now, i´m doing is the following to try to solve that problem:

 In every iteration of the while loop I collect data (1000 samples, for instance). I use the "mean.vi" to calculate the mean value of this 1000 samples and then I use a comparator. The function of the comparator is to compare the mean value of this samples with a threshold (this threshold is the approximate level of noise, so that this allows us to filter some noise).
If the mean value is higher than the threshold the program demodulates. If the mean value is lower than the threshold the program enter to a while loop where it is calculated the mean value each time and stops once the mean value of the samples is higher than the threshold. Then, the program also demodulates the signal.

 

I upload my code because it will be easier to understand if you take a look it.

Please, is there other way to do better what i´m doing on this way?

Thank you very much in advance

0 Kudos
Message 42 of 55
(1,629 Views)

hello Sambeiro,

 

How do you mean with "I would like to filter this random bits that appear before and after the sequence of bits"?

I don't really see the need to filter them, because they are not part of you're actual "measured" sequence.

Isn't that the reason why you have the synchronization bits before the actual message?

To indicate when the message starts.

After your message you also have the "all true" stop bits to indicate the end.

 

I don't really get the reasoning in this case.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 43 of 55
(1,623 Views)
Hello ThiCop,

I would like to filter the noise and, in some way, remove all the bits that appear randomly before and after the "useful sequence of bits" (the sequence that I want to recover). I understand that you mean that although I have noise I´m able to recover the "useful sequence of bits" by using the sync sequence. The thing is that I would like to save in a file from the "start of frame" to the "end of frame". I would like to remove all the other bits.
Is that possible?


0 Kudos
Message 44 of 55
(1,620 Views)

Hallo Sambeiro,

 

To detect the begin point of the useful sequence of bits you use the synq sequence.

From you seem to have a fixed length of bits that you're always sending, so everything should be easily detectable.

 

If you know the length (eg L bits) , then you just have to take those first L bits you detect with the help of the sync functionality.

If you don't know the length, then you'll have to detect the appearance of your "end frame".

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 45 of 55
(1,608 Views)

Hello ThiCop,

 

-Without the USRPs (simulating the scenario) the program is already working properly (I'm able to receive the same data that I send)

 

-Now I have just checked the same but executing the transmitter and the receiver in two separate computers with the USRP connected. In this case I'm not able to recover the same data that I'm sending from the transmitter.

 

 

Pre-start : 00000

Start of frame : 1010101000001

Message: 0000000000

End of frame: 1111111

Post- end: 00000

 

I save the data after demodulating in a file (see attachment). As you can see it doesn't appear the sequence (pre-start + start of frame + message + end of frame + post-end).

 

What do you think could be the problem?

 

P.S: Find enclosed also the transmitter and the receiver VI.

 

Thank you very much in advance.

0 Kudos
Message 46 of 55
(1,597 Views)

Hi ThiCop,

 

Do you know what could be the problem? I don´t know yet what can cause it.

 

Thanks in advance

0 Kudos
Message 47 of 55
(1,591 Views)

Hello Sambeiro,

 

Since today I'm back at the office.

Have there been any changes since last week in the code?

Please let me know and I'll look into the right code

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 48 of 55
(1,579 Views)

Hello ThiCop,

 

Yes, I did some changes in the code. Find enclosed the new versions above.

 

It seems that the problem that I had last week has been solved. Now,  I'm able to recover the message that I'm sending from the transmitter almost always. Nevertheless, sometimes I can see a packet (by using a graph) and the program doesn't recover the message. (it doesn't find the start of the frame and the end of frame)

 

The changes that I made is:

 

-Increasing the modulation index  to 3.60 in order to obtain a higher freq deviation (22500Hz)

- I removed the sync sequence. Now in the demodulation VI, I do not connect anything to the sync parameters input.

 

Why do you think that my program works better without the sync sequence? The sync sequence should help the demodulator.

 

I will be very grateful to listen your opinion about that.

 

Thanks in advance 

Download All
0 Kudos
Message 49 of 55
(1,574 Views)

Hello Sambeiro,

 

I cannot really follow your logic.

Why would you remove the "sync sequence"?

 

The "synq seuqence" is exactly the thing that allows you to detect the beginning of your real data.

Removing it is actually going to do the opposite of what you want to do.

 

Can you send me your latest code that you had before removing the sync sequence and tell me what the issue with that code were?

Then I can work on it and get it back to you.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 50 of 55
(1,563 Views)