From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

post messages

Solved!
Go to solution

I am New to the Labview so i have two Questions i have read a lot of answers but i couldn't end my code so anyhelp would be apperciated my questions

 

 

1) how to Generate PN sequence using MT Poly generate bits when my primitive polynomial 1+x^3+x^4 and my initial registers state are 1111 so how to enter these inputs into the MT Generate bits (poly)  Vi 

 

 

2) i want to make the auto correlation for the sequecne and i did used Autocorrelation VI but its output on the waveform is not correct 

 

0 Kudos
Message 1 of 29
(3,913 Views)

Try to make your subject line more specific.  See if the discussion here is helpful.

 

Bob Schor

0 Kudos
Message 2 of 29
(3,868 Views)

Thank you sir for helping and sorry for being not that specific , and about that link yes it's really helpful as i did used it before and checked it but can i ask about two things :

 

 

1) how can i put  values in Seed ? as it is the initial state so i want to make it 1111 (Binary)  but Seed it's default value is in Hexadecimal so it's a little bit confusing for me clearly stating my question what is Seed ? how can i deal with it ?

 

 

2) if i did put a new bit 1 in the primitive polynomial to make it of degree 5 to overcome the error of (5-31) isn't that changing in the primitive polynomial degree ?


THANKS a lot in advance



 

0 Kudos
Message 3 of 29
(3,858 Views)

Hi Aomine,

 

1. To put different values in the Seed, it may help to change the radix to binary. Right click on the seed control and go to Visible Items>>Radix. Then, click the gray "x" and select Binary from the dropdown. You'll see that the value that was once Hex will now be binary.

 

2. As you've probably discovered, it seems like adding a new bit will indeed change the primitive polynomial degree and also may cause the new polynomial to not be primitive which causes the output to not be of maximal length 31 (as Bob_Schor discovered here).

 

Do you have another Galois, Primitive Polynomial generator that you can compare its output to the output of this function?

Robert B
RF Product Support Engineer
National Instruments
0 Kudos
Message 4 of 29
(3,785 Views)

First of all Thanks  a lot for helping 🙂 i really appreciate that 

 

 

for my question about Primitive polynomial i have another Primitive polynomial which is 1+X^3+x^4+X^5 and the initial state for registers are 11010 by the way i am using Fibonacci  not Galois  finally i hope you sir can help me with that as i wanted to understand how to use this block to get my output stream (PN SEQUENCE )


THanks in advance 🙂

 

0 Kudos
Message 5 of 29
(3,733 Views)

Hi Aomine,

 

Would you mind posting some sample code or snippets that show the settings you are making and what you expect to get versus what you are actually getting? I think this will help everyone who sees this understand the problem more clearly and be able to make the best suggestions. Thanks in advance!

Robert B
RF Product Support Engineer
National Instruments
0 Kudos
Message 6 of 29
(3,718 Views)

No problem i will post some a code here is the code in this code i am using the MT Generate bits.vi to generate PN Sequence so i am using as inputs the Seed in 1101011 and the Pirimitive polynomial is 1+x^3+x^4+x^5+x^6+x^7 and i am expecting the output bit stream would be the PN sequence which is 127 bit and the stream should be as in the attached picture but indeed the labview don't give the same output bit stream so my question would be if i want to use this Pirmitive polynomial and this initial state for the registers to get the same output what i should do in the block MT generate bits.vi 



Thanks in advance Sir

Download All
0 Kudos
Message 7 of 29
(3,688 Views)

Aomine,

 

It looks like there is a subVI called "Repeat.vi". Would you mind including it as well. I'll try to look into this today or tomorrow and post back. Thanks!

Robert B
RF Product Support Engineer
National Instruments
0 Kudos
Message 8 of 29
(3,664 Views)

Aomine,

 

It looks like there is a subVI called "Repeat.vi". Would you mind including it as well. I'll try to look into this today or tomorrow and post back. Thanks!

Robert B
RF Product Support Engineer
National Instruments
0 Kudos
Message 9 of 29
(3,661 Views)

Hi Aomine,

 

I actually think I figured it out.

 

I adjusted the seed to 1AF966 and it seems to have been able to create the bit stream you are looking for. I attached the adjusted code below. My added code simply compares the reference bit stream that you included in the image and compares it to the output bitstream of the MT Generate Bits VI.

 

Let me know if this helps or if you have any more questions. Thanks!

Robert B
RF Product Support Engineer
National Instruments
Message 10 of 29
(3,648 Views)