Sensor data detection optimization method based on HMM (Hidden Markov Model)
By applying the sensor data detection method of hidden Markov model HMM in the monitoring of high-voltage cabinet electrical equipment, the problems of slow processing speed, high hardware cost and low detection accuracy in the prior art are solved, and faster processing speed, lower hardware cost and more accurate detection effects are achieved.
Patent Information
- Application Number
- CN202411432612.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art has problems such as slow processing speed, high hardware cost and low detection accuracy in real-time monitoring of high-voltage cabinet electrical equipment, especially when using end-to-end deep learning methods.
The sensor data detection optimization method based on the HMM model based on the hidden Markov model is adopted. By establishing an HMM model, the likelihood function is calculated using the forward algorithm and the backward algorithm, and the optimized unsupervised learning algorithm is used to estimate the model parameters to achieve the prediction of the state sequence.
It improves processing speed, reduces hardware cost requirements, and improves data detection accuracy, so as to more accurately monitor and predict the operating status of high-voltage cabinet electrical equipment.
Smart Images

Figure CN119513521A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to high-voltage cabinet electrical equipment monitoring, and in particular to a sensor data detection optimization method based on a hidden Markov model (HMM). Background Art
[0002] High-voltage switchgear is a very important electrical equipment in the power system. The deterioration of the operating status of the high-voltage switchgear due to various reasons often leads to failures in the power system. Therefore, real-time monitoring of the operating status of the high-voltage switchgear, timely detection of potential faults, and prediction of accumulated faults are of great significance for ensuring the normal operation of the high-voltage switchgear, reducing the number of maintenance times, and improving the operating reliability and automation of the power system.
[0003] Traditional monitoring methods for high-voltage cabinets mainly rely on independent sensors to monitor individual monitoring items independently, and the core lies in the sensor type and accuracy. Sensors are mainly divided into temperature sensors, inductive position sensors, displacement sensors, pressure sensors, and vibration sensors. Most state monitoring methods are based on machine learning models, and the learning process of the model is usually: first, the monitored sensor data is normalized, denoised, and processed; then, feature extraction and feature selection are performed from the time domain, frequency domain, and time-frequency domain; finally, a pre-established machine learning model is used for classification.
[0004] The deep learning method model is an "end-to-end model" that does not require complex data preprocessing of the original data. It can achieve relatively ideal results by adaptively extracting high-dimensional features hidden in sensor signals and reasonable network depth design. However, the use of end-to-end deep learning methods requires high real-time signal processing capabilities of the monitoring terminal, and the hardware cost is very high. For data that has not undergone preliminary signal preprocessing, there are large detection errors, and even often there are problems with poor regression and non-convergence of global functions. Summary of the invention
[0005] The present invention aims to overcome the above-mentioned deficiencies in the prior art and provides a sensor data detection optimization method based on a hidden Markov model (HMM) which can improve processing speed and data detection accuracy.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A sensor data detection optimization method based on a hidden Markov model (HMM). The hidden Markov model (HMM) describes a process in which an unobservable state sequence is randomly generated by an HMM chain, and then an observation sequence is generated by the state sequence. The HMM is determined by an initial probability distribution, a state transition probability distribution and an observation probability distribution, wherein the initial probability distribution and the state transition probability distribution determine the HMM chain to generate an unobservable state sequence. The observation probability distribution determines how to generate an observation sequence from the state sequence. After the hidden Markov model (HMM) is established, the data collected by the current sensor is compared and analyzed with the observation sequence, and finally the current state judgment value is output. In the process of completing the prediction problem, the forward algorithm and the backward algorithm are first used in conjunction with the agreed algorithm to calculate the likelihood function, and then an optimized unsupervised learning algorithm is used to calculate and determine the maximum likelihood estimation method to estimate the model parameters, and finally the state sequence of the hidden Markov model (HMM) process is predicted based on the model with known parameters and the observation sequence.
[0008] The present invention proposes a sensor data detection model based on a hidden Markov model (HMM), which has faster processing speed, lower hardware cost requirements and more accurate data detection accuracy compared to an end-to-end neural network deep learning algorithm.
[0009] Preferably, the hidden Markov model HMM is defined as follows:
[0010] The set of all possible states is Q, the set of possible observations is V, the state sequence is I, and the observation sequence is O:
[0011] Q={q1,q2,q3,…,q N}
[0012] V={v1,v2,v3,…,v M}
[0013] I={i1,i2,i3,…,i T}
[0014] O={o1,o2,o3,…,o T}
[0015] Where: N is the number of states that may correspond in the HMM chain, M is the number of observations that may be generated for each state, and T is the sequence length; the state sequence I is the internal operating state standard of the high-voltage cabinet electrical equipment, and its internal value i is the state standard value; the state set Q is the actual operating state of the high-voltage cabinet electrical equipment that has been running for a period of time, and its internal value q is the operating state value; the observation sequence O is the observation standard of each type of sensor under each state, and its internal value o is the observation standard value; the observation set V is the sum of the observation values v generated by each type of sensor under each state.
[0016] Preferably, the initial probability distribution is as follows:
[0017] The initial state probability vector is π:
[0018] π=(π i )
[0019] π i =P(i t =q i ),i=1,2,3,…,N
[0020] π i At time t, it is in state q i The initial state probability of
[0021] The state transition probability distribution is as follows, and the state transition probability matrix is A:
[0022]
[0023] a ij =P(i t+1 =q j i t =q i ),i=1,2,3,…,N a ij At time t, it is in state q i Under the condition of j probability;
[0024] The observation probability distribution is as follows:
[0025] The observation probability matrix is B:
[0026]
[0027] b j (k) = P(o t =v k |i t =q j )k=1,2,3,…,M; j=1,2,3,…,N
[0028] b j (k) is in state q at time t j Generate observations v under the condition k The probability of, k refers to the sequence number of the observation value, j refers to the sequence number of the state value;
[0029] In the process of establishing the hidden Markov model HMM, λ=(π, A, B) is used to represent the hidden Markov model HMM. The input data of the model is the state sequence I, the observation sequence O and the observation set V are preset by the model, and the state set Q is the sample data.
[0030] As a preference, the forward algorithm and the backward algorithm are combined with the agreed algorithm to calculate the likelihood function, which means that: given the model λ = (π, A, B), the observation sequence O = {o1, o2, o3, ..., o T}, calculate the probability P(O|λ) of the observation sequence O under the given model λ, as follows: The forward algorithm needs to define the forward probability, and the observation sequence at time t is o1, o2, o3, …, o T And the state is q i The probability of is the forward probability:
[0031] a t (i)=P(o1, o2, o3,...,o T ,i r =q i |λ)
[0032] The forward probability a is obtained by recursive method t+1 (i) and the observed sequence probability P(O|λ);
[0033] Initial value:
[0034] a1(i)=π i b i (o1),i=1,2,3,...,N
[0035] where π i In state q i The initial state probability of b i (o1) is in state q i The probability of generating the observation value o1 under the condition of ;
[0036] Recursively, for t=1, 2, 3, ..., T-1:
[0037]
[0038]
[0039] termination:
[0040]
[0041] where a T (i) is the final value of the forward probability;
[0042] The backward algorithm needs to define the backward probability. At time t, the state is qi Under the condition of t+1 , o t+2 , o t+3 ,…,o T The probability of is the backward probability:
[0043] β t (i) = P(o t+1 , o t+2 , o t+3 , ..., o T ,i t =q i |λ)
[0044] The backward probability β is obtained by recursive method t+1 (i) and the observed sequence probability P(O|λ)
[0045] Initial value:
[0046] β T (i) = 1, i = 1, 2, 3, ..., N
[0047] Recursively, for t = T-1, T-2, T-3, ..., 1:
[0048]
[0049] termination:
[0050]
[0051] where β T (i) is the initial value of the backward probability, β t (i) is the final value of the backward probability;
[0052] The observation sequence probability P(O|λ) defined by the forward algorithm and the backward algorithm is:
[0053]
[0054] As a preferred method, the optimized unsupervised learning algorithm is used to calculate the maximum likelihood estimation method to estimate the model parameters: given that the training data only contains S observation sequences of length T O = {o1, o2, o3, ..., o s}, the goal is to learn the parameters of the HMM model λ=(π,A,B) so that the probability P(O|λ) of the observed sequence O under the model λ is maximized, that is, the parameters are estimated using the maximum likelihood estimation method. At this time, the HMM is P(O|λ)=∑ I P(O|I,λ)P(I|λ).
[0055] As a preferred method, the specific calculation method is:
[0056] Determine the log-likelihood function of the complete data, all observations are O = {o1,o2,o3,…,o T}, all hidden data are I={i1,i2,i3,…,i T}, the complete data is O, I = {o1,o2,o3,…,o T ,i1,i2,i3,…,i T}, the log-likelihood function of the complete data is logP(O|I,λ);
[0057] The first step is to find the Q function
[0058]
[0059] Where: λ is the HMM parameter to be maximized; is the current estimate of the HMM parameters;
[0060]
[0061] The second step is to maximize the Q function Find the model parameters π, A, B;
[0062]
[0063] The third step is to combine the forward algorithm with the backward algorithm and use γ t (i) represents the probability of the forward and backward algorithm optimizing the path, ξ t (i,j) represents the forward and backward algorithm optimization parameters, where:
[0064]
[0065]
[0066] The fourth step is to design the optimization parameter estimation of the EM algorithm. The formula is:
[0067] π i =γ1(i)
[0068]
[0069] The beneficial effects of the present invention are: faster processing speed, lower hardware cost requirements and more accurate data detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a schematic diagram of the process of establishing the Hidden Markov Model HMM in the present invention. DETAILED DESCRIPTION
[0071] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0072] like Figure 1 In the described embodiment, a sensor data detection optimization method based on a hidden Markov model HMM is provided, wherein the hidden Markov model HMM describes a process in which an unobservable state sequence is randomly generated by an HMM chain, and then an observation sequence is generated by the state sequence; the HMM is determined by an initial probability distribution, a state transition probability distribution, and an observation probability distribution, wherein the initial probability distribution and the state transition probability distribution determine the HMM chain to generate an unobservable state sequence; the observation probability distribution determines how to generate an observation sequence from the state sequence; after the hidden Markov model HMM is established, a comparison and analysis is performed based on the data collected by the current sensor and the observation sequence, and finally the current state judgment value is output; in the process of completing the prediction problem, the forward algorithm and the backward algorithm are first used in conjunction with the agreed algorithm to calculate the likelihood function, and then an optimized unsupervised learning algorithm is used to calculate and determine the maximum likelihood estimation method to estimate the model parameters, and finally the state sequence of the hidden Markov model HMM process is predicted based on the model with known parameters and the observation sequence.
[0073] The hidden Markov model HMM is formally defined as follows:
[0074] The set of all possible states is Q, the set of possible observations is V, the state sequence is I, and the observation sequence is O:
[0075] Q={q1,q2,q3,…,q N}
[0076] V={v1,v2,v3,…,v M}
[0077] I={i1,i2,i3,…,i T}
[0078] O={o1,o2,o3,…,o T}
[0079] Where: N is the number of possible states in the HMM chain, M is the number of possible observations for each state, and T is the sequence length.
[0080] The state sequence I is the internal operating state standard of the high-voltage cabinet electrical equipment. The internal value i is the state standard value, including no fault, twisting fault, malfunction fault, opening fault, closing fault, insulation fault, current cutoff fault, external force fault; the length is T, T = 8. i1 indicates no fault, i2 indicates twisting fault, and so on.
[0081] The state set Q is the actual operating state of the high-voltage cabinet electrical equipment after a period of operation. The value q inside it is the operating state value. The state values are randomly distributed and have a length of N.
[0082] The observation sequence O is the observation standard of each type of sensor in each state, and the value o inside it is the observation standard value; the observation sequence O includes temperature value, temperature change, position, displacement, pressure value, pressure change, presence or absence of vibration, and vibration frequency.
[0083] The observation set V is the sum of the observation values v generated by each type of sensor in each state.
[0084] For example, assuming that the state value i is a torsional fault i2, the observed values v of this fault include position o3, displacement o4, pressure value o5, and pressure change o6.
[0085] The initial probability distribution is as follows:
[0086] The initial state probability vector is π:
[0087] π=(π i )
[0088] π i =P(i t =q i ),i=1,2,3,…,N
[0089] π i At time t, it is in state q i The initial state probability, the state set Q is the actual operating state of the high-voltage cabinet electrical equipment running for a period of time, and the time t is the time relative to time 0;
[0090] The state transition probability distribution is as follows:
[0091] The state transition probability matrix is A:
[0092]
[0093] a ij =P(i t+1 =q j i t =q i ),i=1,2,3,…,N
[0094] a ij At time t, it is in state q i Under the condition of j probability;
[0095] The observed probability distribution is as follows:
[0096] The observation probability matrix is B:
[0097]
[0098] b j (k) = P(o t =v k |i t =q j ), k=1,2,3,…,M; j=1,2,3,…,N
[0099] b j (k) is in state q at time t j Generate observations v under the condition k The probability of k is the number of the observation value, and j is the number of the state value.
[0100] HMM is determined by the initial state probability vector π, the state transition probability matrix A and the observation probability matrix B. The composition of HMM is as follows: Figure 1 As shown. π and A determine the HMM chain, generating an unobservable state sequence; B determines how to generate an observation sequence from the state sequence. HMM is represented by the above triples:
[0101] λ=(π,A,B).
[0102] In the entire process of establishing the hidden Markov model HMM, λ=(π,A,B) is used to represent the hidden Markov model HMM. The input data of the model is the state sequence I, the observation sequence O and the observation set V are preset by the model, and the state set Q is the sample data. After the model is established, it is applied to the internal electrical equipment of the high-voltage cabinet. First, there is a preset process to import the data monitored by various sensors and the fault state samples of the high-voltage electrical equipment into the HMM model. After the HMM model is established, the model compares the data collected by the current sensor with the observation sequence, and finally outputs the current state judgment value; including one of no fault, twisting fault, malfunction fault, opening fault, closing fault, insulation fault, cut-off fault, and external force fault.
[0103] The forward algorithm and the backward algorithm are used together with the agreed algorithm to calculate the likelihood function. This means that given the model λ = (π, A, B), the observation sequence O = {o1, o2, o3, ..., o T}, calculate the probability P(O|λ) of the observation sequence O appearing under the given model λ, as follows:
[0104] The forward algorithm needs to define the forward probability. At time t, the partial observation sequence is o1, o2, o3, ..., o T And the state is q i The probability of is the forward probability:
[0105] a t (i)=P(o1, o2, o3,...,o T ,i t =q i |λ)
[0106] The forward probability a is obtained by recursive method t+1 (i) and the observed sequence probability P(O|λ);
[0107] Initial value:
[0108] a1(i)=π i b i (o1),i=1,2,3,...,N
[0109] where π i In state q i The initial state probability of b i (o1) is in state q i The probability of generating the observation value o1 under the condition of ;
[0110] Recursively, for t=1,2,3,…,T-1:
[0111]
[0112] termination:
[0113]
[0114] where a T (i) is the final value of the forward probability;
[0115] The backward algorithm needs to define the backward probability. At time t, the state is q i Under the condition of t+1 , o t+2 , o t+3 ,…,o T The probability of is the backward probability:
[0116] β t (i) = P(o t+1 , o t+2 , o t+3 , ..., o T ,i t =q i |λ)
[0117] The backward probability β is obtained by recursive method t+1 (i) and the observed sequence probability P(O|λ)
[0118] Initial value:
[0119] βT (i) = 1, i = 1, 2, 3, ..., N
[0120] Recursively, for t = T-1, T-2, T-3, ..., 1:
[0121]
[0122] termination:
[0123]
[0124] where β T (i) is the initial value of the backward probability, β t (i) is the final value of the backward probability;
[0125] The observation sequence probability P(O|λ) defined by the forward algorithm and the backward algorithm is:
[0126]
[0127] The method of estimating model parameters by using an optimized unsupervised learning algorithm to calculate the maximum likelihood estimate means that given training data contains only S observation sequences of length T O = {o1, o2, o3, ..., o s}, the goal is to learn the parameters of the HMM model λ=(π,A,B) so that the probability P(O|λ) of the observed sequence O under the model λ is maximized, that is, the parameters are estimated using the maximum likelihood estimation method. At this time, the HMM is P(O|λ)=∑ I P(O|I,λ)P(I|λ). The specific calculation method is:
[0128] Determine the log-likelihood function of the complete data, all observations are O = {o1,o2,o3,…,o T}, all hidden data are I={i1,i2,i3,…,i T}, the complete data is O, I = {o1,o2,o3,…,o T ,i1,i2,i3,…,i T}, the log-likelihood function of the complete data is logP(O|I,λ);
[0129] The first step is to find the Q function
[0130]
[0131] Where: λ is the HMM parameter to be maximized; is the current estimate of the HMM parameters;
[0132]
[0133] The second step is to maximize the Q function Find the model parameters π, A, B;
[0134]
[0135] The third step is to combine the forward algorithm with the backward algorithm and use γ t (i) represents the probability of the forward and backward algorithm optimizing the path, ξ t (i,j) represents the forward and backward algorithm optimization parameters, where:
[0136]
[0137] The fourth step is to design the optimization parameter estimation of the EM algorithm, the formula is: π i =γ1(i)
[0138]
Claims
1. A sensor data detection optimization method based on Hidden Markov Model HMM, characterized in that: Hidden Markov Model (HMM) describes the process of randomly generating an unobservable state sequence from an HMM chain, and then generating an observation sequence from the state sequence; HMM is determined by the initial probability distribution, state transition probability distribution and observation probability distribution, where the initial probability distribution and state transition probability distribution determine the HMM chain to generate an unobservable state sequence; the observation probability distribution determines how to generate the observation sequence from the state sequence; after the Hidden Markov Model (HMM) is established, the data collected by the current sensor is compared and analyzed with the observation sequence, and finally the current state judgment value is output; In the process of completing the prediction problem, the forward algorithm and the backward algorithm are first used together with the agreed algorithm to calculate the likelihood function, and then the optimized unsupervised learning algorithm is used to calculate the maximum likelihood estimation method to estimate the model parameters. Finally, the state sequence of the hidden Markov model HMM process is predicted based on the model with known parameters and the observation sequence.
2. The sensor data detection optimization method based on Hidden Markov Model (HMM) according to claim 1 is characterized in that: The hidden Markov model HMM is defined as follows: The set of all possible states is Q, the set of possible observations is V, the state sequence is I, and the observation sequence is O: Q={q1,q2,q3,…,q N } V={v1,v2,v3,…,v M } I={i1,i2,i3,…,i T } O={o1,o2,o3,…,o T } Where: N is the number of states that may correspond in the HMM chain, M is the number of observations that may be generated for each state, and T is the sequence length; the state sequence I is the internal operating state standard of the high-voltage cabinet electrical equipment, and its internal value i is the state standard value; the state set Q is the actual operating state of the high-voltage cabinet electrical equipment that has been running for a period of time, and its internal value q is the operating state value; the observation sequence O is the observation standard of each type of sensor under each state, and its internal value o is the observation standard value; the observation set V is the sum of the observation values v generated by each type of sensor under each state.
3. The sensor data detection optimization method based on Hidden Markov Model (HMM) according to claim 2 is characterized in that: The initial probability distribution is as follows: The initial state probability vector is π: π=(π i ) π i =P(i t =q i ),i=1,2,3,…,N π i is in state q at time t i The initial state probability of The state transition probability distribution is specifically as follows: The state transition probability matrix is A: A=[a ij ] N×N a ij =P(i t+1 =q j |i t =q i ),i=1,2,3,…,N a ij At time t, it is in state q i Under the condition of j probability; The observation probability distribution is as follows: The observation probability matrix is B: B=[b j (k)] N×M b j (k)=P(o t =v k |i t =q j ),k=1,2,3,…,M;j=1,2,3,…,N b j (k) is in state q at time t j The probability of generating an observation value vk under the condition of , k refers to the sequence number of the observation value, and j refers to the sequence number of the state value; In the process of establishing the hidden Markov model HMM, λ=(π,A,B) is used to represent the hidden Markov model HMM. The input data of the model is the state sequence I, the observation sequence O and the observation set V are preset by the model, and the state set Q is the sample data.
4. A sensor data detection optimization method based on Hidden Markov Model (HMM) according to claim 2 or 3, characterized in that: The forward algorithm and the backward algorithm are used together with the agreed algorithm to calculate the likelihood function. This means that given the model λ = (π, A, B), the observation sequence O = {o1, o2, o3, …, o T }, calculate the probability P(O|λ) of the observation sequence O appearing under the given model λ, as follows: The forward algorithm needs to define the forward probability. At time t, the partial observation sequence is o1, o2, o3, …, o T And the state is q i The probability of is the forward probability: a t (i)=P(o1,o2,o3,...,o T ,i t =q i |λ) The forward probability a is obtained by recursive method t+1 (i) and the observed sequence probability P(O|λ); Initial value: a1(i)=π i b i (o1),i=1,2,3,...,N where π i For the state q i The initial state probability of b i (o1) is in state q i The probability of generating the observation value o1 under the condition of ; Recursively, for t=1,2,3,…,T-1: termination: where a T (i) is the final value of the forward probability; The backward algorithm needs to define the backward probability. At time t, the state is q i Under the condition of t+1 ,o t+2 ,o t+3 ,…,o T The probability of is the backward probability: β t (i) = P(o t+1 , o t+2 , o t+3 , ..., o T ,i t =q i |λ) The backward probability β is obtained by recursive method t+1 (i) and the observed sequence probability P(O|λ) Initial value: β T (i)=1,i=1,2,3,…,N Recursively, for t=T-1,T-2,T-3,…,1: termination: where β T (i) is the initial value of the backward probability, β t (i) is the final value of the backward probability; The observation sequence probability P(O|λ) defined by the forward algorithm and the backward algorithm is:
5. The sensor data detection optimization method based on Hidden Markov Model (HMM) according to claim 4 is characterized in that: The method of estimating model parameters by using an optimized unsupervised learning algorithm to calculate the maximum likelihood estimate means that given training data contains only S observation sequences of length T O = {o1, o2, o3, ..., o s }, the goal is to learn the parameters of the HMM model λ=(π,A,B) so that the probability P(O|λ) of the observed sequence O under the model λ is maximized, that is, the parameters are estimated using the maximum likelihood estimation method. At this time, the HMM is P(O|λ)=∑ I P(O|I,λ)P(I|λ).
6. A sensor data detection optimization method based on Hidden Markov Model (HMM) according to claim 5, characterized in that: The specific calculation method is: Determine the log-likelihood function of the complete data, all observations are O = {o1,o2,o3,…,o T }, all hidden data are I={i1,i2,i3,…,i T }, the complete data is O, I = {o1,o2,o3,…,o T ,i1,i2,i3,…,i T }, the log-likelihood function of the complete data is logP(O|I,λ); The first step is to find the Q function Where: λ is the HMM parameter to be maximized; is the current estimate of the HMM parameters; The second step is to maximize the Q function Find the model parameters π, A, B; The third step is to combine the forward algorithm with the backward algorithm and use γ t (i) represents the probability of the forward and backward algorithm optimizing the path, ξ t (i,j) represents the forward and backward algorithm optimization parameters, where: The fourth step is to design the optimization parameter estimation of the EM algorithm. The formula is: p i =γ1(i)
Citation Information
Cited By
Enterprise audit risk assessment method and system based on hidden Markov model
CN120410753A
Equipment health degree evaluation method based on hidden Markov chain
CN121301773A