subvi specifications for communication systems projects

84
SubVI Specifications for "Communication Systems Projects with LabVIEW" By: Ed Doering

Upload: others

Post on 31-Oct-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SubVI Specifications for Communication Systems Projects

SubVI Specifications for "CommunicationSystems Projects with LabVIEW"

By:Ed Doering

Page 2: SubVI Specifications for Communication Systems Projects
Page 3: SubVI Specifications for Communication Systems Projects

SubVI Specifications for "CommunicationSystems Projects with LabVIEW"

By:Ed Doering

Online:< http://cnx.org/content/col10608/1.2/ >

Page 4: SubVI Specifications for Communication Systems Projects

This selection and arrangement of content as a collection is copyrighted by Ed Doering. It is licensed under the

Creative Commons Attribution License 2.0 (http://creativecommons.org/licenses/by/2.0/).

Collection structure revised: January 5, 2010

PDF generated: June 1, 2020

For copyright and attribution information for the modules contained in this collection, see p. 72.

Page 5: SubVI Specifications for Communication Systems Projects

Table of Contents

1 General-Purpose Utilities

1.1 Bitstream sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Bitstream conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Channel noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.4 Performance metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.5 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2 Baseband Modulation and Pulse Amplitude Modulation (PAM)

2.1 Pulse shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.2 Transmitter components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3 Bandpass Modulation

3.1 bpm_EnvelopeDetector.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.2 bpm_ProductModulator.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.3 bpm_ReceiverFilter.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4 Demodulation and Bitstream Regeneration

4.1 Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.2 Preamble processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394.3 Coherent detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.4 Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5 Hamming Block Coding

5.1 hamming_DetectorCorrector.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495.2 hamming_GeneratorMatrix.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505.3 hamming_HammingCodeParameters.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525.4 hamming_Mod2MatrixMultiply.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545.5 hamming_ParityCheckMatrix.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555.6 hamming_SyndromeTable.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6 Speaker - Air - Microphone (SAM) Channel

6.1 sam_GrabAudio.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596.2 sam_GrabAudioDynamic.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606.3 sam_ListenForAudio.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

7 Caller ID Decoder7.1 cid_Demodulator.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657.2 cid_DetectStartBit.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Attributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Page 6: SubVI Specifications for Communication Systems Projects

iv

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 7: SubVI Specifications for Communication Systems Projects

Chapter 1

General-Purpose Utilities

1.1 Bitstream sources

1.1.1 util_BitstreamFromRandom.vi1

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide2 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.1

note: Visit LabVIEW Setup3 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.1.1.1 LabVIEW SubVI: util_BitstreamFromRandom.vi

• Description: Generate a bitstream from a random number generator. The probability of generatinga 1 can be controlled, as can the value of the random number seed.

• Category: General-purpose utility ("util" pre�x)

1.1.1.2 Inputs (Controls)

1. length (128) � I322. ones probability (0.5) � DBL3. seed (-1) � I32

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1This content is available online at <http://cnx.org/content/m18528/1.2/>.2"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>3"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

1

Page 8: SubVI Specifications for Communication Systems Projects

2 CHAPTER 1. GENERAL-PURPOSE UTILITIES

1.1.1.3 Outputs (Indicators)

1. bitstream out � 1-D Boolean array

1.1.1.4 Required Behavior

• The bitstream length defaults to 128 bits.• A "seed" value of -1 indicates that a new set of random bits should be generated each time the subVI is

called. Positive seed values will cause the same pattern to be generated each time, with the particularseed value selecting a di�erent pattern.

1.1.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW4 to learn the mechanics of subVIs.Refer to the Figure 1.1 (https://youtu.be/ZQAJTo1cTY85 (1:33)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/ZQAJTo1cTY86 (1:33)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/ZQAJTo1cTY8?rel=0>

Figure 1.1: [video] LabVIEW coding tips and techniques for util_BitstreamFromRandom.vi

1.1.2 util_BitstreamFromText.vi7

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide8 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.2

note: Visit LabVIEW Setup9 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>6https://youtu.be/ZQAJTo1cTY87This content is available online at <http://cnx.org/content/m18631/1.2/>.8"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>9"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 9: SubVI Specifications for Communication Systems Projects

3

1.1.2.1 LabVIEW SubVI: util_BitstreamFromText.vi

• Description: Generate a bitstream from a sequence of text characters. Framing bits (start bit andstop bit) may optionally be added to the bitstream. The bitstream is also available in the form of awordstream.

• Category: General-purpose utility ("util" pre�x)

1.1.2.2 Inputs (Controls)

1. text � string2. insert framing bits (F) � Boolean3. start bit value (T) � Boolean

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1.1.2.3 Outputs (Indicators)

1. bitstream out � 1-D Boolean array2. wordstream out � 2-D Boolean array

1.1.2.4 Required Behavior

• Converted text follows the indexing schemes imposed by the LabVIEW built-in nodes "String to ByteArray" and "Number to Boolean Array."

• When requested, the "start bit value" will be prepended to the 8-bit Boolean value, and the complementof the "start bit value" will be appended to the 8-bit Boolean value.

• The wordstream is an Nx8 2-D version of the 1-D bitstream (Nx10 if framing bits have been inserted),where "N" is the number of characters in the text control.

1.1.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW10 to learn the mechanics of subVIs.Refer to the Figure 1.2 (https://youtu.be/PW_8jSYru_o11 (6:09)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/PW_8jSYru_o12 (6:09)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/PW_8jSYru_o?rel=0>

Figure 1.2: [video] LabVIEW coding tips and techniques for util_BitstreamFromText.vi

10"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>12https://youtu.be/PW_8jSYru_o

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 10: SubVI Specifications for Communication Systems Projects

4 CHAPTER 1. GENERAL-PURPOSE UTILITIES

1.2 Bitstream conversion

1.2.1 util_BitsToWords.vi13

13This content is available online at <http://cnx.org/content/m18596/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 11: SubVI Specifications for Communication Systems Projects

5

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide14 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.3

note: Visit LabVIEW Setup15 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.2.1.1 LabVIEW SubVI: util_BitsToWords.vi

• Description: Convert a bitstream into a wordstream (sequence of k-bit words) by reshaping a 1-DBoolean array into a 2-D Boolean array.

• Category: General-purpose utility ("util" pre�x)

1.2.1.2 Inputs (Controls)

1. bitstream in � 1-D Boolean array2. k, word size � I32

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1.2.1.3 Outputs (Indicators)

1. wordstream out � 2-D Boolean array

1.2.1.4 Required Behavior

• The inbound bitstream of length N produces an outbound wordstream (2-D array) of dimension (N/k)by k, where k is the wordsize.

• When N is not an integer multiple of k, the wordstream will be padded with Boolean "False" value.

1.2.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW16 to learn the mechanics of subVIs.Refer to the Figure 1.3 (https://youtu.be/jU6-IhCR8k417 (3:52)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

14"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>15"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>16"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 12: SubVI Specifications for Communication Systems Projects

6 CHAPTER 1. GENERAL-PURPOSE UTILITIES

https://youtu.be/jU6-IhCR8k418 (3:52)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/jU6-IhCR8k4?rel=0>

Figure 1.3: [video] LabVIEW coding tips and techniques for util_BitsToWords.vi

1.2.2 util_WordsToBits.vi19

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide20 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.4

note: Visit LabVIEW Setup21 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.2.2.1 LabVIEW SubVI: util_WordsToBits.vi

• Description: Convert a wordstream (sequence of k-bit words) into a bitstream by reshaping a 2-DBoolean array into a 1-D Boolean array.

• Category: General-purpose utility ("util" pre�x)

1.2.2.2 Inputs (Controls)

1. wordstream in � 2-D Boolean array

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1.2.2.3 Outputs (Indicators)

1. bitstream out � 1-D Boolean array

18https://youtu.be/jU6-IhCR8k419This content is available online at <http://cnx.org/content/m18551/1.2/>.20"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>21"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 13: SubVI Specifications for Communication Systems Projects

7

1.2.2.4 Required Behavior

• The inbound wordstream (2-D array) of dimension (N/k) by k, where k is the wordsize, produces anoutbound bitstream of length N.

1.2.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW22 to learn the mechanics of subVIs.Refer to the Figure 1.4 (https://youtu.be/hznhpB-dkJ423 (2:56)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/hznhpB-dkJ424 (2:56)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/hznhpB-dkJ4?rel=0>

Figure 1.4: [video] LabVIEW coding tips and techniques for util_WordsToBits.vi

1.2.3 util_BitstreamToText.vi25

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide26 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.5

note: Visit LabVIEW Setup27 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.2.3.1 LabVIEW SubVI: util_BitstreamToText.vi

• Description: Interpret a bitstream as a sequence of text characters. Framing bits (start bit and stopbit) may optionally have been added to the bitstream, and are removed. Framing errors (mismatchbetween expected and actual values of framing bits) are indicated.

• Category: General-purpose utility ("util" pre�x)

22"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>24https://youtu.be/hznhpB-dkJ425This content is available online at <http://cnx.org/content/m18629/1.2/>.26"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>27"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 14: SubVI Specifications for Communication Systems Projects

8 CHAPTER 1. GENERAL-PURPOSE UTILITIES

1.2.3.2 Inputs (Controls)

1. bitstream in � Boolean 1-D array2. includes framing bits (F) � Boolean3. start bit value (T) � Boolean

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1.2.3.3 Outputs (Indicators)

1. text out � string2. framing error? � 1-D Boolean array

1.2.3.4 Required Behavior

• The bitstream must follow the indexing schemes imposed by the LabVIEW built-in nodes "BooleanArray to Number" and "Byte Array to String."

• When includes framing bits is true, the start bit leading the 8-element Boolean subarray (a singletext character) and the trailing stop bit will be removed from the bitstream before converting to text.In addition, the start bit will be compared to the expected value start bit value; the same holdstrue for the stop bit, which is assumed to be the complement of start bit value. Any mismatch isto be �agged as a framing error by setting framing error? true.

1.2.3.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW28 to learn the mechanics of subVIs.Refer to the Figure 1.5 (https://youtu.be/XaqGTmduW7Y29 (6:06)) screencast video for LabVIEW

coding tips and techniques speci�c to this subVI.

https://youtu.be/XaqGTmduW7Y30 (6:06)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/XaqGTmduW7Y?rel=0>

Figure 1.5: [video] LabVIEW coding tips and techniques for util_BitstreamToText.vi

1.3 Channel noise

1.3.1 util_BinarySymmetricChannel.vi31

28"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>30https://youtu.be/XaqGTmduW7Y31This content is available online at <http://cnx.org/content/m18537/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 15: SubVI Specifications for Communication Systems Projects

9

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide32 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.6

note: Visit LabVIEW Setup33 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.3.1.1 LabVIEW SubVI: util_BinarySymmetricChannel.vi

• Description: A binary symmetric channel (BSC) simulates a digital communication channelwith a simple probabilistic model. The simple model makes two assumptions: (1) bit errors occurindependently for each bit transmitted through the channel, and (2) a bit error transforming a 0 to a1 is equally likely as an error transforming a 1 to a 0, i.e., the channel is symmetric. Create a subVIthat accepts an input bitstream to produce an output bitstream in which errors are inserted accordingto a speci�ed bit error rate (or probability of error).

• Category: General-purpose utility ("util" pre�x)

1.3.1.2 Inputs (Controls)

1. bitstream in � 1-D Boolean array2. bit error rate � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1.3.1.3 Outputs (Indicators)

1. bitstream out � 1-D Boolean array

1.3.1.4 Required Behavior

• Introduce bit errors into the bitstream according to the speci�ed bit error rate.• Bit errors from one bit to the next are independent of one another.• Transforming a "True" to a "False" is equally likely to transforming a "False" to a "True."

32"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>33"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 16: SubVI Specifications for Communication Systems Projects

10 CHAPTER 1. GENERAL-PURPOSE UTILITIES

1.3.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW34 to learn the mechanics of subVIs.Refer to the Figure 1.6 (https://youtu.be/tYohmUBooS835 (9:42)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI. Two distinct approaches are demonstrated, one based on the"Random Number (0-1)" built-in LabVIEW node and another based on the "Bernoulli Noise" built-insubVI.

https://youtu.be/tYohmUBooS836 (9:42)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/tYohmUBooS8?rel=0>

Figure 1.6: [video] LabVIEW coding tips and techniques for util_BinarySymmetricChannel.vi

1.3.2 util_AWGNchannel_PtByPt.vi37

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide38 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.7

note: Visit LabVIEW Setup39 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.3.2.1 LabVIEW SubVI: util_AWGNchannel_PtByPt.vi

• Description: Simulate an additive white Gaussian noise-impaired channel. This subVI works on apoint-by-point basis and is intended to operated within a for-loop or while-loop structure.

• Category: General-purpose utility ("util" pre�x)

34"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>36https://youtu.be/tYohmUBooS837This content is available online at <http://cnx.org/content/m18515/1.2/>.38"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>39"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 17: SubVI Specifications for Communication Systems Projects

11

1.3.2.2 Inputs (Controls)

1. signal in � DBL2. Eb, energy per bit [J/bit] (1) � DBL3. Eb/No, SNR per bit [dB] (10) � DBL4. fs [Hz] (1000) � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1.3.2.3 Outputs (Indicators)

1. signal out � DBL2. sigma � DBL3. Eb/No � DBL

1.3.2.4 Required Behavior

• A new sample of a Gaussian white noise process is determined and added to signal in each time thesubVI runs to produce signal out.

• The standard deviation parameter of the Gaussian white noise generator is calculated as σ =√Ebfs

2·10Eb/N0[dB]/10 and is reported by the sigma indicator.

• Eb/No indicates the SNR per bit converted from the decibel form of the corresponding control.

The equation used to convert Eb/No to standard deviation is derived in the screencast video of Figure 1.7(https://youtu.be/5Dmt-27e0nw40 (5:12)).

https://youtu.be/5Dmt-27e0nw41 (5:12)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/5Dmt-27e0nw?rel=0>

Figure 1.7: [video] Convert Eb/No to standard deviation

1.3.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW42 to learn the mechanics of subVIs.Refer to the Figure 1.8 (https://youtu.be/5sNWpkJpaYY43 (1:56)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

41https://youtu.be/5Dmt-27e0nw42"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 18: SubVI Specifications for Communication Systems Projects

12 CHAPTER 1. GENERAL-PURPOSE UTILITIES

https://youtu.be/5sNWpkJpaYY44 (1:56)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/5sNWpkJpaYY?rel=0>

Figure 1.8: [video] LabVIEW coding tips and techniques for util_AWGNchannel_PtByPt.vi

1.4 Performance metrics

1.4.1 util_MeasureBER.vi45

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide46 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.8

note: Visit LabVIEW Setup47 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.4.1.1 LabVIEW SubVI: util_MeasureBER.vi

• Description: Measure the bit error rate (BER) between two bitstreams. This subVI is commonlyused to compare a transmitted bitstream to a received bitstream after passing through a noisy channel.

• Category: General-purpose utility ("util" pre�x)

1.4.1.2 Inputs (Controls)

1. bitstream A � 1-D Boolean array2. bitstream B � 1-D Boolean array

Parentheses ( ) indicate default value; square brackets [ ] designate units.

44https://youtu.be/5sNWpkJpaYY45This content is available online at <http://cnx.org/content/m18547/1.2/>.46"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>47"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 19: SubVI Specifications for Communication Systems Projects

13

1.4.1.3 Outputs (Indicators)

1. error bitstream � 1-D Boolean array2. BER, bit error rate � DBL3. error count � I324. array size mismatch � Boolean

1.4.1.4 Required Behavior

• A bit error is de�ned as any discrepancy between bitstream A and bitstream B at each array index.The output error count indicates the total number of bit errors.

• The error bitstream output indicates T (true) at each index value where a bit error occurred. Absenceof bit errors is indicated by F (false).

• The bit error rate (BER) is calculated as the total number of bit errors divided by the bitstream length.The bit error rate is reported as NaN ("Not a Number") if the two inbound bitstreams do not have thesame length.

• The output array size mismatch will be active (T) when the two bitstreams do not have the samelength.

1.4.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW48 to learn the mechanics of subVIs.Refer to the Figure 1.9 (https://youtu.be/dDUVNp4MSaY49 (5:21)) screencast video for LabVIEW cod-

ing tips and techniques speci�c to this subVI.

https://youtu.be/dDUVNp4MSaY50 (5:21)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/dDUVNp4MSaY?rel=0>

Figure 1.9: [video] LabVIEW coding tips and techniques for util_MeasureBER.vi

1.5 Miscellaneous

1.5.1 util_EdgeDetector.vi51

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide52 module for tutorials anddocumentation that will help you:

continued on next page

48"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>50https://youtu.be/dDUVNp4MSaY51This content is available online at <http://cnx.org/content/m18606/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 20: SubVI Specifications for Communication Systems Projects

14 CHAPTER 1. GENERAL-PURPOSE UTILITIES

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.9

note: Visit LabVIEW Setup53 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.5.1.1 LabVIEW SubVI: util_EdgeDetector.vi

• Description: Detect edges (transitions) in a bitstream, and indicate rising edge, falling edge, or eitheredge as three distinct outputs.

• Category: General-purpose utility ("util" pre�x)

1.5.1.2 Inputs (Controls)

1. bitstream in � 1-D array of Boolean

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1.5.1.3 Outputs (Indicators)

1. rising edge � 1-D array of Boolean2. falling edge � 1-D array of Boolean3. either edge � 1-D array of Boolean

1.5.1.4 Required Behavior

• Each of the three Boolean output indicators is an array of the same size as the input bitstream.• rising edge is T whenever the the input bitstream sequence changes from F to T.• falling edge is T whenever the the input bitstream sequence changes from T to F.• either edge is the logical "OR" of the previous two indicator outputs.

1.5.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW54 to learn the mechanics of subVIs.Refer to the Figure 1.10 (https://youtu.be/QB6keqeYh6455 (4:36)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

52"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>53"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>54"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 21: SubVI Specifications for Communication Systems Projects

15

https://youtu.be/QB6keqeYh6456 (4:36)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/QB6keqeYh64?rel=0>

Figure 1.10: [video] LabVIEW coding tips and techniques for util_EdgeDetector.vi

1.5.2 util_GetAudio.vi57

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide58 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.10

note: Visit LabVIEW Setup59 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.5.2.1 LabVIEW SubVI: util_GetAudio.vi

• Description: Retrieve audio from a .wav �le, speci�cally the left channel, and return as a monauralwaveform.

• Category: General-purpose utility ("util" pre�x)

1.5.2.2 Inputs (Controls)

1. path � �le path

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1.5.2.3 Outputs (Indicators)

1. audio � waveform

56https://youtu.be/QB6keqeYh6457This content is available online at <http://cnx.org/content/m18532/1.2/>.58"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>59"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 22: SubVI Specifications for Communication Systems Projects

16 CHAPTER 1. GENERAL-PURPOSE UTILITIES

1.5.2.4 Required Behavior

• Retrieve a .wav audio �le which can be either monaural (single channel) or stereo (two-channel), extractthe left channel, and return as a waveform data type.

1.5.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW60 to learn the mechanics of subVIs.Refer to the Figure 1.11 (https://youtu.be/Wcua-1coR2461 (1:22)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/Wcua-1coR2462 (1:22)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/Wcua-1coR24?rel=0>

Figure 1.11: [video] LabVIEW coding tips and techniques for util_GetAudio.vi

1.5.3 util_Qfunction.vi63

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide64 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 1.11

note: Visit LabVIEW Setup65 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

1.5.3.1 LabVIEW SubVI: util_Qfunction.vi

• Description: Evaluate the Q-function Q(x), the area under the right-side tail of a zero-mean unit-variance Gaussian probability density function from x to positive in�nity. The Q-function is widelyused in communication systems for probability-of-error calculations.

• Category: General-purpose utility ("util" pre�x)

60"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>62https://youtu.be/Wcua-1coR2463This content is available online at <http://cnx.org/content/m18545/1.2/>.64"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>65"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 23: SubVI Specifications for Communication Systems Projects

17

1.5.3.2 Inputs (Controls)

1. x � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1.5.3.3 Outputs (Indicators)

1. Q(x) � DBL

1.5.3.4 Required Behavior

• Given the parameter value x, return the area under the right-side tail of a zero-mean unit-varianceGaussian probability density function from x to positive in�nity.

1.5.3.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW66 to learn the mechanics of subVIs.Refer to the Figure 1.12 (https://youtu.be/odTL3vVbJgY67 (2:59)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/odTL3vVbJgY68 (2:59)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/odTL3vVbJgY?rel=0>

Figure 1.12: [video] LabVIEW coding tips and techniques for util_Qfunction.vi

66"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>68https://youtu.be/odTL3vVbJgY

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 24: SubVI Specifications for Communication Systems Projects

18 CHAPTER 1. GENERAL-PURPOSE UTILITIES

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 25: SubVI Specifications for Communication Systems Projects

Chapter 2

Baseband Modulation and PulseAmplitude Modulation (PAM)

2.1 Pulse shapes

2.1.1 pam_RaisedCosinePulse.vi1

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide2 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 2.1

note: Visit LabVIEW Setup3 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

2.1.1.1 LabVIEW SubVI: pam_RaisedCosinePulse.vi

• Description: Create a raised cosine pulse shape suitable for a pulse amplitude modulation (PAM)transmitter.

• Category: Pulse amplitude modulation (PAM) ("pam" pre�x)

2.1.1.2 Inputs (Controls)

1. Tb, bit interval (0.01) [s] � DBL

1This content is available online at <http://cnx.org/content/m18566/1.2/>.2"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>3"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

19

Page 26: SubVI Specifications for Communication Systems Projects

20CHAPTER 2. BASEBAND MODULATION AND PULSE AMPLITUDE

MODULATION (PAM)

2. alpha, excess bandwidth factor (0.5) � DBL3. N, bit intervals for support (4) � DBL4. fs, sampling frequency (1000) [Hz] � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

2.1.1.3 Outputs (Indicators)

1. pulse shape � 1-D DBL array

2.1.1.4 Required Behavior

• "pulse shape" is an array containing the raised cosine pulse shape de�ned by the equation

p (t) = sinc (2B0t)

(cos (2παB0t)

1− 16(αB0t)2

)

• B0 = Nyquist bandwidth, the minimum possible transmit bandwidth achieved by a sinc pulse• B0 = 1

2Tb, where Tb is the bit interval

• α = roll-o� factor (also called excess bandwidth factor), 0 ≤ α ≤ 1 (alpha = 0 creates an unmodi�edsinc pulse, and alpha = 1 creates a fully damped sinc pulse with twice the Nyquist bandwidth).

• The "alpha" control value must be limited to the range 0 to 1 and be incrementable by steps of 0.1.

The raised cosine pulse shape is fundamental to digital communication systems. Its name derives fromits frequency-domain shape. Refer to the Figure 2.1 (https://youtu.be/BUvafWYXmlI4 (11:31)) screencastvideo to learn more about the raised cosine pulse.

https://youtu.be/BUvafWYXmlI5 (11:31)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/BUvafWYXmlI?rel=0>

Figure 2.1: [video] Explanation of raised cosine pulse

2.1.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW6 to learn the mechanics of subVIs.Refer to the Figure 2.2 (https://youtu.be/6mdsUWRAoqg7 (11:11)) screencast video for LabVIEW cod-

ing tips and techniques speci�c to this subVI.

5https://youtu.be/BUvafWYXmlI6"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 27: SubVI Specifications for Communication Systems Projects

21

https://youtu.be/6mdsUWRAoqg8 (11:11)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/6mdsUWRAoqg?rel=0>

Figure 2.2: [video] LabVIEW coding tips and techniques for pam_RaisedCosinePulse.vi

2.1.2 pam_RectanglePulse.vi9

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide10 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 2.2

note: Visit LabVIEW Setup11 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

2.1.2.1 LabVIEW SubVI: pam_RectanglePulse.vi

• Description: Create a rectangle pulse shape suitable for pulse amplitude modulation (PAM) trans-mitters.

• Category: Pulse amplitude modulation (PAM) ("pam" pre�x)

2.1.2.2 Inputs (Controls)

1. Tb, bit interval [s] � DBL2. fs, sampling frequency [Hz] � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

2.1.2.3 Outputs (Indicators)

1. pulse shape � 1-D DBL array

8https://youtu.be/6mdsUWRAoqg9This content is available online at <http://cnx.org/content/m18454/1.1/>.

10"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>11"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 28: SubVI Specifications for Communication Systems Projects

22CHAPTER 2. BASEBAND MODULATION AND PULSE AMPLITUDE

MODULATION (PAM)

2.1.2.4 Required Behavior

• pulse shape is an array of constant unit value.• The array length is one bit interval Tb times the sampling frequency fs.

2.1.2.5 LabVIEW Coding Tips

Review the LabVIEW help page for "Programming | Array | Initialize Array."

2.1.3 pam_ManchesterPulse.vi12

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide13 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 2.3

note: Visit LabVIEW Setup14 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

2.1.3.1 LabVIEW SubVI: pam_ManchesterPulse.vi

• Description: Create a prototype Manchester pulse shape. The Manchester pulse is a polar NRZ (nonreturn to zero) that is 1 during the �rst half of the bit interval and -1 during the second half of the bitinterval.

• Category: Pulse amplitude modulation ("pam" pre�x)

2.1.3.2 Inputs (Controls)

1. Tb, bit interval [s] (1) � DBL2. fs, sampling frequency [Hz] (10) � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

2.1.3.3 Outputs (Indicators)

1. pulse shape � 1-D array of DBL

12This content is available online at <http://cnx.org/content/m18466/1.2/>.13"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>14"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 29: SubVI Specifications for Communication Systems Projects

23

2.1.3.4 Required Behavior

• pulse shape contains Tb times fs sample points.• The �rst half of the output array contains +1, while the second half of the output array contains -1.

2.1.3.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW15 to learn the mechanics of subVIs.Refer to the Figure 2.3 (https://youtu.be/pN6SrZqiTuk16 (1:55)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/pN6SrZqiTuk17 (1:55)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/pN6SrZqiTuk?rel=0>

Figure 2.3: [video] LabVIEW coding tips and techniques for pam_ManchesterPulse.vi

2.2 Transmitter components

2.2.1 pam_SignalPointMapper.vi18

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide19 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 2.4

note: Visit LabVIEW Setup20 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

2.2.1.1 LabVIEW SubVI: pam_SignalPointMapper.vi

• Description: Map a bitstream onto two di�erent levels.• Category: Pulse amplitude modulation (PAM) ("pam" pre�x)

15"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>17https://youtu.be/pN6SrZqiTuk18This content is available online at <http://cnx.org/content/m18570/1.2/>.19"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>20"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 30: SubVI Specifications for Communication Systems Projects

24CHAPTER 2. BASEBAND MODULATION AND PULSE AMPLITUDE

MODULATION (PAM)

2.2.1.2 Inputs (Controls)

1. bitstream in � 1-D Boolean array2. T level (1) � DBL3. F level (0) � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

2.2.1.3 Outputs (Indicators)

1. signal level � 1-D DBL array

2.2.1.4 Required Behavior

• Each element of the bitstream maps to one of two possible signal levels: T values convert to the valuespeci�ed by T level and F values convert to the value speci�ed by F level.

2.2.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW21 to learn the mechanics of subVIs.Refer to the Figure 2.4 (https://youtu.be/tvemJ-Pd5yc22 (2:43)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/tvemJ-Pd5yc23 (2:43)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/tvemJ-Pd5yc?rel=0>

Figure 2.4: [video] LabVIEW coding tips and techniques for pam_SignalPointMapper.vi

2.2.2 pam_TransmitFilter.vi24

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide25 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

continued on next page

21"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>23https://youtu.be/tvemJ-Pd5yc24This content is available online at <http://cnx.org/content/m18472/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 31: SubVI Specifications for Communication Systems Projects

25

• Obtain a fully-functional evaluation edition of LabVIEW

Table 2.5

note: Visit LabVIEW Setup26 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

2.2.2.1 LabVIEW SubVI: pam_TransmitFilter.vi

• Description: Convert a sequence (array) of signal levels to a signal waveform with a user-de�nedpulse shape. Each element of the signal levels array generates one "analog" pulse (a sampled-valuediscrete-time waveform). This device is commonly called a "transmit �lter" since it is implemented byan impulse train driving an FIR �lter.

• Category: Pulse amplitude modulation (PAM) ("pam" pre�x)

2.2.2.2 Inputs (Controls)

1. signal levels in � 1-D DBL array2. pulse shape � 1-D DBL array3. Tb, bit interval [s] � DBL4. fs, sampling frequency [Hz] � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

2.2.2.3 Outputs (Indicators)

1. waveform out � waveform2. samples per bit � 1-D DBL array

2.2.2.4 Required Behavior

• Each element of signal levels in indicates the amplitude of a user-de�ned pulse shape, which isassumed to have a unit amplitude.

• Pulses are generated once each bit interval de�ned by Tb. The �nished waveform waveform out is thesuperposition (sum) of all individual time-shifted pulse waveforms.

• The prototype waveform waveform out may extend beyond a single bit interval.

2.2.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW27 to learn the mechanics of subVIs.Refer to the Figure 2.5 (https://youtu.be/-Nrwbf4tkWA28 (9:35)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

25"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>26"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>27"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 32: SubVI Specifications for Communication Systems Projects

26CHAPTER 2. BASEBAND MODULATION AND PULSE AMPLITUDE

MODULATION (PAM)

https://youtu.be/-Nrwbf4tkWA29 (9:35)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/-Nrwbf4tkWA?rel=0>

Figure 2.5: [video] LabVIEW coding tips and techniques for pam_TransmitFilter.vi

2.2.3 pam_TransmitSync.vi30

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide31 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 2.6

note: Visit LabVIEW Setup32 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

2.2.3.1 LabVIEW SubVI: pam_TransmitSync.vi

• Description: Create transmitter sync pulses to indicate the start and end of a bit interval. Alsoreport the samples per bit interval.

• Category: Pulse amplitude modulation ("pam" pre�x)

2.2.3.2 Inputs (Controls)

1. message length (10) � I322. Tb, bit interval [s] (1) � DBL3. fs, sampling frequency [Hz] (10) � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

29https://youtu.be/-Nrwbf4tkWA30This content is available online at <http://cnx.org/content/m18478/1.2/>.31"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>32"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 33: SubVI Specifications for Communication Systems Projects

27

2.2.3.3 Outputs (Indicators)

1. start bit interval � 1-D array of Boolean2. end bit interval � 1-D array of Boolean3. samples per bit interval � I32

2.2.3.4 Required Behavior

• samples per bit interval indicates Tb times fs sample points.• start bit interval and end bit interval each contain message length times samples per bit

interval elements in which T indicates the boundary of a bit interval.• The �rst element of start bit interval is T. The remaining elements for the bit interval are F.• end bit interval is similar to start bit interval, except the T element occurs at the end of a bit

interval.

2.2.3.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW33 to learn the mechanics of subVIs.Refer to the Figure 2.6 (https://youtu.be/g3_bCf9rzs434 (3:18)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/g3_bCf9rzs435 (3:18)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/g3_bCf9rzs4?rel=0>

Figure 2.6: [video] LabVIEW coding tips and techniques for pam_TransmitSync.vi

33"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>35https://youtu.be/g3_bCf9rzs4

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 34: SubVI Specifications for Communication Systems Projects

28CHAPTER 2. BASEBAND MODULATION AND PULSE AMPLITUDE

MODULATION (PAM)

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 35: SubVI Specifications for Communication Systems Projects

Chapter 3

Bandpass Modulation

3.1 bpm_EnvelopeDetector.vi1

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide2 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 3.1

note: Visit LabVIEW Setup3 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

3.1.1 LabVIEW SubVI: bpm_EnvelopeDetector.vi

• Description: Demodulate an amplitude shift keyed (ASK) signal using envelope detection, a typeof noncoherent detection. The envelope detector is a "square-law" device (actually an absolute valueoperator) followed by a lowpass �lter.

• Category: Bandpass modulation ("bpm" pre�x)

3.1.2 Inputs (Controls)

1. modulated signal in � waveform2. LPF corner frequency [Hz] (100) � DBL3. LPF order (2) � I32

Parentheses ( ) indicate default value; square brackets [ ] designate units.

1This content is available online at <http://cnx.org/content/m18420/1.2/>.2"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>3"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

29

Page 36: SubVI Specifications for Communication Systems Projects

30 CHAPTER 3. BANDPASS MODULATION

3.1.3 Outputs (Indicators)

1. baseband signal out � waveform

3.1.4 Required Behavior

• The absolute value of modulated signal in is �ltered by a Butterworth lowpass �lter to producebaseband signal out

• The Butterworth �lter corner frequency and order may be adjusted.

3.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW4 to learn the mechanics of subVIs.Refer to the Figure 3.1 (https://youtu.be/kbUbKudw0NI5 (4:11)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/kbUbKudw0NI6 (4:11)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/kbUbKudw0NI?rel=0>

Figure 3.1: [video] LabVIEW coding tips and techniques for bpm_EnvelopeDetector.vi

3.2 bpm_ProductModulator.vi7

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide8 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 3.2

note: Visit LabVIEW Setup9 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>6https://youtu.be/kbUbKudw0NI7This content is available online at <http://cnx.org/content/m18556/1.2/>.8"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>9"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 37: SubVI Specifications for Communication Systems Projects

31

3.2.1 LabVIEW SubVI: bpm_ProductModulator.vi

• Description: Modulate a baseband signal by a sinusoidal carrier wave that has unit energy as mea-sured over a single bit interval.

• Category: Bandpass modulation ("bpm" pre�x)

3.2.2 Inputs (Controls)

1. waveform in � waveform2. Tb, bit interval [s] � DBL3. fc, carrier frequency [Hz] � DBL4. fs, sampling frequency [Hz] � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

3.2.3 Outputs (Indicators)

1. waveform out � waveform2. carrier � waveform

3.2.4 Required Behavior

• waveform out is the product of waveform in and the sinusoidal carrier signal

Accos (2πfct)

, whereAc

is the carrier amplitude andfc

is the carrier frequency in Hz.• The carrier sinusoid amplitude must be

Ac =

√2

Tb

in order to achieve the "unit energy per bit interval" criterion. The Figure 3.2 (https://youtu.be/_fw-qIvX9V010 (2:41)) screencast video explains the origin of this equation.

• carrier is the output of the sinusoidal oscillator used to modulate the inbound signal.

https://youtu.be/_fw-qIvX9V011 (2:41)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/_fw-qIvX9V0?rel=0>

Figure 3.2: [video] Explanation of the "unit energy per bit" amplitude equation

11https://youtu.be/_fw-qIvX9V0

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 38: SubVI Specifications for Communication Systems Projects

32 CHAPTER 3. BANDPASS MODULATION

3.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW12 to learn the mechanics of subVIs.Refer to the Figure 3.3 (https://youtu.be/KuKY_VO-icQ13 (6:17)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/KuKY_VO-icQ14 (6:17)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/KuKY_VO-icQ?rel=0>

Figure 3.3: [video] LabVIEW coding tips and techniques for bpm_ProductModulator.vi

3.3 bpm_ReceiverFilter.vi15

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide16 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 3.3

note: Visit LabVIEW Setup17 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

3.3.1 LabVIEW SubVI: bpm_ReceiverFilter.vi

• Description: Remove out-of-band signals at the front end of a receiver using a bandpass �lter tunedto the carrier frequency and with a bandwidth that matches the bandwidth of the transmitted signal.

• Category: Bandpass modulation ("bpm" pre�x)

12"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>14https://youtu.be/KuKY_VO-icQ15This content is available online at <http://cnx.org/content/m18436/1.2/>.16"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>17"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 39: SubVI Specifications for Communication Systems Projects

33

3.3.2 Inputs (Controls)

1. signal in � waveform2. center frequency [Hz] (1000) � DBL3. bandwidth [Hz] (100) � DBL4. order (10) � I32

Parentheses ( ) indicate default value; square brackets [ ] designate units.

3.3.3 Outputs (Indicators)

1. signal out � waveform

3.3.4 Required Behavior

• signal in is �ltered by an elliptic bandpass �lter to produce signal out

• The elliptic �lter characteristics (center frequency, bandwidth, and order) may be adjusted.

3.3.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW18 to learn the mechanics of subVIs.Refer to the Figure 3.4 (https://youtu.be/e-GRyW4vStg19 (2:51)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/e-GRyW4vStg20 (2:51)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/e-GRyW4vStg?rel=0>

Figure 3.4: [video] LabVIEW coding tips and techniques for bpm_ReceiverFilter.vi

18"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>20https://youtu.be/e-GRyW4vStg

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 40: SubVI Specifications for Communication Systems Projects

34 CHAPTER 3. BANDPASS MODULATION

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 41: SubVI Specifications for Communication Systems Projects

Chapter 4

Demodulation and BitstreamRegeneration

4.1 Synchronization

4.1.1 regen_BitClock.vi1

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide2 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 4.1

note: Visit LabVIEW Setup3 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4.1.1.1 LabVIEW SubVI: regen_BitClock.vi

• Description: Create a bit clock signal based on a free-running oscillator with a sync input. The bitclock signal is a square wave oscillating at a nominal frequency. The oscillator phase resets when thesynchronizing input pulse is active.

• Category: Bitstream regeneration ("regen" pre�x)

1This content is available online at <http://cnx.org/content/m18612/1.2/>.2"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>3"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

35

Page 42: SubVI Specifications for Communication Systems Projects

36 CHAPTER 4. DEMODULATION AND BITSTREAM REGENERATION

4.1.1.2 Inputs (Controls)

1. restart bit interval � 1-D Boolean array2. nominal frequency [Hz] � DBL3. fs [Hz] � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

4.1.1.3 Outputs (Indicators)

1. bit clock � 1-D Boolean array

4.1.1.4 Required Behavior

• bit clock is the output of a square wave oscillator represented as a Boolean array. The nominaloscillation frequency is determined by the inputs nominal frequency in Hz and the system samplingfrequency fs, also in Hz.

• The bit clock output array is the same length as the input array restart bit interval.• The oscillator phase resets anytime that restart bit interval is T, thereby synchronizing the bit

clock to the beginning of a bit interval as detected by another system.

4.1.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW4 to learn the mechanics of subVIs.Refer to the Figure 4.1 (https://youtu.be/h0FNgBWy0fU5 (3:09)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/h0FNgBWy0fU6 (3:09)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/h0FNgBWy0fU?rel=0>

Figure 4.1: [video] LabVIEW coding tips and techniques for regen_BitClock.vi

4.1.2 regen_BitSync.vi7

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide8 module for tutorials and doc-umentation that will help you:

continued on next page

4"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>6https://youtu.be/h0FNgBWy0fU7This content is available online at <http://cnx.org/content/m18627/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 43: SubVI Specifications for Communication Systems Projects

37

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 4.2

note: Visit LabVIEW Setup9 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4.1.2.1 LabVIEW SubVI: regen_BitSync.vi

• Description: Recover a bitstream synchronization signal from a polar NRZ baseband signal as anarray of sampling instants.

• Category: Bitstream regeneration ("regen" pre�x)

4.1.2.2 Inputs (Controls)

1. signal in � waveform2. bit rate [Hz] � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

4.1.2.3 Outputs (Indicators)

1. sampling instants � Boolean 1-D array2. intermediate signals � cluster of three waveforms: (1) absolute value, (2) bandpass �lter, and (3)

thresholded BPF

4.1.2.4 Required Behavior

• Pass signal in through a "square-law" device (square the waveform), and then through a narrowbandbandpass �lter tuned to the bit rate.

• Detect locations of negative-going zero crossings of the bandpass �lter output and return as the Booleanarray sampling instants.

• Bundle the intermediate signals (square-law device output, bandpass �lter output, and thresholdedbandpass �lter output) as the cluster intermediate signals.

4.1.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW10 to learn the mechanics of subVIs.Refer to the Figure 4.2 (https://youtu.be/8cFPJ8X4Lus11 (7:39)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

8"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>9"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

10"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 44: SubVI Specifications for Communication Systems Projects

38 CHAPTER 4. DEMODULATION AND BITSTREAM REGENERATION

https://youtu.be/8cFPJ8X4Lus12 (7:39)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/8cFPJ8X4Lus?rel=0>

Figure 4.2: [video] LabVIEW coding tips and techniques for regen_BitSync.vi

4.1.3 regen_FrameSync.vi13

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide14 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 4.3

note: Visit LabVIEW Setup15 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4.1.3.1 LabVIEW SubVI: regen_FrameSync.vi

• Description: Establish frame sync on a message containing a standard preamble, and then return themessage portion of the bitstream. The bitstream must satisfy the following requirement: (1) Messageframe size = 10 bits (start bit, 8-bit character, and stop bit), (2) start bit = F, stop bit = T , and (3)message is preceded by one frame containing the 8-bit value 0xFF. Requirement (3) can equivalentlybe restated as the preamble must end with 9 consecutive T values.

• Category: Bitstream regeneration ("regen" pre�x)

4.1.3.2 Inputs (Controls)

1. bitstream in � 1-D Boolean array

Parentheses ( ) indicate default value; square brackets [ ] designate units.

12https://youtu.be/8cFPJ8X4Lus13This content is available online at <http://cnx.org/content/m18576/1.2/>.14"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>15"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 45: SubVI Specifications for Communication Systems Projects

39

4.1.3.3 Outputs (Indicators)

1. bitstream out � 1-D Boolean array2. message detected? � Boolean

4.1.3.4 Required Behavior

• Search bitstream in for 9 consecutive T values, and return the remaining array as bitstream out.Return an empty array if the required pattern is not found.

• Set message detected? to T if the required pattern is found.

4.1.3.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW16 to learn the mechanics of subVIs.Refer to the Figure 4.3 (https://youtu.be/seT-98quPuY17 (3:06)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/seT-98quPuY18 (3:06)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/seT-98quPuY?rel=0>

Figure 4.3: [video] LabVIEW coding tips and techniques for regen_FrameSync.vi

4.2 Preamble processing

4.2.1 regen_ExtractPreamble.vi19

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide20 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 4.4

16"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>18https://youtu.be/seT-98quPuY19This content is available online at <http://cnx.org/content/m18585/1.2/>.20"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 46: SubVI Specifications for Communication Systems Projects

40 CHAPTER 4. DEMODULATION AND BITSTREAM REGENERATION

note: Visit LabVIEW Setup21 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4.2.1.1 LabVIEW SubVI: regen_ExtractPreamble.vi

• Description: Detect and extract the preamble from a baseband signal. A preset number of alternating1s and 0s (also designated as marks and spaces) typically starts the preamble to "wake up" thereceiver's carrier sync and bit sync subsystems. This subVI assumes the received signal is quiet(nominally zero) prior to the preamble.

• Category: Bitstream regeneration ("regen" pre�x)

4.2.1.2 Inputs (Controls)

1. signal in � waveform2. Tb [s] � DBL3. bit intervals to skip (4) � I324. bit intervals to keep (32) � I325. threshold (0.1) � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

4.2.1.3 Outputs (Indicators)

1. preamble out � waveform2. preamble detected? � Boolean

4.2.1.4 Required Behavior

• signal in is scanned from the beginning to detect when the signal amplitude exceeds threshold. Ifthe input signal never exceeds the threshold, preamble out returns an empty waveform and preamble

detected? returns F.• Once a valid threshold crossing is detected, preamble out extracts a portion of signal in of duration

bit intervals to keep times the bit interval Tb; the extracted signal begins at the location of the�rst threshold crossing plus bit intervals to skip times the bit interval. The Boolean indicatorpreamble detected? is set to T.

4.2.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW22 to learn the mechanics of subVIs.Refer to the Figure 4.4 (https://youtu.be/8T3MIFLer5c23 (2:19)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

21"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>22"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 47: SubVI Specifications for Communication Systems Projects

41

https://youtu.be/8T3MIFLer5c24 (2:19)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/8T3MIFLer5c?rel=0>

Figure 4.4: [video] LabVIEW coding tips and techniques for regen_ExtractPreamble.vi

4.2.2 regen_NormalizeToPreamble.vi25

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide26 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 4.5

note: Visit LabVIEW Setup27 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4.2.2.1 LabVIEW SubVI: regen_NormalizeToPreamble.vi

• Description: Normalize a received baseband signal according to the DC and RMS values of thepreamble portion of the signal. The preamble is assumed to be a region of alternating 1s and 0s(marks and spaces) that approximates a sinusoid. The DC o�set and RMS values of the preamble aremeasured, and then used to normalize the entire signal.

• Category: Bitstream regeneration ("regen" pre�x)

4.2.2.2 Inputs (Controls)

1. signal in � waveform2. preamble � waveform

Parentheses ( ) indicate default value; square brackets [ ] designate units.

24https://youtu.be/8T3MIFLer5c25This content is available online at <http://cnx.org/content/m18483/1.2/>.26"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>27"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 48: SubVI Specifications for Communication Systems Projects

42 CHAPTER 4. DEMODULATION AND BITSTREAM REGENERATION

4.2.2.3 Outputs (Indicators)

1. normalized signal out � waveform2. preamble DC value � DBL3. preamble RMS value � DBL

4.2.2.4 Required Behavior

• Measure the DC (average) value of preamble.• Measure the RMS (root mean square) value of preamble.• Produce normalized signal out by (1) subtracting the DC value from signal in, (2) dividing by

the RMS value, and (3) multiplying by the square root of 2. The resulting signal has approximatelyzero average value and lies approximately in the range ±.

• Return the measured DC and RMS values as indicators.

4.2.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW28 to learn the mechanics of subVIs.Refer to the Figure 4.5 (https://youtu.be/Uxu6MsRpGXA29 (1:43)) screencast video for LabVIEW cod-

ing tips and techniques speci�c to this subVI.

https://youtu.be/Uxu6MsRpGXA30 (1:43)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/Uxu6MsRpGXA?rel=0>

Figure 4.5: [video] LabVIEW coding tips and techniques for regen_NormalizeToPreamble.vi

4.3 Coherent detection

4.3.1 regen_Correlator.vi31

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide32 module for tutorials anddocumentation that will help you:

continued on next page

28"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>30https://youtu.be/Uxu6MsRpGXA31This content is available online at <http://cnx.org/content/m18579/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 49: SubVI Specifications for Communication Systems Projects

43

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 4.6

note: Visit LabVIEW Setup33 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4.3.1.1 LabVIEW SubVI: regen_Correlator.vi

• Description: Demodulate a pulse-amplitude modulated (PAM) signal using a correlator. The cor-relator multiples the received signal by the same pulse shape used by the transmitter and integratesthe product over the bit interval. A Boolean control indicates when to clear the integrator and restartthe pulse. This subVI is intended for point-by-point operation within a repeating structure such as afor-loop or while-loop.

• Category: Bitstream regeneration ("regen" pre�x)

4.3.1.2 Inputs (Controls)

1. signal in � DBL2. fs [Hz] � DBL3. start integrating � Boolean4. pulse � 1-D array of DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

4.3.1.3 Outputs (Indicators)

1. signal out � DBL

4.3.1.4 Required Behavior

• signal out is the time integral of the product of signal in and the pulse shape pulse. The integra-tion is computed on a point-by-point basis, so each call to the subVI calculates only a single outputvalue. The integrator output and position (index) within the pulse signal is preserved from one subVIcall to the next.

• When start integrating is T the integrator is reset and the pulse signal index is reset to zero, i.e.,the beginning of the pulse shape array.

32"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>33"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 50: SubVI Specifications for Communication Systems Projects

44 CHAPTER 4. DEMODULATION AND BITSTREAM REGENERATION

4.3.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW34 to learn the mechanics of subVIs.Refer to the Figure 4.6 (https://youtu.be/fZpk1wR_xhk35 (5:11)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/fZpk1wR_xhk36 (5:11)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/fZpk1wR_xhk?rel=0>

Figure 4.6: [video] LabVIEW coding tips and techniques for regen_Correlator.vi

4.4 Sampling

4.4.1 regen_SampleHold.vi37

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide38 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 4.7

note: Visit LabVIEW Setup39 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4.4.1.1 LabVIEW SubVI: regen_SampleHold.vi

• Description: Sample a signal on demand and hold the signal value across multiple calls to the subVI.This subVI is intended for point-by-point processing within a for-loop or while-loop structure.

• Category: Bitstream regeneration ("regen" pre�x)

34"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>36https://youtu.be/fZpk1wR_xhk37This content is available online at <http://cnx.org/content/m18621/1.2/>.38"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>39"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 51: SubVI Specifications for Communication Systems Projects

45

4.4.1.2 Inputs (Controls)

1. signal in � DBL2. sample now � Boolean

Parentheses ( ) indicate default value; square brackets [ ] designate units.

4.4.1.3 Outputs (Indicators)

1. signal out � DBL

4.4.1.4 Required Behavior

• signal out takes on one of two possible values: if sample now is T the output value is signal in,otherwise it is the value of signal out from the previous call to the subVI.

4.4.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW40 to learn the mechanics of subVIs.Refer to the Figure 4.7 (https://youtu.be/cnjXC3nAjdI41 (2:07)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/cnjXC3nAjdI42 (2:07)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/cnjXC3nAjdI?rel=0>

Figure 4.7: [video] LabVIEW coding tips and techniques for regen_SampleHold.vi

4.4.2 regen_Sampler.vi43

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide44 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 4.8

40"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>42https://youtu.be/cnjXC3nAjdI43This content is available online at <http://cnx.org/content/m18593/1.2/>.44"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 52: SubVI Specifications for Communication Systems Projects

46 CHAPTER 4. DEMODULATION AND BITSTREAM REGENERATION

note: Visit LabVIEW Setup45 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4.4.2.1 LabVIEW SubVI: regen_Sampler.vi

• Description: Sample a signal at selected instants in time. The signal input is a discrete-time sampledsignal that represents an "analog" signaling waveform. The sampling instants are indicated by aBoolean array of the same length as the signal input. A user-de�ned delay can be applied to shift thesampling instants by a �xed amount.

• Category: Bitstream regeneration ("regen" pre�x)

4.4.2.2 Inputs (Controls)

1. signal in � waveform2. sampling instants � 1-D Boolean array3. delay [samples] (0) � I32

Parentheses ( ) indicate default value; square brackets [ ] designate units.

4.4.2.3 Outputs (Indicators)

1. sampling signal out � 1-D array of DBL2. actual sampling instants � 1-D Boolean array

4.4.2.4 Required Behavior

• sampled signal out contains the subset of values from signal in that match the index values of theT-valued elements of sampling instants. sampling instants is assumed to be of the same lengthas signal in. Expressed another way, the Boolean array sampling instants contains T (true) valuesat each time that signal in is to be sampled. The output sampled signal out therefore containsthe resulting samples.

• The delay value adds a constant shift to the position of the sampling instants. The delay amountdefaults to zero; a positive value delays the sampling instants and a negative value advances thesampling instants.

• The actual sampling instants is a copy of the input sampling instants with the delay valueapplied.

4.4.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW46 to learn the mechanics of subVIs.Refer to the Figure 4.8 (https://youtu.be/roSoDcBvaEI47 (5:07)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

45"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>46"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 53: SubVI Specifications for Communication Systems Projects

47

https://youtu.be/roSoDcBvaEI48 (5:07)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/roSoDcBvaEI?rel=0>

Figure 4.8: [video] LabVIEW coding tips and techniques for regen_Sampler.vi

4.4.3 regen_BitstreamBu�er.vi49

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide50 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 4.9

note: Visit LabVIEW Setup51 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

4.4.3.1 LabVIEW SubVI: regen_BitstreamBu�er.vi

• Description: Build a bitstream by accumulating bits on demand. This subVI is intended for point-by-point processing within a for-loop or while-loop structure.

• Category: Bitstream regeneration ("regen" pre�x)

4.4.3.2 Inputs (Controls)

1. bit in � Boolean2. save bit � Boolean

Parentheses ( ) indicate default value; square brackets [ ] designate units.

4.4.3.3 Outputs (Indicators)

1. bitstream out � 1-D array of Boolean

48https://youtu.be/roSoDcBvaEI49This content is available online at <http://cnx.org/content/m18494/1.2/>.50"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>51"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 54: SubVI Specifications for Communication Systems Projects

48 CHAPTER 4. DEMODULATION AND BITSTREAM REGENERATION

4.4.3.4 Required Behavior

• The bitstream out array is empty on the �rst call to the subVI.• The bitstream out array values are retained from one subVI call to the next.• When save bit is T the bit in value is appended to the bitstream out array, otherwise the array

returned unchanged.

4.4.3.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW52 to learn the mechanics of subVIs.Refer to the Figure 4.9 (https://youtu.be/DILC31G4QmQ53 (2:50)) screencast video for LabVIEW cod-

ing tips and techniques speci�c to this subVI.

https://youtu.be/DILC31G4QmQ54 (2:50)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/DILC31G4QmQ?rel=0>

Figure 4.9: [video] LabVIEW coding tips and techniques for regen_BitstreamBu�er.vi

52"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>54https://youtu.be/DILC31G4QmQ

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 55: SubVI Specifications for Communication Systems Projects

Chapter 5

Hamming Block Coding

5.1 hamming_DetectorCorrector.vi1

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide2 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 5.1

note: Visit LabVIEW Setup3 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

5.1.1 LabVIEW SubVI: hamming_DetectorCorrector.vi

• Description: Implement (n,k) Hamming linear block code error detection and correction using the"table lookup syndrome decoder" method. The syndrome calculated from a received stream of code-words is used as an index into the syndrome table to retrieve the most-likely error pattern, whichsubsequently is added (modulo-2 addition) to the received codeword to generate the corrected code-word output. Checkbits may optionally be removed from the output wordstream. Detected errors(single and double bit errors) are indicated separately.

• Category: Hamming (n,k) block code ("hamming" pre�x)

5.1.2 Inputs (Controls)

1. uncorrected wordstream � Boolean 2-D array

1This content is available online at <http://cnx.org/content/m18427/1.2/>.2"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>3"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

49

Page 56: SubVI Specifications for Communication Systems Projects

50 CHAPTER 5. HAMMING BLOCK CODING

2. syndrome � Boolean 2-D array3. syndrome table � Boolean 2-D array4. remove checkbits (F) � Boolean

Parentheses ( ) indicate default value; square brackets [ ] designate units.

5.1.3 Outputs (Indicators)

1. corrected wordstream � Boolean 2-D array2. error detected � Boolean 1-D array

5.1.4 Required Behavior

Refer to the description above.

5.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW4 to learn the mechanics of subVIs.Refer to the Figure 5.1 (https://youtu.be/0Mo0Xm8QEOE5 (4:32)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/0Mo0Xm8QEOE6 (4:32)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/0Mo0Xm8QEOE?rel=0>

Figure 5.1: [video] LabVIEW coding tips and techniques for hamming_DetectorCorrector.vi

5.2 hamming_GeneratorMatrix.vi7

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide8 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 5.2

4"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>6https://youtu.be/0Mo0Xm8QEOE7This content is available online at <http://cnx.org/content/m18563/1.2/>.8"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 57: SubVI Specifications for Communication Systems Projects

51

note: Visit LabVIEW Setup9 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

5.2.1 LabVIEW SubVI: hamming_HammingCodeParamters.vi

• Description: Create the generator matrix (G matrix) for the (n,k) Hamming linear block code, aswell as the parity matrix (P matrix), given the number of checkbits "q" and the message length "k".

• Category: Hamming (n,k) block code ("hamming" pre�x)

5.2.2 Inputs (Controls)

1. q, checkbits (3) � I322. k, message length (4) � I32

Parentheses ( ) indicate default value; square brackets [ ] designate units.

5.2.3 Outputs (Indicators)

1. G matrix, k by n � Real Matrix2. P matrix, k by q � Real Matrix

5.2.4 Required Behavior

1. "P" is a k by q matrix of q-bit words containing two or more 1s arranged in any order (or, equivalently,the minimum Hamming weight of each row of the "P" matrix is 2).

2. "G" is de�ned as [I | P], where I is the k by k identity matrix.

5.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW10 to learn the mechanics of subVIs.Refer to the Figure 5.2 (https://youtu.be/CbEEX1EHiU411 (12:14)) screencast video for LabVIEW cod-

ing tips and techniques speci�c to this subVI.

https://youtu.be/CbEEX1EHiU412 (12:14)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/CbEEX1EHiU4?rel=0>

Figure 5.2: [video] LabVIEW coding tips and techniques for hamming_GeneratorMatrix.vi

9"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>10"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>12https://youtu.be/CbEEX1EHiU4

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 58: SubVI Specifications for Communication Systems Projects

52 CHAPTER 5. HAMMING BLOCK CODING

5.3 hamming_HammingCodeParameters.vi13

13This content is available online at <http://cnx.org/content/m18441/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 59: SubVI Specifications for Communication Systems Projects

53

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide14 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 5.3

note: Visit LabVIEW Setup15 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

5.3.1 LabVIEW SubVI: hamming_HammingCodeParameters.vi

• Description: Generate the (n,k) parameters for a Hamming linear block code given the exponent q.Also calculate the coding rate.

• Category: Hamming (n,k) block code ("hamming" pre�x)

5.3.2 Inputs (Controls)

1. q, checkbits (3) � I32

Parentheses ( ) indicate default value; square brackets [ ] designate units.

5.3.3 Outputs (Indicators)

1. n, codeword length � I322. k, message length � I323. Rc, code rate � DBL

5.3.4 Required Behavior

1. n = 2q − 12. k = n− q3. Rc =

kn

5.3.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW16 to learn the mechanics of subVIs.Refer to the Figure 5.3 (https://youtu.be/90zOARlbo-A17 (2:45)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

14"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>15"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>16"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 60: SubVI Specifications for Communication Systems Projects

54 CHAPTER 5. HAMMING BLOCK CODING

https://youtu.be/90zOARlbo-A18 (2:45)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/90zOARlbo-A?rel=0>

Figure 5.3: [video] LabVIEW coding tips and techniques for hamming_HammingCodeParameters.vi

5.4 hamming_Mod2MatrixMultiply.vi19

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide20 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 5.4

note: Visit LabVIEW Setup21 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

5.4.1 LabVIEW SubVI: hamming_Mod2MatrixMultiply.vi

• Description: Multiply two matrices A and B under modulo-2 arithmetic.• Category: Hamming (n,k) block code ("hamming" pre�x)

5.4.2 Inputs (Controls)

1. A � Real Matrix2. B � Real Matrix

Parentheses ( ) indicate default value; square brackets [ ] designate units.

5.4.3 Outputs (Indicators)

1. A*B � Real Matrix

18https://youtu.be/90zOARlbo-A19This content is available online at <http://cnx.org/content/m18562/1.2/>.20"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>21"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 61: SubVI Specifications for Communication Systems Projects

55

5.4.4 Required Behavior

The subVI produces the matrix product of A and B subject to modulo-2 arithmetic. Since this subVIis intended for use on matrices populated only by the values 0 and 1, multiplication follows the standardarithmetic rules, while sums are computed using modulo-2 addition.

5.4.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW22 to learn the mechanics of subVIs.Refer to the Figure 5.4 (https://youtu.be/_p7TY01Mpbs23 (1:55)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/_p7TY01Mpbs24 (1:55)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/_p7TY01Mpbs?rel=0>

Figure 5.4: [video] LabVIEW coding tips and techniques for hamming_Mod2MatrixMultiply.vi

5.5 hamming_ParityCheckMatrix.vi25

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide26 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 5.5

note: Visit LabVIEW Setup27 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

5.5.1 LabVIEW SubVI: hamming_ParityCheckMatrix.vi

• Description: Create the parity check matrix (H matrix) for the (n,k) Hamming linear block code,given the parity matrix (P matrix). Since the matrix is de�ned in terms of its transpose, the subVIactually produces HT (the transpose of H).

22"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>24https://youtu.be/_p7TY01Mpbs25This content is available online at <http://cnx.org/content/m18460/1.2/>.26"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>27"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 62: SubVI Specifications for Communication Systems Projects

56 CHAPTER 5. HAMMING BLOCK CODING

• Category: Hamming (n,k) block code ("hamming" pre�x)

5.5.2 Inputs (Controls)

1. P matrix, k by q � Real Matrix

Parentheses ( ) indicate default value; square brackets [ ] designate units.

5.5.3 Outputs (Indicators)

1. HT matrix, q by n � Real Matrix

5.5.4 Required Behavior

1. The transpose of the parity check matrix is

HT ,

[P

Iq

], where

Iq

is the q by q identity matrix, and P is the parity matrix associated with Hamming code generator (G)matrix.

5.5.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW28 to learn the mechanics of subVIs.Refer to the Figure 5.5 (https://youtu.be/8BrMBNk6vK429 (3:26)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/8BrMBNk6vK430 (3:26)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/8BrMBNk6vK4?rel=0>

Figure 5.5: [video] LabVIEW coding tips and techniques for hamming_ParityCheckMatrix.vi

5.6 hamming_SyndromeTable.vi31

28"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>30https://youtu.be/8BrMBNk6vK431This content is available online at <http://cnx.org/content/m18618/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 63: SubVI Specifications for Communication Systems Projects

57

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide32 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 5.6

note: Visit LabVIEW Setup33 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

5.6.1 LabVIEW SubVI: hamming_SyndromeTable.vi

• Description: Create the syndrome table for the Hamming block code channel decoder. The tablecontains the most likely error patterns indexed by syndrome number.

• Category: Hamming (n,k) block code ("hamming" pre�x)

5.6.2 Inputs (Controls)

1. HT matrix, n by q � Real Matrix

Parentheses ( ) indicate default value; square brackets [ ] designate units.

5.6.3 Outputs (Indicators)

1. syndrome table � Boolean 2-D array

5.6.4 Required Behavior

• Determine the number of checkbits "q" from the dimensions of matrix HT.• "Most likely" error patterns are the no-error pattern and all possible single-bit error patterns.• Syndrome table is an array of most likely error patterns indexed according to the associated syndrome

number. For example, suppose the error pattern FFTFFFF was found to produce a syndrome valueTTF. Retrieving the array value of syndrome table at index "3" will then produce the Boolean arrayFFTFFFF. Note that the syndrome pattern is converted to an integer using the built-in LabVIEW node"Boolean Array to Number" which assumes the �rst element in the Boolean array is the least signi�cantbit.

32"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>33"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 64: SubVI Specifications for Communication Systems Projects

58 CHAPTER 5. HAMMING BLOCK CODING

5.6.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW34 to learn the mechanics of subVIs.Refer to the Figure 5.6 (https://youtu.be/RY5Bue1dPHA35 (9:13)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/RY5Bue1dPHA36 (9:13)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/RY5Bue1dPHA?rel=0>

Figure 5.6: [video] LabVIEW coding tips and techniques for hamming_SyndromeTable.vi

34"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>36https://youtu.be/RY5Bue1dPHA

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 65: SubVI Specifications for Communication Systems Projects

Chapter 6

Speaker - Air - Microphone (SAM)Channel

6.1 sam_GrabAudio.vi1

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide2 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 6.1

note: Visit LabVIEW Setup3 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

6.1.1 LabVIEW SubVI: sam_GrabAudio.vi

• Description: Wait for audio to exceed a user-de�ned threshold, and then record audio for a speci�edtime interval. This subVI depends on sam_ListenForAudio.vi.

• Category: Speaker-air-microphone (SAM) channel ("sam" pre�x)

6.1.2 Inputs (Controls)

1. duration [s] (1) � DBL2. threshold level (0.1) � DBL3. fs [Hz] (22050) � DBL

1This content is available online at <http://cnx.org/content/m18499/1.2/>.2"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>3"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

59

Page 66: SubVI Specifications for Communication Systems Projects

60 CHAPTER 6. SPEAKER - AIR - MICROPHONE (SAM) CHANNEL

4. error in (no error) � error cluster

Parentheses ( ) indicate default value; square brackets [ ] designate units.

6.1.3 Outputs (Indicators)

1. waveform out � waveform2. error out � error cluster

6.1.4 Required Behavior

• Use sam_ListenForAudio.vi to continually acquire audio samples in 1024-sample blocks. Once"sam_ListenForAudio" completes execution (i.e., then the audio level exceeds threshold level),record audio for duration seconds at the sampling frequency fs.

• The audio output of sam_ListenForAudio.vi serves as the beginning of the audio signal waveform out.• The sound-card must be cleaned up using "Graphics and Sound | Sound | Input | Sound Input Clear"

once the audio has been recorded.

6.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW4 to learn the mechanics of subVIs.Refer to the Figure 6.1 (https://youtu.be/uf1Q4gi3UU05 (9:02)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/uf1Q4gi3UU06 (9:02)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/uf1Q4gi3UU0?rel=0>

Figure 6.1: [video] LabVIEW coding tips and techniques for sam_GrabAudio.vi

6.2 sam_GrabAudioDynamic.vi7

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide8 module for tutorials and doc-umentation that will help you:

continued on next page

4"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>6https://youtu.be/uf1Q4gi3UU07This content is available online at <http://cnx.org/content/m18641/1.1/>.

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 67: SubVI Specifications for Communication Systems Projects

61

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 6.2

note: Visit LabVIEW Setup9 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

6.2.1 LabVIEW SubVI: sam_GrabAudioDynamic.vi

• Description: Wait for audio level to exceed a user-de�ned threshold, and then record audio untilthe audio level drops below the threshold again or recording duration reaches a maximum value. ThissubVI depends on sam_ListenForAudio.vi (Section 6.3). In addition, sam_GrabAudio.vi (Section 6.1)should be constructed before attempting the dynamic-stop version of this module.

• Category: Speaker-air-microphone (SAM) channel ("sam" pre�x)

6.2.2 Inputs (Controls)

1. frame length [s] (0.1) � DBL2. max duration [s] (10) � DBL3. threshold level (0.1) � DBL4. fs [Hz] (22050) � DBL5. error in (no error) � error cluster

Parentheses ( ) indicate default value; square brackets [ ] designate units.

6.2.3 Outputs (Indicators)

1. signal out � waveform2. error out � error cluster

6.2.4 Required Behavior

• Use sam_ListenForAudio.vi (Section 6.3) to continually acquire audio samples in blocks (frames) of sizeframe length. Once "sam_ListenForAudio" completes execution (i.e., when the audio level exceedsthreshold level), record and store audio frames until either of two possible conditions occurs: (1)maximum audio level within a frame is lower than the threshold level, or (2) total number of storedaudio frames would exceed max duration.

• The audio output of sam_ListenForAudio.vi (Section 6.3) serves as the beginning of the audio signalsignal out. The last audio frame containing silence must be excluded from signal out.

• The sound-card must be cleaned up using "Graphics and Sound | Sound | Input | Sound Input Clear"once the audio has been recorded.

8"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>9"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 68: SubVI Specifications for Communication Systems Projects

62 CHAPTER 6. SPEAKER - AIR - MICROPHONE (SAM) CHANNEL

6.2.5 Free LabVIEW Code

This subVI is rather complex to build and debug, so feel free to download the �nished subVIsam_GrabAudioDynamic.vi10.

You may �nd it helpful to test the subVI with the demo sam_GrabAudioDynamic_demo.vi11.

6.3 sam_ListenForAudio.vi12

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide13 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 6.3

note: Visit LabVIEW Setup14 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

6.3.1 LabVIEW SubVI: sam_ListenForAudio.vi

• Description: Monitor an audio input and detect when the audio level exceeds a user-de�ned threshold.Execution �ow remains within the VI until the threshold is exceeded, at which time the subVI exitsand returns the most recent block of audio.

• Category: Speaker-air-microphone (SAM) channel ("sam" pre�x)

6.3.2 Inputs (Controls)

1. task ID � U322. threshold (0.1) � DBL3. number of samples/ch (1024) � I324. error in (no error) � error cluster

Parentheses ( ) indicate default value; square brackets [ ] designate units.

6.3.3 Outputs (Indicators)

1. task ID out � U322. first block � waveform3. error out � error cluster

10See the �le at <http://cnx.org/content/m18641/latest/sam_GrabAudioDynamic.vi>11See the �le at <http://cnx.org/content/m18641/latest/sam_GrabAudioDynamic_demo.vi>12This content is available online at <http://cnx.org/content/m18598/1.2/>.13"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>14"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 69: SubVI Specifications for Communication Systems Projects

63

6.3.4 Required Behavior

• Continually acquire audio samples (as in a while-loop structure) in blocks of size number of

samples/ch for each of the two stereo channels. The subVI exits when the maximum value of anaudio block exceeds the value of threshold.

• The output first block contains the most recent block of audio, i.e., the block containing the audiosample that exceeds the threshold. The output is provided to subsequent subVIs that would considerthis waveform to be the �rst block of useful (non-silent) audio.

• The value of task ID out is identical to task ID in and facilitates clean block diagram layout forsound-related subVIs.

6.3.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW15 to learn the mechanics of subVIs.Refer to the Figure 6.2 (https://youtu.be/zFm4J62-QDQ16 (6:16)) screencast video for LabVIEW coding

tips and techniques speci�c to this subVI.

https://youtu.be/zFm4J62-QDQ17 (6:16)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/zFm4J62-QDQ?rel=0>

Figure 6.2: [video] LabVIEW coding tips and techniques for sam_ListenForAudio.vi

15"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>17https://youtu.be/zFm4J62-QDQ

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 70: SubVI Specifications for Communication Systems Projects

64 CHAPTER 6. SPEAKER - AIR - MICROPHONE (SAM) CHANNEL

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 71: SubVI Specifications for Communication Systems Projects

Chapter 7

Caller ID Decoder

7.1 cid_Demodulator.vi1

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide2 module for tutorials and doc-umentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 7.1

note: Visit LabVIEW Setup3 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

7.1.1 LabVIEW SubVI: cid_Demodulator.vi

• Description: Demodulate a Caller ID FSK (frequency shift keying) signal using a PLL (phase-lockedloop) from the LabVIEW Modulation Toolkit. The subVI accepts an signal that can include ringerpulses (the FSK signal itself occurs between the �rst and second ringer pulses), and demodulates thesignal to baseband. A "PLL locked" output signal indicates the portion of the baseband signal thatshould be considered useable for further decoding.

• Category: Caller ID decoding ("cid" pre�x)

7.1.2 Inputs (Controls)

1. FSK signal � waveform2. VCO carrier frequency [Hz] � DBL

1This content is available online at <http://cnx.org/content/m18638/1.2/>.2"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>3"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

65

Page 72: SubVI Specifications for Communication Systems Projects

66 CHAPTER 7. CALLER ID DECODER

3. VCO gain [degrees/V] � DBL4. phase error LPF cutoff frequency [Hz] � DBL5. comparator threshold for PLL lock � DBL

Parentheses ( ) indicate default value; square brackets [ ] designate units.

7.1.3 Outputs (Indicators)

1. baseband signal � waveform2. phase error magnitude � waveform3. PLL locked � 1-D Boolean array

7.1.4 Required Behavior

• FSK signal should contain an audio recording of the Caller ID FSK message sent by the telephonecompany central o�ce (CO). The signal should lie in the range ±1; ringer pulses will be clipped, andthe FSK signal amplitude should occupy as much of the ±1 range as possible without clipping.

• The baseband signal output contains the demodulated baseband signal produced by the LabVIEWModulation Toolkit "MT Phase Locked Loop.vi" phase error output.

• The Boolean array PLL locked indicates the region in which the PLL is locked onto the FSK signal;this indicator serves to distinguish between the valid FSK signal and any other portion of the originalrecorded signal.

• The VCO carrier frequency and gain are two controls for the PLL.• phase error LPF cutoff frequency sets the cuto� frequency of the lowpass �lter applied to the

magnitude of the PLL phase error. The phase error magnitude is a rapidly changing and relativelylarge amplitude signal value when the PLL is out of lock, and a relatively low amplitude signal inlock. The lowpass �lter removes the rapid variation. The phase error magnitude output is thelowpass-�ltered absolute value of the PLL phase error.

• comparator threshold sets the threshold level for the comparator that generates the PLL locked

Boolean output.

The LabVIEW Modulation Toolkit PLL is introduced and demonstrated in the screencast video of Figure 7.1(https://youtu.be/9KMQqkv0POU4 (11:16)).

https://youtu.be/9KMQqkv0POU5 (11:16)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/9KMQqkv0POU?rel=0>

Figure 7.1: [video] Demonstration of the LabVIEW Modulation Toolkit PLL

7.1.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW6 to learn the mechanics of subVIs.

5https://youtu.be/9KMQqkv0POU6"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 73: SubVI Specifications for Communication Systems Projects

67

Refer to the Figure 7.2 (https://youtu.be/TYCdfrp1UF47 (7:51)) screencast video for LabVIEW codingtips and techniques speci�c to this subVI.

https://youtu.be/TYCdfrp1UF48 (7:51)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/TYCdfrp1UF4?rel=0>

Figure 7.2: [video] LabVIEW coding tips and techniques for cid_Demodulator.vi

7.2 cid_DetectStartBit.vi9

This module refers to LabVIEW, a software development environment that features a graphicalprogramming language. Please see the LabVIEW QuickStart Guide10 module for tutorials anddocumentation that will help you:

• Apply LabVIEW to Audio Signal Processing

• Get started with LabVIEW

• Obtain a fully-functional evaluation edition of LabVIEW

Table 7.2

note: Visit LabVIEW Setup11 to learn how to adjust your own LabVIEW environment to matchthe settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" buttonat the lower right corner of the video player if the video does not �t properly within your browserwindow.

7.2.1 LabVIEW SubVI: cid_DetectStartBit.vi

• Description: Detect the �rst start bit in the Caller ID message bitstream, and return only theremaining bits in the bitstream. The Caller ID message consists of three distinct regions: (1) channelseizure (alternating pattern of T and F values), (2) steady mark (constant T values), and (3) data blockcontaining the message payload. This subVI detects the steady mark region and then identi�es thearray index (time point) at which the input bitstream �rst changes to F.

• Category: Caller ID decoding ("cid" pre�x)

7.2.2 Inputs (Controls)

1. bitstream in � 1-D Boolean array

Parentheses ( ) indicate default value; square brackets [ ] designate units.

8https://youtu.be/TYCdfrp1UF49This content is available online at <http://cnx.org/content/m18432/1.2/>.

10"NI LabVIEW Getting Started FAQ" <http://cnx.org/content/m15428/latest/>11"LabVIEW Setup for "Communication Systems Projects with LabVIEW"" <http://cnx.org/content/m17319/latest/>

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 74: SubVI Specifications for Communication Systems Projects

68 CHAPTER 7. CALLER ID DECODER

7.2.3 Outputs (Indicators)

1. datablock bitstream � 1-D Boolean array2. start bit index � I32

7.2.4 Required Behavior

• The bitstream in input should contain a complete Caller ID message bitstream as generated by otherdemodulating and bit synchronization and sampling subsystems.

• The datablock bitstream output contains only the data block portion of the input bitstream, begin-ning with the �rst start bit of the �rst character, i.e., the �rst frame. If no data block is detected thendatablock bitstream will return empty.

• start bit index is the index (location) of the data block detected in the input message. If no datablock is detected then start bit index will return -1.

7.2.5 LabVIEW Coding Tips

View the screencast video in Create a SubVI in LabVIEW12 to learn the mechanics of subVIs.Refer to the Figure 7.3 (https://youtu.be/yWWZAGoL8W413 (4:50)) screencast video for LabVIEW

coding tips and techniques speci�c to this subVI.

https://youtu.be/yWWZAGoL8W414 (4:50)

This media object is a video �le. Please view or download it at<https://www.youtube.com/embed/yWWZAGoL8W4?rel=0>

Figure 7.3: [video] LabVIEW coding tips and techniques for cid_DetectStartBit.vi

12"Create a SubVI in LabVIEW" <http://cnx.org/content/m14767/latest/>14https://youtu.be/yWWZAGoL8W4

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 75: SubVI Specifications for Communication Systems Projects

INDEX 69

Index of Keywords and Terms

Keywords are listed by the section with that keyword (page numbers are in parentheses). Keywordsdo not necessarily appear in the text of the page. They are merely associated with that section. Ex.apples, � 1.1 (1) Terms are referenced by the page they appear on. Ex. apples, 1

A additive white Gaussian noise, � 1.3.2(10)amplitude modulation, � 3.2(30)amplitude shift keying, � 3.1(29)array manipulation, � 2.2.1(23), � 5.2(50),� 5.5(55), � 5.6(56)ASK, � 3.1(29)audio, � 1.5.2(15)audio input subVIs, � 6.1(59), � 6.3(62)audio threshold, � 6.3(62)AWGN channel, � 1.3.2(10)

B backwards di�erence, � 1.5.1(13)bandpass �lter, � 3.3(32)bandwidth, � 2.1.1(19), � 2.2.1(23), � 2.2.2(24)baseband signal, � 4.2.1(39), � 4.2.2(41),� 7.1(65)BER, � 1.4.1(12), 12binary matrix, � 5.4(54)binary symmetric channel, � 1.3.1(8), 9bit clock, � 4.1.1(35)bit error, 13bit error rate, � 1.4.1(12), 12bit errors, � 1.3.1(8)bit interval, � 2.2.3(26)bit rate, � 4.1.2(36)bit synchronization, � 4.2.1(39)bitstream, � 1.1.1(1), � 1.1.2(2), � 1.2.1(4),� 1.2.2(6), � 1.2.3(7), � 1.4.1(12), � 1.5.1(13),� 4.1.2(36), � 4.4.3(47)block code, � 5.1(49), � 5.2(50), � 5.3(52),� 5.4(54), � 5.5(55), � 5.6(56)BSC, � 1.3.1(8)bu�er, � 4.4.3(47)

C Caller ID standard, � 7.1(65), � 7.2(67)carrier frequency, � 3.2(30), � 3.3(32)channel coding, � 5.1(49), � 5.2(50), � 5.3(52),� 5.4(54), � 5.5(55), � 5.6(56)channel seizure, � 7.2(67)characters, � 1.1.2(2), � 1.2.3(7)check bits, � 5.5(55)cluster, � 6.1(59)

comparator threshold, � 7.1(65)correlator, � 4.3.1(42)

D data block, � 7.2(67)data types, � 5.3(52)delay, � 4.4.2(45)demodulation, � 3.1(29), � 4.3.1(42)di�erentiator, � 1.5.1(13)digital communications, � 2.1.1(19),� 2.2.1(23), � 2.2.2(24)

E Eb/No, � 1.3.2(10)edge detection, � 1.5.1(13)elliptic �lter, � 3.3(32)energy per bit, � 1.3.2(10), � 3.2(30)error correcting codes, � 5.1(49), � 5.2(50),� 5.3(52), � 5.4(54), � 5.5(55), � 5.6(56)error correction, � 5.1(49)error detection, � 5.1(49)error handling, � 6.1(59)

F falling edge, � 1.5.1(13)FIR �lter, � 2.2.2(24)for-loop structure, � 2.2.1(23)frame synchronization, � 4.1.3(38)framing bit, � 1.1.2(2), � 1.2.3(7)framing errors, � 1.2.3(7)free-running oscillator, � 4.1.1(35)frequency shift keying, � 7.1(65)FSK, � 7.1(65)

G Gaussian PDF, � 1.5.3(16)

H hamming, � 5.1(49), � 5.2(50), � 5.3(52),� 5.4(54), � 5.5(55), � 5.6(56)hamming check bits, � 5.3(52)hamming distance, � 5.2(50), � 5.3(52)hamming parameters, � 5.3(52)

I impulse response, � 2.2.2(24)independent, � 1.3.1(8)integrator, � 4.3.1(42)inter symbol interference, � 2.1.1(19)

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 76: SubVI Specifications for Communication Systems Projects

70 INDEX

L LabVIEW, � 1.1.1(1), � 1.1.2(2), � 1.2.1(4),� 1.2.2(6), � 1.2.3(7), � 1.3.1(8), � 1.3.2(10),� 1.4.1(12), � 1.5.1(13), � 1.5.2(15), � 1.5.3(16),� 2.1.1(19), � 2.1.3(22), � 2.2.1(23), � 2.2.2(24),� 2.2.3(26), � 3.1(29), � 3.2(30), � 3.3(32),� 4.1.1(35), � 4.1.2(36), � 4.1.3(38), � 4.2.1(39),� 4.2.2(41), � 4.3.1(42), � 4.4.1(44), � 4.4.2(45),� 4.4.3(47), � 5.1(49), � 5.2(50), � 5.3(52),� 5.4(54), � 5.5(55), � 5.6(56), � 6.1(59),� 6.3(62), � 7.1(65), � 7.2(67)LabVIEW Modulation Toolkit, � 7.1(65)linear block code, � 5.1(49), � 5.2(50),� 5.3(52), � 5.4(54), � 5.5(55), � 5.6(56)linear code, � 5.1(49), � 5.2(50), � 5.3(52),� 5.4(54), � 5.5(55), � 5.6(56)lowpass �lter, � 3.1(29)

M Manchester pulse, � 2.1.3(22)marks, 40MathScript, � 2.1.1(19)matrix generation, � 5.2(50), � 5.5(55),� 5.6(56)modulation, � 2.1.1(19), � 2.2.1(23),� 2.2.2(24), � 3.2(30)modulus arithmetic, � 5.4(54)monaural, � 1.5.2(15)musical signal processing, � 6.1(59), � 6.3(62)

N narrowband bandpass �lter, � 4.1.2(36)noncoherent detection, � 3.1(29)normalize, � 4.2.2(41)numeric, � 5.3(52)Nyquist bandwidth, � 2.1.1(19)

O out-of-band signals, � 3.3(32)

P PAM, � 4.3.1(42)parity bits, � 5.5(55)phase error, � 7.1(65)phase reset, � 4.1.1(35)phase-locked loop, � 7.1(65)PLL, � 7.1(65)point-by-point processing, � 1.3.2(10),� 4.3.1(42), � 4.4.1(44), � 4.4.3(47)polar NRZ, � 2.1.3(22)preamble, � 4.1.3(38), � 4.2.1(39), � 4.2.2(41)probability density function, � 1.5.3(16)probability of error, � 1.5.3(16)product modulator, � 3.2(30)pulse amplitude modulation, � 2.1.1(19),� 2.2.1(23), � 2.2.2(24), � 4.3.1(42)pulse shape, � 2.2.2(24)pulse shaping �lter, � 2.1.1(19), � 2.2.2(24)

Q Q(z), � 1.5.3(16)Q-function, � 1.5.3(16)

R raised cosine �lter, � 2.1.1(19)random number generator, � 1.1.1(1)regeneration, � 4.1.3(38)reshape array, � 1.2.1(4), � 1.2.2(6)ringer pulses, � 7.1(65)rising edge, � 1.5.1(13)

S SAM channel, � 6.1(59), � 6.3(62)sample and hold, � 4.4.1(44)sampler, � 4.4.2(45)seed, � 1.1.1(1)shift, � 4.4.2(45)signal energy, � 3.2(30)signal processing, � 3.2(30)signal processing toolkit, � 2.2.2(24)SNR per bit, � 1.3.2(10)sound card input, � 6.1(59), � 6.3(62)sound input clear, � 6.1(59)sound input con�gure, � 6.1(59)sound input read, � 6.1(59)spaces, 40speaker air microphone channel, � 6.1(59),� 6.3(62)square-law detector, � 3.1(29)square-law device, � 4.1.2(36)start bit, � 1.1.2(2), � 1.2.3(7), � 7.2(67)steady mark, � 7.2(67)stop bit, � 1.1.2(2), � 1.2.3(7)subVI, � 2.1.1(19), � 2.2.1(23), � 2.2.2(24),� 3.2(30), � 5.1(49), � 5.2(50), � 5.3(52),� 5.4(54), � 5.5(55), � 5.6(56), � 6.1(59),� 6.3(62)symbol mapping, � 2.2.1(23)sync input, � 4.1.1(35)sync pulses, � 2.2.3(26)synchronization, � 4.1.1(35), � 4.1.2(36)syndrome table, � 5.1(49), � 5.6(56), 57

T tail, � 1.5.3(16)text, � 1.1.2(2), � 1.2.3(7)threshold, � 4.1.2(36), � 4.2.1(39)transmission bandwidth, � 2.1.1(19)transmitter, � 2.2.3(26)

U unit energy, � 3.2(30)

V VCO carrier frequency, � 7.1(65)VCO gain, � 7.1(65)

W wav �le, � 1.5.2(15)

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 77: SubVI Specifications for Communication Systems Projects

INDEX 71

waveform, � 1.5.2(15)waveform data type, � 2.2.2(24)waveform palette, � 6.1(59)waveform pallet, � 6.3(62)

while loop, � 6.3(62)words, � 1.2.1(4)wordstream, � 1.1.2(2), � 1.2.1(4), � 1.2.2(6),� 1.2.3(7)

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 78: SubVI Specifications for Communication Systems Projects

72 ATTRIBUTIONS

Attributions

Collection: SubVI Speci�cations for "Communication Systems Projects with LabVIEW"Edited by: Ed DoeringURL: http://cnx.org/content/col10608/1.2/License: http://creativecommons.org/licenses/by/2.0/

Module: "util_BitstreamFromRandom.vi"By: Ed DoeringURL: http://cnx.org/content/m18528/1.2/Pages: 1-2Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "util_BitstreamFromText.vi"By: Ed DoeringURL: http://cnx.org/content/m18631/1.2/Pages: 2-3Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "util_BitsToWords.vi"By: Ed DoeringURL: http://cnx.org/content/m18596/1.2/Pages: 4-6Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "util_WordsToBits.vi"By: Ed DoeringURL: http://cnx.org/content/m18551/1.2/Pages: 6-7Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "util_BitstreamToText.vi"By: Ed DoeringURL: http://cnx.org/content/m18629/1.2/Pages: 7-8Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "util_BinarySymmetricChannel.vi"By: Ed DoeringURL: http://cnx.org/content/m18537/1.2/Pages: 8-10Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 79: SubVI Specifications for Communication Systems Projects

ATTRIBUTIONS 73

Module: "util_AWGNchannel_PtByPt.vi"By: Ed DoeringURL: http://cnx.org/content/m18515/1.2/Pages: 10-12Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "util_MeasureBER.vi"By: Ed DoeringURL: http://cnx.org/content/m18547/1.2/Pages: 12-13Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "util_EdgeDetector.vi"By: Ed DoeringURL: http://cnx.org/content/m18606/1.2/Pages: 13-15Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "util_GetAudio.vi"By: Ed DoeringURL: http://cnx.org/content/m18532/1.2/Pages: 15-16Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "util_Qfunction.vi"By: Ed DoeringURL: http://cnx.org/content/m18545/1.2/Pages: 16-17Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "pam_RaisedCosinePulse.vi"By: Ed DoeringURL: http://cnx.org/content/m18566/1.2/Pages: 19-21Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "pam_RectanglePulse.vi"By: Ed DoeringURL: http://cnx.org/content/m18454/1.1/Pages: 21-22Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/2.0/

Module: "pam_ManchesterPulse.vi"By: Ed DoeringURL: http://cnx.org/content/m18466/1.2/Pages: 22-23Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 80: SubVI Specifications for Communication Systems Projects

74 ATTRIBUTIONS

Module: "pam_SignalPointMapper.vi"By: Ed DoeringURL: http://cnx.org/content/m18570/1.2/Pages: 23-24Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "pam_TransmitFilter.vi"By: Ed DoeringURL: http://cnx.org/content/m18472/1.2/Pages: 24-26Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "pam_TransmitSync.vi"By: Ed DoeringURL: http://cnx.org/content/m18478/1.2/Pages: 26-27Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "bpm_EnvelopeDetector.vi"By: Ed DoeringURL: http://cnx.org/content/m18420/1.2/Pages: 29-30Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "bpm_ProductModulator.vi"By: Ed DoeringURL: http://cnx.org/content/m18556/1.2/Pages: 30-32Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "bpm_ReceiverFilter.vi"By: Ed DoeringURL: http://cnx.org/content/m18436/1.2/Pages: 32-33Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "regen_BitClock.vi"By: Ed DoeringURL: http://cnx.org/content/m18612/1.2/Pages: 35-36Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "regen_BitSync.vi"By: Ed DoeringURL: http://cnx.org/content/m18627/1.2/Pages: 36-38Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 81: SubVI Specifications for Communication Systems Projects

ATTRIBUTIONS 75

Module: "regen_FrameSync.vi"By: Ed DoeringURL: http://cnx.org/content/m18576/1.2/Pages: 38-39Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "regen_ExtractPreamble.vi"By: Ed DoeringURL: http://cnx.org/content/m18585/1.2/Pages: 39-41Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "regen_NormalizeToPreamble.vi"By: Ed DoeringURL: http://cnx.org/content/m18483/1.2/Pages: 41-42Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "regen_Correlator.vi"By: Ed DoeringURL: http://cnx.org/content/m18579/1.2/Pages: 42-44Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "regen_SampleHold.vi"By: Ed DoeringURL: http://cnx.org/content/m18621/1.2/Pages: 44-45Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "regen_Sampler.vi"By: Ed DoeringURL: http://cnx.org/content/m18593/1.2/Pages: 45-47Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "regen_BitstreamBu�er.vi"By: Ed DoeringURL: http://cnx.org/content/m18494/1.2/Pages: 47-48Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "hamming_DetectorCorrector.vi"By: Ed DoeringURL: http://cnx.org/content/m18427/1.2/Pages: 49-50Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 82: SubVI Specifications for Communication Systems Projects

76 ATTRIBUTIONS

Module: "hamming_GeneratorMatrix.vi"By: Ed DoeringURL: http://cnx.org/content/m18563/1.2/Pages: 50-51Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "hamming_HammingCodeParameters.vi"By: Ed DoeringURL: http://cnx.org/content/m18441/1.2/Pages: 52-54Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "hamming_Mod2MatrixMultiply.vi"By: Ed DoeringURL: http://cnx.org/content/m18562/1.2/Pages: 54-55Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "hamming_ParityCheckMatrix.vi"By: Ed DoeringURL: http://cnx.org/content/m18460/1.2/Pages: 55-56Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "hamming_SyndromeTable.vi"By: Ed DoeringURL: http://cnx.org/content/m18618/1.2/Pages: 56-58Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "sam_GrabAudio.vi"By: Ed DoeringURL: http://cnx.org/content/m18499/1.2/Pages: 59-60Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "sam_GrabAudioDynamic.vi"By: Ed DoeringURL: http://cnx.org/content/m18641/1.1/Pages: 60-62Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/2.0/

Module: "sam_ListenForAudio.vi"By: Ed DoeringURL: http://cnx.org/content/m18598/1.2/Pages: 62-63Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 83: SubVI Specifications for Communication Systems Projects

ATTRIBUTIONS 77

Module: "cid_Demodulator.vi"By: Ed DoeringURL: http://cnx.org/content/m18638/1.2/Pages: 65-67Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Module: "cid_DetectStartBit.vi"By: Ed DoeringURL: http://cnx.org/content/m18432/1.2/Pages: 67-68Copyright: Ed DoeringLicense: http://creativecommons.org/licenses/by/4.0/

Available for free at Connexions <http://cnx.org/content/col10608/1.2>

Page 84: SubVI Specifications for Communication Systems Projects

SubVI Speci�cations for "Communication Systems Projects with LabVIEW""Communication Systems Projects with LabVIEW" features ten projects that draw upon a library of over40 subVIs constructed as part of the project activities. Each module in this manual completely describes theinput/output requirements as well as the required behavior of a subVI. In addition, each module features anarrated screencast video of the LabVIEW program in action to demonstrate relevant coding techniques tosuccessfully build and test the subVI. Use the Connexions "Table of Contents" viewer to quickly browse forsubVIs of interest. Download the manual as a single PDF document (see "Content Actions") as a convenientway to access all modules in a single �le; the PDF includes an index.

AboutRhaptos is a web-based collaborative publishing system for educational material.