There is a huge amount of literature on this problem. I include some works that seem "classic" and that I've consulted at some point:
Tulczyjew: http://www.springerlink.com/content/u9481124734547t6/Link http://www.numdam.org/numdam-bin/fitem?id=BSMF_1977__105__419_0
Takens: http://projecteuclid.org/DPubS?service=UI&version=1.0&verb=Display&handle=euclid.jdg/1214435235Link
And the work of Anderson on the variational bicomplex (I think this complex was introduced by I.M. Gelfand circa 1970).
There is also quite a bit of good work by Vinogradov and his school (the C-spectral sequence). All this is mostly applications of homological algebra to the theory of PDE's.