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
- :
- Pulse function

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

11-16-2019
04:23 PM

11-16-2019
04:23 PM

I need a "forcing function" that will be continuous (not piece wise). It needs to be a rectangular function with amplitude "A", Period "P", and duty cycle "D" (40%) that is a function of y(t) for some time period "t".

Can anyone help me out with this?

Thanks,

Mike

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

11-19-2019
04:50 AM

11-19-2019
04:50 AM

@LucMeekes wrote:

Worksheet(s) please...!

Luc

Here you are

I did no exact timing but it looks to me like calculations need much more time in Prime than in MC15

BTW, omitting the vertical line segments in a step function would be perfectly correct from a mathematical point of view but I understand that its undesirable for an engineer.

There is a simple cure, though.

My suggestion of a step width of 0,01 ms in the range was __far__ too low. It should read 0.01 s which is good enough for the plots.

The range 0s, 0.01ms .. 4.2s forces the plot to be evaluated at 4.2 * 10^5 positions. Mathcad could handle that many points (nearly half a million) but Prime seems to have different limits and it falls back to this strange looking plot where you could not change anything (line style, thickness, .. ) other than the colour.

Changing the range to read 0s,0.01 s .. 4.2 s gives us 421 points which is more than enough for this simple rectangular function. Changing the step width to 1 ms for 4201 points should be OK, too, of course.

Even simple 2D plots always were one of the many drawbacks in Prime and PTC was not able or willing to improve it. You may have noticed that there are not axis labels, no grid lines, the possibilities to customize the plot are much more limited and simple things like changing the axis limits are much more cumbersome.

In Prime 5 PTC has introduced a third party diagram component (look at the "calculate" ribbon for it). I don't like this add-on as its very slow and laborious to handle, does not scale correctly when used with a high resolution 4K display (making it nearly unusable) and does not support units (a no-go in a program like Mathcad/Prime).

Nonetheless, if you decide that you like Prime despite its drawbacks, you may give this plot component a try, too.

38 REPLIES 38

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

11-16-2019
05:13 PM

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

11-17-2019
09:26 AM

11-17-2019
09:26 AM

Re: Pulse function

Hi,

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

11-17-2019
09:35 AM

11-17-2019
09:35 AM

Re: Pulse function

Luc,

Thank you for the solution. I see it works. I need it to be in the form of y(t)=. I tired to set y(t):= Pulse(t,A,T,d)

But that did not work. How can I accomplish this?

Thanks,

Mike

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

11-17-2019
09:36 AM

11-17-2019
09:36 AM

Re: Pulse function

Thank you for this interesting idea. However, I need it to be rectangular (as proposed by Luc), not elliptical.

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

11-17-2019
10:01 AM

11-17-2019
10:01 AM

Re: Pulse function

Ok!

that's better?

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

11-17-2019
10:27 AM

11-17-2019
10:27 AM

Re: Pulse function

That is definitely better. Now my next question - how do I turn that into an equation of the form y(t)?

I have a lot of other equations on down the Mathcad program that are using y(t) in their evaluation. This program is using this pulse as a "description" of a road surface that is then being used to evaluate the suspension on a vehicle that is driving over it.

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

11-17-2019
10:49 AM

11-17-2019
10:49 AM

Re: Pulse function

it is very simple:

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

11-17-2019
03:08 PM

11-17-2019
03:08 PM

Re: Pulse function

Could you possibly send me this as a Mathcad file? I must be entering something incorrectly. It is not working for me.

Thanks very much,

Mike

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

11-17-2019
04:17 PM

11-17-2019
04:17 PM

Re: Pulse function

You need to fill in values for A, T and d.

Like

y(t):=Pulse(t,1.5,2,0.4)

if your amplitude is 1.5, your pulse duration is 2 and the duty cycle is 40 %.

There are several alternatives to the definition above. You could also define A, T and d with these or other values and - subsequently - define:

y(t):=Pulse(t,A,T,d)

You could define:

Grootte:=1.5

Pulsduur:=2

Werkingsfractie:=40*%

and then define:

y(t):=Pulse(Grootte,Pulsduur,Werkingsfractie)

I hope you get the point now. If you're still unsuccessful: post your worksheet.

Success!

Luc