## 5 Laboratory Verification for PMSM Drive
### Results  
The main objective of the laboratory system tests conducted with the PMSM was to enable an increase in the dynamics of the drive. In the case at hand, this is understood as a shortening of transients during moments of rapid load change. At the same time, it was expected that the overshoot of the improved controller structure would not be greater or would be further reduced. An additional positive effect was to be a reduction in the drive-generated noise, which characterized the drive in the case of the selected settings of a controller with a PID structure during the optimization procedure carried out directly on the test bench. For this purpose, a quality function of the form (16) was created for the optimization task:  
\[J_{3}=\int_{0}^{\infty}|\varepsilon_{\omega}(t)|dt+\gamma_{2}\cdot\int_{0}^{ \infty}\Delta_{osc\oplus\tau_{\omega}}(t)\,dt, \tag{16}\]  
where \(\varepsilon_{\omega}\) is the speed error, \(\Delta_{osc\oplus\tau_{\omega}}\) denotes the amplitude of the oscillation of the \(q\)-axis current in the measurement window of several consecutive samples, after processing by a first-order low-pass filter with a time constant \(\tau_{\omega}\). The constant \(\gamma_{2}\) is the weighting factor. This form of quality function minimized rapid changes in current values in the system, resulting in quieter drive operation. The tests were conducted on a laboratory bench with a PMSM using _online_ optimization process. During several thousand test cycles, the RWC algorithm modified the parameters of the speed controller with a PID structure. The system was then optimized with FIR, modifying its weights and controller parameters. The starting point of the optimization was the previously obtained PID controller parameters with weights (2). This is an important advantage: drive operation can be improved by starting the optimization from known \"safe\" settings. Tests showed that the modified speed controller could achieve good dynamics despite the absence of the differential part, so the algorithm for optimizing the controller parameters was supplemented with a part that minimizes the differential coefficient in the speed controller toward zero, transforming the MPID controller structure into an MPI structure. Drive performance for the described control and optimization method is shown by the experimentally obtained results (Figures 13-16) and simulations for the same settings (Figures 7-10). The waveforms from Figures 13 and 14 show a comparison of the setpoint and actual speed for a sequence of changes in the setpoint speed and load, analogous to the simulation waveforms for MPI and PID control. It can be seen that in both experimental tests and for simulations, the control system with MPI, compared to the PID reference system, is characterized by a much lower overshoot (almost twice as small as in the case of a step change in the reference speed) and a much faster response to disturbance (about 56 ms vs. more than 100 ms). Analyzing Figures 15 and 16, one can see a significant difference in the nature of the reference current (and, as a result, the measured current) for the modified system (the waveforms on the left) and the reference system (the waveforms on the right). For the optimized PID controller, one can see a significant chattering of the current, which results in the generation of noise, among other things. The drive with the presented MPI controller is characterized by a dynamic response to a change in the reference speed and a fast response to a disturbance without inducing speed oscillations and without generating a chattered current. The drive with MPI is more dynamic than the PID reference system yet features quiet operation. Figure 14: Experiment: The response of the system to a sloped change in the speed reference. Once the speed is set, the load change step sequence is performed. The speed changes in the following sequence: 0.6 \(\cdot\) 98 % \(\rightarrow\) 0.6 p.u. (about 199.7 \(\rightarrow\) 203.8 rad/s). The load varies in the sequence from 0 to 0.2 p.u. (2.7 A).