[go: up one dir, main page]

CN104316775A - Pulse signal cycle and duty ratio continuous measurement method - Google Patents

Pulse signal cycle and duty ratio continuous measurement method Download PDF

Info

Publication number
CN104316775A
CN104316775A CN201410591468.2A CN201410591468A CN104316775A CN 104316775 A CN104316775 A CN 104316775A CN 201410591468 A CN201410591468 A CN 201410591468A CN 104316775 A CN104316775 A CN 104316775A
Authority
CN
China
Prior art keywords
edge
pulse
resolution timer
time
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410591468.2A
Other languages
Chinese (zh)
Other versions
CN104316775B (en
Inventor
刘宇杰
苏剑
刘振凯
李斌
姚骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANGHAI UNIVERSITY
Original Assignee
SHANGHAI UNIVERSITY
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI UNIVERSITY filed Critical SHANGHAI UNIVERSITY
Priority to CN201410591468.2A priority Critical patent/CN104316775B/en
Publication of CN104316775A publication Critical patent/CN104316775A/en
Application granted granted Critical
Publication of CN104316775B publication Critical patent/CN104316775B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Measurement Of Unknown Time Intervals (AREA)

Abstract

本发明提出了一种脉冲信号周期及占空比连续测量方法。本方法是采用现有高精度计时芯片中边沿触发单元和计时单元的硬件功能,采用两个高精度计时芯片,其中一片测量脉冲上升沿至下降沿的时间,另一片测量脉冲下降沿至上升沿的时间,并且使它们交替工作在数据测量阶段和数据传输及初始化阶段。这样,就利用计时芯片单次测量高精度的优点,解决了一组脉冲信号周期及占空比连续测量的问题,并且不会损失测量的精度。

The invention proposes a continuous measurement method for pulse signal period and duty cycle. This method adopts the hardware functions of the edge trigger unit and the timing unit in the existing high-precision timing chip, and uses two high-precision timing chips, one of which measures the time from the rising edge to the falling edge of the pulse, and the other measures the time from the falling edge to the rising edge of the pulse. time, and make them work alternately in the data measurement phase and the data transmission and initialization phase. In this way, the problem of continuous measurement of a group of pulse signal periods and duty ratios is solved without loss of measurement accuracy by taking advantage of the advantages of high precision in single measurement of the timing chip.

Description

脉冲信号周期及占空比连续测量方法Continuous Measurement Method of Pulse Signal Period and Duty Cycle

技术领域 technical field

本发明涉及一种脉冲信号周期及占空比连续测量方法,特别是一种适用于测量精度要求达到皮秒级、需要对一组脉冲信号中各个脉冲的周期及占空比进行连续测量方法。 The invention relates to a method for continuously measuring the period and duty ratio of a pulse signal, in particular to a method for continuously measuring the period and duty ratio of each pulse in a group of pulse signals, which is suitable for measurement accuracy requirements up to picosecond level.

背景技术 Background technique

       脉冲信号是传感器以及检测仪表中应用较多的信号形式。而脉冲的周期及占空比则包含了被测物体的多种信息。例如对超声波回波信号做处理后得到的脉冲信号,其周期及占空比可反映超声波信号包络线的疏密情况,进而可以利用时间相关法分析超声波飞行时间。对于测量精度要求不高,且比较稳定的周期脉冲信号的周期及占空比测量已有相当成熟的技术。但当一组脉冲信号混有干扰脉冲时,往往需要能精确测量每个输入脉冲的周期及占空比,这样才可以采用如时间相关法等对大量数据进行统计分析。因此,一个较理想的脉冲信号周期及占空比测量方法是能准确测量一组脉冲信号中各个脉冲的周期及占空比。 The pulse signal is a signal form that is widely used in sensors and detection instruments. The period and duty cycle of the pulse contain various information of the measured object. For example, the period and duty cycle of the pulse signal obtained after processing the ultrasonic echo signal can reflect the density of the ultrasonic signal envelope, and then the time-of-flight method can be used to analyze the ultrasonic flight time. There are quite mature technologies for measuring the period and duty cycle of relatively stable periodic pulse signals with low requirements for measurement accuracy. However, when a group of pulse signals is mixed with interference pulses, it is often necessary to accurately measure the period and duty cycle of each input pulse, so that a large amount of data can be statistically analyzed using the time correlation method. Therefore, an ideal pulse signal period and duty ratio measurement method is to accurately measure the period and duty ratio of each pulse in a group of pulse signals.

在周期的测量上,可以利用了现代单片微处理器的定时器中比较器单元与捕捉器单元的硬件功能,例如专利脉冲信号周期测量方法(专利号:201010609782.0)。 In the period measurement, the hardware functions of the comparator unit and the catcher unit in the timer of the modern single-chip microprocessor can be used, such as the patented pulse signal period measurement method (patent number: 201010609782.0).

测量信号占空比(duty cycle)的方法主要是采用高速的计数器。待测信号可以根据计数器产生的信号均匀的区分成多个区间,并且计算这些多个区间中待测信号为高准位的个数。之后,再将区间的个数与高准位的个数相除,以得到占空比比。然而,传统上的测量方法,至少有下列缺点。 The method of measuring the duty cycle of the signal is mainly to use a high-speed counter. The signal to be tested can be evenly divided into multiple intervals according to the signal generated by the counter, and the number of high level bits of the signal to be tested in these multiple intervals is calculated. Afterwards, the number of intervals is divided by the number of high-level bits to obtain a duty ratio. However, the conventional measurement methods have at least the following disadvantages.

利用此方法时所会面临到的一大缺点是在于此方法必须采用高速的计数器。举例而言,若是待测信号的频率为1GHz(千兆赫兹),而欲将此待测信号均匀的区分成一百个区间时,在一定的精度要求下,至少会需要一个速度高达4GHz的计数器。然而,高速计数器的成本相当的高昂。传统的测试方法会使测试仪器的成本大幅提升。此外,计数器的容量也会是一个限制。若是针对频率为1GHz的待测信号,并以上述4GHz的计数器,进行为时1us(微秒)的测量,则此计数器至少需要4000位的容量。若是需要大容量的计数器,同样也会面临高成本的问题。因此,容量上的限制同样也是传统测量占空比时所遇到的问题。而且利用传统的测量方法时,若是测量时无法精确与待测信号的上升边缘(raising edge)或是下降边缘(falling edge)进行同步,可能会使测量时产生一个脉冲的误差,使得准确度上有所偏差。 A major disadvantage that can be faced when using this method is that this method must use a high-speed counter. For example, if the frequency of the signal to be tested is 1GHz (gigahertz), and the signal to be tested is to be uniformly divided into one hundred intervals, under certain precision requirements, at least one speed up to 4GHz is required. counter. However, the cost of high-speed counters is quite high. Traditional testing methods will greatly increase the cost of testing equipment. Also, the capacity of the counter will be a limitation. If the above-mentioned 4GHz counter is used to measure the signal under test with a frequency of 1GHz for 1us (microsecond), the counter needs at least a capacity of 4000 bits. If a large-capacity counter is required, it will also face the problem of high cost. Therefore, the limitation on the capacity is also the problem encountered in the traditional measurement of the duty cycle. Moreover, when using the traditional measurement method, if the measurement cannot be accurately synchronized with the rising edge (raising edge) or falling edge (falling edge) of the signal to be measured, it may cause a pulse error during the measurement, making the accuracy worse. There are deviations.

针对以上问题有专利利用除频器、压控振荡器与计数器的方法来保证测量精度的准确,例如专利占空比测量系统与其方法(专利号:201010590871.5)。 To solve the above problems, there are patented methods of using frequency dividers, voltage-controlled oscillators and counters to ensure accurate measurement accuracy, such as the patented duty ratio measurement system and its method (patent number: 201010590871.5).

但是,对于一组脉冲信号,若要得到其中各个脉冲的周期及占空比信息,则需要对各个脉冲进行连续测量,很明显,传统的测量方法和现有的技术还无法满足这个要求。 However, for a group of pulse signals, if you want to obtain the period and duty cycle information of each pulse, you need to measure each pulse continuously. Obviously, traditional measurement methods and existing technologies cannot meet this requirement.

发明内容 Contents of the invention

本发明的目的是针对已有技术存在的不足,提供一种脉冲信号周期及占空比连续测量方法,特别是一种适用于测量精度要求达到皮秒级、需要对一组脉冲信号中各个脉冲的周期及占空比进行连续测量方法,准确地测量一组脉冲信号中每一个脉冲的周期及占空比,使测量系统可以采用如时间相关法等对大量数据进行统计分析。 The purpose of the present invention is to address the deficiencies in the prior art, to provide a continuous measurement method for pulse signal period and duty ratio, especially a method suitable for measurement accuracy requirements up to picosecond level, and it is necessary to measure each pulse in a group of pulse signals The continuous measurement method of the period and duty cycle of a group of pulse signals can accurately measure the period and duty cycle of each pulse in a group of pulse signals, so that the measurement system can use such as time correlation method to perform statistical analysis on a large amount of data.

为达到上述目的,本发明的构思是:采用两个高精度计时芯片,其中一片测量脉冲上升沿至下降沿的时间,另一片测量脉冲下降沿至上升沿的时间,并且使它们交替工作在数据测量阶段和数据传输及初始化阶段。这样,就利用计时芯片单次测量高精度的优点,解决了一组脉冲信号周期及占空比连续测量的问题,并且不会损失测量的精度。上述系统充分利用了计时芯片单次测量高精度的优点和现代微处理器灵活的操控,消除了多中断程序响应的时间竞争问题,直接由专用芯片的硬件来得到高精度的脉冲边沿时间,从而可以连续得到高精度的脉冲周期及占空比。 To achieve the above object, the idea of the present invention is to adopt two high-precision timing chips, one of which measures the time from the rising edge to the falling edge of the pulse, and the other measures the time from the falling edge to the rising edge of the pulse, and makes them work alternately in the data Measurement phase and data transfer and initialization phase. In this way, the advantage of high precision in single measurement of the timing chip is used to solve the problem of continuous measurement of a group of pulse signal periods and duty ratios without loss of measurement accuracy. The above-mentioned system makes full use of the advantages of high-precision single measurement of the timing chip and the flexible control of modern microprocessors, and eliminates the time competition problem of multi-interrupt program response, and directly obtains high-precision pulse edge time by the hardware of the dedicated chip, thereby High-precision pulse period and duty cycle can be obtained continuously.

根据上述发明的构思,本发明采用以下技术方案: According to the design of the above invention, the present invention adopts the following technical solutions:

一种脉冲信号周期及占空比连续测量方法,其特征在于:采用高精度定时器1和高精度定时器2以及一个数据处理单元;高精度定时器1有Start边沿捕捉单元甲、Stop边沿捕捉单元甲以及计时单元甲;高精度定时器2有Start边沿捕捉单元乙、Stop边沿捕捉单元乙以及计时单元乙;高精度定时器1的计时单元甲对Start边沿捕捉单元甲输入端S1脉冲上升沿变化瞬间的时间和Stop边沿捕捉单元甲输入端S2脉冲下降沿变化瞬间的时间的时间差进行计时;高精度定时器2的计时单元乙对Start边沿捕捉单元乙输入端S3脉冲下降沿变化瞬间的时间和Stop边沿捕捉单元乙输入端S4脉冲上升沿变化瞬间的时间的时间差进行计时;计时单元甲和计时单元乙分别将计时数值送入数据处理单元,高精度定时器1和高精度定时器2同时接收一组脉冲信号X并且交替工作,其中高精度定时器1的计时单元甲对当前脉冲的上升沿至下降沿的时间进行计时,高精度定时器2的计时单元乙对当前脉冲的下降沿至上升沿的时间进行计时;在高精度定时器1对脉冲上升沿至下降沿的时间计时的同时,将高精度定时器2的计时数据送入数据处理单元并且完成高精度定时器2的初始化,在高精度定时器2对脉冲上升沿至下降沿的时间计时的同时,将高精度定时器1的计时数据送入数据处理单元并且完成高精度定时器1的初始化。在一组脉冲信号X中的脉冲P(i)及其相邻的脉冲P(i+1)下的具体操作步骤如下: A kind of pulse signal cycle and duty ratio continuous measurement method, it is characterized in that: adopt high-precision timer 1 and high-precision timer 2 and a data processing unit; High-precision timer 1 has Start edge capture unit A, Stop edge capture Unit A and timing unit A; high-precision timer 2 has Start edge capture unit B, Stop edge capture unit B and timing unit B; timing unit A of high-precision timer 1 is on the rising edge of S1 pulse at the input terminal of Start edge capture unit A The time difference between the time of the change instant and the time of the change instant of the S2 pulse falling edge at the input terminal of the Stop edge capture unit A is timed; the timing unit B of the high-precision timer 2 is the time of the change instant of the S3 pulse falling edge of the input terminal S3 pulse of the Start edge capture unit B Timing is performed with the time difference between the moment when the rising edge of the S4 pulse at the input terminal S4 of the Stop edge capture unit B changes; the timing unit A and the timing unit B respectively send the timing value to the data processing unit, and the high-precision timer 1 and the high-precision timer 2 simultaneously Receive a group of pulse signals X and work alternately, wherein the timing unit A of the high-precision timer 1 times the time from the rising edge to the falling edge of the current pulse, and the timing unit B of the high-precision timer 2 times the falling edge to the current pulse. The time of the rising edge is timed; while the high-precision timer 1 is timing the time from the rising edge to the falling edge of the pulse, the timing data of the high-precision timer 2 is sent to the data processing unit and the initialization of the high-precision timer 2 is completed, While the high-precision timer 2 counts the time from the rising edge to the falling edge of the pulse, the timing data of the high-precision timer 1 is sent to the data processing unit and the initialization of the high-precision timer 1 is completed. The specific operation steps under the pulse P(i) and its adjacent pulse P(i+1) in a group of pulse signal X are as follows:

(a). 脉冲信号X中的脉冲P(i)上升沿变化时,高精度定时器1的Start边沿捕捉单元甲被触发;脉冲信号X中的脉冲P(i)下降沿变化时,高精度定时器1的Stop边沿捕捉单元甲被触发;在Stop边沿捕捉单元甲被触发的同时高精度定时器1的计时单元甲将经过计算的脉冲P(i) 上升沿至下降沿的时间T1(i)送入数据处理单元并完成高精度定时器2的初始化;  (a). When the rising edge of the pulse P(i) in the pulse signal X changes, the Start edge capture unit A of the high-precision timer 1 is triggered; when the falling edge of the pulse P(i) in the pulse signal X changes, the high-precision The Stop edge capture unit A of timer 1 is triggered; when the Stop edge capture unit A is triggered, the timing unit A of the high-precision timer 1 will pass the time T1(i) from the rising edge to the falling edge of the calculated pulse P(i) ) into the data processing unit and complete the initialization of the high-precision timer 2;

(b). 脉冲信号X中的脉冲P(i)下降沿变化时,高精度定时器2的Start边沿捕捉单元乙被触发;脉冲信号X中的脉冲P(i+1)上升沿变化时,高精度定时器2的Stop边沿捕捉单元乙被触发;在Stop边沿捕捉单元乙被触发的同时高精度定时器2的计时单元乙将经过计算的脉冲P(i) 下降沿至上升沿的时间T2(i)送入数据处理单元并完成高精度定时器1的初始化; (b). When the falling edge of the pulse P(i) in the pulse signal X changes, the Start edge capture unit B of the high-precision timer 2 is triggered; when the rising edge of the pulse P(i+1) in the pulse signal X changes, The Stop edge capture unit B of the high-precision timer 2 is triggered; when the Stop edge capture unit B is triggered, the timing unit B of the high-precision timer 2 will pass the time T2 from the falling edge to the rising edge of the calculated pulse P(i) (i) send into the data processing unit and complete the initialization of the high-precision timer 1;

(c). 重复进行步骤(a)和(b),完成对P(i+1)上升沿至下降沿的时间T1(i+1)和下降沿至上升沿的时间T2(i+1)测量; (c). Repeat steps (a) and (b) to complete the time T1(i+1) from the rising edge to the falling edge of P(i+1) and the time T2(i+1) from the falling edge to the rising edge Measurement;

(d). 数据处理单元将高精度定时器1和高精度定时器2送入的脉冲P(i) 上升沿至下降沿的时间和下降沿至上升沿的时间进行保存,并等待下一脉冲P(i+1)的上升沿至下降沿的时间和下降沿至上升沿的时间数据。 (d). The data processing unit saves the time from the rising edge to the falling edge and the time from the falling edge to the rising edge of the pulse P(i) sent by the high-precision timer 1 and the high-precision timer 2, and waits for the next pulse The time data from the rising edge to the falling edge and the time data from the falling edge to the rising edge of P(i+1).

(e). 得到当前脉冲的周期T(i)= T1(i) +T2(i),占空比D= T1(i)/ T(i)。 (e). Get the period T(i)= T1(i) +T2(i) of the current pulse, and the duty cycle D= T1(i)/ T(i).

  the

本发明与现有技术相比,具有如下显而易见的突出实质性特点和显著优点:  Compared with the prior art, the present invention has the following obvious outstanding substantive features and significant advantages:

本发明充分利用了计时芯片单次测量高精度的优点和现代微处理器灵活的操控,消除了多中断程序响应的时间竞争问题,直接由专用芯片的硬件来得到宽量程高精度的脉冲边沿时间,保证了测量精度可以达到皮秒级别。而两个高精度计时芯片交替工作在数据测量阶段和数据传输及初始化阶段,满足了连续测量周期及占空比的需求。这些特性使连续得到高精度的脉冲周期及占空比成为可能。 The present invention makes full use of the advantages of high-precision single measurement of the timing chip and the flexible control of modern microprocessors, eliminates the time competition problem of multi-interrupt program response, and directly obtains wide-range and high-precision pulse edge time by the hardware of the dedicated chip , ensuring that the measurement accuracy can reach the picosecond level. The two high-precision timing chips work alternately in the data measurement phase and data transmission and initialization phase, which meets the requirements of continuous measurement cycle and duty cycle. These characteristics make it possible to continuously obtain high-precision pulse period and duty cycle.

附图说明 Description of drawings

图1是本发明的一个实施例的测量设置结构原理框图。 Fig. 1 is a functional block diagram of a measurement setup structure of an embodiment of the present invention.

具体实施方式 Detailed ways

本发明的一个优选实施例如下述:参见图1。 A preferred embodiment of the present invention is as follows: Refer to FIG. 1 .

一种脉冲信号周期及占空比连续测量方法,采用高精度定时器1(1)和高精度定时器2(2)以及一个数据处理单元(3);高精度定时器1(1)有Start边沿捕捉单元甲(1.1)、Stop边沿捕捉单元甲(1.2)以及计时单元甲(1.3);高精度定时器2(2)有Start边沿捕捉单元乙(2.1)、Stop边沿捕捉单元乙(2.2)以及计时单元乙(2.3);高精度定时器1(1)的计时单元甲(1.3)对Start边沿捕捉单元甲(1.1)输入端S1脉冲上升沿变化瞬间的时间和Stop边沿捕捉单元甲(1.2)输入端S2脉冲下降沿变化瞬间的时间的时间差进行计时;高精度定时器2(2)的计时单元乙(2.3)对Start边沿捕捉单元乙(2.1)输入端S3脉冲下降沿变化瞬间的时间和Stop边沿捕捉单元乙(2.2)输入端S4脉冲上升沿变化瞬间的时间的时间差进行计时;计时单元甲(1.3)和计时单元乙(2.3)分别将计时数值送入数据处理单元(3)。高精度定时器1(1)和高精度定时器2(2)同时接收一组脉冲信号X并且交替工作,其中高精度定时器1(1)的计时单元甲(1.3)对当前脉冲上升沿至下降沿的时间进行计时,高精度定时器2(2)的计时单元乙(2.3)对当前脉冲下降沿至上升沿的时间进行计时;在高精度定时器1(1)对脉冲上升沿至下降沿的时间进行的同时,将高精度定时器2(2)的计时数据送入数据处理单元(3)并且完成高精度定时器2(2)的初始化,在高精度定时器2(2)对脉冲下降沿至上升沿的时间进行计时的同时,将高精度定时器1(1)的计时数据送入数据处理单元(3)并且完成高精度定时器1(1)的初始化。在一组脉冲信号X中的脉冲P(i)及其相邻的脉冲P(i+1)下的具体操作步骤如下: A method for continuously measuring pulse signal period and duty cycle, using high-precision timer 1 (1) and high-precision timer 2 (2) and a data processing unit (3); high-precision timer 1 (1) has a Start Edge capture unit A (1.1), Stop edge capture unit A (1.2) and timing unit A (1.3); high-precision timer 2 (2) has Start edge capture unit B (2.1), Stop edge capture unit B (2.2) And the timing unit B (2.3); the timing unit A (1.3) of the high-precision timer 1 (1) is to the time of the rising edge change of the input terminal S1 pulse of the Start edge capture unit A (1.1) and the stop edge capture unit A (1.2 ) The time difference of the moment when the falling edge of the input terminal S2 pulse changes is timed; the timing unit B (2.3) of the high-precision timer 2 (2) captures the time of the moment when the falling edge of the input terminal S3 pulse of the Start edge capture unit B (2.1) changes Timing with the time difference of the time of the rising edge of the input terminal S4 pulse rising edge of the Stop edge capture unit B (2.2); timing unit A (1.3) and timing unit B (2.3) respectively send the timing value to the data processing unit (3). High-precision timer 1 (1) and high-precision timer 2 (2) receive a group of pulse signals X at the same time and work alternately, in which the timing unit A (1.3) of high-precision timer 1 (1) detects the rising edge of the current pulse to The time of the falling edge is timed, and the timing unit B (2.3) of the high-precision timer 2 (2) counts the time from the falling edge to the rising edge of the current pulse; While the time of the edge is carried out, the timing data of the high-precision timer 2 (2) is sent to the data processing unit (3) and the initialization of the high-precision timer 2 (2) is completed. While counting the time from the falling edge of the pulse to the rising edge, the timing data of the high-precision timer 1 (1) is sent to the data processing unit (3) and the initialization of the high-precision timer 1 (1) is completed. The specific operation steps under the pulse P(i) and its adjacent pulse P(i+1) in a group of pulse signal X are as follows:

(a). 脉冲信号X中的脉冲P(i)上升沿变化时,高精度定时器1(1)的Start边沿捕捉单元甲(1.1)被触发;脉冲信号X中的脉冲P(i)下降沿变化时,高精度定时器1(1)的Stop边沿捕捉单元甲(1.2)被触发;在Stop边沿捕捉单元甲(1.2)被触发的同时高精度定时器1(1)的计时单元甲(1.3)将经过计算的脉冲P(i) 上升沿至下降沿的时间T1(i)送入数据处理单元(3)并完成高精度定时器2(2)的初始化; (a). When the rising edge of the pulse P(i) in the pulse signal X changes, the Start edge capture unit A (1.1) of the high-precision timer 1 (1) is triggered; the pulse P(i) in the pulse signal X falls When the edge changes, the Stop edge capture unit A (1.2) of the high-precision timer 1 (1) is triggered; the timing unit A (1.2) of the high-precision timer 1 (1) is triggered while the Stop edge capture unit A (1.2) is triggered 1.3) Send the time T1 (i) from the rising edge to the falling edge of the calculated pulse P (i) into the data processing unit (3) and complete the initialization of the high-precision timer 2 (2);

(b). 脉冲信号X中的脉冲P(i)下降沿变化时,高精度定时器2(2)的Start边沿捕捉单元乙(2.1)被触发;脉冲信号X中的脉冲P(i+1)上升沿变化时,高精度定时器2(2)的Stop边沿捕捉单元乙(2.2)被触发;在Stop边沿捕捉单元乙(2.2)被触发的同时高精度定时器2(2)的计时单元乙(2.3)将经过计算的脉冲P(i) 下降沿至上升沿的时间T2(i)送入数据处理单元(3)并完成高精度定时器1(1)的初始化; (b). When the falling edge of the pulse P(i) in the pulse signal X changes, the Start edge capture unit B (2.1) of the high-precision timer 2 (2) is triggered; the pulse P(i+1) in the pulse signal X ) when the rising edge changes, the Stop edge capture unit B (2.2) of the high-precision timer 2 (2) is triggered; when the Stop edge capture unit B (2.2) is triggered, the timing unit of the high-precision timer 2 (2) B (2.3) sends the time T2 (i) from the falling edge to the rising edge of the calculated pulse P (i) into the data processing unit (3) and completes the initialization of the high-precision timer 1 (1);

(c). 重复进行步骤(a)和(b),完成对P(i+1)的上升沿至下降沿的时间T1(i+1)和下降沿至上升沿的时间T2(i+1)测量; (c). Repeat steps (a) and (b) to complete the time T1(i+1) from the rising edge to the falling edge of P(i+1) and the time T2(i+1) from the falling edge to the rising edge )Measurement;

(d). 数据处理单元(3)将高精度定时器1(1)和高精度定时器2(2)送入的脉冲P(i) 上升沿至下降沿的时间和下降沿至上升沿的时间进行保存,并等待下一脉冲P(i+1)的上升沿至下降沿的时间和下降沿至上升沿的时间数据。 (d). The data processing unit (3) sends the pulse P(i) from the high-precision timer 1 (1) and the high-precision timer 2 (2) to the time from the rising edge to the falling edge and the time from the falling edge to the rising edge. Save the time, and wait for the time data from the rising edge to the falling edge and the time data from the falling edge to the rising edge of the next pulse P(i+1).

(e). 得到当前脉冲的周期T(i)= T1(i) +T2(i),占空比D= T1(i)/ T(i)。 (e). Get the period T(i)= T1(i) +T2(i) of the current pulse, and the duty cycle D= T1(i)/ T(i).

  the

上述脉冲信号周期及占空比连续测量方法,所述两个高精度定时器的交替工作在数据测量阶段和数据传输及初始化阶段。  In the method for continuously measuring the period of the pulse signal and the duty cycle, the two high-precision timers work alternately in the data measurement phase and the data transmission and initialization phase. the

Claims (1)

1. pulse signal cycle and a dutycycle method for continuous measuring, is characterized in that: adopt high-resolution timer 1 (1) and high-resolution timer 2 (2) and a data processing unit (3); High-resolution timer 1 (1) has Start edge capture unit first (1.1), Stop edge capture unit first (1.2) and timing unit first (1.3); High-resolution timer 2 (2) has Start edge capture unit second (2.1), Stop edge capture unit second second (2.2) and timing unit second (2.3); The mistiming of timing unit first (1.3) to the time of Start edge capture unit first (1.1) input end S1 rising edge of a pulse change moment and Stop edge capture unit first (1.2) input end S2 pulse falling edge change time instantaneously of high-resolution timer 1 (1) carries out timing; The mistiming of timing unit second (2.3) to the time of Start edge capture unit second (2.1) input end S3 pulse falling edge change moment and Stop edge capture unit second (2.2) input end S4 rising edge of a pulse change time instantaneously of high-resolution timer 2 (2) carries out timing; Timing numerical value is sent into data processing unit (3) by timing unit first (1.3) and timing unit second (2.3) respectively; High-resolution timer 1 (1) and high-resolution timer 2 (2) receive set of pulses signal X and alternation simultaneously, wherein the timing unit first (1.3) of high-resolution timer 1 (1) carries out timing to current PRF rising edge to time of negative edge, and the timing unit second (2.3) of high-resolution timer 2 (2) carries out timing to current PRF negative edge to time of rising edge; While high-resolution timer 1 (1) paired pulses rising edge carried out to time of negative edge, the chronometric data of high-resolution timer 2 (2) is sent into data processing unit (3) and completes the initialization of high-resolution timer 2 (2), while high-resolution timer 2 (2) paired pulses negative edge carries out timing to time of rising edge, the chronometric data of high-resolution timer 1 (1) is sent into data processing unit (3) and completes the initialization of high-resolution timer 1 (1); Concrete operation step under pulse P (i) in set of pulses signal X and adjacent pulse P (i+1) thereof is as follows:
(a). when pulse P (i) rising edge in pulse signal X changes, Start edge capture unit first (1.1) of high-resolution timer 1 (1) is triggered; When pulse P (i) negative edge in pulse signal X changes, Stop edge capture unit first (1.2) of high-resolution timer 1 (1) is triggered; While Stop edge capture unit first (1.2) is triggered, time T1 (i) of pulse P (i) rising edge through calculating to negative edge is sent into data processing unit (3) and completes the initialization of high-resolution timer 2 (2) by the timing unit first (1.3) of high-resolution timer 1 (1);
(b). when pulse P (i) negative edge in pulse signal X changes, Start edge capture unit second (2.1) of high-resolution timer 2 (2) is triggered; When pulse P (i+1) rising edge in pulse signal X changes, Stop edge capture unit second (2.2) of high-resolution timer 2 (2) is triggered; While Stop edge capture unit second (2.2) is triggered, time T2 (i) of pulse P (i) negative edge through calculating to rising edge is sent into data processing unit (3) and completes the initialization of high-resolution timer 1 (1) by the timing unit second (2.3) of high-resolution timer 2 (2);
(c). repeat step (a) and (b), complete and the rising edge of P (i+1) is measured to the time T2 (i+1) of rising edge to the time T1 (i+1) of negative edge and negative edge;
(d). pulse P (i) rising edge high-resolution timer 1 (1) and high-resolution timer 2 (2) sent into of data processing unit (3) was preserved to time of negative edge and negative edge to the time of rising edge, and waited for that the rising edge of next pulse P (i+1) is to time of negative edge and negative edge to the time data of rising edge;
?(e). obtain cycle T (i)=T1 (the i)+T2 (i) of current PRF, dutycycle D=T1 (i)/T (i).
CN201410591468.2A 2014-10-29 2014-10-29 Pulse signal cycle and dutycycle method for continuous measuring Expired - Fee Related CN104316775B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410591468.2A CN104316775B (en) 2014-10-29 2014-10-29 Pulse signal cycle and dutycycle method for continuous measuring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410591468.2A CN104316775B (en) 2014-10-29 2014-10-29 Pulse signal cycle and dutycycle method for continuous measuring

Publications (2)

Publication Number Publication Date
CN104316775A true CN104316775A (en) 2015-01-28
CN104316775B CN104316775B (en) 2017-06-06

Family

ID=52372028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410591468.2A Expired - Fee Related CN104316775B (en) 2014-10-29 2014-10-29 Pulse signal cycle and dutycycle method for continuous measuring

Country Status (1)

Country Link
CN (1) CN104316775B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569032A (en) * 2016-10-17 2017-04-19 长沙开元仪器股份有限公司 Signal frequency and duty ratio prediction method based on embedded microcontroller
CN106597122A (en) * 2017-01-10 2017-04-26 烟台大学 Radar and communication signal pulse width detection algorithm
CN109361500A (en) * 2018-10-25 2019-02-19 南通先进通信技术研究院有限公司 A method of the plesiochronous external pulse of self-correcting based on chip
CN117111537A (en) * 2023-10-23 2023-11-24 北京科泰克科技有限责任公司 Control system and method for hydrogen system based on hydrogen controller

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5614960A (en) * 1979-07-18 1981-02-13 Toyota Motor Corp Duty ratio calculator
JPH06324096A (en) * 1993-05-14 1994-11-25 Nec Corp Universal counter
CN1677639A (en) * 2004-03-31 2005-10-05 泰瑞达公司 Method of measuring duty cycle
CN1828316A (en) * 2005-01-12 2006-09-06 因芬尼昂技术股份公司 Duty cycle detector with first, second, and third values
CN101082639A (en) * 2007-07-02 2007-12-05 深圳汉光电子技术有限公司 Standard pulse generator capable of simulating pulse measurement meter used by user
CN102128981A (en) * 2010-12-29 2011-07-20 上海大学 Method for measuring pulse signal period

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5614960A (en) * 1979-07-18 1981-02-13 Toyota Motor Corp Duty ratio calculator
JPH06324096A (en) * 1993-05-14 1994-11-25 Nec Corp Universal counter
CN1677639A (en) * 2004-03-31 2005-10-05 泰瑞达公司 Method of measuring duty cycle
CN1828316A (en) * 2005-01-12 2006-09-06 因芬尼昂技术股份公司 Duty cycle detector with first, second, and third values
CN101082639A (en) * 2007-07-02 2007-12-05 深圳汉光电子技术有限公司 Standard pulse generator capable of simulating pulse measurement meter used by user
CN102128981A (en) * 2010-12-29 2011-07-20 上海大学 Method for measuring pulse signal period

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴云靖 等: "基于单片机的便携式脉冲信号参数测试仪", 《国外电子测量技术》 *
吴亮 等: "基于LabVIEW的脉冲信号分析软件开发", 《计算机与数字工程》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569032A (en) * 2016-10-17 2017-04-19 长沙开元仪器股份有限公司 Signal frequency and duty ratio prediction method based on embedded microcontroller
CN106569032B (en) * 2016-10-17 2019-05-31 长沙开元仪器股份有限公司 A kind of detection method of signal frequency and duty ratio based on embedded microcontroller
CN106597122A (en) * 2017-01-10 2017-04-26 烟台大学 Radar and communication signal pulse width detection algorithm
CN106597122B (en) * 2017-01-10 2019-03-19 烟台大学 A kind of pulse width detection algorithm of radar and signal of communication
CN109361500A (en) * 2018-10-25 2019-02-19 南通先进通信技术研究院有限公司 A method of the plesiochronous external pulse of self-correcting based on chip
CN117111537A (en) * 2023-10-23 2023-11-24 北京科泰克科技有限责任公司 Control system and method for hydrogen system based on hydrogen controller
CN117111537B (en) * 2023-10-23 2024-01-26 北京科泰克科技有限责任公司 Control system and method for hydrogen system based on hydrogen controller

Also Published As

Publication number Publication date
CN104316775B (en) 2017-06-06

Similar Documents

Publication Publication Date Title
CN102928677A (en) Nano pulse signal acquiring method
CN102128981B (en) Pulse Signal Period Measurement Method
CN101026781A (en) Quasi full-synchronous high-precision rapid frequency measuring device and method
CN102621383B (en) Method and system for measuring nanosecond ultra-narrow pulse
CN104316775B (en) Pulse signal cycle and dutycycle method for continuous measuring
CN105549379A (en) Synchronous measurement apparatus based on high precision time reference triggering and method thereof
CN107728460B (en) A kind of high-resolution time interval measurement method
CN103487649B (en) Method and device capable of measuring both frequency of continuous waves and frequency of pulse modulation carrier waves
CN102116797A (en) High accuracy numerical frequency measurement method based on FPGA
CN110579618B (en) Motor rotating speed acquisition and analysis device and method based on FPGA
CN104849549B (en) Measure the method and system of pulse frequency
CN106771582A (en) The method of testing and tester of high-frequency pulse signal
CN208595946U (en) Level transmitter
CN105675072A (en) Frequency difference type ultrasonic flow measurement device
CN102565673A (en) Highly-reliable pulse counting test system based on FPGA (Field Programmable Gate Array)
CN203275520U (en) Pilot frequency signal phase coincidence detection system based on coincidence pulse counting
CN106770671A (en) Ultrasonic echo processing unit and method in a kind of ultrasonic detection device
CN106501622A (en) A kind of nanosecond pulse width of measuring device and method based on FPGA
CN102880071A (en) Data acquisition system with high time stamp accuracy
CN204422648U (en) A kind of modulation domain frequency counter
CN105629062A (en) Frequency detection method for variable frequency sine wave
CN101702617B (en) High Precision ±180° Digital Phase Discrimination Method and Its Implementing Device
CN103412474B (en) Range high-precision expanded circuit when TDC-GP2 based on FPGA surveys
CN104635046A (en) Modulation domain frequency counter and continuous frequency measurement method thereof
CN203191708U (en) Precise time-interval measuring instrument

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170606

Termination date: 20191029

CF01 Termination of patent right due to non-payment of annual fee