# How can a zero-padded length n signal be truncated to n coefficients from which a signal can be reconstructed?

A wavelet transform is defined for infinite length signals. Finite length signals must be extended in some way before they can be transformed. I know that periodic replication and zero padding are appropriate for signals that begin and end on the baseline, while mirror -image replication and linear extrapolation provide continuity at the boundaries for signals that do not begin or end on the baseline. Periodic replication either wraps around or reflect the signal detail in the region beyond the boundaries and this distorts the interpretation of the transform coefficients near the boundaries.

I have a time series of limited duration not extending beyond the signal range and that is not a power of two as required by the transform (using R package wavethresh, function wst(), packet-ordered non-decimated wavelet transform). Zero padding seems to be the only way forward for signals that begin and end on the baseline. Also, zero padding makes no assumptions of the signal after the boundaries describing only the signal, however zero padding results in a non length preserving transform (one in which the transform vector is longer than the signal vector) and large perturbations in the transform space are not reflected in the signal space.

By doing zero padding (added at the beginning and at the end of the series) my question is how can I truncate the zero-padded signal of n coefficients to obtain n coefficients as be able to reconstruct the signal exactly.

• Have you tried padding by constant or polynomial extrapolation? – Lutz Lehmann Jan 7 '14 at 15:02

## 1 Answer

From a theory standpoint, that ought to be possible. It's not bound to be simple, however. Zero padding will scale and interpolate the FD representation of your signal. If you remove coefficients the right way, you should be able to reconstruct what's missing.

Let's say you doubled the signal length by padding. You can then remove every other bin of the fourier transformed (starting with the second) and get exactly the result you would have without padding.

• I'm sorry, I was answering about fourier analysis. Somehow I got that mixed up. Why someone marked that as the right answer is a mystery. – user7358 Feb 11 '14 at 21:35
• I believe the principle is the same removing coeficients in a certain way as to permit the reconstruction. – Barnaby Feb 14 '14 at 19:41
• There are some papers about this situation, I think. Wavelets on irregular domains is an important topic. – user7358 Feb 14 '14 at 19:59