How to find a function from real data?

  • Context: Undergrad 
  • Thread starter Thread starter DrummingAtom
  • Start date Start date
  • Tags Tags
    Data Function
Click For Summary
SUMMARY

This discussion focuses on deriving a function from real data, specifically the velocity of a car over time. The user contemplates using piecewise quadratic functions to model their velocity, considering the effects of changing gears and acceleration. Techniques such as taking derivatives to analyze acceleration and exploring the potential for linear or cubic functions are suggested. The conversation highlights the complexity of modeling real-world data and the likelihood of needing piecewise functions due to the nature of the data.

PREREQUISITES
  • Understanding of piecewise functions
  • Familiarity with derivatives and their applications
  • Knowledge of quadratic and cubic functions
  • Basic concepts of velocity and acceleration in physics
NEXT STEPS
  • Explore methods for fitting piecewise functions to data
  • Learn about numerical differentiation techniques for analyzing data
  • Investigate curve fitting techniques using Gaussian functions
  • Study the applications of Taylor series in modeling real-world data
USEFUL FOR

Students and professionals in physics, engineering, and data analysis who are interested in modeling real-world phenomena using mathematical functions.

DrummingAtom
Messages
657
Reaction score
2
I was driving the other day and thought how I could find the function of my velocity. This would be a rough sketch of data from the velocity of the car. What method could I use to create a function from that graph?

I could assume that the concave parts are x2 then separate them from the flatter parts. That would give me a piecewise function but is there a way to combine all the functions into one?

I drew the red line (y = x) in because that seems like a close approximation. I have learned power and Taylor series but anytime I used those I already knew the function and then came up with the series by taking derivatives. I guess this is more of the numbers only flavor. Any help would be appreciated, thanks.
 

Attachments

  • CarVelocity.jpg
    CarVelocity.jpg
    5.9 KB · Views: 463
Physics news on Phys.org
This sort of analysis is carried out all the time in many subjects (physics, economics, cognitive science, etc.), hence there are multiple techniques. Generally in physics, one at least has an idea of the form of the function and therefore just plays with the parameters until a good fit to the data is found. For example, if I measured the height of everyone in a large classes, I would expect the distribution of their height to follow a Gaussian function, so my two parameters are the mean and standard deviation. Then I could change those until I found a good fit to my data. (Of course, there are better ways to find the parameters than manually changing them.)

I think you are on the right course by trying to model this as piecewise quadratic functions. From your data, it looks like you are changing to progressively higher gears. Each time you do, your acceleration drops to zero (giving a relatively constant velocity for awhile) then begins to increase as the engine gets up to speed.

One useful thing you could do to get a better idea of what is going on is to take the derivative of your data to get the acceleration. Maybe you'll find the acceleration in each gear is a linear function, in which case the use of quadratics for velocity is justified (the integral of a linear acceleration will give you a quadratic velocity). Or maybe you'll find you have to take the derivative of your data again before getting a linear function, in which case your velocity would be best modeled as piecewise cubic functions. Yet perhaps you'll never get a linear function no matter how many derivatives you take, in which case it's more complicated. I don't know how the power output of an engine changes as it gets up to speed.

I doubt you'll be able to get a non-piecewise function that describes this, but you can certainly try. It looks like a linear function multiplied by some kind of periodic function.
 

Similar threads

  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
Replies
3
Views
2K
  • · Replies 60 ·
3
Replies
60
Views
5K
  • · Replies 3 ·
Replies
3
Views
4K