System-Level Offline Time Synchronization Architecture for Distributed Electrical Signal Monitoring Using Raspberry Pi 5
Abstract
1. Introduction
2. Hardware Configuration and Network Offline Management
- sudo iptables -A FORWARD -i enp1s0 -o enx7cc2c6318f81 -j ACCEPT sudo iptables -A FORWARD -i enx7cc2c6318f81 -o enp1s0 -m state --state RELATED, ESTABLISHED -j ACCEPT
- sudo iptables -t nat -A POSTROUTING -o enx7cc2c6318f81 -j MASQUERADE”
- [Match]
- Name=eth0
- [Network]
- Address=<RPI5_IP>/24
- Gateway=<server_IP_LocalNetwork>
- DNS=8.8.8.8
- sudo systemctl enable systemd-networkd
- sudo systemctl restart systemd-networkd
- sudo bash -c ‘echo “nameserver 8.8.8.8” > /etc/resolv.conf’
- sudo bash -c ‘echo “nameserver 1.1.1.1” >> /etc/resolv.conf’
- sudo chattr +i /etc/resolv.conf
- sudo systemctl restart systemd-networkd
- dtparam=i2c_arm=on
- #dtparam=i2s=on
- #dtparam=spi=on
- dtparam=audio=on
- dtoverlay=vc4-kms-v3d
- dtparam=rtc_enable=on
- #dtparam=rtc=bbat_vchg=3000000
- #dtoverlay=dwc2,dr_mode=host
- [ 0.252682] rpi-rtc soc@107c000000:rpi_rtc: registered as rtc0
- [ 0.254050] rpi-rtc soc@107c000000:rpi_rtc: setting system clock to 1970-02-22T05:12:48 UTC (4511568)
3. System and RTC Clock Control
3.1. Clock Synchronization Between Target Nodes
- echo “Creating rtc-to-system.service”
- sudo tee /etc/systemd/system/rtc-to-system.service > /dev/null <<‘EOF’
- [Unit]
- Description=Sync system clock from RTC at boot
- After=multi-user.target
- [Service]
- Type=oneshot
- ExecStart=/bin/bash -c ‘date -s “$(cat /sys/class/rtc/rtc0/date) $(cat /sys/class/rtc/rtc0/time)”’
- RemainAfterExit=yes
- [Install]
- WantedBy=multi-user.target
- EOF
3.1.1. NTP Master–Client Synchronization Using Chrony
- MS Name/IP address Stratum Poll Reach LastRx Last sample
- ===================================================
- ^* <RPI5_masterIP> 8 6 377 19 -1456ns[-2028ns] +/- 94us\
- sudo tee /etc/systemd/system/system-to-rtc.service > /dev/null <<‘EOF’
- [Unit]
- Description=Sync RTC from system clock
- After=time-sync.target chrony.service
- Wants=time-sync.target
- [Service]
- Type=oneshot
- ExecStart=/sbin/hwclock --systohc --utc
- EOF
- sudo tee /etc/systemd/system/system-to-rtc.timer > /dev/null <<‘EOF’
- [Unit]
- Description=Periodic system clock to RTC sync
- [Timer]
- OnBootSec=5min
- OnUnitActiveSec=1h
- AccuracySec=1min
- Persistent=true
- [Install]
- WantedBy=timers.target
- EOF
3.1.2. PTP-Based Synchronization Using Chrony and the PHC
- ptp4l[9002.939]: master offse -67 s2 freq -6796 path delay 2748
- ptp4l[9003.939]: master offset 7 s2 freq -6742 path delay 2729
- /var/log/ptp4l.log {
- daily
- rotate 7
- missingok
- notifempty
- copytruncate}
- MS Name/IP address Stratum Poll Reach LastRx Last sample
- ==============================================================
- #* PHC0 0 0 377 0 +30ns[ +42ns] +/- 55ns
3.1.3. PTP-Based Synchronization Using phc2sys and the PHC
- CLOCK_REALTIME phc offset -12 s2 freq +40477 delay 55
- CLOCK_REALTIME phc offset -1 s2 freq +40485 delay 55
3.2. Quantitative Comparison Between Chrony and phc2sys
4. Multi-Node Synchronization Proof
4.1. Inter-Slave Offset Comparison Between Client Nodes
- #MASTER
- /usr/sbin/ptp4l -i eth0 -H -2 -m
- /usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -O 0 -m
- #CLIENTS
- usr/sbin/ptp4l -i eth0 -H -2 -s -m
- /usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -O 0 -m
- The PTP state transitions recorded in the ptp4l log confirm that the local clock was selected as the best master (selected local clock 2ccf67.fffe.f62eb3 as best master) and that the node assumed the grandmaster role (LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES, assuming the grand master role).
- new foreign master 2ccf67.fffe.f62eb3-1
- selected best master clock 2ccf67.fffe.f62eb3
- LISTENING to UNCALIBRATED on RS_SLAVE
- master offset 7200016624080 s0 freq -0 path delay 5080
- CLOCK_REALTIME phc offset -28 s2 freq +43289 delay 37
- CLOCK_REALTIME phc offset 44 s2 freq +43353 delay 55
- systemctl status chrony
- Active: active (running)
- systemd[1]: Starting chrony.service - chrony, an NTP client/server...
- #MASTER: chronyd[6074]: Frequency 40.376 +/- 0.003 ppm read from /var/lib/chrony/chrony.drift
- #CLINET1: chronyd[330497]: Frequency 43.521 +/- 0.014 ppm read from /var/lib/chrony/chrony.drift
- #CLIENT2: chronyd[329396]: Frequency 44.039 +/- 0.026 ppm read from /var/lib/chrony/chrony.drift
4.2. Capture of Synchronized Timedate System Signals
4.2.1. Multi-Node Hardware Timestamp Synchronization Evaluation
4.2.2. Multi-Node Software Timestamp Synchronization Evaluation
- [target3] Fetched target3_20260124T120951.csv
- [target2] Fetched target2_20260124T120951.csv
- [target1] Fetched target1_20260124T120951.csv
- [target2] Fetched target2_20260124T122113.csv
- [target3] Fetched target3_20260124T122113.csv
- [target1] Fetched target1_20260124T122113.csv
- …
- [target1] Fetched target1_20260207T105904.csv
- [target3] Fetched target3_20260207T105904.csv
- [target2] Fetched target2_20260207T105904.csv
- [target2] Fetched target2_20260207T110019.csv
- [target1] Fetched target1_20260207T110019.csv
- [target3] Fetched target3_20260207T110019.csv
- …
- [target1] Fetched target1_20260214T095214.csv
- [target3] Fetched target3_20260214T095214.csv
- [target2] Fetched target2_20260214T095214.csv
5. Discussion
5.1. Advantages of Wired Ethernet over Wireless Synchronization
5.2. Role of the Raspberry Pi 5 Platform
5.3. Decoupling of Synchronization Evaluation from Payload Transmission
5.4. Chrony Versus phc2sys: Comparative Performance
5.5. Validation Methodology and Limitations
5.6. Interaction Between Synchronization and Data Acquisition
5.7. Scalability and Future Directions
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Beke, T. Time Synchronization in IoT Lighting Control; Eindhoven University of Technology, Department of Mathematics and Computer Science, System Architecture and Networking Research Group: Eindhoven, The Netherlands, 2017. [Google Scholar]
- Sangjan, W.; Carter, A.H.; Pumphrey, M.O.; Jitkov, V.; Sankaran, S. Development of a Raspberry Pi-Based Sensor System for Automated In-Field Monitoring to Support Crop Breeding Program. Inventions 2021, 6, 42. [Google Scholar] [CrossRef]
- Barbaro, A.; Chiavassa, P.; Ramírez-Espinosa, G.; Fissore, V.I.; Servetti, A.; Giusto, E.; Montrucchio, B.; Raviola, E.; Astolfi, A.; Fiori, F. Data Acquisition, Processing, and Aggregation in a Low-Cost IoT System for Indoor Environmental Quality Monitoring. Appl. Sci. 2024, 14, 4021. [Google Scholar] [CrossRef]
- Gomez, K.; Riggio, R.; Rasheed, T.; Miorandi, D.; Granelli, F. Energino: A Hardware and Software Solution for Energy Consumption Monitoring. In Proceedings of the International Workshop on Wireless Network Measurements, Paderborn, Germany; IEEE: New York, NY, USA, 2012; pp. 311–317. [Google Scholar]
- Bhau, G.V.; Deshmukh, R.G.; Kumar, T.R.; Chowdhury, S.; Sesharaoe, Y.; Abilmazhinov, Y. IoT-Based Solar Energy Monitoring System. Mater. Today Proc. 2023, 80, 3697–3701. [Google Scholar] [CrossRef]
- Liu, Y.; Sun, B.; Wu, Y.; Zhang, Y.; Yang, J.; Wang, W.; Thotakura, N.L.; Liu, Q.; Liu, Y. Time Synchronization Techniques in the Modern Smart Grid: A Comprehensive Survey. Energies 2025, 18, 1163. [Google Scholar] [CrossRef]
- Vujović, V.; Maksimović, M. Raspberry Pi as a Wireless Sensor Node: Performances and Constraints. In Proceedings of the 37th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 26–30 May 2014; IEEE: New York, NY, USA, 2014. [Google Scholar]
- Jie, X.; Liang, X.; Lian, D.; Delin, Z. Research on Network Timing System Based on NTP. In Proceedings of the 13th IEEE International Conference on Electronic Measurement & Instruments (ICEMI), Yangzhou, China, 20–22 October 2017; IEEE: New York, NY, USA, 2017. [Google Scholar]
- Gamage, K.A.A.; Sajid, A.; Sonbul, O.S.; Rashid, M.; Jaffar, A.Y. A Dynamic Framework for Internet-Based Network Time Protocol. Sensors 2024, 24, 691. [Google Scholar] [CrossRef] [PubMed]
- Wang, Y.; Tang, Z.; Qian, G.; Xu, W.; Huang, X.; Fang, H. A Prototype of a Lightweight Structural Health Monitoring System Based on Edge Computing. Sensors 2025, 25, 5612. [Google Scholar] [CrossRef] [PubMed]
- Alaa, M.; Zaidan, A.A.; Zaidan, B.B.; Talal, M.; Kiah, M.L.M. A review of Smart Home Applications Based on Internet of Things. J. Netw. Comput. Appl. 2017, 97, 48–65. [Google Scholar] [CrossRef]
- Mills, D.L. Internet Time Synchronization: The Network Time Protocol. IEEE Trans. Commun. 1991, 39, 1482–1493. [Google Scholar] [CrossRef]
- Sommars, S. Challenges in Time Transfer Using the Network Time Protocol (NTP). In Proceedings of the Precise Time and Time Interval Systems and Applications Meeting, Monterey, CA, USA, 30 January–2 February 2017; The Institute of Navigation: Manassas, VA, USA, 2017; pp. 271–290. [Google Scholar]
- Network Time Foundation. The Network Time Protocol. Available online: http://www.ntp.org/ (accessed on 19 February 2026).
- Bruscato, L.T.; Heimfarth, T.; de Freitas, E.P. Enhancing Time Synchronization Support in Wireless Sensor Networks. Sensors 2017, 17, 2956. [Google Scholar] [CrossRef]
- Saha, M.; Sudibyo, R.W.; Funabiki, N.; Kuribayashi, M.; Debnath, S.K.; Kao, W.C. Throughput Measurement and Estimation Model for Concurrent Communications of Multiple Raspberry Pi Access-Points in Wireless Local-Area Network. J. Commun. 2019, 14, 1009–1016. [Google Scholar] [CrossRef]
- Pham, Q.Q.; Ta, Q.B.; Park, J.H.; Kim, J.T. Raspberry Pi Platform Wireless Sensor Node for Low-Frequency Impedance Responses of PZT Interface. Sensors 2022, 22, 9592. [Google Scholar] [CrossRef]
- Bui, T.Q.T.; Elango, A.; Landry, R. FPGA-Based Autonomous GPS-Disciplined Oscillators for Wireless Sensor Network Nodes. Sensors 2022, 22, 3135. [Google Scholar] [CrossRef]
- Fayon, G.; Castel, N.; Sobreira, H.; Circu, C.-V.; Bni Lam, N.; Meersman, M.; Nummisalo, L.; Weiler, R.M.; Hahn, J.; Sirikan, N. GRIPP: An Open-Source and Portable Software-Defined Radio-Oriented GNSS/SBAS Receiver. Eng. Proc. 2026, 126, 6. [Google Scholar] [CrossRef]
- Pepiciello, A.; Pietropaoli, T.; Vaccaro, A. Enabling Technologies for Resilient Time Synchronization of Wide Area Power System Monitoring. In Encyclopedia of Electrical and Electronic Power Engineering; Elsevier: Amsterdam, The Netherlands, 2023; pp. 88–98. [Google Scholar] [CrossRef]
- Paprocki, M.; Erwiński, K. Synchronization of Electrical Drives via EtherCAT Fieldbus Communication Modules. Energies 2022, 15, 604. [Google Scholar] [CrossRef]
- Ideal Aerosmith. Ideal Delivers Synchronization Modules with AERO4000™ Controllers. Available online: https://www.ideal-aerosmith.com/ideal-delivers-synchronization-modules-with-aero4000-controllers/ (accessed on 19 February 2026).
- Caleya-Sanchez, J.; Muñoz, P.; Sánchez-Garrido, J.; Florentín, E.; Delgado-Ferro, F.; Rodriguez-Martin, P.; Ameigeiras, P. Empirical Evaluation of a 5G Transparent Clock for Time Synchronization in a TSN-5G Network, Cornell University, Networking and Internet Architecture. arXiv 2025, arXiv:2509.06454. [Google Scholar]
- Brunner, K.; Frick, F.; Ostertag, M.; Lechler, A. Practical Aspects of Cross-Vendor TSN Time Synchronization Using IEEE 802.1AS. J. Sens. Actuator Netw. 2025, 14, 67. [Google Scholar] [CrossRef]
- Son, K.J.; Chang, T.G. Distributed Nodes-Based Collaborative Sustaining of Precision Clock Synchronization upon Master Clock Failure in IEEE 1588 System. Sensors 2020, 20, 5784. [Google Scholar] [CrossRef]
- Insam, E. Application Layer Protocols. In TCP/IP Embedded Internet Applications; Elsevier: Amsterdam, The Netherlands, 2003; pp. 207–242. [Google Scholar]
- Scheiterer, R.L.; Na, C.; Obradovic, D.; Steindl, G. Synchronization Performance of the Precision Time Protocol in Industrial Automation Networks. IEEE Trans. Instrum. Meas. 2009, 58, 1849–1857. [Google Scholar] [CrossRef]
- Gabriel, K.; Kabi, J.; wa Maina, C. DSAIL Power Management Board: Powering the Raspberry Pi autonomously off the Grid. HardwareX 2022, 12, e00337. [Google Scholar] [CrossRef] [PubMed]
- Ambrož, M. Raspberry Pi as a Low-Cost Data Acquisition System for Human Powered Vehicles. Measurement 2017, 100, 7–18. [Google Scholar] [CrossRef]
- Cytron Technologies. Raspberry Pi 5 RTC Battery Setup & Usage. Available online: https://www.cytron.io/tutorial/rtc-raspberry-pi-5 (accessed on 19 February 2026).
- Mànuel-Làzaro, A.; Molino-Minero-Re, E.; Del Río-Fernández, J.; Nogueras-Cervera, M. 19—Operational Multiparameter Subsea Observation Platforms. In Subsea Optics and Imaging; Woodhead Publishing Series in Electronic and Optical Materials; Elsevier: Amsterdam, The Netherlands, 2013; pp. 488–507. [Google Scholar] [CrossRef]
- Matsakis, D. Time and Frequency Activities at the U.S. Naval Observatory. In Proceedings of the 2005 IEEE International Frequency Control Symposium and Exposition; IEEE: New York, NY, USA, 2005. [Google Scholar] [CrossRef]
- Dang, F.; Sun, X.-K.; Liu, K.-B.; Xu, Y.-F.; Liu, Y.-H. A Survey on Clock Synchronization in the Industrial Internet. J. Comput. Sci. Technol. 2023, 38, 146–165. [Google Scholar] [CrossRef]
- Savić, N.D.; Gajic, D.; Stankovic, R. An Approach to Raspberry Pi Synchronization in a Multimedia Projection System for Applications in Presentation of Historical and Cultural Heritage. Digit. Present. Preserv. Cult. Sci. Herit. 2015, 5, 267–273. [Google Scholar] [CrossRef]
- Mathe, S.E.; Kondaveeti, H.K.; Vappangi, S.; Vanambathina, S.D.; Kumaravelu, N.K. A Comprehensive Review on Applications of Raspberry Pi. Comput. Sci. Rev. 2024, 52, 100636. [Google Scholar] [CrossRef]
- Coviello, G.; Avitabile, G.; Florio, A.; Talarico, C.; Wang-Roveda, J.M. A Novel Low-Power Time Synchronization Algorithm Based on a Fractional Approach for Wireless Body Area Networks. IEEE Access 2021, 9, 134916–134928. [Google Scholar] [CrossRef]
- Elson, J.; Girod, L.; Estrin, D. Fine-Grained Network Time Synchronization Using Reference Broadcasts. In Proceedings of the 5th Symposium on Operating Systems Design and Implementation (OSDI), Boston, MA, USA, 9–11 December 2002; Association for Computing Machinery: New York, NY, USA, 2002; pp. 147–163. [Google Scholar] [CrossRef]
- Kulakli, A.B.; Erciyes, K. Time Synchronization Algorithms Based on Timing-Sync Protocol in Wireless Sensor Networks. In Proceedings of the 23rd International Symposium on Computer and Information Sciences (ISCIS); IEEE: New York, NY, USA, 2008. [Google Scholar] [CrossRef]
- Seth, G.; Harisha, A. Energy Efficient Timing-Sync Protocol for Sensor Network. In Proceedings of the 2015 International Conference on Computing and Network Communications (CoCoNet); IEEE: New York, NY, USA, 2016. [Google Scholar] [CrossRef]
- Zhang, D.; Yuan, Y.; Bi, Y. A Design of a Time Synchronization Protocol Based on Dynamic Route and Forwarding Certification. Sensors 2020, 20, 5061. [Google Scholar] [CrossRef]
- McInnes, A.I. Model-Checking the Flooding Time Synchronization Protocol. In Proceedings of the IEEE International Conference on Control and Automation (ICCA); IEEE: New York, NY, USA, 2009. [Google Scholar] [CrossRef]
- Phan, L.-A.; Kim, T.; Kim, T.; Lee, J.; Ham, J.-H. Performance Analysis of Time Synchronization Protocols in Wireless Sensor Networks. Sensors 2019, 19, 3020. [Google Scholar] [CrossRef]
- Weng, Y.; Zhang, Y. A Survey of Secure Time Synchronization. Appl. Sci. 2023, 13, 3923. [Google Scholar] [CrossRef]
- Tirado-Andrés, F.; Rozas, A.; Araujo, A. A Methodology for Choosing Time Synchronization Strategies for Wireless IoT Networks. Sensors 2019, 19, 3476. [Google Scholar] [CrossRef] [PubMed]
- Sivrikaya, F.; Yener, B. Time Synchronization in Sensor Networks: A Survey. IEEE Netw. 2004, 18, 45–50. [Google Scholar] [CrossRef]
- Kirsch, F.; Vossiek, M. Distributed Kalman Filter for Precise and Robust Clock Synchronization in Wireless Networks. In Proceedings of the IEEE Radio and Wireless Symposium (RWS); IEEE: New York, NY, USA, 2009. [Google Scholar] [CrossRef]
- Dueck, M.; Schloesser, M.; van Waasen, S.; Schiek, M. Ethernet-Based Time Synchronization for Raspberry Pi Network Improving Network Model Verification for Distributed Active Turbulent Flow Control. Control Theory Technol. 2015, 13, 204–210. [Google Scholar] [CrossRef]
- Element 14 Community. What Time Is It? How to Add a RTC to the Raspberry Pi via I2C. Available online: https://community.element14.com/products/raspberry-pi/b/blog/posts/what-time-is-it-how-to-add-a-rtc-to-the-raspberry-pi-via-i2c (accessed on 19 February 2026).
- Raspberry Pi Foundation. Documentation. Available online: https://www.raspberrypi.com/documentation/ (accessed on 19 February 2026).
- Sanchez-Garrido, J.; Aparicio, B.; Ram’ırez, J.G.; Rodriguez, R.; Melara, M.; Cercos, L.; Ros, E.; Diaz, J. Implementation of a Time-Sensitive Networking (TSN) Ethernet Bus for Microlaunchers. IEEE Trans. Aerosp. Electron. Syst. 2021, 57, 2743–2758. [Google Scholar] [CrossRef]
- Chen, X.; Li, D.; Wan, J.; Zhou, N. A Clock Synchronization Method for EtherCAT Master. Microprocess. Microsyst. 2016, 46, 211–218. [Google Scholar] [CrossRef]
- Nguyen, H.T.; Kovácsházy, T. Low-Cost PTP Grandmaster Clock Utilizing the Beaglebone Black Single Board Computer. In 26th International Carpathian Control Conference (ICCC), 19–21 May 2025; IEEE: New York, NY, USA, 2025. [Google Scholar] [CrossRef]
- Banzi, M. Getting Started with Arduino, 3rd ed.; Maker Media: Sebastopol, CA, USA, 2014. [Google Scholar]
- Espressif Systems. ESP32 Technical Reference Manual; Espressif Systems: Shanghai, China, 2023. [Google Scholar]
- Gerum, P.; Yaghmour, K.; Masters, J.; Ben-Yossef, G. Building Embedded Linux Systems, 2nd ed.; O’Reilly Media: Sebastopol, CA, USA, 2008. [Google Scholar]
- Corbet, J. Macb driver on Raspberry pi 5. Available online: https://lwn.net/Articles/1047053/ (accessed on 19 February 2026).
- Raspberry Pi Foundation Peripheral Documentation. Available online: https://pip-assets.raspberrypi.com/categories/892-raspberry-pi-5/documents/RP-008370-DS-1-rp1-peripherals.pdf (accessed on 19 February 2026).
- Custom OS on Raspberry Pi 5—Part 2: Ethernet MAC. Available online: https://zenn.dev/smallkirby/articles/8ccc1aac2b102d?locale=en (accessed on 19 February 2026).
- Raspberry Pi 5 Vs Raspberry Pi 4 Model B | Comparison & Benchmarking. Available online: https://core-electronics.com.au/guides/raspberry-pi-5-vs-raspberry-pi-4-model-b-comparison-and-benchmarking/ (accessed on 19 February 2026).
- Coletto Gallego, D.A.; Pérez, R.B.; de Sousa Fernandes, D.D.; Santos, R.M.; Eggly, G. Open Source Potentiostat for Field Analysis Based on Raspberry Pi. Hardware 2025, 3, 17. [Google Scholar] [CrossRef]
- IEEE. IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems (IEEE 1588-2019); IEEE: New York, NY, USA, 2019. [Google Scholar]
- Faherty, P. Precision Time Protocol on The Raspberry Pi Single Board Computer. Bachelor’s Thesis, Savonia University of Applied Sciences, Technology, Communication and Transport, Kuopio, Finland, May 2025. [Google Scholar]
- Love, R. Linux System Programming, 2nd ed.; O’Reilly Media: Sebastopol, CA, USA, 2013; Available online: https://people.redhat.com/pladd/MVHLUG_systemd.pdf (accessed on 19 February 2026).
- Burlibaşa, A.; Epure, S.; Vlad, C.; Dumitrescu, M.; Culea, M.; Nechita, I. Dash Plotly web-based multi-source electrical signals monitoring and analysis tool. In 2025 IEEE 15th International Workshop on Applied Measurements for Power Systems (AMPS), Bucharest, Romania, 24–26 September 2025; IEEE: New York, NY, USA, 2025. [Google Scholar] [CrossRef]
- Kaup, F.; Gottschling, P.; Hausheer, D. Power Pi: Measuring and Modeling The Power Consumption of The Raspberry Pi. In Proceeding of the 39th Annual IEEE Conference on Local Computer Networks (LCN), Edmonton, AB, Canada, 8–11 September 2014; IEEE: New York, NY, USA, 2014. [Google Scholar]
- Chrony Project. Available online: https://chrony-project.org/ (accessed on 19 February 2026).
- Linux Config. NTP Configuration Guide on Ubuntu. Available online: https://linuxconfig.org/ntp-configuration-guide-on-ubuntu-26-04 (accessed on 19 February 2026).
- RDU Notes. Time Synchronization Using NTP and Chrony. Available online: https://notes.rdu.im/system/network/time-sync-using-ntp/ (accessed on 19 February 2026).
- Hobbs, T.; Ali, A. Smart Home Control Using Real-Time Hand Gesture Recognition and Artificial Intelligence on Raspberry Pi 5. Electronics 2025, 14, 3976. [Google Scholar] [CrossRef]
- Dhanne, B.; Srinivas, A.; Chari, K.S. IoT-Based Vehicle Tracking and Monitoring using Raspberry Pi. J. Phys. Conf. Ser. 2021, 1964, 062016. [Google Scholar] [CrossRef]
- Sierra-Fernández, J.-M.; Florencias-Oliveros, O.; Espinosa-Gavira, M.-J.; González-de-la-Rosa, J.-J.; Agüera-Pérez, A.; Palomares-Salas, J.-C. Online System for Power Quality Operational Data Management in Frequency Monitoring Using Python and Grafana. Energies 2021, 14, 8304. [Google Scholar] [CrossRef]
- Deutsch, O.; Rozen Schiff, N.; Dolev, D.; Schapira, M. Preventing (Network) Time Travel with Chronos. In Proceeding of Network and Distributed Systems Security (NDSS) Symposium, San Diego, CA, USA, 18–21 February 2018; Internet Society: Geneva, Switzerland, 2018. [Google Scholar]
- Dinar, A.E.; Ghouali, S.; Merabet, B. NTP Security by Delay-Based Detection in Intelligent Defense Systems. J. Telecommun. Electron. Comput. Eng. 2021, 13, 17–26. [Google Scholar]
- Mostofa, K.Z.; Islam, M.A. Creation of an Internet of Things (IoT) System for the Live and Remote Monitoring of Solar Photovoltaic Facilities. Energy Rep. 2023, 9, 422–427. [Google Scholar] [CrossRef]






















| Target 1 | Target 2 | |
|---|---|---|
| Start measuring time dates | ||
| Local time: Universal time: RTC time: | Fri 2025-12-12 16:18:23 UTC Fri 2025-12-12 16:18:23 UTC Fri 2025-12-12 16:18:23 | Fri 2025-12-12 16:18:23 UTC Fri 2025-12-12 16:18:23 UTC Fri 2025-12-12 16:18:23 |
| After more than 48 h of recording time dates | ||
| Local time: Universal time: RTC time: | Mon 2025-12-15 08:09:24 UTC Mon 2025-12-15 08:09:24 UTC Mon 2025-12-15 08:09:20 | Mon 2025-12-15 08:09:26 UTC Mon 2025-12-15 08:09:26 UTC Mon 2025-12-15 08:09:19 |
| Target 1 | Target 2 |
|---|---|
| # Chrony MASTER (no internet) # Do NOT use internet pools # Act as local time source local stratum 8 allow 192.168.0.0/24 # Keep RTC aligned rtcsync # Allow initial correction makestep 1 3 # Drift tracking driftfile /var/lib/chrony/chrony.drift logdir /var/log/chrony | # Chrony CLIENT (private network) # Use master as time source server <RPI5_masterIP> iburst # Keep RTC aligned rtcsync # Allow initial correction makestep 1 3 # Drift tracking driftfile /var/lib/chrony/chrony.drift logdir /var/log/chrony |
| Target 1 | Target 2 |
|---|---|
| #MASTER /etc/systemd/system/ptp4l-master.service [Unit] Description=PTP4L Grandmaster (eth0) After=rtc-to-system.service Wants=rtc-to-system.service [Service] Type=simple ExecStart=/usr/sbin/ptp4l -i eth0 -H -2 -m Restart=always RestartSec=2 # Logging (compatible with logrotate) StandardOutput=append:%L/ptp4l.log StandardError=append:%L/ptp4l.log [Install] WantedBy=multi-user.target | #CLIENT /etc/systemd/system/ptp4l-client.service [Unit] Description=PTP4L Slave (eth0) After=rtc-to-system.service Wants=rtc-to-system.service [Service] Type=simple ExecStart=/usr/sbin/ptp4l -i eth0 -H -2 -s -m Restart=always RestartSec=2 # Automatic log directory creation StandardOutput=append:%L/ptp4l.log StandardError=append:%L/ptp4l.log [Install] WantedBy=multi-user.target |
| Target 1 | Target 2 |
|---|---|
| # MASTER # Chrony MASTER (no internet) # Use PHC as the primary time source refclock PHC /dev/ptp0 poll 0 dpoll -2 # Act as local time source if needed local stratum 8 allow 192.168.0.0/24 # Keep RTC aligned rtcsync # Allow initial correction makestep 1 3 # Drift tracking driftfile /var/lib/chrony/chrony.drift logdir /var/log/chrony | # CLIENT # Chrony CLIENT (private network) # Chrony using PTP Hardware Clock (PHC) # Use PHC as the primary time source refclock PHC /dev/ptp0 poll 0 dpoll -2 offset 0 # Keep RTC aligned rtcsync # Allow intial correction makestep 1 3 # Drift tracking driftfile /var/lib/chrony/chrony.drift logdir /var/log/chrony |
| Target 1 | Target 2 |
|---|---|
| # MASTER /etc/systemd/system/phc2sys-master.service: [Unit] Description=PHC to System Clock (PTP Master) After=ptp4l-master.service Requires=ptp4l-master.service [Service] Type=simple ExecStart=/usr/sbin/phc2sys \ -s /dev/ptp0 \ -c CLOCK_REALTIME \ -O 0 \ -m Restart=always RestartSec=2 # Automatic log directory creation StandardOutput=append:%L/phc2sys.log StandardError=append:%L/phc2sys.log [Install] WantedBy=multi-user.target | # CLIENT /etc/systemd/system/phc2sys-client.service: [Unit] Description=PHC to System Clock (PTP Client) After=ptp4l-client.service Requires=ptp4l-client.service [Service] Type=simple ExecStart=/usr/sbin/phc2sys \ -s /dev/ptp0 \ -c CLOCK_REALTIME \ -O 0 \ -m Restart=always RestartSec=2 # Automatic log directory creation StandardOutput=append:%L/phc2sys.log StandardError=append:%L/phc2sys.log [Install] WantedBy=multi-user.target |
| Metric | chrony (PHC → System) | phc2sys (PHC → System) |
|---|---|---|
| Mean offset | +129.45 ns | +50.63 ns |
| RMS offset | 156.70 ns | 420.37 ns |
| Standard deviation | 88.30 ns | 417.31 ns |
| Minimum/maximum | −201 ns/+410 ns | −850 ns/+5297 ns |
| Peak-to-peak | 611 ns | 6147 ns |
| Inter-Slave PHC–SYS Offset KPIs | |
|---|---|
| chrony | phc2sys |
| Mean Δchrony offset: −0.06 ns Std Δchrony offset: 43.98 ns Max |Δchrony|: 364.00 ns | Mean ΔPHC–SYS offset: 8.32 ns Std ΔPHC–SYS offset: 1005.02 ns Max |ΔPHC–SYS|: 8760.00 ns |
| Target 1—Master | Target 2—Client |
|---|---|
| Begin—first window events index and timestamps of microsecond-level order | |
| [# 1] 2026-03-27 06:13:57.063208 | mono=2_588_949_333_209 ns [# 2] 2026-03-27 06:14:07.062766 | mono=2_598_948_890_686 ns [# 3] 2026-03-27 06:14:17.062328 | mono=2_608_948_452_926 ns [# 4] 2026-03-27 06:14:27.061887 | mono=2_618_948_012_109 ns | [# 1] 2026-03-27 06:13:57.063205 | mono=2_659_873_353_962 ns [# 2] 2026-03-27 06:14:07.062766 | mono=2_669_872_915_213 ns [# 3] 2026-03-27 06:14:17.062325 | mono=2_679_872_474_142 ns [# 4] 2026-03-27 06:14:27.061886 | mono=2_689_872_034_951 ns |
| Between—windows—events index and timestamps of microsecond-level order | |
| [# 224] 2026-03-27 06:51:06.963686 | mono=4_818_849_811_088 ns [# 225] 2026-03-27 06:51:16.963238 | mono=4_828_849_363_010 ns [# 226] 2026-03-27 06:51:26.962790 | mono=4_838_848_914_753 ns [# 227] 2026-03-27 09:20:36.560471 |mono=13_788_446_595_836 ns [# 228] 2026-03-27 09:20:46.560023 |mono=13_798_446_147_434 ns [# 229] 2026-03-27 09:20:56.559571 |mono=13_808_445_695_865 ns | [# 224] 2026-03-27 06:51:06.963685 | mono=4_889_773_833_849 ns [# 225] 2026-03-27 06:51:16.963238 | mono=4_899_773_386_537 ns [# 226] 2026-03-27 06:51:26.962790 | mono=4_909_772_938_937 ns [# 227] 2026-03-27 09:20:36.560470|mono=13_859_370_618_499 ns [# 228] 2026-03-27 09:20:46.560022|mono=13_869_370_170_214 ns [# 229] 2026-03-27 09:20:56.559573|mono=13_879_369_721_404 ns |
| End—second window events index and timestamps of microsecond-level order | |
| [# 469] 2026-03-27 10:00:56.451506 |mono=16_208_337_630_749 ns [# 470] 2026-03-27 10:01:06.451055 |mono=16_218_337_179_418 ns [# 471] 2026-03-27 10:01:16.450607 |mono=16_228_336_731_392 ns [# 472] 2026-03-27 10:01:26.450153 |mono=16_238_336_277_890 ns | [# 469] 2026-03-27 10:00:56.451505|mono=16_279_261_653_997 ns [# 470] 2026-03-27 10:01:06.451055|mono=16_289_261_203_798 ns [# 471] 2026-03-27 10:01:16.450604|mono=16_299_260_752_872 ns [# 472] 2026-03-27 10:01:26.450155|mono=16_309_260_303_102 ns |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Burlibaşa, A.; Epure, S.; Culea, M.; Dache, C.R.; Lungu, C.V.; Marin, G.-A.; Vlad, C. System-Level Offline Time Synchronization Architecture for Distributed Electrical Signal Monitoring Using Raspberry Pi 5. Sensors 2026, 26, 2519. https://doi.org/10.3390/s26082519
Burlibaşa A, Epure S, Culea M, Dache CR, Lungu CV, Marin G-A, Vlad C. System-Level Offline Time Synchronization Architecture for Distributed Electrical Signal Monitoring Using Raspberry Pi 5. Sensors. 2026; 26(8):2519. https://doi.org/10.3390/s26082519
Chicago/Turabian StyleBurlibaşa, Adriana, Silviu Epure, Mihai Culea, Cristinel Radu Dache, Cristian Victor Lungu, George-Andrei Marin, and Ciprian Vlad. 2026. "System-Level Offline Time Synchronization Architecture for Distributed Electrical Signal Monitoring Using Raspberry Pi 5" Sensors 26, no. 8: 2519. https://doi.org/10.3390/s26082519
APA StyleBurlibaşa, A., Epure, S., Culea, M., Dache, C. R., Lungu, C. V., Marin, G.-A., & Vlad, C. (2026). System-Level Offline Time Synchronization Architecture for Distributed Electrical Signal Monitoring Using Raspberry Pi 5. Sensors, 26(8), 2519. https://doi.org/10.3390/s26082519

