## 4 Classical Controllers  
Due to the inherent instability of the system, it is not possible to apply a random signal directly to the system in order to get the training data. So linear controllers were designed and tested in order to obtain the training data for the neural networks.  
In order to simplify the design of the controllers, we used the dominant pole approximation [32; 33], that states that the closer poles to the imaginary axis are considered the dominant poles because the transient response of the system is characterized by them. In this particular system, because the ratio between the furthest pole from the imaginary axis (\(s=-200\)) and the dominant pole (\(s=-44.29\)) is at least four, the transfer function (25) can be rewritten, while maintaining the static gain of the system, as:  
\[G_{dp}(s)=\frac{-1211.1}{(s+44.29)(s-44.29)}. \tag{26}\]  
Using a zero-order-hold (ZOH) with a sampling period of \(T=0.003~{}\text{s}\), the discrete system has the following transfer function:  
\[G_{pd}(z)=\frac{-5.458\times 10^{-2}(z+1)}{(z-1.142)(z-0.8756)}. \tag{27}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Constant** & **Value** & **Units** \\ \hline \(\alpha\) & 507.045 & ADU \\ \hline \(\beta\) & 1123.801 & ADUcm\({}^{3}\) \\ \hline \(\gamma\) & 69.474 & ADU/A \\ \hline \(m\) & 30.084 & ADU/A \\ \hline \(b\) & 516.343 & ADU \\ \hline \hline \end{tabular}
\end{table}
Table 5: Optimized sensor constants.  
The first controller was a lead compensator in order to improve the stability of the closed-loop system [32; 33]. The root-locus method [32] is applied for a time response with less than 5% overshoot and a rise time of ten times the sampling period (\(t_{r}=0.03\) s), yielding:  
\[D_{lead}(z)=-6.8316\frac{z-0.8756}{z-0.6806}. \tag{28}\]  
From the lead compensator we designed a lead-lag compensator to reduce the steady state error [32; 33]. The root-locus method was again used, and in order to maintain the stability of the transient response provided by the lead compensator, we design the lag portion of the controller with a zero and pole extremely near \(z=1\)[34]. The zero obtained for the lag portion was \(z=0.9979\) and for the pole \(z=1\), thus providing an integrative action to the lead-lag controller:  
\[D_{lead-lag}(z)=\frac{-6.823z^{2}+12.8z-5.969}{z^{2}-1.68z+0.6804}. \tag{29}\]  
The simulated system response is depicted in Figure 8. We observe that both controllers have the same transient response but the integrative action of the lead-lag compensator eliminates the steady-state error.  
Figure 9 shows the real-time Simulink diagram used to test the classical controllers. A similar control diagram will be used for the neural controllers.  
Figure 8: Response to step input of the linearized system with both classic controllers.  
Figure 9: Simulink diagram used to test the classical controllers.  
In Figure 10 we present the experimental responses of the system to a step input for the lead and lead-lag compensators. As shown, both controllers can maintain a stable levitation; however the lead-lag compensator generates an output response around the desired step reference, and thus having an improved steady-state error.