Lattice dynamics in the mixed valence compounds Sm(Y)S, CeSn3 and CePd3