Motor UVW sequence matching method and matching system thereof
By implementing the motor UVW sequence matching method in the MCU, using the input port, the underlying software layer and the application software layer for conversion processing, the software and hardware update problems caused by the changes in the motor UVW sequence in the prior art are solved, and rapid adaptation and simplification are achieved Debugging tests.
Patent Information
- Application Number
- CN202310980179.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art requires software and hardware updates when the motor UVW sequence changes, resulting in a long time to design changes and debug testing.
The matching method of motor UVW sequence is realized through the input and output ports of the MCU, the underlying software layer and the application software layer. The method includes collecting the motor phase current signal, performing conversion processing to match the target phase sequence, and calculating the duty cycle signal, and finally outputting it to the motor execution system.
No need to change the hardware design or update the software, the motor UVW sequence changes can be quickly adapted to the motor, simplifying the software engineering and debugging testing process.
Smart Images

Figure CN119448868A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a motor control technology for a vehicle, and in particular to a motor UVW sequence matching method and a matching system thereof. Background Art
[0002] Changes in the UVW sequence of the motor will lead to adaptive adjustments in the hardware design (i.e., HW) and the hardware-software interface (i.e., HSI). This is because changes in the physical phase sequence of the motor will lead to changes in the hardware driver sequence and the software interface configuration. These changes will be specifically reflected in the hardware-software interface definition, which is hard-coded in the underlying software layer (Basic Software, BSW for short) at the execution level. In this way, a small change will eventually lead to major changes in the hardware-software design, which requires a long time and effort in software engineering and debugging and testing. Summary of the invention
[0003] Based on the above problems in the prior art, the present invention aims to provide a motor UVW sequence matching method and matching system which avoids the need for software and hardware updates when the UVW sequence changes.
[0004] The present invention provides a motor UVW sequence matching method, which is implemented through an input port and an output port in an MCU, a bottom software layer and an application software layer, and comprises the following steps:
[0005] The input port of the MCU receives the collected phase current signal of the motor;
[0006] Inputting the phase current signal to the application software layer through the bottom software layer;
[0007] The application software layer receives a target phase sequence obtained from the outside and performs a first conversion process on a current physical phase sequence of the phase current signal based on the target phase sequence to obtain a converted phase sequence signal, and inputs the converted phase sequence signal to the underlying software layer;
[0008] The bottom software layer calculates a first duty cycle signal based on the speed signal and the mode signal obtained from the application software layer and the converted phase sequence signal, and inputs the first duty cycle signal to the application software layer;
[0009] The application software layer performs a second conversion process on the first duty cycle signal to obtain a second duty cycle signal, and sends the second duty cycle signal to the output port of the MCU through the underlying software layer; and
[0010] The output port of the MCU outputs the second duty cycle signal to the execution system of the motor.
[0011] The present invention provides a motor UVW sequence matching system, which is implemented in an MCU. The system includes: an input port and an output port of the MCU, a bottom layer, and an application layer.
[0012] The input port of the MCU receives the collected phase current signal of the motor and is used to input the phase current signal to the application layer through the bottom layer.
[0013] The application layer is used to accept a target phase sequence obtained from the outside and perform a first conversion process on a current physical phase sequence of the phase current signal based on the target phase sequence to obtain a converted phase sequence signal, and input the converted phase sequence signal to the bottom layer;
[0014] The bottom layer is used to calculate a first duty cycle signal based on the speed signal and the mode signal obtained from the application layer and the converted phase sequence signal, and input the first duty cycle signal to the application layer.
[0015] The application layer is further used to perform a second conversion process on the first duty cycle signal to obtain a second duty cycle signal, and send the second duty cycle signal to the output port of the MCU through the bottom layer.
[0016] The output port of the MCU outputs the second duty cycle signal to the execution system of the motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other objects and advantages of the present application will become more fully apparent from the following detailed description in conjunction with the accompanying drawings, in which the same or similar elements are represented by the same reference numerals.
[0018] Figure 1 It is a schematic diagram showing a method for controlling a UVW sequence of a motor in the prior art.
[0019] Figure 2 Schematic diagram showing a method for matching a UVW sequence of a motor according to an embodiment of the present invention.
[0020] Figure 3 1 is a block diagram showing the structure of a motor UVW sequence matching system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The following describes some of the various embodiments of the present invention, which are intended to provide a basic understanding of the present invention, but are not intended to identify the key or decisive elements of the present invention or to limit the scope of protection.
[0022] For the purpose of brevity and illustration, the principles of the present invention are described herein mainly with reference to its exemplary embodiments. However, those skilled in the art will readily recognize that the same principles are equally applicable to all types of motor UVW sequence matching methods and matching systems thereof, and these same principles can be implemented therein, and any such changes do not depart from the true spirit and scope of the present patent application.
[0023] Moreover, in the following description, reference is made to the accompanying drawings, which illustrate specific exemplary embodiments. Electrical, mechanical, logical and structural changes may be made to these embodiments without departing from the spirit and scope of the present invention. In addition, although the features of the present invention are disclosed in conjunction with only one of several implementations / embodiments, this feature may be combined with one or more other features of other implementations / embodiments as may be desirable and / or advantageous for any given or identifiable function. Therefore, the following description should not be regarded as limiting, and the scope of the present invention is defined by the appended claims and their equivalents.
[0024] Terms such as “having” and “including” indicate that in addition to the units (modules) and steps directly and explicitly stated in the specification and claims, the technical solution of the present invention does not exclude the situation where it has other units (modules) and steps that are not directly or explicitly stated.
[0025] Firstly, the inventors analyzed and studied the control method of the motor UVW sequence in the prior art.
[0026] Figure 1 It is a schematic diagram showing a method for controlling a UVW sequence of a motor in the prior art.
[0027] exist Figure 1 In the figure, 10 represents the input port and output port of the MCU (hereinafter referred to as I / O port), 20 represents the underlying software layer (i.e., BSW layer), 30 represents the application software layer (i.e., ASW layer), and 21 represents the motor control algorithm module (also referred to as McARch). The input port and output port 10 of the MCU, the underlying software layer 20, and the application software layer 30 are all in the MCU.
[0028] like Figure 1As shown, the phase current P collected from the I / O port 10 of the MCU is input into the motor control algorithm module 21 of the underlying software layer 20, and the MCU receives the speed signal s and the mode signal m from the application software layer 30 (the speed signal s and the mode signal m represent the speed and mode at which the motor needs to operate). Then, the MCU underlying software layer 20 calculates the duty cycle signal D based on the phase current P, the speed signal s and the mode signal m, and the I / O port 10 of the MCU sends the calculated duty cycle signal D to the execution system so that the motor of the execution system performs the corresponding operation.
[0029] exist Figure 1 In the prior art shown, when the physical phase sequence of the motor changes (i.e., the collected phase current P changes), hardware design changes are required to match the updated physical phase sequence, and HSI port name definition adjustments and underlying software updates are also required to match the new phase sequence input and output signals.
[0030] In order to improve the above-mentioned problems in the prior art, the present invention is Figure 1 Based on the above, an input terminal and an output terminal are added to the application software layer and the corresponding matching processing performed by the application software layer is added. The specific content of the present invention refers to Figure 2 Provide explanation.
[0031] Figure 2 Schematic diagram showing a method for matching a UVW sequence of a motor according to an embodiment of the present invention. Figure 2 In the figure, 100 represents the I / O port of the MCU, 200 represents the underlying software layer, and 300 represents the application software layer. The I / O port 100 of the MCU, the underlying software layer 200, and the application software layer 300 are all included in the MCU. Compared with the prior art, the present invention adds an input terminal 310 and an output terminal 340 to the application software layer 300 and performs corresponding matching processing.
[0032] Specifically, Figure 2 As shown, a method for matching a motor UVW sequence according to an embodiment of the present invention comprises the following steps:
[0033] A1: The I / O port 100 of the MCU receives the phase current signal P (i.e. the current physical phase sequence) collected from the outside;
[0034] A2: The I / O port 100 of the MCU inputs the phase current signal to the internal bottom software layer 200;
[0035] A3: Input the phase current signal to the input terminal 310 of the application software layer 300 through the underlying software layer 200 (only passing through);
[0036] A4: The application software layer 300 obtains the target phase sequence to be set through external LIN communication or CAN communication, and the application software layer 300 performs conversion processing on the current physical phase sequence based on the target phase sequence to obtain a converted phase sequence signal;
[0037] A5: Inputting the converted phase sequence signal from the input terminal 310 of the application software layer 300 to the motor control algorithm module 210 of the bottom software layer 200;
[0038] A6: The motor control algorithm module 210 obtains the speed signal s and the mode signal m from the application software layer 300, and the motor control algorithm module 210 calculates the first duty cycle signal according to the converted phase sequence signal, the speed signal s and the mode signal m;
[0039] A7: Inputting the first duty cycle signal from the motor control algorithm module 210 to the output terminal 340 of the application software layer 300;
[0040] A8: The application software layer 300 converts the duty cycle sequence of the first duty cycle signal into a second duty cycle signal in a sequence that the MCU can send as an execution instruction packet;
[0041] A9: The output terminal 340 of the application software layer 300 sends the second duty cycle signal to the underlying software layer 200;
[0042] A10: Sending the second duty cycle signal to the I / O port 100 of the MCU through the underlying software layer 200 (only passing through); and
[0043] A11: The I / O port 100 of the MCU outputs the second duty cycle signal as an execution instruction packet to the external motor execution system.
[0044] As mentioned above, the phase current signal collected by the MCU from the outside is the physical phase sequence name of the external execution system. When the phase sequence name inside the software does not match the physical phase sequence name of the external execution system, the motor will not rotate or reverse. The prior art solves this problem by using the method of reconfiguring and updating software and hardware as mentioned above. In order to solve this problem in the present invention, Figure 2 What is adopted is that logical calculation is performed and matching is achieved based on the target phase sequence in the application software layer 300, that is, the target phase sequence to be set is obtained through external LIN communication or CAN communication in the application software layer, and through the matching action based on the target phase sequence, the MCU can output a duty cycle signal that is consistent with the physical phase sequence name of the external execution system (motor), and the external execution system (motor) can rotate normally, thereby achieving rapid adaptation without changing the hardware design or updating the software.
[0045] Here, an example of the conversion process in A4 is described. For example, when the current physical phase sequence is ABC, when the target phase sequence to be set is UVW obtained through external LIN communication or CAN communication, the application software layer 300 performs conversion processing on the current physical phase sequence ABC based on the target phase sequence UVW to obtain the converted phase sequence signal. The specific conversion is, for example, as follows:
[0046]
[0047] The above describes the matching of the motor UVW sequence of the present invention. Next, the matching system of the motor UVW sequence of the present invention will be described.
[0048] Figure 3 1 is a block diagram showing the structure of a motor UVW sequence matching system according to an embodiment of the present invention.
[0049] like Figure 3 As shown, a motor UVW sequence matching system according to an embodiment of the present invention includes: an I / O port 100 of an MCU, a bottom software layer 200 and an application software layer 300, wherein the I / O port 100 of the MCU, the bottom software layer 200 and the application software layer 300 are all included in the MCU.
[0050] The I / O port 100 of the MCU receives the phase current signal of the motor collected from the outside and is used to input the phase current signal to the application software layer 300 through the bottom software layer 200 .
[0051] The application software layer 300 is used to accept a target phase sequence obtained from the outside and perform a first conversion process on the current physical phase sequence of the phase current signal based on the target phase sequence to obtain a converted phase sequence signal, and input the converted phase sequence signal to the underlying software layer 200 .
[0052] The bottom software layer 200 is used to obtain the rotation speed signal s from the application software layer 300.
[0053] The first duty cycle signal is calculated by combining the mode signal m and the converted phase sequence signal and inputted into the application software layer 300 .
[0054] The application software layer 300 is further used to perform a second conversion process on the first duty cycle signal to obtain a second duty cycle signal, and send the second duty cycle signal to the I / O port 100 of the MCU through the underlying software layer 200 .
[0055] The I / O port 100 of the MCU is used to output the second duty cycle signal to the execution system of the motor.
[0056] Among them, the I / O port 100 of the MCU includes:
[0057] A dedicated input port 110, for receiving the collected phase current signal of the motor and for transmitting the phase current signal to the bottom software layer 200; and
[0058] The dedicated output port 120 is used to receive the second duty cycle signal and output the second duty cycle signal as an execution instruction packet to an external execution system.
[0059] The bottom software layer 200 includes:
[0060] The motor control algorithm module 210 is used to calculate a first duty cycle signal based on the speed signal s and the mode signal m obtained from the application software layer 300 and the converted phase sequence signal;
[0061] The first communication module 220 is used to forward the phase current signal of the motor from the I / O port 100 of the MCU to the application software layer 300; and
[0062] The second communication module 230 is used to forward the second duty cycle signal from the application layer 300 to the I / O port 100 of the MCU.
[0063] The application software layer 300 includes:
[0064] An input terminal 310, for receiving a target phase sequence obtained from the outside and for inputting the converted phase sequence signal to the underlying software layer 200;
[0065] A first conversion processing module 320, configured to perform a first conversion process on a current physical phase sequence of the phase current signal based on the target phase sequence to obtain a converted phase sequence signal;
[0066] A second conversion processing module 330, configured to perform a second conversion processing on the first duty cycle signal to obtain a second duty cycle signal; and
[0067] The output terminal 340 is used to receive the first duty cycle signal from the bottom layer software 200 and to output the second duty cycle signal to the bottom layer software layer.
[0068] The first conversion processing module 320 is used to convert the current physical phase sequence of the phase current signal to be consistent with the target phase sequence.
[0069] The second conversion processing module 330 is used to convert the first duty cycle signal into a second duty cycle signal whose duty cycle sequence complies with the sequence that can be sent as an execution instruction packet by the MCU.
[0070] Furthermore, the present invention also provides a computer-readable medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the above-mentioned motor UVW sequence matching method.
[0071] Furthermore, the present invention also provides a computer device, including a storage module, a processor, and a computer program stored in the storage module and executable on the processor, wherein the processor implements the above-mentioned motor UVW sequence matching method when executing the computer program.
[0072] According to the motor UVW sequence matching method and matching system of the present invention, once it is found that the physical phase sequence of the external execution system has changed, there is no need to change the hardware design or update the software. It only needs to set a new target phase sequence through LIN or CAN and perform corresponding conversion. The duty cycle signal packaged as an execution instruction can be passed to the MCU, thereby achieving fast one-click adaptation.
[0073] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Those skilled in the art can think of other feasible changes or substitutions based on the technical scope disclosed in the present application, and such changes or substitutions are all included in the protection scope of the present application. In the absence of conflict, the implementation modes of the present application and the features in the implementation modes can also be combined with each other. The protection scope of the present application shall be subject to the description of the claims.
Claims
1. A motor UVW sequence matching method, which is implemented through the input port and output port of the MCU, the bottom software layer and the application software layer, characterized in that: The method comprises the following steps: Receiving the collected phase current signal of the motor from the input port of the MCU; Inputting the phase current signal to the application software layer through the bottom software layer; The application software layer receives a target phase sequence obtained from the outside and performs a first conversion process on a current physical phase sequence of the phase current signal based on the target phase sequence to obtain a converted phase sequence signal, and inputs the converted phase sequence signal to the underlying software layer; The bottom software layer calculates a first duty cycle signal based on the speed signal and the mode signal obtained from the application software layer and the converted phase sequence signal and inputs the first duty cycle signal to the application software layer; The application software layer performs a second conversion process on the first duty cycle signal to obtain a second duty cycle signal, and sends the second duty cycle signal to the output port of the MCU through the underlying software layer; and The second duty cycle signal is output from the output port of the MCU to an execution system of the motor.
2. The motor UVW sequence matching method according to claim 1, characterized in that: The target phase sequence obtained from the outside is obtained from the outside through external LIN communication or CAN communication.
3. The motor UVW sequence matching method according to claim 1, characterized in that: The first conversion process includes: converting the current physical phase sequence of the phase current signal to be consistent with the target phase sequence.
4. The motor UVW sequence matching method according to claim 3, characterized in that: The second conversion process includes: converting the first duty cycle signal into a second duty cycle signal that complies with the sequence of packets sent by the MCU as execution instructions.
5. A motor UVW sequence matching system, the matching system is implemented in an MCU, and the matching system includes: The input port and output port of the MCU, the bottom layer, and the application layer are characterized in that: The input port of the MCU is used to receive the collected phase current signal of the motor and to input the phase current signal to the application layer through the bottom layer. The application layer is used to accept a target phase sequence obtained from the outside and perform a first conversion process on the current physical phase sequence of the phase current signal based on the target phase sequence to obtain a converted phase sequence signal and input the converted phase sequence signal to the bottom layer; The bottom layer is used to calculate a first duty cycle signal based on the speed signal and the mode signal obtained from the application layer and the converted phase sequence signal, and input the first duty cycle signal to the application layer. The application layer is further used to perform a second conversion process on the first duty cycle signal to obtain a second duty cycle signal, and send the second duty cycle signal to the output port of the MCU through the bottom layer. The output port of the MCU is used to output the second duty cycle signal to the execution system of the motor.
6. The motor UVW sequence matching system as claimed in claim 5, characterized in that: The application layer includes: An input terminal, used for receiving a target phase sequence obtained from the outside and for inputting the converted phase sequence signal into the bottom layer; A first conversion processing module, configured to perform a first conversion process on a current physical phase sequence of the phase current signal based on the target phase sequence to obtain a converted phase sequence signal; a second conversion processing module, configured to perform a second conversion processing on the first duty cycle signal to obtain a second duty cycle signal; and An output terminal is used to receive the first duty cycle signal from the bottom layer software and to output the second duty cycle signal to the bottom layer.
7. The motor UVW sequence matching system according to claim 6, characterized in that: The first conversion processing module is used to convert the current physical phase sequence of the phase current signal to be consistent with the target phase sequence.
8. The motor UVW sequence matching system according to claim 6, characterized in that: The second conversion processing module is used to convert the first duty cycle signal into a second duty cycle signal whose duty cycle sequence complies with the sequence sent by the MCU as an execution instruction packet.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the motor UVW sequence matching method according to any one of claims 1 to 4 is implemented.
10. A computer device comprising a storage module, a processor, and a computer program stored in the storage module and executable on the processor, characterized in that: When the processor executes the computer program, the motor UVW sequence matching method according to any one of claims 1 to 4 is implemented.