Sinusoidal phase-locked loop circuit, system and oscilloscope realized by frequency pulling effect
The sinusoidal phase-locked loop circuit, which utilizes the frequency pulling effect, solves the problem of high-cost virtual oscilloscopes and provides a low-cost, self-assembled and modifiable virtual oscilloscope, achieving a stable triggering circuit and efficient spectrum analysis function.
Patent Information
- Application Number
- CN202411677120.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2044-11-22
AI Technical Summary
Professional learners and hobbyists currently face difficulties in purchasing high-cost oscilloscopes and virtual experimental instruments. Furthermore, highly integrated virtual instruments are not conducive to learners' understanding of their principles, and there is a lack of low-cost virtual oscilloscope design solutions that can be assembled and modified independently.
A sinusoidal phase-locked loop circuit that utilizes the frequency pulling effect includes an oscillator, a phase loop, an amplitude loop, an analog multiplier, and a coupling network. Through a phase detector, a proportional-integral circuit, and a voltage-controlled oscillator, it achieves a low-harmonic sinusoidal wave output for use in the trigger circuit and spectrum analysis of a virtual oscilloscope.
It reduces the cost of virtual oscilloscopes, provides stable triggering circuits and efficient spectrum analysis functions, and is suitable for learners and hobbyists to assemble and modify themselves without increasing the size and weight of the instrument.
Smart Images

Figure CN119766230B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of phase-locked loop circuit, and particularly relates to a sine wave phase-locked loop circuit, system and oscilloscope realized by frequency pulling effect. BACKGROUND
[0002] Electronic information is a very practical subject, and professional learners and amateur enthusiasts need to perform many practical operations to master the technology. Generally, the experiments of electronic information technology have great demand for instruments such as oscilloscopes, logic analyzers, spectrum analyzers and signal generators. However, these professional instruments are often high in cost, and it is difficult for beginners to purchase such instruments.
[0003] Meanwhile, some professional learners and amateur enthusiasts may want to DIY virtual experimental instruments. However, such virtual instruments often adopt a very high integration scheme, which is not conducive to learning the principles of learners and amateur enthusiasts. To reduce the cost of these virtual experimental instruments, and to enable them to be assembled and modified, while ensuring the accuracy of the virtual instruments as much as possible, there is a lack of solutions on the market.
[0004] Therefore, it is necessary to study a circuit design scheme of a virtual oscilloscope which is low in cost, can be assembled and modified by oneself, does not increase the volume and weight, and improves the accuracy as much as possible. The circuit applied to the virtual oscilloscope includes functions related to waveform and spectrum analysis, and professional learners and amateur enthusiasts can also customize the operation logic in the host computer. SUMMARY
[0005] To at least partially solve one of the technical problems existing in the prior art, the purpose of the present application is to provide a sine wave phase-locked loop circuit realized by frequency pulling effect, system and oscilloscope.
[0006] The first technical solution adopted by the present application is:
[0007] A sine wave phase-locked loop circuit realized by frequency pulling effect, comprising an oscillator, a phase loop, an amplitude loop, an analog multiplier and a coupling network; the phase loop comprises a phase detector, a first proportional integral circuit and a voltage-controlled oscillator, and the amplitude loop comprises a detection circuit and a second proportional integral circuit;
[0008] The sine wave generated by the oscillator is input into the phase loop and the amplitude loop respectively;
[0009] In the phase loop, the phase detector performs phase comparison on the phase information of the sine wave and a reference signal, and inputs the comparison result into the first proportional integral circuit for calculation, and the calculation output of the first proportional integral circuit is used to fine-tune the frequency of the voltage-controlled oscillator;
[0010] In the amplitude loop, the detection circuit compares the amplitude information of the sinusoidal wave with the preset PWM signal, and inputs the comparison result into the second proportional integral circuit;
[0011] The frequency-adjustable waveform generated by the voltage-controlled oscillator is multiplied by the output of the second proportional integral circuit through the analog multiplier to obtain a waveform with both frequency and amplitude being adjusted, which is coupled into the oscillator through the coupling network to drag the frequency of the oscillator.
[0012] Further, the oscillator is an RC oscillator or an LC oscillator.
[0013] Further, the detection circuit is replaced by a rectifier circuit.
[0014] Further, the sinusoidal phase-locked loop circuit further comprises a pre-filter connected between the analog multiplier and the coupling network.
[0015] Further, the sinusoidal signal output by the sinusoidal phase-locked loop circuit is multiplied by the external input signal and filtered to obtain the frequency component of the external input signal.
[0016] Further, the capture range of the sinusoidal phase-locked loop circuit can be coarsely adjusted to quickly lock with the fundamental wave or a specific harmonic wave of the external input signal to obtain a trigger signal synchronized with the fundamental wave or the specific harmonic wave of the external input signal.
[0017] Further, the reference signal is a reference square wave output by a microcontroller; and the preset PWM signal is a PWM signal output by the microcontroller.
[0018] A control point is added to the frequency selection network of the oscillator, and the values of the nonlinear resistance, capacitance and inductance are changed by outputting a PWM signal by the microcontroller to coarsely adjust the resonant frequency of the oscillator to achieve frequency coarse adjustment.
[0019] The second technical solution adopted by the present application is:
[0020] A system comprising two sinusoidal phase-locked loop circuits as described above, the two sinusoidal phase-locked loop circuits output two sinusoidal signals with a phase difference of 90 degrees, which are used to obtain the sine component and the cosine component of the frequency component of the external input signal.
[0021] The third technical solution adopted by the present application is:
[0022] An oscilloscope applied with a spectrum analysis circuit, comprising a sinusoidal phase-locked loop circuit as described above.
[0023] The fourth technical solution adopted by the present application is:
[0024] An oscilloscope employing a trigger circuit includes a sine wave phase-locked loop circuit as described above.
[0025] The beneficial effects of this invention are: the sinusoidal phase-locked loop circuit proposed in this invention can output a sinusoidal wave with very low harmonic content and no error in phase and amplitude with the preset value of the microcontroller. It can be used to design a stable trigger circuit and efficient spectrum analysis function for a virtual oscilloscope, which greatly reduces the cost. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following description is provided with accompanying drawings of the relevant technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings described below are only for the purpose of clearly illustrating some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a block diagram of a sinusoidal phase-locked loop implemented using the frequency traction effect in an embodiment of the present invention.
[0028] Figure 2 This is a circuit diagram of the analog multiplier, pre-filter, coupling network, LC oscillator, detector circuit, and filter modules in the virtual oscilloscope spectrum analysis circuit implemented using the frequency pulling effect in this embodiment of the invention.
[0029] Figure 3 The following are examples of applications used in the embodiments of the present invention. Figure 1 Block diagram of the virtual oscilloscope trigger circuit of a sinusoidal phase-locked loop.
[0030] Figure 4 Control in the embodiments of the present invention Figure 3 The flowchart shows the embedded program for the virtual oscilloscope trigger circuit.
[0031] Figure 5 The following are examples of applications used in the embodiments of the present invention. Figure 1 Block diagram of a virtual oscilloscope spectrum analysis circuit with a sinusoidal phase-locked loop.
[0032] Figure 6 Control in the embodiments of the present invention Figure 5 The flowchart shows the embedded program of the virtual oscilloscope spectrum analysis circuit. Detailed Implementation
[0033] The embodiments of the present application are described below in detail, examples of which are shown in the drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only, for the purpose of explaining the present application, and should not be understood as a limitation of the present application. For the step numbers in the following embodiments, they are only set for the convenience of illustrating the description, and the order between the steps is not limited in any way, and the execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0034] In the description of the present application, it should be understood that the orientation description, such as the orientation or position relationship indicated by the upper, lower, front, rear, left, right, etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, and is not intended to indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.
[0035] In the description of the present application, the meaning of several is one or more, and the meaning of multiple is more than two, greater than, less than, more than, etc. are understood as not including the number, and above, below, etc. are understood as including the number. If it is described as first, second, it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of technical features indicated.
[0036] In the description of the present application, unless otherwise explicitly limited, the words such as setting, installing, connecting, etc. should be broadly understood, and those skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.
[0037] In view of the existing technical problems, the present application provides a low-cost, modular virtual oscilloscope that can be assembled and modified by learners and amateur enthusiasts. The trigger circuit and spectrum analysis function use Figure 1 The circuit structure shown in the figure, the spectrum analysis error can be as low as 200Hz / 1MHz. The core structure of the virtual oscilloscope circuit involved in the present application is three sine wave phase-locked loops realized by frequency pulling effect. Two of the sine wave phase-locked loops are used for spectrum analysis, and one sine wave phase-locked loop is used for more stable trigger function.
[0038] As Figure 1 The present embodiment provides a sine wave phase-locked loop circuit realized by frequency pulling effect, which comprises an oscillator, a phase loop, an amplitude loop, an analog multiplier and a coupling network; the phase loop comprises a phase detector, a first proportional integral circuit and a voltage controlled oscillator, and the amplitude loop comprises a detection circuit and a second proportional integral circuit;
[0039] The sine waves generated by the oscillator are input into the phase loop and the amplitude loop, respectively;
[0040] In the phase loop, the phase comparator compares the phase information of the sine wave with the reference signal, and the comparison result is input into the first proportional-integral circuit for calculation. The calculation output of the first proportional-integral circuit is used to fine-tune the frequency of the voltage-controlled oscillator;
[0041] In the amplitude loop, the detection circuit compares the amplitude information of the sine wave with the preset PWM signal, and the comparison result is input into the second proportional-integral circuit;
[0042] The frequency-adjustable waveform generated by the voltage-controlled oscillator is multiplied by the output of the second proportional-integral circuit through the analog multiplier, to obtain a waveform whose frequency and amplitude are both adjusted. The waveform is coupled into the oscillator through the coupling network, to drag the frequency of the oscillator.
[0043] Reference Figure 1 The low-harmonic sine wave generated by the oscillator is input into the phase loop and the amplitude loop, respectively, for phase detection and detection, to obtain the phase and amplitude information of the sine wave. The phase information is compared with the phase of the reference square wave output by the microcontroller, and the amplitude information is compared with the PWM signal output by the microcontroller, which are calculated by the proportional-integral circuit through the PID algorithm. The output of the proportional-integral circuit of the phase loop is used to fine-tune the frequency of the voltage-controlled oscillator. The frequency-adjustable waveform generated by the voltage-controlled oscillator is multiplied by the output of the proportional-integral circuit of the amplitude loop, to obtain a waveform whose frequency and amplitude are both adjusted. The waveform is coupled into the oscillator through the coupling network, to drag the frequency of the oscillator. Although there are a large number of nonlinear effects in all signal processing links before the coupling network, the generated harmonics are partially filtered when passing through the coupling network, and the harmonics do not resonate with the oscillator and cannot be enhanced by positive feedback. Therefore, the sine wave phase-locked loop can output a sine wave with very low harmonic content, and the phase and amplitude have no error with the preset values of the microcontroller, which can be used to design stable trigger circuits and efficient frequency spectrum analysis functions for virtual oscilloscopes.
[0044] As an optional implementation, the oscillator is an RC oscillator or an LC oscillator.
[0045] In some embodiments, the total loop positive feedback gain of the oscillator described above should be slightly less than 1. At this time, when the voltage-controlled oscillator does not output a signal, the oscillator will make a damped oscillation. When the voltage-controlled oscillator outputs a small signal that is difficult to eliminate harmonic components, the small signal will be superimposed on the feedback sine wave, causing the oscillator to produce a forced vibration and output a larger signal with low harmonics.
[0046] Because the multi-stage frequency selection network is used in the feedback loop of the RC or LC oscillator, the frequency characteristic of the oscillator is very steep, and the frequency control can not be realized by frequency dragging only. Therefore, a control point can be added in the frequency selection network of the oscillator, and the PWM signal output by the microcontroller is used to change the values of the nonlinear resistance, capacitance and inductance, so as to coarsely adjust the resonant frequency of the oscillator, and ensure that the RC or LC oscillator has a relatively flat amplitude-frequency characteristic in the frequency adjustment range of the phase loop voltage-controlled oscillator. Meanwhile, the PWM signal output by the microcontroller for frequency coarse adjustment also coarsely adjusts the pre-filter of the coupling network and the voltage-controlled oscillator.
[0047] The following Figure 2 and specific embodiments are used to further illustrate the sine wave phase-locked loop circuit. Figure 2 In the microcontroller, a frequency-adjustable square wave is output, and the frequency coarse adjustment and amplitude adjustment are realized by the PWM signal. The circuit can generate a sine wave locked with the input square wave, and output the amplitude of the sine wave. After the external signal is input, the circuit can obtain the average value of the product of the external signal and the sine wave described above. The ratio of the average value of the product to the amplitude of the sine wave reflects the component of the external input signal at the current frequency.
[0048] As Figure 2 shown in the LC oscillation circuit, the voltage amplification factor of the amplification circuit composed of C4, R1, R2, Q2, R3 and R4 is A1, and the ratio of the input voltage to the output voltage of the amplification circuit in which Q1 is located is p1. The voltage amplification factor of the amplification circuit composed of C2, R5, R6, Q1, R7 and R8 is A2, and the ratio of the input voltage to the output voltage of the amplification circuit in which Q2 is located is p2. Then, under the premise of ignoring the influence of R11, R12 and the coupling network, the total loop gain A is A1×p1×A2×p2. In order to make the oscillator attenuate when there is no square wave input, A should be very close to but slightly less than 1.
[0049] When there is an injection signal from L4, T1, C6 and D3, if the injection signal has a large difference from the resonant frequency of the oscillator, it will not have a large influence on the attenuated oscillation in the loop. When the frequency of the injection signal is very close to the resonant frequency of the loop, the phase is the same as that of the positive feedback signal in the loop, and the two signals will be superimposed, so that the total loop gain breaks through 1, and the loop can maintain the sine oscillation. At this time, the oscillation frequency of the loop is dragged by the input signal.
[0050] In this way, the signals with a large difference from the resonant frequency of the loop are attenuated, and the signals with a small difference from the resonant frequency of the loop are greatly enhanced, so that a pure and low-harmonic sine signal is obtained.
[0051] The resonant frequency of the LC oscillator circuit can be adjusted by the PWM signal at the "coarse frequency adjustment" input. Since the varactor diode has a very small adjustment range, analog switches are typically used for selection in practical circuits. The amplitude of the sinusoidal signal output by the oscillator can be adjusted by the PWM signal at the "amplitude adjustment" port. This can be understood as the average value of the PWM signal at the "amplitude adjustment" port being multiplied by the square wave switching signal at the "frequency synchronization" input at Q3 and R13. Since one factor of the multiplication is the switching signal, a more expensive analog multiplier integrated circuit is not required.
[0052] The sinusoidal signal output from the LC oscillation circuit is sent to a precision rectifier circuit composed of Q4, R21, Q5, R22, D4, D5, and C17 for detection, and finally outputs the amplitude of the sinusoidal signal at the "amplitude output" port. The microcontroller can use an algorithm to adjust the PWM signal at the "amplitude adjustment" port to stabilize the amplitude of the sinusoidal signal and ensure that the circuit operates in its optimal state.
[0053] The sinusoidal signal output from the LC oscillator circuit is simultaneously sent to U1, multiplied by the external input signal, and then filtered and integrated by the filter circuit composed of U2 and its peripheral components. The average value of the product of the two signals is output at the "signal output" port. When the two signals have different frequencies, the average value is 0; when the two signals have the same frequency, the average value is related to the phase difference between the two signals. The average value is maximum when the two signals are in phase and minimum when their phases are opposite.
[0054] This circuit can be placed in, for example Figure 5 Used in the circuit structure shown. Figure 5 Two square waves, with a phase difference of exactly 90 degrees, are fed into two identical sinusoidal phase-locked loops (PLLs). This ensures that the phase difference between the sine waves output by the two PLLs is 90 degrees. When an external input signal is synchronized with or out of phase with one of the sine waves, the phase difference with the other sine wave is 90 degrees, and their average value is 0. This allows the external input signal at that frequency to be decomposed into sine and cosine components, which is precisely what spectrum analysis requires.
[0055] (1) When this sinusoidal phase-locked loop is applied to the trigger circuit
[0056] Such as Figure 3The structure is shown in the diagram. When the external input signal enters the high-speed ADC, it is sampled and filtered before entering the phase detector of the sinusoidal wave phase-locked loop (PLL) as a reference signal. This causes the PLL output to lock onto the fundamental wave or a specific harmonic of the input signal as a sine wave. This output signal can be used for triggering. Since the capture range of this sinusoidal wave PLL is coarsely adjustable, an algorithm can be used in the microcontroller to analyze the spectrum results, obtain the frequency range of the fundamental wave or a specific harmonic, and control the PLL used for triggering to operate directly in that frequency band, achieving rapid triggering.
[0057] Meanwhile, the microcontroller can adjust the trigger phase by regulating the operating state of the proportional-integral circuit in the phase loop of the sinusoidal wave phase-locked loop. The microcontroller can also adjust the output amplitude of the sinusoidal wave phase-locked loop using the sampling results from a low-speed ADC to achieve the best triggering effect. Figure 4 This serves as a reference structure for embedded programs in a microcontroller.
[0058] (2) When this sinusoidal phase-locked loop is applied to a spectrum analysis circuit
[0059] Such as Figure 5 The structure is shown. The waveform of the high-order bit of the counter in the figure, and the waveform obtained by the XOR operation of the high and low bits, are exactly 90 degrees out of phase. Inputting these two square waves into two sinusoidal phase-locked loops (PLLs) used for spectrum analysis as reference signals yields a low-harmonic sinusoidal signal that is phase-locked with them. These two sinusoidal signals are also 90 degrees out of phase. These two output signals go as follows: firstly, they enter a low-speed ADC to have their amplitude acquired; secondly, these two sinusoidal signals are multiplied by the external input signal, then integrated (i.e., the filtering stage in the figure) to obtain the average value, which is then sampled by the low-speed ADC. Comparing the multiplied signal with the original sinusoidal signal yields the magnitudes of the sine and cosine components of the external input signal at this frequency. When the square wave generated by the microcontroller's counter scans within a frequency range, the spectrum of the external input signal is obtained. The program that scans the frequency of the square wave can simultaneously change the location of the values acquired by the low-speed ADC in RAM, realizing digital storage of the spectrum and facilitating data exchange with the host computer.
[0060] The microcontroller can also adjust the output amplitude of the sine wave phase-locked loop through the PWM signal according to the amplitude of the two sine signals to obtain the best working effect. Figure 6 This serves as a reference structure for embedded programs in a microcontroller.
[0061] In summary, compared with the prior art, the present invention has at least the following advantages and beneficial effects:
[0062] The signal processing logic of the existing virtual oscilloscope is usually located in the controller, thus requiring a high-cost FPGA or a high-performance microprocessor. The present application designs part of the signal processing logic between the front-end amplifier and the ADC of the virtual oscilloscope, and part of the signal processing logic is realized by using analog circuits. These analog devices are not expensive, and the digital logic part only requires a relatively inexpensive microcontroller and a host computer interface chip, thus reducing the cost of the virtual oscilloscope. At the same time, these analog circuits can be partially shared, the number of devices is not large, and the surface mount technology is used, thus not increasing the size of the virtual oscilloscope. This design also provides convenience for learners and amateurs to make modifications on the circuit and self-definition of functions.
[0063] In addition, since the analog circuit structures of the trigger and spectrum analysis functions are similar, the present application also adds a hardware spectrum analysis function to the virtual oscilloscope, thus expanding the use scenarios of the virtual oscilloscope.
[0064] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.
[0065] The above embodiments are only for illustrating the technical concept and characteristics of the present application, and the purpose is to enable those skilled in the art to understand the content of the present application and to implement it, and cannot limit the protection scope of the present application. Any equivalent changes or modifications made according to the essence of the present application should be covered within the protection scope of the present application.
Claims
1. A sinusoidal phase-locked loop circuit utilizing frequency pulling effect, characterized in that, It includes an oscillator, a phase loop, an amplitude loop, an analog multiplier, and a coupling network; the phase loop includes a phase detector, a first proportional-integral circuit, and a voltage-controlled oscillator; the amplitude loop includes a detector circuit and a second proportional-integral circuit. The sine wave generated by the oscillator is input into the phase loop and the amplitude loop, respectively; In the phase loop, the phase detector compares the phase information of the sine wave with the reference signal, inputs the comparison result into the first proportional-integral circuit for calculation, and the calculation output of the first proportional-integral circuit is used to fine-tune the frequency of the voltage-controlled oscillator. In the amplitude loop, the detection circuit compares the amplitude information of the sine wave with the preset PWM signal and inputs the comparison result into the second proportional-integral circuit. The frequency-adjustable waveform generated by the voltage-controlled oscillator and the output of the second proportional-integral circuit are multiplied by an analog multiplier to obtain a waveform whose frequency and amplitude are both adjustable. This waveform is coupled into the oscillator through a coupling network to pull the frequency of the oscillator. The sinusoidal signal output by the sinusoidal phase-locked loop circuit is multiplied by the external input signal and filtered to obtain the frequency component of the external input signal; The capture range of the sinusoidal phase-locked loop circuit can be coarsely adjusted in a controlled manner to quickly lock with the fundamental wave or a specific harmonic of the external input signal, thereby obtaining a trigger signal that is synchronized with the fundamental wave or a specific harmonic of the external input signal. The reference signal is a reference square wave output by the microcontroller; the preset PWM signal is a PWM signal output by the microcontroller. By adding a control point to the frequency selection network of the oscillator, the values of the nonlinear resistor, capacitor, and inductor are changed by outputting a PWM signal through a microcontroller, thereby coarsely adjusting the resonant frequency of the oscillator to achieve coarse frequency tuning.
2. The sinusoidal phase-locked loop circuit utilizing frequency pulling effect according to claim 1, characterized in that, The oscillator is an RC oscillator or an LC oscillator.
3. The sinusoidal phase-locked loop circuit utilizing frequency pulling effect according to claim 1, characterized in that, The detector circuit was replaced with a rectifier circuit.
4. A sinusoidal phase-locked loop circuit utilizing frequency pulling effect according to claim 1, characterized in that, The sinusoidal phase-locked loop circuit also includes a pre-filter, which is connected between the analog multiplier and the coupling network.
5. A sinusoidal phase-locked loop system utilizing frequency pulling effect, characterized in that, It includes two sinusoidal phase-locked loop circuits as described in any one of claims 1-4, wherein the two sinusoidal phase-locked loop circuits output two sinusoidal signals with a phase difference of 90 degrees, which are used to obtain the sine and cosine components of the frequency components of the external input signal.
6. An oscilloscope employing a spectrum analysis circuit, characterized in that, Including the sinusoidal phase-locked loop circuit as described in any one of claims 1-4.
7. An oscilloscope employing a trigger circuit, characterized in that, Including the sinusoidal phase-locked loop circuit as described in any one of claims 1-4.
Citation Information
Patent Citations
Method for implementing analog circuit of sine output phase-locked loop
CN103580683A
Automatically way-finding blind person intelligent auxiliary device and method thereof
CN110538051A