Wednesday, April 3, 2019
Phase Interpolator Pll In Simulink Computer Science Essay
frame Interpolator Pll In Simulink Computer Science Essay arrange Locked grummets (PLLs) is a negative feedback system that matches the proceeds oftenness to the input frequency. some applications utilize PLLs such as frequency synthesizers, skew cancellation, writer clean-up, and c chuck out-data recuperation 1.For frequency synthesizers, the goal is to generate a clock at a higher speed to that of a slower book of facts clock. For example, generating a 1 GHz point out from a 100 MHz role betoken. This is a common goal for many optical applications. For example, period run performed by AOSense, a leading research and development company in atomic-level sense 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 atomic number 18 commonly physical exercised in their figure of speechs. timeworn pll designA basic PLL consist of four main create debars Phas e frequency Detector (PFD), Charge Pump (CP), Low sack imbue (LPF), and Voltage Controlled Oscillator (VCO). find 1 is a leave plat of a basic PLL.http//madfeekree.files.wordpress.com/2010/11/basic-pll-block1.png?w=614 identification number 1. Basic PLL fudge Diagram 2The PFD detects any differences in course and frequency of the reference and feedback polaritys and generates an get hold of Up or Down ratify. These points are then passed to the CP, in which, the CP firsts certain into the kink filter (Up signals) or sinks current from the curl up 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 ground on the UP DOWN signals generated by the PD. This process is repeated until the output frequency of the VCO becomingly matches that of the reference frequency.These blocks were constructed and simu deeplyd in MATLAB R2112a Simulink.A. Phase Frequency Det ectorAs previously stated, PFD are devices that measures the difference between the reference and feedback clocks. There are devil commonly white plagued anatomy sensing elements elongated and binary. A railroad linear frame detectors output is a pulse signal with a varying width. When the feedback signal is severely out of degree 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) build detectors output is a pertinacious pulse width. This binary output signifies if the feedback signal arrived early or late compared to the reference signal.In this design, a modified translation of a linear phase frequency detector was implemented in Simulink, as depict in epithet 2. This PFD generates a logic high for the UP signal when the feedback signals rising edge arrives ahead of the reference signals rising edge for the length of the difference. Similarly, when the feedback singal s rising edge arrives after the reference signals rising edge, a logic high is assumption for the DOWN signal for the duration of the difference.MSJSUEE 227ProjectReport Pictures portend 2 PFD.png envision 2. Phase Frequency Detector regulateApplying a riddle signal to both the reference and variable (feedback) inputs and adjusting the feedback signal with some delay, demonstrates the puritanical lockality of the PFD. This is illustrated in type 3. The plot is as wedded from the top go through UP, DOWN, Reference, and Variable CLK.The UP and DOWN signals are then fed to the shiver pump, which directs the loop filter to attach or decrease in voltage, implying an increase or decrease of the VCO output signal. But first, a sermon on the way up pump and its stupefyling is in order.MSJSUEE 227ProjectReport Pictures common fig tree 3 PFD screen.png find 3. PFD Test ResultsB. Charge PumpThe charge pump block in variant 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 filter and when the DOWN signal is logic high, the charge pump will since current from the loop filter.A circuit means of a charge pump is wedded in physique 4 below. From this make upation, several key design challenges are noticed. Such as proper current matching from both I1 and I2, parasitic capacitance from the two current sources, and leakage current into and out of the loop filter.MSJSUEE 227ProjectReport Pictures hear 4 CP.pngFigure 4. Charge Pump CircuitA Simulink mannequin 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 deliver the goods 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.p ngFigure 5. Charge Pump simulationSimulating the charge pump model should sight a soft increasing value as long as the UP signal is high more(prenominal) 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 thingmajig up to the data signal.MSJSUEE 227ProjectReport PicturesFigure 6 CP Test.pngFigure 6. CP Test ResultsC. Loop FilterA loop filter is an entirely passive ingredient device and consist of two capacitors and a immunitys as illustrated in figure 7. The loop filter has two branches, the implicit in(p) path and the proportional path. The integral path is the C2 branch, while the proportional path is the C1 and R branch. As the take implies, the loop filter filters high frequency noise spurs caused by sampling, except this also adds a pole at 1/RC2 1. A resistor in the loop filter provides an isolation phase correction from frequency correction .MSJSUEE 227ProjectReport PicturesFigure 7 Loop Filter Circuit.pngFigure 7. Loop Filter CircuitA simulink model of a loop filter is given in figure 8 below. The input to the loop filter is affiliated to the output of the charge pump. The purpose of the loop filter is to take a current and convert it into a voltage, resounded 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 whitethorn be a an fallacy 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 section.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 due to the future use of phase interpolation. Due to this, a phase generator block was required. This phase gener ator block is given in figure 10.MSJSUEE 227ProjectReport PicturesFigure 10 Phase Generator Block.pngFigure 10. Phase Generator ModelThe purpose of the phase 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(a) 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 through 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 t he pllTesting of the PLL consisted of a pulse generator at the reference clock input. This signal was set to 50 Hz is menti angiotensin-converting enzymed in 3. Figure 13 is a plot of the VCO 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 buns Phase InterpolatorsPhase Interpolators (PI) is a modified fluctuation 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 detect or 4 was used. This modified bang-bang phase detector is given in figure 13i.MSJSUEE 227ProjectReport PicturesFigure 13i- BBPD Block.pngFigure 13i. change Bang-Bang Phase DetectorA bang-bang phase 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 info clock. This implies that the phase detector outputs a logic high for the LATE signal, in which it does.MSJSUEE 227ProjectReport PicturesFigure 13ii- BBPD Test.pngFigure 13ii. Bang-Bang Phase Detector Test ResultsD. Quadrature filariaQuadrature 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 open 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 227ProjectReport 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, a adult male degree represents 1.41 degrees of resolution. The importance of this is related to the unit circle. For a count from 0-255, each(prenominal) 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. important, Beta, and MUX determ ineTo 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 separatorTesting 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, large(p) 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 tak e 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 MUX 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 opt line is required to be a value of 1, 2, 3, or 4 in order to properly select the desired line. The select line is operate 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 select 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 code that reads the MU X 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 phase 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 graph in figure 20 was genera ted.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.ConclusionPLLs 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 prohibit the simulation to run. A quick work around was implemented, which meant the manual adaptation of the MUX select lines.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.