Get Help

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
- :
- Converting MATLAB to Mathcad Prime 2.0 - EV Accele...

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

04-25-2013
03:52 PM

04-25-2013
03:52 PM

Converting MATLAB to Mathcad Prime 2.0 - EV Acceleration

First off, I am new to Mathcad and have Prime 2.0 installed. It has been many decades since I studied calculus in school or applied it in engineering, so much of that knowledge has flown the coop.

I have recently come across a book that describes the theory, formulas, and programs for deriving various performance characteristics of an electric vehicle (EV), but unfortunately the author uses MATLAB to execute the simulations. I would like to model the performance of an EV using Mathcad, and so I have picked one such simulation: EV Acceleration. The attached pdf (pp. 187-196) provides a description of the simulation and shows the example calculations, program, and plots in MATLAB.

The attached Mathcad file is my attempt to translate the MATLAB model into Mathcad using the methodology used by the author (finite difference). My Mathcad model appears to replicate the MATLAB simulation, as the plots look similar.

However, I suspect there has got to be a better way (using calculus, derivitives, ODE, solvers, etc.). I have searched and read many posts here, but have not found a solution. I suspect there is an easier way to simulate this model and create the associated velocity and distance versus time plots.

I'm not looking for someone to do the work, but rather point me in the right direction, unless something like this has already been done. Examples would be much appreciated.

Thanks in advance for your assistance.

Labels:

1 REPLY 1

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

04-25-2013
04:34 PM

04-25-2013
04:34 PM

Re: Converting MATLAB to Mathcad Prime 2.0 - EV Acceleration

The attached shows a quick and dirty method using odesolve. You should really replace the literal numbers by variable names for flexibility. But it should point you in the right direction.

Alan

Top Tags