• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How do I compare data points with different time axes

Mr StressTest

New Member
Hi Chandooers,

My worksheet does this; I have a workbook which simulates the temperatures and displacements across hundreds of test points within a 2D model of an aircraft engine, at discrete time increments from the start of a flight cycle to the end. It's used for analysis and engineering design.

This involves multiple worksheets each with several large tables (e.g. about 301x250 or so, as different subassemblies seem to have different tables). In the first column of each table is time so rows correspond to each point in time, and in subsequent columns is an x or y or temp value for one of these test points.

Say I want to see the relative movements between two chosen points (A_x, Ay) and (B_x, B_y), at numerous discrete points in a flight cycle from say 0 to 12,000 seconds, I'd do this by calculating a column of (B_x - A_x) and (B_y - A_y).

The problem is this; We want to compare pairs of points which are close together in real life (from this, you could see the maximum changes in clearance, or temperature differentials at each stage in the flight). However we can't directly compare between tables in Excel as the pairs which fall in different tables will have a different number of rows. The analysis software spat time series data which seems to have different numbers of divisions, not necessarily a consistent time-step (because flights are broken into stages with different required resolution). Some tables have about 150 rows, some have about 350 for example.

Is there a way of tying up different tables (e.g. normalising Table A to have the same number of rows as Table B by automatically interpolating between the closest rows) so that comparisons can be made?

We can say that all displacements and temperatures are continuous functions with time, and we can say that all data sets start from 0 seconds and end at 12000 seconds, so theoretically I think I could do this with curve-fitting with a graph, getting coefficients from the polynomial equation and producing new points at the required time intervals (say just every 5 seconds/or map it onto Table 2 time points). But there must be a better way. Is there a formula method (preferred) or VBA to do this?

Tl;Dr How to normalise one column or table of data with varying time intervals to compare points with another column or table of data with different size and different time intervals.

e.g.
Sheet 1
Table 1

0 DATAT1P1x DATAT1P1y … DATAT1P150x DATAT1P150y
5 DATAT1P1x DATAT1P1y …

12000

Table 2
0 DATAT2P151x DATAT2P0151y… …DATAT2P200x DATAT2P200y
3.21
7

12000

Table 3
0 DATAT3P201x DATAT3P201y… DATAT3P400x DATAT3P400y
3
6
8.5

12000

Sheet 2 and Sheet 3 are similar.
This involves multiple worksheets each with several large tables (e.g. about 301x250 or so). In the first column of each table is time so rows correspond to each point in time, and in subsequent columns is an x or y or temp value for one of these test points.
 
Hi ,

Given that there is a wide variation amongst the tables , it is going to be a stress test trying to match all of them.

The easiest way would be for Excel to generate the function of each graph with the existing data points in every table , and then create a new table which has all of the time points , and then use the generated functions to create data values for all of the time points.

Taking your 3 tables as an example :

1. Create 3 graphs using the data points in the 3 tables.

2. Generate the functions for the 3 graphs.

3. Create a separate table , which has all of the following points in the time axis :

0 , 3 , 3.21 , 5 , 6 , 7 , 8.5 ,....

4. In a column for each graph , use the functions obtained in step 2 to generate the data values for each of these time points.

5. Generate new graphs using these time points and the generated data.

6. Compare the graphs obtained in step 1 with those obtained in step 5 to see whether the shape has changed due to interpolation.

7. Change the method of interpolation to obtain new functions and repeat steps 3 through 6 , till a reasonable match is obtained between the original graphs and the interpolated graphs.

It may be possible to automate the steps 1 through 5 using VBA , though that can only be done if the workbook with enough data is made available.

Narayan
 
I'd tackle this slightly different to Narayan

I'd use some formulas to interpolate the Y values for your data against the various data sets
Then plot the data sets and data points onto the same chart/s

Scatter Chart Plotting doesn't care about X values being different for different data sets

Doing a linear interpolate between adjacent points is easy and quick
 
Back
Top