Main Content

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

信号の 60 Hz ハムの削除

米国およびその他の数か国での交流は、60 Hz の周波数で振動しています。この振動はしばしば測定値を破損するため、減算しなければなりません。

ノイズの影響を受けているアナログ計器の、60 Hz 電力供給ラインからの入力における開ループ電圧について調べます。電圧は 1 kHz でサンプリングされています。

load openloop60hertz, openLoop = openLoopVoltage;

Fs = 1000;
t = (0:length(openLoop)-1)/Fs;

plot(t,openLoop)
ylabel('Voltage (V)')
xlabel('Time (s)')
title('Open-Loop Voltage with 60 Hz Noise')
grid

Figure contains an axes object. The axes object with title Open-Loop Voltage with 60 Hz Noise, xlabel Time (s), ylabel Voltage (V) contains an object of type line.

バタワース ノッチ フィルターを使用して 60 Hz のノイズを消去します。designfilt を使用してフィルターを設計します。ノッチの幅は 59 ~ 61 Hz の周波数範囲で定義されます。フィルターにより、この範囲にある周波数成分のパワーのうち、半分以上が除去されます。

d = designfilt('bandstopiir','FilterOrder',2, ...
               'HalfPowerFrequency1',59,'HalfPowerFrequency2',61, ...
               'DesignMethod','butter','SampleRate',Fs);

フィルターの周波数応答をプロットします。このノッチ フィルターは最大 45 dB の減衰を可能にします。

fvtool(d,'Fs',Fs)

Figure Figure 1: Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB), xlabel Frequency (Hz), ylabel Magnitude (dB) contains 2 objects of type line.

フィルター遅延を補正するため、filtfilt を使って信号をフィルター処理します。振動がどれほど大幅に減少するかに注目してください。

buttLoop = filtfilt(d,openLoop);

plot(t,openLoop,t,buttLoop)
ylabel('Voltage (V)')
xlabel('Time (s)')
title('Open-Loop Voltage')
legend('Unfiltered','Filtered')
grid

Figure contains an axes object. The axes object with title Open-Loop Voltage, xlabel Time (s), ylabel Voltage (V) contains 2 objects of type line. These objects represent Unfiltered, Filtered.

ピリオドグラムを使用して、60 Hz での "スパイク" が消去されたことを確認します。

[popen,fopen] = periodogram(openLoop,[],[],Fs);
[pbutt,fbutt] = periodogram(buttLoop,[],[],Fs);

plot(fopen,20*log10(abs(popen)),fbutt,20*log10(abs(pbutt)),'--')
ylabel('Power/frequency (dB/Hz)')
xlabel('Frequency (Hz)')
title('Power Spectrum')
legend('Unfiltered','Filtered')
grid

Figure contains an axes object. The axes object with title Power Spectrum, xlabel Frequency (Hz), ylabel Power/frequency (dB/Hz) contains 2 objects of type line. These objects represent Unfiltered, Filtered.

参考

| | |

関連するトピック