A toolkit for filtering and data processing in WinCC OA

Slides:



Advertisements
Similar presentations
ASP.NET Best Practices Dawit Wubshet Park University.
Advertisements

R2: An application-level kernel for record and replay Z. Guo, X. Wang, J. Tang, X. Liu, Z. Xu, M. Wu, M. F. Kaashoek, Z. Zhang, (MSR Asia, Tsinghua, MIT),
Utilizing the GDB debugger to analyze programs Background and application.
Auto-tuning for Electric Guitars using Digital Signal Processing Pat Hurney, 4ECE 31 st March 2009.
Chapter 10.
An Introduction to Programming with C++ Fifth Edition Chapter 10 Void Functions.
A Guide to SQL, Seventh Edition. Objectives Embed SQL commands in PL/SQL programs Retrieve single rows using embedded SQL Update a table using embedded.
Guide To UNIX Using Linux Third Edition
Introduction to C Programming
Recursion.
Control and monitoring of on-line trigger algorithms using a SCADA system Eric van Herwijnen Wednesday 15 th February 2006.
FwSPY and UNICOS-CPC Benjamin Bradu Giulio Morpurgo CERN, EN-ICE May2015.
Topic #10: Optimization EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
CIS 199 Test 01 Review. Computer Hardware  Central Processing Unit (CPU)  Brains  Operations performed here  Main Memory (RAM)  Scratchpad  Work.
Introduction to Matlab & Data Analysis
Finite State Machines (FSMs) and RAMs and inner workings of CPUs COS 116, Spring 2010 Guest: Szymon Rusinkiewicz.
The Central Processing Unit
Functions CS 103 March 3, Review A function is a set of code we can execute on command to perform a specific task A function is a set of code we.
Computer Science: A Structured Programming Approach Using C1 2-7 Input/Output Although our programs have implicitly shown how to print messages, we have.
Industrial Control Engineering UNICOS distributed control  What does it mean?  Why do we need it  Implication for UNICOS device and tools Hervé Milcent.
Finite State Machines (FSMs) and RAMs and CPUs COS 116, Spring 2011 Sanjeev Arora.
Lecture 2: Introduction to C Programming. OBJECTIVES In this lecture you will learn:  To use simple input and output statements.  The fundamental data.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
An Introduction to Programming with C++ Sixth Edition Chapter 14 Sequential Access Files.
Parallelization of likelihood functions for data analysis Alfio Lazzaro CERN openlab Forum on Concurrent Programming Models and Frameworks.
Developing Applications with the CSI Framework A General Guide.
Testing Cross-Platform Mobile App Development Frameworks Nader Boushehrinejadmoradi, Vinod Ganapathy, Santosh Nagarakatte, Liviu Iftode Department of Computer.
Introduction to MATLAB Section2, statistics course Third year biomedical dept. Dina El Kholy, Ahmed Dalal.
STL CSSE 250 Susan Reeder. What is the STL? Standard Template Library Standard C++ Library is an extensible framework which contains components for Language.
Alarm Handling Oliver Holme 7 th November Guidelines & Strategies All provide recommendation to use Framework Classes Standard severities/behaviour/colours.
WaveMaker Visual AJAX Studio 4.0 Training Java Script Events.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
Simple “VICO” (“VIPO”) Programs (Variables, Input, Calculating or Processing, Output)
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
What is filter ? A filter is a circuit that passes certain frequencies and rejects all others. The passband is the range of frequencies allowed through.
MillWheel Fault-Tolerant Stream Processing at Internet Scale
Input/Output Device Drivers
Chapter 14: Sequential Access Files
CMS DCS: WinCC OA Installation Strategy
A Guide to SQL, Seventh Edition
Chapter 1: Introduction to computers and C++ Programming
Chapter 3: Process Concept
Smart Ethernet I/O P2P and GCL Introduction
Chapter 2 - Introduction to C Programming
Appendix B MathScript Basics
Simple metrics to assess code quantity and quality
Advanced QlikView Performance Tuning Techniques
Section 64 – Manipulating Data Using Methods – Java Swing
Lecture 27 Creating Custom GUIs
The Selection Structure
CMS Operational Experience
Challenging Cloning Related Problems with GPU-Based Algorithms
Senior Software Engineering Student Robertas Sys
Scripts & Functions Scripts and functions are contained in .m-files
Chapter 2 - Introduction to C Programming
Customization
Functional Programming with Java
Alarm Extension Pack from Wonderware Finland (Klinkmann)
Hash table another data structure for implementing a map or a set
Advanced Associative Structures
Introduction to the C Language
Privilege Separation in Condor
Code is on the Website Outline Comparison of Excel and R
Logical Computer System
Introduction to Spark.
Chapter 5: Control Structures II (Repetition)
Challenge Guide Grade Code Type Slides
Framework Anil
Presentation transcript:

A toolkit for filtering and data processing in WinCC OA Oliver Holme

Filtering needs Current filtering possibilities Simple procedures provided by WinCC OA Smoothing (time, deadband, old/new comparison) Available only in drivers and archiver Custom code with dpConnect() of timedFunc() More filtering can be useful sometimes Smoothing noisy data, reducing update rate Avoid further load downstream (FSM, dpConnects, alarms) Beyond filtering - analysis and characterisation of a signal e.g. RMS calculation or value change detection/counting Oliver Holme 10/06/2014

Toolkit concept Avoid duplicated implementations doing similar things Eliminate the need to write any filtering code for most cases Only configuration required (setting up a config DP) Write and test filters once, then use many times Hopefully reduce errors Provide facilities to extend the set of filters if required Central place for data processing – fewer obscure CTRL scripts Oliver Holme 10/06/2014

Default filter set Provides a standard set of configurable filters Spike filter(min_spike_size, spike_length) Low pass filter(time_constant) Mean(window_length) – sliding window Median(window_length) – sliding window Kalman filter(q, r) Also some examples of analysis and rate reduction RMS(window_length) Sample and hold() – to sample a data stream Value change detection() – can act as a simple watchdog Limitations: Single input and single output DPE But either or both can be dyn_... types Oliver Holme 10/06/2014

Chains can contain any number of filters How it works Defining a “filter chain”: Filter definitions are saved into one or more filter config DPs A CTRL manager runs a script to perform the filtering One manager can handle one (-filter_dp_config <DP>) or all config DPs Load can be shared across many managers Input DPE Filter 1 Filter N Output DPE Choose polling or “on change” Chains can contain any number of filters Oliver Holme 10/06/2014

What exists now The filtering script The default filter set (See slide 4) Functions to configure the config DPs: CMS_ECALfw_Filtering_createFilterDetailString() CMS_ECALfw_Filtering_createFilterChainObject() CMS_ECALfw_Filtering_saveFilterChain() CMS_ECALfw_Filtering_removeFilterChain() Visualisation panel Shows configuration (no editing) Live input/output view with plot Oliver Holme 10/06/2014

Oliver Holme 10/06/2014

Adding new filters First three arguments must be: key – a unique identifier of “this” step in a filter chain value – the new value of the process variable timestamp – the timestamp that the value was read* Additional arguments for filter configuration Persistent information can be saved for next iteration: CMS_ECALfw_Filtering_setVariable(key, variable, value) CMS_ECALfw_Filtering_getVariable(key, variable, value) Persistent value is of type mixed Return value is the output of the filter step (type: mixed) To return “nothing”, return CMS_ECALfw_Filtering_NONE * time of polling for polled values or DPE timestamp in case of “on change” Oliver Holme 10/06/2014

Example – Sliding Mean Get previous state Manipulate Save state mixed CMS_ECALfw_Filtering_SlidingMean( string key, mixed value, time timestamp, int window, bool outputAtStartup = false) { mixed output = CMS_ECALfw_Filtering_NONE; //load previous sliding window contents dyn_mixed buffer; CMS_ECALfw_Filtering_getVariable(key, "buffer", buffer); //append latest value and remove the first dynAppend(buffer, value); if(dynlen(buffer) > window) dynRemove(buffer, 1); //save the sliding window contents for next time CMS_ECALfw_Filtering_setVariable(key, "buffer", buffer); //determine and return mean value if(outputAtStartup || (dynlen(buffer) == window)) output = dynAvg((dyn_float)buffer); return output; } Get previous state Manipulate Save state Generate output Oliver Holme 10/06/2014

Average CPU thread load Average CPU thread load Performance Simple filter chain 1 filter, on change, 1Hz input values Sliding mean (window = 5 samples) Complex filter chain 3 filters, on change, 1Hz input values Spike filter -> low pass -> RMS (win = 5) Filter chains Peak RAM consumption Average CPU thread load 500 55 MB 22 % 1000 66 MB 44 % 1500 78 MB 67 % 2000 88 MB 75 % 2500 100 MB 87 % 3000 110 MB 93 % Filter chains Peak RAM consumption Average CPU thread load 500 56 MB 52 % 1000 69 MB 80 % 1500 83 MB 95 % 2000 - 2500 3000 Test computer DELL Blade PowerEdge M610 with Windows 7 SP1 and WinCC OA 3.11 SP1 Dual Intel Xeon X5660 2.8 GHz (6 cores / 12 threads per CPU) Oliver Holme 10/06/2014

Current Status Used in production in CMS ECAL DCS Median and value change detection (watchdog) Studies ongoing for further applications Spike filter and mean No further development anticipated at the moment Any interest? Oliver Holme 10/06/2014