cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Convolution integral of a random signal

gianinscozia-di
1-Newbie

Convolution integral of a random signal

Hi everybody:

I have to make the convolution integral of a random signal (in particular, it's an accelerogram of an earthquake) which I'm going to attach to the message, and I don't know how to tell to the mathcad that he has to take each value of the first row and multiply it for the correspondent impulse response function in each moment, and then of course make the integral of all it.

Thanks a lot!

Giancarlo
23 REPLIES 23

You start with the convolution integral. If you have two functions, that is that. You just evaluate the integral. If one (or both) of the functions are provided only as a set of data points, you have two choices. You can use some form of interpolation to make a continuous function out of the data. Or you can approximate the integral with a summation, typically Euler sums.

For reasonably smooth data one usually uses cubic splines, as the best approximation to an underlying function. But your data is much too jagged for cubic splines to be meaningful so you are restricted to either a linear interpolation or a discrete approximation.
__________________
� � � � Tom Gutman

As simple as demonstrated if you made yourself understood. Often, it is best to give the problem as stated in the exercise, in order to avoid conceptual misinterpretation from the responding community.

Not clear what you are asking for?

jmG

You kind of left out the other function required for a convolution. Also, lspline is not a linear interpolation. It is a cubic spline interpolation, with inflection points forced at the ends.
__________________
� � � � Tom Gutman

On 5/24/2009 9:37:08 PM, Tom_Gutman wrote:
>You kind of left out the other
>function required for a
>convolution.

Yes, I don't use the word for what he is looking, which I don't know exactly. Convolution is int(f(x)*g(x-t),t). I take the Y values as the "correspondent impulse response function in each moment", literal from the original post. So, take g(t) = t hoping that this gives the convolution.

>Also, lspline is
>not a linear interpolation.
>It is a cubic spline
>interpolation, with inflection
>points forced at the ends.

Redaction mistake, where I says "linear spline interpolation" please write "cubic spline interpolation with linear endpoints".

About Fourier methods, must to know what it's the meaning of the "correspondent impulse response function in each moment" assertion.

Regards. Alvaro.

Your sheet Alvaro,

does nothing whatsoever "convolution". You are just integrating the noisy data set. And as you use the numerical integrator you then have to fit linear or spline. That does nothing as you just need to use the finite differences on the data set directly whether equally spaced or not. I have passed that stuff so many times and lavishly exemplified. A common recurrent quiz that teachers love so much passing just to show the utility of reading the forum and/or Googling for keywords.

The other possible interpretation of a two column vector is the circular convolution, attached. That assumption should help the originator that "convolution" as such, is unspecified ... or if you wish by default, "convolution = convol(X,Y)"

jmG

convol isn't undocumented. It's a function from image processing extension pack. Also have convolve2d, convolve3 and convolve5.

Regards. Alvaro.

On 5/24/2009 9:59:05 PM, adiaz wrote:
>convol isn't undocumented.
>It's a function from image
>processing extension pack.
>Also have convolve2d,
>convolve3 and convolve5.
>
>Regards. Alvaro.
__________________________

convol(,,) is not a listed function therefore "Undocumented".
convol(,,) worked in my 8 Pro. much before I got the 11 Improc. What I'm saying is that convol(,,) is not an Improc function. If you spline noise you just have the same worst noise. The convolution is as I have posted, that's it !

What it has to do ? God knows.

jmG

On 5/24/2009 10:36:07 PM, jmG wrote:
>convol(,,) is not a listed function

Figures in 'Insert Function' and says "Returns the convolution of the arrays vx and vy". But you're right: ins't a part of improc, even the others are.

>What it has to do ? God knows.

Do the product between the the zero padding and the vector, as shown in the figure



Alvaro.

On 5/24/2009 11:36:46 PM, adiaz wrote:
>On 5/24/2009 10:36:07 PM, jmG wrote:
>>convol(,,) is not a listed function
>
>Figures in 'Insert Function' and says
>"Returns the convolution of the arrays
>vx and vy". But you're right: ins't a
>part of improc, even the others are.
>
>>What it has to do ? God knows.
>
>Do the product between the the zero
>padding and the vector, as shown in the
>figure
>
>
>
>Alvaro.
__________________________

'Insert Function' and says
>"Returns the convolution of the arrays
>vx and vy"

==> That's for version above 11, which ones ?

11 does not have convol(X,Y) listed, though it has as undocumented and functional since at least version 6 as far as some Mathcad repository work sheets have used this function. For those interested, if you have a minute make the little program that computes the sliding y (h in your example).

jmG



On 5/25/2009 1:48:31 AM, jmG wrote:
>For those interested, if you have a minute
>make the little program that computes
>the sliding y (h in your example).

Some notes attached.

Regards. Alvaro.

On 5/25/2009 4:53:09 AM, adiaz wrote:
>On 5/25/2009 1:48:31 AM, jmG wrote:
>>For those interested, if you have a minute
>>make the little program that computes
>>the sliding y (h in your example).
>
>Some notes attached.
>
>Regards. Alvaro.
______________________

"I use h and not y in the convolution following this implementation, ..."

==> You are right: better follow convention h, not y

Two superb work sheets attached.

Jean



Oh, with a random ensemble, anything comes and anything goes. To be logical, use a known set of 2 data, expect the result, and try vector convolutes of the known data and the cffts of the two sets followed by icfft in each case.

Throwing out a random bunch of data gives anything in result, but is it right? QER & QED is needed.

On 5/25/2009 7:24:46 PM, bones7xx wrote:
>Oh, with a random ensemble, anything comes and anything goes. To be logical, use a known set of 2 data, expect the result, and try vector convolutes of the known data and the cffts of the two sets followed by icfft in each case.

I'm sorry Theodore, but this kind of abstraction isn't for my level of knowdoladge (or it's writing in englinsh) in this topic. Whithout a practical example can't answer, but for me seems to be OK your question, this is: answer is TRUE.

Regards. Alvaro.

I read "random signal." That was mis-leading to me, and i reacted accordingly. There was no randomized data. I admit the work was OK now.

On 5/25/2009 9:39:04 PM, bones7xx wrote:
>I read "random signal."

An earthquake it is a kind of random signal, so, you are not so far.

Maybe a kind of "quasi-periodic with retarded exponential decay", but nobody have a formal definition of this.

Predicting earthquaques it is a risk kind of art. You can finish just your job at jail.

Regards. Alvaro.

I re-wrote the example to get a rapidly decaying set of samples on a periodic scale. The idea holds, but I prefer to do the work with cfft on the complete data, then iccft following just to show the real case.

Considering the nature of the project, I'm still convinced the only approach to earth quake is the "circular convolution". Or for 1/1 comparison , then the absolute convolution. The other interesting point would be about the data Y, real ? complex ?

jmG


In mathematics and, in particular, functional analysis, convolution is a mathematical operation on two functions f and g, producing a third function that is typically viewed as a modified version of one of the original functions.

If � and g are integrable functions, then the integral of their convolution on the whole space is simply obtained as the product of their integrals:
This follows from Fubini's theorem. The same result holds if � and g are only assumed to be nonnegative measurable functions, by Tonelli's theorem.

By no means can the integral of icfft((cfft(f)*cfft(g))be found and proved true by the product of two integrals obtained independently.

The third function may be close to one of the original functions, but it is not the same.

It is hard to integrste the discrete points of the earthquake model and the corrected data from it because the MathCad integral function doesn't apply to discrete data.




The integral of the product of two convolution integrals is not the integral of the product of the independent convolutions. (See theory is last popsting).

Here, the scaled FFTe Budapest FFT is used because it permits interpolation and integration with MathCad.

On 5/27/2009 1:53:12 AM, bones7xx wrote:
>The integral of the product of
>two convolution integrals is
>not the integral of the
>product of the independent
>convolutions. (See theory is
>last posting).
>
>Here, the scaled FFTe Budapest
>FFT is used because it permits
>interpolation and integration
>with MathCad.
______________________________

You are right Theodore,

Convolution is an involved sliding process.

Jean

On 5/25/2009 9:50:54 AM, jmG wrote:
>On 5/25/2009 4:53:09 AM, adiaz wrote:
>>On 5/25/2009 1:48:31 AM, jmG wrote:
>>>For those interested, if you have a minute
>>>make the little program that computes
>>>the sliding y (h in your example).
>>
>>Some notes attached.
>>
>>Regards. Alvaro.
>______________________
>
>"I use h and not y in the convolution
>following this implementation, ..."
>
>==> You are right: better follow
>convention h, not y
>
=====================================

Here is the convolution of two vectors,
equivalent to the Mathcad built-in.

jmG


There is another option for the calculations. Convolution in the time domain maps to multiplication in the frequency (fourier transform) domain. You can calculate the fourier transforms of both functions (using one of the FFT's for discrete data), multiply them, and then do an inverse fourier transform.
__________________
� � � � Tom Gutman
Top Tags