Jump to content
  • To Search the Seeq Knowledgebase:

    button_seeq-knowledgebase.png.ec0acc75c6f5b14c9e2e09a6e4fc8d12.png.4643472239090d47c54cbcd358bd485f.png

Search the Community

Showing results for tags 'correlation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Technical Forums
    • Tips & Tricks
    • General Seeq Discussions
    • Seeq Data Lab
    • Seeq Developer Club
    • Seeq Admin Forum
    • Feature Requests

Categories

  • Seeq FAQs
  • Online Manual
    • General Information

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Company


Title


Level of Seeq User

Found 2 results

  1. The correlationOffset() Formula function can be a useful tool for identifying the time shift which maximizes the correlation between two signals: see this post for additional background. In some situations, a user will have a condition defined for time periods of interest (startups, process runs, specific product grades, specific modes of operation, etc.). The user then wants to analyze how the correlation offset varies for each time period of interest (each capsule in the condition). The key to this calculation is applying the transform() function to the condition in Seeq Formula, in combination with the correlationOffset() function. Let's say we have a temperature sensor in a reactor. At some point, well downstream of this temperature measurement, we have a relative humidity sensor that is sensing the same volume of air, but due to the locations of the two sensors, we know that the inverse correlation between the two signals is offset by a significant amount of time delay (at least 2 hours, as visually estimated with the dashed regions in the trend below). As a reminder, for this use case, the objective is to calculate the correlation offset separately for the data contained within each capsule in a condition of interest (shown as Time Periods to Calculate Correlation in the trend below): The formula approach for this is shown below, with comments to describe the details. The transform() function enables the correlationOffset() function to be applied separately to each capsule in the Time Periods to Calculate Correlation condition, and the correlation offset time is stored as a capsule property of the condition generated by the formula: The resulting calculated offset (in units of seconds) is shown in the capsules pane at the lower right and also at the top of the screen as labels. Optionally, the "Offset" capsule property can be converted to a signal (see Max Correlation Offset in lane 2) for trending purposes, and here the units were converted to hours. Looking at the final results, the time shift which maximizes the correlation between the 2 signals varies between 2.1 and 2.5 hours over the 3 time periods of interest shown in chain view, and this variation may offer valuable insights to the user. The time shift is a negative value which means that the relative humidity (downstream signal) would need to be shifted to the left by that time amount to maximize its correlation with the temperature signal. This is the formula to create a signal for the max correlation offset, based on the "Offset" capsule property. In this example the time shift is more meaningful in units of hours, so we convert from seconds to hours: Note that in this use case we wanted to calculate the correlation offset separately for each capsule in a condition. If the goal is to calculate the correlation offset over rolling window time periods, there are other functions in Formula expressly for this purpose, such as CrossCorrelations_timeShifts().
  2. Use Case Background In certain use cases, it can be advantageous to move data forward or back in time. You may move signals as part of a data cleansing step in a cause and effect analysis, prior to performing a regression, or simply as a more intuitive visualization. Here are some specific examples where this might be useful: Comparing a process variable to a process setpoint when the process variable lags the setpoint. Aligning inputs and outputs in unit operations where there is a known lag or residence time: In a plug flow reactor analysis, you may want to line up the outlet flow rate with the inlet flow rates after a known residence time. In a conveyor belt analysis, you may want to compare a widget created with an input variable upstream. Aligning lab data with process data. Moving a signal in time is easily accomplished in Seeq using the Formula tool and the function .move() Moving a signal forward in time 1. Search and select the relevant signal in the data tab and click to add it to the trend. 2. In the Tools tab, select the Formula tool. 3. Give the formula an appropriate name and enter the following formula. Make sure to match the variable name in the formula tool. Here, $cp represents the Compressor Power signal I want to move. $cp.move(3h) 4. Execute the formula. You will now have a new signal where the data is shifted forward in time. Moving a signal back (earlier) in time Follow steps 1-4 above, but in step 3, use a negative sign to indicate moving the signal earlier. $cp.move(-3h) Moving a signal by the value of another signal Example use case: Oftentimes, lab data is associated with the time the lab technician completed the test and recorded the results instead of the time when the sample was obtained from the process, which could be hours or days earlier. In order to do a root cause analysis, it would be useful if the quality results lined up with when the sample was obtained. The data could be moved using a static value, like the examples above, but if there is relevant data that can be used to dynamically shift the time period based on when the sample was actually taken, that may be more accurate and useful. In this case, $labData is the lab result with the original timestamp, and $lagTime is the difference in time from when the sample is taken and when the sample result is recorded. By inputting this into the .move() function we can dynamically move the quality data to line up with the actual process conditions using the formula below. To do this, follow steps 1-4 above, but in step 3, use another signal as your first formula parameter and the second parameter representing the maximum you want to move any given sample. $labData.move($lagTime, 5min) In the above example, $labData will be moved by the value indicated in $lagTime, up to 5 minutes, the maximum any sample will be moved. Content Verified DEC2023
×
×
  • Create New...