Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solving second order differential equation?

Status
Not open for further replies.

richsmith

Mechanical
Feb 24, 2004
4
I would like to solve a second order differential equation that represents a spring mass damper system that has an external acceleration applied to it.

I need to know the displacement over time output curve x(t). The input acceleration curve Gz(t)is a data set from experiment.

I have attached a picture (Mathcad Function.jpg) of my Mathcad sheet with the function to solve and a plot of the input acceleration trace.

Is it possible to solve this equation for x(t)?

If so I am not that familiar with Mathcad to know exactly how to do this, any help would be appreciated.

Thanks.
 
Replies continue below

Recommended for you

Is it possible to solve this equation for x(t)?
It is not practical to get a symbolic or exact solution but you can use RK4 to find a numerical solution easily enough. Look for the Pendulum example in the Mathcad help. Help->Index->odesolve.

Peter Nachtwey
Delta Computer Systems
 
Hi Peter, I am only after a numerical solution as my input acceleration is numerical. I have followed the pendulum example in help with limited success.

If I use the solve block and instead of submitting Gz(t) as my input acceleration I just use a single value I can obtain a solution for x(t). However If I input the input acceleration as a variable Gz(t) as I need to I cannot obtain a solution.

Accorading to the pendulum help example I believe I need to enter the solve blaock in this fashion Odesolve([vector], x, b, [step]) for my solution to be calcualted by I do not know how to ue this despite my best efforts.

I am not sure what to do with the [vector] part and the help is not particulalry helpful in this regard.

Do you have any examples you may be able to guide me with?

Thanks Peter.
 
If you only need a numerical solution then this link will show you how to do it using state space methods but you can also use the Runge-Kutta method.

This example is a little more than what you asked for because I show how to control the mass on a spring. All you are interested in is page 4/24 and this x=A*x+B*u

I made this example to show other how important the second derivative gain is for damping and controlling an under damped system. I was comparing my PID solution with another persons best PI solution.

Peter Nachtwey
Delta Computer Systems
 
Hi Peter, thanks for this information. From your document I can see you have an extrememly good understanding of Mathcad, far greater than myself.
I have struggled to follow your advice relating to my problem. I believe my methodology is correct however I continually receive a Mathcad error message stating:

"the return value of this function must match the problem size"

I am not sure what this means and would be highly greatful if you could offer any further assistance. I have attached my Mathcad file to this post, I was wondering if you could take a quick look at it and give me any advice that you would kindly offer.

Thankyou again for your assistance.

Regards,
Rich.
 
 http://files.engineering.com/getfile.aspx?folder=21fdcc9f-f49a-4117-a00c-77017b88a236&file=DRIz_Calculation.xmcd
Status
Not open for further replies.

Part and Inventory Search

Sponsor