Announcement

Collapse
No announcement yet.

"Generic" 3-way DSP program

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Generic" 3-way DSP program

    Most modern DSP chips like the Analog Devices ADAU1701, as well as the TI equivalents, are programmable, using graphical tools to string together DSP processing blocks. The graphical design tool for the ADAU1701 is SigmaStudio. There are a number of brave DIY'ers who use SigmaStudio to program the DSP chips, and this works fine for applications where you can connect a PC to the board to upload new code whenever you want to change a parameter.

    However, for loudspeaker design, there are a couple of logical configurations that can be "pre-programed" in the DSP chip, with all of the resources you would typically need. With this approach, you don't need SigmaStudio yourself--you just download a ready-made solution from someone who has a completed design. It's what I call a "generic" 3-way DSP program, because it can be reused from a wide range of active speakers. By using some clever code to determine how the SigmaStudio compiler assigned cell addresses, you can control your high-level processing blocks with a microprocessor instead of uploading new SigmaStudio code. And with some additional code in the microprocessor, you can change the parameters using a cell phone app from a Bluetooth or Wi-Fi connection.

    The block diagram below shows the generic code that I'm using in the stereo 3-way DSP board described at Audiodevelopers. There are six screens for the Android app, as shown by the color coding. The top row of blocks in the diagram show the processing that affects the overall response. In addition to the 9-band EQ and the Baffle Step Compensation, there are two "custom filters" that can be any of the common topologies (low pas, high pass, shelf, peak, notch, all-pass, etc.) with a wide range of frequencies and Q values. For example, the user can select from 87 different frequencies, so these filters can be strategically placed where needed.

    The blocks toward the bottom are channel dependent--for each stereo Tweeter, Woofer or Sub channel. The tweeter-woofer crossover has 6 crossover types, from first-order Butterworth to 8-pole Linkwitz-Riley, and it allows specifying 7 different frequencies. The woofer-sub crossover has 5 types at 5 different frequencies. Each channel also has a "custom filter" for fine-tuning the response. The Sub channel is unique in that it includes a Bass Enhancement block. The Bass Enhancement block has a standard high-pass (Rumble) filter, a peaking filter and the Analog Device psychoacoustic bass enhancement algorithm, which is pretty cool for getting the effect of deep bass from a small speaker..

    The block diagram is simplified, in that it doesn't show the switching for 3-way to 2-way. In 2-way mode, the Sub channel isn't used, and the Bass Enhancement block is switched into the Woofer channels. By adding some additional frequencies to the Woofer-Sub crossover, the Woofer channel could be labelled "Mid" and the Sub channel labelled "Woofer"--I'll make that change in the near future.

    The new Android program--all done in Android Studio, can control all of the blocks in this diagram--it all works. So with one of those "sort-of-easy-to-build" DSP boards, an Android cell phone, some amp boards and a power supply, you can build a very flexible active speaker with just about any drivers, and get good results with some basic tweaking. The advanced tweaking will require some PC software, but that's getting worked as a separate project...


    Click image for larger version  Name:	3-wayDSP.jpg Views:	1 Size:	104.1 KB ID:	1397891
    Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

  • #2
    I really like where these things are going.

    I've been looking at the new Hypex multi-way plate amps with digital input and programmable DSP.

    Does this have digital input?

    Edit....looking at the description at your link it appears digital input is possible via WiFi correct?

    Looks to me like the volume is first so the filters don't overflow until you're also clipping the amplifiers and you assume that the in-room noise level will be far above the error level of the DAC's which will always be connected to the amps at full level correct?

    This is all minimum phase IIR recursive filters correct?
    Last edited by daryl; 12-21-2018, 03:25 PM.

    Comment


    • #3
      I think it would be nice to have just a very long kernel FIR filter and DAC for each driver.

      Then measure each driver (in cabinet) and using an Excel tool (I want to create the tool!) in conjunction with the measurements transform it's transfer function into your target function.

      You would be able to invert the phase function of each driver and make the whole system linear phase if you wish.

      You would calculate the impulse response for your all-inclusive filter and then upload the kernel into the DSP.

      Not sure if any DSP's are that powerful.

      A bass filter might need a kernel as long as 200ms though you could reduce the sample rate considerably for a bass driver then interpolate the output back to the normal sampling frequency to send to the DAC if the DSP had that capability.

      Saying you calculated your long low frequency filter at 1/16 the sample rate you would reduce the number of multiply-add calculations by 256 times but add a decimating filter before and oversampling filter after which are less computationally intensive.

      The high frequency section would need to be at the full sampling rate but the kernel wouldn't need to be near as long.

      I know it's stealing the thunder of your very cool system but that's where I would like to get to......

      Comment


      • #4
        I've been making versions of that DSP board for several years now, some with digital inputs and some without. It's a relatively simple board--basically a miniDSP with an extra stereo output and different software. What's new is the version with Wi-Fi input, for which I have boards that I haven't built or tested yet, and the cell phone app to control the DSP, which is now a "native" Android app.

        The filters are implemented using the bilinear transform with frequency warping equations that were published by Robert Bristow in the audio cookbook. Those equations are posted in many places online--this link is the one I used many years ago. They are IIR biquad filters, which require 5 clock cycles to calculate in the ADAU1701. Since the ADAU1701 runs at 1024 times the audio sample rate, you can implement over 200 biquad filters in that $8 chip -- pretty good for a chip that is over 10 years old.

        There are many newer devices, including non-DSP chips, that can implement long FIR filters in real time. However, pin count on those devices tends to be very high, and they typically don't include the analog I/O, so the board design gets more challenging and out of the reach of the DIY hobbyist. That's been an obstacle so far, and I haven't pursued that approach. However, that's probably the way things will go in the future, and there might even be off-the-shelf modules now that could allow such a design at a reasonable cost. The FIR filters certainly simplify the filter design, as it is much easier to implement a specific transfer function.
        Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

        Comment


        • #5
          I'm impressed with what you can do.

          That's a lot of work.

          Keep posting!

          Comment

          Working...
          X