Author Topic: Getting started with DSP - any suggestions?  (Read 11955 times)

0 Members and 1 Guest are viewing this topic.

Online radiolistener

  • Super Contributor
  • ***
  • Posts: 3345
  • Country: ua
Re: Getting started with DSP - any suggestions?
« Reply #50 on: June 18, 2018, 07:25:48 am »
Audio just isn't all that much data, you run out of ways to spend cycles. Unless you do stupid things like implementing a long impulse response filter with pure time domain processing.

High quality audio with high dynamic range requires a lot of resources. There is always a fight between quality and simplicity...  :)

Here is comparison between TI DSP and Altera Cyclone II FPGA implementation of wavelet transform benchmark for image processing:
« Last Edit: June 18, 2018, 07:38:38 am by radiolistener »
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3481
  • Country: us
Re: Getting started with DSP - any suggestions?
« Reply #51 on: June 18, 2018, 11:23:51 am »
The big advantage of an FPGA with embedded ARM cores is the ability to prototype the DSP algorithms on the ARM and then move the cycle intensive parts to the FPGA fabric.

But first you need to understand the discrete Fourier transform, the relationship between convolution and multiplication, sampling, phase and a *lot* more.  I suggested a couple of audio focused books.  I can suggest more purely DSP books if you prefer.  If you don't already know the calculus the mathematics will be challenging.  WAV files and Octave are the way to learn DSP/DAFX.

While there are plenty of cheap FPGA boards, the quality of the documentation and supporting tutorials varies.  After I bought the Zybo Z7-20 I bought a MicroZed just for the excellent series of tutorials for it.
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: us
Re: Getting started with DSP - any suggestions?
« Reply #52 on: June 18, 2018, 06:00:32 pm »
I spent lots of time on AtMegas and AtTinys and I developed an own PCB for nRF51. I'm more the hardware-guy - but I wanna lern the softwarepart as well ;)
I was always excited about learning how microcontrollers and electronics in general work - now as I understand them and I can use them I wanna get to a higher level. That's where DSPs come in.

To be honest: I would like to solder a TMS320C6652's BGA myself :D We got a Ersa PL550 at work - but first I'd give it a shoot on a cheap asian 300 bucks reworkstation.
But first I need to choose a device and master the softwareside - that's what I'd like to learn.

Reading this thread is a hoot; the phrase "herding cats" comes to mind  :-DD  You're getting advice in 100 different directions.  But it sounds like you know enough to have some fun learning more, which is what matters, otherwise you lose motivation and nothing happens.

Definitely start by coding up some simple algorithms on a PC and running them on WAV files.  If you have any Python experience whatsoever, don't use Octave, use Python, it's the future.  If you don't have any Python experience, you should still consider using Python...  unless you *do* have MATLAB experience and the transferability of that experience is paramount for you.

When you're ready to try an embedded target, I highly recommend a fast ARM Cortex-M7.  While not quite as turn-key as IAR, Keil, etc., you can set up a fully open-source dev environment with Eclipse; this even has official support from many of the MCU vendors.  Google "MCU on Eclipse" for set-up guides.  I am currently prototyping a noise-cancelation system using adaptive FIR filters with thousands of taps, on an STM32F7 discovery board.  For $90 the NXP IMX RT1050 eval kit is another Cortex-M7 that's three times faster with gobs of on-chip RAM.  ARM provides a basic DSP library with free source code.  Going the ARM route lets you leverage an enormous amount of tech support and cheap or free dev tools.  IMO it's becoming quite difficult to justify using a "real DSP chip" anymore.

This assumes that you need low latency through your DSP system.  If you're willing to buffer for 0.1 second or something like that to deal with the limits of an OS like Linux, then the mainstream single-board computers may be attractive.  Certainly you can prototype faster in that environment.  But I would assume you want lower latency for a live guitar effect?  And besides, with your background, I think moving to a more complex and capable MCU is a logical next step.
« Last Edit: June 18, 2018, 06:05:07 pm by mark03 »
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: Getting started with DSP - any suggestions?
« Reply #53 on: June 18, 2018, 07:42:50 pm »
Start with Octave (a free Matlab replacement) first and then test your implementations on a PC. Once you know your algorithms work it is time to add real embedded hardware in the mix. By the way: you should seriously consider using a regular ARM based microcontrollers. These have lots of processing power and are more suitable for general purpose work as well. I'd only consider a DSP if I really need lots of processing power.

There’s a lot to agree with here.

The OP has a number of significant hoops to jump through.

Understanding basic DSP IMHO is best done on the PC first.

Octave isn’t a bad start, but frankly you can also do an awful lot with just Excel - yes, a spreadsheet - and you’ll learn a fair bit while you’re at it.

Get those algorithms working with various generated test data sets on your PC in batch mode first, in Octave and then C.

The drawback of PCs is latency. But that does not stop you using ready-made wav files and processing and listening to them real time. The benefit of the PC is that you can generate massive amounts of reproducible test dataon demand, and test in a native environment.

My personal method is to always have working C code with the algorthm working on both the PC and the embedded hardware, it makes it easy to separate if your errors are due to hardware or algorithm. Sometimes you have to hit assembly language, and have a knowledge of pipelines, memory busses, wait states, optimum register loading techniques and maximising throughput for a given target processor. Sometimes that means re-working your algorithms to minimise memory I/O and maximise target processor core register usage, such as on ARM.

M4F indeed isn’t a bad way to go, but it isn’t the same as a “proper” DSP, but that is probably a good thing when you’re starting out. Just be aware that a few of the CMSIS DSP functions are not optimised, despite what you might think, but they are definitely a good place to start. The floating point on M4F I found to be similar speed overall to using its fixed point DSP extensions in many applications especially once optimised.

On the hardware side, for audio you need a demo board with an audio codec and a decent set of example demo code. Start by getting it to generate a sine wave, the blinky of DSP.

Unless the OP already has a good grounding in FPGA, I really wouldn’t recommend touching FPGA with a barge pole: the OP already has to deal with understanding DSP itself. The complexities of getting an FPGA based solution to work is a horrendously steep learning curve and an unnecessary distraction for what they are looking to achieve. That distraction is far more likely to leave the OP completely overwhelmed, with no end result at all.

I would also resist the Linux route, again there is a latency issue, but also if you are looking to make something low power that’s battery powered from a PP3 or a pair of AAs, Linux is probably something best avoided.

Stick to the PC, plus a microcontroller (preferably with floting point) demo board with an audio codec.
 
The following users thanked this post: rhb

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
Re: Getting started with DSP - any suggestions?
« Reply #54 on: June 18, 2018, 08:39:41 pm »
Using a PC is not a good idea. It'heavy, uses a lot of power, has waaaaay too long boot times, doesn't fit a guitar player's floorboard.
If I wanna run a PC I just use Cubase/Reaper and a bench of free VSTs ;)

Marco, what is SBC?

Well whilst FPGA needs to be using HDL usingan SigmaDSP Icould simply setupmy device with the Sigma Studio's GUI and add some custom filters. Sounds good for me, as it looks like fast progress.

On FPGA I might be less flexible in comparison to a DSP, don't I?

At the moment I wonder if an ADAU1452 might be a good device for beginning. But still no idea how to add external ram for a looper(... later).

 

Online coppice

  • Super Contributor
  • ***
  • Posts: 8637
  • Country: gb
Re: Getting started with DSP - any suggestions?
« Reply #55 on: June 18, 2018, 08:49:49 pm »
At the moment I wonder if an ADAU1452 might be a good device for beginning. But still no idea how to add external ram for a looper(... later).
You seem to think the ADAU1452 is a general purpose DSP. It isn't. Its a very constrained device. If you want to, say, convolve to simulate a speaker cabinet its a good choice. If you want to implement guitar effects its definitely not the right choice.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6719
  • Country: nl
Re: Getting started with DSP - any suggestions?
« Reply #56 on: June 18, 2018, 09:26:31 pm »
Marco, what is SBC?

Single Board Computer, generally referring to ARM boards capable of running Linux, but could also refer to small x86 boards like those from Udoo.

Doing any hard real time low latency work on these SBCs is not easy though, Bela is one of the few systems which does it. It's certainly possible, but a fair amount of work requiring low level system programming.
Quote
But still no idea how to add external ram for a looper(... later).

When they say it's fully programmable, they mean it's "fully programmable". You can wire together the algorithms they provided and turn some knobs and that's it.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: Getting started with DSP - any suggestions?
« Reply #57 on: June 18, 2018, 10:55:21 pm »
Using a PC is not a good idea. It'heavy, uses a lot of power, has waaaaay too long boot times, doesn't fit a guitar player's floorboard.
If I wanna run a PC I just use Cubase/Reaper and a bench of free VSTs ;)

You're misunderstanding what I mean.

The intention is _not_ to run the code on your PC for the final product, it's to get them right in a familiar environment first, then port.

You test and fix your algorithms in an easy environment first, where you can develop quickly and easily, where you have plenty of tools. You then port your code to your embedded target. Apart from the simplest of tasks, you'll probably have to iterate this process, as you often find you have to optimise your algorithm on the embedded hardware, but at least you know if your algorithm is sound before adding that layer of complexity.

If you want to implement your DSP algorithms directly on the embedded hardware, you're welcome to. I just don't recommend it unless you already live and breathe that target environment, and are very familiar with it. Like I said, I maintain common algorithm C code for both PC and target. You can test, retest and debug controlled and repeatable scenarios far more quickly that way. For example, if you've ever tried to debug a data demodulator on target hardware alone, you'll know how hard it is.
 

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
Re: Getting started with DSP - any suggestions?
« Reply #58 on: June 18, 2018, 10:59:54 pm »
You seem to think the ADAU1452 is a general purpose DSP. It isn't. Its a very constrained device. If you want to, say, convolve to simulate a speaker cabinet its a good choice. If you want to implement guitar effects its definitely not the right choice.

How would you know that?
I've read the SigmaStudio Reverb would have enough memoty to be used on this device - that's what lets me think it might be a good choice.
Emulating speaker cabinets is far away on my list. First I need to pass my signal through and do some EQing ;)

Could you suggest a SigmaDSP that is suiteable for EQ, reverb, (with external ram) as looper, distortion, cab-impulses (speaker-sim)?
Or do you think the SigmaDSPs aren't suiteable for my purpose?

You're misunderstanding what I mean.

That it is. Of course I need to emulate my algorythms on my computer first. But as I really wanted to get started using DSPs I wills tart with easy tasks like passing my signal from ADC to DAC, then do small EQing and so on. Writing own filters is one of tha last tasks, as a prerequirement is I know what my DSP will be able to do and how to tell 'em how to ;)
« Last Edit: June 18, 2018, 11:04:52 pm by NewestRigolUser »
 

Online radiolistener

  • Super Contributor
  • ***
  • Posts: 3345
  • Country: ua
Re: Getting started with DSP - any suggestions?
« Reply #59 on: June 18, 2018, 11:11:14 pm »
Well whilst FPGA needs to be using HDL usingan SigmaDSP Icould simply setupmy device with the Sigma Studio's GUI and add some custom filters. Sounds good for me, as it looks like fast progress.

On FPGA I might be less flexible in comparison to a DSP, don't I?

Everything is exactly the opposite.
With FPGA you will be more flexible and get fast and low latency result with smaller code and low power consumption.
But FPGA requires to learn Verilog/VHDL. And needs to understand what you're doing.
Because FPGA works quite differently than usual processors.

If you already know these ATMega arduino controllers, then using DSP/ARM probably will be more easy for you.
The result will not be so fast and powerful as FPGA. And you will need to write 5-10 times more code than for FPGA.
But at least it will be more easy to learn  :)
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6719
  • Country: nl
Re: Getting started with DSP - any suggestions?
« Reply #60 on: June 18, 2018, 11:34:51 pm »
Smaller code? That's some strange definition of small.
 

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
Re: Getting started with DSP - any suggestions?
« Reply #61 on: June 18, 2018, 11:38:08 pm »
I think understanding how to use an FPGA, plus using it as DSP, plus learning the algorithms is waaaaay more difficult as starting with an DSP which has a GUI (like those SigmaDSPs).
As I don't exactly know how to get sounds I like, I prefer the DSP to play around with.
Maybe I'll start over with FPGA after some years.
I exspect DSPs to be more difficult and way more powerful than 8-bit MCUs. Well, and easier to understand than FPGA :)
 

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6719
  • Country: nl
Re: Getting started with DSP - any suggestions?
« Reply #63 on: June 19, 2018, 12:14:06 am »
If you are happy with the exact set of effects they provide and will not miss any they don't and only want to make yet another limited adau box, go for it.
 

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
Re: Getting started with DSP - any suggestions?
« Reply #64 on: June 19, 2018, 12:21:13 am »
I'd like to have some effects out-of-the box (which provides SigmaStudio) as well as the ability to add own filters.
Just googled the Blackfin boards, there are 3 available within the pricerange of 265 bucks:

584-ADZS-BF592EZLITE 185€
https://www.mouser.de/ProductDetail/Analog-Devices/ADZS-BF592-EZLITE?qs=sGAEpiMZZMsZOJ0x%252bXAYs97eBBl6W06mXK3AA1sTbP8%3d

584-ADZS-BF537-STAMP 188€
https://www.mouser.de/ProductDetail/Analog-Devices/ADZS-BF537-STAMP?qs=sGAEpiMZZMsZOJ0x%252bXAYs97eBBl6W06mRSy1jakl6aI%3d

584-ADZS-BF609-EZBRD 265€
https://www.mouser.de/ProductDetail/Analog-Devices/ADZS-BF609-EZBRD?qs=sGAEpiMZZMsZOJ0x%252bXAYs97eBBl6W06mQwleP9jc0kE%3d

(well, I'm located in Germany so prices are €)

On the Blackfin boards there are i.e. ADAU1761 used as audio codecs. Looks like real magic happens on the Blackfin, whilst equalization happens on the ADAU1761 as advanced codec.
 

Online coppice

  • Super Contributor
  • ***
  • Posts: 8637
  • Country: gb
Re: Getting started with DSP - any suggestions?
« Reply #65 on: June 19, 2018, 10:54:25 am »
You seem to think the ADAU1452 is a general purpose DSP. It isn't. Its a very constrained device. If you want to, say, convolve to simulate a speaker cabinet its a good choice. If you want to implement guitar effects its definitely not the right choice.
How would you know that?
Oh, you know. Things like expertise and reading the documentation.

The SigmaDSP range is fine for simple filtering. Most guitar effects require non-linear processing (basically any of the effects introducing some type of distortion). You won't get far trying to implement those on a SigmaDSP. The linear filtering stuff, like equalisation, is exactly what the SimgaDSP was designed for, and it will do a good job with those tasks.
 

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
Re: Getting started with DSP - any suggestions?
« Reply #66 on: June 19, 2018, 10:57:43 am »
Well, any suggestions for a beginner DSP in this case?

I#d like to keep the bill below 200$ (if possible) for board + programmer/debugger (if it isn't onboard) and software (if there's no opensource or freeware available).
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: Getting started with DSP - any suggestions?
« Reply #67 on: June 19, 2018, 02:32:43 pm »
Well, any suggestions for a beginner DSP in this case?

I#d like to keep the bill below 200$ (if possible) for board + programmer/debugger (if it isn't onboard) and software (if there's no opensource or freeware available).

My first embedded hardware real DSP experiences were with a TMS320VC33 and subsequently the TMS320C6713 and TMS320C6726. In those days, Rulph Chassaing's (RIP) Digital Signal Processing books were godsends: in the books he came up with many practical experiments using various TI vendor DSKs like those for the the TMS320C31 and TMS320C6713. You can see a PDF copy of the 6713 book here: http://www.stu.edu.vn/uploads/documents/260809-140534.pdf.

Thankfully, Donald Reay worked with Chassaing, and carried on the Digital Signal Processing series. I note that there is now one book for the ARM Cortex M4 (covering specifically both the TM4C123 LaunchPad & audio booster pack, and STM32F407 Discovery & Wolfson Pi audio card, both are M4F devices) and another book for the OMAP-L138 Experimenter board.

I've had a quick skim through the M4 book, it looks like it's the kind of thing that would suit you.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: Getting started with DSP - any suggestions?
« Reply #68 on: June 19, 2018, 06:42:04 pm »
I also see that the Donald Reay M4 book has code in its online section that supports the Cypress FM4-176L-S6E2CC board which includes the codec onboard, so it’s a neater solution.

It appears that the CircuitCo audio booster pack was never distributed in volume, which sadly discounts the TM4C123 option unless you want to figure out the codec hardware yourself.

One thing I’ve found with DSP devices is that their vendor support dwindles more quickly than more general purpose MCUs. You might be able to source the devices, but the dev kits and associated documentation starts disappearing comparatively quickly.
 

Offline _Wim_

  • Super Contributor
  • ***
  • Posts: 1517
  • Country: be
Re: Getting started with DSP - any suggestions?
« Reply #69 on: June 19, 2018, 07:28:05 pm »
You seem to think the ADAU1452 is a general purpose DSP. It isn't. Its a very constrained device. If you want to, say, convolve to simulate a speaker cabinet its a good choice. If you want to implement guitar effects its definitely not the right choice.

How would you know that?
I've read the SigmaStudio Reverb would have enough memoty to be used on this device - that's what lets me think it might be a good choice.
Emulating speaker cabinets is far away on my list. First I need to pass my signal through and do some EQing ;)

Could you suggest a SigmaDSP that is suiteable for EQ, reverb, (with external ram) as looper, distortion, cab-impulses (speaker-sim)?
Or do you think the SigmaDSPs aren't suiteable for my purpose?

I agree here what other had to say, Sigma Studio is very easy to set up, but can be very limiting. You can download the software for free (http://www.analog.com/en/design-center/processors-and-dsp/evaluation-and-development-software/ss_sigst_02.html#dsp-relatedsoftware) and have a play around with it, it does not require you to have a device connected. "Programming" is on the same level as adjusting a VST-plugin...

As a learning tool, this software can be interesting: http://www.dsprobotics.com I played around with it may years ago, and for education purposes, it was very good...
 

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
Re: Getting started with DSP - any suggestions?
« Reply #70 on: June 19, 2018, 09:05:45 pm »
Already installed SigmaStudio. But as I'm abroad for two weeks, I'm unable to really get a first impression right now.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf