Skip to content

Full electronics design, simulation, and analysis of phase synchronization between two arbitrary out of phase signals, ensuring phase alignment without altering their frequency components.

License

Notifications You must be signed in to change notification settings

TeslaNeuro/Phase-Synchronizer

Repository files navigation

Phase Synchronizer

Update

  • Adding more to this repo so keep posted !
  • Old code used needs tweaking and adjustments as it is a simplified version of a proof of concept script so use at your own discretion.
  • Working on a rev.B ! I aim to create it for scalability and performance reasons !
  • Goal is to make it robust to handle worst case scenarios !

Project Overview

The Phase Synchronizer is a system designed to detect, synchronize, and adjust the phase of two arbitrary out of phase signals without modifying their frequency components. This project implements phase synchronization techniques to ensure that the relative phase between signals is maintained consistently, improving stability and performance in time-dependent systems such as neural signal processing of ENG/ECG bio-signals. The goal for this project is simplicity and cost-effectiveness, allowing quick hardware integration for various electronics engineers. The industry most commonly uses a PLL system to achieve this but the problem of PLLs are the use of oscillators which alter the signal frequency components down the chain making it difficult to process important data or information accurately.

Typical considerations

It’s essential to maintain stability in the system after synchronization. Oscillations, noise, or disturbances can lead to drifting of the phase relationship, so a robust feedback mechanism may be needed to keep the signals synchronized over time. Thus from a system or high-level FIFO or first in first out mechanisms are prefered which can yield great results.

Key Features

  • Phase Detection: Automatically identifies the phase difference between two signals.
  • Phase Synchronization: Aligns the phase of the second signal with the first, ensuring phase lock.
  • Phase Shift Correction: Adjusts any misaligned signals, resolving phase errors effectively. (In reality there will be uV-mV of noise floor still when Va + Vb is combined)
  • Frequency Integrity: Maintains the frequency of both signals during synchronization.
  • Closed-loop control: Continuously monitors and corrects phase shifts to maintain stable synchronization over time.

Tools and Technologies

  • Proteus: Used for simulating and analyzing the phase synchronization process for prototyping purposes.
  • KiCAD: Used for designing the main circuit and sub-circuits, as well as BoM, PCB, Schematic and Mechanical drawings.
  • Arduino IDE: Used for writing basic core embedded firmware and algorithms in C/C++ for simple microcontrollers.
  • Analog Adjustable Filters: A core mechanism for frequency independent phase correction.
  • Digital Signal Processing (DSP): For precise phase detection and control.

How It Works

The system works by first detecting the phase difference between two incoming signals. A control loop then generates the necessary adjustments to bring the signals into phase alignment without changing their frequency. This is particularly useful for applications like telecommunication systems, audio processing, biomedical ENG/ECG analysis, and time-sensitive data transmission.

Through precise time delay measurement and phase shift mapping, the system should ideally aleviate any delay errors. The process requires one signal to be phase compensated (Lead/Lag) at a time, this is highly imperative.

Things to consider in your application

Not every implementation is perfect similar to other electronics circuits it needs to be optimised and further tested/improved to achieve desired outcomes.

  • Stability, Crosstalk & Noise
  • Signal Integrity
  • Cost
  • Space
  • Reliability

At higher frequencies the system becomes less reliable and needs a complete re-design to achieve better phase correction. Thus a different approach and method may need to be considered as well. In essence phase compensation and accurate detection are two seperate things you will have to alter and re-define for better results. Main problem with the current setup is the two signals must have the same frequency and amplitude which would not be ideal for most arbitrary scenarios and random signal behaviour. I suggest modelling the high-level system in MATLAB and then as you start understand the physical behaviour of the system you can always scale up.

Applications

  • Telecommunication Systems: Maintaining signal coherence in wireless and wired transmissions.
  • Audio Processing: Ensuring phase-aligned audio playback from multiple sources.
  • Signal Processing: Synchronizing clock signals in digital electronics for better data integrity.

Example Proof of Concept PCB Prototype Rev.A

  • As you can probably tell back in 2022 this was my first very rushed modular PCB but still functional LOL!
  • Used BNC connectors when working with RF frequency signals in my case i want to test low-frequency signals (100Hz).
  • May need a signal generator or oscilliscope with phase shift function, otherwise use passive or active filters.

image

License

This project includes firmware, software, hardware designs, and integration components and is licensed under the Custom License Agreement.

  • Non-Commercial Use: You may use, modify, and distribute this project for non-commercial purposes.
  • Commercial Use: To use this project for commercial purposes, please contact the author at [arshiakeshvariasl@gmail.com] to obtain full permission rights and discuss licensing terms.

See the LICENSE file for full licensing details.

Additional Notes

Should you want to use/modify/edit/reference/get creative inspiration from it for commercial, corporate and company needs you must gain full permission of usage and discuss licensing from myself. Otherwise, Feel free to play around with the code to make it custom to your own requirements.

Code can be improved for better error handling or detection ! You are welcome to contact me should you have any general and technical questions.

About

Full electronics design, simulation, and analysis of phase synchronization between two arbitrary out of phase signals, ensuring phase alignment without altering their frequency components.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages