摘 要:该文首先移植uC/OSⅡ到STM32F103型MCU中。然后,为了保证内核的运行效率,在设定uC/OSⅡ内核的时钟节拍为1 ms的情况下,采用STM32F103的快速中断完成永磁同步电动机矢量控制系统以100 μs为周期的电流环。最后,实现了矢量控制系统多个用户任务的设计。系统运行表明,在uC/OSⅡ内核节拍中断为1 ms的情况下,以100 μs为电流环周期中断的矢量控制系统运行情况良好。 关键词:实时内核;矢量控制;时钟节拍;快速中断
Abstract: uC/OS-Ⅱ is a pre-emptive low-cost priority-based real time multitasking operating system kernel portable to various microprocessors, written mainly in the C programming language. It is mainly intended for use in embedded systems. To guarantee the efficiency, the heart tick of uC/OS-Ⅱ kernel is usually about some millimeter seconds. However, modern PMSM field oriented control systems always employ two to three closed-loops to achieve satisfied operation results and the period of inner closed-loop (current loop) is usually 100μs. Thus, the methodology of coordinating such different time based was presented in this paper. Firstly, the uC/OS-Ⅱ is portable to STM32F103 with 1ms heart tick. Then the 100μs current loop period is implemented by using fast interrupt of STM32F103. Last, all the user application software was designed as different tasks. And the experimental results show that the field oriented control system based on uC/OS-Ⅱ kernel yields satisfied operational results. Key Words: Real time kernel, Field oriented control, Heart tick, Fast interrupt |