In VoD systems the errors and delay variations such as jitters
introduced in networks have been an issue for the end-to-end QoS.
Real-Time services require
specific constraints regarding the rate of errors acceptable in order
to have a guaranteed QoS. The pattern of the video streams, either CBR
or VBR, transmitted by the encoder of a VoD server gets modified by the
delay variation of the packet networks, such as Internet or ATM network,
due to the network load and contention, and the delay is no longer
constant as it would be in a cable TV network. We, hence, need a recovery
system for synchronization between the server and the client in order to
guarantee the QoS. In this paper, the main focus will be on the study of
synchronization recovery using Phase-Locked Loop(PLL) in the decoder part
of a VoD system for MPEG-2 Transport Streams over ATM AAL5. |
Due to network jitters, the packets suffer a stochastic delay during transport over the packet network and arrive at their destination with stochastic interarrival times. Hence, at the receiver side it is necessary to recover the clock frequency of the data source. Realizing that there is no timing information provided in AAL5, we need to implement a clock recovery mechanism consisting of a elastic buffer and a feedback loop. The basic idea of this feedback control, or namely Phase-Locked Loop(PLL), has been studied for years in analog and digital circiuts that receives analog signals and bit streams respectively. In this paper, possible approaches to the synchronization recovery mechanism will be studied and simulated for a software decoder in the client side of a VoD system. These differ from classical PLL's feedback mechanism as it locks on packets instead of bits.
The following figure shows the general architecture of VoD service over the ATM network and Internet. In the case of ATM network the MPEG-2 Systems Layer is mapped onto the AAL5, and the TS stream format is supported for CBR/VBR transmission.
The ATM Adaptation Layer5(AAL5) has 48 bytes of payload in the SAR-PDU, but 8 bytes trailer at the end of the CPCS-SDU or CPCS-PDU payload (188 bytes of 1 MPEG-2 TS packet). Therefore, 5 ATM cells are needed for 1 MPEG-2 TS packet and the last cell will be partially filled. Another alternative would be to transport 2 MPEG-2 TS packets in 8 completely filled ATM cells. This is actually the default size that all equipment shall support in order to ensure a base level of interoperability[10]. AAL5 provides CRC-32, but there is no provision for timing recovery mechanism [11].
In the ATM Forum's specification for Video on Demand there is no SSCS: the MPEG-2 Layer(Transport Stream) is mapped directly onto the AAL Layer(AAL5).
For the receiver to recover the system time clock information correctly, the interarrival times of the Program Clock References(PCR) at the MPEG-2 decoder must match the interarrval times of the PCRs entering the AAL5 at the source; otherwise, the receiver needs to compensate for the induced PCR packetization and network jitter before delivering the bit stream to the decoder[10]. The ATM Forum VoD Spec. requires the receiver to remove the inherent PCR packetization jitter of 1 TS packet, caused by allowing the PCR to occur in any Transport Packet within the AAL5-SDU.
Figure 1 below shows a diagram of the video client model in a VoD system [8]. It consists of four sections, namely reception, demultiplexing, decoding, and presentation.
The reception section receives AAL5 PDU(Protocol Data Unit)s from the network. The size of the network interface is of several PDUs. In some digital set-top-boxes the size is only 376 bytes to minimize cost (8 ATM cells using AAL5). This size prevents the server from sending larger PDUs[8]. A smoothing buffer follows after the network interface, whose mission is to supress the jitter introduced in the network. The PLL driven by the smoothing buffer occupancy is to remove the jitters accumulated in the server and network and caused by the independent clocks used in the server and the client. The output of the smoothing buffer is a MPEG-2 TS(Transport Stream) which is demultiplexed and decoded in the following sections. The presentation section plays the final output from the whole system, and this is where the subjective QoS measurements are taken. This Video Client Model is controlled by the two subsystems, namely the PLL and the Timebase Recovery system. The Timbase Recovery system generates different levels of synchronization from the PLL signal and the timestamp inside the incoming video stream. The duty of the Error Concealment system is to take appropriate actions in the case of error conditions(i.e. buffer overflow, underflow, etc). Some parameters of this model can be scaled depending on the type of video client model used. Memory constraints in digital set-top-boxes can be avoided in software-based implementation[8].
As the starting point of the synchronization recovery a G/D/1/n (generic arrival, deterministic service, single server, and size n buffer) queueing system was designed and implemented to simulate the PLL feedback mechanism. The generic arrival usually represents a slotted system like the ATM network; hence, the Gamma distribution function was used to generate random numbers which corresponds to the interarrival times of the incoming PDUs in the real world. The deterministic service time associates to the server(demux and decoder) in the client or receiver side. After the feedback mechanism enters its stable mode or the PLL gets locked, this service time is no longer a constant and is to be changed with respect to the PLL's output signal which corresponds to the actual frequency of the transmitter.
In order to allow an initial adjustment of the receiver clock, the following assumptions were made.
As mentioned above, for generating jittered interarrival times the gamma distribution function was used. One important assumption made for the simulation is that the maximum amplitude of the jitter on the packet interarrival times must be smaller than half the mean sending period(this condition excludes networks where packets arrive out of sequence). If this condition is not satisfied, the jittered interarrival times will be distributed from zero over a wide range which causes the situation that the PLL is impossible to acquire its lock mode.
In general the jitter is considered as a part of delay. The delay experimented by the N th packet consists of a fixed constant delay(caused by propagation, transmission, and switching) and a jitter which is variable and can be modeled as a random variable[7]. The probability distribution of the fixed and variable components of delay is ploted in the figure below.
Figure 5 shows the basic PLL diagram. One of the most intriguing capabilities of PLL is its ability to suppress noise superimposed on its input signal. Even if the input signal is buried in noise, almost no noise will be noticeable in the output of the loop filter(with low enough corner frequency), and the DCO will operate in such a way that the phase of the PLL's output signal is equal to the average phase of the input signal. As we know, the noise at the input causes the zero crossing(for sinusoidal signals) to be advanced or delayed in a stochastic manner, and this can be seen as same as the network jitter imposed on the incoming PDUs.
The PLL's mission is to track the actual frequency of the incoming PDUs. It should be noted that since we are dealing with the simulation which can mainly be used for the software implementation of PLL, all the variables were chosen in the software point of view in order to relate the PLL theory to the study of synchronization recovery in a VoD system. In other words, the major restriction that applies to the implementation of Software PLL is the execution period to be short enough as compared to the time needed for each PDU's arrival. Each component in the PLL diagram was designed and implemented as the following:
The implemented PLL is driven by the interarrival times between incoming PDUs. The Phase Detector first detects the phase error by taking the difference between the interarrival times of the incoming PDUs and the output signal of the PLL, which is relevant to the interarrival time, generated from the Digitally Controlled Oscillator. If we assume that the input signal and the PLL's output signal are the same at the initial state, whenever there is a change in the frequency of the input signal, the Phase Detector generates a phase error: it simply means that if there is no phase error, then the frequencies are the same, and the PLL is said to be locked.
The phase error is sent to the phase error averager of size N, which can be seen as a FIFO buffer. This averaging reduces phase change steps by a factor of approximately N compared to no averaging. As a result, the phase error envelope is also reduced; however, it increases the error pull-in transients because the loop response is slower. The averaging also ensures that frequency step changes are about the same as without PCR discontinuities(at intervals shorter than the loop time constants). In this simulation the maximum averager size that could be used to acquire the lock mode was 4. When the size was greater than 4, then the PLL was not able to acquire a lock mode, and the phase error increased linearly with the oscillating behavior. This is due to the fact that a phase error at an instance is not reflected at the output of the averager at the same instance, and this causes the PLL to be out-of-lock. The maximum allowable size of the averager was found to be implementation specific.
The averaged phase error is then sent to the digital loop filter. For a PLL there exists almost always a difference between the incoming PDUs' frequency and the free-running frequency of DCO(in this case the referece clock initially received). This difference may be due to an actual difference between the transmitter and receiver clock or it may be due to a Doppler shift [3]. Therefore a 2nd order filter was chosen, which contains an integrator being capable of compensating this difference in such a way that no steady-state phase error remains. The architecture of the common 2nd order filter chosen for the simulation is shown in Figure 4.
The static phase error from the loop filter enters the DCO. The Z-transform representation of the DCO is
The following figures show the PLL's tracking action.
When the jitter is introduced in the network, the incoming PDUs' interarrival time fluctuates minimally from the initial clock frequency of the transmitter received as a control packet at the beginning. This frequency is set as the free-running frequency of the PLL in the initial stage. Again, with small deviations the PLL acquires its lock mode as shown below (the shape parameter alpha for gamma distribution was set to 2).
For both Figure 8.1 and 8.2 no error averager was used. The following figure shows the case when the size of the averager is 3.
When the PLL is tracking the frequency of the incoming PDUs, the phase error also deviates as the frequency error. This is plotted in Figure 8.4 for initial phase offset of 1.0 usec.
Once the PLL is locked, the output of the PLL is fed into the Timebase recovery system which drives the demux and decoders as described before in Figure 3.
In this paper, a possible feedback mechanism using software PLL was simulated for incoming PDUs with jitter. The result is encouraging. As seen above the PLL's tracking action showed that after a certain period of time, depending on the variance on jitter, the PLL eventually track the actual frequency of the transmitter, under the assumptions made previously. This algorithm can be apllied to most of packet networks with no timing provision at the client side.
The author would like to thank Javier Zamora and Jae-Beom Lee for their guidance and valuable suggestions.
You can download the simulation kit with PLL for educational purpose. This kit can be used to simulate jitter and PLL analysis with G/D/1/n queueing system driven by interarrival times of PDUs. All codes are heavily commented, and simple to follow. The C/C++ codes perform the actual simulation, and the m files are to be used in Matlab 4.2c in order to view and analyze the outputs. This m file, PLLchecker.m, creates an easy to use GUI for analyzing both frequency and phase errors generated during the simulation run time. The C++ codes are tested on SGI IRIX 5.3. In order to run the m file you need to set the path to the file before executing in Matlab 4.2c(i.e. >>path(path,'/homes/mjp/project/src') ). For further information about the input parameters and calculation used during the simulation, please refer to README file in "src" directory.
In order to download sync.tar.gz (1.78M), the complete software, for the simulation, please send an e-mail to the author at mjp@ctr.columbia.edu for permission to use.
[1] Roland E. Best, Phase-Locked Loops , McGraw-Hill, 2Ed, 1993
[2] W. C. Lindsey, C. M. Chie, " A survey of Digital Phased-Locked Loops, " Processings of the IEEE, Vol. 69, No. 4, April 1981
[3] C. E. Holborow, " Simulation of Phase-Locked Loop for processing jittered PCRs, " ISO/IEC JTC1/SC29/WG11, MPEG94/071, March 1994
[4] H. Meyr, G. Ascheid, Synchronization in Digital Communications , Wiley series in Telecommunications, Vol.1, 1990
[5] M. E. Nilson, " Clock recovery using jittered timestamps, " ISO-IEC/JTC 1/SC29/WG11, MPEG94/145, March 1994
[6] M. D. Prycker, M. Ryckebusch, P. Barri, " Terminal syncronization in asynchronous networks, " ICC '87 Seattle, June 1987
[7] Javier Zamora, " Issues of Videoservices over ATM, " CTR Technical Report No. 405-95-11, Center for Telecommunications Research, Columbia University, New York, May 1995
[8] Javier Zamora, Stephen Jacobs, Alexandros Eleftheriadis, Shih-Fu Chang and Dimitris Anastassiou, " A Practical Methodology for Guaranteeing QoS for Video on Demand, " CTR Technical Report No. TR-447-96-13, Center for Telecommunications Research, Columbia University, New York, 1996
[9] ATM_Forum/af-saa-0049.001 " Audiovisual Multimedia Services: Video on Demand Specification 1.1, " 1996
[10] ATM_Forum/96-1575 " Audiovisual Multimedia Services: VBR MPEG-2 Specification, " 1996
[11] ITU-T Recommendation I.363, " B-ISDN ATM Adaptation Layer(AAL) Specification, " March 1993
[12] Xavier G. Adanez, Adrea Basso, Jean-Pierre Hubaux "Study of AAL5 and a New AAL Segmentation Mechanism for MPEG-2 Video over ATM," TCOM Laboratory, Telecommunication Group, Swiss Federal Institute of Technology, 1996