Modulating functions method is a non asymptotic estimation method, which provides accurate and robust estimations of states, parameters and inputs for different classes of systems, which include unknown linear ordinary differential systems, fractional systems and linear partial differential equations. In the case of time or space varying unknown, the method requires the decomposition of the unknown into predefined basis functions. However, the estimation performance will depend on the nature of the basis functions which in some cases are not easy to determine. This paper proposes a new iterative learning based modulating functions method, which combines the standard modulating functions with a dictionary learning procedure. The dictionary learning step allows the determination of appropriate set of functions to decompose the unknown, while the modulating function step allows the non-asymptotic and robust estimation of the projection coefficients. The performance of the proposed method is illustrated in a distributed solar collector application, modeled by partial differential equations and where the unknown solar irradiance is estimated.