Tri-level acceleration profiles for dynamic optimisation of high-speed cam mechanisms