High torque permanent magnet synchronous motor drive system based on STM32 microcontroller

Publisher:等放假的LwjLatest update time:2013-02-23 Source: 21IC Keywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

The high-torque permanent magnet synchronous motor direct drive eliminates the disadvantages of low efficiency, frequent maintenance, large noise and rotational inertia caused by the mechanical structure by removing the complex mechanical transmission mechanism. It has a series of outstanding advantages such as high efficiency, low vibration and noise, high precision, fast response, and convenient use and maintenance [1]. In recent years, with the development of power electronics technology, permanent magnet materials, motor design and manufacturing technology, sensor technology, control theory, etc., high-torque permanent magnet synchronous motors have been more and more widely used in high-performance systems such as CNC machine tools, mining machinery, port machinery, etc. [2-3].

AC motor control systems widely use single-chip microcomputers, DSPs, and FPGAs as the core of the control system. STM32 is a new 32-bit flash microcontroller based on the ARM Cortex-M3 core. It uses the high-performance, high-code density Thumb-2 instruction set and tightly coupled nested vector interrupt controller, has a rich peripheral interface, and has the advantages of high performance, low cost, and low power consumption [4]. This paper designs a high-performance, low-cost control system for a large-torque permanent magnet synchronous motor drive system for port machinery using the STM32 + IPM hardware architecture.

1. Vector Control Principle of High Torque Permanent Magnet Synchronous Motor

Ignoring the core saturation, eddy current and hysteresis loss of the motor, and ignoring the influence of leakage flux, the voltage, flux linkage and torque equations of the large torque permanent magnet synchronous motor are respectively:

High torque permanent magnet synchronous motor drive system based on STM32

ψd, ψq, ud, uq, id, iq, Ld, Lq are the flux, voltage, current and inductance of the d and q axes of the permanent magnet synchronous motor respectively, Rs is the armature winding resistance, ωr is the rotor angular velocity, ψf is the flux generated by the permanent magnet that interlinks with the rotor, Te is the electromagnetic torque, and Pn is the number of motor pole pairs.

According to formula (3), control id = 0 to make the stator current vector located on the q axis. At this time, the torque Te and iq are linearly related, realizing the decoupling control of the electromagnetic torque. As shown in Figure 1, the permanent magnet synchronous motor in this paper adopts speed and current dual closed-loop control. In the figure, ω* is the given speed command, ω is the speed feedback, the speed error is input into the speed controller, and the quadrature axis current command i*q is output. Through the current PI controller and coordinate transformation, the IPM switching signal is generated by SVPWM.

Figure 1 High torque permanent magnet synchronous motor control principle block diagram

Figure 1 High torque permanent magnet synchronous motor control principle block diagram

2 System Design

Figure 2 shows the block diagram of the system structure. This paper uses STM32F103VCH6 main control chip and PM800HSA120 intelligent power module as the core of the system. The hardware control system mainly includes: processor module; detection module, mainly including Hall current detection and resolver interface circuit; main circuit, mainly composed of rectification, soft start, filtering, braking circuit, and PM800HSA120 and its drive, protection, and absorption circuit; switching power supply and other modules, mainly composed of multi-channel DC/DC conversion, DC bus voltage protection, temperature detection protection and other circuits.

Figure 2 High torque permanent magnet synchronous motor hardware system structure block diagram

Figure 2 High torque permanent magnet synchronous motor hardware system structure block diagram

2.1 Hardware system design

2.1.1 Processor module

STM32F103VCH6 is a new 32-bit flash microcontroller based on ARM's Cortex-M3 core. It has a three-stage pipeline and branch prediction function, and a maximum operating frequency of 72 MHz, which can meet the processing speed and real-time requirements of this system. It has two high-performance 12-bit 16-channel A/D converters, two 16-bit embedded dead zone control 6-PWM timers designed specifically for motor drive, and a variety of peripherals and interfaces such as SPI and USB 2.0 are integrated on the chip [5]. As shown in Figure 2, this system makes full use of the on-chip resources of STM32, using it to receive and process feedback signals such as current and position, receive and process various error protection signals, and execute motor control algorithms. [page]

2.1.2 Detection module

The detection module mainly includes current detection circuit and position detection circuit. The current detection adopts Lime current type Hall sensor.

LT308-S7 has the advantages of strong anti-interference ability, high sensitivity, good linearity, and small temperature drift. In order to reduce the detection error when the current is weak, this paper designs a current detection circuit with adjustable gain as shown in Figure 3. The current signal output by the sensor is converted into a voltage signal Vi after being sampled by a precision resistor. After passing through a voltage follower circuit, a three-stage amplifier circuit, and a Schottky diode clamp circuit, the output voltage Vo (Vo = 3nVi / 20 + 1. 5, n is the amplification factor) is sent to the A/D module of STM32 for processing. Among them, the switch chip DG403 is controlled by STM32 to adjust the gain of the current detection circuit. A large gain is selected for a small current, and vice versa for a large current. Since the rated current of a high-torque motor can reach 232 A, if the gain of the detection circuit is not adjustable, the amplification gain of the detection circuit is relatively small when the current is weak, and the current detection accuracy will be reduced. The use of a gain-adjustable detection circuit can increase the gain when the current is weak, thereby reducing the detection error and improving the resolution of current detection.

Table 1 shows the corresponding relationship between the DG403 control signal and the gain amplification factor of the current detection circuit.

Table 1 DG403 control signal and gain amplification factor correspondence table

Table 1 DG403 control signal and gain amplification factor correspondence table

Considering the strong vibration and impact of port machinery [6], this paper uses the resolver YS210XFDW9574A for position detection. Its decoding circuit is shown in Figure 4. The AD2S99 chip is used to provide the excitation signal for the resolver, and the AD2S90 chip is used as the resolver/digital converter (RDC). The AD2S90 communicates with the control chip STM32 in synchronous serial mode (SPI). The frequency of the excitation signal source of the AD2S99 can be set through the SEL1, SEL2, and FBIAS pins. Here, the excitation frequency is set to 10 KHz. The output signal SYNREF generated by the internal processing of the AD2S99 is connected to the REF pin of the AD2S90, which can compensate for the phase deviation from the primary side to the secondary side of the resolver and ensure its conversion accuracy.

Figure 3 Current detection circuit

Figure 3 Current detection circuit

Figure 4: Resolver decoding circuit

Figure 4: Resolver decoding circuit

[page]

Figure 5 shows the rotary transformer excitation conditioning circuit. The rotary transformer excitation signal is provided by AD2S99. The excitation conditioning circuit amplifies and filters the excitation signal. The external power supply of the excitation conditioning circuit adopts ± 15 V dual power supply to ensure the circuit static operating point zero adjustment; Ci1 is a coupling capacitor, which isolates DC and passes AC; Cf1 is used for phase compensation; NPN and PNP transistors form a push-pull circuit to eliminate crossover distortion.

Figure 5: Rotary transformer excitation conditioning circuit

Figure 5: Rotary transformer excitation conditioning circuit

2.1.3 Main circuit

The rectifier circuit of the main circuit uses the DD600N12 rectifier module; the soft start circuit uses the CM600HU-24F IGBT power switch to replace the relay to improve the system reliability. When the capacitor bank is charged to 80% of the rated voltage of the busbar, the IGBT is connected to the circuit; 16 6800 μF electrolytic capacitors are selected for the filter circuit; the CM400HU-24F IGBT is selected as the switching element for the brake circuit. Considering the interference, heat dissipation and economy of high-current power devices, the inverter circuit scheme of the 6-unit IPM module PM800HSA120 is selected. PM800HSA120 has an integrated drive and protection circuit, with overvoltage, undervoltage and temperature protection functions, a rated current of 800 A, a reverse bias voltage of 1200 V, and an operating frequency of up to 20 kHz. In order to further improve the anti-interference and reliability of the IPM, this paper strengthens the design of its drive circuit and protection circuit and performs some additional processing. As shown in Figure 6, the IPM drive signal is differentially processed, and the six-way drive signal sent by the control chip STM32 is converted into 12-way signals using a differential drive chip, and then restored to 6-way drive signals using a differential receiving chip on the IPM drive board, and then sent to the IPM after being isolated and driven by a high-speed optical coupler, as shown in Figure 7, to suppress common-mode interference signals and enhance the anti-interference performance of the IPM drive signal. Figure 7 (a) shows the isolated drive circuit of the W phase; the three-phase upper bridge arm is powered by an isolated power supply, and the three-phase lower bridge arm is powered by a 15 V power supply. Figure 7 (b) shows the W phase upper bridge arm isolated power supply circuit.

The fault signal processing circuit of IPM is shown in Figure 8. The error signal is first isolated and filtered by an optocoupler, and then passes through an inverting Schmitt trigger. On the one hand, the voltage signal is reversed, and on the other hand, the error signal is waveform-shaped, which has a certain inhibitory effect on the interference signal. Finally, the processed IPM error signal is input into the control chip STM32 for corresponding processing.

Figure 8 IPM error signal processing circuit

Figure 8 IPM error signal processing circuit

Since the switching frequency of IPM is high and there is parasitic inductance in the power circuit, a high surge voltage will be generated during the IPM switching process, causing impact on the device and affecting the performance and service life of the device. For this reason, an IPM buffer circuit as shown in Figure 9 is designed to reduce the voltage and current spikes during the IPM opening and closing process, thereby reducing the switching loss of the device and protecting the safe operation of the device. Among them, the ultra-fast recovery diode RM25HG-24S is selected as the buffer diode, which has a withstand voltage of 1200 V and a maximum reverse recovery time of 300 ns; considering the driving current frequency of this system and the performance of the IPM itself, the IPM operating frequency is selected as 8 KHz, and the DC bus parasitic inductance is taken as 50 nH. According to calculations and experiments, the buffer capacitor Cs = 3 μF and the buffer resistor Rs = 12 Ω are finally selected.

Figure 9 IPM buffer circuit

Figure 9 IPM buffer circuit

[page]

2.2 System software design

The system software is mainly composed of the main program and the interrupt service program. The main program completes the initialization of various software and hardware, motor initial position detection and motor start-up, etc. The interrupt service program includes the PWM interrupt subroutine and the external interrupt protection subroutine. The PWM interrupt subroutine is the core of the control system, which mainly completes the acquisition and processing of rotor current and speed, PID adjustment, calculation and selection of voltage vector, PWM generation, etc. The external interrupt subroutine mainly includes bus voltage over-voltage, under-voltage protection, startup protection and temperature protection. When the IPM has an error signal, the STM32 controls the TIM1_BKIN signal of the advanced control timer to prohibit PWM output to ensure the safety of the system. Figure 10 is the flow chart of the PWM interrupt service program.

Figure 10 PWM interrupt service routine

Figure 10 PWM interrupt service routine

3 Experimental Results

As shown in Figure 11, the STM32 control board and IPM driver board of the permanent magnet synchronous motor control system designed in this paper are real objects. Unit and system experiments were carried out on a high-torque permanent magnet synchronous motor with a rated power of 132 kW, a rated current of 232 A, and an input voltage of 380 V. Figure 12 shows the PWM waveform of the upper and lower bridge arms of the W phase, and the test PWM frequency is 8 KHz (cycle 125 μs); Figure 13 shows the current waveform of the W phase when the motor is running at no load, indicating that the software and hardware modules of the control system can operate effectively.

Figure 11 Control circuit

4 Conclusion

This paper proposes a control system for a large-torque permanent magnet synchronous motor based on STM32. The STM32 processor module, gain-adjustable current detection circuit, resolver interface circuit, IPM drive protection circuit, etc. are designed. The vector control method is used to realize the speed and torque control of the permanent magnet synchronous motor, and experimental verification is carried out, providing a stable, reliable and cost-effective solution for the drive control of large-torque permanent magnet synchronous motors.

Keywords:STM32 Reference address:High torque permanent magnet synchronous motor drive system based on STM32 microcontroller

Previous article:Design of industrial circulating water polarization control system based on STM32 microcontroller
Next article:Some suggestions for newcomers switching from 51 to ARM

Recommended ReadingLatest update time:2024-11-16 15:36

stm32 pwm implementation process
If you want to output PWM pulses from a certain IO port, the corresponding work is as follows: 1. A timer is needed to implement periodic cycle counting 2. Set the comparison value for each cycle to achieve the duty cycle 3. Configure the PWM multiplexing function of a certain IO flavor timer For example: To impleme
[Microcontroller]
Design and implementation of China Mobile Multimedia Broadcasting Intelligent Network Monitoring System
With the extensive application of high-speed bus and radio frequency technology, the design of electronic circuits is becoming increasingly complex. In addition to traditional analog and digital circuit testing, oscilloscopes have added more and more test capabilities to meet the growing demand for testing. At this ye
[Test Measurement]
Design and implementation of China Mobile Multimedia Broadcasting Intelligent Network Monitoring System
CAN bus communication study notes based on STM32
This article briefly introduces the concepts related to the CAN bus, communication protocols and other knowledge, and uses the bxCAN peripheral that comes with STM32 to perform CAN bus programming experiments, as well as programming experience. 1. Brief introduction to CAN bus 概念:CAN是控制器局域网络(Controller Area Network,
[Microcontroller]
CAN bus communication study notes based on STM32
STM32:STM32 learning record 6: IWDG
Configuration process: 1: System clock initialization, including the system clock and the clock configuration of the IO port or function to be opened. 2: IO port initialization, including pins, rates, input and output modes, etc. 3: Initialize the watchdog. Notice: Pay attention to how you feed your dog!!! #
[Microcontroller]
STM32 learning - FLASH operation and use
Flash operation: The large-capacity flash of stm32 is not only used to store program code, but also to store some data and system user parameters. The program code is generally saved in the area starting from the flash, and the remaining area space can be used to store user data (the size depends on the size of the fl
[Microcontroller]
STMicroelectronics is working with AWS and Microsoft to help STM32U5 enable more secure IoT development
STMicroelectronics is strengthening its collaboration with Amazon (AWS) and Microsoft to expand the Internet of Things. On AWS, ST provides a reference that makes it easier and more secure to connect IoT (Internet of Things) devices (STM32U5) to the AWS cloud. At the same time, STMicroelectronics is working with Micro
[Microcontroller]
The power-on program does not run due to NVIC_Init in STM32
Recently, I encountered a strange problem when running multitasking on STM32 using ucosii. I used 4 serial ports. As the program grew larger, it did not run after power-on. I used an LED flashing to indicate the running, and there was no problem using STLINK for debugging, but it did not work after powering on again,
[Microcontroller]
A single-channel oscilloscope based on STM32 was successfully produced
Finally, I made an oscilloscope based on STM32! I originally wanted to use an external high-speed AD to make an oscilloscope with a 1Mhz sampling rate. Since I had no experience in making oscilloscopes and no ready-made ICs, I first used the 12-bit AD inside the STM32 to make a simple oscilloscope. I will practice m
[Microcontroller]
A single-channel oscilloscope based on STM32 was successfully produced
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号