Anomaly detection device and anomaly detection procedure
By dividing time windows and processing with an autoencoder, learned information is generated and anomaly degree is calculated, which solves the problem of anomaly detection caused by individual differences and consumption in vehicle durability testing, and achieves efficient and accurate anomaly detection.
Patent Information
- Application Number
- CN202180049128.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-07-20
- Filing Date
- 2021-06-18
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2041-06-18
AI Technical Summary
In existing vehicle durability testing, the data collected from different vehicles leads to significant individual differences, and the changes in measurement data caused by test consumption are highly likely to be detected as abnormal.
The time window processing unit divides vehicle signals into time windows, and combines the autoencoder and anomaly calculation unit to generate learned information, calculate the error before and after reconstruction and calculate the anomaly, and use the learned information to suppress the influence of individual differences and test consumption.
It effectively suppresses the impact of individual vehicle differences and test consumption on anomaly detection, improves detection accuracy, prevents false judgments due to impulse noise, and achieves real-time and efficient anomaly detection.
Smart Images

Figure CN115989465B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a technology for detecting abnormal vehicle signals. Background Technology
[0002] Patent documents 1 and 2 describe the following technology: during vehicle durability testing, reference data representing normal conditions is collected in advance using other vehicles, and anomalies in the data measured during the durability test are detected using this reference data.
[0003] Existing technical documents
[0004] Patent documents
[0005] Patent Document 1: Japanese Patent Application Publication No. 2015-170121
[0006] Patent Document 2: Japanese Patent Application Publication No. 2016-045861 Summary of the Invention
[0007] The problem that the invention aims to solve
[0008] In the technologies described in Patent Documents 1 and 2, since reference data is collected from vehicles different from the test subject, there is a possibility that even normal data may be detected as abnormal when there are large individual differences between the test subject vehicle and the reference data. Furthermore, when reference data is collected from vehicles with low consumption, the likelihood of detecting changes in measurement data caused by consumption during the test as abnormal increases.
[0009] The present invention was made in view of the aforementioned problems, and the objective is to provide an anomaly detection device and anomaly detection procedure that can suppress the effects of individual vehicle differences and wear and tear during testing and perform anomaly detection.
[0010] Methods for solving problems
[0011] To address the aforementioned issues, the anomaly detection device of the present invention is characterized by comprising: a time window processing unit that extracts data contained in a time window by dividing a plurality of vehicle signals containing time-series data into time windows; a learning unit that generates learned information by learning the time-series data of the vehicle signals divided by the time windows; and an anomaly calculation unit that reconstructs the time-series data of the vehicle signals divided by the time windows based on the learned information, calculates the error before and after reconstruction, and calculates the anomaly degree based on the calculated error and the learned information.
[0012] Furthermore, the anomaly detection program of the present invention is characterized in that it enables a computer to function as the anomaly detection device.
[0013] The effects of the invention
[0014] According to the present invention, during vehicle anomaly detection, the effects of individual vehicle differences and wear and tear during testing can be suppressed. Attached Figure Description
[0015] Figure 1 This is a block diagram schematically illustrating an anomaly detection system according to an embodiment of the present invention.
[0016] Figure 2 This is a flowchart illustrating an example of the operation of the anomaly detection device according to an embodiment of the present invention.
[0017] Figure 3 This is a flowchart illustrating an example of the operation of the anomaly detection device according to an embodiment of the present invention.
[0018] Figure 4 This is a schematic diagram illustrating an example of actions to ensure consistent sampling rates for vehicle signals.
[0019] Figure 5 This is a schematic diagram illustrating the action of a vehicle signal after the sampling rate has been adjusted and divided into time windows.
[0020] Figure 6 This is a schematic diagram illustrating the relationship between the waveform of a vehicle signal after sampling rate adjustment and the time window.
[0021] Figure 7 This is a schematic diagram illustrating an example of an autoencoder.
[0022] Figure 8A It is a schematic diagram used to illustrate the input and output data of the self-encoder and the reconstruction error, and it shows the normal state of the vehicle signal.
[0023] Figure 8B It is a schematic diagram used to illustrate the input and output data of the self-encoder and the reconstruction error, and it is a diagram showing the abnormal situation of the vehicle signal. Detailed Implementation
[0024] Next, embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the same reference numerals are used for the same parts, and repeated descriptions are omitted.
[0025] like Figure 1 As shown, the anomaly detection system 1 of the present invention is a system for detecting anomalies in vehicle 2, including a measuring device 10, an anomaly detection device 20, and a notification device 30.
[0026] <Measuring Device>
[0027] The measuring device 10 measures various signals (vehicle signals) of the vehicle 2 during a simulated endurance test on the test bench, and sends the measured vehicle signals to the anomaly detection device 20. The measured vehicle signals include commands and / or signals with different units, such as wheel rotation speed (wheel speed), engine rotation speed, engine torque, engine throttle opening, engine temperatures (exhaust temperature, coolant temperature, oil temperature), drive motor output torque, drive motor current, and fault codes from the engine control unit.
[0028] <Abnormal detection device>
[0029] Anomaly detection device 20 acquires multiple vehicle signals measured by measuring device 10 and detects anomalies in the acquired vehicle signals. Anomaly detection device 20 may consist of, for example, a CPU (Central Processing Unit), ROM (Read-Only Memory), or RAM (Random Access Memory). a The device comprises random access memory (RAM), input / output circuits, etc. The anomaly detection device 20, as a functional unit, includes a sampling rate adjustment unit 21, a time window processing unit 22, an anomaly calculation unit 23, an anomaly determination unit 24, and a learning unit 25.
[0030] Sampling Rate Adjustment Department
[0031] The sampling rate adjustment unit 21 acquires multiple (n) vehicle signals measured by the measuring device 10, and adjusts the sampling rate of the acquired multiple vehicle signals to make them consistent. Figure 2 Step S2). Figure 4 As shown, multiple vehicle signals each contain time-series data with different sampling rates. Figure 4 In the diagram, the signals contained in each vehicle signal are represented by black dots on an axis indicating the time. The sampling rate adjustment unit 21 extracts data from the vehicle signal data that is closest to the specified sampling rate at each time interval t, based on a pre-stored predetermined sampling rate. Figure 4 In the sampling rate adjustment unit 21, the data enclosed by the dashed circle is used as the data for that specific moment, and all other data is discarded. The sampling rate adjustment unit 21 outputs the vehicle signal with the adjusted sampling rate to the time window processing unit 22. Here, it is desirable to specify the sampling rate as the maximum sampling rate among the sampling rates of multiple vehicle signals.
[0032] The sampling rate adjustment unit 21 can improve the correlation of each vehicle signal through this processing. In addition, the sampling rate adjustment unit 21 can prevent overlearning of vehicle signals with high sampling rates.
[0033] Time Window Processing Department
[0034] The time window processing unit 22 is installed on the volatile memory 20a. The time window processing unit 22 acquires n types of vehicle signals with their sampling rates adjusted by the sampling rate adjustment unit 21, and extracts a predetermined number (m) of data B contained in the time window from the sampled vehicle signals after the sampling rate adjustment. n ( Figure 2 Step S3). Here, t is the sliding width of the time window and the period for anomaly detection (the time required to execute steps S2 to S9). Additionally, B n (or B) n (0) ) represents the data (m×1 matrix) contained in this time window.
[0035] like Figure 5 and Figure 6 As shown, the time window processing unit 22 generates B by sliding a time window, which is a specified period, with a sliding width of time t, and thereby extracting m data points contained in the time window. n Here, the sliding width t of the time window can also be less than the specified period of the time window. Alternatively, it is preferable that the sliding width t of the time window is the same as the time interval t of the specified sampling rate.
[0036] The time window processing unit 22 will generate B n Output to the anomaly calculation unit 23, and output the B-ordered values. n The matrix is C n The information is stored in storage unit 20b. If the current time window data is defined as B... n (0) C, as the storage of information n It is expressed by the following formula.
[0037] [Number 1]
[0038]
[0039] Here, B n (p) For B n The data contained in the time window p times prior (m×1 matrix). Additionally, C n This represents the saved information (m×p matrix) stored in storage unit 20b. p represents data B. n The number of extractions (in this embodiment, it is a value equal to the number of anomaly determinations in the anomaly determination unit 24) increases over time starting from the start of operation of the anomaly detection device 20.
[0040] The time window processing unit 22 uses the autoencoder 23a (see reference 23a) described later. Figure 7 The input number m is used to divide the vehicle signal, thereby realizing real-time learning and anomaly calculation.
[0041] Anomaly Calculation Department
[0042] like Figure 1 As shown, the anomaly calculation unit 23 acquires the learned information stored in the volatile memory 20a. Figure 2 Step S1), and obtain B generated by the time window processing unit 22. n Based on the obtained B n The learned information is used to calculate the anomaly level of vehicle signals. The learned information will be explained in detail below.
[0043] In this embodiment, the anomaly calculation unit 23 is based on the current Bn generated by the time window processing unit 22. (0) and using learning data L n (See the fourth paragraph from the bottom on page 8 of the instruction manual) The learned information (see the second paragraph from the bottom on page 8 of the instruction manual) is used to calculate the anomaly degree of the vehicle information. The learning data L used here... n Using the previous C n That is, B n (1) B n (2) B n (p) It was learned through study group 25 that B is... n (0) and from C as storage department data n The m×(k+1) matrix formed by combining the extracted data from columns 1 to k is represented by the following formula.
[0044] [Number 2]
[0045]
[0046] Here, the data in column 0 (column 1) is the B data from this analysis. n (0) The data in column k (the (k+1)th column) is the data from B k times ago. n (k) Here, when k is large, the accuracy of the learned model improves, while the learning time in step S12 increases. Therefore, k is determined through repeated trials to satisfy the learning time required to update the learned information at any given time, while ensuring the desired monitoring accuracy.
[0047] First, the anomaly calculation unit 23 calculates the time window data B based on the learned information. n Perform scaling (normalization) and calculate the scaled data B. s , n ( Figure 2 Step S4). Scale the obtained data B s, n B is calculated based on the following formula. S The calculation is performed using all matrix elements.
[0048] [Number 3]
[0049] [B s,n ] i =([B n ] i -min n ) / (max n -min n ) 1≤i≤m
[0050] Here, min n It is the minimum value of the data within the nth signal in the learned information. Additionally, max... n It is the maximum value of the data within the nth signal in the learned information. Additionally, B... s,n It is B n The scaled data (m×1 matrix). Additionally, [B n ] i It is B n The i-th scalar. Additionally, [B] s,n ] i It is B s,n The i-th scalar. The scaled data B s,n All vector elements fall within the range of minimum value 0 to maximum value 1.
[0051] The anomaly calculation unit 23 can process multiple vehicle information with different commands and calculate the anomaly degree through this scaling process.
[0052] Next, the anomaly calculation unit 23 uses an autoencoder 23a (refer to...) Figure 7 ) The scaled data B s,n Reconstruction is performed using auto-coding. Figure 2 Step S5). The autoencoder 23a includes an input layer 23a1 into which input data is input, an output layer 23a2 into which reconstructed data is output, and an intermediate layer (hidden layer) 23a3 disposed between the input layer 23a1 and the output layer 23a2. The latent variable z and the reconstructed data x^ in the intermediate layer 23a3 are calculated by the following formulas.
[0053] [Number 4]
[0054]
[0055]
[0056] Here, x is the matrix input to the autoencoder 23a. Additionally, W... x(1) b x (1) W x (2) b x (2) This is the autoencoder information corresponding to the input x. Additionally, z is a latent variable, and x^ (x with ^ above it) is the matrix (reconstructed data) output from autoencoder 23a.
[0057] Next, the anomaly calculation unit 23 calculates the error (reconstruction error) e( contained in the reconstructed data). Figure 2 Step S6). The reconstruction error e is calculated using the following formula.
[0058] [Number 5]
[0059]
[0060]
[0061] Here, Δx is the difference, and the reconstruction error e is the Euclidean norm of Δx.
[0062] Anomaly calculation unit 23 calculates B by s,n Input to autoencoder 23a (x = B) s,n To calculate the reconstruction error e of the nth vehicle signal. n .like Figure 8A and Figure 8B As shown, under the condition that the vehicle information input to the self-encoder 23a is normal ( Figure 8A ), reconstruction error e n Small, in the event of abnormal vehicle information input to the self-encoder 23a ( Figure 8B ), reconstruction error e n big.
[0063] Furthermore, when multiple vehicle signals are strongly correlated, the anomaly calculation unit 23 can aggregate these vehicle signals and calculate the reconstruction error. Here, if the numbers of the correlated vehicle signals are designated as a and b, the input data x and the reconstructed data x^ are represented by the following formula.
[0064] [Number 6]
[0065]
[0066]
[0067] Anomaly Calculation Unit 23 according to B S,a and B^ S,a (B with a ^ above it) Calculate the reconstruction error e a And according to B S,band B^ S,b (B with a ^ above it) Calculate the reconstruction error e b In this case, the autoencoder information is W. ab (1) b ab (1) W ab (2) b ab (2) .
[0068] The activation function is not limited to a sigmoid function σ; for example, the hyperbolic tangent function can also be used in the autoencoder 23a. Furthermore, the intermediate layers 23a in the autoencoder are not limited to one layer; multiple layers can be stacked. Additionally, the method for calculating the reconstruction error is not limited to using the Euclidean norm (L2 norm); for example, the L1 norm can also be used.
[0069] Furthermore, the reconstruction method is not limited to using the autoencoder 23a; for example, principal component analysis can also be used. Since the vehicle information used for judgment is almost entirely normal data, the anomaly calculation unit 23 cannot perform processing using other methods employing neural networks, such as classification learning. Therefore, the anomaly calculation unit 23 uses the autoencoder 23a, which has only learned normal data, to extract latent variables and reconstructs the data based on these extracted latent variables. Even in the presence of anomalous data that deviates from the waveform data, the anomaly calculation unit 23 generates normal waveform data learned through reconstruction. Therefore, as information deviating from the normal waveform data, the anomaly calculation unit 23 calculates the reconstruction error e.
[0070] Next, the anomaly calculation unit 23 determines the anomaly based on the learned information, i.e., the decision function f. n (x) and reconstruction error e n To calculate the score (anomaly) S of the nth vehicle information. n ( Figure 2 In step S7), the calculation result is output to the anomaly determination unit 24. Anomaly degree S n Calculate using the following formula.
[0071] [Number 7]
[0072] S n =f n (e n )
[0073] As the determining function f n (x), the anomaly calculation unit 23 uses a class 1 SVM (Support Vector Machine). Therefore, in the decision function f n (x) Given a normal value, the score S nValues above zero are used in the determining function f. n (x) takes a negative value if an abnormal value is input.
[0074] Anomaly Detection Department
[0075] The anomaly determination unit 24 obtains the score (anomaly degree) S calculated by the anomaly degree calculation unit 23. n The score obtained is used to determine whether the vehicle signal is abnormal. Figure 2 Step S8). The exception determination unit 24 in the fraction S n If a negative value occurs consecutively across multiple time windows, the corresponding vehicle signal is determined to be abnormal; otherwise, the corresponding vehicle signal is determined to be normal. The anomaly determination unit 24 outputs the determination result to the notification device 30 when an anomaly is determined. Figure 2 Step S9).
[0076] The anomaly detection unit 24 is able to detect true anomalies, while preventing the vehicle signal from being judged as an anomaly in the event of noise that generates pulses.
[0077] Study Department
[0078] The learning unit 25, based on the saved data stored in the storage unit 20a, performs real-time learning in parallel with the actions of the sampling rate adjustment unit 21, the time window processing unit 22, the anomaly calculation unit 23, and the anomaly determination unit 24, generating learned information. The learning unit 25 reads the C stored in the storage unit 20b. n The time matrix required for learning is used to set the read data as learning data L. n ( Figure 3 Step S11).
[0079] Next, the Learning Department 25 will extract learning data L. n The maximum value contained in max n and minimum value min n ( Figure 3 Step S12). Next, the learning unit 25, based on the extracted maximum value max... n and minimum value min n Learning data L n Scale the dataset and calculate the scaled learning data L. s,n Next, the learning department 25 used the already learned data L s,n Learn the autoencoder 23a and generate autoencoder information W. x (1) b x (1) W x (2) b x (2)( Figure 3 Step S12). The learning method (algorithm) of the autoencoder 23a performed by the learning unit 25 can be exemplified by, for example, the scaled conjugate gradient descent method. In this case, pre-selected values are used as hyperparameters. Next, the learning unit 25, based on the autoencoder information W... x (1) b x (1) W x (2) b x (2) Calculate the reconstruction error, and use the calculated reconstruction error as normal data to generate the determination function f. n (x)( Figure 3 Step S12).
[0080] Learning Department 25 will max out the maximum value n and minimum value min n Self-encoder information W x (1) b x (1) W x (2) b x (2) and the determining function f n (x) is stored as learned information in storage unit 20b.
[0081] It should be noted that the learning unit 25 learns independently from the sampling rate adjustment unit 21, the time window processing unit 22, the anomaly calculation unit 23, and the anomaly determination unit 24. Therefore, it can also be realized separately from the anomaly detection device 20 (other processors, computers (PCs, etc.).
[0082] If the learned information stored in the storage unit 20b is updated, the update unit 26 reads the updated learned information and stores it in the volatile memory 20a. Figure 3 Step S13).
[0083] <Notification Device>
[0084] The notification device 30 consists of a display capable of outputting images, a speaker capable of outputting sound, etc., and obtains the judgment result of the anomaly judgment unit 24 and notifies the user.
[0085] The anomaly detection device 20 according to an embodiment of the present invention is characterized by comprising: a time window processing unit 22, which extracts data contained in a time window by dividing a plurality of vehicle signals containing time series data into time windows; a learning unit 25, which generates learned information by learning the time series data of the vehicle signals divided by the time windows; and an anomaly calculation unit 23, which reconstructs the time series data of the vehicle signals divided by the time windows based on the learned information, calculates the error before and after reconstruction, and calculates the anomaly degree based on the calculated error and the learned information.
[0086] Therefore, the anomaly detection device 20 can use the learned information to calculate the anomaly degree of vehicle information divided into time windows, wherein the learned information is obtained using vehicle information divided into previous time windows. That is, the anomaly detection device 20 does not need to prepare the learned information before the detection operation, and can appropriately detect anomalies based on the real-time updated learned information.
[0087] Furthermore, the anomaly detection device 20 is characterized in that the anomaly calculation unit 23 calculates the anomaly degree using the time series data of the vehicle signal divided by the current time window and the learned information using the time series data of the vehicle signal divided by the previous time window.
[0088] Therefore, the anomaly detection device 20 can more appropriately perform the generation of learned data and the calculation of anomalies in parallel.
[0089] Furthermore, the anomaly detection device 20 is characterized in that the learned information includes the maximum and minimum values of the time series data of the vehicle signal divided by the previous time window, and the anomaly calculation unit scales the time series data of the vehicle signal divided by the current time window based on the maximum and minimum values, and reconstructs the scaled time series data of the vehicle signal using the autoencoder 23a included in the learned information.
[0090] Therefore, the anomaly detection device 20 can process information from multiple vehicles with different commands in the same way to appropriately calculate the degree of anomaly.
[0091] In addition, the anomaly detection device 20 is characterized by having a sampling rate adjustment unit 21 that makes the sampling rates of the plurality of vehicle signals consistent, and the time window processing unit 22 dividing the time sequence data of the plurality of vehicle signals after sampling rate adjustment into time windows.
[0092] Therefore, by making the sampling rates of multiple vehicle information consistent, the anomaly detection device 20 can improve the correlation of vehicle signals and prevent over-learning of vehicle signals with high sampling rates.
[0093] In addition, the anomaly detection device 20 is characterized by having an anomaly determination unit 24, which determines that the vehicle signal is abnormal based on the calculated anomaly degree when anomalies occur continuously within a predetermined number of time windows.
[0094] Therefore, the anomaly detection device 20 can prevent the vehicle signal from being identified as an anomaly and detect a true anomaly when impulse noise is generated.
[0095] The embodiments of the present invention have been described above, but the present invention is not limited to the foregoing embodiments and can be appropriately modified without departing from the spirit of the present invention. For example, the anomaly detection device 20 may be configured to omit the anomaly determination unit 24. In this case, the notification device 30 outputs the calculation result of the anomaly degree calculation unit 23 via sound or image. In addition, the present invention may also be implemented as an anomaly detection program that enables a computer to function as the anomaly detection device 20.
[0096] Explanation of reference numerals in the attached figures
[0097] 1. Anomaly Detection System
[0098] 10 Measuring devices
[0099] 20 Anomaly Detection Device
[0100] 21 Sampling Rate Adjustment Department
[0101] 22 Time Window Processing Department
[0102] 23 Anomaly Calculation Department
[0103] 24. Anomaly Detection Department
[0104] 25. Study Department
Claims
1. An anomaly detection device, characterized in that, include: The sampling rate adjustment unit removes time-series data contained in multiple vehicle signals with different sampling rates based on a specified sampling rate, thereby making the sampling rate of the time-series data consistent with the specified sampling rate. A time window processing unit extracts data contained in a time window by dividing the vehicle signals containing time series data into multiple time windows, wherein the time window slides with a sliding width at the specified sampling rate; The learning unit generates learned information by learning time-series data of the vehicle signals divided by the said time window; and The anomaly calculation unit reconstructs the time series data of the vehicle signal divided by the time window based on the learned information, calculates the error before and after reconstruction, and calculates the anomaly degree relative to the specified sampling rate based on the calculated error and the learned information.
2. The anomaly detection device according to claim 1, characterized in that, The anomaly calculation unit calculates the anomaly degree based on the time series data of the vehicle signal divided by the current time window and the learned information using the time series data of the vehicle signal divided by the previous time window.
3. The anomaly detection device according to claim 2, characterized in that, The learned information includes the maximum and minimum values of the time-series data of the vehicle signals divided by the previous time window. The anomaly calculation unit scales the time series data of the vehicle signal divided by the current time window based on the maximum and minimum values, and reconstructs the scaled time series data of the vehicle signal using the autoencoder contained in the learned information.
4. The anomaly detection device according to any one of claims 1 to 3, characterized in that, The system includes an anomaly determination unit, which determines that the vehicle signal is abnormal based on the calculated anomaly degree when anomalies occur continuously within a predetermined number of time windows.
5. An anomaly detection program, characterized in that, The computer is made to function as the anomaly detection device according to any one of claims 1 to 4.
Citation Information
Patent Citations
Abnormality diagnosis device and program
JP2015170121A
Abnormality diagnosis device and program
JP2016045861A
Vehicular reference value generation apparatus
JP2014234113A
System for automatically identifying abnormal navigation state of ship with unsupervised learning, and method for the same
JP2019175462A