When controlling complex non-linear systems, classic flat-phase specification (FPS) method for tuning fractional order controllers employs graphic method. However, following this step of graphic method, the tuning method cannot work automatically. In this study, a novel optimization method is employed to enable it to work automatically. An approximation is used to avoid solving derivatives, thereby simplify computation of the method. Frequency-domain analysis reveals that, compared with the classic FPS method, this method is capable of covering more conditions, especially those with larger phase margin. A linear model and a non-linear model (Simscape) are used to demonstrate that the proposed method can ensure both transient performance and robustness. For the relevant working folder, please refer to: http://bit.ly/npm-simscape-code. For video demonstrations, please click: http://bit.ly/npm_simscape_video.