Jump to content

Sean T

Seeq Team
  • Posts

    24
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Sean T

  1. When creating signal forecasts, especially for cyclic signals that degrade, we often use forecastLinear() in formula to easily forecast a signal out into the future to determine when a threshold is met. The methodology is often the same regardless of if we are looking at a filter, a heat exchanger, or any other equipment that fouls overtime or any equipment that needs to go through some periodic maintenance when a KPI threshold is met. A question that comes up occasionally from users is how to create a signal forecast that only uses data from the current operation cycle for signal forecasting. The forecastlinear() operator only takes into account a historical training period and does not determine if that data is coming from the current cycle or not (which results in unexpected results). Before entering the formula, you will need to define: a condition that identifies the current cycle, here i have called it "$runningCycle" a Signal to do a linear forecast on, i have called it "$signal" To forecast out into the future based on only the most recent cycle, the following code snippet can be used in formula: $training = $runningCycle.setmaximumduration(10d).toGroup(capsule(now()-2h, now())) $forecast=$Signal.predict($training, timesince(toTime('2000-01-01T00:00Z'))) $signal.forecastSplice($forecast, 1d) In this code snippet, there are a few parameters that you might want to change: .setMaximumDuration(10d): results in a longest cycle duration of 10 days, this should be changed to be longer than the longest cycle you would expect to see capsule(now-2h, now()): this creates a period during which seeq will look for the most recent cycle. In this case it is any time in the last 2 hours. If you have very frequent data (data comes in every few seconds to minutes) then 2 hours or less will work. If you have infrequent data (data that comes in once a day or less) then extend this so that it covers the last 3-4 data points. $signal.forecastSplice($forecast, 1d): When using forecastLinear(), there is an option to force the prediction through the last sample point. This date parameter (1 day in this case) does something similar- it blends the last historical data point with the forecast over the given time range. In other words, if the last data point was a value of 5, but my first forecasted datapoint had a value of 10, this parameter is the time frame over which to smooth from the historical data point to the forecast. Here is a screenshot of my formula : and the formula in action:
  2. Hi John, If i am understanding correctly- you have data with one signal having multiple values at the same timestamp. Seeq does not support multiple values existing at the same time stamp for signal based data- it will only take one of the values and display that. To get this kind of data to be workable we have 3 options: You can adjust the timestamps of the other datapoints by some small amount so you can see all samples in the same signal, just slightly offset in time You can bring each measured value in as its own signal i.e. product qulaity x measurement 1, quality x measurement 2, etc You can bring this data in as an event (condition) with properties- You can have one capsule per product sample and that capsule can have properties that contain each measurement value as well as any other information about the measurement you might be interested in. Reach out to seeq support support@seeq.com if you want help exploring some of these options further -Sean
  3. A question that comes up from time to time is how to search for a list of signals or other data items in Seeq. Typically we get a request for an ability to search based on a comma separated list. While we do not currently (as of R55) support a comma separated list, you can get around this using Regex searching simply by replacing the comma with a vertical bar "|" and encapsulate the search in forward slashes as below: Compressor Power,Temperature,Relative Humidity becomes /Compressor Power|Temperature|Relative Humidity/ In this search, the forward slashes tell Seeq that this is a Regex search, and the | is an "or" in regex. I.e. it will search for something exactly containing "Compressor Power" or something exactly containing "Temperature" etc. which in effect gives you the ability to search for a list! For very long lists, do a find and replace in a word editor to build the new search. The ability to search for a list will soon become quite handy with the "add all" feature slated to come with R56 which should be coming soon!
  4. Hi Andrew and Feng, We currently do not support importing CSV files with separate date and time columns as Andrew mentioned. There are quite a few date formats and we do not yet have support for all of them including separated date and time columd, for now please use the DateTime format that Andrew mentioned above. We do have a feature request in for supporting separate columns, if you would like, i can attach you to that item so you will be notified as it is worked on. -Sean
  5. Hi Sivaji, You are correct that data pulled/pushed in SPy will be done by default in GMT (actually, UTC). Glad you were able to find a way to specify your timezones for your case where the time zone wasnt mentioned!
  6. Starting in R22.0.49, the Delay operator functionality has been rolled into the .move() function, which has long acted like the delay operator, but for capsules. Hopefully this will simplify the number of fomula operators that we need to know to work with our data in Seeq! If you search for delay in the formula documentation, it will bring up the move formula with updated documentation to represent the change.
  7. When generating a simple value search, using operators like .isLessThan() or using the mathematical operators in formula like <,> would generally be more efficient than specifying a Value Search. The .valueSearch() operator provides aditional benefit over other operators when some condition filtering is also required as we can also specify an entry/exit grace period, and max duration, among other possible operators that can be supplied directly into the valueSearch() operator without having to use other fucntions to accomplish condition filtering. An example where .ValueSearch() would be much simpler than using .isbetween() and other condition filtering operators would be: Create capsules where $signal becomes greater than 5 kW for at least 4 seconds and ending when $signal becomes greater than 15.0 kW for at least 3 seconds. Capsules longer than 1 day are discarded. $signal.valueSearch(1d, isGreaterThan(5.0 kW), 4s, true, isGreaterThan(15.0 kW), 3s, true)
  8. Thanks for the feedback Woody, I will incorporate your request into our feature logging system.
  9. Often when using capsule properties that have operational data, like alarm data, batch data, operator input comments, etc. Capsule properties are read in with multiple lines. In Seeq, we can easily leverage the capsule property and the keep function that Lindsey explained above to filter for specific key words and extract more exact information out of the properties! To do this, i will need to use Regex searching to find my keywords. (To learn more about regular expressions or validate that your search is will work as expected, check out https://regex101.com/ ). toSignal() Property We start with some capsule properties, in this case i have made a string signal out of my capsule properties using the $condition.toSignal('Value') function in formula, where 'Value' is the name of the capsule property of interest. I have an example of my condition with properties and my signal shown below so we can see the text I will be searching on. When we view multi-line propeties in trend view in Seeq, it is not immediately apparent that they have multiple lines, This is done to allow them to better fit in the Capsules pane. To verify my multi-line comment, i have made a Scorecard out of the signal where we can see the multiple lines: Regex Searching on Capsule Properties When filtering capsule properties, like my commented property shown above in Seeq, we can utilize regex searching to be more exact in our search methodology. To do this, we use a regular expressing in place of our usual search strings: $condition.keep('Value', isMatch('/.*Com.*/') Which will keep any property that has the exact string 'Com' somewhere in the first line of the property. Any other regex search can be input in place of the '.*Com.*' string. The contains() operator can also be used in place of the isMatch() operator To perform regex searching on multiple lines, a (?s) or (?si) needs to be tacked on to the front of the regex search. The (?s) will perform a case sensitive multi-line regex search and (?si) will allow the multi-line search to not be case sensitive. This way we can search for any specific keyword (or words) in a multi line capsule property: $condition.keep('Value', isMatch('/(?s).*keyword.*/') or $condition.keep('Value', isMatch('/(?si).*keyword.*/') Results in a new filtered condition that only contains capsules whose 'Value' property contains our 'keyword':
  10. Hi Greg Since you already have a condition identifying when your signal changes, to identify the magnitude of the change all you need to do is use Signal From Condition. Here is an example of how it might look: In this case i am using "Range" because it will always give me a positive value of the change in my power signal. If i wanted to know if it was positive or negative I would use "Delta" instead. Here i am using the Duration as my timestamp so i can more easily accomplish the next step- filtering the original change condition. Since you want to count the number of instances the value changes by more than some amount, we can then filter our original condition (the one that identified the change) so it only retains the capsules where the change was over your threshold. To do this i will use Formula: In this case, i am filtering my Load Swing to keep capsules where the swing is greater than 25kW. You can see the filtered condition is shown in blue where my original Condition is shown in green. From here, you can use the Scorecard Metric to count the number of the filtered capsules. Hope this helps!
  11. Hi Thorsten, A bit more information might help me directly answer your question. Are the calculations being performed on the historian server? If so, then yes we would reference like any other signal. If the calculation is performed within seeq, then the answer is also yes, we should be able to assign that to a tree within the tree file connector depending on how it was created and the specifics of the calculations. Here is an example of the data/datasource ID and datasource name for a Seeq calculation: In general you would assign a seeq internal calculation using this information in place of the equivalent historian information. If you have a bit more information on what exactly you are trying to accomplish i will try and give you a more specific answer. Hope this helps -Sean Tropsa
  12. As of Seeq R21.044 we have a couple interesting new ways to compare signals in formula! When creating a value based condition, the usual default is the value search tool, but it has always been possible using formula as well, however these functions have typically been limited to signal against scalar comparisons. As of R21.044 however, common math operators like <, <=, >, >=, == (is equal to), != (is not equal to), and && (logical and) are all available for use as signal against scalar, or signal against signal comparisons! Whenever the mathematical condition is met, a condition will be created just like a typical value search, however unlike value search the mathematical operators in formula will also work with two signals. For more information, search for "Comparison Functions for Signals" in your formula documentation. Here are a few examples of these operators in use: Signal and scalar comparison: Signal and scalar comparison with logical and: Signal against Signal: For a full list of whats new in R21.044 check out this KB article: https://seeq12.atlassian.net/wiki/spaces/KB/pages/571375775/What+s+New+in+R21.0.44
  13. Scenario: I have created a regression or prediction model for my process but i want to apply that same regression model to another set of signals or a different period of time. This could be helpful for comparing how one piece of equipment is operating when compared against a regression built for another system. It could be used to predict how a system will behave based on how some other similar system behaved. It could be used predict how a system will behave before you have enough information to build that system or run its own model, or any number of applications where we might want to apply a regression or prediction model built on one set of signals to another set of signals. Solution: First off, we have to build a prediction model! In this case i have modeled a Filtration system, predicting filter head loss. I took into account the time the filter has been in service, the raw water turbidity, and the Filter turbidity. Next, if i click on the information icon for my prediction signal, i am able to see the formula that was used to create this prediction. We will need to copy this formula: Next, I need to identify my new signals. In my case, i am going to apply this prediction model to Filter 12. Once i have all of my signals that will be sued to the prediction i can paste my formula into a new formula and make sure all my variables line up (or, alternately and a bit easier, just use the duplicate to formula function from the information screen shown above by clicking on the down arrow next to the duplicate button). Finally, I need to update the PREDICT section of my formula denoted by the .predict() function with the signals i will apply my prediction model to. I can do this by using the search button in the formula tool to add my new signals, and then update the .predict() section of my formula with my new variables, make sure to put them in correctly and in the right order otherwise your model will be off! Finally, i can use my prediction model that i built for Filter 1 on Filter 12 and derive further insight, in this case i might question whether my systems are truly as similar as i think they are or whether there is something causing my model to deviate from what was expected for filter 12. In my case, both prediction models are in red:
  14. Frequently asked question: How do i highlight capsules? I am looking at quite a few capsules in capsule time, is there any way i can compare or highlight a few of them against the rest to compare performance? Lets say i want to look at the most recent batch compared to all batches in the last month, look at one start up or shut down against several historical, or any number of other reasons why we might want to compare capsules in Capsule Time. Luckily, this is easy in Seeq! While in capsule time, simply select one or several capsules in the capsule pane to highlight them against the rest: Alternatively, if you do not know the date of the problem capsule but you can tell that it stands out, you can just click on it in the display pane to highlight it and it will be selected in the capsule pane for you to dig into further! If you want to un-select one of the highlighted capsules in capsule time, just click on it again and it will be dimmed. Image captured in Seeq R21.043
  15. Giovanni, You can view the prediction model coefficients in the prediction menu by clicking on the "Prediction Model" button: You mentioned that the model does not seem to fit the data? Can you elaborate on this? If you don't feel comfortable posting anything here, feel free to email support@seeq.com and we would be happy to look at your model! As for the trend line, at the moment this is not currently possible, however this is a feature that is in our current beta release R21.044! Please check with your local Seeq admin or contact us at support@seeq.com and we can look at the upgrade process. -Sean
  16. In R21+ versions of Seeq, an easier way to accomplish the up time counter would be to use the following code: 1.toSignal().integral($on) You can add on the modifier .convertUnits('h') to convert the counted time from seconds to hours (or replace 'h' with min for minutes, d for days, etc.) A side note, With the R21.043 release we no longer require a maximum duration when creating capsules, but still require it when performing certain functions like integral(), if you are getting a maximum duration error, just tack on .setMaximumDuration(7d) on to your condition like so: 1.toSignal().integral($co.setMaximumDuration(7d)).convertUnits('h') More info on the maximum duration can be found in this thread:
  17. Drew, As Thorsten said, we do not currently have a way to show the most current values in the trend view of Workbench. If you want to view the value and the trend at the same time, you could create a scorecard as Thorsten suggested, then create an Organizer Topic with both the Scorecard Metrics and the trend view on the same page. You mentioned in your PDF that you wanted to move the trend range (axis) from the left side of the Y-Axis to the right. You can currently accomplish this using the 'Align' option in the customize pane. Select R instead of L: I can submit a feature request for each of the items you show in your attached PDF (View most recent values on the trend and grid lines on the trend axes). If you would like to be attached to the feature requests, please email support@seeq.com so we can attach you. That way you will be notified as your requests get worked on!
  18. Hi William, If you just want to make the 56 day cycle of one interval of shifts into a recurring periodic condition you can use the periods() function in formula. This function can take a number of optional arguments but the basics are: length of capsule, time between capsule starts, time to start first capsule (can be time zone adjusted). For your specific case, try this in formula: periods(56 day, 56 day, '2019-05-13') where you have a 56 day capsule that is created every 56 days starting on may 13th (i used may 13th of this year in the example)
  19. Kareem, Do all of your temperature signals have the same threshold value? If so, we could possibly do some math to create 1/0 signals for each of your temperatures in formula and add them up giving you a total above threshold value. If each of the temperature signals has a different value, we could still potentially do it in formula, but it might be advantageous to use the value search functionality to create capsules at that point. -Sean
  20. Jason, A little bit more context on what you are trying to accomplish would help me offer a better suggestion. From what i can gather, you are trying to splice a bunch of different values together, one value for each condition $a through $m. When none of these values are present you want the signal to be without data (i.e. invalid) is that correct? do the conditions $a through $m ever overlap? Does the calculation go on endlessly giving you the spinning wheel? or does it error out in some way? If you only try splicing together say the first 4 conditions ($a through $d) will the calculation finish loading? if a 0 value is OK when no other data is present, try replacing scalar.invalid with 0 and see if it works. Using your formula and non-overlapping conditions i was able to get this long splice chain to work by commenting out, then retyping the offending lines of code (in my case, $d and $f both error-ed out for no clear reason. In retyping them they were accepted and the formula completed.)
  21. As stated in the previous post, correlationOffset() can be a useful tool for identifying what the optimum delay value should be in order to obtain a maximum correlation between two variables. This function is quite helpful, but in general should be applied when you as the user recognize or suspect that two signals might be correlated. While it will generate a value for any two given signals, the value may not be meaningful if the two signals are not inherently related. Lets say we have a temperature sensor in a reactor. At some point downstream of this temperature measurement, we have a relative humidity sensor that is sensing the same volume of air, but due to the positioning of the two sensors, we are certain they are offset but measuring the same volume of air, but are unsure of the offset between the two. This would be an excellent application of correlation offset! Here we can see the temperature leads the RH signal and the two are definitely inversely correlated, however we don't know what the delay between the two signals is. The code used to determine the offset is: $offset = $relativeHumidity.correlationOffset((1/$temperature), $correlationDetectionPeriod.toGroup(capsule('2019-06')), -6h, 6h, 5min, 0.9) $relativeHumidity.delay($offset) The correlationOffset function takes the following arguments $signal.correlationOffset($GoalSignal, Group of Capsules to Calculate Correlation On, Min Offset, Max Offset, Grid Period, Min R^2). In the above code, we are determining the correlation offset between relative humidity and 1/temperature (because the two are inversely correlated) using the $correlationDetectionPeriod condition during the month of June, with a minimum offset of -6 hours, a maximum offset of 6 hours, re-sampling the data to a 5 minute grid, and a minimum R^2 of 0.9 Implementing the code gives us: The new Shifted Relative Humidity signal in orange seems to track quite well with the temperature signal in green (when temperature is at a maximum, the relative humidity is at a minimum) when compared to the original relative humidity signal in purple. This analysis was done in Seeq version R21.042
  22. 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!
  23. The above method for combining a Forecast Signal and a Measured Signal should work in any release of Seeq. New in R21 of Seeq however, we have the "forecastSplice()" function which greatly simplifies the workflow. As before, we need a Measured Data signal and some Forecast Signal that will be combined with the Measured Data. The Seeq R21 and later workflow: 1. Create the Master Signal In formula, use the new forecastSplice() operator to join the Measured Data and the Forecast Signal $measuredData.forecastsplice($forecastSignal) The Master Signal now appears as solid line where points are known, and dashed line where the points are still uncertain and expected to change. This is slightly different from the view shown above where the entire Master Signal was dashed due to uncertainty of future data. This helps the Seeq user to visually see where the Measured Data ends and where our Forecast Signal begins. Just as the above formula, the forecastSplice() will update as new data comes in Another operator, forecastConstant() was also introduced with R21. This would do something similar to what is shown above, however, instead of combining the Forecast Signal with the Measured Data, forecastConstant() would project the last value for the Measured Data into the future for some specified amount of time i.e. $measuredData.forecastConstant(1d) would create a Master Signal where the forecast is projected 1 day into the future: 2. Make sure the Master Signal is Auto-Updating Same as in the prior post
  24. When performing certain types of analysis, it is desirable to combine past measured data with some future prediction, whether that prediction is dynamic or static. Future predicted data can be used for degradation or maintenance date predictions, future performance modeling, signal forecasting, or a wide variety of other potential use cases. Combining some future data with a measured signal is simple in Seeq! Another major benefit? As new data comes in the predicted values can be automatically updated with the actual data! Here is one way to join past measured data with some future forecast signal. Signals To combine measured and forcasted data we will need: Measured Data - a signal(s) that will replace the predicted signal as it becomes available Prediction / Forecast Signal - This could be a flat signal entered in formula, a signal developed in the prediction tool, or some other signal that extends out into the future Method for Combining the Signals 1. Create Future Data Valid Condition This Condition defines the period of time in which the Forcasted signal will be spliced into the Measured Data signal. The formula is based on the last known measured time stamp. In formula we will create a condition by inputting the code snippet below and calling it $validPlanningRange Formula: /* Define the period when planning data should be used. This time period will start at now (i.e., the last available measured data point) and extend to some point in the future. */ //Define a search window to look for now, This must have a past time to start in, and a future time to look through $searchPeriod = capsule('2018-08-01T00:00-08:00', '2020-01-01T00:00-08:00') //Identify now by finding the last available measured time stamp $now = $measuredData.toGroup($searchPeriod).last().getKey() //Create a condition representing now to now plus 6 months $nowCapsule = capsule($now, $now + 6 months) condition(7 months, $nowCapsule) Variable Descriptions $searchPeriod - Capsule defining the search window which will be used to located the most recent data point. For best performance, the start date should be periodically updated to limit the number of measured data points which will be returned. The end date can be set way into the future. $now - Date representing the point in time where the combined signal we are creating will switch from historical to future data. $nowCapsule - This creates a capsule which is then made into a condition for use in the next step Create Combined Signal. For maximum performance, recommend keeping the capsule length to the minimum necessary duration (e.g., don't add 1 year if only 6 months is the standard analysis window). 2. Create a Combined Master Signal Once again, in formula we will input the code below to create a new signal that is the combination of the Measured Data and a Forcast Signal Formula $measuredData.splice($forecastSignal,$validPlanningRange) The result is one signal that combines our Measured Data and a Forecast Signal: The Master Signal appears as dashed line whereas the measured data appears as a solid line. The dashed line indicates the signal is uncertain and therefore, expected to change. 3. Make sure the Master Signal is Auto-Updating By default when the page is loaded or the time range adjusted, the Master Signal will be recalculated and any new data from the Measured Signal will replace the Forecast Signal. Additionally, the analysis can be set to Auto Update.
×
×
  • Create New...