Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

多変量ウェーブレットのノイズ除去

この例の目的は、Wavelet Toolbox™ で提供されている多変量ノイズ除去の機能を示すことです。

多変量ウェーブレット ノイズ除去の問題では、次の形式のモデルを取り上げます

X(t)=F(t)+e(t)

ここで、観測値 Xp 次元、F は復元される確定的な信号、e は空間相関のあるノイズ信号です。この例では、多数のノイズ信号を使用して、次のステップを実行して確定的な信号のノイズを除去します。

多変量信号の読み込み

多変量信号を読み込むには、MATLAB® プロンプトで次のコードを入力します。

 load ex4mwden
 whos
  Name           Size            Bytes  Class     Attributes

  covar          4x4               128  double              
  x           1024x4             32768  double              
  x_orig      1024x4             32768  double              

通常、データの行列 x のみが使用可能です。ここでは、真のノイズ共分散行列 covar と元の信号 x_orig も使用します。これらの信号は、2 つの元の信号を単純に組み合わせたノイズを含む信号です。時間が 750 のあたりを除いて、1 番目の信号は不規則な "Blocks" であり、2 番目の信号は規則正しい "HeavySine" です。他の 2 つの信号はそれぞれ、元の 2 つの信号の合計と差分です。強力な空間相関を示す多変量ガウス ホワイト ノイズが結果として生じる 4 つの信号に追加され、x に格納される観測データが生成されます。

元の信号と観測された信号の表示

元の信号と観測された信号を表示するには、次のように入力します。

kp = 0;
for i = 1:4 
    subplot(4,2,kp+1), plot(x_orig(:,i)); axis tight;
    title(['Original signal ',num2str(i)])
    subplot(4,2,kp+2), plot(x(:,i)); axis tight;
    title(['Observed signal ',num2str(i)])
    kp = kp + 2;
end

Figure contains 8 axes objects. Axes object 1 with title Original signal 1 contains an object of type line. Axes object 2 with title Observed signal 1 contains an object of type line. Axes object 3 with title Original signal 2 contains an object of type line. Axes object 4 with title Observed signal 2 contains an object of type line. Axes object 5 with title Original signal 3 contains an object of type line. Axes object 6 with title Observed signal 3 contains an object of type line. Axes object 7 with title Original signal 4 contains an object of type line. Axes object 8 with title Observed signal 4 contains an object of type line.

真のノイズ共分散行列は、次のように表すことができます。

covar
covar = 4×4

    1.0000    0.8000    0.6000    0.7000
    0.8000    1.0000    0.5000    0.6000
    0.6000    0.5000    1.0000    0.7000
    0.7000    0.6000    0.7000    1.0000

シンプルな多変量しきい値処理によるノイズ除去

ノイズ除去戦略では、原則、一変量ウェーブレットのノイズ除去を組み合わせます。推定されるノイズ共分散行列は、ウェーブレット領域にある Approximation の中心化されていない主成分分析 (PCA) または最終 PCA によって対角化されます。

最初に、次の行を入力することで一変量ノイズ除去を実行し、ノイズ除去パラメーターを設定します。

level = 5;
wname = 'sym4';
tptr  = 'sqtwolog';
sorh  = 's';

次に、すべての主成分を維持することで PCA パラメーターを設定します。

npc_app = 4;
npc_fin = 4;

最後に、次を入力することで多変量ノイズ除去を実行します。

x_den = wmulden(x, level, wname, npc_app, npc_fin, tptr, sorh);

元の信号とノイズ除去後の信号の表示

元の信号とノイズ除去後の信号を表示するには、次を入力します。

clf
kp = 0;
for i = 1:4 
    subplot(4,3,kp+1), plot(x_orig(:,i)); axis tight; 
    title(['Original signal ',num2str(i)])
    subplot(4,3,kp+2), plot(x(:,i)); axis tight;
    title(['Observed signal ',num2str(i)])
    subplot(4,3,kp+3), plot(x_den(:,i)); axis tight;
    title(['Denoised signal ',num2str(i)])
    kp = kp + 3;
end

Figure contains 12 axes objects. Axes object 1 with title Original signal 1 contains an object of type line. Axes object 2 with title Observed signal 1 contains an object of type line. Axes object 3 with title Denoised signal 1 contains an object of type line. Axes object 4 with title Original signal 2 contains an object of type line. Axes object 5 with title Observed signal 2 contains an object of type line. Axes object 6 with title Denoised signal 2 contains an object of type line. Axes object 7 with title Original signal 3 contains an object of type line. Axes object 8 with title Observed signal 3 contains an object of type line. Axes object 9 with title Denoised signal 3 contains an object of type line. Axes object 10 with title Original signal 4 contains an object of type line. Axes object 11 with title Observed signal 4 contains an object of type line. Axes object 12 with title Denoised signal 4 contains an object of type line.

少数の主成分を維持することによる最初の結果の改善

全体的に満足できる結果であることがわかります。最初の 2 つの信号に注目すると、それらの信号は適切に復元されていますが、信号間の関係を利用することで結果を改善し、ノイズ除去のさらなる効果をもたらすことができることに注意してください。

カイザーのルール (すべての固有値の平均値を超える固有値に関連付けられているコンポーネントを保持する) を使用して、保持されている主成分の数を自動的に選択するには、次のように入力します。

npc_app = 'kais';
npc_fin = 'kais';

次を入力して、多変量ノイズ除去を再度実行します。

[x_den, npc, nestco] = wmulden(x, level, wname, npc_app, ...
     npc_fin, tptr, sorh);

保持されている主成分の数の表示

2 番目の npc 出力引数は、Approximation の PCA および最終 PCA の保持されている主成分の数です。

npc
npc = 1×2

     2     2

予想どおり、信号は元の 2 つの信号を組み合わせたものであるため、カイザーのルールによって 2 つの主成分のみが対象であることが自動的に検出されます。

推定されるノイズ共分散行列の表示

3 番目の nestco 出力引数には、推定されるノイズ共分散行列が含まれます。

nestco
nestco = 4×4

    1.0784    0.8333    0.6878    0.8141
    0.8333    1.0025    0.5275    0.6814
    0.6878    0.5275    1.0501    0.7734
    0.8141    0.6814    0.7734    1.0967

それを前に与えられた真の行列 covar と比較することでわかるように、推定は満足のいくものです。

元の信号と最終的なノイズ除去後の信号の表示

元の信号と最終的なノイズ除去後の信号を表示するには、次を入力します。

kp = 0;
for i = 1:4 
    subplot(4,3,kp+1), plot(x_orig(:,i)); axis tight;
    title(['Original signal ',num2str(i)])
    subplot(4,3,kp+2), plot(x(:,i)); axis tight;
    title(['Observed signal ',num2str(i)])
    subplot(4,3,kp+3), plot(x_den(:,i)); axis tight;
    title(['Denoised signal ',num2str(i)])
    kp = kp + 3;
end

Figure contains 12 axes objects. Axes object 1 with title Original signal 1 contains an object of type line. Axes object 2 with title Observed signal 1 contains an object of type line. Axes object 3 with title Denoised signal 1 contains an object of type line. Axes object 4 with title Original signal 2 contains an object of type line. Axes object 5 with title Observed signal 2 contains an object of type line. Axes object 6 with title Denoised signal 2 contains an object of type line. Axes object 7 with title Original signal 3 contains an object of type line. Axes object 8 with title Observed signal 3 contains an object of type line. Axes object 9 with title Denoised signal 3 contains an object of type line. Axes object 10 with title Original signal 4 contains an object of type line. Axes object 11 with title Observed signal 4 contains an object of type line. Axes object 12 with title Denoised signal 4 contains an object of type line.

以前の結果よりも良い結果が得られます。不規則な 1 番目の信号は依然として適切に復元されますが、より規則正しい 2 番目の信号はこの PCA の第 2 段階後に適切にノイズ除去されます。

多変量ノイズ除去の詳細

理論、シミュレーション、実際の例など、多変量ノイズ除去に関する詳細情報を以下の参考文献で確認することができます。

M. Aminghafari, N. Cheze and J-M. Poggi (2006), "Multivariate denoising using wavelets and principal component analysis," Computational Statistics & Data Analysis, 50, pp. 2381-2398.