Catalan authorities say they are working to ensure that a disputed referendum on secession from Spain will take place peacefully, despite being declared illegal by the central government in Madrid.