Search the Community
Showing results for tags 'correlation'.
Use Case Background In certain cases, it can be advantageous to delay or shift your time series data by some amount of time. Perhaps a process variable signal lags a set point by a known amount of time, or you are working on a clever analysis where you are shifting signals in a plug flow reactor or conveyor belt style production by known periods of time so that all of the signals line up for each widget or volume of flow to enable simplified cause and effect style analysis. Delaying or shifting the time stamp of a signal is easily accomplished in Seeq using the Formula tool: Using Delay() If I simply want to delay a given signal, say signal $measuredData, by 5 seconds i can use the delay() function in formula as follows 1. Search and select the relevant signal in the Seeq Data tab so that the trend is showing in the display pane and the signal name is showing in the Details pane. 2. Click the Tools tab and select the Formula tool. 3. Give the formula an appropriate name and enter the following formula: $measuredData.delay(5s) A new signal (with the name given in step 3) should appear where all of the time stamps are delayed by the given amount of time, in this case 5s. Now you can continue with your analysis! To shift a signal ahead in time instead of delaying it, we use the same delay() signal but would give a negative time value to shift the signal forward by 5 seconds: $measuredData.delay(-5s) Using delay() Signal The delay() function can also accept signals as the time delay input and requires some maximum delay value. We would typically only want to delay one signal, say $measuredData, by another signal, say $delaySignal, where $delaySignal is relatively consistent in its value. We typically wouldn't want the $delaySignal to jump between seconds and days. A great example of where this might be helpful would be delaying signal $measuredData by signal $delaySignal where $delaySignal is the speed of a conveyor belt and $measuredData is one of a series of measurements made on the widgets being produced on the conveyor belt. In this way we can dynamically shift all of our measurement signals by conveyor belt speed so that each widget produced has one "time stamp" associated with it for all of its measurement signals to ease further analysis. 1. Identify the signal to delay, in my case i will use $measuredData, and a delay signal, I will use $delaySignal 2. In the tools tab, open the Formula tool 3. Give the formula an appropriate name and enter the following formula: $measuredData.delay($delaySignal, 5h) Here, my $measuredData will be delayed by a $delaySignal amount of time up to the maximum of a 5 hour delay. Any timestamp with a $delaySignal value of greater than 5 hours will result in my $measuredData only being delayed by 5 hours. Using correlationOffset() One final way we can delay or shift a signal is by using the correlationOffset() function. This function is a bit more advanced and will be covered in a follow up post. We can use this function to compute the required delay between two signals such that the two signals have a maximum correlation. This is a very useful tool for finding a delay between two signals when the amount of the delay is uncertain but the signals are known to be correlated. More information about this can be found in the Seeq Formula documentation within Seeq. Play around with it and see what you can find!