DSPRelated.com
Forums

Scaling Factor In Approximating Continuous-time Convolution by Discrete-time Convolution

Started by sunny January 10, 2008
Hello,

I know this may sound a common or even a basic question to many,
however I will appreciate if someone can give me insight on this. I
read some of the older posts on related topics but a fraction of doubt
still remains.

I am trying to find the correct scaling factor for the output of
convolution (in MATLAB). I have a signal x[n] of length N. I have a
unit-amplitide discrete-time rectangular pulse function h[n] of length
L. I used conv(x,h) and ended up with the output y[n] of length N+L-1.
After plotting it I found the amplitude of the output to be much
higher compared to what I will get if I would use continuous-time
convolution (however the shape was same).

I figured out that the approximation of continuous-time convolution by
a discrete-time convolution requires scaling of output by the number
of samples. So I divided y[n] by N+L-1. However the output turned out
to be much smaller (but same in shape) compared to x[n] plot. After
trying various factors which include N, L, N+L-1 and their square-
roots, I discovered that 1/sqrt(L) was the factor which gave me the
correctly scaled amplitude.

However, it remains unclear to me (a) why the output should depend on
the *sqrt of the no of samples* when the discrete-time approximation
of continuous-time convolution clearly states that the sacling factor
is just the *no of samples*? (b) why the scaling of output should
depend on only L and not on N?

Sincerely,

Sunny.

On Jan 10, 3:44 pm, sunny <sunny.mis...@gmail.com> wrote:
> Hello, > > I know this may sound a common or even a basic question to many, > however I will appreciate if someone can give me insight on this. I > read some of the older posts on related topics but a fraction of doubt > still remains. > > I am trying to find the correct scaling factor for the output of > convolution (in MATLAB). I have a signal x[n] of length N. I have a > unit-amplitide discrete-time rectangular pulse function h[n] of length > L. I used conv(x,h) and ended up with the output y[n] of length N+L-1. > After plotting it I found the amplitude of the output to be much > higher compared to what I will get if I would use continuous-time > convolution (however the shape was same). > > I figured out that the approximation of continuous-time convolution by > a discrete-time convolution requires scaling of output by the number > of samples. So I divided y[n] by N+L-1. However the output turned out > to be much smaller (but same in shape) compared to x[n] plot. After > trying various factors which include N, L, N+L-1 and their square- > roots, I discovered that 1/sqrt(L) was the factor which gave me the > correctly scaled amplitude. > > However, it remains unclear to me (a) why the output should depend on > the *sqrt of the no of samples* when the discrete-time approximation > of continuous-time convolution clearly states that the sacling factor > is just the *no of samples*? (b) why the scaling of output should > depend on only L and not on N? > > Sincerely, > > Sunny.
Seems like there should be a scale factor of delta_t, the spacing between samples. The discrete convolution is a Riemann Sum approximation to the continuous integral, in other words it is the sum of areas of rectangles. The area of each rectangle is delta_t times x(n)h(n-k). John
> Seems like there should be a scalefactorof delta_t, the spacing > between samples. The discreteconvolutionis a Riemann Sum > approximation to the continuous integral, in other words it is the sum > of areas of rectangles. The area of each rectangle is delta_t times > x(n)h(n-k). > > John
Thankyou John for your reply. In fact delta_t was what I was talking about in my last post. I assumed that this must be proportional to the number of samples. So I divided the signal by the number of samples. Turns out the correct scaling factor is not the no of samples. Can you explain your idea in view of part a and b of my last post? Sunny.
> Thankyou John for your reply. In fact delta_t was what I was talking > about in my last post. I assumed that this must be proportional to the > number of samples. So I divided the signal by the number of samples. > Turns out the correct scaling factor is not the no of samples. Can you > explain your idea in view of part a and b of my last post? > > Sunny.
I repeated your experiment and found the same results. As for your questions (a) Is it the same reason why sometimes we scale FFT by sqrt(N) during frequency convolution cases? (b) could it be that min(L,N) should be used? This can be ascertained by experiments. But I am not sure of the logic behin this. Kumar Vijay Mishra.