Motor real-time control platform and development method

文档序号:1938068 发布日期:2021-12-07 浏览:13次 中文

阅读说明:本技术 一种电机实时控制平台及开发方法 (Motor real-time control platform and development method ) 是由 文宇良 梅文庆 史世友 李程 李益 王成杰 付建国 周斌 谭磊 于 2020-06-03 设计创作,主要内容包括:本发明提供一种电机实时控制平台及开发方法,所述电机实时控制平台,在多核处理器中实现,所述多核处理器至少包括第一ARM核、第二ARM核及FPGA核,所述电机实时控制平台包括:上位机系统,在所述第一ARM核运行,用于运行实时通信应用;电机实时控制系统,在所述FPGA核运行,用于执行预设电机控制算法;实时操作系统,在所述第二ARM核运行,用于控制所述实时通信应用及所述电机实时控制系统的运行。解决了多片处理器增加了系统的设计复杂度和开发成本,最终使得整个控制系统运行不够高效,调试复杂的问题。(The invention provides a motor real-time control platform and a development method, wherein the motor real-time control platform is realized in a multi-core processor, the multi-core processor at least comprises a first ARM core, a second ARM core and an FPGA core, and the motor real-time control platform comprises: the upper computer system runs on the first ARM core and is used for running real-time communication application; the motor real-time control system runs in the FPGA core and is used for executing a preset motor control algorithm; and the real-time operating system runs on the second ARM core and is used for controlling the running of the real-time communication application and the motor real-time control system. The problems that the design complexity and the development cost of a system are increased by a plurality of processors, and finally the whole control system is not efficient enough in operation and complex in debugging are solved.)

1. The utility model provides a motor real-time control platform which characterized in that realizes in multicore processor, multicore processor includes first ARM core, second ARM core and FPGA core at least, motor real-time control platform includes:

the upper computer system runs on the first ARM core and is used for running real-time communication application;

the motor real-time control system runs in the FPGA core and is used for executing a preset motor control algorithm;

and the real-time operating system runs on the second ARM core and is used for controlling the running of the real-time communication application and the motor real-time control system.

2. The motor real-time control platform of claim 1, wherein the real-time communication application comprises:

and the mode selection module interface is used for acquiring the selection operation of the motor control mode so as to adjust the motor control mode through the motor control system.

3. The motor real-time control platform according to claim 2, wherein the motor real-time control system comprises:

and the mode selection module is used for selecting the motor control mode corresponding to the selection operation acquired by the mode selection module interface and outputting a corresponding voltage signal.

4. The real-time motor control platform of claim 3, wherein the real-time motor control system further comprises:

the rotating speed calculation module is used for acquiring signals acquired by the incremental encoder, calculating the rotating speed of the motor and inputting the rotating speed to the mode selection module;

the current processing module is used for acquiring the current of the motor acquired by the current sensor, processing the current into the current under a rotating coordinate system and inputting the current into the mode selection module;

the voltage processing module is used for processing the voltage signal output by the mode selection module into a three-phase voltage signal by utilizing the rotating speed of the motor;

and the modulation module is used for generating a modulation signal according to the three-phase voltage signal and outputting the modulation signal to an inverter circuit of the motor so as to realize real-time control of the motor.

5. The real-time motor control platform of claim 4, wherein the upper computer system comprises:

and the control interface module is used for acquiring the rotating speed of the motor and displaying the rotating speed in real time.

6. The motor real-time control platform of claim 1, wherein the multi-core processor is a ZYNQ-7000 processor.

7. A method for developing a real-time motor control platform, wherein the real-time motor control platform is the real-time motor control platform of any one of claims 1 to 6, and the method for developing the real-time motor control platform comprises the following steps:

determining software and hardware of a motor real-time control platform to be partitioned, wherein the hardware is a multi-core processor which at least comprises a first ARM core, a second ARM core and an FPGA core; the software comprises an upper computer system, a motor real-time control system and a real-time operating system;

embedding the upper computer system into the first ARM core for operation, and operating a real-time communication application;

embedding the motor real-time control system into the FPGA core for operation, and executing a preset motor control algorithm;

and embedding a real-time operating system into the second ARM core for operation, and controlling the operation of the real-time communication application and the motor real-time control system.

8. The method for developing the motor real-time control platform according to claim 7, wherein the embedding the motor real-time control system into the FPGA core for operation is configured to execute a preset motor control algorithm, and the method includes:

writing a preset motor control algorithm by using a programming language;

putting the written preset motor control algorithm into hardware development software of the multi-core processor for hardware acceleration, and generating a hardware description language of the preset motor control algorithm;

and embedding a hardware description language of the preset motor control algorithm into the FPGA core.

9. The development method of the real-time motor control platform according to claim 8, wherein the hardware development software is SDSoc software.

10. The method for developing the real-time motor control platform according to claim 8, wherein the hardware description language is VHDL language.

Technical Field

The invention relates to the technical field of motor control, in particular to a motor real-time control platform and a development method.

Background

In the field of industrial transmission control, the real-time performance, high speed performance and reliability put higher requirements on a CPU of a controller; the traditional motor control system is generally based on motor control in a single-core processor DSP, and an additional processor is added to control the data and communication application of the control system; the control system is limited by the serial processing mode and frequency limit of the DSP, the frequency and efficiency of motor control cannot be obviously improved, the design complexity and development cost of the system are increased by the multiple processors of the control system, and finally the whole control system is not efficient enough in operation and complex in debugging.

Disclosure of Invention

The invention provides a motor real-time control platform and a development method, which are used for solving the problems that a plurality of processors increase the design complexity and the development cost of a system, and finally the whole control system is not efficient enough to operate and is complex to debug.

In a first aspect, the present invention provides a real-time motor control platform, which is implemented in a multi-core processor, where the multi-core processor at least includes a first ARM core, a second ARM core, and an FPGA core, and the real-time motor control platform includes:

the upper computer system runs on the first ARM core and is used for running real-time communication application;

the motor real-time control system runs in the FPGA core and is used for executing a preset motor control algorithm;

and the real-time operating system runs on the second ARM core and is used for controlling the running of the real-time communication application and the motor real-time control system.

Still further, the real-time communication application includes:

and the mode selection module interface is used for acquiring the selection operation of the motor control mode so as to adjust the motor control mode through the motor control system.

Still further, the real-time motor control system comprises:

and the mode selection module is used for selecting the motor control mode corresponding to the selection operation acquired by the mode selection module interface and outputting a corresponding voltage signal.

Further, the real-time motor control system further includes:

the rotating speed calculation module is used for acquiring signals acquired by the incremental encoder, calculating the rotating speed of the motor and inputting the rotating speed to the mode selection module;

the current processing module is used for acquiring the current of the motor acquired by the current sensor, processing the current into the current under a rotating coordinate system and inputting the current into the mode selection module;

the voltage processing module is used for processing the voltage signal output by the mode selection module into a three-phase voltage signal by utilizing the rotating speed of the motor;

and the modulation module is used for generating a modulation signal according to the three-phase voltage signal and outputting the modulation signal to an inverter circuit of the motor so as to realize real-time control of the motor.

Still further, the host computer system includes:

and the control interface module is used for acquiring the rotating speed of the motor and displaying the rotating speed in real time.

Still further, the multi-core processor is a ZYNQ-7000 processor.

In a second aspect, the present invention provides a method for developing a real-time motor control platform, where the real-time motor control platform is the real-time motor control platform in the first aspect, and the method for developing the real-time motor control platform includes:

determining software and hardware of a motor real-time control platform to be partitioned, wherein the hardware is a multi-core processor which at least comprises a first ARM core, a second ARM core and an FPGA core; the software comprises an upper computer system, a motor real-time control system and a real-time operating system;

embedding the upper computer system into the first ARM core for operation, and operating a real-time communication application;

embedding the motor real-time control system into the FPGA core for operation, and executing a preset motor control algorithm;

and embedding a real-time operating system into the second ARM core for operation, and controlling the operation of the real-time communication application and the motor real-time control system.

Furthermore, the embedding the motor real-time control system into the FPGA core for operation is configured to execute a preset motor control algorithm, and the method includes:

writing a preset motor control algorithm by using a programming language;

putting the written preset motor control algorithm into hardware development software of the multi-core processor for hardware acceleration, and generating a hardware description language of the preset motor control algorithm;

and embedding a hardware description language of the preset motor control algorithm into the FPGA core.

Further, the hardware development software is SDSoc software.

Further, the hardware description language is VHDL language.

Compared with the prior art, the invention at least has the following technical effects:

the motor real-time control platform is realized in a multi-core processor, an upper computer system and a real-time operating system with relatively low real-time requirements are respectively put into two ARM cores to operate, FPGA core resources are not occupied, a motor real-time control system with higher real-time requirements is put into the FPGA cores to execute a preset motor control algorithm, the frequency and the efficiency of motor control can be obviously improved by the motor real-time control platform framework, compared with the motor control realized by adopting a plurality of MCU processors in the prior art, the design complexity and the development cost of the motor real-time control platform are greatly reduced, the whole control platform is enabled to operate efficiently, later-stage debugging and maintenance are facilitated, the functions of single-chip multi-core high real-time performance and high frequency of the real-time motor control system are realized, the complexity and the development cost of the system are reduced, and the flexibility of a control strategy is enhanced.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.

Fig. 1 is a block diagram of a real-time motor control platform according to an embodiment of the present invention;

fig. 2 is a schematic control principle diagram of a real-time motor control system according to an embodiment of the present invention;

FIG. 3 is a schematic diagram of a control interface provided in accordance with an embodiment of the present invention;

FIG. 4 is a schematic view of an operation interface provided in the first embodiment of the present invention;

fig. 5 is a schematic flow chart of a method for developing a real-time motor control platform according to a second embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.

Example one

This embodiment provides a motor real-time control platform, realizes in multicore processor, and this multicore processor includes first ARM core, second ARM core and FPGA core at least, and figure 1 shows a motor real-time control platform block diagram, and this motor real-time control platform includes:

the upper computer system runs on the first ARM core and is used for running real-time communication application;

the motor real-time control system runs in the FPGA core and is used for executing a preset motor control algorithm;

and the real-time operating system runs on the second ARM core and is used for controlling the real-time communication application and the running of the motor real-time control system.

The multi-core processor can be but is not limited to a ZYNQ-7000 processor, the ZYNQ-7000 processor has the characteristics of high performance and low power consumption, the ZYNQ-7000 processor is taken as an example, a PS end of the multi-core processor comprises two ARM cores which are a first ARM core and a second ARM core respectively, and a PL end of the multi-core processor comprises an FPGA core. The upper computer system runs on the first ARM core and is used for running real-time communication application; the motor real-time control system runs in the FPGA core and is used for executing a preset motor control algorithm; and the real-time operating system runs on the second ARM core and is used for controlling the real-time communication application and the running of the motor real-time control system.

The real-time operating system can be but is not limited to a vxworks operating system, is a control center of software and hardware resources of the embedded system, organizes various resources of the embedded system shared by a plurality of users by an effective method as reasonable as possible, and has the prominent characteristics in the aspects of real-time high efficiency of the system, related dependence of hardware, software solid state, application specificity and the like. In the embodiment, the real-time operating system is embedded in the multi-core processor, and the real-time operating system, the upper computer system and the motor real-time control system are integrated in a hardware system of the multi-core processor according to the application requirement, so that the software and hardware integration is realized. The real-time operating system is responsible for the distribution and scheduling of all software and hardware resources of the embedded system, controls the activities such as coordination and the like, can carry out function configuration through the loading and unloading module, reflects the characteristics of the system, and has good real-time performance, tailorability and reliability.

By comparing the condition that the VxWorks operating system kernel does not have the operating system, the following table 1 is obtained:

TABLE 1

When a user uses an operating system, not every component in the operating system is used. Compared with the MCU without an operating system, the system can be customized according to specific application, so that the system has the minimum requirement on resources, the utilization rate is highest, and the hardware cost is obviously reduced. The VxWorks operating system consists of a kernel with a small volume and a plurality of system modules which can be customized according to needs, the minimum kernel of the VxWorks operating system is 8KB, even if other necessary modules are added, the occupied space is small, and the real-time and multi-task system characteristics are not lost. Due to its high flexibility, this operating system can be easily customized or appropriately developed to meet its actual application needs.

By embedding the real-time operating system, the embodiment can ensure that the common programs of the system such as process scheduling, interprocess communication, interrupt processing and the like are refined and effective, so that the delay caused by the programs is very short, the real-time performance of reliable motor control is fully ensured, and the same hardware configuration can meet the requirement of stronger real-time performance of motor control. However, the conventional motor control processor has no operating system, and can only realize a motor control system with low real-time performance, simple task function and uncomplicated control.

In this embodiment, realize motor real-time control platform in multicore processor, put the relatively lower host computer system of real-time requirement, real-time operating system into two ARM cores respectively and operate, do not occupy FPGA nuclear resource, put the motor real-time control system that the real-time requirement is higher at FPGA core execution and predetermine the motor control algorithm, this motor real-time control platform framework can show frequency and the efficiency that improves motor control, compare with adopting the multi-disc MCU treater to realize motor control among the prior art, greatly reduced motor real-time control platform's design complexity and development cost, make whole control platform operation high-efficient, be convenient for later debugging and maintenance.

In order to facilitate modification and debugging in subsequent debugging development, the real-time communication application run by the upper computer system may include:

and the mode selection module interface is used for acquiring the selection operation of the motor control mode so as to adjust the motor control mode through the motor control system. Preferably, the motor control mode may include, but is not limited to, a speed control mode, a torque control mode, a flux linkage control mode. For example, the upper computer system may provide a mode selection interface corresponding to the mode selection module interface for a user to perform a selection operation, when the user selects a certain mode, the mode selection module interface obtains the selection operation, the motor control system selects the motor control mode according to the selection operation, and the mode selection module outputs a corresponding voltage signal in the selected mode.

Further, the real-time communication application run by the upper computer system may further include:

and the speed control module interface is used for acquiring the selection operation of the motor speed when the selected motor control mode is the speed control mode so as to adjust the motor control mode through the motor control system. For example, the upper computer system may provide a speed selection interface corresponding to the speed control module interface for a user to perform a selection operation, and when the user selects a certain speed, the speed control module interface obtains the selection operation, and the motor control system selects a corresponding speed according to the selection operation to control the speed control module to output a corresponding voltage signal at the selected speed.

It is worth mentioning that in practical application, a user can add different interfaces as real-time communication applications operated by the upper computer system according to requirements for subsequent modification and debugging, and the added interfaces can be interfaces corresponding to modules which are possibly modified or compiled in subsequent debugging and development.

Specifically, the real-time motor control system may include:

and the mode selection module is used for selecting the motor control mode corresponding to the selection operation acquired by the mode selection module interface and outputting a corresponding voltage signal.

It should be noted that, because the mode selection module is the most likely part to be modified and compiled in the subsequent debugging and development, a corresponding interface is provided in the upper computer system, so that the user can modify and compile the mode selection module conveniently, and the modification operation does not need to be specifically executed through the operation of the FPGA core.

Further, the mode selection module may further include: and the speed control module, the torque control module and the flux linkage control module are used for adjusting different motor control modes according to the selected mode. The speed control module has a high possibility of modifying the core compilation in the later debugging and development, so that a corresponding interface is arranged in the upper computer system, and when the selected motor control mode is the speed control mode, the selection operation of the motor speed is acquired to control the speed control module to output a corresponding voltage signal at the selected speed.

Further, the real-time motor control system further comprises:

the rotating speed calculation module is used for acquiring signals acquired by the incremental encoder, calculating the rotating speed of the motor and inputting the rotating speed into the mode selection module; it can be understood that the incremental encoder transmits the signals acquired by the incremental encoder to a rotating speed calculation module running in the FPGA core through an external interface to calculate the rotating speed n of the motor.

A current processing module for acquiring three-phase current signals I of the motor acquired by the current sensora、Ib、IcProcessing the three-phase current signals into currents in a rotating coordinate system, and inputting the currents into a mode selection module;

a voltage processing module for outputting the voltage signal V output by the mode selection moduled、VqProcessed into three-phase voltage signals Va、Vb、Vc

A modulation module for modulating the three-phase voltage signal Va、Vb、VcAnd generating a modulation signal, and outputting the modulation signal to an inverter circuit of the motor to realize real-time control of the motor, wherein the modulation signal can be an SVPWM signal or an SPWM signal, but is not limited thereto. The modulation module is mainly used for controlling the on-off of a switching device in an inverter circuit of the motor, two pulse width modulation modes including SPWM and SVPWM can be set in the modulation module, and switching can be performed according to requirements in actual operation. The modulation module is more important to emphasize on the aspect of floating point calculation when being executed in the traditional DSP, and the high frequency and the real-time performance of the pulse cannot be obviously improved; when the modulation module is operated in the FPGA core, the frequency of hundreds of K can be realized by the switch tube based on the parallel and high-speed processing performance of the FPGA, so that the operation performance of the motor can be obviously improved, and the real-time modulation of high-frequency signals can be realized.

It will be appreciated that the current processing module may further include the following sub-modules:

the current acquisition submodule is used for acquiring three-phase current of the motor acquired by the current sensor and comprises A-phase current IaPhase I of current BbPhase I of current Cc

The current filtering submodule is used for filtering the current acquired by the current acquisition module;

clarke transform (Clarke) submodule for converting the current filtered by the current filtering module into a stationary coordinate system, i.e., A-phase current IaPhase I of current BbPhase I of current CcConverting to alpha beta static coordinate system to obtain current IαCurrent Iβ(ii) a Clark conversion is mainly the conversion from three-phase winding to two-phase winding;

park transformation (Park) submodule for converting the motor current from a stationary to a rotating coordinate system, i.e. for converting the current IαCurrent IβConversion from alpha beta stationary coordinate systemRotating the coordinate system to dq to obtain current Id and current Iq(ii) a The Park transformation is a transformation of a two-phase stationary coordinate system α β to a two-phase rotating coordinate system dq.

It will be appreciated that the current handling module still further comprises the following sub-modules:

inverse parke transform (Clarke)-1) Submodule for rotating the voltage signal V in the coordinate system by dqd、VqConverting to alpha beta static coordinate system to obtain voltage VαVoltage Vβ

Inverse Clark transform (Park)-1) Submodule for converting the voltage signal in the alpha beta static coordinate system into three-phase voltage Va、Vb、Vc

It can be understood that the preset motor control algorithm operated by the motor real-time control system may be, but is not limited to, an SVPM/vector control algorithm, an ID equal to zero algorithm, and a maximum torque-to-current ratio control algorithm, and the preset motor control algorithm may be set according to actual application requirements, and is developed based on the platform provided in this embodiment to implement a corresponding motor real-time control platform.

Fig. 2 is a schematic control principle diagram of a real-time motor control system, and as shown in fig. 2, the overall control principle of the real-time motor control system is as follows: the speed control module compares the rotating speed n of the motor with an input reference rotating speed, a reference quantity iqref of a stator current torque component is obtained through calculation of a speed PI controller by utilizing the relation between torque and the rotating speed, meanwhile, a stator current excitation component idref is given by a flux linkage control module, three-phase current of the motor is converted into a two-phase static coordinate system through Clarke conversion and then converted into a dq rotating coordinate system through Park conversion, the torque control module compares current signals in the dq coordinate system with reference currents idref and iqrref of the current signals, voltage signals Vd and Vq under the dq rotating coordinate system are obtained through the PI controller, three-phase voltages Va, Vb and Vc are obtained through Park inverse conversion and Clarke inverse conversion, and SVPWM/SPWM waveforms are output through a modulation module.

Specifically, the upper computer system includes:

control interface module for obtaining electricityAnd the rotating speed of the machine is displayed in real time. Specifically, the control interface module displays the rotating speed of the motor in real time by providing a display interface and can also display a three-phase current signal I acquired by a current sensora、Ib、IcVoltage signal V in dq rotation coordinate systemd、VqEtc. are displayed in real time, wherein three-phase current signals Ia、Ib、IcThe real-time display waveform is shown in fig. 3, and in addition, an operation interface shown in fig. 4 can be provided for real-time communication application, so that subsequent debugging on the operation interface is facilitated. For example, the user may perform a mode selection operation in the operation interface display corresponding to the mode selection module interface.

In order to facilitate the interactive communication of a plurality of sets of motor control systems, the upper computer system can provide corresponding interactive communication interface application and can also provide simple calculation applications such as baud rate and the like.

Example two

The embodiment provides a method for developing a real-time motor control platform, which is used for developing the real-time motor control platform of the embodiment, and fig. 5 shows a schematic flow chart of the method for developing the real-time motor control platform, and the method for developing the real-time motor control platform includes:

determining software and hardware of a motor real-time control platform to be partitioned, wherein the hardware is a multi-core processor which at least comprises a first ARM core, a second ARM core and an FPGA core; the software comprises an upper computer system, a motor real-time control system and a real-time operating system;

embedding an upper computer system into a first ARM core for running, wherein the upper computer system is used for running real-time communication application;

embedding a motor real-time control system into an FPGA core for operation, and executing a preset motor control algorithm;

and embedding the real-time operating system into the second ARM core for operation, and controlling the operation of the real-time communication application and the motor real-time control system.

The multi-core processor can be but is not limited to a ZYNQ-7000 processor, the ZYNQ-7000 processor has the characteristics of high performance and low power consumption, the ZYNQ-7000 processor is taken as an example, a PS end of the multi-core processor comprises two ARM cores which are a first ARM core and a second ARM core respectively, and a PL end of the multi-core processor comprises an FPGA core.

The real-time operating system may be, but is not limited to, a vxworks operating system.

Specifically, the motor real-time control system is embedded into an FPGA core to operate, and is used for executing a preset motor control algorithm, including:

writing a preset motor control algorithm by using a programming language; the programming language may be, but is not limited to, C-voice.

Putting the written preset motor control algorithm into hardware development software of a multi-core processor for hardware acceleration, and generating a hardware description language of the preset motor control algorithm; the hardware development software may be, but is not limited to, SDSoc software (saint development environment), and the hardware description language may be VHDL language.

And embedding a hardware description language of a preset motor control algorithm into the FPGA core.

In the embodiment, the real-time operating system is used for ensuring that system public programs such as process scheduling, interprocess communication, interrupt processing and the like are refined and effective, and the reliable real-time performance is fully ensured, so that the same hardware configuration can meet the requirement of a motor control system on stronger real-time performance. The parallel and high-speed processing performance based on the FPGA core is realized, a preset control algorithm is handed to the ARM core for completion, the operation processing speed can be guaranteed, an upper computer system with lower real-time requirement is realized in the ARM core, the resource of the FPGA core is not occupied, and therefore the operation speed of the FPGA core is not affected.

In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. The system and method embodiments described above are merely illustrative.

It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Although the embodiments of the present invention have been described above, the above descriptions are only for the convenience of understanding the present invention, and are not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:不等长分段供电直线感应电机控制方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类