Example Code

Pulse Density Modulation PDM

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All
Overview

This example demonstrates how to generate a Pulse Density Modulation (PDM) in LabVIEW.

 

Description

Pulse Density Modulation, or PDM, is a form of modulation used to represent an analog signal in the digital domain. In a PDM signal, specific amplitud values are not encoded into pulses as they would be in PCM. Instead it is the relative density of the pulses that corresponds to the analog signal's amplitude.
This VI simulates an analog signal, modulates it using PDM and restores it to an analog signal.

 

Requirements

 Software

  • LabVIEW Full Development System 2012 (or compatible)
  • If running in a Real-Time context, you will need the LabVIEW Real-Time Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Download and open the attached VI
  2. Run the program

 

Additional Information or References

Pulse Density Modulation (PDM) - Front Panel.png

 

Pulse Density Modulation (PDM) - Block Diagram.png

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

Benjamin C
Principal Systems Engineer // CLA // CLED

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Asnaraya
NI Employee (retired)
on
Hello BeCeGa, I am new to PDM stuff. I am trying to undersatnd how this sine wave will be represented as 1 bit . It's so confuding for me. can you help me understand this concept. For example If I have sine wave of +/- 5 Amp and If I sample at 10K Hz I have N number of sample now with different amplitute range so how do we represent these different amplitudes in 1 and 0 as 1 bit PDm signal. Anyhelp is appreciable.