Locale Icon
English
  • Forums

    Popular Forums

    • LTspice
    • Video
    • Power Management
    • RF & Microwave
    • Precision ADCs
    • FPGA Reference Designs

    Product Forums

    • Amplifiers
    • Clocks & Timers
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Power Management
    • Processors & DSP
    • Processors & Microcontrollers
    • Switches & Multiplexers
    • Sensors
    • Voltage References
    View All

    Application Forums

    • A2B Audio Bus
    • Audio
    • Automated Test Equipment (ATE)
    • Condition-Based Monitoring
    • Depth, Perception & Ranging Technologies
    • Embedded Vision Sensing Library
    • Motor Control Hardware Platforms
    • Precision Technology Signal Chains Library
    • Video
    • Wireless Sensor Networks Reference Library

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools & Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Power Studio Designer
    • Power Studio Planner
    • Reference Designs
    • Robot Operating System (ROS) SDK
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Highlighted Webinar

    Fast-Track Certification: Leveraging IC Safety App Notes for Functional Safety Designs

    Stop guessing, start certifying. Learn how to use IC safety application notes to streamline your FMEDA and meet IEC 61508 and ISO 13849 standards with...

    Places

    • ADI Academy
    • ADI Webinars
    • EZ Blogs
    • Video Annex
    • Virtual Classroom

    Libraries

    • 3D ToF Depth Sensing Library
    • Continuous-Wave CMOS Time of Flight (TOF) Library
    • Embedded Vision Sensing Library
    • Gigabit Multimedia Serial Link (GMSL) Library
    • Optical Sensing Library
    • Other Products Library
    • Precision Technology Signal Chains Library
    • Software Modules and SDKs Library
    • Supervisory Circuits Library
    • Wireless Sensor Networks Library
  • Community Hub

    Challenge Yourself!

      New KCC Quiz AQQ299 about Opamp open looop gain and LTspice (a kind proposal from Al Butvidas)

      1. Quote of the month: " A good friend calls you in jail. A great friend bails you out of jail. Your best friend sits next to you and says 'wasn't that...

    View All

    What's Brewing

      Read a Blog, Take this Quiz for Another Chance to Win a Gift Card!

      Important: Read the blog first . The quiz questions are all based on the content from the blog: Understanding Voltage Domain Isolation in Field-Bus...

    View All

    Places

    • Community Help
    • Analog Dialogue Quiz
    • Logic Lounge
    • Super User Program

    Resources

    • EZ Code of Conduct
    • EZ How To Help Articles
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • ContentZone

    Visit ContentZone

    Search content by industry or technology.
    • Blogs
    • Technical Articles
    • Tutorials
    • Videos
    • Webinars
    Your ADI content all in one place.
    View ContentZone

    The Latest Read

    Master FPGA-Based DSP Design: The Complete Building Blocks Guide You Need to Read

    The Engineering Mind Blog on EngineerZone presents an exceptional five-part series titled " DSP Building Blocks " that walks engineers through the essential...

    New Release

    Signal Chain Designer: DC Error Simulation
    Signal Chain Designer: DC Error Simulation

    This video covers the DC error calculation capabilities of Signal Chain Designer. DC error is unique in that often requires calibration and has so many...

    Recent Technical Insights

    Latest Technical Article from Analog.com
    Dont Let Your Feedback Loop Fall FlatPart 2: Dynamic Response and Isolation Innovation!

    Introduction In isolated power supply systems, maintaining a stable output voltage under varying load conditions is essential for reliable operation. The...

EngineerZone
EngineerZone
SigmaDSP Processors & SigmaStudio Dev. Tool
  • Log In
  • User
  • Site
  • Search
OR
Ask a Question
SigmaDSP Processors & SigmaStudio Dev. Tool
  • Processors & DSP
SigmaDSP Processors & SigmaStudio Dev. Tool
Documents Workaround: Creating constant-dB envelope decay using an existing linear decay algorithm
  • Q&A
  • File Uploads
  • Members
  • Tags
  • Cancel
  • Documents
  • SigmaDSP YouTube Channel - Dave Thib
  • +AD193x: FAQ
  • +ADAU1401AEBZ: FAQ
  • +ADAU144x: FAQ
  • +ADAU1452: FAQ
  • +ADAU145x: FAQ
  • +ADAU1701: FAQ
  • +ADAU1701MINIZ- FAQ
  • +ADAU1761: FAQ
  • +ADAU1772: FAQ
  • +ADI: FAQ
  • +AN-951: FAQ
  • +bitwise logic: FAQ
  • +Compressor Table Format: FAQ
  • +Creating a simple balance crossfade control: FAQ
  • -Creating constant-dB envelope decay using an existing linear decay algorithm: FAQ
    • Workaround: Creating constant-dB envelope decay using an existing linear decay algorithm
  • +Crossover with more than 3 bands: FAQ
  • +E2PROM: FAQ
  • +EEPROM: FAQ
  • +EVAL DAU144XEBZ: FAQ
  • +EVAL-ADAU1781Z: FAQ
  • +Excluding Cells from the Exported System Files: FAQ
  • +GPIO button: FAQ
  • +GPIOs or Aux ADCs: FAQ
  • +How do I execute a software safeload write?: FAQ
  • +IIR coefficient filter: FAQ
  • +IIR filter: FAQ
  • +Peak Full Range Compressor: FAQ
  • +Preserving "Ear-candy": FAQ
  • +Push Button Volume: FAQ
  • +self-boot EEPROM image: FAQ
  • +Sigma300 Family Products: FAQ
  • +SigmaDSP: FAQ
  • +SigmaStudio: FAQ
  • +single precision VS double precision: FAQ
  • +Stimulus-Probe Capability and Limitations: FAQ
  • +Stopwatch to Count Successive Samples: FAQ
  • +Toolbox into the schematic tab: FAQ
  • +USB communications between the PC and SigmaDSP: FAQ
  • +Using Hierarchy Boards to create re-usable code: FAQ
  • New SigmaStudio 3.2.0 beta version available
  • SigmaStudio 3.3 Released
  • SigmaStudio 3.9.2 Beta Available for Download
  • SigmaStudio Rev 3.15.2 Bug Report for SPI EEPROM Write Speed

Workaround: Creating constant-dB envelope decay using an existing linear decay algorithm

Originally authored by Steve L

My current project calls for a Peak Programme Meter - a peak-reading level meter with fast attack, slow decay and a logarithmic scale. My system microcontroller reads the level value periodically from the SigmaDSP (an ADAU1701), compares the value to a set of log-spaced thresholds and drives a row of LEDs.

In theory, the Sigma end of things should be easy - just use the Peak Envelope detector with an appropriate choice of hold and decay times. However, I have fallen foul of the fact that (as was flagged up here: https://ez.analog.com/message/50275#50275) the Envelope detectors have a linear decay characteristic rather than the more usual RC/constant-dB response. The effect of this is that my logarithmic meter decays ridiculously slowly at the top end of the scale and much faster at the bottom.

Further to my earlier posting, I just tried out the scheme using a Peak Envelope External Decay with feedback and - much to my surprise - it worked perfectly!

There is an element of "suck it and see" about setting the initial parameters because the SigmaStudio Help specifies the P.E.E.D. control input in dB/s, but we have already established that the decay is linear and therefore the dB/s rate depends on the instantaneous peak output level.

My eventual circuit was:

MeterOffset ensures that the decay rate never falls to zero while MeterGain determines by how much the decay rate varies with output level. The feedback gain is tiny because of the need to translate between 5.23 and 28.0 number formats.

I was looking for a decay rate of around 9dB/s for my Peak Programme Meter and my initial educated guesses for the parameters - 2 for the offset (28.0 format) and 1.5E-5 for the gain - gave a nice constant-dB/s decay which was just a little too fast. Tweaking the parameters to 1 and 1.0E-5 got it just about right, which is fortunate since that appears to be about as slow as it will go.

I don't know whether this method would hold up in a really demanding application, but it looks fine on my short LED-bargraph meter. I have every confidence that the method Bob suggested would also work, and probably offers more opportunities for fine-tuning. In fact, it is directly analogous to a lot of analogue Peak Programme Meter circuits.

Tags: decay envelope constant_db SigmaDSP linear
  • Share
  • History
  • More
  • Cancel
 
Related Content
  • RE: How can I get a constant-dB envelope decay?
    SteveL
    Further to my earlier posting, I just tried out the scheme using a Peak Envelope External Decay with feedback and - much to my surprise - it worked perfectly! There is an element of "suck it and see...
  • How can I get a constant-dB envelope decay?
    SteveL
    Hi, My current project calls for a Peak Programme Meter - a peak-reading level meter with fast attack, slow decay and a logarithmic scale. My system microcontroller reads the level value periodically...
  • RE: Signal Envelope Block Parameters
    KJBob
    Hello skhan, The unit k/s can be interpreted as the percentage of full-scale audio (1.0 decimal) that linearly decays in one second. This is confirmed by some experiments shown below. In all these tests...
 
Related Content
  • RE: How can I get a constant-dB envelope decay?
    SteveL
    Further to my earlier posting, I just tried out the scheme using a Peak Envelope External Decay with feedback and - much to my surprise - it worked perfectly! There is an element of "suck it and see...
  • How can I get a constant-dB envelope decay?
    SteveL
    Hi, My current project calls for a Peak Programme Meter - a peak-reading level meter with fast attack, slow decay and a logarithmic scale. My system microcontroller reads the level value periodically...
  • RE: Signal Envelope Block Parameters
    KJBob
    Hello skhan, The unit k/s can be interpreted as the percentage of full-scale audio (1.0 decimal) that linearly decays in one second. This is confirmed by some experiments shown below. In all these tests...
analog-devices logo

About Analog Devices

  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

Interested in the latest news and articles about ADI products, design tools, training, and events?

Go to myAnalog
  • Instagram page
  • Twitter page
  • Linkedin page
  • Youtube page
  • Facebook
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2026 Analog Devices, Inc. All Rights Reserved

analog-devices

About Analog Devices

Down Up
  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

Down Up
  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

Interested in the latest news and articles about ADI products, design tools, training, and events?

Go to myAnalog
Instagram page Facebook Twitter page Linkedin page Youtube page
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2026 Analog Devices, Inc. All Rights Reserved