> For the complete documentation index, see [llms.txt](https://ykkim.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ykkim.gitbook.io/wiki/industrial-ai/bearingfault_journal/envelope-extraction.md).

# Envelope Extraction based

## Diagnostics 101: A Tutorial for Fault Diagnostics of Rolling Element Bearing Using Envelope Analysis in MATLAB

### Bearing Diagnostics

* Fault signal given by amplitude modulation

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-79407e9f13fbf694799d6bcee04525fad91287ec%2FBearing_geometry_and_impact_signal.png?alt=media)

​ 위 현상은 Amplitude Modulation(AM)(아래)과 같은 원리

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-bf7420bd318041a536a414a8a8242d7869370f02%2FModulating_Carrier_signal.png?alt=media)

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-76010ee74414af315318eccb271323869fe8a017%2FAmplitude_Envelope_signal.png?alt=media)

* Simulation of fault signal

  실제 베어링 신호와 비슷한 신호 만들기

  * Fault Signal + Resonance Signal = Modulated Signal

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-f0080d7c1442f4ce9a3b110e3268d124436e1dcc%2FModulated_signal.png?alt=media)

```
$$
\eqalign{
  & x_1 (t) = A\exp ( - \alpha t') & where\,t' = \bmod (t,1/f_f )  \cr 
  & x_2 (t) = \sin (2\pi f_r t) & where\,f_r  = 600Hz  \cr 
  & x_3 (t) = x_1 (t)*x_2 (t) \cr}
$$
```

* Modulated signal + Noise(Discrete, White) = Raw Signal

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-2225791a9068e339459fc897d35b29a2dee258fc%2Fenvelope_raw_signal.png?alt=media)

$$
x(t) = x\_3 (t) + x\_4 (t) + x\_5 (t)
$$

```
Discrete Signal: 기어, 샤프트 등에서 발생하는 노이즈
```

### Diagnosis Using Simulation Data

* 목적: 노이즈가 섞인 raw signal에서 fault information만 추출하는 것
* 3 steps
  * discrete signal 분리
    * 다른 요소들의 신호를 없애기 위함
    * Autoregressive model 적용
  * demodulation band selection
    * resonance freq.를 포함한 band를 찾아서 band-pass filter를 만듦
    * SK와 STFT 사용
  * envelope analysis
    * original fault signal을 찾기 위함
    * Hilbert transform 적용
* Discrete signal seperation
  * AR 모델을 사용해서 deterministic signal과 residual signal을 분리했다

    <img src="https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-ebdd8576336593bfb5cad91f22548cae7efb92f5%2FAR_model.png?alt=media" alt="" data-size="original">
  * AR model의 order는 residual signal의 kurtosis가 최대가 되는 값으로 정한다

    <img src="https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-01a331af1817e1731998d4a70985d7f6e774a156%2Fresidual_raw.png?alt=media" alt="" data-size="original">
* Demodulation Band Selection
  * residual signal에서 resonance frequency를 포함하는(?) frequency band를 찾는다
  * spectral kurtosis: time-frequency diagram에서 각 주파수에서의 kurtosis, STFT으로 정의됨

    <img src="https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-79c5b2ad272aa7b97cbfa445d9d5cd01d25f7b9d%2Fconcept_of_stft.png?alt=media" alt="" data-size="original">

    $$
    K(f) = {{\left\langle {\left| {S(t,f)} \right|^4 } \right\rangle } \over {\left\langle {\left| {S(t,f)} \right|^2 } \right\rangle ^2 }} - 2
    $$

    S(t,f) : residual signal의 STFT
  * 이 논문에서는 Hann window를 사용함

    $$
    w(l) = 0.5\left( {1 - \cos \left( {2\pi {1 \over {L - 1}}} \right)} \right),,0 \le l \le L - 1
    $$
  * 여기서 window length는 fault interval이 0.1초(n=300)로 눈에 보이기 때문에 이것보다 짧아야함
  * 각각의 윈도우 길이로 SK를 구하면 superposition됨

    <img src="https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-b7bed22c0d6c2434148b2d766aa1b0261043d0d1%2FSK_freq.png?alt=media" alt="" data-size="original">
  * 공통적으로 freq 500\~700에서 SK가 최대이기 때문에 선정
* Envelope Analysis
  * sub-step
    1. Hilbert transform
    2. Analytic signal의 절대값인 envelope signal을 얻기 위해 Magnitude 계산
    3. Envelope signal에 fft를 돌려서 fault freq.를 찾음
  * Hilbert transform
    * 90 deg phase shifter

      $$
      a\_x (t) = x(t) + j\hat x(t) = \sqrt {x^2 (t) + \hat x^2 (t)} e^{j\varphi \_x (t)} = A\_x (t)e^{j\varphi \_x (t)}
      $$

```
  a_x(t) : analytic signal (envelope)

  x(t) : 원래 신호

  x^(t) : 90도 phase shift된 신호
```

​

```
  ![](../images/envelope/result.png)

  a, b: faulty bearing

  c, d: healthy bearing

- 원래 신호(아래)와 다르게 나온 이유

  ![fault_signal](D:/MCE/대학원/Digital Twin/Research/images/envelope/fault_signal.png)

  : sampling rate가 낮고 AR filtering 때문에 residual signal의 length가 변했기 때문
```

## Rolling Bearing Fault Classification Based on Envelope Spectrum and Support Vector Machine

2008, Lei Guo, Jin Chen, Xinglin Li, Journal of Vibration and Control

### Introduction

### Envelope Spectrum Analysis

* envelope signal = analytic signal의 amplitude
  * analytic signal = s(t) + jh(t)

    s(t) : original signal

    h(t) : hilbert signal

#### Hilbert Transform

* Hilbert transform의 정의 (Boashash, 1992)

  $$
  h\left( t \right) = H\left{ {s\left( t \right)} \right} = {1 \over \pi }\int\_{ - \infty }^\infty {{{s\left( \tau \right)} \over {t - \tau }}d\tau } = {1 \over {\pi t}}\*s\left( t \right)
  $$
* 1/πt의 푸리에 변환은 다음과 같음

  <img src="https://github.com/ykkimhgu/gitbook_docs/tree/07583e5421bc23eb9dfac048cc655482e8543db8/digital-twin/images/envelope/sgn.png" alt="image-20210708120049422" data-size="original">

  * sgn: 어떤 함수의 부호를 출력하는 함수
  * 따라서 Hilbert transform은 신호의 amplitude를 input signal의 주파수의 부호에 따라 ±90도 phase shift시켜주는 함수라고 할 수 있음
* analytic signal

  $$
  z\left( t \right) = s\left( t \right) + jh\left( t \right)
  $$
* envelope of the analytic signal

  $$
  E\left( t \right) = |z\left( t \right)| = |s\left( t \right) + jh\left( t \right)| = \sqrt {s^2 \left( t \right) + h^2 \left( t \right)}
  $$
* 고장이 발생하면 envelope spectrum에 고장 특성 주파수가 나타남
*

#### Rolling Bearing Vibration Frequency Features

* 고장 위치에 따른 기본 주파수들
  * fr : shaft rotation freq.
  * fc : fundamental cage freq.
  * fb : ball rotational feq.
  * fi : ball pass inner race freq.
  * fo : ball pass outer race freq.

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-446c6c68012b4beb0469ea465092dc49bcb87fd3%2Fcharacteristic_freq.png?alt=media)

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-967f2f37cc65763d1972b8f97c2a49b51b3d20f0%2Ffault_location.png?alt=media)

### Support Vector Machine

#### Two-Class SVM

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-7b0a6c68a1612eac680f7891648bfda155176356%2FSVM.png?alt=media)

* SVM: developed by Vapnik and his co-workers (Vapnik, 2000)
* 커널 함수 Ф(x)를 사용해 original input pattern space (N-dimensional)에서 high dimensional separable feature space(Q-dimensional, Q>N)으로 벡터를 매핑
* 두 개의 데이터셋 사이에 선이나 초평면을 만듦
  * 저차원에서 비선형인 문제를 고차원에서 선형 문제로 변환시킬 수 있음
* $$
  ,\left( {x\_i ,y\_i } \right),,\left( {i = 1,2,...,l} \right),
  $$

  를 training example이라고 가정하고

  $$
  x\_i \in R^N
  $$

  는

  $$
  y\_i \in \left{ { - 1,1} \right}
  $$

  에 의해 라벨링 된 클래스에 속함
* 바운더리 H는 다음과 같이 정의됨

  $$
  w \cdot \Phi \left( x \right) + b = 0
  $$
* support vector가 위치한 margin에서 클래스 A와 B의 방정식은 다음과 같음

  $$
  \eqalign{ & w \cdot \Phi \left( x \right) + b = + 1 \cr & w \cdot \Phi \left( x \right) + b = - 1 \cr}
  $$

  where vector w defines the boundary

  b is a scalar threshold
* 데이터를 가장 잘 나누는 hyperplane은 다음 optimization problem 문제의 solution임(vapnik, 2000)

  <img src="https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-257acfa85ce596804afb5aaecd0482b7149d58d2%2Foptimization_problem.png?alt=media" alt="" data-size="original">

  where C is a penalty factor, and it implements a trade-off between empirical risk and confidence interval

  coefficient ξ is a slack factor

(이해 못함)

#### Multi-Class SVM

* 처음에는 SVM이 2-class pattern recognition으로 제안됨
* multi-class pattern recognition을 하는 두 가지 방법
  * one to one algorithm
  * one to rest algorithm: 이 논문에서 사용한 방법 (Yuan and Chu)

    $$
    \eqalign{ & For,a,data,set,of,k,classes \cr & \left( {x\_i ,y\_i } \right),,,,,,i = 1,2,...,l \cr & x\_i \in R^N \cr & y\_i \in \left{ {1,2,...,k} \right} \cr}
    $$
* "one to others" multi-class SVM algorithm:
  * k개의 클래스 중에 한 개의 클래스를 하나의 카테고리로 정하고 나머지 k-1개의 클래스를 another category로 정함

    그리고 첫 번째 two-class SVM classifier를 SVM1이라고 명명함
  * 첫번째로 선택한 클래스를 제외하고 다시 나머지 k-1개의 클래스 중 하나와 그 외의 k-2개의 클래스로 나눔

    두번째 two-class SVM classifier를 SVM2로 명명함
  * 같은 방법을 계속 반복하고 마지막 two-class SVM classifier를 SVM k-1로 명명함

    클래스가 k개일 때 classifier는 k-1개임
  * 분류할 때에는 새로운 샘플 x는 SVM에 순서대로 입력됨

    SVM1의 결과가 1이면 x는 첫 번째 클래스에 포함시킴
* 이 방법(one to other)은 k-1개의 two-class classifier가 사용됨. 반면에 "one to one" 방법은 k(k-1)/2 단계의 알고리즘이 필요함

### Test Rig

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-1727b0a8c5ba62e62183d86405b200b54d1a2103%2Ftest_rig.png?alt=media)

* 3가지의 subsystem: machine set, transducer, data acquisition system
  * transducer: accelerometer, signal conditioner로 구성됨, 외륜에서 진동 신호 측정
  * sample freq.: 25.6kHz
* 방전 가공으로 인위적 결함 만듦
* 베어링 사양

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-e282847195fb90dd0d76220c6b24225899593ba0%2Fbearing_info.png?alt=media)

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-8c8e8db916db12ac82fc61d83a6134fad157a643%2Fbearing_freq.png?alt=media)

### Rolling Bearing Fault Diagnosis

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-392b27b347d59662f41d214bebba4d63b00e1906%2Fflow_chart.png?alt=media)

* 200개의 진동 신호 데이터셋을 training dataset/Test dataset으로 나눔
  * 180개의 training dataset, 20개의 test dataset
* training dataset에서 추출한 feature로 학습시킴

#### Feature Extraction

Hilbert transform을 하기 전에 band-pass filter로 공진 주파수 주변을 필터링함(1000\~5000 Hz)

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-cbb815820296b9c0d7c01145966a923cf156cc6d%2Fwithout_fault.png?alt=media)

fr=12

fb = 47.8

fi=51.9

fo=32.1

임펄스가 보이지 않고 shaft rotation freq.가 명확하게 보임

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-02e511a346bb8d518f719a22fb6aa89230b4e1ed%2Fball_fault.png?alt=media)

fr=12

fb = 47.8

fi=51.9

fo=32.1

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-03605dd5f35b0ad136bc934f7e528e4ac99e6fc0%2Finner_race_fault.png?alt=media)

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-0188e3dccb645d9a05fdcef45cf00091c5ed9346%2Finner_outer_fault.png?alt=media)

fr=12

fb = 47.8

fi=51.9

fo=32.1

고장 베어링들은 해당 결함 주파수가 명확하게 보임

envelope spectrum에서 local maximum amplitude들을 multi-class SVM input feature vector로 사용함

: A(fr), A(fb), A(fi), A(fo)

#### Fault Pattern Reorganization

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-804b2fa48ecd2dca20db61a24f987b22f7ffdcc3%2Fone_to_others?alt=media)

* 조건이 4개이므로 3개의 two-class SVM classifier 사용
* SVM1에서 ball fault를 y=+1, other conditions을 y=-1로 정의

  SVM2, 3도 같은 방법 수행

  SVM3의 결과가 -1이면 normal condition
* RBF kernel parameter \_σ\_는 2로 설정됐고 SVM1, 2, 3은 각각 8, 6, 5개의 support vector를 얻었음

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-eeba2f6ea38a154205296af92cb26b558849be74%2Fresult_2.png?alt=media)

테스트 데이터는 정확도 100%였음
