Skip to Main Content Skip to Search
Product Documentation

Detection of Valid Transmission Data with Frame Synchronization

This Simulink model shows how to process complex data in transmission signals of a communication system.

What Is Frame Synchronization?

In communication systems, frame synchronization is a method of finding valid data in a transmission that consists of data frames. To aid frame synchronization, the transmitter inserts a fixed data pattern at the start of each data frame to mark the start of valid data. The receiver searches for the fixed pattern in each data frame and achieves frame synchronization when the correlation between the input data and the fixed pattern is high.

Model Structure

The model contains the following components.

The chart contains the following states, transitions, and MATLAB functions.

Key characteristics of the chart include:

Simulation Results

The sf_frame_sync_controller model does not produce simulation results. The purpose of this example is to explain how to process complex data in a chart.

How the Chart Works

The chart calculates the correlation between the input signal I/Q and the fixed data pattern trainSig. You define trainSig by writing and running a MATLAB script before you simulate the model.

StageSummaryDetails
1Activation of the frame synchronization algorithm

When the chart wakes up, the state look_for_sync activates to start the frame synchronization algorithm.

2Calculation of correlation between the input signal and the fixed pattern

The MATLAB function correlate finds the correlation between the input signal I/Q and the fixed data pattern trainSig. Then, the function stores the complex correlation as corr.

3Calculation of absolute value of the complex correlation

The MATLAB function correlate also finds the absolute value of corr and stores the output as corrAbs. The value of corrAbs is the correlation percentage, which can range from 0 to 100 percent. At 0 percent, there is no correlation; at 100 percent, there is perfect correlation.

4Identification of valid data in a frame

If corrAbs exceeds 50 percent, the correlation is high and the chart has identified the start of valid data in a data frame. The transition from the state look_for_sync to get_payload occurs.

If corrAbs stays below 50 percent after the chart has evaluated 300 data points, the frame synchronization algorithm restarts.

5Storage of valid data in a complex vector

When the correlation is high, the state get_payload activates.

The MATLAB function get_carrier_phase finds the phase angle of the carrier wave and stores the value as phasor. Then, the state multiplies the input signal I/Q with the phase angle phasor and stores each complex product in successive elements of the vector frame.

6Output of valid frame data

After collecting 220 data points, the chart outputs the vector frame to the next block in the model.

7Restart of the frame synchronization algorithm

The state look_for_sync reactivates, and the frame synchronization algorithm restarts for the next data frame.

  


Free Stateflow Interactive Kit

Learn how engineers use Stateflow to model state machines in their Simulink models.


Get free kit

Trials Available

Try the latest version of Stateflow.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS