Article Preview
Top1. Introduction
Currently, microcontrollers are being very used in different applications such as aerospace, medicine, automotive systems and transportation, etc. Indeed, a microcontroller presents the features of a computer such as central processor, non volatile and volatile memories, input and output ports with special particularities like serial communication, analog to digital conversion. In fact, the progression of microcontrollers and the features that they combined with their speed, allow them to be adapted for an ample variety of control applications. Mahmoud et al., (2013) implemented a fast fuzzy processor using FPGA. Some research works have used fast devices to implement control algorithms (Jayaraman & Ravindran, 2008; Ling et al., 2008). As an example of the advancement in the embedded technology field is the apparition of STM32 microcontrollers. Indeed, they possess several advantages such as low cost, low consumption and good performance. It is in this context that is made in this work which consists on the implementation of a control law on a STM32 microcontroller. There are some works that exploited the STM32 microcontroller in the control field. Zhen & Yan (2013) presented a control law of the temperature for the hot runner system. So, they used the STM32 microcontroller to implement a fuzzy PID (Proportional Integral Derivative) control algorithm. They affirmed that the fuzzy PID controller has the features of high anti interference and an acceptable adaptability. Wang et al., (2011) proposed the application of STM32 microcontroller in the design of mine DC electrical prospecting instrument. Zhang & Kang (2013) designed an embedded signal acquisition system based on a STM32 microcontroller depending on the mechanical failure appeared with high frequency in the rotating machines. A Radio Frequency (RF) data acquisition system based on STM32 and FPGA was proposed by Zhang & Zhao (2011) in order to collect the RF signal in high speed. In this work, the STM32 microcontroller is used to implement a control algorithm that will be applied to a real electronic process. In effect, this control law is determined by discretizing a continuous time controller. The controller parameters are obtained by solving a non convex optimization problem. In effect, the optimization is confronted in several real problems. Accordingly, the resolution of optimization problems has attracted the attention of eminent researchers in various fields. With the object of finding the global minimum Toksari (2009) proposed an Ant Colony Optimization (ACO) algorithm. The Practical Swarm Optimization (PSO) was exploited by Zhou et al., (2013) in the control algorithm with the purpose of allowing robots to navigate towards remote frontier. Abu-Seada et al., (2013) have also used the PSO method in order to find an optimal tuning of PID controller parameters for an automatic voltage regulator system of a synchronous generator. With the aim of determine the PID controller’s gain the PSO was employed in some research works (Bahgaat et al., (2014); Mousa et al., (2015)). The PSO was exploited by Shahin et al., (2014) to control the electric power. Toledo et al., (2014) have used the Genetic Algorithm (GA) with hierarchically structured population in order to solve unconstrained optimization problems. Mamdoohi et al. (2012) proposed the implementation of GA in an embedded microcontroller based polarization control system. The controller measures the signal intensity. These measures will be exploited in the estimation of the genetic value. The GA controls this process. To achieve optimum performance, the best genetic parameters optimize the code such that the fastest execution time can be obtained. Valdez et al., (2014) propsed a hybrid approach for optimization combining PSO and GAs using fuzzy logic in order to integrate the results. They concluded that their method combines the advantages of PSO and GA to provide an improved Fuzzy PSO (FPSO) and Fuzzy GA (FGA) hybrid method. The application of fuzzy, neuro-fuzzy control and GA was developed in some works (Azar & Vaidyanathan, 2015a; Azar & Vaidyanathan, 2015b; Azar & Vaidyanathan, 2015c; Zhu & Azar 2015). Fuzzy logic is exploited with an aim of combining the results of the GA and PSO in the best possible way. Fuzzy logic is also employed in order to adjust parameters in FPSO and FGA. Jiang et al., (2014) presented a hybrid algorithm to solve economic emission load dispatch problems considering various practical constraints by employing Hybrid Particle Swarm Optimization and Gravitational Search Algorithm (HPOS-GSA). Their algorithm provided a combination between the PSO and the GSA and adopted co-evolutionary technique to update its particle position in the swarm with the cooperation of PSO and GSA. With the object of finding the global minimum in the numerical, Servet Kiran et al., (2012) presented a hybrid approach which is based on PSO and ACO. This algorithm is named hybrid ant particle optimization algorithm. The PSO and the ACO work separately at each iteration and generate their solutions. Then, the best solution is chosen as the global best of the system and its parameters are exploited to determine the new position of particles and ants at the next iteration. Tabakhi et al., (2014) proposed a method based on ACO, called unsupervised feature selection method based on ACO in order to obtain an optimal solution to the feature selection problem.