Optimization of signal denoising in discrete wavelet transform