Next Article in Journal
A Simulator for Investigation of Breakdown Characteristics of SiC MOSFETs
Previous Article in Journal
Optimization of Customized Industrial Pneumatic Nozzle to Reduce Noise Emissions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Stable Rules Definition for Fuzzy TS Speed Controller Implemented for BLDC Motor

by
Grzegorz Kaczmarczyk
1,
Mateusz Malarczyk
1,
Danton Diego Ferreira
2 and
Marcin Kaminski
1,*
1
Department of Electrical Machines, Drives and Measurements, Faculty of Electrical Engineering, Wroclaw University of Science and Technology, 50-372 Wroclaw, Poland
2
Department of Automatics, Federal University of Lavras (UFLA), Caixa Postal 3037, Lavras 37203-202, MG, Brazil
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(3), 982; https://doi.org/10.3390/app14030982
Submission received: 29 December 2023 / Revised: 13 January 2024 / Accepted: 16 January 2024 / Published: 23 January 2024

Abstract

:
This paper deals with the application of a fuzzy-logic-based controller for a drive with a BLDC motor. Two main aspects of the work are presented in this paper. The first of them is focused on the design process of the fuzzy model. For this purpose, the rules of the applied fuzzy system are defined according to the Lyapunov function. The gain coefficients of the controller are optimized using the Chameleon Swarm Algorithm. Various issues and aspects were analyzed in the simulation tests (robustness against parameter changes, the influence of the controller parameters on the precision of control, stages of optimization, etc.). The presented work confirms the assumptions regarding precision and stable operation (also in the presence of changes in the object parameters—the mechanical time constants of the engine) in connection with the applied fuzzy speed controller. Moreover, the second part of the manuscript presents the low-cost power electronic device developed for laboratory tests. It uses STM32 ARM-based microcontrollers (state variable measurement, control algorithm calculation, control signal generation) and a Raspberry Pi 4B microcomputer (control application—reference value and parameter definition). The experiment performed for the control structure—an electric drive with a BLDC motor—verified the theoretical considerations.

1. Introduction

The application of artificial intelligence (AI) elements has become the most common trend in modern electric drives. This is mainly due to the requirements of Industry 5.0, which often promotes the autonomous, robust, and adaptive operation of machines and robots. This machinery should be able to reproduce the desired dynamics without the intervention of a dedicated operator. The machinery’s operation in various conditions is the most important and inextricable requirement. Different ideas have provided solutions to this issue, each having advantages and disadvantages. Neural network controllers [1,2,3] are commonly described in the literature; however, the most notable disadvantage is the necessity for the parallel computing of the neurons in a single layer. This leads to more powerful hardware and, therefore, cost increases. On the other hand, there are standard PI controllers or state controllers enhanced by tunable parameters. This adaptation can be achieved with different algorithms, leading to varied complexity and efficiency. A common problem of such controllers is the stability issue [4,5,6].
Modern industry is a meaningful concept whose main role is to ensure the sustainable development of the economy and the dynamic growth of the quality of people’s lives. In almost every single factory there are plenty of essential devices that use electric drives. Coal mines, heavy elevators, HVAC control systems, small tools, printers, and CNC machines all use electric drives. A strong desire to generate high-quality products has forced factories to become more productive. The key to ensuring a reasonable production rate is to minimize the risk of breakdowns or outages caused by electric drive systems. One of the biggest weaknesses of conventional brushed DC motors is their maintenance. Because of the friction caused by brushes, classic DC motors require the periodic exchange of certain components [7,8]. Comparing both constructions, it is unquestionable that the brushless DC (BLDC) motor has a simplified internal structure. Furthermore, the lower number of internal elements in the BLDC motor allows manufacturers to design a motor with a smaller chassis than its conventional equivalent with the same power. This has a huge influence on decreasing the electromagnetic noise generated by the motor. From another point of view, the construction of the BLDC motor is a critical feature that ensures much better dynamics and a higher efficiency compared to brushed motors, with improvements of up to 95%. Because of this, it is obvious that BLDC motors provide the user with an opportunity to control their speed and position at a precise level. This makes these machines a perfect choice as the main drive in popular applications (e.g., CNC machines or robots) [9,10]. The biggest and most noticeable disadvantage of brushless motors is the necessity of using a dedicated controller to ensure correct operation.
Nowadays, brushless electric motors can be distinguished as one of the most important parts of electric drives and can be divided into permanent-magnet synchronous motors (PMSMs) and BLDC motors. In spite of their similar mechanical constructions (stator windings and permanent magnets placed on the rotor), a huge difference between them can be noticed while developing a proper control system. Due to the fact that the BLDC motor works with a direct current, the shape of the back electromotive force is trapezoidal. Because of this, a different technique of control is required. The most essential element of a typical drive with a three-phase BLDC motor is a power electronic controller—a three-branch inverter module, with two switches in each branch [11,12]. The internal structure of a typical drive with a BLDC motor is shown in Figure 1.
The goal is to make the BLDC motor rotate properly in both directions. For this purpose, a particular inverter is used. It is a substitute for the mechanical commutator used in brushed DC motors. The electronic commutator works with no physical connection between the stator and rotor (a lack of brushes). In order to make the motor rotate properly, information about the current rotor position needs to be given to the microcontroller unit. In modern BLDC motor controllers, this is usually realized by receiving information from Hall sensors located inside the motor. More advanced devices are based on the fact that in a specific time period the current flows only through two of three phases. Therefore, it is possible to deduce a current rotor position based on calculating the back electromotive force induced on the unused phase [13,14]. Having received the rotor position, it is compared by a microcontroller with the implemented switching tables. These are used to define which of the six transistor switches need to be open or closed (based on the current rotor position) in a specific time window to make the motor rotate in the desired direction. There are many types of BLDC motor controllers available on the market. This allows the user to choose an appropriate controller for the project to be performed. No matter what kind of project is being realized, one can find a proper controller for its requirements, e.g., a Radio-Controlled (RC) model, electric scooter, automotive industry application, or large control cabinet for a high-power BLDC motor [15,16,17,18,19]. Moreover, the constant improvement of microcontrollers ensures that a variety of hardware solutions are available on the market. Depending on the designed application and initial requirements of the project, it is possible to choose between both amateur and professional microprocessors. Even a simple programable device, due to its computational capabilities, can provide enough power to handle the BLDC commutation process [20,21]. Furthermore, modern Advanced RISC Machine (ARM) processors ensure a perfect combination of computational capabilities while fulfilling the assumption of a low-cost solution. These devices are capable of running even complicated algorithms while handling the BLDC commutation process simultaneously [22,23]. Due to the constantly increasing interest in ARM processors, manufacturers offer BLDC motor controllers in the form of dedicated shields [24]. Additionally, demanding applications are often handled by modern digital signal processors, which are a convenient way to run a variety of advanced algorithms [25,26,27]. The most sophisticated implementations (e.g., BLDC neural speed controllers) are often executed with the use of parallel computing ensured by field-programable gate array (FPGA) modules [28,29,30]. However, in terms of testing and developing rapid-prototyping systems, FPGAs are widely used as well [31].
Despite the fact that classic control structures (e.g., PID) are incredibly popular methods in modern industry, it is well known that they are not convenient in the context of nonlinear systems. Moreover, the values of the object parameters can fluctuate over time. Using conventional techniques, the precision of control is difficult to ensure. This is the point at which fuzzy logic becomes a reasonable solution. It is by definition a branch of mathematics that was designed for describing uncertain objects. The main goal while creating fuzzy logic principles is to obtain a tool capable of modeling nonlinear phenomena, which are usually hard to describe with mathematical equations. One of the most important parts of data processing in a fuzzy model is the rule base—defined using the designer’s experience and knowledge. Considering the fact that, nowadays, fuzzy logic may be used in many fields, it is also widely implemented in control systems, in the form of a fuzzy logic controller [32,33,34,35]. The main idea of these controllers is to create a dependency between the input signals and the output of the controller using predefined rules. Thus, it is possible to describe the current state of a plant with linguistic variables (instead of specific state equations). This can be performed after the fuzzification stage in the first layer of the controller. The second layer (inference) calculates conclusions and their significance in the final control signal through several iterations of the algorithm. Then, the received values are taken to the defuzzification layer and changed from the fuzzy variable to a specific value, which allows the fuzzy model to cooperate with the rest of the control system (e.g., the torque control loop of the electric drive) [34,35,36,37,38]. Additionally, the dynamic development of cheap and powerful microprocessor units makes it easier and more reasonable to use fuzzy logic controllers in everyday applications. One of the most representative implementations, based on a fuzzy logic model, may be seen in a typical modern car, i.e., an active cruise control system [39]. Considering the fact that there are a variety of reference speed values that can be achieved by a car, the characteristics of the plant are strongly dependent on the current gear, actual motor speed value, and weight of the vehicle. There are also plenty of factors and circumstances that directly influence the above-mentioned characteristics (e.g., the number of people inside the car). Therefore, it is clear that a conventional controller (PID/PI) may be insufficient. Moreover, a fuzzy logic controller does not require specific plant parameters (during the design stage) to make the system work properly.
Any control structure requires the tuning of its parameters to perform well with different objects. The efficiency and performance of the controlled drive rely on correctly selected coefficients. A variety of optimization approaches can be found in control theory, among which standard (based on a mathematical model of the structure) and numerical methods can be distinguished. One of the most interesting methods, which seems to have become very popular in recent years, is based on metaheuristic algorithms. These describe different calculations that provide general instructions to minimize the value of a given cost function. In comparison to standard optimization algorithms, metaheuristic optimizers work without difficult mathematical calculations (e.g., the gradient can be neglected) [40]. Thus, they can be applied easily to complex problems (including nonlinear objects and parameter modifications). The implementation of the tool is universal for different issues (without additional recalculations). Due to these advantages, a wide range of applications in different areas of science [41], engineering [42,43], economics [44], and medicine [45] can be found. Their high popularity is a result of not only the ease of application but also the high efficiency of metaheuristic algorithms. Because of the iterative process, the initial results may be quickly modified, and then, in the following iterations, their precision may be improved. Metaheuristic algorithms are often based on observations of nature, especially swarm processes [46]. These methods often include elements of artificial intelligence (AI) [47].
This article describes the complete design process and implementation of a fuzzy logic speed controller for a BLDC motor. The theoretical background and mathematical model of the control system are analyzed. Then, the stability issue is considered, and a practical application of the Lyapunov theorem for rule base definition is provided. The next part presents an application of a nature-inspired metaheuristic optimizer for controller efficiency improvement (Chameleon Swarm Algorithm). The subsequent section introduces the results of simulation tests of the established fuzzy logic control structure. Considerations of different operation scenarios are discussed, and the chosen speed transients are presented. A significant part of the paper is related to the design process and construction of the microcontroller system and power electronics for a low-cost test bench. The hardware section deals with the electronics of the device and ancillary mechanical equipment (cabinets, coupling). The developed control software (graphical user interface) is also briefly analyzed. The paper ends with experimental results and concluding remarks.

2. Description of the Speed Control Algorithm

2.1. Fuzzy Controller Applied in the Control Structure

In the presented research, a BLDC drive was used. BLDC motors are very popular in various industrial and electromobility applications. They are characterized by a noticeably higher power and relatively small size in comparison to standard brushed DC motors. In most industrial implementations, the high speed of BLDC motors is reduced through gearboxes. However, in a large number of applications, a high rotational speed is demanded. In devices such as drones, RC models, and electric scooters, the active load is applied directly to the rotor. For instance, the propellers of a drone are mounted on motor shafts, and their speed and the produced thrust are proportional to the motor speed [48,49]. There are also applications in which the rotor is the external part of the motor—such a design is very popular in electric scooters—and the rotor cooperates directly with a wheel [48,50]. For the abovementioned applications and many others, the mechanical part of the drive can be modeled with a simple transfer function defined as follows (1):
G m ( s ) = 1 T m · s
where T m is the mechanical time constant of the motor.
In fact, the speed control structure can be considered as a cascade-connected system. It consists of the mechanical part (described above), the loop related to the electromagnetic torque, and the external speed control path (Figure 2). The main purpose of this work was the hardware construction of the drive, algorithm implementation, and tests of the fuzzy controller. However, for initial feature analysis, numerical tests are also presented. Thus, for the definition of the simplified mathematical model of the speed control structure, some conditions (simplifications) must be predefined:
  • The mechanical part does not include nonlinearities (e.g., friction torque and backlash).
  • The elasticity of the shaft is omitted.
  • The optimal tuning of the internal part is ensured (the dynamic response of the electromagnetic torque after the reference signal from the speed controller).
  • The fast processing and measurement of the state variables.
  • The relation between the total time constant of the torque control loop T e and T m , due to the modern switches used in specialized power electronic devices and modern control techniques [51], can be defined as follows:
    T e < < T m
  • The omission of the influence of disturbances in the power electronic devices.
Considering the assumptions/relations mentioned above, the representation of the torque shaping loop can be described with transmittance:
G e ( s ) = 1 T e · s + 1
where T e is the electrical time constant of power electronics (fulfilling Relation (2)).

2.2. Fuzzy Speed Controller

The most essential element of the structure presented in Figure 2 is the fuzzy speed controller. It provides the possibility of computing the control signal using fuzzy-logic-based data processing and expert knowledge according to the dataflow presented in Figure 3.
The inference stage is computed using the fuzzy values obtained in the fuzzification part. The “crisp” input signal suffers interference from the membership function representing linguistic description, called the rationale. As a result of this process, the input signals are characterized by attributed significance levels. This can be modeled by Equation (4):
x i = f i · a i
where a i is the crisp value input; f i is the membership function; and x i is the fuzzified input. The following step is responsible for the exact inference based on both the fuzzified input signals and the knowledge base. The knowledge base is the container of membership functions and the relationships between particular variables. The calculations are based on expert knowledge, providing the conclusions according to the input rationale. The shape of the expert base may vary depending on the fuzzy model used. For the Mamdami reasoning approach, the base rule is given by a fully linguistic description, such as:
If input1  is … and  input2  is …, then the  output  is…,
  • where the considered variables are not given as crisp values, but rather as fuzzy labels. The next step of the fuzzy controller data processing is defuzzification, the process of translating a fuzzy conclusion into a crisp output value. Different defuzzification methods can be found in the literature [52]. The commonly used singleton method utilizes weights placed at the peak coordinates of the membership functions. In comparison to Mamdami reasoning, the Takagi–Sugeno (T-S) model applies a different structure for the inference block. The fuzzified inputs are compiled with functions, resulting in a crisp output. The T-S fuzzy system is very efficient, and hardware implementation in programable devices seems to be easier. It was applied in tests described later on in this paper. A schematic representing the fuzzy logic controller is presented in Figure 4.
The output value of the Takagi–Sugeno type 1 fuzzy system can be described as in Equation (5):
y = i = 1 I x i · w i i = 1 I x i = i = 1 I ( e · f 1 · e ˙ · f 2 ) · w i i = 1 I x i
where y is the crisp output of the fuzzy system; x i is the fuzzified input; f i is the vector of membership functions; I is the number of input signals; and w i is the defuzzification singleton value.

2.3. Fuzzy Rules Definition

The requirement of good dynamics is the main assumption for designing a speed controller. Nevertheless, it is crucial, at the same time, to ensure the stability of operation. This can be achieved by adapting the transfer function of the controller to the plant when all the elements are properly identified and the parameters are correctly selected. If more complex nonlinear controllers are taken into account, the mathematical model also becomes more problematic. Because of this, such a procedure is unfeasible in real applications and is susceptible to changes in the drive parameters. A common concept in the design process is based on the fact that the stability of the control structure may be verified for the system. Different methods can be used to prove the stability of the control structure, among which the Routh–Hurwitz [53] or Nyquist [54] stability criteria are the most popular in control theory. However, for nonlinear systems, verification according to the Lyapunov stability theorem is the most common approach [55,56,57]. In this application of the fuzzy model, as the speed controller of a drive, it was assumed that the key element for the correct operation of the system was the definition of the rule base.
The stable rules selection began with the definition of the speed error as
e = ω m ω r e f
where ω m is the measured speed, and ω r e f is the reference speed.
  • For the stability considerations, the two-element positive-definite Lyapunov candidate function was chosen (7):
V ( q 1 , q 2 ) = q 1 2 + q 2 2 2
where q 1 and q 2 are the controlled process state variables. For the analyzed controller, the following mathematical expressions were assumed:
q 1 = e
q 2 = d e d t = e ˙
According to the Lyapunov criterion, in order to confirm the system stability, the condition given by Equation (10) has to be fulfilled [58].
V ˙ 0
where V ˙ is the derivative of the Lyapunov candidate function:
V ˙ = q 1 · q ˙ 1 + q 2 · q ˙ 2
Hence, replacing the universal variables with the process-specific ones ((8) and (9)) and combining them with the Formula (10), the stability condition is defined as follows:
e · e ˙ + e ˙ · e ¨ 0
Because the error value depends on the object state variable (6), it can be assumed that the second derivative of the error value is proportional to the control signal:
e ¨ u
where u is the control signal. Thus, the following considerations were included in the expression presented below:
e · e ˙ + e ˙ · u 0
e ˙ · ( e + u ) 0
It can be noted that if e ˙ = 0 , the condition is fulfilled arbitrarily for any value of the speed error e and control signal u. In order to define a full knowledge base, where all state variables are determined, the scenario presented below was applied:
e ˙ 0 = 0 δ
e ˙ 0 + = 0 + δ
where δ is a very small value. In such a case, the sign of the equation in brackets (15) can always be determined.
Using the above-described assumptions, a definition of the stable control rules can be provided. The considerations of the first rule are presented below.
Let e ˙ < 0 ; then, the condition in (15) is true if e + u 0 . This is always true for e 0 and u 0 .
  • This is a trivial relation but not the only possible combination. Depending on the size of the knowledge base and the resolution of the membership function, more detailed rules could be defined. The following statement can also be considered:
Let e ˙ < 0 ; then, the requirement in (15) is fulfilled if e u , which is true for e > 0 , u 0 , and | u | e .
  • Based on a similar analysis, more rules can be defined, and the control surface can be achieved (Figure 5). It can be noted that an offset of at least a single linguistic label should be present between the values of | e | and | u | . For the membership functions presented in Figure 6, the stable control rules are gathered in Table 1.

2.4. Bio-Inspired Optimization of the Fuzzy Speed Controller Using the Chameleon Swarm Algorithm

The control structure contains three tunable parameters—these are the two input signal gains K e and K d e and the controller output coefficient K u . In order to keep the above stability considerations valid, it is required that the parameters do not equal 0 and are positive. Considering the rules (Table 1), the relationship between the external parameters of the model could be determined. The output coefficient should have a higher value than the error and error derivative gains. Taking into consideration the above observations, the boundaries of the parameter values were defined for the optimization process according to Table 2.
In control theory, different approaches to controller coefficient calculations have been proposed, including popular ones such as magnitude and symmetric optimum criteria [59,60], or the pole placement method [61,62,63]. The application of these methods requires the precise identification of the object and the transmittance of the elements. This makes them very difficult to implement with neural or fuzzy controllers, where the controller dynamics cannot be easily described with a transfer function. However, the present trend in tuning controllers is the application of intelligent algorithms [55,64,65,66]. These can solve the problem by an adaptation of the controller coefficients based on object response. This is especially convenient for insufficiently identified machines or compound structures whose mathematical description is very complex.
Different groups of optimization algorithms may be considered, depending on the operation principles and inspiration. Bio-inspired metaheuristic optimization algorithms are the most popular [67]. A variety of successful applications have already been presented in papers from different scientific disciplines. The most common problems deal with economic sciences [68,69], power distribution [70,71], and mechanics [72]. The tuning process can also be automatized with the application of these algorithms.
In this study, the Chameleon Swarm Algorithm (CSA), developed by Braik in 2021 [73], was applied to tune the controller coefficients. The tool is a nature-inspired metaheuristic optimization algorithm that mimics chameleon hunting behavior. The algorithm was initially evaluated successfully with 67 benchmark functions, and since then a variety of implementations have been proposed. The CSA has been implemented for telecommunication and electronic device design [74,75] and developed as a computer system supervisor [76] and dataset manager [77]. It was successfully proven that the CSA can also be used as an intelligent tool for robot suspension synthesis [78]. The premise of the CSA is that the best solution is synonymous with prey, while the optimization agent is a hunting chameleon. Similarly to other nature-inspired algorithms, the optimization is calculated iteratively for an evolving group of specimens called the population. Every iteration of the algorithm consists of three steps that are inspired by consecutive chameleon hunting behaviors (reflected in the flowchart of the CSA presented in Figure 7):
  • Search for prey;
  • Eye rotation to locate prey;
  • Prey capture.
The two first steps are based on the unique sight of chameleons, which enables a viewing area of 360 and helps to reveal prey position. This provides the possibility to explore the search space and define the direction towards the best solution. The last step determines the new position of the chameleon as it approaches its victim with its tongue.
The algorithm considers multiple chameleons that explore the optimization space. Every specimen represents a single solution. The size of the population (N) can be adjusted by the user:
x i n = [ x i n , 1 , x i n , 2 , x i n , 3 , , x i n , d ]
where n = 1 , 2 , 3 , , N is the number of specimens in the population; i is the number of iterations; and d is the number of searched values. The initial population x 0 n is compiled in accordance with the following equation:
x 0 n , d = l b d + v × ( u b d l b d )
where n is the number of specimens; d is the number of dimensions; v is a randomly drawn value from the range [ 0 , 1 ] ; l b d is the lower bound of the search range; and u b d is the upper bound of the search range. In subsequent iterations, the value of every specimen is updated by adding the correction factor. The improved solution is given by the following equation:
x i + 1 n , d = Δ x i n , d + x i n , d
where x i + 1 n , d is the new solution; Δ x i n , d is the improvement factor; and x i n , d is the current solution.
The improvement factor is calculated in the first step of the algorithm—corresponding to prospection for prey. The formula for this parameter is given by Equation (21). The selection is carried out during every iteration and is performed by randomly drawing a switch value (s).
Δ x i n , d = { μ ( ( u b d l b d ) v 3 + u b d ) s g n ( v 4 0.5 ) s < P p σ ( g i n , d G i d ) v 1 + τ ( G i d x i n , d ) v 2 s P p
where s is the randomly generated switch value; u b d and l b d are the upper and lower boundaries of the search range, respectively; τ and σ are the customizable CSA parameters; sgn() is the sign function; v 1 , v 2 , v 3 , v 4 are the random numbers drawn in every iteration from the range [0, 1]; g i n , d is the best solution obtained so far by the exact n t h specimen; G i d is the global best solution so far; and μ is the consistently decreasing step factor.
Then, the eye rotation stage is computed, and thus the transformation of the improvement vector is obtained in the form of rotation matrices—for the given problem, along the axes of the 2D coordinate system, as in (22) and (23).
r o t x = 1 0 0 0 cos ϕ sin ϕ 0 sin ϕ cos ϕ
r o t y = cos Φ 0 sin Φ 0 1 0 sin Φ 0 cos ϕ
In the final step, the hunting process is reproduced—the new solution is approached along the previously calculated vector with the rate corresponding to the chameleon tongue acceleration model given by the equation
a = 2590 × ( 1 e l o g ( i ) )
where i is the number of iterations. The final solution for every specimen is given by (25):
x i + 1 n , d = x i n , d + ( p i n , d ) 2 ( p i 1 n , d ) 2 2 a
where p i n , d and p i 1 n , d are the speeds of the tongue in the two proceeding iterations. The new solutions are evaluated by the cost function. If an improvement is obtained, the global best solution is updated. The optimization process is finished if the maximum number of iterations ( I m a x ) is reached or no improvement in five subsequent iterations is obtained.

3. Simulation Results

The main point of this research was the hardware implementation of a controller in a low-cost microcontroller board. In order to reduce the risk of faults in the control algorithm and (potential) hardware damage, the implementation was preceded by simulation tests. The model was established in Matlab/Simulink 2022b on the basis of the mathematical description given in the introductory part of the paper (Section 2). Because further hardware development was the main objective, the reference and measured speeds were subjected to interference from the noise signal in order to align the test conditions with a real microcontroller system environment. The time constants for the transfer functions representing the power electronics T e and mechanical inertia T m of the laboratory drive and the simulation sample time T s are presented in Table 3.
The first test was conducted with controller gains equal to 1 to appraise the accuracy of the defined rules. Despite the fact that the speed transient dynamics were not at a satisfactory level, the test was passed correctly. The Lyapunov function V ˙ was within the desired range throughout the whole test, as we can see in Figure 8. For the test purposes, a square reference signal was used, representing the most difficult operation conditions—immediate response to reference speed change.
The controller gains were then optimized using the CSA with all the above considerations taken into account. For the purpose of the research, a simple cost function was defined (26):
F c = s = 1 S | w m s w r e f s | S
where S is the number of considered samples; w m s is the measured speed; and w r e f s is the reference speed.
In Figure 9, the chosen speed transients obtained in the selected iterations (i) of the CSA optimization are depicted. For comparison purposes, the speed of the motor drive measured for the case of the controller with gains equal to 1 is also attached.
An unquestionable improvement in the dynamics can be noticed in Figure 9. The overshoots and oscillations in both the dynamic and static operation of the motor were reduced drastically. This figure also confirms the fact that the correct tuning of the controller gains is essential for correct operation. It should be emphasized that the fuzzy logic controller, even in a very basic configuration, provides the possibility to track the reference signal. However, the dynamics can be improved by correct gains calculations. The presented transients also confirm that the CSA is an efficient tool for tuning fuzzy controllers. After five iterations of the algorithm processing, the offset in the steady state was eliminated. The further iterations eliminated the overshoot level and damped high-frequency oscillations. Thus, the error between the reference signal and the measured speed was minimized—this can be noticed in Figure 10.
The parameters of motors in an industrial environment change during operation because of the variable temperature, different load torques, etc. [79]. The second part of the simulation tests was focused on the verification of the drive operation with an increased mechanical time constant T m . Figure 11 presents the speed transients of the motor with different (disturbed) time constants and an initially tuned controller. The results were obtained for the following optimized controller coefficients: K e = 0.59 , K d e = 3.32 , and K u = 870.20 .
It can be seen that all the transients tracked the reference signals with high precision. However, the increase in the time constant, as was expected, led to an increased rise time for the speed.

4. Hardware Construction and Tests of the Stable Fuzzy Speed Controller

The main goal of the hardware implementation was to develop (from scratch) a low-cost power electronic device capable of cooperation with the BLDC motor. In addition, popular development boards were chosen (Nucleo and Raspberry Pi boards) for the project. It is known that combining a powerful microcontroller system with a single-board microcomputer ensures substantial computational power; easy access to peripheral properties (e.g., the timer’s duty cycle); and the possibility of integrating the whole system using a self-made human–machine interface. Moreover, despite using popular microprocessing units, the device should be capable of running the advanced speed control loop, based on a fuzzy logic controller.

4.1. The Design of the Control and Power System

From the viewpoint of a microprocessor, controlling a BLDC motor is much more complicated and power-demanding than running a brushed direct-current machine. The lack of a mechanical commutator in a brushless DC motor requires the use of an electronic one. Its role is to read the current rotor position using the input signals from Hall sensors and switch on the proper transistors in a specific time window. The whole process requires the use of many external interrupts from the Hall sensors in the microcontroller unit. What is more, developing an advanced control system requires many operations to be conducted in a defined time period. Because of this, realizing a speed measuring loop in the same unit as the commutation process is uncertain. In order to obtain a correct value for the measured speed, it is strongly recommended to ensure a constant period of time in which the difference between the counted encoder pulses can be calculated correctly. To achieve this, the decision to use two independent Nucleo boards was made. The main control system was developed using one STM32 Nucleo 64 (F446RE) board, one STM32 Nucleo 32 (L432KC) board, and a Raspberry Pi 4B microcomputer. The chosen parameters of these microcontrollers are compared in Table 4. The integration of the whole control system was based on a Master–Slave data transfer. The concept of the control system is shown in Figure 12. The Raspberry Pi board handles the control application written in Python (v3.6.9). It gives the user the ability to set a reference speed and change it during the operation of the drive. It also captures information about the actual speed. It is a highly effective device for the whole system. A Nucleo 64 deals with the main control algorithm. It works as a Slave device relative to the Raspberry Pi and as a Master device relative to the second Nucleo board. It is also responsible for ensuring a correct commutation process. It captures the input signals from the Hall sensors module, calculates the output signal from the control algorithm, and generates PWM signals for the power module board. These PWM signals are provided to a proper insulated-gate bipolar transistor (IGBT) switch (based on an implemented switching table). This receives information about the actual speed from the Nucleo 32. Communication between the boards is realized with the UART protocol.
An essential part of a power electronic device is the power system. Its role is to ensure power delivery to all components used in a project. A Raspberry Pi computer requires a 230 V AC power supply, while the other devices work on a direct current. The whole power system was based on a 24 V DC main power supply, which distributed energy to three small-voltage controllers. Each of them was responsible for supplying a voltage to different on-board systems: a module of IGBT drivers, a fan cooling setup dedicated to the power module, and an IGBT board. The two Nucleo microcontrollers were powered by USB cables plugged into the Raspberry Pi microcomputer ports. The structure of the power system is shown in Figure 13.

4.2. Power Module

Except for the control system, the second most essential part of a BLDC motor controller is the power module. In order to minimize the risk of damaging switches during the first tests, the decision to use IGBT transistors with high current persistence was made. To power the three-phase BLDC motor, the main inverter module consisted of three branches with two IGBT switches each (six IGBT transistors in total). A specific gate current and voltage with a specified edge were required to control the switches properly and avoid an undefined state for an IGBT’s gate. To achieve this, an additional board with IR2301 IGBT drivers was created (Figure 14). The IGBT drivers transformed the PWM signal generated by the STM32 microcontroller into a corresponding signal with strictly specified values, which could be correctly interpreted by the gates of the transistors. Moreover, the drivers mentioned above ensured optoisolation between the power module and the control system. The cooling setup consisted of three small Raspberry Pi fans. Its role was to provide air flow between transistors. All of them were powered by 5 V DC.

4.3. Cabinet

A BLDC motor controller is an inherently complicated device. It needs to handle many input–output signals and run a variety of on-board systems (e.g., cooling fans). Additionally, according to the global structure of the device (many voltage sources, 230 V socket for powering a microcomputer), it might have been dangerous to work with. In order to avoid risky situations, the next step in the project was to construct a proper cabinet for all electrical and electronic devices. Its structure was based on a two-level interior covered by an exterior case. The lower level of the interior construction was intended to store the main power supply, a 230 V socket for powering the Raspberry Pi, and the additional board with encoder pull-up resistors (Figure 15). On the upper level, the rest of the devices were placed. The two parts of the cabinet are shown in Figure 16. The completely assembled device is presented in Figure 17.

4.4. Control Panel—The Python Application

To control the state of the constructed BLDC motor controller, it was decided to develop a proper Python application. This was handled by the Raspberry Pi microcomputer. As the number of such devices constantly expands, the variety of potential applications is increasing. That being said, a Raspberry Pi is a great tool for not only object detection algorithms [80], but also other deep learning applications [81]. Thus, it was assumed that Raspberry Pi would be a sufficient tool for handling the designed user interface. This simple application gave the user the ability to start and stop the motor, change the reference speed value while running, and return the value of a measured speed. The front panel of the application is shown in Figure 18.

4.5. Encoder

A speed control loop requires the provision of continuous feedback about the actual speed value. In the constructed BLDC motor controller, this was realized by a simple, low-cost incremental encoder. Its resolution seemed to be high enough to provide proper speed information. It produced 400 pulses per revolution for one phase. Considering the fact that the STM32 was equipped with a dedicated timer with an encoder mode, it was possible to increase the above-mentioned value to 1600 pulses per revolution by using signals from two phases at once and setting the trigger detection at both the rising and falling edge.

4.6. BLDC Motor

The motor used in the project was a three-phase BLDC machine with an integrated Hall sensor module plugged in directly to the shaft at the back. It produced 26 W of power, which made it safe to use in the tests, especially considering the fact that it was powered by 24 V DC, making it suitable for the developed device. Its rated current was much lower than the maximum one allowed in the power module. All parameters can be seen in Table 5.

4.7. Experimental Results

First, after assembling the BLDC controller, the overall work itself was investigated. The main goal of this part of the tests was to check for proper operation, ensuring that the motor rotated in two directions. This part of the tests was focused on verifying the switching table’s correctness and the data flow between individual controllers throughout the whole control system (including the Hall sensor interrupt setup for rotor position feedback). In the next step, the analyzed control structure with the fuzzy model was implemented in the main controller board. The final tests were divided into two parts. The first stage of the tests was conducted with a square signal applied as a reference trajectory. The time of reversal for each electric drive was controlled by the user with the Graphical User Interface. Its amplitude was modified for several attempts (in order to examine whether the quality of the implemented control algorithm and the hardware operation was adequate). The second part covered the issue related to changes in the reference speed values. Furthermore, the behavior of the control system after applying additional load torque ( t 3.1 s) was analyzed. The simulation tests allowed us to predict the actual speed value and follow its reference trajectory. Due to the applied parameter optimization algorithm, a highly dynamic drive and no overshoots were expected to be observed. Precise reference value tracking was achieved. The tests verified whether the experimental results were similar to those obtained in the simulation. The achieved results are shown in Figure 19.
The dynamics obtained during the experimental tests were very similar to the simulation results presented in Figure 11. Thus, it was proved that the implementation of the control algorithm was successful, and the optimized controller coefficients were calculated with very high precision. It could also be noticed that the developed microcontroller system was able to acquire the state variables accurately. The obtained noise level was negligible and significantly smaller than that assumed during the simulation tests.
After conducting the tests with the optimized controller parameters, the additional behavior of the system was examined. In order to emphasize the importance of metaheuristic algorithms in the tuning process, the initial parameters of the controller were modified. Each attempt investigated slightly different parameters of the controller. Changes in several gains (proportional, derivative, and integrator path) were considered. The achieved results are shown in Figure 20. The presented speed transients show that the measured speed tried to follow its reference value, but the quality of the control process was not optimal. Many overshoots and disturbances were visible in both the static and dynamic states of the object.

5. Conclusions

This paper focused on two main points: the design process of a fuzzy speed controller applied to an electric drive with a BLDC motor, and the hardware construction proposed and used for the experimental tests.
The designed fuzzy rules base was defined according to the Lyapunov stability criterion. The candidate function was fitted to the presented problem and derived in order to generate the stability condition. A successful approach to controller tuning with a metaheuristic optimization algorithm was also presented. For this purpose, the Chameleon Swarm Algorithm was used. The combination of the above-mentioned methods was a novel solution for problematic issues related to the fuzzy controller design process. It led to the efficient application of this algorithm, known from artificial intelligence, to an electric drive.
The whole hardware controller deployment process turned out to be complex in some areas. One of the greatest difficulties faced during hardware controller development was related to software integration issues. The deployment process showed that having all devices send and receive the necessary commands in a particular time window is crucial for making the whole system work properly and may be a huge concern.
The main feature observed in the tests was the robustness of the fuzzy controller against parametric disturbance. A modified mechanical time constant did not significantly affect the speed transients. The achieved results confirmed the precise operation of the drive according to the reference waveform.
The successful accomplishment of the described project constitutes a promising base for future work. One of the possible avenues of future work is rebuilding the whole device using SMD components and independent microcontroller units placed on a single PCB board. In this way, it would be possible to reduce the size of the assembled device. The developed hardware may also be used as an alternative device for testing different control algorithms, as it may be a competitive solution compared to, e.g., the popular dSPACE system, commonly used in the field of electric drives.

Author Contributions

Conceptualization, M.K.; methodology, M.K. and D.D.F.; software, G.K. and M.M.; validation, M.K., D.D.F., G.K. and M.M.; formal analysis, M.K. and D.D.F.; investigation, M.K., M.M. and G.K.; data curation, G.K. and M.M.; writing—original draft preparation, M.K., M.M., G.K. and D.D.F.; writing—review and editing, M.K., M.M., G.K. and D.D.F.; visualization, G.K. and M.M.; supervision, M.K. and D.D.F.; project administration, M.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data is contained within the article.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AIArtificial intelligence
BLDCBrushless DC motor
CSAChameleon Swarm Algorithm
HMIHuman–machine interface
HVACHeating, ventilation, and air conditioning
IGBTInsulated-gate bipolar transistor
PPRPulses per revolution
PWMPulse width modulation
RAMRandom-access memory

References

  1. Buettner, M.A.; Monzen, N.; Hackl, C.M. Artificial Neural Network Based Optimal Feedforward Torque Control of Interior Permanent Magnet Synchronous Machines: A Feasibility Study and Comparison with the State-of-the-Art. Energies 2022, 15, 1838. [Google Scholar] [CrossRef]
  2. Zychlewicz, M.; Stanislawski, R.; Kaminski, M. Grey Wolf Optimizer in Design Process of the Recurrent Wavelet Neural Controller Applied for Two-Mass System. Electronics 2022, 11, 177. [Google Scholar] [CrossRef]
  3. Hoai, H.K.; Chen, S.C.; Chang, C.F. Realization of the Neural Fuzzy Controller for the Sensorless PMSM Drive Control System. Electronics 2020, 9, 1371. [Google Scholar] [CrossRef]
  4. Stanislawski, R.; Tapamo, J.R.; Kaminski, M. A Hybrid Adaptive Controller Applied for Oscillating System. Energies 2022, 15, 6265. [Google Scholar] [CrossRef]
  5. Pajchrowski, T.; Siwek, P.; Wojcik, A. Application of the Reinforced Learning Method for adaptive electric drive control with variable parameters. In Proceedings of the IEEE 19th International Power Electronics and Motion Control Conference (PEMC), Gliwice, Poland, 25–29 April 2021; pp. 687–694. [Google Scholar] [CrossRef]
  6. Malarczyk, M.; Zychlewicz, M.; Stanislawski, R.; Kaminski, M. Electric Drive with an Adaptive Controller and Wireless Communication System. Future Internet 2023, 15, 49. [Google Scholar] [CrossRef]
  7. Glowacz, A. Thermographic Fault Diagnosis of Shaft of BLDC Motor. Sensors 2022, 22, 8537. [Google Scholar] [CrossRef]
  8. Yurchenko, V.; Pikalov, V.; Belokopytov, R.; Boykov, A.; Drapak, K. Electric Drive Modernization by Replacing Brushed DC Motor with Permanent Magnet Synchronous Motor in Rehabilitation Robotic System. In Proceedings of the 4th International Conference on Control Systems, Mathematical Modeling, Automation and Energy Efficiency (SUMMA), Lipetsk, Russia, 9–11 November 2022; pp. 509–513. [Google Scholar] [CrossRef]
  9. Yen, S.H.; Tang, P.C.; Lin, Y.C.; Lin, C.Y. A Sensorless and Low-Gain Brushless DC Motor Controller Using a Simplified Dynamic Force Compensator for Robot Arm Application. Sensors 2019, 19, 3171. [Google Scholar] [CrossRef] [PubMed]
  10. Gu, Q.; Tian, J.; Yang, B.; Liu, M.; Gu, B.; Yin, Z.; Yin, L.; Zheng, W. A Novel Architecture of a Six Degrees of Freedom Parallel Platform. Electronics 2023, 12, 1774. [Google Scholar] [CrossRef]
  11. Suganthi, P.; Nagapavithra, S.; Umamaheswari, S. Modeling and simulation of closed loop speed control for BLDC motor. In Proceedings of the Conference on Emerging Devices and Smart Systems (ICEDSS), Mallasamudram, India, 3–4 March 2017; pp. 229–233. [Google Scholar] [CrossRef]
  12. Sakunthala, S.; Kiranmayi, R.; Mandadi, P.N. A study on industrial motor drives: Comparison and applications of PMSM and BLDC motor drives. In Proceedings of the International Conference on Energy, Communication, Data Analytics and Soft Computing (ICECDS), Chennai, India, 1–2 August 2017; pp. 537–540. [Google Scholar] [CrossRef]
  13. Khambhadiya, H.; Dhaneria, A. Sensorless Control Method of 3-Phase BLDC Motor Through Back-EMF Observer. In Proceedings of the International Conference on Advances in Electrical, Computing, Communication and Sustainable Technologies (ICAECT), Bhilai, India, 19–20 February 2021; pp. 1–5. [Google Scholar] [CrossRef]
  14. Sreeram, K. Design of Fuzzy Logic Controller for Speed Control of Sensorless BLDC Motor Drive. In Proceedings of the International Conference on Control, Power, Communication and Computing Technologies (ICCPCCT), Kannur, India, 23–24 March 2018; pp. 18–24. [Google Scholar] [CrossRef]
  15. Ahsan, M.; Abbas, K.; Zahid, A.; Farooq, A.; Mashhood Murtaza, S. Modification of a toy helicopter into a highly cost effective, semi-autonomous, reconnaissance unmanned aerial vehicle. In Proceedings of the International Conference of Robotics and Artificial Intelligence, Rawalpindi, Pakistan, 22–23 October 2012; pp. 49–54. [Google Scholar] [CrossRef]
  16. Kudelina, K.; Asad, B.; Vaimann, T.; Belahcen, A.; Rassõlkin, A.; Kallaste, A.; Lukichev, D.V. Bearing Fault Analysis of BLDC Motor for Electric Scooter Application. Designs 2020, 4, 42. [Google Scholar] [CrossRef]
  17. Chen, C.-H.; Cheng, M.-Y. Implementation of a Highly Reliable Hybrid Electric Scooter Drive. IEEE Trans. Ind. Electron. 2007, 54, 2462–2473. [Google Scholar] [CrossRef]
  18. Rowe, A.; Sen Gupta, G.; Demidenko, S. Instrumentation and control of a high power BLDC motor for small vehicle applications. In Proceedings of the IEEE International Instrumentation and Measurement Technology Conference Proceedings, Graz, Austria, 13–16 May 2012; pp. 559–564. [Google Scholar] [CrossRef]
  19. Shao, J. An Improved Microcontroller-Based Sensorless Brushless DC (BLDC) Motor Drive for Automotive Applications. IEEE Trans. Ind. Appl. 2006, 42, 1216–1221. [Google Scholar] [CrossRef]
  20. Vishnu Sidharthan, P.; Kashyap, Y. Brushless DC Hub Motor Drive Control for Electric Vehicle Applications. In Proceedings of the 1st International Conference on Power, Control and Computing Technologies (ICPC2T), Raipur, India, 3–5 January 2020; pp. 448–453. [Google Scholar] [CrossRef]
  21. Arifiyan, D.; Riyadi, S. Hardware Implementation of Sensorless BLDC Motor Control To Expand Speed Range. In Proceedings of the International Seminar on Application for Technology of Information and Communication (iSemantic), Semarang, Indonesia, 21–22 September 2019; pp. 476–481. [Google Scholar] [CrossRef]
  22. Ctibor, J.; Vorel, P.; Knobloch, J.; Pazdera, I. BLDC Motor Control with Cascade Structure Utilizing ARM MCU. In Proceedings of the International Conference on Electrical Drives & Power Electronics (EDPE), The High Tatras, Slovakia, 24–26 September 2019; pp. 61–65. [Google Scholar] [CrossRef]
  23. Ning, Z.; Chen, L.; Luo, J.; Qi, L. Research on Hardware Controller of BLDC Motor Rehabilitation Robot Based on STM32. In Proceedings of the CIBDA 2022: 3rd International Conference on Computer Information and Big Data Applications, Wuhan, China, 25–27 March 2022; pp. 1–5. [Google Scholar]
  24. Primiceri, P.; Visconti, P.; Melpignano, A.; Colleoni, G.; Vilei, A. Hardware and software solution developed in ARM mbed environment for driving and controlling DC brushless motors based on ST X-NUCLEO development boards. Int. J. Smart Sens. Intell. Syst. 2016, 9, 1534–1562. [Google Scholar] [CrossRef]
  25. Joo, J.-H.; Kim, D.-H.; Sim, D.-S.; Choi, J.-K. Design of a DSP controller and driver for the power-by-wire driving system with BLDC servo motor pump. In Proceedings of the 8th Electrical Engineering/ Electronics, Computer, Telecommunications and Information Technology (ECTI) Association of Thailand—Conference 2011, Khon Kaen, Thailand, 17–19 May 2011; pp. 573–576. [Google Scholar] [CrossRef]
  26. Wu, H.-C.; Wen, M.-Y.; Wong, C.-C. Speed control of BLDC motors using hall effect sensors based on DSP. In Proceedings of the International Conference on System Science and Engineering (ICSSE), Puli, Taiwan, 7–9 July 2016; pp. 1–4. [Google Scholar] [CrossRef]
  27. Rajagopal, K.R.; Nair, A. Design and development of a TMS320F2812 DSP controller based PM BLDC motor drive. In Proceedings of the International Conference on Electrical Machines and Systems, Incheon, Republic of Korea, 10–13 October 2010; pp. 776–780. [Google Scholar]
  28. Mihalache, G.; Ioan, A.-D. FPGA Implementation of BLDC Motor Driver with Hall Sensor Feedback. In Proceedings of the International Conference and Exposition on Electrical And Power Engineering (EPE), Iasi, Romania, 18–19 October 2018; pp. 0624–0629. [Google Scholar] [CrossRef]
  29. Pindoriya, R.M.; Rajendran, S.; Chauhan, P.J. Field programmable gate array based speed control of BLDC motor. In Proceedings of the IEEE Innovative Smart Grid Technologies—Asia (ISGT ASIA), Bangkok, Thailand, 3–6 November 2015; pp. 1–6. [Google Scholar] [CrossRef]
  30. Schulte, T.; Bracker, J. Real-time simulation of BLDC motors for hardware-in-the-loop applications incorporating sensorless control. In Proceedings of the IEEE International Symposium on Industrial Electronics, Cambridge, UK, 30 June–2 July 2008; pp. 2195–2200. [Google Scholar] [CrossRef]
  31. Rubaai, A.; Young, P. Hardware/Software Implementation of Fuzzy-Neural-Network Self-Learning Control Methods for Brushless DC Motor Drives. IEEE Trans. Ind. Appl. 2016, 52, 414–424. [Google Scholar] [CrossRef]
  32. Kumar, K.; Yadav, A.S.; Yadav, A.; Mehdi, A.; Pal, A.; Fouad, L. Speed Analysis of BLDC Motor by Implementation of Fuzzy Logic Based PID Controller. In Proceedings of the 3rd International Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE), Greater Noida, India, 12–13 May 2023; pp. 1980–1985. [Google Scholar] [CrossRef]
  33. Arulmozhiyal, R. Design and Implementation of Fuzzy PID controller for BLDC motor using FPGA. In Proceedings of the IEEE International Conference on Power Electronics, Drives and Energy Systems (PEDES), Bengaluru, India, 16–19 December 2012; pp. 1–6. [Google Scholar] [CrossRef]
  34. Mathew, T.; Sam, C.A. Closed loop control of BLDC motor using a fuzzy logic controller and single current sensor. In Proceedings of the International Conference on Advanced Computing and Communication Systems, Coimbatore, India, 19–21 December 2013; pp. 1–6. [Google Scholar] [CrossRef]
  35. Rajan, A.A.; Raj, R.D.; Vasantharathna, S. Fuzzy based reconfigurable controller for BLDC motor. In Proceedings of the 2nd International conference on Computing, Communication and Networking Technologies, Karur, India, 29–31 July 2010; pp. 1–7. [Google Scholar] [CrossRef]
  36. Kumbasar, T.; Hagras, H. A Type-2 Fuzzy Cascade Control Architecture for Mobile Robots. In Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics, Manchester, UK, 13–16 October 2013; pp. 3226–3231. [Google Scholar] [CrossRef]
  37. Siong, T.C.; Ismail, B.; Siraj, S.F.; Mohammed, M.F.; Tajuddin, M.F.N. Implementation of Fuzzy Logic controller for permanent magnet brushless DC motor drives. In Proceedings of the IEEE International Conference on Power and Energy, Kuala Lumpur, Malaysia, 29 November–1 December 2010; pp. 462–467. [Google Scholar] [CrossRef]
  38. Derugo, P.; Szabat, K.; Pajchrowski, T.; Zawirski, K. Fuzzy Adaptive Type II Controller for Two-Mass System. Energies 2022, 15, 419. [Google Scholar] [CrossRef]
  39. Asere, H.; Lei, C.; Jia, R. Cruise Control Design Using Fuzzy Logic Controller. In Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics, Hong Kong, China, 9–12 October 2015; pp. 2210–2215. [Google Scholar] [CrossRef]
  40. Nagadurga, T.; Devarapalli, R.; Knypiński, Ł. Comparison of Meta-Heuristic Optimization Algorithms for Global Maximum Power Point Tracking of Partially Shaded Solar Photovoltaic Systems. Algorithms 2023, 16, 376. [Google Scholar] [CrossRef]
  41. Priyadarshini, J.; Premalatha, M.; Cep, R.; Jayasudha, M.; Kalita, K. Analyzing Physics-Inspired Metaheuristic Algorithms in Feature Selection with K-Nearest-Neighbor. Appl. Sci. 2023, 13, 906. [Google Scholar] [CrossRef]
  42. Alehin, R.A.; Kubarkov, Y.P.; Zakamov, D.V.; Umyarov, D.V. Overview of metaheuristic optimization techniques applied to solving power engineering problems. Tech. Sci. Ser. 2019, 27, 6–19. [Google Scholar] [CrossRef]
  43. Vais, R.; Sahay, K.; Chiranjeevi, T.; Devarapalli, R.; Knypiński, Ł. Parameter Extraction of Solar Photovoltaic Modules Using a Novel Bio-Inspired Swarm Intelligence Optimisation Algorithm. Sustainability 2023, 15, 8407. [Google Scholar] [CrossRef]
  44. Soler-Dominguez, A.; Juan, A.A.; Kizys, R. A Survey on Financial Applications of Metaheuristics. ACM Comput. Surv. 2018, 50, 15. [Google Scholar] [CrossRef]
  45. Kaur, S.; Kumar, Y.; Koul, A.; Kumar Kamboj, S. A Systematic Review on Metaheuristic Optimization Techniques for Feature Selections in Disease Diagnosis: Open Issues and Challenges. Arch. Comput. Methods Eng. 2023, 30, 1863–1895. [Google Scholar] [CrossRef]
  46. Dhawan, S.; Gupta, R.; Rana, A.; Sharma, S. Various Swarm Optimization Algorithms: Review, Challenges, and Opportunities. In Soft Computing for Intelligent Systems. Algorithms for Intelligent Systems; Marriwala, N., Tripathi, C.C., Jain, S., Mathapathi, S., Eds.; Springer: Singapore, 2021. [Google Scholar]
  47. Tang, J.; Liu, G.; Pan, Q. A Review on Representative Swarm Intelligence Algorithms for Solving Optimization Problems: Applications and Trends. IEEE/CAA J. Autom. Sin. 2021, 8, 1627–1643. [Google Scholar] [CrossRef]
  48. Carev, V.; Roháč, J.; Šipoš, M.; Schmirler, M. A Multilayer Brushless DC Motor for Heavy Lift Drones. Energies 2021, 14, 2504. [Google Scholar] [CrossRef]
  49. Zaharia, S.M.; Pop, M.A.; Buican, G.R.; Chicos, L.A.; Stamate, V.M.; Pascariu, I.S.; Lancea, C. Design and Testing of Brushless DC Motor Components of A6 Steel Additively Manufactured by Selective Laser Sintering. Aerospace 2023, 10, 60. [Google Scholar] [CrossRef]
  50. Vanus, J.; Bilik, P. Research on Micro-Mobility with a Focus on Electric Scooters within Smart Cities. World Electr. Veh. J. 2022, 13, 176. [Google Scholar] [CrossRef]
  51. Kim, H.J.; Park, H.S.; Kim, J.M. Expansion of Operating Speed Range of High-Speed BLDC Motor Using Hybrid PWM Switching Method Considering Dead Time. Energies 2020, 13, 5212. [Google Scholar] [CrossRef]
  52. Dumitrescu, C.; Ciotirnae, P.; Vizitiu, C. Fuzzy Logic for Intelligent Control System Using Soft Computing Applications. Sensors 2021, 21, 2617. [Google Scholar] [CrossRef] [PubMed]
  53. Zahreddine, Z. Symmetric Properties of Routh–Hurwitz and Schur–Cohn Stability Criteria. Symmetry 2022, 14, 603. [Google Scholar] [CrossRef]
  54. Frutos, P.; Ladoux, P.; Roux, N.; Larrazabal, I.; Guerrero, J.M.; Briz, F. Low Frequency Stability of AC Railway Traction Power Systems: Analysis of the Influence of Traction Unit Parameters. Electronics 2022, 11, 1593. [Google Scholar] [CrossRef]
  55. Taieb, A.; Salhi, H.; Chaari, A. Adaptive TS fuzzy MPC based on Particle Swarm Optimization-Cuckoo Search algorithm. ISA Trans. 2022, 131, 598–609. [Google Scholar] [CrossRef]
  56. Precup, R.E.; Tomescu, M.L.; Preitl, S. Fuzzy Logic Control System Stability Analysis Based on Lyapunov’s Direct Method. J. Comput. Commun. Control 2009, 4, 415–426. [Google Scholar] [CrossRef]
  57. Voloşencu, C. Stability Analysis of Systems with Fuzzy PI Controllers Applied to Electric Drives. Mathematics 2021, 9, 1246. [Google Scholar] [CrossRef]
  58. Castillo, O.; Aguilar, L.; Cázarez, N.; Cárdenas, S. Systematic design of a stable type-2 fuzzy logic controller. J. Appl. Soft Comput. 2008, 8, 1274–1279. [Google Scholar] [CrossRef]
  59. Kos, T.; Huba, M.; Vrančić, D. Parametric and Nonparametric PI Controller Tuning Method for Integrating Processes Based on Magnitude Optimum. Appl. Sci. 2020, 10, 1443. [Google Scholar] [CrossRef]
  60. Feng, W.; Bai, J.; Zhang, Z.; Zhang, J. A Composite Variable Structure PI Controller for Sensorless Speed Control Systems of IPMSM. Energies 2022, 15, 8292. [Google Scholar] [CrossRef]
  61. Szczepanski, R.; Kaminski, M.; Tarczewski, T. Auto-Tuning Process of State Feedback Speed Controller Applied for Two-Mass System. Energies 2020, 13, 3067. [Google Scholar] [CrossRef]
  62. Morar, D.; Mihaly, V.; Şuşcă, M.; Dobra, P. Cascade Control for Two-Axis Position Mechatronic Systems. Fractal Fract. 2023, 7, 122. [Google Scholar] [CrossRef]
  63. Szabat, K.; Orlowska-Kowalska, T. Vibration Suppression in Two-Mass Drive System Using PI Speed Controller and Additional Feedbacks-Comparative Study. IEEE Trans. Ind. Electron. 2007, 54, 1193–1206. [Google Scholar] [CrossRef]
  64. Zawirski, K.; Nowopolski, K.; Siwek, P. Application of Cuckoo Search Algorithm for Speed Control Optimization in Two-Sided Electrical Drive. In Proceedings of the 2018 IEEE 18th International Power Electronics and Motion Control Conference (PEMC), Budapest, Hungary, 26–30 August 2018; pp. 651–656. [Google Scholar] [CrossRef]
  65. Lotfi, C.; Youcef, Z.; Marwa, A.; Schulte, H.; Riad, B.; El-Arkam, M. Optimization of a Speed Controller of a DFIM with Metaheuristic Algorithms. Eng. Proc. 2023, 29, 29013. [Google Scholar] [CrossRef]
  66. Rodríguez-Molina, A.; Gabriel Villarreal-Cervantes, M.; Aldape-Pérez, M. An adaptive control study for a DC motor using meta-heuristic algorithms. IFACPapersOnLine 2017, 50, 13114–13120. [Google Scholar] [CrossRef]
  67. Dragoi, E.N.; Dafinescu, V. Review of Metaheuristics Inspired from the Animal Kingdom. Mathematics 2021, 9, 2335. [Google Scholar] [CrossRef]
  68. Safi, S.A.; Castillo, P.A.; Faris, H. Cost-Sensitive Metaheuristic Optimization-Based Neural Network with Ensemble Learning for Financial Distress Prediction. Appl. Sci. 2022, 12, 6918. [Google Scholar] [CrossRef]
  69. Vasiliadis, V.; Dounias, G. Applications of Nature-Inspired Intelligence in Finance. In Proceedings of the 2007 IFIP International Conference on Artificial Intelligence Applications and Innovations, Athens, Greece, 19–21 September 2007; pp. 187–194. [Google Scholar] [CrossRef]
  70. Santos, E.S.d.; Nunes, M.V.A.; Nascimento, M.H.R.; Leite, J.C. Rational Application of Electric Power Production Optimization through Metaheuristics Algorithm. Energies 2022, 15, 3253. [Google Scholar] [CrossRef]
  71. Chicco, G.; Mazza, A. Metaheuristic Optimization of Power and Energy Systems: Underlying Principles and Main Issues of the ‘Rush to Heuristics’. Energies 2020, 13, 5097. [Google Scholar] [CrossRef]
  72. Cao, T.S.; Nguyen, T.T.T.; Nguyen, V.S.; Truong, V.H.; Nguyen, H.H. Performance of Six Metaheuristic Algorithms for Multi-Objective Optimization of Nonlinear Inelastic Steel Trusses. Buildings 2023, 13, 868. [Google Scholar] [CrossRef]
  73. Braik, M.S. Chameleon Swarm Algorithm: A bio-inspired optimizer for solving engineering design problems. Expert Syst. Appl. 2021, 174, 114685. [Google Scholar] [CrossRef]
  74. Uluslu, A. Chameleon Swarm Algorithm assisted optimization of U-slot patch antenna for quad-band applications. IEEE Access 2022, 10, 74152–74163. [Google Scholar] [CrossRef]
  75. Sun, Y.; Cheng, Y.; Liu, T.; Huang, Q.; Guo, J.; Jin, W. Research on Signal Detection of OFDM Systems Based on the LSTM Network Optimized by the Improved Chameleon Swarm Algorithm. Mathematics 2023, 11, 1989. [Google Scholar] [CrossRef]
  76. Hamza, M.A.; Al-Otaibi, S.; Althahabi, S.; Alzahrani, J.S.; Mohamed, A.; Motwakel, A.; Zamani, A.S.; Eldesouki, M.I. Improved Chameleon Swarm Optimization-Based Load Scheduling for IoT-Enabled Cloud Environment. Comput. Syst. Sci. Eng. 2023, 46, 1371–1383. [Google Scholar] [CrossRef]
  77. Zhou, W.; Wang, L.; Han, X.; Wang, Y.; Zhang, Y.; Jia, Z. Adaptive Density Spatial Clustering Method Fusing Chameleon Swarm Algorithm. Entropy 2023, 25, 782. [Google Scholar] [CrossRef]
  78. Malarczyk, M.; Kaminski, M.; Szrek, J. Metaheuristic Approach to Synthesis of Suspension System of Mobile Robot for Mining Infrastructure Inspection. Sensors 2022, 22, 8839. [Google Scholar] [CrossRef]
  79. Tarchała, G.; Orłowska-Kowalska, T. Discrete Sliding Mode Speed Control of Induction Motor Using Time-Varying Switching Line. Electronics 2020, 9, 185. [Google Scholar] [CrossRef]
  80. Li, W.; Zhang, L.; Wu, C.; Cui, Z.; Niu, C. A new lightweight deep neural network for surface scratch detection. Int. J. Adv. Manuf. Technol. 2022, 123, 1999–2015. [Google Scholar] [CrossRef]
  81. Khaing, C.C.; Thein, T.L.L. Prediction of Rainfall Based on Deep Learning and Internet of Things to Prevent Landslide. In Proceedings of the IEEE 9th Global Conference on Consumer Electronics (GCCE), Kobe, Japan, 13–16 October 2020; pp. 190–191. [Google Scholar] [CrossRef]
Figure 1. The concept of an electric drive with a BLDC motor.
Figure 1. The concept of an electric drive with a BLDC motor.
Applsci 14 00982 g001
Figure 2. Overall structure of the analyzed control system.
Figure 2. Overall structure of the analyzed control system.
Applsci 14 00982 g002
Figure 3. Data processing in fuzzy model.
Figure 3. Data processing in fuzzy model.
Applsci 14 00982 g003
Figure 4. The structure of the fuzzy controller (NVB—negative very big; N—negative; PVB—positive very big; and P—positive).
Figure 4. The structure of the fuzzy controller (NVB—negative very big; N—negative; PVB—positive very big; and P—positive).
Applsci 14 00982 g004
Figure 5. Fuzzy surface of the model.
Figure 5. Fuzzy surface of the model.
Applsci 14 00982 g005
Figure 6. Membership functions defined for input e ˙ (a), input e, and output signal u (b). For the membership functions, the following acronyms are used: N—negative, P—positive, NB—negative big, PB—positive big.
Figure 6. Membership functions defined for input e ˙ (a), input e, and output signal u (b). For the membership functions, the following acronyms are used: N—negative, P—positive, NB—negative big, PB—positive big.
Applsci 14 00982 g006
Figure 7. Flowchart of the CSA.
Figure 7. Flowchart of the CSA.
Applsci 14 00982 g007
Figure 8. Values of the Lyapunov function V ˙ during simulation with stable control rules.
Figure 8. Values of the Lyapunov function V ˙ during simulation with stable control rules.
Applsci 14 00982 g008
Figure 9. Speed transients of the drive with optimized fuzzy controller (chosen stages of the parameter optimization).
Figure 9. Speed transients of the drive with optimized fuzzy controller (chosen stages of the parameter optimization).
Applsci 14 00982 g009
Figure 10. Cost function values under fuzzy controller optimization with the CSA.
Figure 10. Cost function values under fuzzy controller optimization with the CSA.
Applsci 14 00982 g010
Figure 11. Transients of the drive with the BLDC motor and the fuzzy speed controller—modified mechanical time constants.
Figure 11. Transients of the drive with the BLDC motor and the fuzzy speed controller—modified mechanical time constants.
Applsci 14 00982 g011
Figure 12. The structure of the control system: (a) schematic diagram, (b) photos of the prototype.
Figure 12. The structure of the control system: (a) schematic diagram, (b) photos of the prototype.
Applsci 14 00982 g012
Figure 13. The structure of the power system.
Figure 13. The structure of the power system.
Applsci 14 00982 g013
Figure 14. (a) Power module board with IGBT tranistors, (b) IGBT drivers.
Figure 14. (a) Power module board with IGBT tranistors, (b) IGBT drivers.
Applsci 14 00982 g014
Figure 15. The lower part of the main device: 24 V DC main power supply, 230 V AC socket, and encoder pull-up resistor board.
Figure 15. The lower part of the main device: 24 V DC main power supply, 230 V AC socket, and encoder pull-up resistor board.
Applsci 14 00982 g015
Figure 16. The cabinet built for the whole device.
Figure 16. The cabinet built for the whole device.
Applsci 14 00982 g016
Figure 17. The upper part of the fully assembled BLDC motor controller: (a) 5 V voltage controller, (b) 14.8 V voltage controller, (c) Raspberry Pi 4B, (d) STM32 Nucleo 64, (e) STM32 Nucleo 32, (f) 24 V motor voltage regulator, (g) 3-fan cooling system, (h) power module, (i) IGBT driver module.
Figure 17. The upper part of the fully assembled BLDC motor controller: (a) 5 V voltage controller, (b) 14.8 V voltage controller, (c) Raspberry Pi 4B, (d) STM32 Nucleo 64, (e) STM32 Nucleo 32, (f) 24 V motor voltage regulator, (g) 3-fan cooling system, (h) power module, (i) IGBT driver module.
Applsci 14 00982 g017
Figure 18. Python application dedicated to controlling the operation of the BLDC motor drive: (a) ready to start, (b) while running.
Figure 18. Python application dedicated to controlling the operation of the BLDC motor drive: (a) ready to start, (b) while running.
Applsci 14 00982 g018
Figure 19. Speed transients of the electric drive with the BLDC motor and analyzed fuzzy system: (a) ω r e f = 0.3 , (b) ω r e f = 0.8 , (c) ω r e f = 0.1 , (d) ω r e f = 0.4 , (e) ω r e f = v a r , (f) ω r e f = 0.8 with additional load.
Figure 19. Speed transients of the electric drive with the BLDC motor and analyzed fuzzy system: (a) ω r e f = 0.3 , (b) ω r e f = 0.8 , (c) ω r e f = 0.1 , (d) ω r e f = 0.4 , (e) ω r e f = v a r , (f) ω r e f = 0.8 with additional load.
Applsci 14 00982 g019
Figure 20. Influence of the fuzzy speed controller parameters on the operation of the electric drive with the BLDC motor (changes in relation to the optimized values): (a) integrator gain increased, (b) derivative gain increased, (c) each gain decreased, (d) each gain increased.
Figure 20. Influence of the fuzzy speed controller parameters on the operation of the electric drive with the BLDC motor (changes in relation to the optimized values): (a) integrator gain increased, (b) derivative gain increased, (c) each gain decreased, (d) each gain increased.
Applsci 14 00982 g020
Table 1. Lyapunov-based stable control rule table.
Table 1. Lyapunov-based stable control rule table.
e ˙ eu
NPBPB
NPPB
NPBP
NPP
NPBN
NP0
NPB0
N0PB
N0P
N00
NNPB
PNN
PNNB
PNBN
PNBNB
P0N
P0NB
PNB0
PN0
PNBP
PPNB
Table 2. Limits for the controller parameters.
Table 2. Limits for the controller parameters.
ParameterLower BoundaryUpper Boundary
K e 0.00110
K d e 0.00110
K u 0.0011000
Table 3. Time constants of the simulation model.
Table 3. Time constants of the simulation model.
ParameterValue
T e 0.001 s
T m 0.016 s
T s 0.001 s
Table 4. Parameters of programable devices used in the project.
Table 4. Parameters of programable devices used in the project.
DeviceRaspberry Pi 4BSTM32 Nucleo 64STM32 Nucleo 32
Power consumption15 W<1 W<1 W
CoreChipset Broadcom BCM2711 with 64-bit Quad-Core ARM-8 Cortex A-72 CPUARM Cortex M4ARM Cortex M4
Clock rate1.5 GHz180 MHz80 MHz
User memory sizeExternal SD memory512 kB256 kB
RAM2 GB (up to 8 GB, depending on version)128 kB64 kB
Table 5. ACT 42BLF01 BLDC motor parameters.
Table 5. ACT 42BLF01 BLDC motor parameters.
ParameterValue
Model42BLF01
Number of Poles8
Rated voltage24 V
Rated speed4000 rpm
Rated current1.9 A
Maximum power26 W
Maximum torque0.18 Nm
Back-EMF3.7 V/kRPM
Torque constant0.035 Nm/A
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kaczmarczyk, G.; Malarczyk, M.; Ferreira, D.D.; Kaminski, M. Stable Rules Definition for Fuzzy TS Speed Controller Implemented for BLDC Motor. Appl. Sci. 2024, 14, 982. https://doi.org/10.3390/app14030982

AMA Style

Kaczmarczyk G, Malarczyk M, Ferreira DD, Kaminski M. Stable Rules Definition for Fuzzy TS Speed Controller Implemented for BLDC Motor. Applied Sciences. 2024; 14(3):982. https://doi.org/10.3390/app14030982

Chicago/Turabian Style

Kaczmarczyk, Grzegorz, Mateusz Malarczyk, Danton Diego Ferreira, and Marcin Kaminski. 2024. "Stable Rules Definition for Fuzzy TS Speed Controller Implemented for BLDC Motor" Applied Sciences 14, no. 3: 982. https://doi.org/10.3390/app14030982

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop