Investigations on the dynamics of ferro- and antiferroelectric betaine compounds