.

Wednesday, June 5, 2019

Phase Interpolator Pll In Simulink Computer Science Essay

Phase Interpolator Pll In Simulink Computer Science EssayPhase Locked Loops (PLLs) is a negative feedback system that matches the output frequence to the input frequency. M any(prenominal) applications utilize PLLs such as frequency synthesizers, skew cancellation, acknowledgement clean-up, and clock-data recovery 1.For frequency synthesizers, the goal is to generate a clock at a higher upper to that of a lentoer reference clock. For example, generating a 1 GHz designate from a 100 megahertz reference planetary house. This is a common goal for many optical applications. For example, ongoing work performed by AOSense, a leading research and development company in atomic-level sensing requires clock frequencies well into the hundreds of megahertz and even into the gigahertz range. For this reasons, PLLs, such as the HMC698LP5 from Hittite Microwave be commonly use in their designs. example pll designA basic PLL consist of four main building blockades Phase Frequency Detector (PFD), Charge Pump (CP), Low Pass imbue (LPF), and Voltage Controlled Oscillator (VCO). look 1 is a block diagram of a basic PLL.http//madfeekree.files.wordpress.com/2010/11/basic-pll-block1.png?w=614Figure 1. Basic PLL Block Diagram 2The PFD detects any differences in frame and frequency of the reference and feedback signals and generates an appropriate Up or Down signal. These signals be then passed to the CP, in which, the CP sources current into the spiral filter (Up signals) or sinks current from the loop topology filter (Down signals). The LPF converts the signal into an analog voltage for the VCO, in which the VCO outputs a clock at either a higher faster or slower frequency based on the UP DOWN signals generated by the PD. This process is repeated until the output frequency of the VCO properly matches that of the reference frequency.These blocks were constructed and simulated in MATLAB R2112a Simulink.A. Phase Frequency DetectorAs previously stated, PFD ar devices tha t measures the difference between the reference and feedback clocks. There are two commonly used phase detectors linear and binary. A linear phase detectors output is a trice signal with a varying width. When the feedback signal is severely out of phase with the reference signal, the pulse width is larger compared to when the two signals are close to being similar. In contrast, a binary (bang-bang) phase detectors output is a fixed pulse width. This binary output signifies if the feedback signal arrived primeval or late compared to the reference signal.In this design, a change version of a linear phase frequency detector was implemented in Simulink, as depicted in figure 2. This PFD generates a logic high for the UP signal when the feedback signals rising edge arrives in the lead of the reference signals rising edge for the length of the difference. Similarly, when the feedback singals rising edge arrives after the reference signals rising edge, a logic high is granted for the DOWN signal for the duration of the difference.MSJSUEE 227ProjectReport PicturesFigure 2 PFD.pngFigure 2. Phase Frequency Detector ModelApplying a test signal to both the reference and variable (feedback) inputs and adjusting the feedback signal with some delay, demonstrates the proper functionality of the PFD. This is illustrated in figure 3. The plot is as given from the top down UP, DOWN, Reference, and Variable CLK.The UP and DOWN signals are then federal official to the charge center, which directs the loop filter to increase or decrease in voltage, signifying an increase or decrease of the VCO output signal. But first, a discussion on the charge pump and its dumbfoundling is in order.MSJSUEE 227ProjectReport PicturesFigure 3 PFD Test.pngFigure 3. PFD Test ResultsB. Charge PumpThe charge pump block in figure 1 is designed to convert the UP and DOWN signals into current for the loop filter. When the UP signal is logic high, the charge pump will source current to the loop fil ter and when the DOWN signal is logic high, the charge pump will since current from the loop filter.A circuit representation of a charge pump is given in figure 4 below. From this representation, several key design challenges are noticed. Such as proper current matching from both I1 and I2, parasitical capacitance from the two current sources, and leakage current into and out of the loop filter.MSJSUEE 227ProjectReport PicturesFigure 4 CP.pngFigure 4. Charge Pump CircuitA Simulink copy of a charge pump is given in figure 5. Notice how the DOWN signal is subtracted from the UP signal and then fed into a overhear of 0.001. This gain value represents the current of the two current sources. The delay representsrepresents the current of the two current sources. The delay represents the capacitor, Cp, in figure 4.MSJSUEE 227ProjectReport PicturesFigure 5 CP Block.pngFigure 5. Charge Pump ModelSimulating the charge pump pattern should confront a slowly increasing value as long as th e UP signal is high more often than the DOWN signal. Figure 6 below shows such a scenario as the CP_Out signal slowly ramps up. This signifies that the VCO will speed up to force the reference signal to catch up to the data signal.MSJSUEE 227ProjectReport PicturesFigure 6 CP Test.pngFigure 6. CP Test ResultsC. Loop FilterA loop filter is an entirely passive component device and consist of two capacitors and a resistors as illustrated in figure 7. The loop filter has two branches, the entire path and the proportional path. The integral path is the C2 branch, while the proportional path is the C1 and R branch. As the name implies, the loop filter filters high frequency racket spurs caused by sampling, but this also adds a pole at 1/RC2 1. A resistor in the loop filter provides an isolation phase field from frequency correction.MSJSUEE 227ProjectReport PicturesFigure 7 Loop Filter Circuit.pngFigure 7. Loop Filter CircuitA simulink poseur of a loop filter is given in figure 8 belo w. The input to the loop filter is connected to the output of the charge pump. The mark of the loop filter is to come across a current and convert it into a voltage, jawed the control voltage of the VCO.MSJSUEE 227ProjectReport PicturesFigure 8 Loop Filter Block.pngFigure 8. Loop Filter ModelSimulating the loop filter in Simulink gave the plot in figure 9. Re-examining this figure, there may be a an error in the loop filters output as its a sawtooth waveform. This will be compared to the VCO output plot for proper functionality in the next parting.Figure 9. Loop Filter Test ResultsD. VCOThe final block in figure 1 is the VCO block. Theres a slight modification to the VCO block compared to that in figure 1 repayable to the future use of phase interpolation. Due to this, a phase generator block was required. This phase generator block is given in figure 10.MSJSUEE 227ProjectReport PicturesFigure 10 Phase Generator Block.pngFigure 10. Phase Generator ModelThe purpose of the phas e generator block is to allow various phases for the phase interpolation PLL in the forthcoming section. For this, the signal is limited to 360 degrees and various phases are generated as illustrated in figure 11. This is the final design of the VCO.MSJSUEE 227ProjectReport PicturesFigure 11 VCO Block.pngFigure 11. VCO ModelA common VCO has a single output, known here as CLK_0. However, due to the use of phase interpolation in the second half of this PLL design, 3 other phases were generated. Each phase separated by 90 degrees.The feedback to the PDF is derived from CLK_0 signal that is passed with a relay that generates a clock signal from a sinusoidal signal. The final PLL design for the first potion is given in figure 12.MSJSUEE 227ProjectReport PicturesFigure 12 PLL Block.pngFigure 12. PLL Design Phase 1Testing of the pllTesting of the PLL consisted of a pulse generator at the reference clock input. This signal was set to 50 Hz is mentioned in 3. Figure 13 is a plot of the VC O output (CLK_0). The plot shows that in the beginning, the VCO is attempting to lock and after about 30 seconds, the system locks onto the frequency.MSJSUEE 227ProjectReport PicturesFigure 13- PLL Test Results.pngFigure 13. PLL Phase 1 Test Resultsphase interpolator designA. Theory Behind Phase InterpolatorsPhase Interpolators (PI) is a modified version of a PLL. PIs function by taking a weighted values and multiplying and adding them to two signals shifted in phase at the same frequency. These weighted values are call alpha and beta. Beta equals 1 minus alpha as given in equation (1)(1)Where,B. Binary Phase DetectorThe phase detector used in the PI loop has been modified to act as a bang-bang phase detector instead of a linear phase detector. A modified version of the bang-bang phase detector 4 was used. This modified bang-bang phase detector is given in figure 13i.MSJSUEE 227ProjectReport PicturesFigure 13i- BBPD Block.pngFigure 13i. Modified Bang-Bang Phase DetectorA bang-bang p hase detector is different from a linear phase detector since the output signals are fixed pulses and they signify if the feedback clocks rising edge is early or late. Those early and late signals are then fed into a charge pump, which tells the VCO (by means of a loop filter) to go faster or to slow down.Simulating this modified version of a phase detector was performed in Simulink. The feedback (reference) signal was delayed compared to the DATA clock. This implies that the phase detector outputs a logic high for the previous(a) signal, in which it does.MSJSUEE 227ProjectReport PicturesFigure 13ii- BBPD Test.pngFigure 13ii. Bang-Bang Phase Detector Test ResultsD. Quadrature ClocksQuadrature Clocks are clocks that are separated by 90 degrees. The model to accomplish this was given in figure 11 of the VCO. Testing this with a simple pulse generator input signal provided the plots in figure 14. These plots show four signals that are 90 degrees out of phase with one another.MSJSUEE 2 27ProjectReport PicturesFigure 14- Quad Phases.pngFigure 14. Quadrate PhasesReading from the top of figure 14 to the bottom, the phases are as follows 0, 90, 180, and 270 degrees.E. CounterTo ensure the entire 360 degrees of phases are covered, as given in the VCO, a counter was implemented. For this simulation, an 8-bit counter was used. This implies that for 360 degrees and an 8-bit counter, each degree represents 1.41 degrees of resolution. The importance of this is think to the unit circle. For a count from 0-255, each 64 counts represents a phase shift of 90 degrees.A simple counter was constructed in Simulink using a just three blocks as shown in figure 15.MSJSUEE 227ProjectReport PicturesFigure 15- Counter.pngFigure 15. Counter ModelF. Alpha, Beta, and MUX ValuesTo determine the alpha, beta, and the MUX values, a model was created in Simulink. From section C, an 8-bit counter was created. Of these 8-bits, bits 0-5 represent the alpha bits and bits 6-7 represent the MUX bits. These bits were extracted and then the alpha and the beta values were obtained as mentioned in section A and equation (1). A Simulink model is given in figure 16.MSJSUEE 227ProjectReport PicturesFigure 16- Alpha Beta Mux.pngFigure 16. Alpha, Beta, and MUX ExtractorTesting the model in figure 16 revealed an interesting note. This model was taken directly from 3 and when a simple test of this block was performed, the MUX bits appeared to be out of the ordinary. It was expected that the MUX values would range from 0-4 as two bits were extracted, giving a four step ramp. However, the four step ramp ranged from 0-192. This is shown in figure 17.The next section discusses the MUX switching and this is why the issue was noticed. Because of this, this discussion will take place in the next section.MSJSUEE 227ProjectReport PicturesFigure 17- Alpha Beta Mux Test.pngFigure 17. Alpha, Beta, and MUX Test ResultsG. MUX ModelSince a PI requires the use of two different phases simultaneously, a MU X is required to give the proper signals. In Simulink, a MUX was generated using multiport switch components. The model is given in figure 18 below.As there are four inputs, the read line is required to be a value of 1, 2, 3, or 4 in order to properly get the desired line. The distribute line is driven by the 2-bit MUX value that was obtained in the previous section, F. This implies that the MUX values should be a 1, 2, 3, or 4 value and not the values that are shown in figure 17. The four steps are correct, but further work is need to properly generate the appropriate destine lines.Due to the MUX select lines not functioning properly, the final PI PLL design was unable to be properly tested. A solution to this problem is to write a piece of enrol that reads the MUX line and then determines the proper, 1, 2, 3, or 4 value.MSJSUEE 227ProjectReport PicturesFigure 18- MUX Model.pngFigure 18. MUX ModelH. Finall PLL Block and TestingThe final design of the complete PLL with the phas e interpolator PLL is given in figure 19. As stated in MUX Model section, the MUX line had a critical error that prevented the PLL from being properly simulated. This error was due to the MUX select lines not being of the proper value. If given more time, code would be implemented to resolve this problem or the use of Simulink blocks to generate the proper values for the select lines.MSJSUEE 227ProjectReport PicturesFigure 19- Final PLL Block.pngFigure 19. Final PLL Design with PIFor simplicity do to time constraints, a simple test was performed on the final design. Since the MUX select lines are not function properly, a constant value was fed into the select lines to manually pick the phases. When the select line was set to 1 for both, the represent in figure 20 was generated.MSJSUEE 227ProjectReport PicturesFigure 20- Final PLL Test MUX 11.pngFigure 20 PI Output/Feedback Pre RelayFigure 20 shows that the PLL is working to a degree. Unfortunately, it fails to be properly tested.C onclusionPLLs are commonly used devices in a wide range of applications. In this design, a phase interpolator version of a PLL was examined. Although the complete model was successfully constructed in Simulink, the final design was unable to be properly tested. This was due to the malfunction of the MUX select lines that prohibited the simulation to run. A quick work around was implemented, which meant the manual adjustment of the MUX select lines.

No comments:

Post a Comment