[HHT Island Detection] Island Detection Algorithm Based on Hilbert-Huang Transform (HHT) GRNN

1. Software version

MATLAB2013b

2. Theoretical knowledge of this algorithm

        On the basis of summarizing the existing grid islanding detection methods, the algorithm applies the time-frequency analysis method to the islanding detection, and presents a new energy centralized islanding detection method based on the Hilbert-Huang transform for transient analysis. This method performs empirical mode decomposition (EMD) on the voltage at the point of common coupling (PCC) in the power grid, obtains the intrinsic mode function (IMF), realizes the extraction and analysis of transient feature components, and realizes the islanding phenomenon through GRNN neural network. detection.

        The Hilbert-Huang Transform (HHT) is an adaptive signal processing method that can be accurately identified, and is mainly used for the processing and analysis of non-stationary signals. The core technology of Hilbert-Huang transform is EMD empirical mode decomposition and HSA Hilbert spectral analysis.

       Combined with GRNN generalized regression neural network to realize island detection, the whole algorithm flow chart is as follows:

          Finally, the method performs the improved empirical mode decomposition (EMD) of the voltage at the point of common coupling (PCC), and obtains the intrinsic mode function (IMF), so as to realize the extraction and analysis of the transient feature components, and to detect the feature quantity. At the same time, various criteria such as voltage phase change and power fluctuation are used to comprehensively judge the occurrence of islanding phenomenon. The flow chart of the whole algorithm is shown in the following figure:

        It can be seen from the algorithm flow of the figure that the new island detection algorithm based on Hilbert-Huang transform and GRNN neural network first collects the voltage signal of the common coupling point, and then extracts the voltage through the Hilbert-Huang transform. Therefore, this method has the advantage of not using parameters such as power and threshold. The method of island detection through neural network can avoid direct observation and judgment. The resulting problems such as islanding misjudgment, and the impact of busy island detection can be eliminated to the greatest extent.

3. Part of the core code

function YH=func_hilbert(imf);
N  = length(imf);  
k  = 0:N-1;  
% t  = Time1;  
% signal transform  
% 结论:sin信号Hilbert变换后为cos信号  
y  = imf;  
yh = hilbert(y);    % matlab函数得到信号是合成的复信号  
yi = imag(yh);      % 虚部为书上定义的Hilbert变换  
 
% 检验两次Hilbert变换的结果(理论上为原信号的负值)  
% 结论:两次Hilbert变换的结果为原信号的负值  
yih = hilbert(yi);  
yii = imag(yih);  
% 信号与其Hilbert变换的正交性  
% 结论:Hilbert变换后的信号与原信号正交  
% 谱分析  
% 结论:Hilbert变换后合成的复信号的谱没有大于奈氏频率的频谱,即其谱为单边的  
NFFT = 2^nextpow2(N);  
% f = fs*linspace(0,1,NFFT);  
Y  = fft(y, NFFT)/N;  
YH = fft(yh, NFFT)/N;  
  
 
function [imf,res] = func_emd(x,t);

add     = t(2)-t(1);
defstop = [0.05,0.5,0.05];
stop    = defstop;
 
S       = size(x);
if S(1) > 1
   x = x';
end
S       = size(t);
if S(1) > 1
   t = t';
end
S       = size(stop);
if S(1) > 1
   stop = stop';
   S    = size(stop);
end

if S(2) < 3
   stop(3)=defstop(3);
end

if S(2) < 2
   stop(2)=defstop(2);
end

sd  = stop(1);
sd2 = stop(2);
tol = stop(3);

MAXITERATIONS = 200;
NBSYM         = 2;
lx            = length(x);
sdt(lx)       = 0;
sdt           = sdt+sd;
sd2t(lx)      = 0;
sd2t          = sd2t+sd2;
ner           = lx;
nzr           = lx;
r             = x;
imf           = [];
k             = 1;
nbit          = 0;
NbIt          = 0;

while ner > 2  
  m    = r;
  mp   = m;
  sx   = sd+1;
  test = 0;
  
  [indmin,indmax,indzer] = func_minmaxzo(m);
  lm=length(indmin);
  lM=length(indmax);
  nem=lm + lM;
  nzm=indzer;
  
  j=1;
  
  % sifting loop
  while ( mean(sx > sd) > tol | any(sx > sd2) | (abs(nzm-nem)>1)) & (test == 0) & nbit<MAXITERATIONS

        [maxbl,minbl]=func_baoluo( m,t,indmax,indmin );
        midbl = (maxbl + minbl)/2;

        m = m - midbl;

        % evaluation of mean zero
        sx= 2*(abs(midbl))./(abs(maxbl-minbl));
        s = mean(sx);

        if nem < 3
           test = 1;
        end

        mp   = m;
        nbit = nbit+1;
        NbIt = NbIt+1;
  end
  
  imf(k,:) = m;
  nbits(k) = nbit;
  k        = k+1;
  r        = r - m;
  [indmin,indmax] = func_minmaxzo(r);
  ner = length(indmin) + length(indmax);
  
  nbit=1;

  if (max(r) - min(r)) < (1e-10)*(max(x) - min(x))
    break
  end
  
end

imf(k,:) = r;


clc;
clear;
close all;
warning off;

 

load data.mat 

P_train = [Train(:,2)/1000,Train(:,3)/100,Train(:,4)];
T_trian = Train(:,1);

P_test = [Test(:,2)/1000,Test(:,3)/100,Test(:,4)];
T_test = Test(:,1);

net = newgrnn(P_train',T_trian',0.0605);
tic;
y   = round([net(P_test')]');

length(find(y==T_test))
toc;

4. Operation steps and simulation conclusion

IMF simulation after EMD decomposition

 The instantaneous frequency simulation results obtained by IMF after Hilbert transform

       According to the amplitude of the collected voltage signal, the frequency of the fundamental wave and the THD value after Hilbert-Huang transform, three indicators are used as characteristic data.

Numbering

Voltage

frequency

THD

actual state

Detection status

1

222.9669

50.13486

0.113486

0

0

2

221.4819

50.06736

0.106736

0

0

3

213.4341

49.70155

0.070155

0

0

4

217.6503

49.8932

0.08932

0

0

5

212.4693

49.6577

0.06577

0

0

6

222.8004

50.12729

0.112729

0

0

7

218.5216

49.9328

0.09328

0

0

8

219.5355

49.97889

0.097889

0

0

9

222.351

50.10687

0.110687

0

0

10

214.8961

49.76801

0.076801

0

0

11

212.2012

49.64551

0.064551

0

0

12

223.7103

50.16865

0.116865

0

0

13

216.9847

49.86294

0.086294

0

0

14

228.6726

50.39421

0.139421

0

0

.................................

98

298.3999

46.94986

0.160933

1

1

99

292.1301

46.75341

0.125404

1

1

100

302.2453

47.07035

0.182723

1

1

Correct number of detections

98 _

Detection accuracy

98%

        From the test conclusions in the above table, it can be seen that the algorithm has obtained a detection rate of 98%, which means that 98 groups can be successfully tested for 100 groups of unknown samples, and the detection time of these 100 groups of samples is only 0.038548s.

5. References

[1]Moziza C J. Interconnection protection of IPP generators at commercial/industrial facilities[J]. IEEE Transactions on Industry Applications, 2001, 37(03):681-689.

[2]Katiraei F, Iravani  M  R,  Lehn  P  W.  Micro-grid  autonomous  operation  during  and  subsequent  to islanding process[J]. IEEE Transactions on Power Delivery, 2005, 20(01):248-257.

[3]IEEE Std.1547-2003, IEEE Standard for Interconnecting Distributed Resources With Electric Power System.A02-51

Guess you like

Origin blog.csdn.net/ccsss22/article/details/124460765