# 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