Hacker News new | past | comments | ask | show | jobs | submit login
The Scientist and Engineer's Guide to Digital Signal Processing (1999) (analog.com)
218 points by tzhenghao on Jan 18, 2019 | hide | past | favorite | 45 comments



Easier access to (I think) the same content here: http://www.dspguide.com/pdfbook.htm


Boy this brings back memories. When I was at school this was my bible. I graduated my embedded systems programming study, with my field of study being DSP. Soon after I started my changed careers pretty fast, but I still look back on DSP with much love. I'm still fun at parties, though. E.g. when somebody criticizes the CD, being worse than analogue LP's. Also when people invest top dollar in speaker cables, while the single most area to invest is being overlooked. Fixing the DA clock-source results is far better music quality, then any speaker cable will ever can.


>Fixing the DA clock-source results is far better music quality, then any speaker cable will ever can.

I read this as a having a decent quality DAC inline between the source and listening device will do more than expensive speaker wire?


Yes, I think that's what is being said. A lot of the usb hifi dacs have their own clock for this exact reason


>Fixing the DA clock-source

What do you mean? Are you claiming to be able to hear 50 ppm clock inaccuracy?


The parent didn't claim 50ppm clock inaccuracy but I think their claim is very credible.

For example, the uC I am working on right now has built-in DACs which are good enough for audio and a 5% accurate internal clock (uncalibrated). If a vendor cheaped out and didn't use a proper external oscillator and/or didn't calibrate the clock (which is presumably the code the parent wrote) then the frequency would be basically one half step off on an equal tempered scale which is definitely audible for most people.

http://pages.mtu.edu/~suits/NoteFreqCalcs.html


You're correct! When sound is recorded, it will be transformed from analog to digital. This will be done with a very high quality clock source. At home when you play your music it's often on a DAC with a bad clock source. You can hear this easily because the timing of the samples is off. The reconstructed waveform is different because of the wonky timing (jitter). Replacing the clock source (soldering) within a cheap CD player with a high quality one, will make it sound a much better.

http://www.tentlabs.com/Components/cdupgrade/xo2xo3/index.ht...


Audiophoolery, this website also sells 200 euro volume knob, says it all.

Nonetheless I will elaborate, 100ps jitter you are being warned about in the description of this must have clock module will be detectable to any human with hearing reaching 10 GHz range.

I recommend https://xiph.org/video/


Except no one uses basic RC oscillators in Audio gear, and the cheapest bottom of the barrel crystal has already mentioned 50 ppm accuracy and excellent stability.


When I first studied this book, and other related bits of Engineering Maths, I remember being completely marveled by Laplace and Z transform methods. I could learn to manipulate them and use them to solve equations, it felt like black magic for a very long time even having working through all of the basic derivations.

A book that did a lot to bring my understanding around was Complex Variables and the Laplace Transform for Engineers by LePage. It's more-or-less a pretty thorough introduction to complex analysis, but developed in the context of linear systems and transfer functions. I would absolutely recommend it as a sequel to this book.


Same here. The Laplace transform and it's consequences changed my life. I also took a class in college about some stochastic signal processing where I learned about Autocorrelation. The application was finding signals in very noisy environments. The professor who taught it was measuring electrical signals from the auditory system in rabbits.

https://en.wikipedia.org/wiki/Autocorrelation


Same for when I studied Electrical Engineering - we had analyzed circuits, and solved diff. equations the lengthy way, often times a real pain in the ass (the more complex a network was). Then in our electronics class we were introduced to Laplace transforms, and it almost felt like cheating.

For some reason, we got the formal introduction to transforms (Fourier, Laplace, Z, etc.) the semester after in our calculus and diff. eq classes, but method was simple and intuitive enough that anyone with Calc 1 could jump into it - at least for the application of electronics.


I feel similarly about using root locus diagrams in control theory with Laplace transforms. I'm just beginning the DSP part of my EE degree.


Ha!

The first time I did root locus diagrams in Linear Systems (or whatever the course was called), we did everything by hand and I hated it.

10 years after graduation I was in a certificate class for Mechatronics and we had Matlab. The difference was night and day. Suddenly I could play with root locations and see the effect immediately without having to do half an hour of tedious hand calculation. It's amazing how much your attitude improves when the work becomes "fun."


I've been wanting to learn more about DSP, and this looks like a good free resource, but the examples in BASIC are just so hard to read, between the line numbers and SHOUTY CASE.

While I suppose it would be a good exercise to translate the examples into the language of my choice, are there any good resources on DSP that use a more reasonable language for the examples? And I'd prefer to avoid proprietary languages like Matlab.


Not entirely DSP, but Software Defined Radio is very related. There's an excellent tutorial series on SDR over at https://greatscottgadgets.com/sdr/ that's a whole lot of fun. No coding, just an intro to many great concepts.


Yeah, SDR is one of the reasons I wanted to learn more about DSP.

SDR, digital audio processing, digital image processing (especially compression and filtering), all of them have roots in DSP.

That looks like an interesting resource, but I really prefer written word and text-based programming languages to video lessons and flow-graph based configuration.


just a quick google, and there is some people who have done stuff with it in other languages...

https://github.com/davecan/dspguide-code


The advantage with MATLAB/Octave is that a lot of signal processing code has already been written in it. As you write more complex DSP code, you'll get stuck somewhere and chances are someone has already coded up that application on MATLAB central or on their blog.

I took a Speech Processing class and opted to write code in Python. I probably spent 1.5x the time the others spent. Most DSP texts today have MATLAB code.

It might be a good exercise to implement the functions from scratch but I think it is better to focus on the theory and not waste time coding up something like Overlap-add.



The skills learnt should be transferrable to Octave which is Matlab compatible.


Or just use a programming language instead of a calculator with various features bolted on.

[Speaking of cvxopt, originally written in matlab] "Fortunately, it has since been rewritten in a real programming language." - Stephen Boyd


This book uses BASIC, which I just find quite unreadable.

I don't know of what other resources are available, but I do know I've seen some that use Matlab. I've never played with Octave much, so I don't know how compatible it is; can you just directly copy Matlab code, or do you need to do translations?

Anyhow, if there's a book that uses Matlab rather than BASIC, and could be used in Octave, that might be more readable. I would find C, C++, Python, or Rust more familiar, though.


I've never played with Octave much, so I don't know how compatible it is; can you just directly copy Matlab code, or do you need to do translations?

I'm not an expert, but I believe Octave is pretty compatible, at least with the core language. I think there are some "extra" features and libraries that don't exist in Octave, but it should be fine for many scenarios. FWIW, the earlier version of Andrew Ng's machine learning class on Coursera was Matlab / Octave based, and students using Octave were able to do everything required there with no problems.

You can find some more detailed comparison here:

https://en.wikibooks.org/wiki/MATLAB_Programming/Differences...


In my experience one can pretty much just copy and paste, and most things work (though likely not 100%). There are two ways in which Octave still falls short: (1) Matlab is faster, as it has (I believe) JIT compilation whereas Octave doesn't; and (2) all things related to plotting & graphing are still better in Matlab IMO, though that may be changing. This may not be important for learning DSP, but does matter in day to day scientific work.


This one by Orfanidis is good IMO and uses C examples:

https://www.ece.rutgers.edu/~orfanidi/intro2sp/


As an EE who flunked his DSP graduate course,Can't recommend this book enough to grok DSP basics. And it's Free!As a good programming practice I intend to translate the codes from BASIC( pseudocode) to Python(NumPY fun).


No offense intended, but ... that isn't the most glowing recommendation.

I read it as "This book is great, really helped me understand the concepts. In fact, it helped so much I failed the class."


I think he meant he read it after he failed the class which didn' give him a proper understanding of the material while this book did the opposite.

So that sounds pretty encouraging.


That is my take too.

BASIC is fine. I won't language quibble on a nice free resource.


As an EE with shallow knowledge of anything EE I would like to work and work you .


A Godsend! I really appreciated the separation of the s-plane as rectangular and the z-plane as polar. It is astonishing the depth to which we can analyze the frequency harmonics of a signal.

;-)


Can not recommend the book enough. I read the entire book in PDF format first. Then went out and bought a hard copy.

I work at ADI now, which is kind of weird to see the OP's link.


Ex-ADIer here, we had a couple of copies kicking around in our office. Shortly after I joined I asked my team lead what an FFT is, he explained "it's a way to transform a signal from the time domain to the frequency domain..." and when he saw that my eyes had glazed over he pointed to this book and said "read that". It's really readable and an excellent intro to DSP


From the blog quoted above: "Advanced DSP can certainly get complicated with quadrature processing, Hilbert transforms, and cascaded infinite impulse response filters, but this series on DSP isn't going to get that complicated."

Gulp. I'm new to DSP, so I'm obviously not going to jump into "quadrature processing," but what would you say are the basic mathematical prerequisites for getting into this kind of thing? What sort of math should you know before you even start?


I'm afraid I don't know that info - I worked with the compiler toolchain and associated libraries so strictly speaking it probably wasn't even necessary to know the basics of signal processing. However it gets -complicated- interesting enough to be challenging, and whatever the next steps are this will at least put the necessary groundwork in place :-)


To get started all you really need is trig. As you progress you'll need more advanced math.


This has been a favorite for nearly 20 years.


I need something like this for Music Theory.



also, there is canonical green-tea-press book 'think dsp' available here: http://greenteapress.com/wp/think-dsp/

which covers the basics in python.


Does anyone have any suggestions for a book specific to audio synthesis DSP?


This one's pretty good for audio DSP in general, including some fairly detailed material on synthesis:

https://mitpress.mit.edu/books/audio-programming-book

Most of the code is C (and some C++). The first two chapters are a C tutorial, followed by audio-specific C programming. If you already know C you may want to skip the first couple of chapters.

If you're going to buy it I'd recommend a hard copy, as the DVD includes a lot of stuff that isn't in the Kindle version.


This book contains some wrong and oversimplified statements, the explanation of the sampling theorem is awkward and suggests that the author has not fully understood it himself.

Example of wrong claims: "The heart of digital noise generation is the random number generator." Not true, many digital noise generators use LFSR.

"Just as analog filters are designed using the Laplace transform, recursive digital filters are developed with a parallel technique called the z-transform." Hello no, there are gazillion ways to design filters - analog or digital - without those transforms.

"The frequency domain becomes attractive whenever the complexity of the Fourier Transform is less than the complexity of the convolution. This isn't a matter of which you like better; it is a matter of which you hate less."

Clearly I hate both domains less than this book. It might serve as an introduction to DSP, but please remain suspicious, if some claim herein seems oversimplified, it probably is.


I don't understand your issue with his statement on PRNGs... LFSRs are functionally pseudorandom number generators in this context, so you haven't invalidated his statement.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: