02-26-2013 02:08 AM
Hi! I posted my question in the LabVIEW forum but an application engineer suggested that I post it here. I'm new so any help would be appreciated
I am running this FSK example in LabVIEW (VI is attached). As it can be seen in the block diagram, the specified number of samples per symbol is 512. If I am running 2-FSK, I have 1 bit per symbol. So if I have 128 bits, I have 128 symbols. and if I have 512 samples per symbol, I am expecting 65536 samples/elements in the output complex waveform of MT Modulate FSK. However, I only get 65281 elements in the array. There are 255 missing elements.
If I run 4-FSK and have 128 bits or 64 symbols, I expect 32768 in the array. But then again, I am short of 255 elements and get 32513.
Am I missing out on something? Have I misunderstood something? Thank you so much for your help.
Solved! Go to Solution.
02-27-2013 01:48 PM
I do get the same results as you!
I dove a bit into it and it seems that the code that generates the symbols, two layers down, is where an explanation to this shows up.
If you open up MT Modulate FSK.vi, then mod_FSK Modular Generate Discontinuous Phases.vi in the discontinuous case of the case structure, you will see the following code.
You can see that when Reset is True (default value) and the outer-for loop is at its first run, the inner-for loop will run (Samples Per Symbol)/2+1 times (in your case, this number is 512/2+1=257. Subsequently, the inner-for loop will run 512 for every outer-for loop iteration. This means that the first run would lack 512-257=255 samples, which causes the total to have 255 less samples.
I'm not sure what the design motivation behind this is. As a test, you could wire in a False constant to the Reset terminal of the MT Modulate FSK VI, which will cause all samples to be generated.
Hope this clarifies it.
02-27-2013 11:12 PM
Thanks Tarek. I have found out about this just the other day but wasn't able to update this thread since I'm still figuring out why it creates only half of the number of samples + 1 for the first symbol. I have tried removing that condition but the loop did not run continuously. The frequency spectrum being shown was not "moving". But I think that doesn't matter for what I need since I only need one run to generate the samples. However, I am still wondering why it generates only one more than half of the number of samples for the first symbol.
Thanks again Tarek! I'm affirmed where the missing elements are coming from.