# An Experimental Tuning Approach of Fractional Order Controllers in the Frequency Domain
## 2 Proposed Tuning Method
The closed loop transfer function written depending on the process and the controller for a negative feedback system can be written as  
\[H_{0}(s)=\frac{G(s)C(s)}{1+G(s)C(s)}, \tag{3}\]  
from which the open loop can be deduced as being  
\[G(s)C(s)=\frac{H_{0}(s)}{1-H_{0}(s)}. \tag{4}\]  
Mapping the Laplace domain to the frequency domain by replacing \(s=j\omega\), the frequency domain open loop equation becomes  
\[G(j\omega)C(j\omega)=\frac{H_{0}(j\omega)}{1-H_{0}(j\omega)}. \tag{5}\]  
Expressing the magnitude of the closed loop in dB is done by  
\[|G(j\omega)C(j\omega)|^{dB}=20\log_{10}\frac{|H_{0}(j\omega)|}{|1-H_{0}(j \omega)|}. \tag{6}\]  
The magnitude of the controller in dB is written as  
\[|C(j\omega)|^{dB}=|G(j\omega)C(j\omega)|^{dB}-|G(j\omega)|^{dB}. \tag{7}\]  
The magnitude of the open loop, denoted by \(|G(j\omega)C(j\omega)|\), can be determined from Equation (5) if the magnitude of \(1-H_{0}(j\omega)\) is determined. In order to do so, the closed loop is written as a sum of its real and imaginary parts, denoted by \(A(\omega)\) and \(B(\omega)\), respectively. \[H_{0}(j\omega)=A(\omega)+jB(\omega). \tag{8}\]The real and imaginary parts give the magnitude of the open loop  
\[|H_{0}(j\omega)|=\sqrt{A(\omega)^{2}+B(\omega)^{2}} \tag{9}\]  
and the phase  
\[\angle H_{0}(j\omega)=\arctan\frac{B(\omega)}{A(\omega)}. \tag{10}\]  
Equation (2) imposes values for the closed loop magnitude and phase such that some design specifications are met. Equations (9) and (10) form a system of two equations with two unknowns, \(A(\omega)\) and \(B(\omega)\). By solving the system created, the values of the real and imaginary parts are obtained. Replacing the magnitudes of \(|1-H_{0}(j\omega)|\) with the values of \(A(\omega)\) and \(B(\omega)\) allows the computation of the values for \(|G(j\omega)C(j\omega)|^{dB}\) based on Equation (6) and further allows for the estimation of the values of the magnitude of the controller from Equation (7). Repeating the steps for \(n\) test frequencies leads to a system of \(n\) equations where the known variable is the magnitude of the controller and the unknowns are the controller parameters. \[ \begin{cases}|C(\omega_{1})|=magC_{1}\ dB,\\ |C(\omega_{2})|=magC_{2}\ dB,\\...\\ |C(\omega_{n})|=magC_{n}\ dB.\end{cases}  \tag{11}\]  
Customizing the system of equations for the desired type of controller and solving the system should lead to the controller parameters. The system should be solved using numerical optimization routines, such that the best combination of parameters is found. It is highly recommended to take into consideration the following. * The minimum number of equations needed, denoted by \(n\), depends on the complexity of the chosen controller. The minimum \(n\) should be greater or equal than the number of parameters that need to be tuned. * A constrained routine can be chosen to perform the optimization such that one of the equations from the system is minimized, while the other equations are regarded as constraints. * As in any optimization algorithm, the developed solution depends on the chosen starting point and the initial points should be chosen realistically. For example, in the case of a fractional-order differentiation, the derivative order belongs to the interval \((0,1]\). The proposed tuning method is suitable for tuning classical PID type controllers as well as their fractional-order extensions. A generalization of the PI/PD controller is characterized by the following equation,  
\[C_{FO-PI/PD}=k_{p}+k_{d}s^{\mu}, \tag{12}\]  
where \(k_{p}\) and \(k_{i}\) are the proportional and derivative gains, whereas \(\mu\) gives the type of the controller,  
* \(\mu=-1\) integer order PI controller
* \(\mu=1\) integer order PD controller
* \(\mu\in(-1,0)\) fractional-order PI controller
* \(\mu\in(0,1)\) fractional-order PD controller  
Choosing this type of controller for the process requires a minimum of three experimental frequency domain tests, as there are three parameters that need to be tuned.