8 Time Alignment of TFO Frames and TFO Messages
28.0623GPPInband Tandem Free Operation (TFO) of speech codecsService descriptionStage 3TS
8.1 Alignment of TFO Frames and TFO Messages for GSM
The relative TRAU Frame phase positions of the two TRAUs using TFO across the A interface are arbitrary and depend on the local timing structure of the relevant BTSs. These BTSs are typically not synchronised. The TFO Protocol can not and does not change this. The clock systems of the transmission channels are typically also not synchronised and octet slips may occur.
TFO Frames and embedded TFO Messages are always exactly aligned with each other and follow the uplink TRAU Frames with a small, negligible, constant delay (Tultfo: some PCM samples).
For the Codec Types GSM_FR, GSM_HR and GSM_EFR the time alignment procedures for the downlink TRAU Frames, as specified in 3GPP TS 48.060 (full rate traffic) and 3GPP TS 48.061 (half rate traffic) on the Abis/Ater interface, are not affected by the TFO procedures on the A interface. For these Codec Types the TRAU shall buffer the received TFO Frames until they fit into the downlink timing as commanded by the local BTS.
For the Codec Types FR_AMR, HR_AMR and FR_AMR-WB the phase of the downlink TRAU Frame depends on the phase of the received TFO Frames. An AMR/AMR-WB TRAU does not follow the Time Alignment procedure, when TFO is established, but sends the received TFO Frames as soon as possible in downlink as TRAU Frames. Therefor the local BTS has to buffer the TRAU Frames accordingly until they fit for the transmission on the air interface.
8.1.1 Time Alignment of TFO Messages in GSM
At start up of the TFO Protocol the first regular TFO Message is aligned to an uplink TRAU Frame in the same way as a TFO Frame or an embedded TFO Message would be aligned (see clause 8.1.2). Then, after that, all regular TFO Messages follow contiguously, without any phase shift in time alignment, until the first TFO Frame needs to be sent (in general after the TFO_TRANS Message). Then, the required number of T_Bits is inserted before the first TFO Frame, see clause 8.1.2. Consequently, all following embedded TFO Messages are always aligned with the TFO Frames in a way, that the first bit of any TFO Messages is placed into the LSB of the first sample of a TFO Frame. Due to this definition, embedded TFO Messages only modify some of the synchronisation bits of the TFO Frames and the EMBED bit.
8.1.2 Time Alignment of TFO Frames to Uplink TRAU Frames
The contents of the Uplink TRAU Frame, received from the BTS via the Abis/Ater Interface, undergo the small, constant delay (Tultfo) required to perform the modifications of the EMBED, Sync and potentially CRC bits, before being forwarded to the other TRAU over the A Interface as TFO Frame. Since this delay is substantially smaller than the delay for the decoded speech signal, the TFO Frames precede the corresponding speech samples. Figure 8.1.2-1 shows the relations. Note that no exact delay value for Tultfo is defined or need to be defined.
Figure 8.1.2-1: Uplink TFO Frame Time Alignment in GSM
In case of AMR-WB with Codec Modes higher than 12.65 kbit/s the lower main 16k part defines synchronisation and control bits, while the upper 16k extension carries only data bits. It is important that these lower and upper part are exactly synchronised to each other on the A-interface. If this is not already the case on the uplink Abis/Ater interface, then the TRAU shall delay the earlier arriving part to achieve the synchronisation.
On the transition between the sending of regular TFO Messages and the first TFO Frame, a sufficient number (up to a maximum of 159) of Time Alignment Bits, also called "T_Bits", are inserted into the LSBs of the PCM samples to align the TFO Frame as described above.
This insertion of Time Alignment Bits (if necessary) is started exactly with the 16th PCM sample after the last bit of the last regular TFO Message (i.e. the TFO_TRANS Message).
Whenever, in a later stage, the phase of the uplink TRAU Frame changes, then again T_Bits need to be inserted between two consecutive TFO Frames or deleted from the tail of the last TFO Frame to ensure proper alignment.
The insertion of T_Bits as a result of timing changes shall occur between TFO Frames and not within TFO Frames.
If the time alignment is necessary while a TFO Message is embedded into a series of TFO Frames, then the TFO Message may be cut into two parts with the T_Bits in between. Therefore, whenever an adjustment of the phase of the TFO Frames is necessary, then one additional TFO Message shall be embedded into the next TFO Frames (after the possibly ongoing TFO Message). If nothing else is to be transmitted, then the TFO_FILL Message shall be used. One TFO_TRANS Message is always embedded into the first TFO Frames. See the following Figure 8.1.2-2:
Figure 8.1.2-2: Time Alignment by inserting T_Bits and embedding one TFO_TRANS Message
8.1.3 Time Alignment of TFO Frames to Downlink TRAU Frames
For the Codec Types GSM_FR, GSM_HR and GSM_EFR the TFO Protocol does not affect the phase position of the downlink TRAU frames.
The phase difference between the received TFO Frames and the downlink TRAU Frames is in general constant, but arbitrary between 0 and 159 PCM samples. The time alignment of the TFO Frames to the downlink TRAU Frames must therefore be managed by buffering the TFO Frames within the receiving downlink TRAU. This can be done in one of two methods:
Method 1: The received TFO Frame is buffered for a period between 0 to 159 PCM samples in addition to the processing delay (Tbfh) required to perform a suitable Bad Frame Handling on parameter level. Transmission of the downlink TRAU Frame may in this case begin prior to receipt of the complete TFO Frame.
NOTE 1: In this first method the overall one way signal delay will be between 30 ms and 10 ms lower than the delay in normal tandem connections.
Method 2: Alternatively the received TFO Frame is buffered for a period between 160 to 319 PCM samples in addition to the processing delay required to perform a suitable Bad Frame Handling on parameter level (Tbfh). Transmission of the downlink TRAU Frame will in this case always begin after the receipt of the complete TFO Frame.
NOTE 2: In this second method the overall one way signal delay will always be up to 10ms lower or up to 10 ms higher than the delay in normal tandem connections.
NOTE 3: The two methods differ in one way signal delay always by exactly 20 ms. Figure 8.1.3-1 highlights the relations for an arbitrarily selected relative phase difference between TFO and TRAU Frames of 80 samples (10 ms). Tbfh is in the order of some PCM samples only, if error concealment is done "in advance" based on the parameters of the previous TFO Frame, before the actual TFO Frame is even received.
Figure 8.1.3-1: Downlink Time Alignment of TFO Frames in GSM
For the Codec Types FR_AMR, HR_AMR and FR_AMR-WB no error concealment is necessary within the downlink TRAU. The received TFO Frames are passed as soon as possible downlink as TRAU Frames, without considering the previous phase of the TRAU Frames.
General: TRAU Frames shall always be sent as complete TRAU Frames.
The transition from normal Tandem Operation to Tandem Free Operation shall be done by inserting the necessary number of T-Bits between the previous – time aligned TRAU Frame – and the new – TFO aligned TRAU Frame. By this the BTS does not loose synchronisation. The signal delay within the TRAU is kept at minimum. The BTS has to buffer the received TRAU Frames until they fit for transmission on the air interface. Time Alignment and phase alignment are discontinued as long as the BTS is in States TFO_MAYBE, TFO_YES or TFO_TERM, see Annex C.
In case TFO is terminated the transition from TFO aligned TRAU Frames back to time aligned TRAU Frames shall be done in the following way: The first TRAU Frames after TFO is terminated shall be sent in exactly the same phase as the TFO aligned TRAU Frames. Then the BTS will re-start the time alignment procedure and command time and phase alignments. Then the necessary number of T-Bits shall be inserted between the TFO aligned TRAU Frames and the time aligned TRAU Frames.
8.2 Time Alignment of TFO Frames and TFO Messages for 3G
There is no requirement for the Time Alignment of TFO Frames and the Iu User Plane. However, all implementation should minimise the transmission delay between Iu User Plane PDUs and TFO Frames in the uplink and the downlink directions.
TFO Frames and embedded TFO Messages shall always be exactly aligned with each other and follow the uplink with minimal delay.
8.2.1 Time Alignment of TFO Messages in 3G
At start up of the TFO Protocol the first regular TFO Message is aligned to the uplink Iu frames in the same way as a TFO Frame or an embedded TFO Message would be aligned (see clause 8.2.2). Subsequently, all regular TFO Messages follow contiguously, without any phase shift in time alignment, until the first TFO Frame needs to be sent (in general after the TFO_TRANS Message). Then, the required number of T_Bits is inserted before the first TFO Frame, see clause 8.2.2.
Consequently, all following embedded TFO Messages are always aligned with the TFO Frames in a way, that the first bit of any TFO Messages is placed into the LSB of the first sample of a TFO Frame. Due to this definition, embedded TFO Messages only affect some of the synchronisation bits of the TFO Frames and the EMBED bit.
8.2.2 Time Alignment of TFO Frames to Uplink Iu Frames
The contents of the Uplink Iu User Plane PDU undergo a variable delay (Tultfo) required to perform the generation of the necessary framing bits (control and Sync) and also to ensure the continuous flow of TFO Frames. It is important that this is optimised to remove the jitter from the uplink Iu frame reception to ensure a constant and continuous play-out of TFO Frames to the distant partner.
On the transition between the sending of regular TFO Messages and the first TFO Frame, a sufficient number (up to a maximum of 159) of Time Alignment Bits, also called "T_Bits", are inserted into the LSBs of the PCM samples to align the TFO Frame as described above.
This insertion of Time Alignment Bits (if necessary) is started exactly with the 16th PCM sample after the last bit of the last regular TFO Message (i.e. the TFO_TRANS Message).
Whenever, in a later stage, it is necessary to alter the play-out timing, then again T_Bits need to be inserted between two consecutive TFO Frames or deleted from the tail of the last TFO Frame to ensure proper alignment.
If the adjustment is necessary while a TFO Message is embedded into a series of TFO Frames, then the TFO Message may be cut into two parts with the T_Bits in between. Therefore, whenever an adjustment of the phase of the TFO Frames is necessary, then one additional TFO Message shall be embedded into the next TFO Frames (after the possibly on-going TFO Message). If nothing else is to be transmitted, then the TFO_Fill Message shall be used. One TFO_TRANS Message is always embedded into the first TFO Frames.
8.2.3 Time Alignment of TFO Frames to Downlink Iu Frames
The Transcoder should wait for the complete reception of a TFO Frame and send a corresponding Iu UP PDU with the minimum buffering delay to perform the required conversion between TFO Frames and Iu UP Frames as defined in clause 5.