CN110646655B - RMS value-based triggering method and digital oscilloscope - Google Patents

RMS value-based triggering method and digital oscilloscope Download PDF

Info

Publication number
CN110646655B
CN110646655B CN201911153492.7A CN201911153492A CN110646655B CN 110646655 B CN110646655 B CN 110646655B CN 201911153492 A CN201911153492 A CN 201911153492A CN 110646655 B CN110646655 B CN 110646655B
Authority
CN
China
Prior art keywords
data point
data
trigger
target data
rms
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.)
Active
Application number
CN201911153492.7A
Other languages
Chinese (zh)
Other versions
CN110646655A (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.)
Shenzhen Siglent Technologies Co Ltd
Original Assignee
Shenzhen Siglent Technologies Co Ltd
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 Shenzhen Siglent Technologies Co Ltd filed Critical Shenzhen Siglent Technologies Co Ltd
Priority to CN201911153492.7A priority Critical patent/CN110646655B/en
Publication of CN110646655A publication Critical patent/CN110646655A/en
Application granted granted Critical
Publication of CN110646655B publication Critical patent/CN110646655B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R13/00Arrangements for displaying electric variables or waveforms
    • G01R13/02Arrangements for displaying electric variables or waveforms for displaying measured electric variables in digital form
    • G01R13/0209Arrangements for displaying electric variables or waveforms for displaying measured electric variables in digital form in numerical form
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/552Powers or roots, e.g. Pythagorean sums

Abstract

A triggering method based on RMS value and a digital oscilloscope are provided, wherein the triggering method comprises the following steps: acquiring sampling data of a signal, wherein the sampling data comprises a plurality of data points distributed according to a sampling sequence; calculating the root mean square of any data point in the sampling data and a plurality of data points distributed in the front to obtain a corresponding Root Mean Square (RMS) value; forming a trigger signal according to the RMS value corresponding to each data point in the sampled data, and generating a trigger event in a preset trigger mode by using the trigger signal; the triggering event is output. According to the method and the device, the trigger signal is formed according to the RMS value corresponding to each data point, so that the RMS values before and after meeting the trigger condition and/or corresponding sampling data can be stored for a user to analyze after the change trend of the RMS value meets the trigger condition, and the trigger function of the oscilloscope is enriched.

Description

RMS value-based triggering method and digital oscilloscope
Technical Field
The invention relates to the technical field of oscilloscopes, in particular to a triggering method based on RMS value and a digital oscilloscope.
Background
A common oscilloscope or data recorder measures or records the real-time voltage of a measured signal, and the trigger function of the oscilloscope is based on the real-time voltage of the measured signal. However, in some special application scenarios, such as motor drive, ac power measurement, the RMS value (root mean square value) of the measured signal may be of greater interest to the user than the real-time voltage value. At present, most digital oscilloscopes on the market support RMS measurement based on a measured signal, but only the RMS calculation result of the currently acquired voltage data is displayed on a display interface, and a trigger function or a recording and analyzing function cannot be realized based on the change situation of the RMS value of the measured signal.
The existing digital oscilloscope can provide some information related to the RMS value (including a current value, an average value, a maximum value, a minimum value, a standard deviation and the like of the RMS), and specifically refer to fig. 1, but the information is often only a result obtained by performing correlation operation on all or part of currently acquired sampling data, and the information is updated on the basis of acquisition frames. In this case, the user can only observe the RMS variation trend of the measured signal through the update result of the RMS value, however, the data outside the collected frames are not displayed in the single RMS calculation result, and for the user concerned about the RMS value of the measured signal, such information is very limited, and the application requirements of observing the RMS value in real time and triggering by using the RMS cannot be met.
Referring to fig. 2, in the prior art, only the data in the acquisition frame is calculated and the corresponding RMS value is obtained, and the data in the acquisition interval (the situation that data acquisition cannot be performed due to dead time in the acquisition-display process) does not participate in the calculation process, so that the adjacent two calculation results, i.e., RMS1 and RMS2, can be obtained only from the acquisition frame 1 and the acquisition frame 2. In this case, only the operation is performed on each frame of the collected data, but the operation cannot be performed based on each real-time sampling point, and the function of real-time triggering cannot be realized like the real-time sampled data.
Disclosure of Invention
The invention mainly solves the technical problem of how to calculate and obtain the RMS value in real time so as to improve the triggering function of the oscilloscope by using the real-time RMS value. In order to solve the technical problem, the application provides a triggering method based on an RMS value and a digital oscilloscope.
According to a first aspect, there is provided in an embodiment a method of RMS value based triggering, comprising: acquiring sampling data of a signal, wherein the sampling data comprises a plurality of data points distributed according to a sampling sequence; calculating the root mean square of any data point in the sampling data and a plurality of data points distributed in the front to obtain a corresponding RMS value; forming a trigger signal according to the RMS value corresponding to each data point in the sampled data, and generating a trigger event in a preset trigger mode by using the trigger signal; and outputting the trigger event.
For any data point in the sampled data, calculating the root mean square of the data point and a plurality of data points distributed in the front to obtain a corresponding RMS value, including: for any data point in the sampling data, determining the data point as a target data point; forming a sample set according to a plurality of data points distributed in front of the target data point and the target data point; and carrying out root mean square calculation on the amplitude of each data point in the sample set to obtain an RMS value corresponding to the target data point.
Forming a sample set according to a number of data points distributed before the target data point and the target data point, including: judging whether each data point distributed in front of the target data point reaches the preset total sample amount or not; if yes, constructing data points which are distributed before the target data point and reach the total amount of the sample, and the target data point as the sample set; if not, the data points distributed before the target data point and the target data point are constructed into the sample set.
If the data points which are distributed before the target data point and reach the total amount of the sample and the target data point are constructed into the sample set, the RMS values corresponding to the target data point are obtained by the following steps: obtaining the amplitude of the target data point and usingx n Representing, and obtaining the RMS value corresponding to the last data point of the target data point and usingRMS n-1Is shown in whichnThe sampling sequence number of the data point in the sampling sequence is; calculating the RMS value corresponding to the target data point and formulating as
Figure 106353DEST_PATH_IMAGE001
Wherein the content of the first and second substances,sqrt() Which represents the calculation of the square root,Nis the total amount of the sample.
If all data points distributed before the target data point and the target data point are constructed into the sample set, the RMS values corresponding to the target data point are obtained by the following steps: obtaining theAmplitude of target data point andx n representing, and obtaining the RMS value corresponding to the last data point of the target data point and usingRMS n-1Is shown in whichnThe distribution serial number of the data points in the sampling sequence is shown; calculating the RMS value corresponding to the target data point and formulating as
Figure 931090DEST_PATH_IMAGE002
Wherein the content of the first and second substances,sqrt() Which represents the calculation of the square root,Nis the total amount of the sample.
The forming of a trigger signal according to the RMS value corresponding to each data point in the sampled data and the generation of a trigger event in a preset trigger mode by using the trigger signal include: distributing RMS values corresponding to each data point in the sampled data according to a sampling sequence to form a trigger signal, wherein the trigger signal comprises at least one digital waveform formed by a plurality of continuous RMS values; and when the digital waveform is judged to reach the set triggering condition in the preset triggering mode, generating a triggering event.
When the trigger event is output, the method further comprises the following steps: determining a corresponding data point of the trigger event in the sampled data; and forming a frame of collected data by the corresponding data points in the sampled data and a plurality of data points distributed in the front and the back, and storing the collected data.
The trigger mode comprises any one of the following modes: edge trigger mode, slope trigger mode, pulse width trigger mode, alternate trigger mode, window trigger mode, zone trigger mode, interval trigger mode, timeout trigger mode, under-amplitude trigger mode, pattern trigger mode, bus trigger mode, and precondition edge trigger mode.
According to a second aspect, there is provided in one embodiment a digital oscilloscope, comprising: an RMS calculation module for obtaining sampled data of a signal, the sampled data comprising a plurality of data points distributed according to a sampling sequence; and for any data point in the sampling data, calculating the root mean square of the data point and a plurality of data points distributed in the front to obtain a corresponding RMS value; the trigger module is used for forming a trigger signal according to the RMS value corresponding to each data point in the sampling data and generating a trigger event in a preset trigger mode by using the trigger signal; and the storage module is used for forming a frame of acquired data by the data points corresponding to the trigger event in the sampled data and the data points distributed at the front and the back of the trigger event when the trigger event is output, and storing the acquired data.
According to a third aspect, an embodiment provides a computer-readable storage medium comprising a program executable by a processor to implement the triggering method described in the first aspect above.
The beneficial effect of this application is:
according to the embodiment, the triggering method based on the RMS value and the digital oscilloscope are provided, wherein the triggering method comprises the following steps: acquiring sampling data of a signal, wherein the sampling data comprises a plurality of data points distributed according to a sampling sequence; calculating the root mean square of any data point in the sampling data and a plurality of data points distributed in the front to obtain a corresponding Root Mean Square (RMS) value; forming a trigger signal according to the RMS value corresponding to each data point in the sampled data, and generating a trigger event in a preset trigger mode by using the trigger signal; the triggering event is output. On the first hand, the method is used for calculating the root mean square of the data points in the sampled data, the RMS value can be updated once every new data point is added in the sampling process, the requirement of synchronous updating of the RMS value and the sampled data is met, and the method is favorable for observing the variation trend of the RMS value with higher real-time performance; in the second aspect, because synchronous updating is realized between the calculation result of the RMS value and each data point of the sampling data, the real-time calculation result of the RMS value can be used as a trigger source of the oscilloscope, a trigger signal is formed, and a trigger event is generated; in the third aspect, the trigger signal is formed according to the RMS values corresponding to the data points, so that the RMS values before and after meeting the trigger condition and/or corresponding sampling data can be stored for a user to analyze after the variation trend of the RMS values meets the trigger condition, and the trigger function of the oscilloscope is enriched.
Drawings
FIG. 1 is a display interface showing an RMS value measurement in a conventional oscilloscope;
FIG. 2 is a schematic diagram of a prior art oscilloscope using collected frames to obtain RMS values;
FIG. 3 is a schematic diagram of a digital oscilloscope according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a digital oscilloscope according to another embodiment of the present application;
FIG. 5 is a flow chart of the RMS value based triggering method of the present application;
FIG. 6 is a flow chart of calculating the RMS value corresponding to any one data point;
FIG. 7 is a flow chart of forming a sample set;
FIG. 8 is a flow chart of storing correlated sample data based on an output trigger event;
FIG. 9 is a graphical representation of the relationship between each data point in the sampled data and its corresponding RMS value;
fig. 10 is a diagram illustrating a relationship between sampling data and a trigger signal.
Detailed Description
The present invention will be described in further detail with reference to the following detailed description and accompanying drawings. Wherein like elements in different embodiments are numbered with like associated elements. In the following description, numerous details are set forth in order to provide a better understanding of the present application. However, those skilled in the art will readily recognize that some of the features may be omitted or replaced with other elements, materials, methods in different instances. In some instances, certain operations related to the present application have not been shown or described in detail in order to avoid obscuring the core of the present application from excessive description, and it is not necessary for those skilled in the art to describe these operations in detail, so that they may be fully understood from the description in the specification and the general knowledge in the art.
Furthermore, the features, operations, or characteristics described in the specification may be combined in any suitable manner to form various embodiments. Also, the various steps or actions in the method descriptions may be transposed or transposed in order, as will be apparent to one of ordinary skill in the art. Thus, the various sequences in the specification and drawings are for the purpose of describing certain embodiments only and are not intended to imply a required sequence unless otherwise indicated where such sequence must be followed.
The numbering of the components as such, e.g., "first", "second", etc., is used herein only to distinguish the objects as described, and does not have any sequential or technical meaning. The term "connected" and "coupled" when used in this application, unless otherwise indicated, includes both direct and indirect connections (couplings).
The first embodiment,
Referring to fig. 3, the present application discloses a digital oscilloscope 1, which mainly includes an RMS calculation module 11, a trigger module 12 and a storage module 13, which are described below.
The RMS calculation module 11 is configured to obtain sampling data of a signal, where the sampling data should include a plurality of data points distributed according to a sampling sequence, and generally, after ADC sampling is performed on an analog signal, a plurality of data points that are uniformly distributed according to a time sequence are obtained, and the data points may constitute the sampling data.
In addition, for any data point in the sampled data, the RMS calculation module 11 is further configured to calculate a root mean square of the data point and a plurality of data points distributed in the past, so as to obtain a corresponding RMS value. It should be noted that for a new input data point, the corresponding RMS value can be calculated in real time, so the RMS value is updated in real time with each data point in the sampled data, so that each data point is correspondingly calculated to obtain an RMS value. The process of calculating the RMS value corresponding to any one data point will be described in detail in the method examples below.
The trigger module 12 is in signal connection with the RMS calculation module 11, and the trigger module 12 is configured to form a trigger signal according to an RMS value corresponding to each data point in the sampled data, and generate a trigger event in a preset trigger mode by using the trigger signal. It should be noted that, since the RMS value is updated in real time with each data point in the sampled data, the trigger signal is composed of a series of a plurality of data points whose values are substantially continuous, and forms a waveform in digital form in the time domain. Then, the RMS calculation module 11 may be used as a trigger source to perform a trigger operation according to the waveform variation trend of the trigger signal.
In this embodiment, the trigger modes that trigger module 12 may support include any one of the following modes: edge trigger mode, slope trigger mode, pulse width trigger mode, alternate trigger mode, window trigger mode, zone trigger mode, interval trigger mode, timeout trigger mode, under-amplitude trigger mode, pattern trigger mode, bus trigger mode, and precondition edge trigger mode. For example, when the trigger condition of the edge triggered mode is set to a rising edge, then the amplitude of a certain portion of data points in the trigger signal causes triggering during a change from low to high and generates a trigger event.
The storage module 13 is in signal connection with the trigger module 12, and the storage module 13 is configured to form a frame of acquired data from data points corresponding to the trigger event in the sampled data and a plurality of data points distributed in front of and behind the trigger event when the trigger module 12 outputs the trigger event, and store the acquired data. It is understood that the collected data stored in the storage module 13 can be called by other functional modules (such as a display control module) in the oscilloscope, so that the user can use the collected data to perform numerical analysis or display viewing on the trigger condition.
It should be noted that the trigger modes supported by the trigger module 12 all belong to the prior art, and various mentioned trigger modes are briefly described here to assist technicians to accurately understand the technical solution.
Edge triggered mode (Edge), which refers to the use of Edge triggering on simple repetitive signals, triggering on rising edges, falling edges, or a combination of both.
Slope triggered mode (Slope), which refers to triggering when a rising or falling edge crosses two thresholds within or outside a specified time range, can generally set a trigger level, such as a rising or falling edge.
Pulse width triggered mode (Pulse), refers to triggering at the end of a Pulse when the Pulse width meets specified time conditions. It is generally allowed to define positive or negative pulse widths, above or below which triggering occurs; a range of pulse widths may also be specified, and triggers may occur when falling within or exceeding this range.
Alternate trigger mode (Replace) means that the trigger signal comes from two channels, and two unrelated signals are observed simultaneously in an alternate manner, and different trigger types can be selected for the two channels.
Window trigger mode (Window), refers to triggering when the signal level crosses the Window area.
Interval trigger mode (Interval) refers to triggering on the second rising edge or falling edge when the Interval time meets a specified time condition.
The timeout triggered mode (Dropout) is a mode in which a trigger occurs when a signal disappears longer than a timeout period, and a lost signal can be detected.
Under-amplitude trigger mode (Runt), which is a trigger in the form of an under-amplitude when a pulse crosses a first threshold level and fails to cross a second threshold level before crossing the first threshold level again, is generally used to capture pulses falling within a user-defined amplitude range.
Pattern trigger patterns (patterns), which refer to the implementation of triggering using a logical combination of multiple inputs, typically select four boolean operators (and, nand, or, nor), and set the high or low voltage logic level independently for each input channel.
Bus triggered mode (Serial), refers to triggering under Serial bus specific conditions.
The precondition edge triggered mode (Qualified) is to trigger in the edge mode after the precondition is satisfied.
It should be noted that the trigger modes supported by the trigger module 12 in the present application are all in the prior art, and in the prior art, the sampled data is mostly used as the trigger signal, whereas in the present application, the RMS value is used to form the digital signal as the trigger signal.
Example II,
Referring to fig. 4, the present application discloses another digital oscilloscope 1', which includes not only an RMS calculation module 11, a trigger module 12, and a storage module 13, but also a sampling module 14 and a data selection module 15.
The sampling module 14 is disposed at the front end of the RMS calculation module 11, and is configured to convert the signal into sampling data by using methods such as ADC sampling, and the sampling frequency may be set according to a user's requirement. Since the functions performed by the sampling module 14 are prior art, they will not be described in detail here.
The data selection module 15 is disposed between the RMS calculation module 11 and the trigger module 12, one input end of the data selection module 15 receives the RMS value output by the RMS calculation module 11, the other input end of the data selection module receives the sampled data output by the sampling module 14, and the data selection module 15 is configured to select one path of data from the RMS value and the sampled data to transmit to the trigger module 12. It should be noted that a one-out-of-multiple switch chip (e.g., a multiplexer) may be used as the data selection module 15, so as to implement the one-out-of-two data selection function of the data. Since the functions implemented by the data selection module 15 belong to the prior art, they will not be described in detail here.
It can be understood by those skilled in the art that in the above-mentioned another embodiment, not only the conventional sampling data may be selected for the triggering operation, but also the RMS value may be selected for the triggering operation, so that the triggering function of the oscilloscope is enriched, and convenience is provided for a technician to analyze the characteristics of the signal from the root mean square angle.
Example III,
Referring to fig. 5, the present application provides a triggering method based on RMS value based on the digital oscilloscope disclosed in the first embodiment or the second embodiment, which includes steps S100-S400, respectively described below.
Step S100, acquiring sampling data of the signal, where the sampling data includes a plurality of data points distributed according to a sampling sequence. For example, the RMS calculation module 11 may obtain sample data from the sampling module 14.
Step S200, calculating the root mean square of any data point in the sampling data and a plurality of data points distributed in the front to obtain a corresponding Root Mean Square (RMS) value.
For example, after the RMS calculation module 11 receives a new input data point, the corresponding RMS value may be calculated in real time based on the data point and other data points previously received. It will be appreciated that the RMS value is updated in real time with each data point in the sampled data, so that each data point is correspondingly calculated to have an RMS value.
For example, as shown in fig. 9, for data points x (1) to x (10) in the sampled data, RMS (1) to RMS (10) in a one-to-one correspondence may be calculated by the RMS calculation module 11, and there is a correspondence between each data point and the corresponding RMS value.
Step S300, forming a trigger signal according to the RMS value corresponding to each data point in the sampling data, and generating a trigger event in a preset trigger mode by using the trigger signal.
In one embodiment, the trigger module 12 distributes the RMS values corresponding to each data point in the sampled data according to a sampling sequence to form the trigger signal. The trigger signal here comprises at least one digital waveform of a plurality of successive RMS values, with the aid of which the trigger condition can be compared. In addition, when the trigger module 12 determines that the digital waveform reaches the trigger condition set in the preset trigger mode, a trigger event is generated.
For example, in fig. 10, for sampled data obtained from a sinusoidal signal with an amplitude, the RMS values corresponding to the respective data points are represented in the time domain, so as to form a trigger signal with a fluctuation characteristic, and the distribution order of the RMS values of the trigger signal is consistent with the distribution order of the data points in the sampled data, and has a one-to-one correspondence relationship. Although the curve of the trigger signal tends towards horizontal, the digital waveform before horizontal has distinct rising and falling edges, so the digital waveform before horizontal can be used as the trigger signal to generate the trigger event.
In this embodiment, the trigger modes that trigger module 12 may support include any one of the following modes: edge trigger mode, slope trigger mode, pulse width trigger mode, alternate trigger mode, window trigger mode, zone trigger mode, interval trigger mode, timeout trigger mode, under-amplitude trigger mode, pattern trigger mode, bus trigger mode, and precondition edge trigger mode. For example, when the trigger condition of the edge triggered mode is set to a rising edge, then the amplitude of a certain portion of data points in the trigger signal causes triggering during a change from low to high and generates a trigger event.
In step S400, the trigger module 12 outputs a trigger event.
In another embodiment, after the trigger event is output through step S400, step S500 is further included for storing sampled data and/or RMS values before and after the trigger event. Specifically, steps S510-S520 are included, which are described below.
In step S510, the storage module 13 determines a corresponding data point of the trigger event in the sample data. It will be appreciated that a certain portion of the RMS value of the trigger signal, which corresponds to the same number of data points in the sampled data, will result in a trigger event, and that these corresponding data points are readily determined from the trigger event.
Step S520, forming a frame of collected data by the corresponding data points in the sampled data and the data points distributed before and after, and storing the collected data of the frame.
For example, it is assumed that each frame of collected data may include 1000 data points, and if a digital waveform formed by RMS values corresponding to 500 th to 700 th data points in the sampled data causes a trigger event, the 500 th to 700 th data points, the first 1 st to 499 th data points, and the second 701 th to 1000 th data points form one frame of collected data, so that the frame of collected data is easily saved. In addition, the RMS values corresponding to each data point in the frame of collected data one to one can be obtained to form a group of RMS values, so that the group of RMS values can be saved. It will be understood by those skilled in the art that each frame of collected data and/or each set of RMS values stored in the storage module 13 may be called up at any time during subsequent processing, so as to perform data analysis or display viewing on the triggering condition.
In this embodiment, the above step S200 involves calculating the root mean square of any one data point and a plurality of data points distributed in front to obtain the corresponding RMS value, and the implementation process may include steps S210 to S230, which may be specifically described as follows with reference to fig. 6.
In step S210, the RMS calculation module 11 determines any data point in the sampled data as a target data point.
Step S220, a sample set is formed according to the target data points and a plurality of data points distributed before the target data points. In one embodiment, referring to FIG. 7, this step S220 may include steps S221-S223, respectively, as described below.
In step S221, the RMS calculation module 11 determines whether each data point distributed before the target data point reaches a preset total sample amount (e.g., total sample amount N = 1000). If yes, the process proceeds to step S222, otherwise, the process proceeds to step S223.
In step S222, the data points that are distributed before the target data point and reach the total amount of the sample, and the target data point are constructed as a sample set.
Step S223, constructing each data point distributed before the target data point and the target data point as the sample set.
Step S230, performing root mean square calculation on the amplitude of each data point in the sample set to obtain an RMS value corresponding to the target data point.
In the first case, when the sample set is constructed and obtained according to step S222, the RMS value corresponding to the target data point may be obtained by the following procedure.
(1) Obtaining the amplitude of the target data point and usingx n Representing, and obtaining the RMS value corresponding to the last data point of the target data point and usingRMS n-1Is shown in whichnIs the sample number of the data point in the sample sequence.
(2) The RMS values corresponding to the target data points are calculated and formulated as
Figure 968797DEST_PATH_IMAGE001
Wherein the content of the first and second substances,sqrt() Which represents the calculation of the square root,Nas a result of the total amount of the sample,x n-N-1is as followsn-N-Amplitude of 1 data point.
In case two, when the sample set is constructed and obtained according to step S223, the RMS value corresponding to the target data point can be obtained by the following procedure.
(1) Obtaining the amplitude of the target data point and usingx n Representing, and obtaining the RMS value corresponding to the last data point of the target data point and usingRMS n-1Is shown in whichnThe distribution sequence number of the data points in the sampling sequence.
(2) The RMS values corresponding to the target data points are calculated and formulated as
Figure 627312DEST_PATH_IMAGE002
Wherein the content of the first and second substances,sqrt() Which represents the calculation of the square root,Nis the total amount of the sample.
It should be noted that steps S100 to S500 disclosed in this embodiment may be implemented by a general functional module, for example, the functions of the RMS calculation module 11, the trigger module 12, and the storage module 13 are fused, so as to implement the functions of integrating the RMS value calculation, the generation of the trigger event, and the storage of the related data.
It should be noted that the trigger mode adopted in the present embodiment may include any one of the following modes: edge trigger mode, slope trigger mode, pulse width trigger mode, alternate trigger mode, window trigger mode, zone trigger mode, interval trigger mode, timeout trigger mode, under-amplitude trigger mode, pattern trigger mode, bus trigger mode, and precondition edge trigger mode.
To help those skilled in the art clearly understand the technical solution of the present application, the technical solution disclosed in step S230 will be explained in principle.
As will be appreciated by those skilled in the art, in the prior art, the RMS value for a frame of acquired data is typically calculated using equation (1) below.
Figure 120610DEST_PATH_IMAGE003
(1)
Based on the formula (1), it can be seen that in the conventional scheme, the root mean square can be calculated only after one frame of acquired data is obtained, assuming that the total number of samples N =1000 of each frame of acquired data, that is, before an RMS operation is performed, 1000 data points must be made together, and then the RMS value corresponding to the frame of acquired data is calculated according to the formula (1).
However, according to the technical scheme provided by the application, the RMS operation is not required to be performed by making a full 1000 data points, but the RMS value and the sampled data are synchronously updated and calculated along with the increase of the sampled data. As will be described in detail below.
When the amplitude of the 1 st data point is acquiredx 1The RMS value is calculated in real time, expressed as
Figure 889983DEST_PATH_IMAGE004
(2)
When the amplitude of the 2 nd data point is acquiredx 2The RMS value is calculated in real time, expressed as
Figure 785126DEST_PATH_IMAGE005
(3)
By analogy, the RMS value corresponding to each data point can be obtained, and then the first time when the RMS value corresponding to each data point is obtainednAmplitude of data points
Figure 614542DEST_PATH_IMAGE006
n The RMS value is calculated in real time, expressed as
Figure 595136DEST_PATH_IMAGE007
(4)
In the course of the calculation process,
Figure 433779DEST_PATH_IMAGE008
is a special variable, which can be obtained according to equation (4)
Figure 917850DEST_PATH_IMAGE009
(5)
It can be seen that the equal sign of equation (5) to the right is the sum of the squares of the magnitudes of all data points that have been acquired, and then the first time that the sum of the squares is acquiredn+1 data points (amplitude ofx n+1) Then, can obtain
Figure 183747DEST_PATH_IMAGE010
(6)
Equation (6) represents the relationship between the amplitude of the newly obtained data point and the RMS value obtained by the previous calculation, that is, the RMS value corresponding to the newly obtained data point can be calculated without calling out the amplitudes of all the new data points already obtained, and the RMS value corresponding to the new data point can be calculated directly by the RMS value calculated last time and the amplitude of the new data point, and is expressed as
Figure 386058DEST_PATH_IMAGE011
(7)
However, in application, in order to avoid calculation redundancy, the RMS calculation is not performed on all acquired data points, but only on data points in the sample volume, so that the validity of the calculation result can be ensured, and the number of data points involved in each calculation can be reduced.
For example, on the premise that the sample capacity N =1000, the RMS value corresponding to each data point can be calculated by using formula (4) from the first data point, and after the 1001 st data point is acquired, the data range of the RMS calculation will be the original great facex 1x 1000Is changed intox 2x 1001At this time, the magnitude of the new data point
Figure 28392DEST_PATH_IMAGE006
1001While adding the operation, the amplitude of the first data pointx 1Will operate to keep the sample size to continue at 1000, specifically denoted as
Figure 632549DEST_PATH_IMAGE012
(8)
In summary, the RMS value of each data point is calculated in two cases, the first case is the current data sequence numbernLess than or equal to the sample capacity N, the second case being the current data sequence numbernGreater than the sample volume N. When the two conditions are combined, the RMS value is calculated as
Figure 69346DEST_PATH_IMAGE013
(9)
Figure 758953DEST_PATH_IMAGE014
(10)
Namely as shown in
Figure 736137DEST_PATH_IMAGE015
Figure 70166DEST_PATH_IMAGE001
Those skilled in the art will appreciate that all or part of the functions of the various methods in the above embodiments may be implemented by hardware, or may be implemented by computer programs. When all or part of the functions of the above embodiments are implemented by a computer program, the program may be stored in a computer-readable storage medium, and the storage medium may include: a read only memory, a random access memory, a magnetic disk, an optical disk, a hard disk, etc., and the program is executed by a computer to realize the above functions. For example, the program may be stored in a memory of the device, and when the program in the memory is executed by the processor, all or part of the functions described above may be implemented. In addition, when all or part of the functions in the above embodiments are implemented by a computer program, the program may be stored in a storage medium such as a server, another computer, a magnetic disk, an optical disk, a flash disk, or a removable hard disk, and may be downloaded or copied to a memory of a local device, or may be version-updated in a system of the local device, and when the program in the memory is executed by a processor, all or part of the functions in the above embodiments may be implemented.
The present invention has been described in terms of specific examples, which are provided to aid understanding of the invention and are not intended to be limiting. For a person skilled in the art to which the invention pertains, several simple deductions, modifications or substitutions may be made according to the idea of the invention.

Claims (8)

1. A method for triggering based on RMS values, comprising:
acquiring sampling data of a signal, wherein the sampling data comprises a plurality of data points distributed according to a sampling sequence;
calculating the root mean square of any data point in the sampling data and a plurality of data points distributed in the front to obtain a corresponding RMS value; the calculation process comprises the following steps: for any data point in the sampling data, determining the data point as a target data point, forming a sample set according to a plurality of data points distributed in front of the target data point and the target data point, and performing root-mean-square calculation on the amplitude of each data point in the sample set to obtain an RMS value corresponding to the target data point;
wherein the process of forming a sample set from a plurality of data points distributed before the target data point and the target data point comprises: judging whether each data point distributed before the target data point reaches a preset sample total amount, if so, constructing the data point distributed before the target data point and reaching the sample total amount and the target data point into the sample set, and if not, constructing each data point distributed before the target data point and the target data point into the sample set;
forming a trigger signal according to the RMS value corresponding to each data point in the sampled data, and generating a trigger event in a preset trigger mode by using the trigger signal;
and outputting the trigger event.
2. The method of claim 1, wherein if the data points that are distributed before the target data point and reach the total amount of samples and the target data point are constructed as the sample set, the RMS values corresponding to the target data point are obtained by:
obtaining the amplitude of the target data point and usingx n Representing, and obtaining the RMS value corresponding to the last data point of the target data point and usingRMS n-1Is shown in whichnThe sampling sequence number of the data point in the sampling sequence is;
calculating the RMS value corresponding to the target data point and formulating as
Figure DEST_PATH_IMAGE001
Wherein the content of the first and second substances,sqrt() Which represents the calculation of the square root,Nis the total amount of the sample.
3. The trigger method of claim 1, wherein when each data point distributed before the target data point and the target data point are constructed as the sample set, the RMS values corresponding to the target data point are obtained by:
obtaining the amplitude of the target data point and usingx n Representing, and obtaining the RMS value corresponding to the last data point of the target data point and usingRMS n-1Is shown in whichnThe distribution serial number of the data points in the sampling sequence is shown;
calculating the RMS value corresponding to the target data point and formulating as
Figure 260998DEST_PATH_IMAGE002
Wherein the content of the first and second substances,sqrt() Which represents the calculation of the square root,Nis the total amount of the sample.
4. The triggering method according to any one of claims 1-3, wherein the forming a triggering signal according to the RMS values corresponding to each data point in the sampled data, and using the triggering signal to generate a triggering event in a preset triggering mode comprises:
distributing RMS values corresponding to each data point in the sampled data according to a sampling sequence to form a trigger signal, wherein the trigger signal comprises at least one digital waveform formed by a plurality of continuous RMS values;
and when the digital waveform is judged to reach the set triggering condition in the preset triggering mode, generating a triggering event.
5. The triggering method of claim 4, after outputting the triggering event, further comprising:
determining a corresponding data point of the trigger event in the sampled data;
and forming a frame of collected data by the corresponding data points in the sampled data and a plurality of data points distributed in the front and the back, and storing the collected data.
6. The triggering method recited in claim 5, wherein the triggering mode comprises any one of: edge trigger mode, slope trigger mode, pulse width trigger mode, alternate trigger mode, window trigger mode, zone trigger mode, interval trigger mode, timeout trigger mode, under-amplitude trigger mode, pattern trigger mode, bus trigger mode, and precondition edge trigger mode.
7. A digital oscilloscope, comprising:
an RMS calculation module for obtaining sampled data of a signal, the sampled data comprising a plurality of data points distributed according to a sampling sequence; and for any data point in the sampling data, calculating the root mean square of the data point and a plurality of data points distributed in the front to obtain a corresponding RMS value;
the trigger module is used for forming a trigger signal according to the RMS value corresponding to each data point in the sampling data and generating a trigger event in a preset trigger mode by using the trigger signal;
the storage module is used for forming a frame of collected data by the data points corresponding to the trigger event in the sampled data and the data points distributed at the front and the back when the trigger event is output, and storing the collected data;
the RMS calculation module includes: for any data point in the sampling data, determining the data point as a target data point, forming a sample set according to a plurality of data points distributed in front of the target data point and the target data point, and performing root-mean-square calculation on the amplitude of each data point in the sample set to obtain an RMS value corresponding to the target data point;
wherein the process of forming a sample set from a plurality of data points distributed before the target data point and the target data point comprises: and judging whether each data point distributed before the target data point reaches a preset sample total amount, if so, constructing the data point distributed before the target data point and reaching the sample total amount and the target data point into the sample set, and otherwise, constructing each data point distributed before the target data point and the target data point into the sample set.
8. A computer-readable storage medium, characterized by comprising a program executable by a processor to implement the triggering method of any one of claims 1-6.
CN201911153492.7A 2019-11-22 2019-11-22 RMS value-based triggering method and digital oscilloscope Active CN110646655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911153492.7A CN110646655B (en) 2019-11-22 2019-11-22 RMS value-based triggering method and digital oscilloscope

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911153492.7A CN110646655B (en) 2019-11-22 2019-11-22 RMS value-based triggering method and digital oscilloscope

Publications (2)

Publication Number Publication Date
CN110646655A CN110646655A (en) 2020-01-03
CN110646655B true CN110646655B (en) 2020-03-31

Family

ID=68995975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911153492.7A Active CN110646655B (en) 2019-11-22 2019-11-22 RMS value-based triggering method and digital oscilloscope

Country Status (1)

Country Link
CN (1) CN110646655B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1236105A (en) * 1998-05-08 1999-11-24 特克特朗尼克公司 Smart auto-ranging RMS measurement method and apparatus
US6064193A (en) * 1997-07-17 2000-05-16 Tektronix, Inc. Method and apparatus for measuring the mean square value of an electrical signal
CN103257259A (en) * 2012-02-15 2013-08-21 安捷伦科技有限公司 Digital oscilloscope comprising multiple data acquisition pathways
CN106093638A (en) * 2016-06-06 2016-11-09 国网天津市电力公司 A kind of Voltage Drop root-mean-square value and the mode identification method falling frequency estimation
CN107478883A (en) * 2017-03-16 2017-12-15 深圳市鼎阳科技有限公司 A kind of method and apparatus for realizing any N times of equivalent sampling

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6064193A (en) * 1997-07-17 2000-05-16 Tektronix, Inc. Method and apparatus for measuring the mean square value of an electrical signal
CN1236105A (en) * 1998-05-08 1999-11-24 特克特朗尼克公司 Smart auto-ranging RMS measurement method and apparatus
CN103257259A (en) * 2012-02-15 2013-08-21 安捷伦科技有限公司 Digital oscilloscope comprising multiple data acquisition pathways
CN106093638A (en) * 2016-06-06 2016-11-09 国网天津市电力公司 A kind of Voltage Drop root-mean-square value and the mode identification method falling frequency estimation
CN107478883A (en) * 2017-03-16 2017-12-15 深圳市鼎阳科技有限公司 A kind of method and apparatus for realizing any N times of equivalent sampling

Also Published As

Publication number Publication date
CN110646655A (en) 2020-01-03

Similar Documents

Publication Publication Date Title
US20090076751A1 (en) Systems and methods for measuring signal waveforms
US7254168B2 (en) Method for decomposing timing jitter on arbitrary serial data sequences
JPS5934164A (en) Corrugated take-in device
US10557870B2 (en) Apparatus and method for time correlated signal acquisition and viewing
EP2690449B1 (en) Cross domain triggering in a test and measurement instrument
CN110488165B (en) Lightning stroke discharge comprehensive analysis method and device, terminal equipment and storage medium
US20200233016A1 (en) Interactive instrument measurement analytics
JPH0361908B2 (en)
JP2005223911A (en) Method and apparatus to measure and display data dependent eye diagrams
CN110672899B (en) Eye pattern reconstruction method for digital oscilloscope and storage medium
CN102012445A (en) Test and measurement instrument and method for providing post-acquisition trigger control and presentation
CN110887984B (en) Digital oscilloscope supporting eye pattern reconstruction
US20170272431A1 (en) Method and apparatus for analyzing a transmission signal
JP6151895B2 (en) Test and measurement apparatus and method
CN110646655B (en) RMS value-based triggering method and digital oscilloscope
KR20120094415A (en) Precision measurement of waveforms
US9496993B1 (en) Noise analysis to reveal jitter and crosstalk's effect on signal integrity
CN111413725A (en) System and method for realizing gamma-gamma digital coincidence measurement by using virtual instrument technology
US20230333148A1 (en) Device and method for waveform searching by example
US20040002847A1 (en) Method for creating and displaying signaling eye-plots
CN108254607A (en) Digital oscilloscope method for displaying waveform and device
US11624781B2 (en) Noise-compensated jitter measurement instrument and methods
CN115856383A (en) Multi-channel quasi-synchronization triggering device and method
JP2003014786A (en) Trigger signal generator
CN117110676A (en) Apparatus and method for waveform searching by way of example

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant