Main Content

ccsdsTMFrameSynchronizer

Synchronize CCSDS frames

Since R2024a

Description

The ccsdsTMFrameSynchronizer System object™ synchronizes the Consultative Committee for Space Data Systems (CCSDS) frames, as specified in the CCSDS TM Synchronization and Channel Coding – Summary of Concept and Rationale standard CCSDS 130.1-G-3 [1].

To synchronize the CCSDS frames:

  1. Create the ccsdsTMFrameSynchronizer object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

example

frameSync = ccsdsTMFrameSynchronizer creates a default CCSDS telemetry (TM) frame synchronizer System object.

example

frameSync = ccsdsTMFrameSynchronizer(Name=Value) sets properties using one or more name-value arguments. For example, ccsdsTMFrameSynchronizer(FrameLength=1000) sets the number of bits in each frame to 1000.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Synchronization marker attached to each frame, specified as a binary-valued vector.

Tunable: Yes

Data Types: double | logical

Number of bits in one frame, specified as positive integer.

Data Types: double | uint32

Metric for frame correlation, specified as one of these options.

  • "hard-correlation" — Use this option to use the sign of the input soft data to perform correlation.

  • "soft-correlation" — Use this option to use the sign and magnitude of the input soft data to perform correlation.

Data Types: char | string

Normalized correlation threshold to detect a frame, specified as a scalar in the range [0, 1].

For the object to detect a frame, the normalized frame correlation with the synchronization marker must be greater than or equal to CorrelationThreshold.

Data Types: double

Usage

Description

[frames,sofpos,corrmax] = frameSync(code) synchronizes the data in code and returns the synchronized frames in frames, as defined in CCSDS 130.1-G-3 section 9.3.7 [1]. sofpos is the start position of frames and corrmax is the maximum correlation sum for each frame.

Input Arguments

expand all

Input soft data, specified as a column vector.

The length of the vector does not need to be an integer multiple of FrameLength.

Data Types: single | double

Output Arguments

expand all

Synchronized CCSDS frames, returned as a matrix with the same data precision as the input code. The size of the matrix is FrameLength-by-NumFrames, where NumFrames is the number of output frames.

Start of frame position, returned as a row vector with the same data precision as the input code. Length of the vector is equal to NumFrames, where NumFrames is the number of output frames.

Nonpositive sofpos value indicates that the start position of frames is not in the present step call. In this case, the start of current frame is indexed to +1 and the nonpositive sofpos value represents the backtracked offset length to the input in the previous step calls.

The maximum correlation sum for each frame, returned as a row vector with the same data precision as the input code. Length of the vector is equal to NumFrames, where NumFrames is the number of output frames.

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
cloneCreate duplicate System object
isLockedDetermine if System object is in use
resetReset internal states of System object

Examples

collapse all

Perform frame synchronization for 14 transfer frames, each 8192 bits long with an offset of 1000 bits. Use the hard correlation metric.

Generate transfer frames with random data.

numFrames = 14;
frameLen = 8192;
data = randi([0 1],frameLen,numFrames);

Specify the attached synchronization marker (ASM), and attach it to each frame.

ASM = [ 0 0 0 1 1 0 1 0 1 1 0 0 1 1 ...
  1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 1]'; % "0x1ACFFC1D"
SMF = [repmat(ASM,1,numFrames); data];

Add an offset to the synchronized marked frames.

numOffsetBits = 1000;
bitIn = [zeros(numOffsetBits,1); SMF(:)];

Create a CCSDS TM frame synchronization object.

fsObj = ccsdsTMFrameSynchronizer(SyncMarker=ASM, ...
    CorrelationMetric="hard-correlation", ...
    FrameLength=frameLen);

Perform frame synchronization.

[outFrames,sofPos] = fsObj(2*bitIn - 1);

Verify the synchronized frames against the input data frames.

isequal(data,outFrames>0)
ans = logical
   1

Display the synchronized frames start index without ASM.

fprintf("Synchronized frames start index = %f\n",sofPos(1));
Synchronized frames start index = 1033.000000

Perform frame synchronization for 5 transfer frames, each 2126 bits long. Use the soft correlation metric.

Generate transfer frames with random data.

numFrames = 5;
frameLen = 2126;
dataBits = randi([0 1],frameLen,numFrames);

Specify the attached synchronization marker (ASM), and attach it to each frame.

ASM =  [0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1]; % "0x12345"
SMF = [repmat(ASM',1,numFrames); dataBits];

Modulate the data using the qammod function.

modData = qammod(SMF,4,InputType="bit", ...
              UnitAveragePower=true);

Add additive white Gaussian noise (AWGN) to the modulated data.

snrdB = 12;
rxSig = awgn(modData,snrdB,"measured");

Demodulate the noise-added modulated data using the qamdemod function.

demod = qamdemod(rxSig,4,OutputType="approxllr", ...
            UnitAveragePower=true);

Create a CCSDS TM frame synchronization object. Set the correlation threshold to 0.75.

fsObj = ccsdsTMFrameSynchronizer(SyncMarker=ASM, ...
    CorrelationMetric="soft-correlation", ...
    FrameLength=frameLen, ...
    CorrelationThreshold=0.75);

Perform frame synchronization. Specify the soft data in equal portions of 5365 bits each.

codeIn = -demod(:);
chunkLen = 5365;

Find the start of frame position for the entire data.

[frames1,sofPos1,corrMax1] = fsObj(codeIn(1:chunkLen));
[frames2,sofPos2,corrMax2] = fsObj(codeIn(chunkLen+1:end));
sofPos = [sofPos1 sofPos2+chunkLen]
sofPos = 1×5

          21        2167        4313        6459        8605

References

[1] The Consultative Committee for Space Data Systems. TM Synchronization and Channel Coding – Summary of Concept and Rationale. CCSDS 130.1-G-3. Green Book. Issue 3, June 2020.

Extended Capabilities

Version History

Introduced in R2024a