RF Measurement Devices

cancel
Showing results for 
Search instead for 
Did you mean: 

Basic BPSK Modulator in Labview

Hello,

 

 I am new to labview and am trying to implement a basic BPSK modulator VI. The output of the VI, however, does not seem coherent and I was wondering if anyone could tell me why.  Specifically, I have a hard time determining if the output is correct using a waveform chart because it does not display a "clean" sinusoid with the 180 phase shift when -1 is detected from the square wave.  If anyone could point me in the right direction, that would be greatly appreciated.

 

Sincerely,

Chris

0 Kudos
Message 1 of 7
(16,930 Views)

Jersey,

 

Can you be more specific about the issues you are encountering? What is not "clean" about your result? What are you expecting and what are you getting?

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
Message 2 of 7
(16,895 Views)

Jersey,

 

Actually, could you please post your VI so we can take a closer look? 

 

I also want to let you know about our Modulation Toolkit that is specficially designed for these types of applications. With this toolkit you would only need to supply your bit pattern or other parameters and you would receive your result.

 

NI Modulation Toolkit Datasheet:

http://www.ni.com/pdf/products/us/032753305101.pdf

 

NI Modulation Toolkit Product Page:

http://sine.ni.com/nips/cds/view/p/lang/en/nid/12855 

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
Message 3 of 7
(16,880 Views)

Hi Chris,

 

I believe that the problem you have encountered is due to the fact that your carrier frequency is much greater than the sampling frequency (ie - how long of delay your loop is set to execute). Because of this, you are seeing aliasing in your signal, and the signal will not appear correctly on the chart. For example, even if you specify a loop delay of 1 ms, this corresponds to a sampling frequency of 1kHz. If your carrier frequency is anything greater than 500 Hz, your signal will be aliased due to the Nyquist theorem. In fact, it is recommended that your sampling frequency be at least 10x your signal frequency to make the signal appear correct in shape.

 

The best solution would be to create a waveform for your carrier rather than doing it point-by-point. In this case, you will have deterministic sampling and you can sample at any frequency you would like (rather than being limited by how fast your loop can iterate). I have attached an example program which creates a sinusoidal waveform and performs BPSK modulation (basically, it multiples by a ±1 amplitude square waveform with the same sampling frequency and number of samples). You can modify the sampling rate and number of samples to your requirements, and you can place this in a loop if you would like it to run continuously. Hope this helps!

 

Daniel S.
National Instruments
Message 4 of 7
(16,874 Views)

Hi all,

 

 Thanks a lot for the help.  As a next step I would like to use the FPGA Module on the 5640-R  to implement the BPSK modulator.  However, there are fewer VIs in the FPGA module and it will be necessary to work with fixed arrays and fixed point type. 

 

 Attached to this post is the vi that we are working on.  Several questions: 

 

  1.  How might we go about "simulating" the VI without having to compile on the FPGA target?  The approach I have been using is to have the same VI open on the FPGA target and examine any errors that may arise when I build the VI on the development computer.  

 

  2.  In the VI, I am performing point-by-point multiplication because I am not sure if the FPGA can perform the BPSK modulation in another way.  I am concerned because I am using an array to store the modulated signal.  I have the feeling that this is impractical, given the memory limitations on the FPGA.  Is there a better approach? 

 

Once again, I'd sincerely appreciate any assistance I can receive.  

 

Chris 

0 Kudos
Message 5 of 7
(16,830 Views)
To add more details.  After the PN sequence generator I would like to map the binary sequence of 1s and 0s to a square wave with amplitudes of +/- 32768.  This will still be in the digital domain.  One way to do this would be to use loops that build another array with the amplitudes "held" for a period of specified period of time.  Again, I am concerned with having to use arrays to do this on the FPGA. 
0 Kudos
Message 6 of 7
(16,826 Views)

Hi Chris,

 

You may be interested in checking out the RF Communications Library for FPGA that is available in the NI-Labs. It contains a BPSK modulator, and if nothing else, it may be a good place to start out.

 

Regards,

Daniel S.
National Instruments
0 Kudos
Message 7 of 7
(16,821 Views)