Phase measurement method and phase measurement device
By setting up multi-channel shaping circuits and FPGA polling technology, the phase deviation measurement method is simplified, the problems of equipment redundancy and low efficiency are solved, and phase measurement with streamlined equipment, low cost and high efficiency is achieved.
Patent Information
- Application Number
- CN201810074178.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-01-25
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2038-01-25
AI Technical Summary
The existing phase deviation measurement method requires building a complex test environment, with redundant equipment, expensive price and low work efficiency. In particular, each additional measured source requires an additional set of equipment, making it impossible to efficiently test the relationship between multiple pairs of frequencies. phase deviation.
Shape the source signal under test by setting up a shaping module with at least two shaping circuits, poll the rising edge or falling edge of the output signal to trigger the selection of a valid signal, calculate the frequency value and output a 1PPS signal, and select one signal as the main comparison source to compare with other Compare signals to derive phase differences, simplifying equipment configuration and reducing costs.
It achieves simplification of the test environment, streamlined equipment, reduced costs and improved work efficiency, and can calculate the phase difference between multiple pairs of frequencies at the same time.
Smart Images

Figure CN110082593B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of communication timing, and in particular to a phase measurement method and a phase measurement device. Background Art
[0002] In the field of communication timing, it is often necessary to measure the phase deviation between the output frequencies of two or more devices and a standard source to ensure the synchronization performance between devices and networks. At present, in order to solve the phase deviation measurement between two or more sources under test, it is generally necessary to build a test environment and then conduct the test. The test environment required for one source under test corresponds to a set of equipment, which includes a shaping circuit, a frequency division circuit, a frequency meter, and a reference source.
[0003] In the process of realizing the present invention, the inventors found that the related technology has the following problems: the existing phase deviation measurement requires the construction of corresponding shaping circuits and frequency division circuits according to the amplitude and waveform of the measured source to convert the measured source signal into a counting signal that can be accepted by the frequency meter, and the test environment is complicated to set up; at the same time, each additional measured source requires an additional set of equipment, and a set of equipment can only test the phase deviation between a pair of frequencies at a time, the equipment is redundant, expensive and the work efficiency is low. Summary of the invention
[0004] The embodiments of the present invention provide a phase measurement method and a phase measurement device with simple test environment construction, streamlined equipment, low cost and improved work efficiency.
[0005] In order to solve the above technical problems, a technical solution adopted in the embodiment of the present invention is:
[0006] In a first aspect, an embodiment of the present invention discloses a phase measurement method, the method comprising:
[0007] The signal of the measured source is shaped by a shaping module provided with at least two shaping circuits;
[0008] Polling the output signals of each measured source after shaping, and triggering the selection of the output signal of the effective shaping circuit as the measured source signal through the change of the rising edge or falling edge of the output signal;
[0009] Calculate the frequency value corresponding to the measured source signal, and output the 1PPS signal corresponding to the measured source signal;
[0010] A 1PPS signal corresponding to one measured source signal is selected as a main comparison source, and the 1PPS signals corresponding to the remaining measured source signals are respectively compared with the main comparison source to obtain a phase difference.
[0011] Optionally, the shaping of the signal of the measured source by a shaping module provided with at least two shaping circuits comprises:
[0012] The shaping module includes a 100mV-500mV shaping circuit, a 500mV-5V shaping circuit and a 5-12V shaping circuit, and the negative voltage of the measured source and the voltage greater than the first threshold are filtered out through one of the shaping circuits;
[0013] The polling of the output signals of the measured sources after shaping is performed by the FPGA, and the first threshold is less than or equal to the maximum withstand voltage value of the FPGA.
[0014] Optionally, before shaping the signal of the measured source by a shaping module provided with at least two shaping circuits, the method further comprises:
[0015] At the input end of the shaping circuit, it is detected whether the voltage of the signal of the measured source within a preset time period meets the voltage range of the input I / O type of the FPGA. If it meets the voltage range, the path of the shaping circuit is opened; otherwise, the path of the shaping circuit is closed.
[0016] Optionally, calculating the frequency value corresponding to the measured source signal includes:
[0017] The reference source signal is divided into two frequencies to obtain a signal corresponding to the gate time, wherein the gate time is set to 1PPS;
[0018] The number of repeated changes of the measured source signal is calculated according to the gate time, and the number of repeated changes is the frequency value corresponding to the measured source signal, wherein the measured source signal and the reference source signal conform to the sampling law.
[0019] Optionally, the method further comprises: displaying the phase difference in the form of a graph.
[0020] In a second aspect, an embodiment of the present invention discloses a phase measurement device, the device comprising:
[0021] A shaping unit, used for shaping the signal of the measured source through a shaping module provided with at least two shaping circuits;
[0022] A measured source signal selection unit is used to poll the output signals of each measured source after shaping, and trigger the selection of the output signal of the effective shaping circuit as the measured source signal through the change of the rising edge or falling edge of the output signal;
[0023] A frequency calculation unit, used to calculate the frequency value corresponding to the measured source signal, and output a 1PPS signal corresponding to the measured source signal;
[0024] The phase comparison unit is used to select a 1PPS signal corresponding to one measured source signal as a main comparison source, and compare the 1PPS signals corresponding to the remaining measured source signals with the main comparison source to obtain a phase difference.
[0025] Optionally, the shaping module includes a 100mV-500mV shaping circuit, a 500mV-5V shaping circuit and a 5-12V shaping circuit; the shaping unit is specifically used for:
[0026] The negative voltage of the measured source and the voltage greater than the first threshold are filtered out by one of the shaping circuits;
[0027] The polling of the output signals of the measured sources after shaping is performed by the FPGA, and the first threshold is less than or equal to the maximum withstand voltage value of the FPGA.
[0028] Optionally, the device further comprises:
[0029] A shaping circuit selection unit is used to detect whether the voltage of the signal of the measured source within a preset time period at the input end of the shaping circuit meets the voltage range of the input I / O type of the FPGA, and open the path of the shaping circuit when it meets the voltage range, otherwise close the path of the shaping circuit.
[0030] Optionally, the frequency calculation unit is specifically used for:
[0031] The reference source signal is divided into two frequencies to obtain a signal corresponding to a gate time, wherein the gate time is set to 1PPS; the number of repeated changes of the measured source signal is calculated based on the gate time, and the number of repeated changes is the frequency value corresponding to the measured source signal, wherein the measured source signal and the reference source signal conform to the sampling law.
[0032] Optionally, the device further comprises:
[0033] The phase difference display unit displays the phase difference in the form of a graph.
[0034] The beneficial effects of the embodiments of the present invention are as follows: different from the prior art, the embodiments of the present invention shapes the signal of the measured source by means of a shaping module provided with at least two shaping circuits; polls the output signals of each measured source after shaping, and triggers the selection of the output signal of the effective shaping circuit as the measured source signal through the change of the rising edge or the falling edge of the output signal; calculates the frequency value corresponding to the measured source signal, and outputs the 1PPS signal corresponding to the measured source signal; selects the 1PPS signal corresponding to one measured source signal as the main comparison source, and compares the 1PPS signals corresponding to the remaining measured source signals with the main comparison source to obtain the phase difference, thereby achieving simple test environment construction, streamlined equipment, low cost and improved work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0036] Figure 1 is a flow chart of a phase measurement method provided by an embodiment of the present invention;
[0037] Figure 2 This is a method provided by an embodiment of the present invention. Figure 1 The method flow chart of step S30 shown;
[0038] Figure 3 is a circuit connection diagram of a phase measurement device provided by an embodiment of the present invention;
[0039] Figure 4 is a schematic diagram of a phase measurement device provided by an embodiment of the present invention;
[0040] Figure 5 is a schematic diagram of a phase measurement device provided by another embodiment of the present invention;
[0041] Figure 6 It is a schematic diagram of an intelligent terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0044] See also Figures 1 to 3 , an embodiment of the present invention provides a phase measurement method, the method comprising:
[0045] S10: shaping the signal of the measured source by a shaping module provided with at least two shaping circuits.
[0046] The measured source is a device, equipment or circuit such as a waveform generator, which can generate a waveform of a certain frequency and amplitude, including a sine wave, a square wave, a triangle wave, a sawtooth wave, etc. The pulse can be generated by a multivibrator. However, due to the influence of internal factors of the device, equipment or circuit or other external factors, the signal of the waveform will contain some harmonic components and clutter, etc., resulting in slow or irregular changes in the waveform. Therefore, the shaping circuit can transform the waveform into a waveform with steep edges, and can also remove interference signals in the waveform, or transform a waveform in one form into another form required by the back-end circuit, for example, shaping an analog signal into a digital signal, and for example, shaping a square wave signal into a pulse circuit.
[0047] It can be understood that the device corresponding to the method includes at least two measured sources, as shown in the figure, from the measured source Y1 to the measured source Y N , N is any integer greater than 2. Generally, pulse shaping, conversion circuits, etc. often use monostable triggers, Schmitt triggers, etc. Taking the monostable trigger as an example, the monostable trigger has two working states: steady state and quasi-stable state. Under the action of an external trigger pulse, the signal can flip from the steady state to the quasi-stable state. After the quasi-stable state is maintained for a period of time, the circuit can automatically return to the steady state. The quasi-stable state cannot be maintained for a long time. The maintenance time depends on the parameters of the circuit itself and has nothing to do with the external pulse. It can be understood that the maintenance time of the quasi-stable state can correspond to the high level of the signal. When the external pulse is triggered, the signal flips instantly, making the edge of the change steep and infinitely close to 90 degrees.
[0048] In this embodiment, if the signal input to the shaping circuit is a sine wave, the shaping circuit outputs a square wave signal of a TTL level, and then shapes the square wave signal into a pulse signal; if the signal input to the shaping circuit is a square wave, the shaping circuit shapes the square wave analog quantity into a pulse digital quantity, that is, the shaping circuit includes an AD conversion module, and the AD conversion module includes an integral type, a successive approximation type, a parallel comparison type, a serial comparison type, a voltage-frequency conversion type, etc. Taking the integral type AD as an example, it can be implemented using corresponding integrated circuits such as TLC7135, etc. The working principle of the integral type AD is to convert the input voltage into time (pulse width signal) or frequency (pulse frequency), and then obtain a digital value by a timer or counter, etc.
[0049] Specifically, step S10 includes: the shaping module includes a 100mV-500mV shaping circuit, a 500mV-5V shaping circuit and a 5-12V shaping circuit, and the negative voltage of the measured source and the voltage greater than the first threshold are filtered out through one of the shaping circuits. The output signals of the measured sources after the shaping are polled by the FPGA, and the first threshold is less than or equal to the maximum withstand voltage of the FPGA.
[0050] It should be noted that the shaping module includes at least two shaping circuits. In fact, when the voltage range used in the communications industry is fixed, the voltage range is 100mV-12V, and the usual coverage range can be used. Of course, if there are additional requirements, the shaping module can be expanded, and the newly added shaping circuit can be connected in parallel to the original shaping module, which does not affect the normal use of the original circuit and system, and can even be integrated together. When the newly added shaping circuit is not needed, it can be removed, which means that in this embodiment, the shaping circuits of the shaping modules are independent of each other. Alternatively, when set at the factory, different shaping modules correspond to shaping circuits with different numbers of branches and different voltage ranges, and cannot be changed.
[0051] In addition, the waveform signal generated by the measured source selects one of the shaping circuits for shaping based on amplitude conditions, etc., and since negative voltage and voltage greater than the first threshold value will damage the FPGA, the negative voltage of the measured source and the voltage greater than the first threshold value need to be filtered out, and the output signals of the measured sources after shaping after polling are executed by the FPGA, and the first threshold value is less than or equal to the maximum withstand voltage value of the FPGA.
[0052] Before the signal of the measured source is shaped by a shaping module provided with at least two shaping circuits, the method further includes: detecting at the input end of the shaping circuit whether the voltage of the signal of the measured source within a preset time period meets the voltage range of the input I / O type of the FPGA, and opening the path of the shaping circuit when it meets the voltage range, otherwise closing the path of the shaping circuit.
[0053] Since the I / O port of FPGA is a common 3.3V, the input I / O type of the FPGA is generally set to LVCOM3.3, and the high and low level conditions corresponding to LVCOM3.3 are 5.0V>=Vih>=2.0V, 0.7V>=Vil>=-0.1V. The preset time period can be set arbitrarily. In the embodiment of the present invention, the preset time period is set to 3 seconds, that is, the voltage of the signal of the measured source within 3 seconds is detected at the input end of the shaping circuit to see whether it meets 5.0V>=Vih>=2.0V, 0.7V>=Vil>=-0.1V. When it meets, the path of the shaping circuit is opened, that is, the shaping circuit is selected, otherwise the path of the shaping circuit is closed. At this time, the port corresponding to the FPGA connected to the measured source does not detect data, that is, no changes in the rising edge and the falling edge are detected.
[0054] S20: polling the output signals of each measured source after shaping, and triggering the selection of an effective output signal of the shaping circuit as the measured source signal through the change of the rising edge or falling edge of the output signal.
[0055] FPGA adopts the concept of logic cell array, which includes three parts: configurable logic module, input and output module and internal connection. FPGA is a programmable device. Compared with traditional logic circuits and gate arrays (such as PAL, GAL and CPLD devices), FPGA has a different structure. FPGA uses a small lookup table (16×1 RAM) to implement combinational logic. Each lookup table is connected to the input of a D flip-flop, which drives other logic circuits or drives I / O, thus forming a basic logic unit module that can realize both combinational logic functions and sequential logic functions. These modules are connected to each other or to I / O modules using metal wires. The logic of FPGA is realized by loading programming data into the internal static storage unit. The value stored in the memory unit determines the logic function of the logic unit and the connection mode between modules or between modules and I / O, and ultimately determines the functions that FPGA can realize. FPGA allows unlimited programming.
[0056] The FPGA corresponds to different polling rules according to different designs. In some embodiments, the FPGA includes slice polling, whole packet receiving polling or a combination of the two. The slice polling only needs to design a polling machine at the front end of the FPGA, and use the control system of the FPGA or the integrated circuit corresponding to the slice polling to provide a channel prompt signal to perform fixed polling access to each signal. When the shaping circuit with data is polled, the data is stored in the whole packet receiving memory of the corresponding channel. The whole packet reception needs to be based on the whole packet scheduling rule. The whole packet scheduling is the key to ensure that each channel receives fair and stable services, and directly determines the performance indicators such as service bandwidth, delay, and delay jitter obtained by the channel receiving the service. In the embodiment of the present invention, the polling machine polls the three shaping circuits in turn, with a very short time interval, and the polling of other measured sources is also performed synchronously.
[0057] The FPGA has a built-in D flip-flop or counter, wherein the D flip-flop has two stable states, namely "0" and "1", and can flip from one stable state to another under the action of a certain external signal. The triggering mode of the D flip-flop includes level triggering and edge triggering. During the effective time of the CP pulse, when the output signal of each measured source after shaping is polled, the D flip-flop will flip the signal and trigger the selection of an effective shaping circuit.
[0058] Specifically, after the measured source needs to be detected by the AD conversion module and meets the voltage input range of the FPGA, the corresponding shaping circuit is turned on. Then the FPGA polls the shaping module and selects a valid shaping circuit as the measured source signal. It can be understood that the measured source signal is a signal of the measured source after a certain processing, such as AD conversion or other types of shaping.
[0059] S30: Calculate the frequency value corresponding to the measured source signal, and output the 1PPS signal corresponding to the measured source signal.
[0060] The traditional phase detection system needs to divide the measured source signal separately, and the measured source signal includes at least two signals. The divided signals are calculated by a frequency meter to calculate the phase deviation between the two signals. The frequency meter is calibrated using a reference source signal. In one time, only the phase difference between a pair of frequency signals can be calculated. Therefore, the FPGA can be replaced by a single-chip microcomputer or EDA and peripheral circuits. Therefore, the embodiment of the present invention is not limited to the FPGA solution to implement the phase measurement method provided by the embodiment of the present invention, but due to the technical advantages and price advantages of FPGA, the price of the entire system can be reduced.
[0061] Step S30 may further include:
[0062] S301: Divide the reference source signal to obtain a signal corresponding to the gate time, where the gate time is set to 1PPS;
[0063] For the FPGA, asynchronous design should be avoided as much as possible, and synchronous design should be adopted as much as possible. The key to synchronous design is the clock tree. The clock tree should adopt a tree structure composed of a single clock as much as possible, and can also be divided into different clock domains, but clock synchronization must be achieved between different clock domains.
[0064] In order to obtain a stable clock, an external crystal oscillator or cesium clock source is generally used, wherein the crystal oscillator is composed of quartz and an oscillation circuit, and the quartz can provide a stable frequency. The reference source can use one or more crystal oscillators. Considering the loss, generally one crystal oscillator can meet the requirement of providing a stable clock signal for the FPGA.
[0065] The FPGA includes a phase-locked loop module, which is used for feedback technology in oscillators. For many electronic devices to work properly, they usually need external input signals to be synchronized with internal oscillation signals. Due to process and cost reasons, ordinary crystal oscillators cannot achieve very high frequencies. When high-frequency applications are required, there are corresponding devices to achieve high frequencies, but they are not stable. Therefore, a phase-locked loop can be used to achieve a stable and high-frequency time pulse signal. The characteristic of a phase-locked loop is that it uses an external input reference signal to control the frequency and phase of the oscillation signal inside the loop. Because the phase-locked loop can realize automatic tracking of the output signal frequency to the input signal frequency, the phase-locked loop is usually used in a closed-loop tracking circuit.
[0066] A simple phase-locked loop is composed of a frequency reference, a phase detector, a charge pump, a loop filter, and a voltage-controlled oscillator. It can be understood that since the phase-locked loop inside the FPGA has a frequency multiplication circuit, the frequency multiplication circuit is connected to the reference source, thereby realizing the frequency multiplication operation of the reference source. For example, if the crystal oscillator corresponding to the reference source is 100Mhz, the frequency multiplication circuit is set to 40 times the frequency, and then according to the sampling law, it can be calculated that the FPGA can measure the frequency of the measured source signal below 100Mhz*40 / 2=2GHz.
[0067] The FPGA includes a frequency division module, which divides the reference source signal to obtain a signal corresponding to the gate time. The gate time is set to 1PPS. Of course, the gate time can also be set to other values. The setting of the gate time and the opening or closing of the gate can be controlled by a gate control circuit. It can be understood that when the gate is opened, the working process of measuring the measured source signal begins.
[0068] S302: Calculate the number of repeated changes of the measured source signal according to the gate time, wherein the number of repeated changes is the frequency value corresponding to the measured source signal, wherein the measured source signal and the reference source signal conform to the sampling law.
[0069] Normally, the number of pulses of the measured source signal within 1PPS is calculated by the counter inside the FPGA. The longer the gate time, the more accurate the calculated frequency value. The measured source signal is input to the input end of the gate, and the output signal of the gate control circuit controls the opening and closing time of the gate. It can be understood that the output signal of the gate control circuit is generated by the reference source, so the time base signal obtained by dividing the reference source must be very accurate.
[0070] The number of repeated changes of the measured source signal is calculated according to the gate time, and the number of repeated changes is the frequency value corresponding to the measured source signal. The basic principle is to count the frequency and period of the measured source signal based on the reference time base signal. In some embodiments, the frequency value corresponding to the measured source signal can also be calculated by pulse counting. As long as a certain number of pulses are obtained within a certain time, the frequency of the measured source signal can be calculated. For example, when the rising edge of the measured source signal is detected, the counter counts by 1, that is, the counter triggers counting at each rising edge of the measured source signal.
[0071] The relationship between the sampling frequency and the signal spectrum is the basic basis for the discretization of continuous signals. In the process of analog / digital signal conversion, when the sampling frequency fs.max is greater than twice the highest frequency fmax in the signal (fs.max>2fmax), the digital signal after sampling completely retains the information in the original signal. In general, the sampling frequency is ensured to be 2.56 to 4 times the highest frequency of the signal in practical applications. It can be understood that the measured source signal and the reference source signal conform to the sampling law, that is, the reference source signal is greater than twice the measured source signal, and the frequency calculation of the measured source signal includes but is not limited to the frequency calculation method described in this embodiment.
[0072] S40: selecting a 1PPS signal corresponding to one measured source signal as a main comparison source, and comparing the 1PPS signals corresponding to the remaining measured source signals with the main comparison source to obtain a phase difference.
[0073] In this embodiment, the 1PPS signal corresponding to any other measured source signal and the 1PPS signal corresponding to the main comparison source are co-frequency signals, and a phase detector or the like can be used to calculate the phase difference. The simplest phase detector scheme is an XOR gate integrated circuit, which XORs the 1PPS signal corresponding to any other measured source signal with the 1PPS signal corresponding to the main comparison source. The duty cycle corresponding to the waveform after XOR directly reflects the phase difference.
[0074] In some embodiments, the phase difference can also be measured by voltage measurement method or digital calculation method, etc. Taking the digital calculation method as an example, the digital calculation method can count the pulse width through a microprocessor, timer, counter, etc., then the phase difference is equal to the count No of the phase difference pulse / the count Ni*2π of the half-cycle pulse.
[0075] In this embodiment, a 1PPS signal corresponding to one measured source signal is selected as the main comparison source, and the 1PPS signals corresponding to the remaining measured source signals are compared with the main comparison source to obtain the phase difference. Therefore, a set of equipment can be used to simultaneously calculate the phase difference between the measured source signals.
[0076] The method further includes: displaying the phase difference in the form of a graph.
[0077] It can be understood that the form of the chart includes a line chart, a bar chart, a pie chart, etc. The phase difference data can be sent to an intelligent terminal with a display module through a wireless communication module, etc., and displayed on the intelligent terminal, and the intelligent terminal can also perform other processing on the phase difference in addition to display. It can also be displayed on the display module of the FPGA, and the display module includes an LED, LCD electronic display or a touch screen.
[0078] In summary, a set of equipment includes at least two measured sources 11 and a measured source 12, at least two shaping modules 21 and a shaping module 22, at least one reference source 31, at least one FPGA 41 and a display module built into the FPGA 41 or an intelligent terminal with a display module. Among them, the shaping module 21 and the shaping module 22 generally include a 100mV-500mV shaping circuit, a 500mV-5V shaping circuit and a 5-12V shaping circuit. It can be understood that the FPGA 41 can be replaced by other programmable logic devices, and in the device, the display module built into the FPGA 41 or the intelligent terminal with a display module can set one or all of the settings.
[0079] The phase measurement method shapes the signal of the measured source through a shaping module provided with at least two shaping circuits; polls the output signals of each measured source after shaping, and triggers the selection of the output signal of the effective shaping circuit as the measured source signal through the change of the rising edge or the falling edge of the output signal; calculates the frequency value corresponding to the measured source signal, and outputs the 1PPS signal corresponding to the measured source signal; selects the 1PPS signal corresponding to one measured source signal as the main comparison source, and compares the 1PPS signals corresponding to the remaining measured source signals with the main comparison source to obtain the phase difference, so as to achieve simple test environment construction, streamlined equipment, low cost and improved work efficiency.
[0080] See also Figure 4 , is a schematic diagram of a phase measurement device provided by an embodiment of the present invention. Figure 4 As shown, the device 40 includes:
[0081] The shaping unit 401 is used to shape the signal of the measured source through a shaping module provided with at least two shaping circuits.
[0082] The shaping module includes a 100mV-500mV shaping circuit, a 500mV-5V shaping circuit and a 5-12V shaping circuit. The shaping unit 401 is specifically used to: filter out the negative voltage of the measured source and the voltage greater than a first threshold through one of the shaping circuits; the output signals of the measured sources after polling are executed by the FPGA, and the first threshold is less than or equal to the maximum withstand voltage value of the FPGA.
[0083] The measured source signal selection unit 402 is used to poll the output signals of each measured source after shaping, and trigger the selection of the output signal of the effective shaping circuit as the measured source signal through the change of the rising edge or falling edge of the output signal.
[0084] The frequency calculation unit 403 is used to calculate the frequency value corresponding to the measured source signal and output the 1PPS signal corresponding to the measured source signal.
[0085] The frequency calculation unit 403 is specifically used to: divide the reference source signal to obtain a signal corresponding to the gate time, where the gate time is set to 1PPS; calculate the number of repeated changes of the measured source signal based on the gate time, and the number of repeated changes is the frequency value corresponding to the measured source signal, wherein the measured source signal and the reference source signal conform to the sampling law.
[0086] The phase comparison unit 404 is used to select a 1PPS signal corresponding to one measured source signal as a main comparison source, and compare the 1PPS signals corresponding to the remaining measured source signals with the main comparison source to obtain phase differences.
[0087] See also Figure 5 , is a schematic diagram of a phase measurement device provided by another embodiment of the present invention. Figure 5 As shown, the device 40 includes:
[0088] The shaping circuit selection unit 405 is used to detect whether the voltage of the signal of the measured source within a preset time period at the input end of the shaping circuit meets the voltage range of the input I / O type of the FPGA, and open the path of the shaping circuit when it meets the voltage range, otherwise close the path of the shaping circuit.
[0089] The phase difference display unit 406 displays the phase difference in the form of a graph.
[0090] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0091] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can realize the phase measurement device by means of software plus a general hardware platform, and of course can also be realized by hardware. In addition, since the concept of the phase measurement device is the same as the concept of the phase measurement method described in each of the above embodiments, the embodiments of the phase measurement device can refer to the contents of each of the above embodiments if the contents do not conflict with each other, and will not be repeated here.
[0092] Figure 6 Schematic diagram of a smart terminal provided by an embodiment of the present invention. Figure 6 As shown, the intelligent terminal 500 includes one or more processors 501 and a memory 502. Figure 6 A processor 501 is taken as an example.
[0093] The processor 501 and the memory 502 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0094] The memory 502 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the phase measurement method in the embodiment of the present invention (for example, the attached Figure 4 The processor 501 executes various functional applications and data processing of the phase measurement device by running the non-volatile software programs, instructions and modules stored in the memory 502, that is, realizes the phase measurement method of the above method embodiment and the functions of the various modules and units of the above device embodiment.
[0095] The memory 502 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the phase measurement method, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 502 may optionally include a memory remotely arranged relative to the processor 501, and these remote memories may be connected to the processor 501 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0096] The program instructions / modules are stored in the memory 502, and when executed by the one or more processors 501, execute the phase measurement method in any of the above method embodiments, for example, execute the above described Figure 1 Steps S10 to S40 of the method; the attached Figure 4 or Figure 5 The functions of each module or unit described.
[0097] As another aspect of the embodiment of the present invention, the embodiment of the present invention further provides a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores electronic device executable instructions, and the computer executable instructions are used to enable the electronic device to execute the phase measurement method of the above embodiment, so as to achieve the functions of simple test environment construction, streamlined equipment, low cost and improved work efficiency.
[0098] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0099] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions to use at least one computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A phase measurement method, characterized in that: The method comprises: The signal of the measured source is shaped by a shaping module provided with at least two shaping circuits; Polling the output signals of each measured source after shaping, and triggering the selection of the output signal of the effective shaping circuit as the measured source signal through the change of the rising edge or falling edge of the output signal; Calculate the frequency value corresponding to the measured source signal, and output the 1PPS signal corresponding to the measured source signal; A 1PPS signal corresponding to one measured source signal is selected as a main comparison source, and the 1PPS signals corresponding to the remaining measured source signals are respectively compared with the main comparison source to obtain a phase difference.
2. The method according to claim 1, characterized in that: The step of shaping the signal of the measured source by a shaping module provided with at least two shaping circuits comprises: The shaping module includes a 100mV-500mV shaping circuit, a 500mV-5V shaping circuit and a 5-12V shaping circuit, and the negative voltage of the measured source and the voltage greater than the first threshold are filtered out through one of the shaping circuits; The polling of the output signals of the measured sources after shaping is performed by the FPGA, and the first threshold is less than or equal to the maximum withstand voltage value of the FPGA.
3. The method according to claim 2, characterized in that Before the signal of the measured source is shaped by a shaping module provided with at least two shaping circuits, the method further comprises: At the input end of the shaping circuit, it is detected whether the voltage of the signal of the measured source within a preset time period meets the voltage range of the input I / O type of the FPGA. If it meets the voltage range, the path of the shaping circuit is opened; otherwise, the path of the shaping circuit is closed.
4. The method according to claim 1, characterized in that: The calculating the frequency value corresponding to the measured source signal comprises: The reference source signal is divided into two frequencies to obtain a signal corresponding to the gate time, wherein the gate time is set to 1PPS; The number of repeated changes of the measured source signal is calculated according to the gate time, and the number of repeated changes is the frequency value corresponding to the measured source signal, wherein the measured source signal and the reference source signal conform to the sampling law.
5. The method according to claim 1, characterized in that The method further comprises: The phase difference is displayed in the form of a graph.
6. A phase measurement device, characterized in that: The device comprises: A shaping unit, used for shaping the signal of the measured source through a shaping module provided with at least two shaping circuits; A measured source signal selection unit is used to poll the output signals of each measured source after shaping, and trigger the selection of the output signal of the effective shaping circuit as the measured source signal through the change of the rising edge or falling edge of the output signal; A frequency calculation unit, used to calculate the frequency value corresponding to the measured source signal, and output a 1PPS signal corresponding to the measured source signal; The phase comparison unit is used to select a 1PPS signal corresponding to one measured source signal as a main comparison source, and compare the 1PPS signals corresponding to the remaining measured source signals with the main comparison source to obtain a phase difference.
7. The device according to claim 6, characterized in that The shaping module includes a 100mV-500mV shaping circuit, a 500mV-5V shaping circuit and a 5-12V shaping circuit; the shaping unit is specifically used for: The negative voltage of the measured source and the voltage greater than the first threshold are filtered out by one of the shaping circuits; The polling of the output signals of the measured sources after shaping is performed by the FPGA, and the first threshold is less than or equal to the maximum withstand voltage value of the FPGA.
8. The device according to claim 7, characterized in that The device also includes: A shaping circuit selection unit is used to detect whether the voltage of the signal of the measured source within a preset time period at the input end of the shaping circuit meets the voltage range of the input I / O type of the FPGA, and open the path of the shaping circuit when it meets the voltage range, otherwise close the path of the shaping circuit.
9. The device according to claim 6, characterized in that The frequency calculation unit is specifically used for: The reference source signal is divided into two frequencies to obtain a signal corresponding to the gate time, wherein the gate time is set to 1PPS; The number of repeated changes of the measured source signal is calculated according to the gate time, and the number of repeated changes is the frequency value corresponding to the measured source signal, wherein the measured source signal and the reference source signal conform to the sampling law.
10. The device according to claim 6, characterized in that The device also includes: The phase difference display unit displays the phase difference in the form of a graph.
