1. 程式人生 > >小波降噪詳解

小波降噪詳解

“小波”就是小的波形。所謂“小”是指它具有衰減性而稱之為“波”則是指它的波動性,其振幅正負相間的震盪形式。

小波在整個時間範圍的幅度平均值是0,具有有限的持續時間和突變的頻率和振幅,可以是不規則,也可以是不對稱

小波變換是時間(空間)頻率的區域性化分析,它通過伸縮平移運算對訊號(函式)逐步進行多尺度細化,最終達到高頻處時間細分,低頻處頻率細分,能自動適應時頻訊號分析的要求,從而可聚焦到訊號的任意細節

傅立葉變換不具有區域性性而小波變換不但具有區域性性,而且尺度引數a可以改變頻譜結構和視窗的形狀,起到“變焦”的作用,因此小波分析可達到多解析度分析的效果。

參考資料:
http://blog.csdn.net/jbb0523/article/details/42028587

小波公式

對於任意實數對(a,b),其中引數a必須為非零實數,稱如下形式的函式:

\Psi _{a,b}=\frac{1}{\sqrt{\left | a \right |}} \Psi \left ( \frac{x-b}{a} \right )

為由小波母函式ψ(x)生成的依賴於引數(a,b)的連續小波函式,簡稱小波。小波母函式ψ(x)只有在原點的附近才會有明顯偏離水平軸的波動,在遠離原點的地方函式值將迅速衰減為零。所以對於任意引數(a,b),小波函式ψa,b(x)在x=b附近存在明顯的波動,遠離x=b的地方迅速衰減到零(因為b是時移量,母小波是以原點為中心,時移就以b為中心了,如果有尺度變換的話再考慮進去就可以了)。

小波形狀

db:

coif:

多尺度一維離散小波分解

the first step is

 


The length of each filter is equal to 2N. If n = length(s), the signals F and G are of length n + 2N −1 and the coefficients cA1 and cD1 are of length floor(n−12)+N.

The next step splits the approximation coefficients cA1 in two parts using the same scheme, replacing 

s by cA1, and producing cA2 andcD2, and so on.

The tree is known as a filter bank.

 

參考資料:
https://en.wikipedia.org/wiki/Discrete_wavelet_transform

 

小波去噪過程

去噪步驟
對原始訊號進行小波分解,得到各細節分量(高頻)與近似分量(低頻)
對細節分量進行閾值處理
用處理後的各分量進行小波重構,得到去噪後的訊號

去噪過程詳解

依據MATLAB函式介紹整個去噪過程

函式原型

XD = wden(X,TPTR,SORH,SCAL,N,'wname')
[XD,CXD,LXD] = wden(...)

函式功能

wden is a one-dimensional de-noising function.
wden performs an automatic de-noising process of a one-dimensional signal using wavelets.
wden  returns a de-noised version XD of input signal X obtained by thresholding the wavelet coefficients.

參考資料
https://cn.mathworks.com/help/wavelet/ref/wden.html?searchHighlight=wden&s_tid=doc_srchtitle

1. 選擇合適的小波,分解尺度

小波coif2,分解尺度N=4

2. 選擇合適的計算閾值方法  

TPTR = 'rigrsure', adaptive threshold selection using principle of Stein's Unbiased Risk Estimate.
1)無偏似然估計原則(rigrsure): 是一種基於Stein無偏似然估計的自適應閾值選擇。對於給定的閾值T,得到它的似然估計,再講似然T最小化,就得到了所選的閾值,這是一種軟體閾值估計。
TPTR = 'heursure', heuristic variant of the first option.
2)啟發式閾值原則(heursure): 是無偏似然估計和固定閾值估計原則的折中。如果信噪比很小,按無偏似然估計原則處理的訊號噪聲較大,在這種情況下,就採用固定閾值形式。
TPTR = 'sqtwolog', threshold is sqrt(2*log(length(X)))
.
3)固定閾值原則(sqtwlolg): 固定閾值T的計算公式T=\sqrt{2\log(n)}
TPTR = 'minimaxi', minimax thresholding.
4)極值閾值原則(minimax): 採用極大極小原理選擇閾值,它產生一個最小均方誤差的極值,而不是沒有誤差。統計學上,這種極值原理用來設計估計器。因為被消噪的訊號可以看作與未知迴歸函式的估計器相似,這種極值估計器可在給定的函式中實現最大均方誤差最小化。

參考資料
https://cn.mathworks.com/help/wavelet/ref/thselect.html

3. 閾值處理方法

SORH ('s' or 'h') is for soft or hard thresholding

 

Y=X \cdot 1_{(\left | X \right |>T)} 

Y=sign(X)\cdot (\left | X \right |-T)_{+} 

硬閾值方法能夠保留更多尖峰特徵,軟閾值方法使重建訊號比較光滑。

參考資料
https://cn.mathworks.com/help/wavelet/ref/wthresh.html

4. 對細節訊號做閾值處理

SCAL defines multiplicative threshold rescaling:
'one' for no rescaling
'sln' for rescaling using a single estimation of level noise based on first-level coefficients
'mln' for rescaling done using level-dependent estimation of level noise
Wnoisest returns estimates of the detail coefficients' standard deviation for levels
The estimator used is
Median Absolute Deviation / 0.6745, well suited for zero mean Gaussian white noise in the de-noising one-dimensional model.

參考資料
https://cn.mathworks.com/help/wavelet/ref/wnoisest.html?searchHighlight=wnoisest&s_tid=doc_srchtitle