Hacker News new | ask | show | jobs
by kpmah 2192 days ago
I've had some problems understanding the Laplace transform. Maybe somebody here can point me towards some material.

I have an interest understanding how IIR filters are designed, and I always get stuck at this part in DSP books. The Laplace transform is used, but as well as finding the mathematics difficut I don't really understand why it is being used at all. I think it is trying to replicate the effect of an analog circuit?

4 comments

I like practical examples for learning about math-heavy stuff and I came to greater understanding while looking into imaging, specifically how DCT (discrete cosine transformation) works.

You learn how an image is dissected into two matrices (or one complex matrix) containing amplitudes and phases of respective frequencies. A good start for me was playing around with openCV and reading about JPEG (uses DCT).

Why transform an image in the first place? Because you can just set the highest frequencies to zero without influencing the image in real space too much. This effect is leveraged by classical JPEG compression, you just delete data not that important for the image. Being able to analyze, filter, change frequencies in a signal has a lot of other applications.

There are better links but maybe this is a start: https://www.mathworks.com/help/images/discrete-cosine-transf...

There is a ton of literature about DCT because its widespread application. A few google searches lead to good learning material. Fourier and in general LaPlace transformations are a little different, but far easier to understand after seeing an example of their application in my opinion.

This also touches the topic of the article. The problem is that transforming between real space and spectral space results in rounding errors. The article describes a new approach to minimize these.

You can describe a circuit by it's time domain behavior. Or you can describe the circuit by it's frequency domain behavior. Both are valid and congruent.

The thing is a lot of questions are easy to answer in the frequency domain.

For instance, you want to know if a circuit with feedback will oscillate. Hard to answer using time domain equations. But in the frequency domain there is a simple constraint. If for all frequencies where the the gain is greater than one the phase shift is less than 180 degrees, circuit won't oscillate. This is obviously rather useful.

Also a point with a lot of 'books' the authors get caught up in describing how something is done that they never explain why something is done. I've found often the answer is simple yet opaque and frustratingly never talked about.

This. I remember having adequate cursory knowledge of Fourier Transform to the point of understanding the value of FFT algorithms, but the Laplace Transform was explained like hell so I failed my robotics classes.
If you have an electronic circuit, you can model each element with a differential equation. E.g. voltage across a capacitor is modelled as the integral of current, voltage across an inductor is dI/dt.

This is a useful fact for a simple circuit in a classroom, but the differential equations for any circuit with more than a few components soon become insanely complex.

With the Laplace transform you (more or less) replace an integral with 1/s and a differential with s, plus some constants derived from the component values.

Then you can simplify for s, and use the Inverse Laplace Transform to convert the final expression in s into an expression in t.

You have now solved an insanely complex differential equation with some basic algebra, and your final expression in t - with component constants, and some exponentials that appear after the inverse transform - accurately models how the circuit responds over time.

There's also a related fairly simple trick for converting the s-domain representation into a frequency/phase plot which tells you how the circuit operates in the frequency domain.

And another related fairly simple trick for converting the continuous s-domain into the z-domain for DSP calculations over a sampled time series.

Because the same theory also applies in other domains - spring/mass systems, and so on - you can use the same technique there too.

Yes this very good. As it the point that restating the problem in a different domain is a very common way to make a problem tractable.

Examples

Converting numbers to logs allows you to multiply and divide by mere addition and subtraction. If you wonder why RF engineers represent power in db this is why.

Mapping an equation in terms of forces integrated over a path to one using vectors and energy.

Thanks for this!!!!
Yes, one way of designing an IIR filter is to design the continuous-time version and convert it to discrete. There are other (usually better) ways, but if you've already got a good understanding of continuous-time filter behaviour, it's a usable on-ramp.
In DSP you would use the z transform instead.