A framework for signal decomposition with applications to solar energy generation