LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PN sequence Generation

How to generate a PN sequence in LABVIEW. PN pseudorandom sequence generates a sequence of pseudorandom binary numbers. A pseudonoise sequence can be used in a pseudorandom scrambler and descrambler. It can also be used in  spread-spectrum system.
0 Kudos
Message 1 of 13
(8,669 Views)
Is there a reason that you can't use LabVIEW's built in random number generator? It is by definition (I researched this about 12 years ago, am fuzzy about the details) a PRN generator. Now if what you are looking for is something that generates a predictible, repeatable PN, well don't think it would work in that case.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 13
(8,667 Views)
The NI Modulation Toolkit has that feature.
Randall Pursley
0 Kudos
Message 3 of 13
(8,643 Views)

PRNGs (aka PRBS) are usually based on Linear Feedback Shift Registers (LFSRs) so a search on LFSRs is a good idea to see the theory behind them.

 

One difference with LFSRs and the LabVIEW "dice" (which does output pseudorandom numbers) is that LFSRs can't output an all zero state. A seed value is used to start the sequence (and this can't be all zeros either).

 

Here is an 8 bit LSFR:

 

LSFR.png

 

Note that the rotate array function is only there for aesthetic purposes.

The same output will always be returned for a given seed value and iteration count of the For loop.

 

steve

 

 

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 4 of 13
(8,608 Views)

Respected sir,

 

how 511 pn sequence can be truncated to 500 ?

 

With regards

0 Kudos
Message 5 of 13
(7,276 Views)

Hi,

 

I'm not sure what you are asking here:

 

> how 511 pn sequence can be truncated to 500 ?

 

So you have a PN sequence of 511 items and you want to reduce this to 500 items?

 

How is your sequence generated (attach code if possible)?

 

Assuming your sequence comes in an array, couldn't you just use Reshape Array to remove the extra items?

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 13
(7,255 Views)

Respected sir,

 

After generating a pn sequence of n=9 ,length=2^n - 1=511 , i need to reduce this length to 500, by truncating the last 11 MSB's of this sequence. What is the possible solution for this ?

 

thnx,

with regards

0 Kudos
Message 7 of 13
(7,240 Views)

Your data is an array of length 511, run it through a "Delete from Array" function, deleting either the last 11, or last 500, depending on which end of the array is the 500 elements you desire. In the first instance the resulting "main" array output will be the first 500 elements, in the second the "deleted" output will have the last 500 elements.

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 8 of 13
(7,236 Views)

I am obliged for this solution, sir.

 

Thank you.

 

Regards

 

 

0 Kudos
Message 9 of 13
(7,226 Views)

sorry sir , may i ask the components in your PN sequence . I didnt fint a component  right from  Reverse 1D Array . What the name component this?

0 Kudos
Message 10 of 13
(6,671 Views)