2

我正在尝试从我在这里找到的白皮书中实现传感器故障检测算法:http ://www.hindawi.com/journals/mpe/2013/712028/ref/ 我的数学技能不错,但这篇文章没有给出关于如何设置一切的详细信息。

我当前的实现如下所示:

/*******************************************************************************
How this algorithm works:
    1) There exists W historical windows which hold the distribution objects (mean, variance)
        for that window. Each window is of size m (the sliding window size)
    2) There exists a current window which changes every iteration by popping the 
        oldest value into the buffer window.
    3) There exists a buffer window which takes the oldest values from the current window
        each iteration. Once the buffer window reaches size m
        it then becomes the newest historical window.
*******************************************************************************/

int m = 10; //Statistics sliding window size
float outlierDetectionThreshold; // The outlier detection threshold for sensor s, also called epsilon
List<float> U; // Holds the last 10 windows mean
List<float> V; // Holds the last 10 windows variance
List<float> CurrentWindow; // Holds the last m values

procedure GFD()
    do
        get a value vi 
        Detection(vi)
    while not end
return

procedure Detection(vi)
    init outlierDetectionThreshold
    init U and V, loading last m distribution characteristics from DB
    init CurrentWindow loading the last m - 1 values

    Xi; // What is this?
    Tau; // What is this?

    Insert vi into CurrentWindow // CurrentWindow now has the m latest values 

    float CurrentWindowMean = Mean(CurrentWindow)
    float CurrentWindowVariance = Variance(CurrentWindow)

    if (IsStuck(CurrentWindowVariance) or IsSpikes(vi))
        return
    If (IsOutlier(vi) and not IsRatStatChagne(vi))
        return;
    IsRatStatChagne(vi);
    return

procedure IsStuck(variance)
    if (variance == 0)
        return true;
    return false;

procedure IsSpike(windowMean, windowVariance, historicalMeans, historicalVariances, xi, tau)
    if ( (mean / Mean(historicalMeans)) < xi)
        if ( (variance / Mean(historicalVariances)) > tau)
            return true;
    return false;

procedure IsOutlier(historicalMeans, historicalVariances, outlierDetectionThreshold)
    // use historicalMeans and historicalVariances to calculate theta
    if (theta > outlierDetectionThreshold)
        return true;

我在实现 IsOutlier 和 IsRatStatChange 函数时遇到了困难。

  1. 在 IsSpike 中,xi 和 tau 是如何计算的,或者它们代表什么?
  2. 对于 IsOutlier 函数,theta 是如何计算的?
  3. 对于 IsRatStatStange 函数,我还没有研究太多,但是有没有人有扎实的把握来写这个?

您获得的任何其他见解将不胜感激。提前致谢。

4

0 回答 0