## 6 Conclusions  
This paper presents a concept for modifying a control structure to improve quality indicators, such as overshoot, speed drop, and recovery time. The concept was tested for two types of objects: I2 PD and FOLIPD. In both cases, the controller was modified by preprocessing the control error signal using FIR, with settings determined by the optimization process: a simulation for the first object and online on the real object. The first system tested was a control system with an I2 PD-type object (simulation). For this object, the reference controller was a serial PID structure with derivative filtering, with the settings selected according to a criterion known from the literature. Subsequently, a pre-treatment module for the input lag of the controller with the FIR structure with appropriately selected parameters was added. A significant improvement in quality indicators was obtained. The significant improvement in quality indicators obtained encouraged the verification of the concept in a real system. The test object was a closed-loop current control plus the mechanical part of the drive with a PMSM, with delays taken into account, that is, in simple terms, a first-order system with integration and time delay (FOLIPD). The main expected result of the modification of the speed control system was an increase in dynamic performance compared to a PI/PID controller with optimized settings according to the assumed quality criterion. The best dynamics in the reference system studied, among PI and PID controllers, were achieved by a controller with a PID structure, and it was this structure that was further compared with the modified speed controller. However, good PID dynamics in the studied system come at the price of noisy drive operation, which is understandable when analyzing the current waveforms in the \(q\)-axis. This disadvantage is not present in the modified system, for which the recovery time of the speed drop in response to the disturbance is much shorter compared to the system with the PID speed controller. The modified speed controller during optimization allowed the derivative gain to be minimized to zero. As a result, during the optimization process, the structure of the controller was changed from PID to PI + FIR (the optimization process started from the settings for the PID reference controller). In order to optimize the task of modifying the object's behavior, a \"virtual error\" was introduced. This made it possible to control the \"smoothness\" of the state variable waveforms by the optimization process. \begin{table}
\begin{tabular}{l c c c c c c} \hline \hline  & **Quality Index** & **Overshoot** & **Minimum Value** & **Settling Time** & **Recovery Time** \\ \hline  & & **1** & **2** & **3** & **4** & **5** \\ \hline MPI\_real & 1 & 0.601 & 19 \% & 78 \% & 60 ms & 56 ms \\ PID\_real & 2 & 0.961 & 27 \% & 71 \% & 76 ms & 100+ ms \\ \hline MPI\_sim & 3 & \(2.26\cdot 10^{-4}\) & 25 \% & 83 \% & 65 ms & 51 ms \\ PID\_sim & 4 & \(4.20\cdot 10^{-4}\) & 43 \% & 55 \% & 63 ms & 100+ ms \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Quality indices for the PMSM object type. Both simulations and experiments. The results obtained are unequivocally positive: good speed dynamics despite the use of an \"only\" PI-type controller; quiet operation--a marked reduction of chattering in the waveforms of set and measured currents; and good response to load variation. In order to shape the nature of the waveforms (smooth or rough), the quality function used during optimization is crucial. The presented method makes it possible to use simple PI/PID controllers and improve the performance of the system without interfering with the internal structure of the controller. The method allows optimization to start with a basic set of controller settings (\"safe\" or analytically derived settings).