Borrar filtros
Borrar filtros

why does wavelet approximation need to multiply sqrt(2)

6 visualizaciones (últimos 30 días)
konoha el 28 de Abr. de 2022
Respondida: Sudarsanan A K el 15 de Dic. de 2023
I am learning wavelet transform, the image below is one of my examples. Notices that when down sampling the sample signal, the approximation gets multied by about sqrt(2). I know the scaling function has integral one. this property should keep the amplitude of the signal remain the same, i think. Do I need to divide sqrt(2) for each level?
This document, has exmple for deconstructing and reconstructing function with wavelet. But it doesn't multiply sqrt(2).

Respuestas (1)

Sudarsanan A K
Sudarsanan A K el 15 de Dic. de 2023
Hello Konoha,
I understand that you are interested in exploring the scaling and normalization of wavelet coefficients within the multi-level wavelet decomposition.
When you perform a multi-level wavelet decomposition in MATLAB:
  • The signal is processed with two filters: a low-pass filter (scaling function) and a high-pass filter (wavelet function).
  • The filtered signal is then downsampled by half, which is a key step in wavelet decomposition.
For the normalization and scaling of wavelet coefficients:
  • The scaling function is normalized so that it integrates to one, helping to preserve the signal's energy.
  • Downsampling can affect the energy of the signal if not compensated for, but this is taken care of in the wavelet transform.
In MATLAB's Wavelet Toolbox:
  • Functions like "wavedec" for 1-D signals and "wavedec2" for 2-D signals, automatically handle normalization to ensure energy preservation.
  • The filters used are designed to keep the energy consistent across decomposition levels.
  • Users generally do not need to manually adjust coefficients for energy preservation.
Here is an example script that performs a two-level decomposition on a simple 1D signal using the Haar wavelet and checks the energy preservation:
% Define a simple 1D signal
signal = [1, 3, -2, 4, -1, 5, 3, -3];
% Calculate the energy of the original signal
original_energy = sum(signal.^2);
% Perform a two-level DWT using the Haar wavelet
[C, L] = wavedec(signal, 2, 'haar');
% Extract the approximation and detail coefficients from C
A2 = appcoef(C, L, 'haar', 2); % Level 2 Approximation Coefficients
D2 = detcoef(C, L, 2); % Level 2 Detail Coefficients
D1 = detcoef(C, L, 1); % Level 1 Detail Coefficients
% Calculate the energy of the wavelet coefficients
transformed_energy = sum(A2.^2) + sum(D2.^2) + sum(D1.^2);
% Display the results
disp(['Original Energy: ', num2str(original_energy)]);
Original Energy: 74
disp(['Transformed Energy: ', num2str(transformed_energy)]);
Transformed Energy: 74
To know more about the amplitude changes and ensure you are interpreting the results correctly, you can additionally refer to the MathWorks documentation:
I hope this helps!




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by