Jump to content
• To Search the Seeq Knowledgebase:

# Search the Community

Showing results for tags 'delay'.

• ### Search By Tags

Type tags separated by commas.

### Forums

• Community Technical Forums
• General Seeq Discussions
• Seeq Admin Forum
• Training Resources
• Product Suggestions
• Seeq Data Lab
• Community News
• Seeq Blog Posts
• News Articles
• Press Releases
• Upcoming Events
• Resources

### Calendars

• Community Calendar

### Categories

• Seeq FAQs
• Online Manual
• General Information

• Published
• Code
• Media

• 0 Comments

• 0 Replies

• 0 Reviews

• 0 Views

Found 5 results

1. ## Delaying or Shifting the Time of a Signal

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!
2. ## Viewing Multiple Signal Profiles on a Non-Time Axis

To better understand their process, users often want to compare time-series signals in a dimension other than time. For example, seeing how the temperature within a reactor changes as a function of distance. Seeq is built to compare data against time but this method highlights how we can use time to mimic an alternate dimension. Step 1: Sample Alignment In order to accurately mimic the alternate dimension, the samples to be included in each profile must occur at the same time. This can be achieved through a couple methods in Seeq if the samples don't already align. Option 1: Re-sampling Re-sampling selects points along a signal at select intervals. You can also re-sample based on another signal's keys. Since its possible for there not to be a sample at that select interval, the interpolated value is chosen. An example Formula demonstrating how to use the function is shown below. //Function to resample a signal \$signal.resample(5sec) Option 2: Average Aggregation Aggregating allows users to determine the average of a signal over a given period of time and then place this average at a specific point within that period. Signal From condition can be used to find the average over a period and place this average at a specific timestamp within the period. In the example below, the sample is placed at the start but alignment will occur if the samples are placed at the middle or end as well. Step 2: Delay Samples In Formula, apply a delay to the samples of the signal that represents their value in the alternative dimension. For example, if a signal occurs at 6 feet from the start of a reactor, delay it by 6. If there is not a signal with a 0 value in the alternate dimension, the final graph will be offset by the smallest value in the alternate dimension. To fix this, in Formula create a placeholder signal such as 0 and ensure its samples align with the other samples using the code listed below. This placeholder would serve as a signal delayed by 0, meaning it would have a value of 0 in the alternate dimension. //Substitute Period_of_Time_for_Alignment with the period used above for aligning your samples 0.toSignal(Period_of_Time_for_Alignment) Note: Choosing the unit of the delay depends upon the new sampling frequency of your aligned signals as well as the largest value you will have in the alternative dimension. For example, if your samples occur every 5 minutes, you should choose a unit where your maximum delay is not greater than 5 minutes. Please refer to the table below for selecting units Largest Value in Alternate Dimension Highest Possible Delay Unit 23 Hour, Hour (24 Hour Clock) 59 Minute 99 Centisecond 999 Millisecond Step 3: Develop Sample Profiles Use the Formula listed below to create a new signal that joins the samples from your separate signals into a new signal. Replace "Max_Interpolation" with a number large enough to connect the samples within a profile, but small enough to not connect the separate profiles. For example, if the signals were re-sampled every 5 minutes but the largest delay applied was 60 seconds, any value below 4 minutes would work for the Max_Interpolation. This is meant to ensure the last sample within a profile does not interpolate to the first sample of the next profile. //Make signals into discrete to only get raw samples, and then use combineWith and toLinear to combine the signals while maintaining their uniqueness combineWith(\$signal1.toDiscrete() , \$signal2.toDiscrete() , \$signal3.toDiscrete()).toLinear(Max_Interpolation) Step 4: Condition Highlighting Profiles Create a condition in Formula for each instance of this new signal using the formula below. The isValid() function was introduced in Seeq version 44. For versions 41 to 43, you can use .valueSearch(isValid()). Versions prior to 41 can use .validityCapsules() //Develop capsule highlighting the profile to leverage other views based on capsules to compare profiles \$sample_profiles.isValid() Step 5: Comparing Profiles Now with a condition highlighting each profile, Seeq views built around conditions can be used. Chain View can be used to compare the profiles side by side while Capsule View can overlay these profiles. Since we delayed our samples before, we are able to look at their relative times and use that to represent the alternate dimension. Further Applications With these profiles now available in Seeq, all of the tools available in Seeq can be used to gain more insight from these examples. Below are a few examples. Comparing profiles against a golden profile Determine at what value in the alternate dimension does each profile reach a threshold Developing a soft sensor based on another sensor and a calibration curve profile
3. ## Time Warping to Align Sample Points

This method demonstrates how to apply time warping to a signal which can shorten the time between sample points while retaining the signal’s characteristic shape. This is useful for batch processes where batches may have different durations or for aligning data from multi-step processes with different durations. Note that this method is distinct from the more complex Dynamic Time Warping. The following example is based upon the Area A Compressor Power signal available in the Example Data. A single condition was created to capture each compressor run, as shown in the following image. Step 1: Specify a Time Normalization Factor The user uses the Formula tool to specifiy a time duration (scalar value), set to 4 hours for this example. The compressor power signal for each compressor run will be normalized to this time duration. There is no single correct value; the value needs to be shorter than the minimum time duration for all signals to be normalized. // User specified time duration (scalar value). 4 hours Step 2: Create the Normalized Condition Use Formula to create the normalized Compressor Run condition based on the user-specified time normalization factor. This condition will be used later when the calculated signal delay is used for normalization. \$CompressorRuns.afterStart(\$nF) Step 3: Calculate the Run Duration Use the Signal from Condition tool to calculate the duration for each compressor run. This value will be used later for determining the calculated signal delay applied to each compressor run. Step 4: Calculate the Elapsed Time During Each Run Use the Formula tool to calculate the elapsed time during each compressor run. This value will be used later for determining the calculated signal delay applied to each compressor run. timeSince(\$CompressorRuns, 0.25min).convertUnits('h') Step 5: Calculate the Signal Delay Factor Needed for Time Warping Each sample (timestamp) for compressor power will be shifted to the left by a calculated amount to time warp the power signal from its original time period (Compressor Runs) to the normalized time period (Compressor Runs Normalized). The first sample point in each run will have no delay, and the last sample point will have the greatest delay. For example, if the original time period is 10 hours and we are normalizing to a time period of 4 hours, then the last sample point in the run will be shifted to the left by 6 hours (Delay Factor = -6 hrs). // This Formula first creates a signal with a value of 0 (default delay), then splice in the calculated delay during each compressor run. 0.toSignal(0.25min).convertUnits('hr').splice(\$ElapsedTime*(\$nF/\$RunDuration-1),\$CompressorRuns) At this point we zoom in to a single compressor run and use the Capsule Time view to better visualize the results of our intermediate calculations. For this compressor run lasting 10.9 hours, the Compressor Run Elapsed Time finishes at the correct value (10.9 hours) and the Delay Factor correctly decreases from 0 hours (beginning of run) to -6.9 hours (end of run). Step 6: Apply the Signal Delay to Time Warp the Signal Now that the appropriate delay factor is calculated for each sample point during the compressor runs, we apply it to the Area A Compressor Power signal using the delay() function in Formula. This generates the time warped signal called Compressor Power Normalized. \$CompressorPower.delay(\$delayFactor,24h).within(\$CompressorRunsN) When applying the signal delay, we are required to specify a maximum delay. This is important for the Seeq calculations going on in the background, so that the queries know how far back and forward to go when requesting input data. The maximum delay also provides a convenient way for the user to limit the applied delay, if they have some reason to do so. In our case, we just want the chosen value to be longer than the longest expected compressor run duration. Results Now that the compressor power signal has been normalized, Capsule Time view gives a nice comparison of the power signal behavior across the 3 runs contained in the Display Range:
4. ## Low accuracy of Regression Model

Hi All, I'm working on some data , wherein i have 6 Independent variable and 1 dependent variable. while running the Regression model on this data, i get very less Accuracy of model as mentioned in below screenshot. Note :- As far as data Pre-processing is concern , i have scale the features and also imputes the missing values on the basis of mean imputation. Do let me know if there's any pre-processing feature is there in seek to deal with data. Regards, JItesh Vachheta
5. ## Rolling Limits

This use case came up while working with a customer last week, and I thought it was worth sharing on the forum, since other users may be interested. The user I was working with was interested in creating limits for a signal. The limits would be calculated based upon the average and standard deviation of the previous 4 hours of operation; essentially the user wanted to create a rolling 4 hour boundary. We worked out the following solution: 1. Create a periodic condition for the time period that you would like to use for this rolling window. Here I created 4 hour periods: 2. Next, use signal from condition to calculate the average of the signal during each of these 4 hours periods: 3. Use signal from condition again to calculate the standard deviation of the signal during each of these 4 periods. 4. Now use Formula to calculate the upper and lower boundaries based on the average and standard deviation. Here I’m creating boundaries that are +/- 2 standard deviations. Note that the ‘.delay(4h)’ is needed to shift the boundary signals so that the PV signal is being compared to the upper and lower boundaries calculated in the previous 4 hours. 5. Once the upper and lower boundaries are identified, use Deviation Search to determine when the signal is outside of these boundaries.
×

• #### Seeq Links

×
• Create New...