Skip to main content
16-Pearl
April 9, 2020
Question

Return max value from a Convolution calc

  • April 9, 2020
  • 2 replies
  • 5993 views

I have to revisit some "old" mcad 15 as I lost some of them.

I am setting up a Convolution calculation for a given input (half sine) to extract the max response for a given range of frequencies. However what I am getting out does not appear to be correct. 

Can anyone wit the expertise have a look and point me toward what is wrong?

 

 

2 replies

25-Diamond I
April 9, 2020

The expression inside the "max" function in your program yields just one single scalar value (not a vector) - so what do you expect that "max" should do?

16-Pearl
April 9, 2020

I thought the expression would return a "graph" as if I take the expression between the max() and plot it I get the attached

25-Diamond I
April 9, 2020

I don't see how  the function QQ and the variable tr in your picture are defined and how this picture would relate to the sheet you posted and your question ??

 

In your sheet you try to take the maximum of a single scalar value.

For every of your  400 frequencies (in the example below I had chosen 100 Hz) the expression in your max function (basically a definite integral) would yield just one single scalar value.

max would normally work on a vector of values but if you simply provide a single scalar, max would return juts that value.

Here is what you calculate 400 times and this is what you final plot would consist of:

Werner_E_0-1586433282352.png

 

21-Topaz II
April 10, 2020

Hi,

It is not necessary to perform convolution in the loop:

answer to JXB.jpg

16-Pearl
April 13, 2020

Apologises for the delay in replying - Was busy looking at others "methods" (python script, etc)

The method proposed is a lot faster but does not give a correct answer. At high frequency the plot should stabilise around the Amax value (10 in this case or 1 it scale the data by Amax). I attached a comparison plot which shows that my 1st pass coding of the convolution seems correct with some issues in some frequency (spike). I compared my prediction against 2 other methods (Method #2 is a 1/3 party tool (a black box)). 

 

I think the issue with your propose method is the use of t[i in the function f0()

 

Can one of the math expert (@LucMeekes springs to mind) put some light on why one get spikes in my plot?

 

Thanks in advance

21-Topaz II
April 13, 2020

Hi,

It is clear that the system in question is a linear and stationary system of an unknown nature. The analytical relationship between the response and the excitement of a linear and stationary system, whose impulsive response is known, is given by the convolution between the two and constitutes the forced response of the system. See image. What leaves me a little perplexed is that you ask the simultaneous trend of the maximum value of the response to the variation of time and frequency (it can be seen from the loop with index i) which does not seem correct to me. Since the system is linear and stationary, the Laplace transform is commonly used, and thanks to the Borel theorem, from this, with an inverse Laplace transform calculation, one gets the forced response as a function of time. For the analysis in the frequency domain, just put, then, s = jω into the transfer function and plot the Bode diagrams. Knowing the forced response of the system,  It is possible to determine the peak of the forced response and then to determine its trend as the frequency changes.

answer 2 to JXB.jpg

This, however, requires many laborious and difficult calculations