Real-Time Low-Cost Speed Monitoring and Control of Three-Phase Induction Motor via a Voltage/Frequency Control Approach

In this paper, a new design of a real-time low-cost speed monitoring and closed-loop control of the three-phase induction motor (IM) is proposed. *e proposed solution is based on a voltage/frequency (V/F) control approach and a PI antiwindup regulator. It uses the Waijung Blockset which considerably alleviates the heaviness and the difficulty of the microcontroller’s programming task incessantly crucial for the implementation and themanagement of such complex applications. Indeed, it automatically generates C codes formany types of microcontrollers like the STM32F4 family, also used in this application. Furthermore, it offers a cost-effective design reducing the system components and increasing its efficiency. To prove the efficiency of the suggested design, not only simulation results are carried out for a wide range of variations in load and reference speed but also experimental assessment. *e real-time closed-loop control performances are proved using the aMG SQLite Data Server via the UARTport board, whereas Waijung WebPage Designer (W2D) is used for the web monitoring task. Experimental results prove the accuracy and robustness of the proposed solution.


Introduction
During the last decades, induction motor (IM) drives are becoming more and more popular in industrial applications as well as in home appliances, thanks to their reliability, low cost, robustness, ease of maintenance, and simplicity of control [1][2][3]. e control methods of IM are mainly classified into two major classes: scalar control and vector control approaches [4][5][6]. Scalar control, popularly known as voltage/frequency (V/F) control, is considered as a simple approach based on the control of the supply voltage amplitude and the frequency. For indirect control of the IM speed, it uses a threephase voltage source inverter (VSI) controlled by a pulse width modulation (PWM) technique. However, despite its simplicity of implementation, scalar control methods cannot achieve best performances during transients, which is considered as a major disadvantage [1,7,8].
Vector control approaches, also known as field-oriented control (FOC) approaches, allow not only the control of the amplitude and frequency of the voltage as it is the case for scalar control approaches but also the instantaneous position of the flux, the voltage vectors, and the current vectors [9,10]. ey are considered as mathematical model-based approaches. Especially in the transient regime, they guaranty better control performances compared to the scalar control approaches. Unfortunately, such control methods have complex algorithms and require a lot of computation time [11][12][13].
As the simplicity of the control algorithm is of major interest for users, the scalar control approach is still considered as the most used in industrial applications, especially when accuracy of the speed response in the transient regime is not mandatory, such as for ventilation and air conditioning applications and heating and pumping systems [13][14][15]. e objective of these methods is to control the IM speed by maintaining constant stator flux. e magnitude of the stator flux is proportional to the ratio between the stator voltage and the frequency. However, if this ratio is kept constant, the flux remains constant. Also, by keeping V/F constant, the developed torque remains approximately constant.
is method gives higher run-time efficiency [16,17]. erefore, most AC speed drives (ACSD) employ the constant V/F method for the speed control. Along with the wide range of speed control, this method also offers "soft start" capability [18,19].
On the contrary, the great progress in microcontrollers and the power electronic components became an important factor in variable speed drive processing [20][21][22]. STM32F4 family of microcontrollers, for example, offers high-quality performances at the service of high-performance variable speed drives. Programming microcontrollers for such heavy and complex applications with conventional languages (such as assembler, C, or C++ languages) increase the scaling time of such applications. It requires, furthermore, the availability of an expert in computer programming with in-depth knowledge of processor architecture. In addition, in order to reduce operating costs and enhance the reliability and safe security of the proposed design, industrial applications should be monitored in real-time which allows perfect control and system supervision. Real-time monitoring has become consequently a major task for engineers and researchers in industrial applications such as pumping, mining industry, railways, and industrial drives. [23][24][25].
In this work, we propose a new design of a real-time low-cost speed monitoring and closed-loop control of the three-phase induction motor.
e control system, operating according to the rule V/F constant, is developed using VSI based on a space vector pulse width modulation (SVPWM) technique and a three-phase IM loaded by a magnetic power breaker. Waijung is also designed to solve this problem. It is a Simulink Blockset that can be used as targets to easily and automatically generate C code from Matlab/Simulink simulation models for STM32F4 Discovery microcontroller. e real-time speed monitoring and control of the proposed algorithm are done in two different ways. e first is based on the COM/UART port and USB converter, and the second manner uses Waijung WebPage Designer (W2D). Hardware required for this application is grouped as aMG Labkit F4N, suitable for many industrial applications. To our best knowledge, such solutions have never been previously tested for ACSD despite the significance of the solution. Furthermore, performance evaluation of the proposed algorithm will be verified not only via computer simulation results but also via experimental assessment for a wide range of variations in load and reference speed.
is paper is structured as follows. Section 2 presents the mathematical model of the three-phase IM and the related drive system. Section 3 presents the designed scalar control approach for closed-loop control of the IM. In Section 4, the effectiveness of the proposed approach is proved via simulation results. Finally, Section 5 expands experimental results for different scenarios.

e Induction Motor.
e electrical machine considered in this paper is a three-phase squirrel-cage (short-circuit rotor) asynchronous machine. e main electrical equations in the stationary reference frame can be written by the following form [7][8][9]: In the previous set of equations, v s is the stator voltage vector per phase and φ s and φ r represent the stator/rotor flux, respectively. e stator/rotor currents are denoted by i s and i r . R s and R r are the stator/rotor resistances, respectively. ℓ s and m are leakage inductance and the ratio between mutual inductance M and rotor inductance L r , respectively. Electrical speed and the number of pole pairs are denoted by ω r and p, respectively. Various expressions can be used to calculate electromagnetic torque T em . e most used relation is described by equation (4), where K f is the viscous coefficient, j is the moment of inertia, and T r is the load torque. Figure 1 describes the association between a three-phase voltage converter and the IM. e power circuit of the converter is basically composed of three modules, namely, the three-phase rectifier, the AC/ DC filter capacitor, and three-phase inverter, whereby D 1 -D 6 are the three-phase rectifier diode circuit, C is the filter capacitor DC bus, and C 1 -C 6 are the power switches. A three-phase source inverter, whose objective is to provide variable voltage and variable frequency output through pulse width modulation (PWM) control, drives the IM [26]. Several PWM techniques can be used to generate signal command for the voltage inverter [13,15,19]. In this work, we use the SVPWM technique.

Space Vector Pulse Width Modulation Technique.
Considering a lossless three-phase inverter, the output voltage is obtained according to the DC bus voltage Vdc and the logic state of the three highest switches (C1, C2, C3). us, there are eight possible logical combinations of (C1, C2, C3) leading to six active voltage vectors and two null voltage vectors. e space vector of the output voltage of the inverter can be expressed by the following expression: where k is an integer indicating the switching combinations [13,26]. In the complex plane d-q, different voltage vectors delivered by the inverter and the associated combinations of the switches C1, C2, and C3 are given by Figure 2. e goal of SVPWM is to produce a mean voltage vector during the PWM period (T s ) that is equal to the desired voltage vector v ref . is is done by applying the neighboring vectors v k for a specified time (τ k ), v k+1 for a specified time (v k+1 ), and the null vector v 0 or v 7 for the amount of time necessary τ 0 . ereby, to obtain an average value which equals to v ref over the period T s , we must have the following relation: e values of τ k , τ k+1 , and τ 0 can be computed using the following equations: where the coefficient ρ designates a voltage ratio.
To respect the condition of τ k + τ k+1 ≤ T s , the module V ref of the requested voltage v ref should verify the following condition: It should be noted here that the condition given by condition (6) related to the feasibility of the synthesis is established by considering a voltage vector in the Concordia reference frame, which implies that the magnitude V ref used corresponds to either � 3 √ times the rms value or ��� 3/2 √ times the maximum value in the natural system.

Scalar Control Design
e scalar control methodology focuses only on the steady state dynamic, allows to adjust the supply voltage as well as its frequency so that their ratio remains constant in order to avoid magnetic flux saturation, and affects the available torque of the machine [7,8]. Starting from equation (1) and assuming that the voltage drop across the stator resistance is small in comparison with the stator voltage mainly at the low-slip regions, the stator flux Φ s can be expressed as [12,16] where V s is the stator voltage magnitude and f s is the supply frequency (Hz). e electromagnetic torque-slip characteristic in the stationary regime takes the following form [6]: where g is the slip and R r and X lr represent the rotor resistance and total leakage reactance located in the rotor, respectively. Figure 1: Association of power modules for the three-phase voltage converter-IM. Figure 2: Inverter voltage vectors in Concordia's reference frame.

Mathematical Problems in Engineering
In the low-slip region (normal operating conditions), the above equation is simplified by is implies that if the stator flux is maintained constant, the variation of the torque as a function of the slip is almost linear.
Frequency control is natural for adjustable speed drive applications. However, voltage is required to be proportional to frequency so that the stator flux remains constant if the stator resistance is neglected. e open-loop V/F control of an IM is one of the most common methods widely used in the industry due to its simplicity, low cost, and performance drive [27]. As the rotor speed ω r will be slightly less than the synchronous speed ω s as a result of the slip speedω g , the speed of the motor cannot be controlled accurately. Also, as the rotor speed is not measured in this schema, the slip pulsation cannot be maintained. Consequently, the operation in the unstable area of the torquespeed characteristics can take place. Equally, the stator currents can exceed greatly the nominal current under the effect of the point mentioned above and thus endangers the combination inverter machine. ese drawbacks should have solutions by making an outer control loop in the IM drive, where the actual rotor speed ω r should be compared with a reference value ω ref , and hence, the error between these variables is generated [16][17][18]. is error is processed through a PI controller and a limiter to get the slip-speed command ω g . e inverter frequency command ω sref is generated by adding the slip command ω g and the actual speed signal ω r , and the frequency command generates the voltage command V s or its voltage ratio ρ through a volt/ hertz function generator. e resulting ω sref and ρ are applied to the motor by means of an SVPWM-VSI.
In low-speed operation, the voltage drop in the stator resistance is not negligible compared to that in the leakage reactance. Inversely, in the operation at a speed greater than that corresponding to the nominal frequency, a weakening of the magnetic field is led. In order to avoid these anomalies, the V/F control structure should then consider the voltage drop in the resistance at the low speed to maintain a constant stator flux, and it must limit the voltage when the nominal frequency is reached. e input voltage is then adjusted according to the frequency required to a specific speed reference as shown by the following equation [12,16,21]: A control scheme of the V/F and slip regulation-controlled IM is shown in Figure 3.
For a better performance of the conventional scalar control, an antiwindup PI regulator is used. e antiwindup PI controller is an improvement of the classical PI control. e use of antiwindup strategy is to prevent the controller from going into deep saturation and inspect the windup controller output when large set-point changes are made. is helps to prevent extreme overshoot during the startup of the IM and guarantees the desired performance independent of the operating conditions, i.e., reference variations and load torques [8,20]. Figure 4 shows the block diagram of a PI controller where the difference between the output value and the input value of the saturation block is used as a feedback signal through a gain (1/Tt) to forward the input to the integrator.

Simulation Results
To analyze and verify the performances of the proposed solution, the control methodology shown by Figure 3 is carried out by using MATLAB/Simulink software for the technical specifications of the IM which is given by Table 1. Simulation results are conducted for various operating conditions. Two main scenarios are given here: speed response under crenel variations of load torque and speed response under crenel variations of reference speed. e sampling time used in all simulation is 100 μs.

Scenario 1: Speed Response under Crenel Load Torque
Variations. In this test, a signal reference of 150 rad/s which is equal to nominal speed is used. A variation by crenels of the load torque is applied going from zero to the nominal torque: 0 at 5 s, 3 Nm at 10 s, 6.82 Nm at 20 s, 3 Nm at 30 s, and 0 at 40 s. Figures 5-9 show the obtained simulation results.
ese figures show that the proposed algorithm operates perfectly, and the antiwindup PI controller offers the best response. Figure 5 shows that the speed response is coincident with its reference. is is confirmed by Figure 6 showing a zoom on Figure 5. e speed response is practically perfect with no overshoot and an insignificant delay. Figures 7 and 8 show the response of the stator voltage. e voltage ratio varies as a function of the reference speed and proportional to the stator pulsation verifying that the flux is constant as the main property of scalar control. Figure 9 gives the stator and rotor pulsations and confirms that the slip pulsation (difference between stator and rotor pulsations) is proportional to the load torque as mentioned previously by equations (10) and (11). In Figure 9, the slip pulsation is between 0 (without load) and 30 rad/s (in nominal operating condition).

Scenario 2: Speed Response under Reference Speed Variations.
is simulation test performs the effects of the variations of the reference on the speed control. Figure 10 presents the rotor speed response under a reference speed crenel variation starting from 0, then 100, 120, 157, 150, and 80, and returns to 0 rad/s. In Figure 10, the rotor speed follows perfectly its reference. e IM is operated without load; thus, the stator and rotor pulsations are equal, so the slip is zero. Figure 11 shows the stator voltage represented by its ratio. It is easy to check here that the V/F constant is confirmed because the stator voltage-pulsation trajectories have the same form.

Experimental Validation
In this section, experimental results related to the real-time monitoring and control of the IM speed will be carried out via two communication techniques. For the first one, the communication is realized via the UART port, where for the second, the Waijung WebPage Designer (W2D) is exploited.

Mathematical Problems in Engineering
Furthermore, for each technique, the experimental results are carried out for the two scenarios considered in simulation results. e test bench [28] used for validation is built around an aMG labkit F4-based STM32F4 discovery. e aMG Labkit F4 [29] consists of low-cost high-performance DSP hardware with a variety of Plug-n-Play modules. is kit is supported by the Matlab/Simulink toolkit with Waijung Blockset and Waijung WebPage Designer (Drag and Drop Web-based Monitoring and Control) [30].
e photo of Figure 12 shows the main hardware components used in our application, including the following:  Figure 13. It includes in addition the following: (i) A squirrel-cage IM with parameters given in Table 1

Experimental Results via the UART Communication Port.
e hardware modules used here are the aMG USB Converter-N and the aMG SQLite Data Server board. Two Simulink-generated codes are built to achieve the scalar control algorithm of the IM which are the target and the host codes. e target Simulink STM32F4-generated code shown in Figure 14 allows reading the incremental encoder information (rotor speed) for the PI regulator input. It forces the actual speed to reach its reference. It generates PWM signals using symmetrical SVPWM technique. Figure 14 shows that there are two parts: the Waijung Blockset (green color) and the developed code (light blue color). Waijung Blocksets used here are as follows:    Generated programs concern the incremental encoder, the symmetrical SVPWM, and the PI antiwindup controller. Figure 15 shows the encoder code developed to read the information from the incremental encoder and convert it into an angular velocity. Figure 16 shows the developed Simulink code to configure Timer 1 to generate 3 100 µsperiod (10 KHz) active high PWM signals to pin E9, E11, and E13 with percentage of Ra, Rb, and Rc duty cycle, respectively. Figure 17 shows the PI controller Simulinkgenerated code to be used within the antiwindup PI controller. e host Simulink STM32F4 code is shown in Figure 18. is model is configured around 3 Waijung Blocksets to send set-point changes of speed, and the received binary data packet is displayed in real time as display and plot within the COM/UART port and aMG Converter-N2 (USB-UART converter) hardware component channel D.
e performance and the accuracy of the designed real-time speed control of the IM are verified via two scenarios: the first scenario is done at step changing of the speed reference, where the second scenario is done at step changing of load torque under a constant reference speed.

Scenario 1: Reference Speed Change.
is test is carried out to confirm the correctness and good performance of the antiwindup controller despite a large variation of speed reference.
e reference speed variation crenels in rad/s apply from zero, then 100, 120, 157, 150, and 80, and finally zero. e IM is operated here without the load. Figure 19 proves that the sensed speed pursues its reference in a perfect way, and the time response for each variation does not exceed 2 s without overshot.
is implies that the antiwindup controller operates perfectly, and the whole program is well designed for the high-performance IM speed drive.
Because the IM is without the load, the slip pulsation is null, and the stator and rotor pulsations are equal. is is confirmed by Figure 20 showing the response of the stator pulsation ω s and the rotor speed noted here ω r for the above  scenario. e stator pulsation varies parallel to the reference speed ω ref and in proportionality with the stator voltage to maintain the V/F constant. is rule is confirmed by Figure 21 that the ratio voltage varies from 65% for reference speed of 100 rad/s, 78% for 120 rad/s, 100% for 157 rad/s (synchronous speed), 98% for 150 rad/s, and 52% for 80 rad/s.

Scenario 2: Load Torque Change.
ese series of tests employ a nominal reference speed of 150 rad/s when applying step variations of load torque. Figure 22 presents the response of the rotor speed when the IM is driven in a closed-loop scalar control. is figure demonstrates that, for a large variation of load torque of four crenels as in simulation tests (0, 3, 6.82, 3, and 0 Nm), the measured   speed is kept constant close to the reference. Figure 23 presents a zoom off Figure 22 in steady state operation proving that the overshot does not exceed 2.6%, and the settling time is less than 2 s in nominal operation. Such performances prove that the antiwindup regulator PI operates correctly, and its parameters Ki and Kp are well designed. Besides, a fine consistency between the generated Simulink codes and the Waijung Blockset target for STM32F4 Discovery is proved. In addition, a better use of Waijung Blockset in electrical machines control applications. e proprieties of the V/F control for the IM are well verified by Figures 24-27. Reverting to equations (11) and (12) that the electromagnetic torque is proportional to the square of the stator voltage and its frequency, these properties explain why the voltage ratio and the stator pulsation increase and decrease parallel to the load torque to keep rotor speed constant. e real-time response of the voltage ratio is shown in Figure 24. A zoom on this figure, Figure 25, proves that the ratio varies between 96.5% and 100% according to the load torque in respect to equation (12) (100% in the nominal operating regime). e reference stator pulsation used to compute the stator voltage,  Mathematical Problems in Engineering according to equation (12), is shown by Figure 26. A zoom on the last figure shown in Figure 27 denotes that such pulsation varies from 300 rad/s with no load torque to 331 rad/s in the nominal operating regime. e difference between the stator and rotor pulsation represents the slip pulsation, which is proportional to the torque (described by equation (11)) and proves the well regulation of the speed variable. It is obvious to observe that all obtained experimental results are incredibly close to simulation results. is finding proves the correctness and the accuracy of the real-time implementation of the proposed speed control hardware/software solution.

Experimental Results via Waijung WebPage Designer.
Waijung WebPage Designer (W2D) is a set of Web tools dedicated to applications requiring monitoring and control on the Web in a simpler and faster way using the Waijung Blockset and Aimagin hardware. In other words, W2D is a compilation of web tools, such as HTML5, CSS, Javascript, JSON, jQuery, jQuery Mobile, SQLite, AJAX, and stream. e system also presents the automatic and manual control methods to stop or start the induction machine to avoid system failures. e hardware requirement for this application is cited as follows:    e Micro SD card must be at least 4 GB so that it provides a data speed fast enough for communication with the MCU.
e Simulink/Matlab model used for web monitoring and control of the IM speed in closed-loop operation is shown in Figure 28. In addition to main previous programs (Encoder, SVPWM, PI controller and main Target Setup), it contains setup blocks for W2D. Inside the W2D Setup Subsystem (white color), it is grouped as five setup blocks.       e volatile data storage (orange color) is used to store data for another use of the model. Values stored in data storage are mapped for web access. Mapped variables are set to Read Only or Write/Read. e SQLite database query (yellow color) is configured for communication between Web Interface and Webserver System.
Using the Waijung WebPage Designer (W2D) tool, we created a web interface for monitoring values (rotor speed Wr, stator speed Ws, and voltage ratio RO) on the MCU webserver and displaying on web browser as text and digital values, Ws, Wr, and Ro. Figure 29 shows an illustrative example of the results on the web. e rotor speed value is in red color, and the voltage ratio and stator pulsation are presented in blue and yellow color, respectively. e purpose here is to reveal the scientific and technological feasibility of the web monitoring and control since the performance of the algorithm is verified in the previous part. We attached with this paper a sequence video summarizing these experimental results.

Conclusion
In this work, a technical approach for the monitoring and control of the IM speed driven under V/F control is introduced and carried out via simulation and experimental results using a Waijung Blockset and aMG hardware around an STM32F4 Discovery board. e proposed control structure is strengthened by a solid antiwindup PI regulator and supported by the association of the STM32F4-Waijung Blockset which constitutes a perfect and promising platform for many industrial applications due to the rapid and the simple prototyping and the low-cost design. Please confirm that this is your intended meaning. Indeed, not only it eliminates the use of the voltage and the current sensors but also it removes use of hard programming languages. e estimated cost of the entire installation (STM32F4 and Aimagin hardware components) does not exceed 400 USD, while the estimated cost of a similar prototype using dSPACE 1104, for example, exceeds 12,000 USD.
Simulation and experimental tests carried out for speed reference changes and load torque prove the robustness of the proposed solution, where the PI controller admits a superior response even in severe operating regimes.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.