Next Article in Journal
DPNet: Dual-Pyramid Semantic Segmentation Network Based on Improved Deeplabv3 Plus
Next Article in Special Issue
Speed Estimation Strategy for Closed-Loop Control of PMSM Based on PSO Optimized KF Series Algorithms
Previous Article in Journal
A Novel NLMS Algorithm for System Identification
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Fixed-Point Position Observation Algorithm and System-on-Chip Design Suitable for Sensorless Control of High-Speed Permanent Magnet Synchronous Motor

Key Laboratory for Key Technologies of IoT Terminals, Harbin Institute of Technology, Shenzhen 518055, China
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(14), 3160; https://doi.org/10.3390/electronics12143160
Submission received: 30 June 2023 / Revised: 15 July 2023 / Accepted: 19 July 2023 / Published: 20 July 2023
(This article belongs to the Special Issue Advances in Control for Permanent Magnet Synchronous Motor (PMSM))

Abstract

:
In the sensorless control algorithm of permanent magnet synchronous motors (PMSMs), there is a significant research focus on developing a high-performance position observer and a cost-effective, high-performance processor specifically designed for PMSMs. In this paper, we first reviewed the current mainstream position observation algorithms. Subsequently, we proposed a position observation algorithm based on a fixed-point nonlinear flux linkage model that introduces a variable gain model and an observer compensation model. Furthermore, we implemented the improved position observation algorithm in the circuit and designed a System-on-Chip (SOC) suitable for the sensorless control of high-speed permanent magnet synchronous motors using the ARM Cortex-M0 core. The functionality of the proposed SOC was verified on the Field Programmable Gate Array (FPGA) platform. The results demonstrate that the improved algorithm offers an excellent angle observation accuracy and fast convergence speed. The error between the observed angle and the actual angle is less than 0.2 rad. Additionally, the designed SOC balances the high efficiency of hardware implementation with the flexibility of software implementation. When running a sensorless control algorithm for PMSM, it achieves a 30.3% increase in execution efficiency, enabling support for higher frequency output PWM switching and making it suitable for the high-precision control of high-speed PMSM.

1. Introduction

With the advent of new power devices, microcontrollers, and integrated circuits, permanent magnet synchronous motors (PMSMs) have gained significant traction in emerging fields like new energy vehicles. In the field-oriented control of PMSMs, accurate rotor position estimation plays a vital role. Traditionally, mechanical or electronic sensors have been employed to obtain position information, offering a straightforward and effective approach. However, sensor-based methods come with certain limitations. Environmental conditions such as temperature and electromagnetic interference can adversely affect sensor performance, leading to substantial errors in position estimation. Furthermore, the high cost associated with sensor implementation is a notable drawback. To overcome these challenges, extensive research has been conducted on sensorless control strategies [1,2]. Moreover, in specific high-speed PMSM applications where precise control is paramount, there is an increasing demand for high-performance processors or microcontrollers. Consequently, there is a pressing need for cost-effective yet high-precision control systems, which have become a focal point of research [3].
In the realm of sensorless control algorithms for PMSMs, two distinct categories exist based on the applicable motor speed range: methods suitable for low-speed or zero-speed control and methods suitable for medium to high-speed control. For position estimation at medium to high speed, various methods are currently employed that extract rotor position and speed information from the motor’s back electromotive force. Commonly used methods include direct computation, model reference adaptive control [4], observer-based methods, extended Kalman filtering [5,6,7], and artificial intelligence algorithms [8]. Ref. [9] proposed an extended back electromotive force method that decouples the DC and AC components of the inductances on the α and β axes of salient-pole motors. This method incorporates the AC component into the stator winding’s back electromotive force, enabling rotor position estimation. Sliding mode control theory was utilized in the observer for sensorless control in reference [10]. Additionally, researchers have proposed methods such as variable sliding mode gains and speed adaptive sliding mode control to enhance the accuracy of position and speed estimation based on the basic sliding mode observer [11,12,13]. Kalman filtering has been successfully applied to the sensorless control of PMSMs, effectively suppressing measurement errors and noise interference. However, its implementation requires a high computational complexity and processor requirements [14]. Furthermore, reference [15] introduced a method that utilizes high-frequency signal injection to estimate the speed of permanent magnet synchronous motors, enabling position observation at zero or low speeds. Ref. [16] proposed a high-frequency square wave signal injection method based on oversampling, reducing the rotor position error and position update delay. For low-speed operation (including stationary states), reference [17] employed a sliding-mode-based phase-locked loop observer defined by a complex switching function to observe the rotor angle. Ref. [18] presented a sensorless control method for PMSMs based on low-frequency current signal injection, enabling precise position servo control. High-speed sliding mode observer technology was utilized in reference [19] to assess the stability of a permanent magnet synchronous motor drive, enhancing control robustness. Ref. [20] proposed a sensorless control method based on the static error between the discrete d-axis current and the corresponding reference value. This method accurately compensates for the estimated rotor position of the motor under high-speed and low-load-ratio conditions, improving sensorless control accuracy.
In the references above, the position observation algorithms for high-speed conditions are based on back electromotive force, while, for low-speed conditions, the position observation algorithms rely on the salient pole effect. This distinction arises because the motor’s back EMF differs at high and low speeds, making it impractical to employ back-EMF-based algorithms for position observation across the entire speed range. Therefore, if control is desired throughout the entire speed range, an additional switching algorithm from low to high speeds needs to be implemented. This increases the complexity of the control algorithm and places higher demands on the processor’s performance. To address this issue, we recognized that the magnetic flux linkage of the rotor remains consistent across high and low speeds, making it applicable throughout the entire velocity range. Therefore, we adopted a nonlinear observer based on the magnetic flux linkage model. This approach was initially proposed in references [21,22]. In this method, the accuracy of the control gain parameters and state variables is crucial to the algorithm’s performance. However, the original references provide a limited treatment of these aspects. When dealing with motors that have significant parameter variations, adjusting the parameters during debugging becomes challenging. Additionally, there is no specific handling of zero-speed or low-speed conditions, leading to significant disturbances from environmental factors. Hence, this paper aims to improve the nonlinear magnetic flux linkage observer algorithm to enhance its robustness and address these issues.
In order to achieve a higher-precision control of PMSMs, extensive research has been conducted on control systems. In reference [23], researchers implemented an integrated control of the PMSM drive system and regenerative braking system based on the principle of vector control. They utilized a Field Programmable Gate Array (FPGA) as the central processor, which improved the real-time performance and stability of the PMSM control system. Ref. [24] implemented a dynamic parameter speed controller using a generalized regression neural network on a TI Digital Signal Processor (DSP) platform to control the PMSM. In reference [25], a parallel and pipeline design principle was adopted, and a compensation controller based on an extended Kalman filter was constructed on an FPGA. This design improved the execution speed of the control algorithm and the tracking performance of the system. Ref. [26] employed an FPGA-based real-time sampling and update strategy to reduce the update delay of pulse width modulation. Ref. [27] proposed an optimized multi-axis control system for permanent magnet synchronous motors based on a system-on-chip, achieving an execution time of only a few microseconds while reasonably utilizing system resources. Ref. [28] implemented sensorless sliding mode observer control of PMSMs on an FPGA using hardware optimization algorithms such as pipeline and resource sharing. This implementation demonstrated good robustness and a high performance. In reference [29], a PMSM control scheme based on a Luenberger disturbance observer was implemented on a Zynq System-on-Chip(SoC). Therefore, it can be observed that, due to the inability of certain general-purpose processors to meet the required performance standards, such as speed, the high-precision control of PMSMs in the references above is implemented on an FPGA or DSP. This significantly increases the implementation cost and results in poor portability between different platforms, along with an increased complexity in application.
In summary, the current sensorless control algorithms for PMSMs still have deficiencies as they are challenging to apply simultaneously under both low-speed and high-speed conditions. Moreover, for the high-precision control of high-speed PMSMs, the performance of general-purpose processors cannot meet the requirements of complex control algorithms at the same cost. Therefore, this paper fills these research gaps. The main contributions of this paper are as follows:
  • An improved nonlinear flux observer model was proposed, enhancing the robustness of position observation and exhibiting an excellent performance in both low-speed and high-speed conditions while reducing computational complexity;
  • The improved nonlinear flux observer for position estimation was implemented in hardware circuitry;
  • An SOC designed for PMSMs, based on the ARM Cortex-M0 core, was introduced. It adopts a combined software and hardware approach, ensuring algorithmic execution efficiency while maintaining flexibility in software implementation. Additionally, it significantly reduces implementation costs and is suitable for the high-precision control of high-speed PMSMs, achieving a high performance and low cost in permanent magnet synchronous motor control.
The organization of this paper is as follows: In Section 2, an introduction to the basic nonlinear flux observer is provided, followed by its improvements, including a variable gain model and a compensation model for the state variables. The improved algorithm is then subjected to fixed-point processing. In Section 3, the hardware implementation of the improved position observer is discussed, where it is implemented as a hardware IP and integrated into an SOC designed based on the ARM Cortex-M0 core for PMSM applications. In Section 4, the improved nonlinear flux observer is validated through simulation, and the performance of the position observer and the functionality of the SOC are tested for an actual system. Finally, conclusions are presented in Section 5.

2. Analysis and Improvement of the Nonlinear Flux Model

2.1. Nonlinear Flux Model

The permanent magnet synchronous motor needs to select different and more suitable models in different applications. When selecting the model, it is necessary to consider the coordinate system of its application. The d q coordinate system of the permanent magnet synchronous motor is simple, such as Equation (1):
u d = R i d + L d d d t i d ω e L q i q u q = R i q + L q d d t i q ω e L d i d + φ f
Here, u d and u q are the d q axis components of the stator voltage, respectively, i d and i q are the d q axis components of the stator current, respectively, R is the resistance of the stator, ω e is the electrical angular velocity, L d and L q are the d q axis inductance components, respectively, and φ f is the permanent magnetic linkage of magnets. For the convenience of calculation, in the flux linkage model, the mathematical model under the coordinate system is generally used for algorithm design. Equation (1) is subjected to inverse Park transformation to obtain Equation (2):
u α u β = R + d d t L α d d t L α β d d t L α β R + d d t L β i α i β + ω e φ f sin θ e ω e φ f cos θ e
Here, u α and u β are the stator voltages in the α β stationary coordinate system, i α and i β are the stator currents in the stationary coordinate system, θ e is the rotor position information, and the inductances in the α β coordinate system satisfy Equation (3):
L α = L + Δ L cos 2 θ e L β = L Δ L cos 2 θ e L α β = Δ L sin 2 θ e L = ( L d + L q ) / 2 Δ L = ( L d L q ) / 2
For the surface-mounted permanent magnet synchronous motor, the difference between the reluctance of the quadrature axis and the direct axis is very small, and the difference in the corresponding inductance of the quadrature axis and the direct axis is also very small, so we can assume that L d = L q and obtain Equation (4):
L α = L β = L = L s
So, the model in the α β coordinate system can be obtained, as shown in Equation (5). Here, L s is the stator inductance of the PMSM.
u α u β = R + d d t L s 0 0 R + d d t L s i α i β + ω e φ f sin θ e ω e φ f cos θ e
For subsequent observations, two state variables are defined as follows:
x = L s i α β + φ f cos θ sin θ y = R i α β + u α β
Here, the state variable y only contains the measurable stator current and voltage, and does not contain any values related to the rotor speed and position. Therefore, it is known and its essence is the back electromotive force of the PMSM; x is essentially a state variable of the flux linkage, and the back electromotive force can be obtained by differentiating the state variable x. According to Equations (5) and (6), we can obtain:
d x d t = L s d i α β d t ω e φ f sin θ cos θ = R i α β + u α β + ω e φ f sin θ cos θ ω e φ f sin θ cos θ = y
The state variable x contains the permanent magnet flux linkage and rotor position information, and the estimated flux linkage value can be obtained by integrating y, so the idea of the nonlinear flux linkage model is: the difference between the estimated magnetic flux amplitude and the actual magnetic flux amplitude is used as a compensation term for the estimated magnetic flux component, so the magnetic flux component can be observed. The constructed nonlinear flux linkage model is shown in Equation (8):
d x d t = y + γ 2 · η ( x ) · E r r
In Equation (8), E r r is the difference between the estimated flux linkage and the actual flux linkage:
E r r = φ f 2 η ( x ) 2
η ( x ) is a defined vector function that satisfies Equation (10), and the modulus of this vector function is the magnitude of the flux linkage.
η ( x ) = x L s i α β
γ is the gain of the observer for this nonlinear flux model. By integrating d x d t , the value of the state variable x can be obtained. According to Equation (6), the vector function η ( x ) contains the rotor position information:
cos θ sin θ = 1 φ f ( d x d t d t L s i α β )
Therefore, we can see that the observed rotor electrical angle is as in Equation (12), where x 1 and x 2 are the state variables in the stationary coordinate system α β , respectively.
θ = tan 1 ( x 2 L s i β x 1 L s i α )
The process flow of the nonlinear flux linkage observation model described above is shown in Figure 1.

2.2. Variable Gain Model

In the aforementioned nonlinear flux linkage model, the discrepancy between the estimated flux linkage amplitude and the actual flux linkage amplitude is multiplied by a fixed observer gain. This compensation factor corrects the flux linkage components, gradually bringing them closer to their actual values. To minimize estimation errors, enhance the approximation speed, and improve the convergence of this model, a novel variable gain model is proposed in this paper, which introduces a piecewise linear model (13). This model utilizes the rotor flux as a threshold, enabling the dynamic adjustment of the observer gain γ , based on the flux linkage error value. When the error value surpasses a predefined threshold, the observer gain undergoes dynamic adjustment following a linear relationship. Conversely, if the error value is below the threshold, the observer gradually converges using the initial gain.
γ = k 1 × E r r × γ 0 E r r > k 2 φ 2 γ 0 E r r k 2 φ 2
In Equation (13), k 1 signifies the extent to which the observer gain is affected by the flux linkage error. The parameter k 2 determines the threshold at which the observer gain starts to undergo changes, while γ 0 denotes the initial value of the observer gain. These parameters are determined as follows:
Firstly, k 1 can be set to 0, meaning that the segmented linear model is not used. Parameter scanning and simulation verification of γ 0 are conducted based on the transformation curve of E r r . The goal is to find the value of γ 0 that minimizes E r r as much as possible. Additionally, by examining the relationship between E r r and φ 2 , a suitable k 2 is identified as the boundary point for the error. Once γ 0 and k 2 are determined, parameter scanning and simulation verification of k 1 are performed within the range of E r r > k 2 φ 2 . Based on the error between the observed angles and the actual angles, a suitable k 1 is chosen. When applying this approach to an actual system, further fine-tuning is necessary based on the simulation results.
Figure 2 illustrates the observer gain model before and after optimization.

2.3. Compensation Model of State Variables

In Equations (11) and (12), the state variables x 1 and x 2 include the necessary rotor position information, and the accuracy of the vector function η ( x ) directly affects the precision of the final estimated rotor position. During the system initialization, the permanent magnet synchronous motor operates at zero speed or low speed, resulting in an unstable rotor position. Consequently, the U, V, and W three-phase currents in the PMSM are small. Therefore, the state variables x 1 and x 2 have small values, making the decisive vector function η ( x ) susceptible to fluctuations due to external environmental conditions. This instability leads to inconsistent observed rotor angle values. To address this issue, a compensation model is established in this paper, as shown in Equation (14), to counterbalance the impact of angle fluctuations caused by small amplitudes on the sensorless control algorithm. This compensation model takes half of the flux linkage of the permanent magnet as the threshold condition. When the magnitude of the state variable vector x exceeds the threshold, the state variables x 1 and x 2 are compensated; otherwise, their original values are maintained. Here, k represents the compensation coefficient of the model, and x 1 0 x 2 0 T represents the state variable before compensation. λ determines the threshold point at which compensation is initiated. For k and λ , adjustments need to be made based on the actual system’s motor, controller, and other factors. In our experimental setup, a value of 1.1 for k and 0.5 for λ were found to be effective.
x 1 x 2 = x 1 0 x 2 0 , x 1 0 2 + x 2 0 2 > λ φ f k x 1 0 x 2 0 , x 1 0 2 + x 2 0 2 λ φ f
Figure 3 displays the flow chart of the improved nonlinear flux observation algorithm.

2.4. Fixed-Point Normalization of the Model

With the advancement of technology, an increasing number of sensorless motor control algorithms have emerged. However, it is important to note that, as the position observation algorithm improves, the computational complexity also increases. This places higher performance requirements on microcontrollers and results in increased productization costs. To address these challenges and enable the position observation algorithm to be implemented using hardware circuits on the basis of reducing hardware costs as much as possible, a strategy for approximating the nonlinear flux linkage model is proposed in this paper. By achieving this, the computational complexity can be reduced. Additionally, issues such as precision loss, rounding methods, and overflow during the fixed-point conversion process are considered in the paper. This ensures that the converted algorithm can maintain a certain level of precision and accuracy even when performing calculations using only integer operations. In this paper, fixed-point processing was applied to all the physical quantities involved in the model. In Equation (5), the current in the stationary coordinate system is obtained through the 12-bit precision Analog-to-Digital Converter (ADC) of the microcontroller. Additionally, based on the current sampling circuit diagram adopted, in order to ensure the accuracy of current sampling while minimizing the computational length and preventing overflow, a fixed-point factor of 64 was employed. The mapping relationship between the actual current (floating-point value) 0 : b and the fixed-point value 0 : N is described by Equation (15), where N b represents the fixed-point factor of the current. The fixed-point factor can be dynamically adjusted to achieve the optimal accuracy based on different hardware configurations.
f ( i ) : 0 , b 0 , N f ( i ) = N b i
In the implementation of the model, specific parameters such as inductance, resistance, and flux linkage often have relatively small values. Hence, for these parameters, fixed-point factors were assigned as 2 15 . In this case, the left shift method was used to represent the fixed-point values accurately. The corresponding fixed-point factors for each parameter are provided in Table 1.
In Equation (9), to transform the floating-point formula into an integer calculation, fixed-point factors can be employed as gain multiples on both sides of the equation. Consequently, Equation (9) can be converted into Equation (16), in which E r r _ f i x e d , φ f _ f i x e d , L s _ f i x e d , i α _ f i x e d , and i β _ f i x e d represent the calibrated values of error, magnetic flux, inductance, and current, respectively, on the α β axis.
E r r _ f i x e d = 2 30 · E r r = ( 2 15 · φ f ) 2 [ 2 15 · x 1 ( 2 15 · L s · 64 · i α ) / 64 ] 2 + [ 2 15 · x 2 ( 2 15 · L s · 64 · i β ) / 64 ] 2 = φ f _ f i x e d 2 ( 2 15 · x 1 L s _ f i x e d i α _ f i x e d / 64 ) 2 + ( 2 15 · x 2 L s _ f i x e d i β _ f i x e d / 64 ) 2
According to Equation (5) to Equation (10), by changing the equation into discrete form, we can obtain:
x 1 , 2 = x 1 , 2 + d x 1 , 2 d t = x 1 , 2 R i α β + u α β + γ 2 · ( x 1 , 2 L s i α β ) · E r r
In Equation (16), in order to satisfy the equality, the state variables x 1 and x 2 are multiplied by the fixed-point factor 2 15 , so we need to change Equation (17) into Equation (18), in which R _ f i x e d and u α β _ f i x e d represent the calibrated values of resistance and voltage, respectively, on the α β axis.
According to Equation (5) to Equation (10), by changing the equation into discrete form, we can obtain:
2 15 · x 1 , 2 = 2 15 · x 1 , 2 + 2 15 · d x 1 , 2 d t = 2 15 · x 1 , 2 ( 2 15 · R · 64 · i α β ) / 64 + 2 15 · u α β + γ 2 · 2 15 · x 1 , 2 ( 2 15 · L s · 64 · i α β ) / 64 · E r r _ f i x e d / 2 30 = 2 15 · x 1 , 2 ( R _ f i x e d · i α β _ f i x e d ) / 64 + u α β _ f i x e d + γ 2 · 2 15 · x 1 , 2 ( L s _ f i x e d · i α β _ f i x e d ) / 64 · E r r _ f i x e d / 2 30
Therefore, we can see that, when the algorithm is implemented using hardware circuits, it is necessary to replace R, L s , and φ f with fixed-point values. At the same time, in order to ensure the correctness of the equation, the voltage value of the α β axis is also multiplied by the fixed-point factor. In this way, the whole process of fixed-point nonlinear flux linkage model is completed, thereby avoiding all floating-point operations, greatly improving the operation speed, simplifying the circuit structure, and reducing the complexity of hardware implementation.

3. Circuit Implementation of Algorithm and Design of SOC Architecture

3.1. Hardware Circuit Implementation of Fixed-Point Nonlinear Flux Observer

In order to implement the improved nonlinear magnetic flux observation model in the circuit, it is necessary to first fix all the parameters used according to Table 1, and then transfer the fixed-point values to the nonlinear flux observation circuit, as shown in Figure 4.
Below is an introduction to the computation flow and hardware structure of the nonlinear magnetic flux observer. The computation flow is illustrated in Figure 5 and consists of the following steps:
  • Calculate the error between the estimated magnetic flux and the actual magnetic flux based on the current value and the magnetic flux value of the PMSM;
  • Use the error as a compensation term for the estimated magnetic flux. In the circuit implementation, to ensure the correctness of the fixed-point algorithm, a barrel shifter was used to process the data;
  • Perform integration operation on the state variable x using a set of D flip-flops;
  • Use the Cordic algorithm to perform arctangent calculation, thereby obtaining the rotor position and velocity information.
Figure 5. The circuit diagram of the fixed-point nonlinear flux observer.
Figure 5. The circuit diagram of the fixed-point nonlinear flux observer.
Electronics 12 03160 g005
In order to achieve a faster convergence speed of the observed angle by the aforementioned observer, the hardware circuits for the variable gain model and the compensation model of the state variables described above were simultaneously implemented. Figure 6a illustrates the hardware structure diagram of the variable gain generation module. Firstly, the magnitude of the magnetic linkage error was evaluated, and then the value of the gain γ was selected and adjusted based on the error range. Here, a barrel shifter was also used to perform computations on the coefficients k 1 and k 2 . The shift circuit realized in this way is completely composed of combinational logic. Compared with the shift circuit composed of flip flops, the shift operation in this way is bit-independent and has a faster shift speed.
Figure 6b shows the hardware structure diagram of the compensation circuit for the state variables. Firstly, the magnitude of the squared sum of the original state variables was evaluated, and the compensation coefficient k was calculated using the barrel shifter. Finally, based on the evaluation result, the actual output values of the state variables were selected.

3.2. Design of SOC Architecture

Among the various control algorithms for permanent magnet synchronous motors, field-oriented control (FOC) is the most widely used. The technical approach of FOC involves transforming the three-phase control model of the permanent magnet synchronous motor into a rotating coordinate system through coordinate transformation. This decouples the complex coupled system and allows it to be controlled similar to a DC motor. The block diagram illustrating the principle is shown in Figure 7.
The FOC algorithm mainly consists of modules such as PI speed control, PI current control, Clarke coordinate transformation, Park coordinate transformation, inverse Park coordinate transformation, SVPWM generation, phase current sensing, and rotor position estimation. The ability to achieve a high control precision and low torque ripple depends on the timely update of the complementary PWM applied to the U, V, and W phases with respect to the rotor position. Especially for high-speed PMSM, where the rotor position changes rapidly, this requires the switching speed to be extremely high. As shown in Figure 8, the entire algorithm flow, as depicted in Figure 7, needs to be executed within one PWM cycle T s . Therefore, the efficiency of the algorithm execution determines the control precision. Among the various processes in the FOC algorithm, the position observer, which exhibits an outstanding performance, consumes the longest execution time. Hence, in this paper, the aforementioned nonlinear flux observer was implemented using hardware circuits, while the remaining simpler algorithmic parts were implemented in software and executed on the ARM Cortex-M0 core. This design approach for the SOC takes advantage of both hardware and software implementations, ensuring efficient algorithm execution. Moreover, it allows for the flexibility to add, remove, or modify algorithms as needed through software, enabling high-precision control of the PMSM.
The designed SOC was built based on the ARM Cortex-M0 core and utilizes the AMBA Advanced High-Performance Bus (AHB) and Advanced Peripheral Bus (APB) for data transfer. It includes peripherals such as the AHB to APB bridge, direct memory access (DMA), enhanced PWM (EPWM), nonlinear flux linkage position estimation module, ADC interface, and Universal Asynchronous Receiver/Transmitter (UART) debugging module. To enable the sensorless control of high-speed PMSMs, the EPWM module consists of four independently configurable output channels. It features multiple control/status registers, including pre-scaling registers, preload registers, and repetition count registers. The module also supports complementary channel outputs with programmable dead-time and programmable output polarity. Additionally, it supports multiple interrupts for update, comparison, and braking operations. The system block diagram of the entire SOC is illustrated in Figure 9.

4. Simulation and Implementation Results

4.1. Simulation of the Improved Nonlinear Flux Linkage Model

In order to verify the correctness of the algorithm, a simulation model of the sensorless control system of a PMSM and a nonlinear flux linkage model were built in this paper, which is shown in Figure 10 and is composed of a position observation algorithm module, a state variable compensation module, and a variable gain generation model.
Figure 11a illustrates the observed angle of the improved observer proposed in this paper and the actual angle of the motor rotor when the speed is 1000 rpm. It can be observed that, in the second electrical cycle, the observed angle has essentially converged, indicating that this model has a fast convergence speed and excellent observation performance. Figure 11b presents the difference between the observed and actual angle. It can be seen that, when the observer converges, the error is less than 0.2 rad. Figure 11c displays the sine and cosine values of the observed and actual angle. Figure 11d shows the velocity curve, revealing that the velocity fluctuation is less than 0.5 rpm when the speed stabilizes.
Figure 12a displays the observed angle of the improved observer proposed in this paper and the actual angle of the motor rotor when the speed is 2000 rpm. It can be observed that, in the second electrical cycle, the observed angle has essentially converged. Figure 12b shows the difference between the observed and actual angle. It can be seen that, when the observer converges, the error is less than 0.2 rad. Figure 12c presents the sine and cosine values of the observed and actual angle. Figure 12d shows the velocity curve, revealing that the velocity fluctuation is less than 2 rpm when the speed stabilizes.
Figure 13a demonstrates the angle tracking during a speed switch, while Figure 13b depicts the sudden error variation between the actual and observed angle at the moment of switching. Figure 13c illustrates the sine and cosine values of the observed and actual angle at the switching instant. It can be observed that, during the speed switch, the observed angle quickly adapts to the new speed and gradually increases. The angle error exhibits a slight transient variation but quickly converges, without any significant divergence. This indicates that the improved observer in this paper exhibits a good dynamic response. Figure 13d displays the velocity response curve at the moment of switching.
The advantages and disadvantages of the improved position observation algorithm and other existing algorithms were compared based on the aforementioned simulation results and experimental findings, as shown in Table 2.

4.2. Prototype Verification of SOC on FPGA Platform

In this section, we first synthesized the designed fixed-point nonlinear magnetic flux observer hardware circuit using the Synopsys Design Compiler tool under the SMIC 180 nm process. We then analyzed its area, power consumption, and other relevant information. Table 3 presents some information about the fixed-point nonlinear magnetic flux observer circuit.
Then, we conducted a prototype verification of the SOC using Xilinx FPGA Spartan6 XC6SLX16, which is manufactured by Xilinx Inc. in California, USA, and it was procured through Embedfire company located in Dongguan, China. a three-phase inverter driving circuit, and a surface-mounted permanent magnet synchronous motor, and we implemented the control algorithm of the PMSM on the SOC. Additionally, we made the hardware circuit for the nonlinear magnetic flux observer configurable, allowing us to compare the performance of the control algorithm implemented with the combined software and hardware approach against the control algorithm implemented purely in software. This comparison helped to validate the superiority of the SOC designed in this paper. Table 4 shows the parameters of the constructed experimental platform and the processor core utilized by the SOC.
Figure 14 depicts the constructed experimental platform, which comprises an FPGA development board, a PMSM drive module, an ARM emulator, a Xilinx JTAG downloader, a USB to TTL serial module, an AD acquisition module, and a surface-mounted permanent magnet synchronous motor.
Table 5 presents the utilization of on-board resources during the prototype validation on Xilinx XC6SLX16 FPGA.
Then, the performance of the nonlinear flux observer on the designed SOC was experimentally validated. In this case, the angle and other data were output and saved in real-time using the UART peripheral of the SOC. Subsequently, the data were reprocessed using data analysis software, and the angles were mapped from the range [ 0 , 2 π ] to [ 0 , 65536 ] . Figure 15a illustrates the experimental curves of the observed angles and actual angles during speed variations at 1000 rpm and 2000 rpm. The actual angles were obtained using Hall sensors. Figure 15b presents the sine and cosine values of the observed and actual angles. Figure 15c displays the error between the observed and actual angles. The experimental results demonstrate the excellent observation performance of the improved position observer and also verify the correctness of the SOC’s functionality.
To validate the stability of the system, experimental testing was conducted at zero and low speeds. Figure 16a illustrates the curves of observed angles and actual angles as the motor goes from a stationary state to 200 rpm without using the compensation model. It can be observed that, at zero and low speeds, due to low currents and environmental disturbances, the observed angles fail to converge for a considerable period of time. Figure 16b presents the curve of observed angles when the compensation model is utilized. It is evident that the observed angles reach a convergent state within the second electrical cycle. The experimental results demonstrate that the compensation model significantly improves the stability of the system at zero and low speeds.
Additionally, to prevent possible over-current during startup and speed transitions, a soft-start and soft-stop strategy was implemented. This strategy gradually increases or decreases the motor current and speed to ensure a smooth startup and shutdown process. Closed-loop control was also employed by providing feedback on the motor current. Furthermore, the observed angle of the position observer was continuously monitored. If any abnormal angle deviation is detected, a protective mechanism is triggered to mitigate the risk of over-current, thereby ensuring the stability and reliability of the system.
To validate the high efficiency of the designed SOC in this paper, three comparative experiments were conducted. Table 6 displays the execution efficiency of PMSM control using the designed SOC with a core frequency of 48 MHz, compared to using other general-purpose microcontrollers for PMSM control. The comparison reveals a 30.3% reduction in algorithm execution time. This is because the most computationally intensive component in the entire control algorithm, the nonlinear flux observer, was implemented in parallel using hardware circuits in the designed SOC, thereby significantly reducing the processing time required by software. Consequently, the highest PWM control frequency supported by the designed SOC increased by approximately 19 KHz. Under the same cost constraints, compared to ordinary microcontrollers, it enables the control of PMSMs operating at higher speeds. Furthermore, as the other control algorithms, apart from the position observer, are still implemented in the software, the designed SOC enhances computational efficiency at the hardware level while allowing for flexible modifications to the control algorithm at the software level. This represents a major innovation in the field of PMSM control systems.

5. Conclusions

In this paper, the nonlinear flux position observer was analyzed, and a variable gain model and a compensation model for the state variables were proposed. The improved position observer demonstrates an excellent observation performance, reaching a convergent state after one electrical cycle since its activation. The error between the observed and actual angle is less than 0.2 rad, with an error fluctuation of less than 0.05 rad. When the target velocity switches, the observed angle does not exhibit significant divergence and quickly converges. Additionally, fixed-point processing was performed on the improved algorithm, and the circuit was implemented and synthesized using the SMIC 180 nm process. Next, an SOC was designed based on the ARM Cortex-M0 core, and the aforementioned nonlinear flux position observer circuit was incorporated as a hardware IP of the SOC. We validated the SOC prototype on a Xilinx FPGA. The experiments indicate that the designed SOC balances the high efficiency of hardware implementation with the flexibility of software implementation. When running a sensorless control algorithm for a PMSM, it achieves a 30.3% increase in execution efficiency.
Therefore, significant improvements in accuracy and stability are achieved by the newly proposed nonlinear flux observer in this study, filling the research gap in the field of nonlinear flux observer for position estimation. Furthermore, addressing the lack of high-performance motor controllers, this study introduced a sensorless control SOC specifically designed for high-speed PMSMs, which combines software and hardware to control the motor. This approach enhances the convergence of the observer angles and improves the efficiency of algorithm execution. The contribution fills the research gap in high-speed PMSM control systems, specifically in terms of control efficiency and accuracy, and provides a new solution for high-performance motor control in practical applications. In the future, this work is intended to be expanded as follows:
  • The improved position observer and the designed SOC will be subjected to extensive experimental validation to expand their application scope in different domains;
  • Research will be conducted on how to further reduce the complexity and cost of hardware circuits to achieve a more efficient and cost-effective motor control system.

Author Contributions

Conceptualization, M.W.; methodology, C.H.; software, S.X.; validation, B.Y. and Z.W.; writing—original draft preparation, C.H.; writing—review and editing, C.H. and S.X.; project administration, S.X., C.H., Z.W. and B.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PMSMPermanent Magnet Synchronous Motor
SOCSystem-On-Chip
FPGAField Programmable Gate Array
PWMPulse Width Modulation
DSPDigital Signal Processor
ADCAnalog-to-Digital Converter
FOCField-Oriented Control
DMADirect Memory Access
EPWMEnhanced Pulse Width Modulation
AHBAdvanced High-Performance Bus
APBAdvanced Peripheral Bus
UARTUniversal Asynchronous Receiver/Transmitter

References

  1. Bobtsov, A.; Pyrkin, A.; Ortega, R.; Vedyakov, A.; Sinetova, M. Sensorless control of the levitated ball. IFAC-PapersOnLine 2019, 52, 274–279. [Google Scholar] [CrossRef]
  2. Ren, N.; Fan, L.; Zhang, Z. Sensorless pmsm control with sliding mode observer based on sigmoid function. J. Electr. Eng. Technol. 2021, 16, 933–939. [Google Scholar] [CrossRef]
  3. Urbanski, K.; Janiszewski, D. Sensorless Control of the Permanent Magnet Synchronous Motor. Sensors 2019, 19, 3546. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  4. Tang, Y.; Xu, W.; Liu, Y.; Dong, D. Dynamic Performance Enhancement Method Based on Improved Model Reference Adaptive System for SPMSM Sensorless Drives. IEEE Access 2021, 9, 135012–135023. [Google Scholar] [CrossRef]
  5. Barut, M.; Bogosyan, S.; Gokasan, M. Experimental Evaluation of Braided EKF for Sensorless Control of Induction Motors. IEEE Trans. Ind. Electron. 2008, 55, 620–632. [Google Scholar] [CrossRef]
  6. Quang, N.K.; Hieu, N.T.; Ha, Q.P. FPGA-Based Sensorless PMSM Speed Control Using Reduced-Order Extended Kalman Filters. IEEE Trans. Ind. Electron. 2014, 61, 6574–6582. [Google Scholar] [CrossRef]
  7. Hussain, S.; Bazaz, M.A. Sensorless control of PMSM using Extended Kaiman filter with Sliding mode controller. In Proceedings of the 2014 IEEE International Conference on Power Electronics, Drives and Energy Systems (PEDES), Mumbai, India, 16–19 December 2014. [Google Scholar] [CrossRef]
  8. 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]
  9. Chen, Z.; Tomita, M.; Doki, S.; Okuma, S. An extended electromotive force model for sensorless control of interior permanent-magnet synchronous motors. IEEE Trans. Ind. Electron. 2003, 50, 288–295. [Google Scholar] [CrossRef]
  10. Tomita, M.; Doki, S.; Okuma, S. A position-and-velocity sensorless control for brushless dc motors with an adaptive sliding observer. IEEJ Trans. Sens. Micromach. 2008, 115, 765–774. [Google Scholar] [CrossRef] [Green Version]
  11. Yuan, J.; Wu, Z.; Yu, J.; Tan, M. Sliding Mode Observer-Based Heading Control for a Gliding Robotic Dolphin. IEEE Trans. Ind. Electron. 2017, 64, 6815–6824. [Google Scholar] [CrossRef]
  12. Deng, H.; Li, Q.; Chen, W.; Zhang, G. High-Order Sliding Mode Observer Based OER Control for PEM Fuel Cell Air-Feed System. IEEE Trans. Energy Convers. 2018, 33, 232–244. [Google Scholar] [CrossRef]
  13. Huang, Z.Y.; Zheng, X. Research on sensorless control of pmsm based on sliding mode observer. Appl. Mech. Mater. 2014, 668-669, 637–640. [Google Scholar] [CrossRef]
  14. Dilys, J.; Stankevič, V.; Łuksza, K. Implementation of Extended Kalman Filter with Optimized Execution Time for Sensorless Control of a PMSM Using ARM Cortex-M3 Microcontroller. Energies 2021, 14, 3491. [Google Scholar] [CrossRef]
  15. Corley, M.J.; Lorenz, R.D. Rotor position and velocity estimation for a salient-pole permanent magnet synchronous machine at standstill and high speeds. IEEE Trans. Ind. Appl. 1998, 34, 784–789. [Google Scholar] [CrossRef] [Green Version]
  16. Wang, Z.; Guo, Q.; Xiao, J.; Liang, T.; Lin, Z.; Chen, W. High-Frequency Square Wave Injection Sensorless Control Method of IPMSM Based on Oversampling Scheme. World Electr. Veh. J. 2022, 13, 217. [Google Scholar] [CrossRef]
  17. Repecho, V.; Bin Waqar, J.; Biel, D.; Doria-Cerezo, A. Zero Speed Sensorless Scheme for Permanent Magnet Synchronous Machine Under Decoupled Sliding-Mode Control. IEEE Trans. Ind. Electron. 2022, 69, 1288–1297. [Google Scholar] [CrossRef]
  18. Li, Y.D.; Wang, X.W.; Hu, W. Sensorless control of pmsm based on low-frequency current signal injection in the direct axis at low and zero speed. Appl. Mech. Mater. 2012, 143–144, 103–107. [Google Scholar] [CrossRef]
  19. Tejan, K.V.; Pindoriya, R.M.; Rajpurohit, B.S. Rotor Position Sensorless Technique using High-Speed Sliding Mode Observer for PMSM Drive. In Proceedings of the 2021 IEEE Industry Applications Society Annual Meeting (IAS), Vancouver, BC, Canada, 10–14 October 2021. [Google Scholar] [CrossRef]
  20. Wang, Z.; Du, D.; Yu, Q.; Zhang, H.; Li, C.; Guo, L.; Gu, X.; Li, X. Sensorless Control Method of High-Speed Permanent Magnet Synchronous Motor Based on Discrete Current Error. World Electr. Veh. J. 2023, 14, 69. [Google Scholar] [CrossRef]
  21. Lee, J.; Hong, J.; Nam, K.; Ortega, R.; Praly, L.; Astolfi, A. Sensorless Control of Surface-Mount Permanent-Magnet Synchronous Motors Based on a Nonlinear Observer. IEEE Trans. Power Electron. 2010, 25, 290–297. [Google Scholar] [CrossRef] [Green Version]
  22. Bernard, P.; Praly, L. Robustness of rotor position observer for permanent magnet synchronous motors with unknown magnet flux. IFAC-PapersOnLine 2017, 50, 15403–15408. [Google Scholar] [CrossRef]
  23. Qi, H.; Gong, C.S. Design and research of PMSM control system based on FPGA. Adv. Mater. Res. 2011, 291–294, 2875–2881. [Google Scholar] [CrossRef]
  24. Luo, Y.C.; Zheng, H.H.; Lin, C.H.; Kuo, Y.P. Field-oriented controlled permanent magnet synchronous motor drive with dynamic-parameter speed controller based on generalized regression neural network. Sens. Mater. Int. J. Sens. Technol. 2021, 6, 33. [Google Scholar] [CrossRef]
  25. Yang, H.; Yang, R.; Hu, W.; Huang, Z. FPGA-Based Sensorless Speed Control of PMSM Using Enhanced Performance Controller Based on the Reduced-Order EKF. IEEE J. Emerg. Sel. Top. Power Electron. 2021, 9, 289–301. [Google Scholar] [CrossRef]
  26. Dong, H.; Xiao, M.; Li, Z.; Zhang, S.; Chen, J. FPGA-Based High-Performance Double-Loop PDF Control Strategy for PMSM. IEEE Access 2021, 9, 59822–59834. [Google Scholar] [CrossRef]
  27. Gu, Q.; Li, Y.S.; Niu, P.; Sun, J. Optimized design of soc-based control system for multi-axis drive. Elektronika ir Elektrotechnika 2014, 20, 15–22. [Google Scholar] [CrossRef] [Green Version]
  28. Ma, z.; Zhang, X. FPGA Implementation of Sensorless Sliding Mode Observer With a Novel Rotation Direction Detection for PMSM Drives. IEEE Access 2018, 6, 55528–55536. [Google Scholar] [CrossRef]
  29. He, L.; Wang, F.; Wang, J.; Rodríguez, J. Zynq Implemented Luenberger Disturbance Observer Based Predictive Control Scheme for PMSM Drives. IEEE Trans. Power Electron. 2020, 35, 1770–1778. [Google Scholar] [CrossRef]
Figure 1. Flow chart of nonlinear flux observer.
Figure 1. Flow chart of nonlinear flux observer.
Electronics 12 03160 g001
Figure 2. Observer gain model before and after improvement.
Figure 2. Observer gain model before and after improvement.
Electronics 12 03160 g002
Figure 3. Flow chart of the improved nonlinear flux observation algorithm.
Figure 3. Flow chart of the improved nonlinear flux observation algorithm.
Electronics 12 03160 g003
Figure 4. Fixed-point processing and transmission of parameters.
Figure 4. Fixed-point processing and transmission of parameters.
Electronics 12 03160 g004
Figure 6. Improved hardware structure of the circuit. (a) Variable gain model; (b) Compensation model of the state variable.
Figure 6. Improved hardware structure of the circuit. (a) Variable gain model; (b) Compensation model of the state variable.
Electronics 12 03160 g006
Figure 7. Flow chart of Field-Oriented Control (FOC) algorithm.
Figure 7. Flow chart of Field-Oriented Control (FOC) algorithm.
Electronics 12 03160 g007
Figure 8. PWM waveform diagram.
Figure 8. PWM waveform diagram.
Electronics 12 03160 g008
Figure 9. System block diagram of the System-on-Chip (SOC).
Figure 9. System block diagram of the System-on-Chip (SOC).
Electronics 12 03160 g009
Figure 10. Simulation model of nonlinear flux observer.
Figure 10. Simulation model of nonlinear flux observer.
Electronics 12 03160 g010
Figure 11. Simulation verification at 1000 rpm. (a) Observed angle and actual angle; (b) Error between observed angle and actual angle; (c) Sine and cosine values of the observed angle; (d) Velocity curve.
Figure 11. Simulation verification at 1000 rpm. (a) Observed angle and actual angle; (b) Error between observed angle and actual angle; (c) Sine and cosine values of the observed angle; (d) Velocity curve.
Electronics 12 03160 g011
Figure 12. Simulation verification at 2000 rpm. (a) Observed angle and actual angle; (b) Error between observed angle and actual angle; (c) Sine and cosine values of the observed angle; (d) Velocity curve.
Figure 12. Simulation verification at 2000 rpm. (a) Observed angle and actual angle; (b) Error between observed angle and actual angle; (c) Sine and cosine values of the observed angle; (d) Velocity curve.
Electronics 12 03160 g012
Figure 13. Simulation verification switching from 1000 rpm to 2000 rpm. (a) Observed angle and actual angle; (b) Error between observed angle and actual angle; (c) Sine and cosine values of the observed angle; (d) Velocity curve.
Figure 13. Simulation verification switching from 1000 rpm to 2000 rpm. (a) Observed angle and actual angle; (b) Error between observed angle and actual angle; (c) Sine and cosine values of the observed angle; (d) Velocity curve.
Electronics 12 03160 g013
Figure 14. Experimental platform.
Figure 14. Experimental platform.
Electronics 12 03160 g014
Figure 15. Experimental results at 1000 rpm and 2000 rpm. (a) Observed angle and actual angle; (b) Sine and cosine values; (c) Error between observed angle and actual angle.
Figure 15. Experimental results at 1000 rpm and 2000 rpm. (a) Observed angle and actual angle; (b) Sine and cosine values; (c) Error between observed angle and actual angle.
Electronics 12 03160 g015
Figure 16. Experimental results at zero and low speed. (a) Without compensation model; (b) With compensation model.
Figure 16. Experimental results at zero and low speed. (a) Without compensation model; (b) With compensation model.
Electronics 12 03160 g016
Table 1. Fixed-point factors for each parameter.
Table 1. Fixed-point factors for each parameter.
ParameterFixed-Point Factor N b
Voltage 2 15
Current64
Inductance 2 15
Resistance 2 15
Flux linkage 2 15
Table 2. The advantages and disadvantages of different algorithms.
Table 2. The advantages and disadvantages of different algorithms.
ProposedPaper [11,12,13]Paper [21]
Stability at zero–low speedGood stabilityPoor stabilityDecent stability
Suitable for both low and high speedsSuitableUnsuitableSuitable
Accuracy of observation angleHigh accuracyHigh accuracyHigh accuracy
Convergence rate of the angleFastSlowModerate
Table 3. Hardware circuit specification of fixed-point nonlinear flux observer.
Table 3. Hardware circuit specification of fixed-point nonlinear flux observer.
Area ( μ m 2 )Power (mW)Delay (ns)
dynamic powerStatic Power
1,354,487.39116.07220.001320.4
Table 4. Parameters of the experimental platform.
Table 4. Parameters of the experimental platform.
ParameterValues
Frequency48 MHZ
FPGAXC6SLX16
Inductance238 uH
Resistance0.632 Ω
Flux linkage0.175 Wb
Pole pairs5
Core of SOCARM Cortex-M0
Table 5. The utilization of on-board resources.
Table 5. The utilization of on-board resources.
Logic UtilizationUsedAvailableUtilization
Number of slice registers291718,22416%
Number of slice LUTs7630911283%
Number of fully used LUT-FF pairs1132941512%
Number of bonded IOBs3723215%
Number of block RAM/FIFO203262%
Number of BUFG/BUFGCTRLs21612%
Number of DSP48A1s3329%
Table 6. The algorithm execution efficiency of the designed SOC compared with the algorithm execution efficiency without SOC.
Table 6. The algorithm execution efficiency of the designed SOC compared with the algorithm execution efficiency without SOC.
NumberNOT SOC ( μ s)SOC ( μ s)Optimization Rate (%)Average (%)
122.87515.87530.6
222.7515.87530.230.3
322.87516.00030.1
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

He, C.; Xu, S.; Yan, B.; Wang, Z.; Wang, M. A Fixed-Point Position Observation Algorithm and System-on-Chip Design Suitable for Sensorless Control of High-Speed Permanent Magnet Synchronous Motor. Electronics 2023, 12, 3160. https://doi.org/10.3390/electronics12143160

AMA Style

He C, Xu S, Yan B, Wang Z, Wang M. A Fixed-Point Position Observation Algorithm and System-on-Chip Design Suitable for Sensorless Control of High-Speed Permanent Magnet Synchronous Motor. Electronics. 2023; 12(14):3160. https://doi.org/10.3390/electronics12143160

Chicago/Turabian Style

He, Changjun, Shiyun Xu, Bosong Yan, Zhenhua Wang, and Mingjiang Wang. 2023. "A Fixed-Point Position Observation Algorithm and System-on-Chip Design Suitable for Sensorless Control of High-Speed Permanent Magnet Synchronous Motor" Electronics 12, no. 14: 3160. https://doi.org/10.3390/electronics12143160

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