We consider the dynamic average consensus problem in which each agent in a network has access to its own local input signal, but it must compute and track the average of all such inputs. Each agent communicates only with neighbors in the network, and local communication, computation and memory requirements should be independent of the number of the agents in the network. The Proportional-Integral (PI) estimator in  guarantees zero steady-state error under constant inputs for constant, connected, and balanced networks, even in the presence of estimator initialization errors. In this work, we employ the internal model principle to generalize the PI estimator so that it achieves zero steady-state error for classes of time-varying inputs, including polynomial inputs of known order and sinusoidal inputs with known frequencies. Like the PI estimator, our new estimator is robust to initialization errors.