Optimization of a permanent magnet undulator for free electron laser studies on the ACO storage ring