3.1. Establishment of Motor Model
According to the current mainstream AGV design companies, such as Hikvision, KUKA, Dematic, etc., the total driving force [
15] required for AGV driving
Fz is 1562 N. The parameters required for designing AGV are as follows: the average driving speed of AGV
Vx is 0.58 m/s, the diameter of AGV driving wheel
D is 18 cm, the number of driving motors
n is 10, the reduction ratio of motor reducer
i is 20, and the transmission efficiency of the motor output shaft from the reducer to the driving wheel is 0.73. According to these parameters, the calculation formulas of the rated power
P, the rated torque
T, and the rated speed
N of the motor are Equations (4), (5), and (6), respectively.
where
R is the radius of the driving wheel.
The specific parameter requirements are calculated as shown in
Table 2.
Under the premise of meeting the requirements of information parameters in
Table 2, according to the driving ability required by the distance measurement accuracy of the sensor in
Table 1, this paper chooses the Z55BLD300-36GU DC brushless motor.
For the realization of the motor control algorithm, according to the motor parameter characteristic hypothesis and model analysis of BLDC in reference [
16], the simplified mathematical equation of the motor is established in this paper. The simplified equivalent circuit diagram of BLDC is shown in
Figure 3. Through the analysis and prediction of the running state of the motor, different control principles can be designed, and the corresponding photoelectric sensor and sliding mode controller are used to obtain the speed feedback, respectively, so as to design the appropriate control strategy to achieve the desired speed regulation effect. The voltage equation of BLDC is as follows:
where
R L and
M are phase resistance, phase inductance, and mutual inductance, respectively;
B is the matrix
;
Ux Ix and
Ex are the three-phase voltage, phase current, and opposite electromotive force, respectively;
x takes
a,
b, and
c to represent the three-phase windings, respectively;
UN is the star connected neutral voltage.
3.2. Speed Detection Circuit
In the low- and medium-speed-range BLDC control system, the motor output speed must be detected, and the measured speed is fed back to the PI controller to complete the speed closed-loop control. Considering the advantages of photoelectric sensors, such as their high accuracy and resolution, strong anti-interference ability, non-contact measurement, and high accuracy of displacement detection, the photoelectric encoder is selected as the BLDC output speed measuring device.
The structure principle of the photoelectric encoder is shown in
Figure 4, and the working principle is as follows:
The prisms convert the scattered light emitted by light-emitting diodes into parallel light, and fixed gratings ensure that this light enters the photosensitive tube. The grating disk rotates with the BLDC, and the photosensitive tube completes the optical–electrical signal conversion, and then outputs three sets of pulse square waves. They are AB two-phase square waves with a duty cycle of 50% and a phase difference of 90°, as well as Z-phase zero pulses. (One pulse is output per revolution).
Enter the single chip microcomputer through the interface circuit in
Figure 5, then the single chip microcomputer captures the input pulse according to the interrupt service program, finally uses the frequency doubling technology (the rising edge and the falling edge of the AB two-phase square wave are both considered as pulses) to obtain a 4-fold frequency doubling pulse.
The BLDC speed is calculated using the periodic measurement method. This method obtains a high-frequency pulse with a known frequency and counts it. The calculation formula of the speed
n is
where
TE is the counting time, which is determined by the interval time between two adjacent pulses of the encoder captured by the single-chip microcomputer;
M1 is the corresponding number of counts;
C is the total number of pulses in a single turn of the encoder; and
F0 is the frequency of the pulses.
The interface circuit diagram of the photoelectric encoder is shown in
Figure 5. HCPL060L is a photoelectric isolation device. The pulse signal generated by the photoelectric encoder enters the interface circuit and is then electrically isolated by HCPL060L. The isolated signal is processed after being captured by the timer of the single-chip microcomputer. This design can effectively prevent the influence of noise and interference in the encoder signal on STM32 and can improve the stability and reliability of the system.
When HCPL060L is in an extreme electromagnetic environment, its ability to resist unstable light interference worsens [
17], which affects the accuracy of speed measurement and, ultimately, reduces the control accuracy and dynamic performance of the motor.
3.3. Vector Control Algorithm Rotation
BLDC is a complex system with multivariable, decoupling and nonlinear characteristics. The speed of BLDC cannot be effectively controlled within the required range by using ordinary inductive control (six-phase commutation method). Therefore, this paper adopts the FOC control algorithm.
The FOC algorithm, also known as Field-Oriented Control [
18], is an advanced algorithm for AC motor control. The core idea is to transform the control problem of the AC motor into the control problem of the DC motor, so as to realize the efficient and accurate control of the AC motor.
FOC aims to reduce the torque ripple and noise of the motor by accurately controlling the size and direction of the magnetic field, and can quickly respond to speed, rotor position, and torque commands, thereby achieving accurate control of torque and speed. As shown in
Figure 6, the realization of the FOC algorithm is based on the Clark and Park coordinate transformation [
18]. The FOC algorithm converts the three-phase stationary coordinate system (abc) into a two-phase rotating coordinate system (dq), which simplifies the control model and serves as the input to the PI controller. The Clark transform equation in the study is
where
αβ is the two-phase stationary coordinate system.
The Park transformation formula is
where
θ is the current rotor position.
3.4. SVPWM Algorithm
The SVPWM algorithm [
19] controls the switching state of the three-phase inverter and then generates a voltage or current output that is close to the ideal sinusoidal waveform. The SVPWM algorithm considers the inverter and the motor as a whole. By controlling the switching sequence of the inverter, the output voltage space vector achieves an ideal circular trajectory.
The seven-segment SVPWM algorithm used in this paper and the generation method of the space voltage vector
U in each sector are as follows:
U consists of two zero vectors (
U0,
U7) and two adjacent non-zero vectors (
U1~
U6). The non-zero vector selected by the U in each sector of the synthesis corresponds to the state of the inverter MOS tube, as shown in
Figure 7.
The generation of U first obtains each basic vector (U0~U7) through the switching state of the MOS tube and determines the sector where the current U is located according to the two adjacent non-zero vectors. Finally, according to the action time transformation of the above two pairs of adjacent vectors, the synthetic space voltage vector U in each direction is obtained, thereby driving the motor rotor to rotate smoothly.
The zero vector and the non-zero vector are combined to form the corresponding PWM waveform. Finally, the capture register (CCR) values corresponding to the three timers are obtained. According to the state combination of the power switch in the inverter circuit and the adjustment of its switching time, a space voltage vector with a circular trajectory is generated so that a uniform circular rotating magnetic field is generated in the AC motor.
In the vector control system, according to the selected control strategy, through the appropriate coordinate transformation, the components of the voltage space vector in the two-phase stationary coordinate system are obtained. Finally, through the SVPWM control, the specific algorithm steps are as follows:
1. According to the
Uα and
Uβ obtained by the anti-Park transformation, the variable
U1,
U2, and
U3 are defined. The calculation formulas of the three are as follows:
2. The sector number of the space voltage vector (
I–
VI in
Figure 7 ) is determined and calculated by reference voltage components (
U1,
U2, and
U3).
where the
sign is the function, if
Ux > 0, the function value is 1; if
Ux < 0, the function value is 0.
And the corresponding sector is calculated based on
Figure 7, sector location
N.
3. Define the variables
X,
Y, and
Z. According to the sector number obtained in
Table 3, the action time of the corresponding basic space vector is determined.
where
Ts is the timer PWM period and
Udc is the BLDC bus voltage.
According to the obtained X, Y, and Z, the values of the two non-zero vectors (rotated counterclockwise) corresponding to each sector are obtained.
When determining the output constraints for SVPWM modulation, in the process of software simulation, rounding is used in order to simplify the operation. Therefore, it is necessary to compare the working time
Ta,
Tb and the modulation period
Ts. If it does not meet the actual conditions, it needs to be processed.
4. The PWM generation of a single-chip microcomputer adopts the center alignment mode. In this mode, the single-chip microcomputer can generate the symmetrical PWM waveform, and an accurate synthetic magnetic field vector can be generated by the SVPWM algorithm. Therefore, the setting of the CCR value in the timer should be determined first.
First, the following three variables are defined:
T1,
T2, and
T3. According to the values of
Ta and
Tb in each sector, as shown in
Table 4, these three variables can be obtained.
The corresponding relationship between the three-phase voltage switching points
CCR1,
CCR2, and
CCR3 and each sector is shown in
Table 5.
5. On the basis of the principle of the minimum number of MOS tube-switching operations, the order and time of each sector voltage vector are determined. Finally, the value of CCR in the timer setting of the single chip microcomputer is determined according to
Table 5.
Taking the first sector as an example, the three-phase modulation wave generated by it is shown in
Figure 8 in the period
Ts. The order of appearance of the voltage vectors in the figure is 0→4→6→7→7→6→4→0.
In summary, the SVPWM algorithm process includes the sector judgment of the reference voltage vector, the calculation of the non-zero vector and the zero vector action time of each sector, and the determination of the switching point of each sector vector. Then, comparing the corresponding frequency triangular carrier signal with each sector vector switching point, the six PWM pulse signals required by the three-phase inverter are finally generated.
3.5. Sliding Mode Observer
For the output-speed feedback of the photoelectric encoder under the vector control algorithm, it is not sufficient to meet the AGV speed requirements. In order to improve the response speed of the drive system and improve the accuracy of the position feedback system, on the basis of the vector control strategy, the sliding mode observer is used in the high-speed stage of BLDC to strengthen the control of the output speed of the motor.
SMO is an advanced algorithm [
20] for sensorless vector control of motors. The algorithm is mainly used to estimate the rotor position and speed of the motor in real time, so as to realize the accurate control of the motor. SMO is an observer based on the theory of sliding mode control. The core concept of the SMO is to design a sliding surface so that the system state can slide along the sliding surface after reaching the sliding surface, and finally realize the observation of the position and speed of the rotor.
1. The first step is to design the SMO and select a suitable control function to reduce the output chattering problem. The mathematical model of the SMO is established based on the motor voltage equation in the stationary coordinate system, and the voltage equation in the stationary coordinate system obtained by Clark transformation of (7) is
The counter electromotive force contains the motor speed information, and the voltage equation becomes the current equation in the same coordinate system as follows:
2. To obtain an estimate of the counter electromotive force, a sliding mode observer is designed according to the observation current equation in the BLDC stationary coordinate system:
where
are the current observations in the stationary coordinate system;
vα vβ are the control inputs to the observer, which can be expressed as follows:
where
k is the slip film gain and
sgn is the sign function [
21].
The appropriate k value can make the observation current converge to the actual current more quickly and can reduce the jitter of the observation current and the SMO output speed after the stability, so as to improve the speed extraction accuracy.
3. In order to better reduce the chattering and remove other high-frequency noise in the system, a low-pass filter is added after the output
vα vβ of the sliding mode observer, and its mathematical model in the frequency domain is
where
is the cutoff frequency and
is the is the identification speed.
4. The rotor position and speed are estimated by phase-locked loop (PLL). The PLL [
22] algorithm is widely used in digital signal processing, especially in the fields of communication, power electronics, and motor control. Its main purpose is to track the input signal’s phase to extract its frequency and phase information. The equation for the PLL estimation of rotor speed is as follows:
where
is the observed value of the back electromotive force after the filter;
is the proportional value of the PI controller, and
is the integral value of the PI controller.
The estimated speed of the rotor extracted by the phase-locked loop needs to be output by the integrator, which is the rotor position estimation.