## 5 Experimental and Results
### Results and Discussion  
After the experimental apparatus has been set up, the experiment is performed to derive the input and output data, which are then processed by FRIT to tune the \(K_{P1}\), \(K_{P2}\) and \(K_{I}\) parameters. The tuning parameters are then implemented, and the actual waveform is compared to the ideal waveform. In the experiment, the speed command is changed from 100 min\({}^{-1}\) to 150 min\({}^{-1}\), and then, the step disturbance is added by applying a load to the control system when the motor speed is maintained at 150 min\({}^{-1}\). The model PLZ 150 W electronic load is used for motor loading and is set at 0.5 A. The clock frequency of the FPGA is set to 48 MHz, and the pulse encoder has 20,480 ppr. A PWM switching frequency of up to 100 kHz is achieved. A control frequency of up to 200 kHz is achieved, but only when the frequency of the speed detector is 50 kHz. The initial output with the step response and the disturbance response (black lines) is shown in Figure 8, and the initial input is shown in Figure 9. The speed decreases and the current increases when the motor is loaded. Figure 6: Experimental apparatus. Figure 7: Permanent magnet synchronous motor. The initial input (\(u_{0}\) (\(k\))) and output (\(y_{0}\) (\(k\))) data are taken from the one-shot experimental data from the closed loop system where the initial PI-P gain controller was implemented. The sampling time for the controller is 0.001 second. The initial PI-P gain controller parameters are as follows:  
\[K_{P1}=0.6,\,K_{I}=50,\,K_{P2}=0.005\]  
These parameters are chosen arbitrarily and only once the experiment is performed using the initial controller parameters. After the input and output data have been taken from the experiment, the reference model data are then formed by following the output data shown in Figure 8 (red lines). The reference model data are used for the step response and for the disturbance response. The reference model \(M_{1}\)(s) for the step response is represented as:  
\[M_{1}\left(\mathrm{s}\right)=\frac{1000^{2}}{\left(s+1000\right)^{2}} \tag{42}\]  
The disturbance reference model \(M_{2}\)(s) for the disturbance response is presented as:  
\[M_{2}\left(\mathrm{s}\right)=\frac{1}{K_{P1}K_{I}}\frac{200^{3}s}{\left(s+200 \right)^{3}} \tag{43}\]  
Natural frequency \(\omega\) is the desired frequency for step reference model \(\omega_{1}=1000\) rad/s and disturbance reference model \(\omega_{2}=200\) rad/s. Because the control system is a 2 DOF system, the relative degree of the controlled plant is set to \(l=2\). The reference model \(M\)(s) is composed of the reference model for a step response \(M_{1}\)(s), and the disturbance reference model for the disturbance response \(M_{2}\)(s) is as shown in Figure 8.  
The reference model data can be composed of:  
\[M\left(k\right)=\left\{ \begin{array}{cc}M_{1}\left(k\right)&1\leq k\leq 3 286\\ M_{2}\left(k\right)&3287\leq k\leq 5001\end{array} \right\}\, \tag{44}\]  
where \(M\)(\(k\)) are the reference model data for \(k=1,2,3,\,\ldots\,,5001\). The tuning method for the proposed FRIT in the 2 DOF PI-P controller is summarized as follows:  
1. Perform an experiment to obtain the initial input and output data (\(u_{0}\)(\(k\)), \(y_{0}\)(\(k\))) in the 2 DOF PI-P control system with the initial PI-P gain parameters. 2. Form reference model data \(M\)(\(k\)) for the step reference model data and the disturbance model data. 3. Minimize the errors between the reference \(M\)(\(k\)) and the initial output \(y_{0}\)(\(k\)) using (13). Use PSO for FRIT optimization  
Figure 8: Output data using the initial PI-P gain controller and reference model data. The step response and the disturbance response using the initial PI-P gains are shown in Figure 8.  
Figure 8 shows the output data using the initial PI-P gain controller for the step response and the disturbance response. The ideal response is compared to the output response in this figure. The output response does not follow the ideal response in this case.