CN116225623B - Virtual data generation method - Google Patents

Virtual data generation method Download PDF

Info

Publication number
CN116225623B
CN116225623B CN202310488017.5A CN202310488017A CN116225623B CN 116225623 B CN116225623 B CN 116225623B CN 202310488017 A CN202310488017 A CN 202310488017A CN 116225623 B CN116225623 B CN 116225623B
Authority
CN
China
Prior art keywords
value
function
values
period
theoretical
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
CN202310488017.5A
Other languages
Chinese (zh)
Other versions
CN116225623A (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.)
Beijing Golden Digital Technology Co ltd
Original Assignee
Beijing Golden Digital Technology 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 Beijing Golden Digital Technology Co ltd filed Critical Beijing Golden Digital Technology Co ltd
Priority to CN202310488017.5A priority Critical patent/CN116225623B/en
Publication of CN116225623A publication Critical patent/CN116225623A/en
Application granted granted Critical
Publication of CN116225623B publication Critical patent/CN116225623B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Monitoring And Testing Of Transmission In General (AREA)

Abstract

The invention provides a virtual data generation method, which skillfully utilizes the different characteristics of two disturbance types, namely error and loss, lists a loss fitting function on the basis of eliminating error interference, and then the final value obtained based on the loss fitting function can be relatively close to the actual value of field equipment, thereby providing the optimal data practice field for the field equipment.

Description

Virtual data generation method
Technical Field
The present invention relates to information processing technology, and more particularly, to a virtual data generation method.
Background
The virtual number generator may generate a series of data in a database, the evolution of which may simulate the numerical variation of an actual instrument in operation. By observing the change process of the series of data in the database on the computer screen, the numerical change of the relevant parameters of the actual instrument in reality can be simulated in a virtualized way. In other words, the virtual number generator provides a virtual number "field" for the operation of the instrument in reality.
For example, the current curve of the stepper motor is changed in a sine curve mode, so that a virtual data set which is advanced along with time and is changed in the sine curve is constructed on the virtual digital generator, the current change of the stepper motor can be simulated, and a virtual digital 'practice field' is provided for observing the current change of the stepper motor.
The term "approximately" is particularly denoted by a reference sign in the above text, since the form change of the so-called sinusoidal curve is only a theoretical derivation of the current curve of the stepper motor, and the exact virtual data set of the sinusoidal curve thus formed is also only theoretical data. However, during actual operation, there is often a large deviation between the actual value and the theoretical value, which results in that the virtual digital practice field stored with the theoretical value often deviates from the actual.
This deviation of the actual value from the theoretical value is often due to two major factors: error and loss. During the operation of an actual instrument, errors are ubiquitous and sometimes absent, and any instrument inevitably gradually wears away as the operation time advances. These two factors lead to an ever-present deviation between the actual and theoretical values, thereby making it difficult for the "practice field" provided by the virtual data generator to overcome the problems caused by errors and losses.
One way to solve this problem may of course be to try to improve the accuracy and durability of the field instrument, thereby pushing down on errors and losses in the field instrument practice at full force, thereby making the actual value as close as possible to the theoretical value presented by the virtual data generator. However, as is well known, for a real instrument, the precision and durability are often improved by one grade, the cost is often required to be increased by several orders of magnitude, and the practical technical difficulty is also likely to be difficult to surmount. Therefore, this approach will be a mirror water month due to cost and technical limitations.
Disclosure of Invention
The invention provides a virtual data generation method which fully considers the inherent characteristics of two disturbances, namely errors and losses, and carries out targeted response based on the characteristics, thereby effectively overcoming the defects in the prior art.
Specifically, the present invention provides a virtual data generation method for performing data simulation on a field device, wherein a theoretical function of an output value of the field device is a periodic function, and the method is characterized in that:
sampling the output value of the field device, sampling N theoretical function periods, sampling K actual sampling values in each period, thereby forming N x K actual sampling values, each actual sampling value having a time interval of T, so that the duration of a single period is t=k x T,
the i-th actual sampling value in each theoretical function period is Ai, wherein i is more than or equal to 1 and less than or equal to K, and absolute values of all the actual sampling values in each theoretical function period are added to form a period sampling value sum S:
Figure SMS_1
dividing the sum of the period sampling values S by the number K of the actual sampling values in a single period to obtain an average value C of the absolute values of the actual sampling values in each period:
Figure SMS_2
the C value of each theoretical function period is calculated according to the formula, so that the C value sequences of the N theoretical function periods are obtained: c (C) 1 ,C 2 .....C N
Subtracting the first term C from each term of the C value sequence 1 Obtaining N D values in sequence to form a D value sequence,
setting the corresponding time stamp of each D value in the D value sequence as the initial time stamp of each theoretical function period where the D value sequence is located, thereby forming a characteristic point on a numerical value-time coordinate system by each D value in the D value sequence and the corresponding time stamp, forming N characteristic points on the numerical value-time coordinate system based on the D value sequence,
fitting a loss fitting function of which the loss varies with time by using a least square method based on the N characteristic points,
obtaining theoretical values at each time stamp according to a theoretical function of the field device, obtaining loss values at each time stamp according to the loss fitting function, subtracting the loss values from the theoretical values to obtain final values at each time stamp,
and storing the final value and the corresponding time stamp into a database for data simulation of the field device.
Optionally, the field device is a stepper motor.
Optionally, the periodic function is a sinusoidal function.
Optionally, the loss fitting function is a primary function or a secondary function.
The virtual data generation method provided by the invention skillfully utilizes the different characteristics of two disturbance types, namely error and loss, lists the loss fitting function on the basis of eliminating error interference, and then the final value obtained based on the loss fitting function can be relatively close to the actual value of the field device, so that the optimal data practice field is provided for the field device.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following discussion will discuss the embodiments or the drawings required in the description of the prior art, and it is obvious that the technical solutions described in connection with the drawings are only some embodiments of the present invention, and that other embodiments and drawings thereof can be obtained according to the embodiments shown in the drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flow chart of a virtual data generation method according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made in detail with reference to the accompanying drawings, wherein it is apparent that the embodiments described are only some, but not all embodiments of the present invention. All other embodiments, which can be made by a person of ordinary skill in the art without the need for inventive faculty, are within the scope of the invention, based on the embodiments described in the present invention.
As described above, the accuracy and durability of the field instrument are improved as much as possible, and it is often not feasible in terms of technology and cost, so in order to make the virtual data value of the virtual data generator approach the data value of the field instrument as much as possible, it is often possible to adjust only the virtual data value of the virtual data generator itself, and to make the virtual data value take into account disturbances such as errors and losses as much as possible on the basis of the reference theoretical values.
And analyzing the unavoidable data disturbance in the two practical cases of error and loss. The errors are inevitable and random, and due to the random influence of the errors, the actual value at one time stamp may be higher than the theoretical value, the actual sampling value at the next time stamp may be lower than the theoretical value, and as the number of actual value samples of the field instrument increases, the errors of the actual sampling values form a more balanced distribution above and below the theoretical value.
For example, sampling a stepper motor in the field, sampling 1000 output current values at 1000 time stamped nodes, and final analysis will find that, due to the effect of the error, the 1000 output current values each form 1000 error disturbance values, with 494 error disturbance values being higher than the average error value and 506 error disturbance values being lower than the average error value.
For a single sample value, the likelihood that its corresponding error disturbance value is either above or below the average error value is random. But for multiple sample values (e.g., 1000 as described above), the likelihood of being higher or lower than the average error value will get closer to equilibrium.
This is similar to coin casting, where the probability of a single coin cast showing a front or aspect is random, but as the number of times coins are cast increases, the number of times that a front appears and the number of times that a back appears will tend to balance.
And loss-the disturbance-exhibits characteristics quite different from errors. The loss is regular compared to the randomness of the error. As field devices age gradually, the loss does not shift up and down as much as the error, but increases gradually, and the loss disturbance value increases gradually, resulting in an actual sampling value that is smaller and smaller than the theoretical value.
In comparison with the two disturbances, namely errors and losses, the device is relatively short in service time and relatively little in loss in the early operation stage in the operation process of the field device, and the errors are more dominant in the actual sampling value compared with the disturbance of the theoretical value. However, as the device is used longer, the losses become greater and greater, so that in disturbances of the actual sampled value compared to the theoretical value, the losses will also become more and more dominant.
Therefore, the virtual data generation method provided by the invention fully considers the respective characteristics of errors and losses, and when data simulation is carried out, data formed by disturbance functions of the errors and the losses are superimposed on the basis of theoretical values, so that the data 'practice field' provided by the generator is more close to 'actual combat'.
Hereinafter, the virtual data generation method provided by the present invention will be described in detail. Fig. 1 shows a flow chart of a virtual data generation method according to the present invention.
It is first necessary to set the theoretical function of the output value of the field device as a periodic function. The theoretical function of the output value of a stepper motor is, for example, a sine function, which is a typical periodic function.
Sampling the output value of the field device, sampling N periods, and sampling K actual sampling values in each period, thereby forming n×k actual sampling values, where the time interval of each actual sampling value is T, and thus the duration of a single period is t=k×t.
The i-th actual sample value in each period is Ai (where 1.ltoreq.i.ltoreq.K), whereby the absolute values of all the actual sample values in each period are added to form a period sample value sum S as follows:
Figure SMS_3
the absolute value addition of each term is adopted here because the period sampling value in the same period may have a positive number and a negative number (for example, the first half period of the sine function in one period is a positive number and the second half period is a negative number), and the so-called error disturbance is actually directed to the deviation from the absolute value.
As described above, the error is random, but as the number increases, the up-and-down floating of the error tends to be balanced, and therefore, the up-and-down floating error which tends to be balanced is effectively neutralized by summing a plurality of actual sampling values in one period. Thus, the disturbance effect of the error on the single actual sampled value is great, but the disturbance effect is greatly reduced with the neutralization of the error.
Dividing the sum of the period sampling values S by the number K of the actual sampling values in a single period to obtain an average value C of the absolute values of the actual sampling values in each period:
Figure SMS_4
the C value in each cycle is calculated according to the above formula, thereby obtaining the C value for each of the N cycles as: c (C) 1 ,C 2 .....C N These C values represent the average of the absolute values of all samples in each cycle, and as can be seen from the above, the derivation of the S value has significantly reduced the disturbing effect of the error, while the C value is further divided by K on the basis of the S value, further reducing the effect of the error.
To the maximum extent, the above-mentioned C value (C 1 ,C 2 .....C N ) The loss process can be manifested. Due to the existence of loss, there is necessarily C 2 <C 1 ,C 3 <C 2 ...C N <C N-1 In other words, these C values show a decreasing trend due to the presence of losses.
Further, the above-mentioned C value sequence (C 1 ,C 2 .....C N ) Each term minus the first term C 1 Deriving a sequence of D values, wherein D 1 =0,D 2 =C 2 -C 1 ,D 3 =C 3 -C 1 ...D N =C N -C 1 These D values express the average decreasing amount of the absolute value of the sampling value for each period, in other words, express the influence of the loss received by the sampling value. As can be seen above, in addition to D 1 =0, the remaining D values are all less than 0.
Setting the time stamp corresponding to each D value as the initial time stamp of each period in which the D value is located, namely D 1 The corresponding timestamp is t=0, d 2 The corresponding timestamp is t=t, D 3 The corresponding timestamp is t=2t N The corresponding timestamp is t= (N-1) T. Thus, each D value can form N feature points, i.e., (0, D) 1 ),(T,D 2 ),(2T,D 3 )...((N-1)*T,D N )。
Based on the N feature points, a loss fitting function g (t) of which the loss varies with time can be fitted using a least square method. Therefore, in the virtual data generating method provided by the invention, the virtual generated data on each timestamp can firstly calculate the theoretical value according to the theoretical function, then calculate the loss value through the fitting function, and then assign the final value obtained by subtracting the loss value from the theoretical value to the corresponding timestamp, wherein the final value can reflect the final value after subtracting the loss effect under the corresponding timestamp.
The final values and the corresponding time stamps can be stored in a database, and finally the final values with the influence of the loss value and the error value subtracted are adopted on a practice field to simulate the operation of field equipment more closely to the actual situation.
Alternatively, the fitting function may be set to a primary function or a secondary function or even higher order function according to the actual requirement of the least square method.
For example, if the theoretical voltage output function (time-varying) of the stepper motor is u=2sin (t) +3 and the loss fitting function is-0.0001 t2-0.00002t-0.000001, the value of the theoretical output function (u=2sin (t) +3) is calculated under a certain timestamp, and then the value of the loss fitting function under the timestamp is compensated, so that the obtained final value can be stored in the database for fitting the voltage data of the stepper motor.
The virtual data generation method provided by the invention is skillfully utilized by the invention, the different characteristics of errors and losses are skillfully utilized, the loss fitting function is listed on the basis of eliminating the error interference, and the final value obtained based on the loss fitting function can be relatively close to the actual value of the field device, so that the optimal data practice field is provided for the field device.
The foregoing description of the exemplary embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, and variations which fall within the spirit and scope of the invention are intended to be included in the scope of the invention.

Claims (4)

1. A virtual data generation method for data simulation of a field device, a theoretical function of an output value of the field device being a periodic function, characterized by:
sampling the output value of the field device, sampling N theoretical function periods, sampling K actual sampling values in each period, thereby forming N x K actual sampling values, each actual sampling value having a time interval of T, so that the duration of a single period is t=k x T,
the i-th actual sampling value of each theoretical function period is Ai, wherein i is equal to or greater than 1 and is equal to or less than K, thereby each theoretical function period is equal to or greater than 1 and is equal to or less than KThe absolute values of all actual sample values among the function periods are added to form a period sample value sum S as follows:
Figure QLYQS_1
dividing the sum of the period sampling values S by the number K of the actual sampling values in a single period to obtain an average value C of the absolute values of the actual sampling values in each period: />
Figure QLYQS_2
The C value of each theoretical function period is calculated according to the formula, so that the C value sequences of the N theoretical function periods are obtained: c (C) 1 ,C 2 .....C N
Subtracting the first term C from each term of the C value sequence 1 Obtaining N D values in sequence to form a D value sequence,
setting the corresponding time stamp of each D value in the D value sequence as the initial time stamp of each theoretical function period where the D value sequence is located, thereby forming a characteristic point on a numerical value-time coordinate system by each D value in the D value sequence and the corresponding time stamp, forming N characteristic points on the numerical value-time coordinate system based on the D value sequence,
fitting a loss fitting function of which the loss varies with time by using a least square method based on the N characteristic points,
obtaining theoretical values at each time stamp according to a theoretical function of the field device, obtaining loss values at each time stamp according to the loss fitting function, subtracting the loss values from the theoretical values to obtain final values at each time stamp,
and storing the final value and the corresponding time stamp into a database for data simulation of the field device.
2. The method of claim 1, wherein the field device is a stepper motor.
3. The virtual data generation method of claim 2, wherein the periodic function is a sinusoidal function.
4. The virtual data generation method of claim 1, wherein the loss fitting function is a primary function or a secondary function.
CN202310488017.5A 2023-05-04 2023-05-04 Virtual data generation method Active CN116225623B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310488017.5A CN116225623B (en) 2023-05-04 2023-05-04 Virtual data generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310488017.5A CN116225623B (en) 2023-05-04 2023-05-04 Virtual data generation method

Publications (2)

Publication Number Publication Date
CN116225623A CN116225623A (en) 2023-06-06
CN116225623B true CN116225623B (en) 2023-07-07

Family

ID=86585805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310488017.5A Active CN116225623B (en) 2023-05-04 2023-05-04 Virtual data generation method

Country Status (1)

Country Link
CN (1) CN116225623B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001345762A (en) * 2000-06-06 2001-12-14 Iwatsu Electric Co Ltd Method for generating signal
CN113406990A (en) * 2021-08-20 2021-09-17 北京信息科技大学 Method and device for compensating time measurement errors based on BP neural network

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8098962B2 (en) * 2007-11-20 2012-01-17 Kabushiki Kaisha Toshiba Signal processing method, apparatus, and program
CN101251556B (en) * 2008-03-04 2010-06-30 北京航空航天大学 Sinusoidal signal four parameters testing method and virtual apparatus signal detection device
CN103066592B (en) * 2012-12-17 2015-04-01 山东电力集团公司济宁供电公司 Power network loss on-line monitoring method
CN104503533B (en) * 2014-10-13 2017-01-11 中国电子科技集团公司第四十一研究所 Automatic power linearity calibration method based on signal generator
CN111397755B (en) * 2020-04-08 2021-04-27 上海电机系统节能工程技术研究中心有限公司 Correction method for absolute error of temperature measuring instrument
CN115455359A (en) * 2022-07-25 2022-12-09 成都飞机工业(集团)有限责任公司 Automatic correction and distribution fitting method for small-batch error data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001345762A (en) * 2000-06-06 2001-12-14 Iwatsu Electric Co Ltd Method for generating signal
CN113406990A (en) * 2021-08-20 2021-09-17 北京信息科技大学 Method and device for compensating time measurement errors based on BP neural network

Also Published As

Publication number Publication date
CN116225623A (en) 2023-06-06

Similar Documents

Publication Publication Date Title
Zurell et al. Do joint species distribution models reliably detect interspecific interactions from co‐occurrence data in homogenous environments?
CN109949290B (en) Pavement crack detection method, device, equipment and storage medium
CN108512650A (en) Dynamic Hash calculation method, apparatus, node and storage medium towards block chain
CN107315889A (en) The performance test methods and storage medium of simulation engine
CN110287086A (en) A kind of the trading volume prediction technique and device of periodicity time
CN106326776A (en) Data object verification method, device and system based on rules, and electric device
KR102059472B1 (en) A System and Method for Prediction of Geomagnetic Disturbance Strength based on Solar Coronal Hole Information
CN106155897A (en) A kind of method for processing business and device
CN116225623B (en) Virtual data generation method
CN111159464A (en) Audio clip detection method and related equipment
CN110443648A (en) Information distribution method, device, electronic equipment and storage medium
CN110032750A (en) A kind of model construction, data life period prediction technique, device and equipment
US9485363B1 (en) Testing computerized analysis of communication data
CN112036607B (en) Wind power output fluctuation prediction method and device based on output level and storage medium
CN111859985B (en) AI customer service model test method and device, electronic equipment and storage medium
CN111949860B (en) Method and apparatus for generating a relevance determination model
CN108804640B (en) Data grouping method, device, storage medium and equipment based on maximized IV
Buck et al. Craniofacial evolution in Polynesia: a geometric morphometric study of population diversity
CN112214389A (en) Public testing method, device, terminal and storage medium
JP2021040362A (en) State estimation device, state estimation program, and state estimation method
CN109542798A (en) A kind of method, apparatus and electronic equipment dynamically distributing physical address
CN114707884B (en) Bank user loyalty data analysis method and device
CN116108037B (en) Database gray level release method and electronic equipment
CN109634560A (en) Random digit generation method, device and storage medium
CN114220222B (en) Offline prepaid electric quantity recharging method and system

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