Control of electrically or electromagnetically actuated clutches