Optimization of cogging force in a linear permanent magnet generator for the conversion of sea waves energy