This work explains the speed control design for a DC motor using fuzzy logic with LabVIEW software. It is also a literature review about the design and the implementation environment and is presented using fuzzy logic to describe the materials and methods used. Various processes on the subject highlight the idea, creation, development, and implementation of intelligent control, and the results considering the application and development for this purpose are presented.
- fuzzy logic
- industrial applications
In the last decade, the use of various control techniques such as hybrid [1, 2] or artificial intelligence has grown exponentially in the fields of power electronics, control systems, and positioning systems. To carry out these development methods, a large database and understanding of control methods are necessary to describe the analysis system to facilitate decision-making. One of these methods is fuzzy logic [3, 4], which is necessary to realize improvements over classical logic and is basically a statement that can be understood as a logical value of 1 or 0.
In the control field, specifically in the DC motor, control can be applied by intelligent control techniques such as fuzzy logic, which is further applied in parallel with conventional control techniques. In fuzzy logic there are two well-known algorithms: logarithm Mamdani and Takagi Sugeno; these are useful in applications such as microelectronics and power electronics [5, 6].
Since it is a more compact and computationally efficient representation than a Mamdani system, the Sugeno system lends itself to the use of adaptive techniques for constructing fuzzy models [7, 8]. These adaptive techniques can be used to customize the membership functions so that the fuzzy system models the data with a significant improvement [9, 10].
2. Materials and methods
2.1. Process description
The device on which the fuzzy logic control will be applied is a 12 V DC motor as shown in Figure 1.
The block diagram of Figure 2 shows the control process. In the first stage, the input is the setpoint or reference rate to be applied to the motor. Next is the analog-digital converter, which is distinguished as a data acquisition card. The second stage is the fuzzy logic control developed in LabVIEW. The data acquisition card is used once again since this should act as both analog-digital converter at the input and digital-analog converter at the output. Hereafter, the analog signal passes through the actuator block, which is H-bridge pulse-width modulation (PWM) modified to the motor speed . The next block in the plant is the DC motor. The tachometer, which is built into the DC motor, is a feedback system that checks whether the engine speed has altered and eliminates unwanted phenomena.
LabVIEW  (Figure 3) is the software used to develop the controller through its fuzzy logic blocks. To facilitate programming the LabVIEW toolbox contains toolkits. This software is mainly used for data acquisition, mathematical analysis, instrument control, and controller design. In 2008 the software was used to control the Large Hadron Collider , a particle accelerator designed by about 2000 scientists from 34 countries around the world. This appliance is the largest of its kind and is located near Geneva.
To interact with LabVIEW, the user needs a data acquisition card, e.g., a National Instruments NI myDAQ (Figure 4). The function of the data acquisition card is to collect physical signals during the process and transform them into electrical voltages that are subsequently scanned on a PC and can be processed. To make the transformation to a digital signal the card is needed at the adaptation stage [14–16]
Within the data acquisition process is the transducer, which is an element that converts the physical quantity to be measured into an output signal, usually a voltage or current that is then processed on a PC or other system.
Signal conditioning is the stage that is responsible for filtering and adapting the outgoing signal transducer, which is then sent to the analog-digital converter, which as we know is the stage responsible for converting an analog signal to the digital output stage to connect the data acquisition system to a PC (Figure 5).
In the initial window for the design of a new fuzzy controller, data such as name, designer name, date, and time are observed for the project. In the window in Figure 6, the fuzzy set editor and its consequences are introduced.
The input and output linguistic variables and their ranges are entered functionally. This takes into account the fuzzy set editor, which starts with a default configuration. The advantage over a conventional proportional-integral-derivative (PID) controller is that a fuzzy PD (proportional and derivative) controller can implement nonlinear control strategies, which uses linguistic rules. The rules evaluate the difference between the measured value and the set value, the error signal, and the tendency of the error signal to determine whether to increment or decrement the control variable (Figure 7).
By deploying the box, it is necessary the input linguistic variables, where each one contains the following linguistic terms: NEx (term negative), ZOx (zero), POx (term positive), default data range is −1 to 1, variable name default: INX with x = 1, …, 4 (Figure 8).
The result is output linguistic variables, which contain the following linguistic terms: NEo (term negative), ZOo (zero) and POo (term positive), default data range is from −1 to 1, variable name default: Output (Figure 9).
The interference method, the method of defuzzification and output default configuration, is determined because of the rule editor (Figure 10).
The block features input and output characteristics that simulate the controller and graphically display the output behavior regarding parameter rules in the rule editor (Figure 11).
At the end of this process, the fuzzy controller with all the information on the rules, which is observed in the graphical environment of LabVIEW as a block, is obtained (Figure 12).
Pulse width modulation (PWM) is a process in which the duty cycle of a periodic signal, possibly to transmit information, is modified through a communications channel or to control the amount of power sent to a load (Figure 13).
The H-bridge implemented for controlling the DC motor is an LMD18200 , which is constructed with bipolar circuitry control complementary metal-oxide-semiconductor (CMOS) field-effect devices and a double-diffused metal-oxide-semiconductor (DMOS), and accommodates a peak output up to 6 A (Figure 14).
Feedback should be between 0 and 5 V as it is the voltage that supports the data acquisition card; a tachometer generates voltages from 0 to 12 V. This does not serve as an input to the program, thus it designs and implements an actuator to condition the signal, taking into account that the behavior guarantees a range between 0 and 5 V, which is the optimal voltage for scanning the signal (Figures 15 and 16).
Figure 17 shows the blocks of indicators and controls, such as the while loop; all the blocks work in a continuous cycle. The DAQ Assistant Express VI block communicates with the data acquisition card, the Merge Signals Function is the graphic indicator that shows the sign of the setpoint (red) control signal (green) and engine response (blue), and shift registers and the Feedback Node in loops are used to calculate the change of error. Time Domain Math Express VI is used to perform mathematical operations in time, in this case the change will be integrated with PWM and the output will be obtained from the desired range. The strip path function maintains the file path generated by the designer extension. Simulate Signal Express VI simulates square waves for PWM, the fuzzy logic controller, the controller, and the load fuzzy setpoint [7, 17].
3. Results and discussion
At the time of connecting the entire set of devices such as the engine, transducer, font, procuring card data, and PC, configuration of the H-bridge pins and motor feedback are taken into account. After verifying that the assembly has the correct speed, control is executed in LabVIEW and the system is energized.
Within the controller, a value of 1600 RPM is entered to start the control engine speed, and on the graphic belonging to the GUI LabVIEW variation, PWM is observed in terms of engine speed in RPM. These results can be compared with a classic PID control showing that our fuzzy logic controller meets the design requirements. Achieving error values of 3% is acceptable in a practical manner (Figures 19 and 20).
The foregoing is accomplished by designing a control system to understand alternative control applications that can used, for example, in an industrial sector. It is noted that fuzzy logic is a fast, solid, and robust control method for a system that is affected by constant instabilities, which in this case could be disturbances affecting a DC motor by applying opposing forces or weights within its axis rotation.
Fuzzy logic is a method of computing based on decision-making and is used for expert systems and process control. Fuzzy logic differs from traditional Boolean logic in that fuzzy logic allows for partial membership in a set. The great advantages and possibilities offered by the LabVIEW software for these applications are also stressed.
To implement real-time decision making or control of a physical system, data acquired by an A/D Converter must be obtained from a fuzzy controller. Which after making the corresponding interpretation of the linguistic rules and the corresponding defusification leaves the diffuse logic controller by means of a D/A Converter with DAQ analog output hardware to implement real-time process control.
Conflict of interest
The authors declare that there is no conflict of interest regarding the publication of this chapter.