fullseye

1-D 信号の周期欠陥を見つける

できること

ロール起因の周期むら、レールの波状摩耗、軸受の欠陥のように同じ間隔で繰り返す欠陥を、1-D の系列(断面・時系列・走査線)から見つけます。周期は spectrum の峰、峰の正確な周波数は peak_subbin、欠陥がどこにあるかは envelope の極値、という役割分担です。

What it does

Roll-driven periodic marks, rail corrugation, bearing faults: defects that repeat at a fixed interval in a 1-D series. spectrum says whether there is a period, peak_subbin refines which, and the extrema of envelope say where.

向くところ / 向かないところ

向く: 周期が既知の候補(ロール径・歯数・軸受幾何)から先に計算できるとき —— どの峰を見るかを測る前に決められる。

向かない: ★周期の族が複数重なる場面のケプストラム(fs.cepstrum は周期の族が 1 つのときの道具)。★周期が信号長の 1/3 より長いとき(峰が分解しない)。★弦で測る波状摩耗のように測り方そのものが特定の波長を消す場合(poc_rail_corrugation)。

推奨パイプライン

smooth_funct_1d_gauss → bandpass → spectrum → find_peaks → peak_subbin → envelope → local_min_max_funct_1d

smooth_funct_1d_gauss で標本雑音を落とし → bandpass で候補の周期帯だけ残し → spectrum(片側振幅)→ find_peaks で峰の index → peak_subbin で副ビン補間した周波数 → envelope で時間(位置)領域の包絡 → local_min_max_funct_1d で欠陥の位置(極大)を表にする。

代替

周期の族を 1 つだけ探すなら cepstrum。回転機械は envelope_spectrum / order_spectrum(回転次数)。要約は signal_features、周期の粗い当たりは zero_crossings_funct_1d。点列(欠陥の位置だけ)から周期を出すなら point_spectrum。

限界

実寸校正

標本間隔が校正。時系列なら rate [Hz]、走査線なら 1 標本あたりの長さ mm。周期 [mm] = 1 / 空間周波数 [1/mm]。

最初の 1 本

import fullseye as fs
import numpy as np

x = np.arange(4096) * 0.5                              # 0.5 mm 間隔の走査線
s = 0.02 * np.sin(2 * np.pi * x / 37.0) + 0.005 * np.random.default_rng(0).normal(size=x.size)
f, m = fs.ledger.spectrum.raw(s, rate=1.0 / 0.5)       # 空間周波数 [1/mm](台帳経由は (N,2) の pairs)
i = int(np.argmax(m[1:]) + 1)
f_hat = f[i] + (fs.ledger.peak_subbin(m, i) - i) * (f[1] - f[0])
print("周期 [mm]", 1.0 / f_hat)                          # 37.0 に近い

裏づけ