PLC Time-Stamp Correction for Multi-Device Time-Series Data
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The accuracy of time stamps between time-series data collected by multiple PLCs is compromised due to internal clock drift, leading to significant time deviations, especially in systems with high data collection frequencies, which affects data analysis and machine learning reliability.
Innovation Solution
A control device with a local clock correction unit that repeatedly adjusts the local time, stores time correction amounts, and modifies time stamps based on these corrections, ensuring accurate timestamping of data collected from controlled objects, even across multiple systems.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If data is collected at high frequency with time stamps from local clocks, then data collection speed and productivity are improved, but time stamp accuracy deteriorates due to clock drift
Solution Approach 1:
The system performs preliminary time synchronization by having each PLC repeatedly acquire time from a time server and calculate time correction amounts before data collection. These correction amounts are stored and applied to time stamps during data collection, preventing time drift accumulation while maintaining high collection frequency
Solution Approach 2:
The system implements feedback by continuously monitoring time synchronization status through repeated time server acquisitions. The calculated time correction amounts are stored and fed back to correct future time stamps, creating a closed-loop system that maintains accuracy over time
2Ease of operation
If multiple PLCs use their own local clocks for time stamping, then device independence and ease of operation are improved, but time synchronization between devices deteriorates
Solution Approach 1:
The time server acts as an intermediary that provides a common time reference to all PLCs. Each PLC independently acquires time from this mediator and calculates its own correction amounts, enabling both device independence and synchronized time stamps across the system
Solution Approach 2:
The system changes the time parameter by calculating and applying correction amounts to the local clock time. This adjustment transforms the inaccurate local time into corrected time stamps that are synchronized across multiple devices while preserving each device's operational independence
3Loss of energy
If NTP server access frequency is reduced to once per hour, then communication load is reduced, but time deviation between devices increases
Solution Approach 1:
The system performs preliminary time synchronization by repeatedly acquiring time from the server and calculating correction amounts that are stored for later use. This preliminary preparation enables accurate time stamping without requiring frequent communication during data collection
Solution Approach 2:
The system applies correction amounts to individual time stamps on a per-data basis rather than uniformly adjusting the clock. This partial action approach maintains accuracy for each data point while avoiding the communication overhead of continuous clock synchronization
Data Source
AI summary
Data is recorded to a time-series database embedded in a PLC. A local clock of the PLC is corrected by accessing a time server such as an NTP server on a regular basis. At that time, a time correction amount and an NTP-ID for identifying each iteration of correction processing are recorded to an NTP log in association with each other. When a query arrives, a time stamp of a record corresponding to a designated time range is modified by proportionally distributing the time correction amount of the corresponding NTP-ID.


