Analyzing RC response with convolution theorem and fft.

In summary, the conversation discussed the use of DFT and its compatibility with circular convolution. The approach of using y=ifft(fft(x).*fft(h)) was mentioned and its validity questioned. The reason for the approximate results was explained to be due to the truncation of the input vectors. The importance of zero-padding and other factors such as windowing and padding were also mentioned to avoid errors in the DFT.
  • #1
davidbenari
466
18
Some textbooks like (Numerical recipes the art of scientific computing) derive the DFT as a Riemann sum of the CTFT. With this in mind it would be natural then to approximate the identity

##y(t)=x*h=\mathcal{F}^{-1}\big\{XH\big\}##

with the mathlab code y=ifft(fft(x).*fft(h)) which roughly means that my response is the inverse DFT of the product of the DFTs.

I have been reading recently that this approach isn't really valid in the case of the DFT. The relevant identity in the discrete realm is

##\mathcal{F}^{-1}(XH)_{n}=\sum_{l=0}^{N-1} x_l (y_N)_{n-l}##

which is called a circular convolution.

But so far, my ifft(fft...) approach yields results that are completely compatible with the analytical results.

I also want to mention that I have checked for the well-known result that convolving with a shifted impulse, shifts your response along the domain; and the result that scaling an impulse, scales the response.

I've implemented impulses by inputting the coefficient in the dirac-delta function in some position on a vector, without really justifying why this works.

So therefore I have two questions:

Why is the y=ifft(fft(x).*fft(h)) approach valid and compatible with the theory? Is this the way its supposed to be? How can I justify such a thing? Why aren't the step factors ##dt## involved in this approach?

Why are impulses correctly modeled by only inputting the coefficient that would correspond to the dirac-delta function? (This seems intuitive to me, but I wouldn't like to say my opinion as I would prefer to listen to you mostly).

Finally, if I want to analyze another signal like cos(t), I do have to include the step ##dt## in order to get results congruous with the analytical results. Why is this occurring ?

Thanks!
 
Engineering news on Phys.org
  • #2
Circular convolution using DFT will give you approximately the same results as regular convolution as long as you zero-pad your input vectors, typically you make them twice as long as the input data,.

This is for the usual reason: the original identity requires you to integrate +-inf; in a DFT you obviously have to use a finite sized vector and this truncation is what is causing problems. A DFT is never just a "numerical Fourier transform", there are a whole bunch of issues that you need to keep track of to avoid errors (see windowing, padding etc)
 
Last edited:
  • Like
Likes davidbenari

1. What is the convolution theorem and how is it used to analyze RC response?

The convolution theorem is a mathematical concept that states that the Fourier transform of the convolution of two functions is equal to the product of their individual Fourier transforms. In the context of analyzing RC response, it is used to decompose a complex input signal into simpler components that can be analyzed separately.

2. What is the FFT and how does it relate to the convolution theorem?

The FFT, or Fast Fourier Transform, is a computational algorithm used to efficiently calculate the Fourier transform of a discrete signal. It is closely related to the convolution theorem because it allows for the quick calculation of the individual Fourier transforms needed for the convolution process.

3. How does the convolution theorem help in understanding the behavior of RC circuits?

The convolution theorem allows us to break down a complex input signal, such as a voltage or current input in an RC circuit, into simpler components. This makes it easier to analyze the behavior of the circuit and understand how it responds to different inputs.

4. Can the convolution theorem and FFT be used for other types of circuits besides RC circuits?

Yes, the convolution theorem and FFT can be applied to analyze the response of any linear time-invariant circuit. This includes circuits with resistors, capacitors, and inductors, as well as more complex circuits with multiple components.

5. Are there any limitations to using the convolution theorem and FFT for circuit analysis?

While the convolution theorem and FFT are powerful tools for analyzing circuit response, they do have some limitations. They are most effective for analyzing linear time-invariant circuits, and may not be as accurate for non-linear or time-varying circuits. Additionally, they may not account for certain circuit characteristics such as parasitic elements or non-ideal components.

Similar threads

Replies
5
Views
4K
  • Electrical Engineering
Replies
2
Views
5K
  • Electrical Engineering
Replies
2
Views
2K
Replies
1
Views
1K
  • Electrical Engineering
Replies
7
Views
2K
Replies
4
Views
755
  • Calculus and Beyond Homework Help
Replies
1
Views
962
  • Programming and Computer Science
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • Electromagnetism
Replies
3
Views
2K
Back
Top