Analyzing Time-Series Data for Distance, Speed, and Acceleration

any data acquisition systems collect time-series data, which is data recorded as it changes over time. Time is a fundamental quantity in logging data. Graphing multi-meters, digital storage oscilloscopes, sensors, and controllers embedded in vehicles all are examples of systems that log data as a function of time. For example, vehicle speed is time-dependent: the speed of a vehicle is the change in distance divided by the change in time. In this lesson, we will discover how to analyze time-series data by plotting logged variables versus time and computing statistics such as the average, minimum value, and maximum value over a given time period.

Distance, Speed, and Acceleration

In science and engineering, as well as in everyday life, we must use the basic physical quantities related to motion: distance, speed, and acceleration. For example, to compute the time it will take to drive from home to work, we need the distance for that trip and the average speed over the trip. If the distance is 10 miles, and we can drive at an average speed of 40 miles per hour, then the trip will take 15 minutes (10 miles X 1 hour/40 miles = ¼ hour or 15 minutes).

Engineers often collect data on vehicles such as engine speed in revolutions per minute (rpm), vehicle speed, and engine temperature as a function of time. This real-time data is logged over a given driving cycle and used for analyses to understand the vehicle operation. Such data can be used to compare the vehicle operation to standards as well as to test the effect of changing certain parameters related to the vehicle operation to improve the vehicle’s performance. For example, test vehicles are driven over a driving cycle in the Federal Test Procedure to measure the exhaust emissions in order to verify that the vehicle is in compliance with EPA standards. The driving cycle used for this test is called the Urban Dynamometer Driving Schedule (UDDS). For such a test, the vehicle speed must match a standard speed over the time of the test. Figure 1 shows a plot of the speed versus time for a portion of the UDDS (see the data set).

Figure 1. Speed in miles per hour versus time for the first 505 seconds of the UDDS.The driving cycle shown in Figure 1 was designed to simulate a typical trip from home to work. The test begins with a cold start in which the vehicle sits overnight, followed by some low-speed driving in a neighborhood, then some freeway driving, and then some lower-speed driving near the final destination. There are some periods where the vehicle is idling.

Let’s analyze the data, namely, the time-speed data for the time period from 20 to 30 seconds, shown in Table 1 below. During this interval, there was an interesting change in speed. Notice that the speed started at 0 miles per hour: the vehicle was stopped. Then the vehicle accelerated from the stop to a speed of 21.7 miles per hour at the end of the period.

Table 1. Time-speed data for a 10-second period of the UDDS
Time, seconds Speed, miles/hour
20 0
21 3
22 5.9
23 8.6
24 11.5
25 14.3
26 16.9
27 17.3
28 18.1
29 20.7
30 21.7

Table 2 below shows the same data, but with some additional columns and some computations based on those added columns. First, the time data in seconds was copied next to the original time data, but with the first time observation removed. Thus, the time in the second column is a lag of the original time data that we will call lag (time). For the UDDS data that is specified with a one-second time interval between successive observations, the lag (time) is always one second. Such a systematic time difference is not needed in the analysis; successive observations can differ by any arbitrary time, and the analysis will still be the same. The third column in Table 2 shows the difference between the second and the first columns. This is called Δ time, abbreviated Δt, where the delta (Δ) symbol means “the change in.”

Δt = lag (time) – time

The fifth column shows the speed data with a one-observation lag. The difference in the speed and the lagged speed, Δ speed, is shown in the sixth column.

Δ speed = lag (speed) – speed

The final column on the right-hand side of Table 2 shows Δspeed/Δt. The change in speed divided by the change in time is the acceleration of the vehicle. Acceleration is a very important variable in physics, and is used in computing the force needed to accelerate the mass of the vehicle. The vehicle fuel economy and tailpipe emissions of the vehicle depend strongly on the acceleration.

Table 2. Time-speed data from Table 1 arranged to analyze the difference in successive observations
Time Lag time Δ time Speed Lag speed Δ speed Δ speed/Δt
seconds seconds seconds miles/hour miles/hour miles/hour miles/hour/second
20 21 1 0 3 3 3
21 22 1 3 5.9 2.9 2.9
22 23 1 5.9 8.6 2.7 2.7
23 24 1 8.6 11.5 2.9 2.9
24 25 1 11.5 14.3 2.8 2.8
25 26 1 14.3 16.9 2.6 2.6
26 27 1 16.9 17.3 0.4 0.4
27 28 1 17.3 18.1 0.8 0.8
28 29 1 18.1 20.7 2.6 2.6
29 30 1 20.7 21.7 1 1
30 21.7

Table 3 below shows another analysis of the data in Table 1. In Table 3, time and speed are used to compute the distance that the vehicle traveled during each second of the 10-second time interval as well as the total running distance over the interval. The data in the third column is computed by changing the units from miles/hour to feet/second. This is straightforward mathematics using the number of feet in a mile and the number of seconds in an hour:

1 mile/hour x 5280 feet/mile x 3600 seconds/hour = 1.467 feet/second

Thus column 3 is column 2 times 1.467.

The definition of speed is

Speed = the change in distance ÷ the change in time = Δd ÷Δt

So by rearranging:

Δd = speed X Δt

The change in time between successive observations in Table 3 is one second so the distance is equal to the speed in feet/second times 1 second. This speed is shown in the fourth column of Table 3. Finally, the total distance over the interval is the sum of the distances for each one-second interval. The total distance up to each time point is shown in column 5 of Table 3.

In the mathematical analysis of this time series data, we have computed differences in variables over time to derive the basic physical variables: distance, speed, and acceleration. To complete the analysis, an engineer might plot each of these variables versus time, as well as computing other variables such as force (force = mass X acceleration) or energy (energy = force X distance moved). Finally, the average values of the variables over the whole test shown in Figure 1 could be computed as well as the minimum and maximum values. For example, the average speed for the data in Figure 1 is the sum of the individual speeds divided by the number of observations. This value is 25.5 miles per hour. The maximum speed during the test is 56.7 miles per hour, and it occurs at a time of 240 seconds into the test (see Figure 1).

Table 3. Time-speed data from Table 1 arranged to analyze the distance traveled in each time interval
Time Speed Speed Distance Total distance
seconds miles/hour feet/second feet feet
20 0 0.00 0.00 0.00
21 3 4.40 4.40 4.40
22 5.9 8.65 8.65 13.05
23 8.6 12.61 12.61 25.67
24 11.5 16.87 16.87 42.53
25 14.3 20.97 20.97 63.51
26 16.9 24.79 24.79 88.29
27 17.3 25.37 25.37 113.67
28 18.1 26.55 26.55 140.21
29 20.7 30.36 30.36 170.57
30 21.7 31.83 31.83 202.40

Another example of variables that are related through time involves the relationship between power, energy, and time. The amount of energy used in a given time interval is the power. Power is often measured in kilowatts (kW), time in hours (h), and energy in kilowatt hours (kWh). If a light bulb consumes a constant power of 100W for 10 hours, it uses 1000 watt hours or 1 kWh of electrical energy. Thus, if we measure time, voltage, and current, we can compute power (voltage X current). If we have such data as a function of time, the same analysis outlined above can be used to compute the energy used over each time interval (power X Δt) and the total energy consumed from the beginning of the time period until the end.

SEE ALL Add a note
Add your Comment

Course Enquiry Form

Sign Up

Course Reviews

Why Choose DIY Course?

   Course work & interactions are 100% online.

   Study at the time and place that suits you.

   24/7 access to course material.

   Learn from world-class experts in their field.

Guidebook-for-Mechanical Engineers | DIYguru

Check your Certificate Code

Copyright © DIYguru Education & Research Pvt. Ltd.