Communication Technology

 

 

 

 

Synchronization

In the domain of digital communications, establishing the timing sync is the first and the most important steps. It is the essential mechanism that ensures a harmonious exchange of data between a diverse array of devices and systems. From the interaction between mobile devices and cellular networks to the seamless connectivity within WLAN, and the simple yet profound pairing of Bluetooth device and even to wired communication like on-board communication,RS232,USB,LAN etc, each communication paradigm is underpinned by a sophisticated synchronization protocol. In this note, I want to overview on timing sync process of various types of communication. The main purpose of this note is provide readers with high level idea of the synchronization process. Covering the deep technical description of the sync process of not the scope of this note. If you can understand that timing synchroniztion is required in any kind of digital communication regardless of wireless or wired and if this note provide you with motivation to study further, the purpose of this note is fulfilled.

Synchronization between CPU and Memory  Communication

Time synchronization between a CPU and a memory chip, such as RAM, is focused on ensuring that data operations occur at precisely timed intervals, coordinated by a clock signal. In essence, time synchronization in CPU-memory communication revolves around the use of a shared clock signal, careful management of data transfer timings, adherence to latency requirements.

  • Clock Signal: The primary tool for time synchronization is the clock signal. Both the CPU and memory operate on this clock signal, which ensures that their operations are synchronized. This clock is a periodic pulse that dictates the timing of operations.
  • Frequency Matching:The frequency of the clock signal is matched between the CPU and memory. This matching ensures that both components operate in sync, preventing timing-related errors.
  • Data Transfer Timing: Data transfer between the CPU and memory is timed according to the clock cycles. The CPU and memory need to agree on when data is put on the bus (by the CPU) and when it is read (by the memory) or vice versa. This synchronization is crucial to prevent data corruption or loss.
  • Latency Management: The memory has inherent latency in its operations. The CPU is aware of this and waits the necessary clock cycles to complete a memory operation. This wait period is synchronized with the memory's internal clock to ensure that operations are completed at the right time.

Synchronization in RS232  Communication

In RS232 communication(used for serial communication), the key to timing synchronization is the agreement on baud rate and the use of start and stop bits to frame data bits. This approach allows for successful communication even without a shared clock signal, although it does require good clock accuracy and tolerance for minor variations.

  • Baud Rate Agreement: Both the sender and receiver must agree on the baud rate, which is the number of symbols transmitted per second. This agreement on baud rate is essential for timing synchronization, as it determines how long each bit (or symbol) lasts.
  • Bit Duration: Since the baud rate is known and agreed upon, the duration of each bit is also known. For example, at 9600 baud, each bit lasts for approximately 104 microseconds. Both sender and receiver use their internal clocks to measure this duration.
  • Framing: The combination of start bits, data bits, optional parity bits, and stop bits forms a frame. The receiver uses the start and stop bits to frame the data and extract the actual information bits.

Synchronization in LAN Communication

In Local Area Networks (LANs), timing synchronization is crucial for efficient and accurate data transmission. Different mechanisms are employed to achieve this, depending on the network's specific technology and requirements.

  • Ethernet Frame Preamble: The preamble in an Ethernet frame is a sequence of bits used to help the receiving network device synchronize its internal clock with the incoming data. This synchronization ensures that the receiver can accurately read the frame's start and correctly interpret the data
  • Synchronization Bits: In Ethernet LANs, frames start with a preamble that includes synchronization bits. These bits allow the receiving device to synchronize its receiver clock with the sender's clock, ensuring that the frame's bits are correctly interpreted.
  • Clock Recovery: In more advanced networks, such as those using Synchronous Ethernet, the receiving device uses clock recovery techniques to extract timing information directly from the incoming signal. This method ensures precise synchronization even over long distances or through multiple network switches.
  • Network Time Protocol (NTP): While not used for real-time synchronization of data packets, NTP is crucial for ensuring that all devices on a network have synchronized time settings. It's used to coordinate system clocks over a network to a few milliseconds of accuracy.
  • Precision Time Protocol (PTP): PTP is used in networks that require very high precision in time synchronization, such as industrial automation and telecom networks. It synchronizes clocks throughout a network with an accuracy of nanoseconds by exchanging timing messages between a master clock and slave clocks.

Synchronization in USB Communication

USB (Universal Serial Bus) communication also incorporates synchronization. USB achieves synchronization primarily through its packet structure, which includes a sync field at the start of each packet, and through specific encoding methods like NRZI with bit stuffing. Start of Frame packets and isochronous transfer modes also play roles in maintaining timing, especially for periodic or real-time data transfers.

  • Bit-Level Synchronization: USB uses NRZI (Non-Return to Zero Inverted) encoding for data transmission. Each bit is either a 0 or 1, but to ensure synchronization, USB implements bit stuffing. After six consecutive 1s, a 0 is inserted to ensure the receiver can maintain synchronization.
  • Packet-Based Communication: USB data is transmitted in packets. Each packet begins with a sync field, which is a specific pattern of bits that helps the receiver to synchronize its clock with the sender’s clock at the start of each packet.
  • Sync Field: In USB 2.0, for example, each data packet starts with a sync field of 8 bits (80-00 in hex). This field allows the receiver to lock onto the data signal, ensuring that the subsequent data in the packet is correctly interpreted.
  • SOF Packets (Start of Frame): USB uses Start of Frame packets in certain transfer types to provide a timing reference. These SOF packets are sent by the host controller every 1 millisecond (in USB 2.0) and are used to maintain synchronization and timing across USB devices.
  • Clock Recovery: In USB, each device has its own oscillator, but because of the data encoding and the sync field, the receiving device can recover the clock from the incoming data stream. This method avoids the need for a separate clock signal.

Synchronization in Bluetooth Communication

The synchronization in Bluetooth communication happens at the level of clock timing during the inquiry scan procedure.

  • The timing synchronization in this process involves using the native clocks of both devices. The clocks are not directly shared or synchronized over the air; instead, they maintain their own timing. However, they use the timing information exchanged during the inquiry and response to facilitate a successful connection setup.
  • When Device 1 receives the inquiry response from Device 2, it can calculate the clock offset between the two devices. This calculation is based on the timing of the inquiry response relative to its own clock and the expected timing pattern of responses.
  • This clock offset will then be used during the subsequent page (connection) process, where Device 1 will adjust its frequency hopping sequence to match that of Device 2, thus achieving synchronization necessary for a successful communication link.

NOTE : Even though this process is a little bit simpler comparing to other high end wireless communication (e.g, cellular communication), it has most of fundamental concept for synchronization of all wireless protocol. So it would be good for you to look into this procedure in more detail and get some detailed understanding. Check out this note for the details.

Synchronization in WiFi

Timing synchronization happens during the scanning process in WLAN. There are two types of scanning process in WLAN called passive scanning and active scanning. In passive scanning beacon is used for timing sync at MAC layer and in active scanning probe frame is used for timing sync at MAC layer. Before this MAC layer sync happens, there should be PHY layer timing sync first. In both scanning methods, the PHY layer is responsible for the initial synchronization of the signal, which is necessary for any data to be correctly received and processed at the MAC layer. Then, the MAC layer uses the timing information provided in the frames for further synchronization tasks that are essential for proper network operation and coordination with the AP's timing. This two-layer approach ensures that devices are not only able to detect and interpret signals correctly but also able to align their operations with the network's timing for efficient communication and power management

  • Passive Scanning:
    • PHY Layer Synchronization:
      • The PHY layer uses the preamble and Start Frame Delimiter (SFD) of incoming beacon frames to achieve bit-level synchronization. This ensures that the receiver's PHY can properly demodulate and decode the frames sent by the AP.
      • The PHY layer also utilizes the signal's arrival time to adjust for frequency offset and phase noise, allowing for precise signal interpretation.
    • MAC Layer Synchronization:
      • At the MAC layer, the timing synchronization is based on the timestamp contained within the beacon frame. This timestamp is aligned with the AP's internal clock and is used by the client device to synchronize its internal timer for MAC-level operations, such as power-saving mechanisms (DTIM intervals) and coordination of frame transmissions.
  • Active Scanning:
    • PHY Layer Synchronization:
      • When a client device sends out a probe request, the PHY layer of the AP uses the preamble and SFD of the probe request for initial synchronization, just like it does with beacon frames.
      • The PHY synchronization at the AP allows it to receive the probe request accurately and prepare a probe response.
    • MAC Layer Synchronization:
      • The probe response from the AP includes a timestamp, just like a beacon frame. The client device uses this timestamp to synchronize its internal MAC timer with the AP's clock.
      • The round-trip time of the probe request and response can also be used by the client device to estimate the distance to the AP, which can influence network selection decisions.

NOTE : For further details of this process and if you want to deep dive into this topic, refer to WiFi PHY frameMAC frame and Protocol.

Synchronization in Cellular Communication

In cellular communication, timing synchronization is crucial for maintaining the proper functioning of the network and ensuring that users can connect and communicate effectively. The Primary Synchronization Signal (PSS), Secondary Synchronization Signal (SSS), and Physical Random Access Channel (PRACH) play significant roles in this process.

  • Primary Synchronization Signal (PSS):
    • The PSS helps devices to perform initial synchronization with the cell.
    • It is used to achieve frequency and symbol timing synchronization.
    • The PSS is broadcasted periodically by the base station (eNodeB or gNodeB) and is used by the User Equipment (UE) to determine the cell's Physical Cell Identity (PCI) within a group and to synchronize to the cell's downlink timing.
    • The PSS is typically sent over three separate frequencies within the LTE bandwidth to account for different frequency offsets.
  • Secondary Synchronization Signal (SSS):
    • The SSS provides additional information needed to fully identify the cell.
    • Once the UE has detected the PSS, it uses the SSS to determine the exact PCI and to fine-tune the timing synchronization.
    • The combination of the PSS and SSS allows the UE to calculate the frame timing and slot timing, which are essential for decoding the rest of the cell's broadcast information.
  • Physical Random Access Channel (PRACH) Detection:
    • The PRACH is used by the UE to initiate communication with the cell for uplink synchronization.
    • The UE sends a preamble on the PRACH to indicate its presence and to request access to the network.
    • The base station detects this preamble and responds with timing advance information if necessary, which helps the UE adjust its uplink timing for proper alignment with the cell's uplink frame structure.
    • This timing advance ensures that signals from the UE arrive at the base station synchronized with the base station's receive window, taking into account the round-trip delay.
  • Timing Synchronization Process:
    • Initial Cell Search and Synchronization: The UE performs an initial cell search when it powers up or moves into a new area. It detects the PSS and SSS to achieve downlink synchronization.
    • Frame Boundary Detection: Using the PSS and SSS, the UE identifies the frame boundaries and slot structure, which is essential for decoding downlink channels and knowing when to transmit on uplink channels.
    • Uplink Synchronization: For uplink synchronization, the UE uses the PRACH to send a preamble, and based on the network's response, it adjusts its transmit timing to match the network's timing.
    • Maintaining Synchronization: The UE continuously monitors the downlink synchronization signals (PSS and SSS) to maintain proper timing alignment with the cell, which is vital as it moves and experiences different propagation delays.

NOTE : For further details of this process and if you want to deep dive into this topic, Check out following notes :