Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Convolution Integral Instability

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-21-2014
01:12 PM

03-21-2014
01:12 PM

Attached is a Mathcad 15 document that I have failed to troubleshoot. In sum, I am attempting to perform a convolution integral in a loop using a range variable, extracting the maximum computed value over a given time range in each cycle through the loop.

I believe the issue is an instability in Mathcad's numerical integration. As-is, the attached document runs perfectly fine, as the final output (u.max) computes without issue. However, as soon as I adjust some of the key parameters, I receive the error "This calculation does not converge to a solution" when attempting to extract the maximum values within the loop. In particular, I wish to change the t.max to 10s so that the numerical integration is done over the range 0s to 10s instead of 0s to 4s, and I wish to be able to changing the damping term (Greek "xi") to other arbitrary values and repeat; however, changing either leads to this error.

By altering the lower bound of the integrand on the "u.loop" calculation - e.g. from 0 to 0.001s - I have been able to improve the stability of the calculations slightly (that is, have been able to alter some parameters and get a solution), leading me to believe that this is where the computation error is being introduced.

However, the calculation is still fragile, and I'm at a loss of how to fix it. Does anyone have any suggestions?

Thanks,

C

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-21-2014
02:19 PM

03-21-2014
02:19 PM

I've tidied up your routines and put in some fixes that enable it to work for t=10s. You will need to check carefully that the fixes are acceptable!

Alan

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-21-2014
02:19 PM

03-21-2014
02:19 PM

I've tidied up your routines and put in some fixes that enable it to work for t=10s. You will need to check carefully that the fixes are acceptable!

Alan

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-21-2014
03:25 PM

03-21-2014
03:25 PM

Re: Convolution Integral Instability

Alan,

The "on error" addition to the integration was definitely the key. Thanks for the fix, and thanks, too, for taking the time to clean up the routine along the way. This was a big help!

By the way, do you happen to know why the integration errors out for certain combinations of my variables? i.e, what makes this particular calculation somewhat fragile?

Thanks again,

C

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-21-2014
03:42 PM

03-21-2014
03:42 PM

Re: Convolution Integral Instability

I am coming late and my appraoch was similar to that of Alan (suppressing the time values which throws the error using onerror).

As you can see in the attached sheet with N=20, t.step=0.005 and t.end=10s there only are 91 values which throw the error, that 0.227%. That depends on the setting of TOL. Default is 10^-3. If you set it to a lower value you get errors for more time values. I guess its not advisable to set it to something higher like 10^-2 or more.

BTW, you could use the able at the end of the sheet to plot for selected time values w/o having to recalculate. If thats an option, I guess it would be better to work with the transposed table.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-21-2014
05:09 PM

03-21-2014
05:09 PM

Re: Convolution Integral Instability

Cory Lindh wrote:

By the way, do you happen to know why the integration errors out for certain combinations of my variables? i.e, what makes this particular calculation somewhat fragile?

I'm not sure, but there's a possibility that your penultimate condition in function p(t,tm,po) is sometimes skipped.

For example, it is skipped when tm = pmax/jmax, because, in this case, the "upper" test value is actually lower than the "lower" test value!

Alan

Top Tags