Motor signal acquisition method and device and motor control system

By using FlexPWM to generate heavy-load signals and cross-triggered modules for judgment, combined with analog-to-digital conversion modules, the problems of low flexibility and efficiency in traditional motor signal sampling methods are solved, thereby improving the flexibility and efficiency of motor signal acquisition and saving PWM channel resources.

CN115882768BActive Publication Date: 2026-06-12SHANGHAI XINQU ZHILIAN ELECTRONIC TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI XINQU ZHILIAN ELECTRONIC TECH CO LTD
Filing Date
2022-10-21
Publication Date
2026-06-12

Smart Images

  • Figure CN115882768B_ABST
    Figure CN115882768B_ABST
Patent Text Reader

Abstract

The application discloses a motor signal acquisition method, device and motor control system. The motor signal acquisition method comprises the following steps: a FlexPWM generates an overload signal according to a sampling start signal; a cross trigger module starts cross trigger judgment according to the overload signal, so that trigger comparison values of each to-be-tested signal are cross triggered with values of a counting signal; when the trigger comparison value of the to-be-tested signal is equal to the value of the counting signal, the cross trigger module generates an acquisition trigger signal of the to-be-tested signal; in the process of cross trigger judgment, the cross trigger module changes the trigger comparison value of the to-be-tested signal or the maximum value of the counting signal according to an instruction of an upper computer, so as to adjust the acquisition time of the to-be-tested signal; and an analog-digital conversion module opens a sampling channel of the corresponding to-be-tested signal according to the acquisition trigger signal of the to-be-tested signal, so as to acquire the corresponding to-be-tested signal. The application can improve the flexibility and efficiency of signal acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to motor control technology, and more particularly to a motor signal acquisition method, device and motor control system. Background Technology

[0002] In motor control, there are strict requirements for the accuracy and quality of signal sampling, especially the timing of signal sampling. In order to simultaneously sample fast and slow signals, such as the three-phase current and bus voltage of the motor, and slow signals such as motor temperature and power transistor temperature, it is necessary to reasonably set the sampling time for these signals and distribute them to the various sampling channels of the analog-to-digital converter.

[0003] The traditional approach is to use pulse width modulation (PWM) signals to trigger the sampling of fast signals. Specifically, fast signals such as three-phase current and bus voltage are set as injection sampling groups; slow signals such as motor temperature and power transistor temperature are set as regular sampling groups. During the sampling of the regular sampling groups, if a PWM signal is input, the signal from the injection sampling group is sampled first.

[0004] In motor control, there are numerous sampling signals that need to be divided into multiple groups. Using traditional sampling methods for multiple signals results in poor flexibility and low sampling efficiency. Summary of the Invention

[0005] This invention provides a method, device, and control system for acquiring motor signals, thereby improving the flexibility and efficiency of signal acquisition.

[0006] In a first aspect, embodiments of the present invention provide a method for acquiring motor signals, the method comprising:

[0007] FlexPWM generates a reload signal based on the sampling start signal, wherein the period, alignment mode, and reload method of the reload signal are all configured according to the sampling period of the fast signal in the signal under test;

[0008] The cross-trigger module starts cross-trigger judgment based on the reload signal, and cross-triggers judgment by comparing the trigger comparison value of each signal under test with the value of the counting signal, wherein the value of the counting signal is reloaded according to the reload signal;

[0009] When the trigger comparison value of the signal under test is equal to the value of the counting signal, the cross-trigger module generates the acquisition trigger signal of the signal under test;

[0010] During the cross-triggering determination process, the cross-triggering module changes the trigger comparison value of the signal under test or the maximum value of the counting signal according to the host computer instruction, so as to adjust the acquisition time of the signal under test;

[0011] The analog-to-digital conversion module activates the sampling channel corresponding to the signal under test according to the acquisition trigger signal of the signal under test, so as to acquire the corresponding signal under test.

[0012] Optionally, the number of analog-to-digital conversion modules is at least two; one trigger comparison value corresponds to at least two signals under test, and the sampling channels of different signals under test corresponding to one trigger comparison value are respectively set in different analog-to-digital conversion modules, wherein the signal types of the at least two signals under test corresponding to one trigger comparison value are the same, and the signal types include the fast signal and the slow signal.

[0013] Optionally, the number of analog-to-digital conversion modules is 2.

[0014] Optionally, one of the analog-to-digital conversion modules includes a sampling channel for the first phase current, a sampling channel for the second phase current, and a sampling channel for the motor temperature; the other analog-to-digital conversion module includes a sampling channel for the third phase current, a sampling channel for the bus voltage, and a sampling channel for the IGBT temperature; wherein the first phase current and the third phase current correspond to the same trigger comparison value, the second phase current and the bus voltage correspond to the same trigger comparison value, and the motor temperature and the IGBT temperature correspond to the same trigger comparison value.

[0015] Optionally, during the cross-trigger determination process, the cross-trigger module changes the trigger comparison value of the signal under test or the maximum value of the counting signal according to the host computer instruction, so as to adjust the acquisition time of the signal under test, including:

[0016] The host computer determines whether the next sampling period is the sampling period of the signal under test according to the host computer instruction, wherein the host computer instruction includes the sampling frequency of the signal under test;

[0017] If so, the trigger comparison value of the signal under test is set to be less than or equal to the maximum value of the counting signal, so that the trigger comparison value of the signal under test and the value of the counting signal will be cross-triggered in the next sampling period;

[0018] Otherwise, the trigger comparison value of the signal under test is set to be greater than the maximum value of the counting signal, so that the trigger comparison value of the signal under test and the value of the counting signal do not cross-trigger in the next sampling period.

[0019] Optionally, the host computer instructions may further include the sampling timing of the signal under test;

[0020] The trigger comparison value of the signal under test is also related to the sampling timing.

[0021] Secondly, embodiments of the present invention also provide a motor signal acquisition device, which includes: FlexPWM, a cross-triggered module, and an analog-to-digital conversion module;

[0022] The FlexPWM is used to generate a reload signal based on the sampling start signal, wherein the period, alignment mode and reload method of the reload signal are configured according to the sampling period of the fast signal in the signal under test.

[0023] The cross-triggering module includes a start unit, a trigger unit, and an adjustment unit. The start unit is used to initiate cross-triggering judgment based on the reload signal, thereby performing cross-triggering judgment by comparing the trigger comparison value of each signal under test with the value of the counting signal, wherein the value of the counting signal is reloaded according to the reload signal. The trigger unit is used to generate a sampling trigger signal for the signal under test when the trigger comparison value of the signal under test is equal to the value of the counting signal. The adjustment unit is used to change the trigger comparison value of the signal under test or the maximum value of the counting signal according to the host computer instruction during the cross-triggering judgment process, thereby adjusting the sampling time of the signal under test.

[0024] The analog-to-digital conversion module is used to activate the sampling channel corresponding to the signal under test according to the acquisition trigger signal of the signal under test, so as to acquire the corresponding signal under test.

[0025] Optionally, the adjustment unit includes: a slow cycle determination element, a first trigger comparison value modification element, and a second trigger comparison value modification element;

[0026] The slow period determination element is used to determine whether the next sampling period is the sampling period of the signal under test according to the host computer instruction, wherein the host computer instruction includes the sampling frequency of the signal under test;

[0027] The first trigger comparison value modification element is used to set the trigger comparison value of the signal under test to be less than or equal to the maximum value of the counting signal when the next sampling period is the sampling period of the signal under test, so that the trigger comparison value of the signal under test and the value of the counting signal will be cross-triggered in the next sampling period.

[0028] The second trigger comparison value modification element is used to set the trigger comparison value of the signal under test to be greater than the maximum value of the counting signal when the next sampling period is not the sampling period of the signal under test, so that the trigger comparison value of the signal under test and the value of the counting signal do not cross-trigger in the next sampling period.

[0029] Thirdly, embodiments of the present invention also provide a motor control system, which includes: any of the motor signal acquisition devices described in the second aspect, a host computer, and multiple sampling devices; the sampling devices are connected to the motor signal acquisition devices and are used to transmit sampling signals to the motor signal acquisition devices; the host computer is connected to the motor signal acquisition devices and is used to send host computer instructions to the motor signal acquisition devices.

[0030] Optionally, the motor signal acquisition device is integrated into a microprocessor.

[0031] The motor signal acquisition method provided in this invention utilizes the judgment of the cross-trigger module triggered by the overload signal of FlexPWM. The transmission of the overload signal does not occupy PWM channel resources, which can save channels and facilitate the functional expansion of the motor control system. The cross-trigger module can change the trigger comparison value of the signal under test or the maximum value of the count signal according to the host computer instruction. It can either achieve unified skipping of multiple signals under test by modifying the maximum value of the count signal, or achieve separate skipping of each signal under test by modifying the trigger comparison value of each signal under test. It can flexibly modify and restore the acquisition time of each signal under test, improving the flexibility and efficiency of signal acquisition. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating a motor signal acquisition method provided in an embodiment of the present invention;

[0033] Figure 2 This is a schematic diagram of the structure of a motor signal acquisition device provided in an embodiment of the present invention;

[0034] Figure 3 This is a schematic diagram of the signal change process for cross-triggering judgment provided in an embodiment of the present invention;

[0035] Figure 4 This is a schematic diagram of another signal change process for cross-triggering determination provided in an embodiment of the present invention;

[0036] Figure 5 This is a flowchart illustrating how to change the trigger comparison value or the maximum value of a counting signal of a signal under test, as provided in an embodiment of the present invention.

[0037] Figure 6 This is a schematic diagram of the structure of a motor signal acquisition device provided in an embodiment of the present invention;

[0038] Figure 7 This is a schematic diagram of a motor control system provided in an embodiment of the present invention. Detailed Implementation

[0039] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0040] As described in the background section, the timing of motor signal acquisition is crucial to the control accuracy of the motor. For example, on the one hand, when sampling the current flowing through a sampling resistor, sampling must be performed at the center point of the lower bridge arm's conduction. This is because sampling at this moment ensures the motor current flows through the sampling resistor, allowing for accurate and complete current value acquisition. Signals that change rapidly and require sampling at a specific time are called fast signals. On the other hand, analog circuit level transitions are slow. To eliminate interference, the motor current signal can only be accurately acquired after the MOSFET is fully turned on. Furthermore, current transformers are often used to sample the motor current signal in high-power motor control. Since the current transformer passes through the motor's phase lines, motor current sampling can occur at any time within the motor control cycle. Signals that change slowly and can be sampled over a longer period are called slow signals. To achieve synchronous acquisition of fast and slow signals, traditional motor signal acquisition methods set fast signals as an injection sampling group and slow signals as a regular sampling group. The regular sampling group signals are sampled regularly according to the motor cycle. In the regular sampling process, the signal acquisition of the injected sampling group is triggered by the pulse width modulation signal and has a higher priority than regular sampling. However, in motor control devices with limited pulse width modulation signal channel resources, it is necessary to acquire multiple motor signals. These motor signals are strictly set to be sampled at different times. The sampling method where slow signals give way to fast signals is prone to signal collision, which affects the flexibility of signal acquisition and results in low sampling efficiency.

[0041] To address the aforementioned problems, this invention provides a motor signal acquisition method, which is implemented using a motor signal acquisition device. Figure 1 This is a flowchart illustrating a motor signal acquisition method provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a motor signal acquisition device provided in an embodiment of the present invention, combined with... Figure 1 and Figure 2 Motor signal acquisition methods include:

[0042] S101, FlexPWM generates a reload signal based on the sampling start signal.

[0043] The reload signal (Reload) has its period, alignment mode, and reload method configured according to the sampling period of the fast signal in the signal under test. FlexPWM 201 refers to the flexible pulse width modulation module in the microcontroller unit, which can include multiple PWM signal generation circuits and counters, capable of generating PWM signals and reload signals for motor control applications. The sampling start signal (Start) is a signal generated by the motor control system based on changes in the motor's operating state or based on the input signal, used to control the motor signal acquisition device to begin sampling. The reload signal (Reload) is the counter reload signal generated by FlexPWM 201, which can initiate the operation of the cross-trigger module 202. FlexPWM 201 uses a centrally symmetrical counting mode and a full-cycle reload method; that is, the reload signal is generated at the end of the counter counting cycle in FlexPWM 201 to trigger the cross-trigger module 202.

[0044] Specifically, FlexPWM 201 starts the increment count of the counter based on the sampling start signal, and generates a reload signal Reload at the end of each counting cycle to trigger the cross trigger module 202.

[0045] S102, The cross-trigger module starts cross-trigger judgment based on the overload signal, so as to cross-trigger judgment between the trigger comparison value of each signal to be tested and the value of the counting signal.

[0046] The cross-trigger module 202 is an analysis module that performs cross-trigger judgment between the trigger comparison value of each signal under test and the counting signal within the period of the counting signal. The value of the counting signal is reloaded according to the reload signal Reload output by FlexPWM201, and its period is consistent with the period of the reload signal Reload.

[0047] Specifically, upon receiving the Reload signal, the counting signal of the cross-triggered module 202 is reloaded, and the cross-triggered module 202 begins to cross-trigger judgment between the trigger comparison value of each signal under test and the counting signal. During the counting process, if the trigger comparison value of the signal under test is equal to the real-time counting signal value, the acquisition of the signal under test corresponding to the trigger comparison value is initiated. Upon receiving the Reload signal again, the counting signal is reloaded, and another round of cross-triggered judgment begins.

[0048] S103. When the trigger comparison value of the signal under test is equal to the value of the counting signal, the cross-trigger module generates the acquisition trigger signal of the signal under test.

[0049] Specifically, during the cross-trigger judgment process, the counting signal can increment. When the value of the counting signal increases to be equal to the trigger comparison value of the signal under test, the cross-trigger module 202 generates a sampling trigger signal for the signal under test corresponding to the trigger comparison value. The sampling trigger signal can instruct the corresponding analog-to-digital conversion module 203 to open the sampling channel 204 of the corresponding signal under test, thereby realizing the sampling of the signal under test.

[0050] S104. During the cross-trigger judgment process, the cross-trigger module changes the trigger comparison value of the signal under test or the maximum value of the counting signal according to the host computer instruction, so as to adjust the acquisition time of the signal under test.

[0051] Among them, host computer instruction 205 refers to the control signal issued by the host computer that can modify the cross-judgment module program. Host computer instruction 205 can be an instruction input by the control personnel, or an instruction determined by the host computer based on real-time analysis of the motor's state changes.

[0052] Specifically, Figure 3 This is a schematic diagram illustrating the signal change process for cross-triggered judgment according to an embodiment of the present invention. Figure 4 This is a schematic diagram of another signal change process for cross-triggered judgment provided in an embodiment of the present invention, combined with... Figure 2 and Figure 3 The host computer instruction 205 can modify the maximum value C of the counting signal T in the cross-triggered module 202. After the counting signal T increments to this maximum value C, the value of the counting signal T will not increment further until reload. For example, if the first signal, the second signal, and the third signal need to be acquired sequentially at times T1, T2, and T3 in the first cycle, then the trigger comparison value R1 of the first signal is set to equal the value of the counting signal T at time T1, the trigger comparison value R2 of the second signal is equal to the value of the counting signal T at time T2, and the trigger comparison value R3 of the third signal is equal to the value of the counting signal T at time T3. In the second and third cycles, only the first and second signals need to be acquired sequentially at times T1 and T2, and the third signal does not need to be acquired. Therefore, before the start of the second cycle, the maximum value C of the counting signal T can be modified to be less than the trigger comparison value R3 of the third signal. The modified maximum value C of the counting signal T can be less than the trigger comparison value R3 of the third signal, which does not need to be acquired in the next cycle. If multiple signals do not need to be collected in the next cycle, the maximum value C of the counting signal can be set to a value that is less than the trigger comparison value of these signals to be tested, so as to achieve unified skipping of multiple signals to be tested.

[0053] Or, combine Figure 2 and Figure 4The host computer instruction 205 can also modify the trigger comparison values ​​(one or more of R1, R2, and R3, etc.) of each signal under test in the cross-trigger module 202. Before a certain cross-trigger judgment cycle, the trigger comparison value of the signal under test that is not collected in that cycle is adjusted to be greater than the maximum value C of the counting signal. The modified trigger comparison value of the signal under test is greater than the value C of the counting signal in the non-collection cycle, which can ensure that no cross-triggering occurs in that cycle, so as to achieve the separate skipping of each signal under test. In addition, in the cycle before the cycle in which the signal under test needs to be collected, the maximum value of the counting signal or the trigger comparison value of the signal under test can be adjusted back to the original value to achieve the resumption of the collection of the signal under test. For example, if the first signal, the second signal, and the third signal need to be collected sequentially at times T1, T2, and T3 in the first cycle, then the trigger comparison value R1 of the first signal is set to be equal to the value of the counting signal T at time T1, the trigger comparison value R2 of the second signal is equal to the value of the counting signal T at time T2, and the trigger comparison value R3 of the third signal is equal to the value of the counting signal T at time T3. In the second and third cycles, only the first and second signals need to be acquired sequentially at times T1 and T2, respectively. The third signal does not need to be acquired. Therefore, before the start of the second cycle, the trigger comparison value R3 of the third signal can be modified to be greater than the maximum value C of the counting signal T. In the next cycle, the modified trigger comparison value R3 of the third signal, which does not need to be acquired, can be greater than the maximum value C of the counting signal T, ensuring that the trigger comparison value R3 of the counting signal T and the third signal do not overlap. If multiple signals do not need to be acquired in the next cycle, the trigger comparison values ​​of several signals to be measured can all be set to be greater than the maximum value C of the counting signal T, thus allowing multiple signals to be skipped one by one.

[0054] S105. The analog-to-digital conversion module opens the sampling channel of the corresponding signal under test according to the acquisition trigger signal of the signal under test, so as to acquire the corresponding signal under test.

[0055] The analog-to-digital converter (ADC) module is a digital-to-analog converter connected to the sampling sensor. It converts the analog signals acquired by the sampling sensor into digital signals, stores and forwards them. The ADC may include multiple sampling channels, each connected to a different sampling sensor. The ADC module can activate the corresponding sampling channel based on the acquisition trigger signal to acquire the corresponding signal under test.

[0056] Specifically, the analog-to-digital converter (ADC) module can include multiple sampling channels. Each sampling channel is connected to a sampling sensor and can receive one signal to be measured. When a trigger signal for acquisition of the signal to be measured is received, the ADC module can activate the corresponding sampling channel for the signal to be measured and acquire the signal through the acquisition channel. When there are many signals to be measured, there may be a need to acquire multiple signals simultaneously. In this case, multiple ADC modules can be set up. One acquisition trigger signal corresponds to multiple signals to be measured, and the acquisition channels for multiple signals to be measured are set up in different ADC modules, which can realize the simultaneous acquisition of multiple signals to be measured and improve the efficiency of signal acquisition.

[0057] The motor signal acquisition method provided in this embodiment utilizes the judgment of the cross-trigger module triggered by the overload signal of FlexPWM. The transmission of the overload signal does not occupy PWM channel resources, which can save channels and facilitate the functional expansion of the motor control system. The cross-trigger module can change the trigger comparison value of the signal under test or the maximum value of the count signal according to the host computer instruction. It can either achieve unified skipping of multiple signals under test by modifying the maximum value of the count signal, or achieve individual skipping of each signal under test by modifying the trigger comparison value of each signal under test. It can flexibly modify and restore the acquisition time of each signal under test, improving the flexibility and efficiency of signal acquisition.

[0058] Optionally, continue to refer to Figure 2 Based on the aforementioned embodiments, the number of analog-to-digital conversion modules 203 is at least two; one trigger comparison value corresponds to at least two signals to be tested, and the sampling channels 204 of different signals to be tested corresponding to one trigger comparison value are respectively set in different analog-to-digital conversion modules 203, wherein the signal types of the at least two signals to be tested corresponding to one trigger comparison value are the same, and the signal types include fast signals and slow signals.

[0059] Specifically, the analog-to-digital converter (ADC) module 203 can store the correspondence information between trigger comparison values ​​and the signals under test. For example, the number of ADC modules 203 is three. In the first group, the first trigger comparison values ​​correspond to the motor temperature, IGBT temperature, and cooling fan operating current, respectively. In the second group, the second trigger comparison values ​​correspond to the first phase current, second phase current, and third phase current of the motor, respectively. The number of groups can be set according to the number of sampling channels 204 of the ADC module 203. After receiving the sampling trigger signal, the ADC module 203 opens the corresponding sampling channel 204 according to the group number marker contained in the sampling trigger signal. The group number marker can correspond one-to-one with the trigger comparison value. For example, after receiving the sampling trigger signal generated by cross-judgment based on the first trigger comparison value, the first ADC module opens the motor temperature acquisition channel, the second ADC module opens the IGBT temperature acquisition channel, and the third ADC module opens the cooling fan operating current acquisition channel. Multiple signals under test corresponding to one trigger comparison value have the same signal type, which can all be fast signals or all be slow signals. The sampling channels 204 of multiple signals to be tested corresponding to a single trigger comparison value are respectively set in different analog-to-digital conversion modules 203, which can realize the simultaneous sampling of multiple signals.

[0060] For example, the number of analog-to-digital conversion (ADC) modules is two. The first ADC module includes a sampling channel for the first phase current, a sampling channel for the second phase current, and a sampling channel for the motor temperature. The second ADC module includes a sampling channel for the third phase current, a sampling channel for the bus voltage, and a sampling channel for the IGBT temperature. The first phase current and the third phase current correspond to the same trigger comparison value, denoted as the first comparison value; the second phase current and the bus voltage correspond to the same trigger comparison value, denoted as the second comparison value; and the motor temperature and the IGBT temperature correspond to the same trigger comparison value, denoted as the third comparison value. During the cross-trigger judgment process, when the first comparison value and the value of the counting signal cross-equal, the cross-trigger module generates a first sampling trigger signal. The first ADC module activates the sampling channel for the first phase current based on the first sampling trigger signal, while the second ADC module activates the sampling channel for the third phase current based on the first sampling trigger signal, thus achieving simultaneous acquisition of the first and third phase currents. When the second comparison value and the count signal cross-equal, the cross-trigger module generates a second sampling trigger signal. The first analog-to-digital converter (ADC) activates the sampling channel for the second-phase current based on this signal, while the second ADC activates the sampling channel for the bus voltage, achieving simultaneous acquisition of the second-phase current and bus voltage. When the third comparison value and the count signal cross-equal, the cross-trigger module generates a third sampling trigger signal. The first ADC activates the sampling channel for the motor temperature based on this signal, while the second ADC activates the sampling channel for the IGBT temperature, achieving simultaneous acquisition of the motor temperature and IGBT temperature.

[0061] The motor signal acquisition method provided in this embodiment uses multiple analog-to-digital conversion modules to control the sampling channels, so that one trigger comparison value can correspond to multiple signals to be measured, realizing the simultaneous acquisition of multiple signals to be measured, which can further improve the acquisition efficiency of motor signals, and can be set according to the type of signal to be measured.

[0062] Optionally, Figure 5 This is a flowchart illustrating how to change the trigger comparison value or the maximum value of a counting signal of a signal under test, as provided in an embodiment of the present invention. (Refer to...) Figure 5 Based on the aforementioned embodiments, step S104, during the cross-trigger determination process, involves the cross-trigger module changing the trigger comparison value or the maximum value of the count signal of the signal under test according to the host computer instruction, in order to adjust the acquisition time of the signal under test, including:

[0063] S601. Determine whether the next sampling period is the sampling period of the signal to be measured based on the instructions from the host computer.

[0064] The host computer instructions include the sampling frequency of the signal to be measured.

[0065] Specifically, the sampling frequency determines the sampling time of the signal under test, thus indicating whether the next sampling period is the sampling period of the signal under test. If the next sampling time of the period of the signal under test is not within the range of the next sampling period, then the next sampling period is not the sampling period of the signal under test. If the next sampling time of the period of the signal under test is within the range of the next sampling period, then the next sampling period is the sampling period of the signal under test.

[0066] S602. If so, the trigger comparison value of the signal under test is set to be less than or equal to the maximum value of the counting signal, so that the trigger comparison value of the signal under test and the value of the counting signal will be cross-triggered in the next sampling period.

[0067] Specifically, setting the trigger comparison value of the signal under test to be less than or equal to the maximum value of the counting signal can be achieved by modifying either the trigger comparison value of the signal under test or the maximum value of the counting signal. For example, if the current period is the acquisition period for a certain signal under test, and the next period is also the acquisition period for that signal under test, and the trigger comparison value of the signal under test is already less than or equal to the maximum value of the counting signal within the current period, then neither the trigger comparison value nor the maximum value of the counting signal needs to be changed within the current period. If the current period is not the acquisition period for a certain signal under test, but the next period is the acquisition period for that signal, and the trigger comparison value of the signal under test is greater than the maximum value of the counting signal within the current period, then the trigger comparison value of the signal under test needs to be decreased or the maximum value of the counting signal needs to be increased within the current period to make the trigger comparison value of the signal under test less than or equal to the maximum value of the counting signal, so that the trigger comparison value of the signal under test and the value of the counting signal can cross-trigger in the next sampling period. It should be noted that the host computer instructions can also include the sampling timing of the signal under test. In the process of setting the trigger comparison value of the signal under test, the size relationship between the corresponding trigger comparison values ​​can also be set according to the sampling timing of each signal under test. For example, if the acquisition sequence of the first phase current needs to be set before the IGBT temperature, then the trigger comparison value corresponding to the first phase current is set to be less than the trigger comparison value corresponding to the IGBT temperature, so that the generation time of the acquisition trigger signal of the first phase current is earlier than the acquisition trigger signal of the IGBT temperature, thereby realizing the acquisition of the first phase current before the acquisition of the IGBT temperature.

[0068] S603. Otherwise, set the trigger comparison value of the signal under test to be greater than the maximum value of the counting signal so that the trigger comparison value of the signal under test and the value of the counting signal do not cross-trigger in the next sampling period.

[0069] Specifically, similar to the previous step, setting the trigger comparison value of the signal under test to be greater than the maximum value of the counting signal can be achieved by modifying either the trigger comparison value of the signal under test or the maximum value of the counting signal. For example, if the current period is not the acquisition period for a particular signal under test, but the next period is, and the trigger comparison value of the signal under test is already greater than the maximum value of the counting signal in the current period, then neither the trigger comparison value nor the maximum value of the counting signal needs to be changed in the current period. However, if the current period is the acquisition period for a particular signal under test, but the next period is not, and the trigger comparison value of the signal under test is less than or equal to the maximum value of the counting signal in the current period, then the trigger comparison value of the signal under test needs to be increased or the maximum value of the counting signal needs to be decreased in the current period to ensure that the trigger comparison value of the signal under test is greater than the maximum value of the counting signal. This prevents cross-triggering between the trigger comparison value of the signal under test and the value of the counting signal in the next sampling period.

[0070] The motor signal acquisition method provided in this embodiment utilizes the judgment of the cross-trigger module triggered by the overload signal of FlexPWM. The transmission of the overload signal does not occupy PWM channel resources, which can save channels and facilitate the functional expansion of the motor control system. The cross-trigger module can change the trigger comparison value or the maximum value of the count signal of the test signal according to the host computer instruction. It can achieve unified skipping of multiple test signals by modifying the maximum value of the count signal, or it can achieve individual skipping of each test signal by modifying the trigger comparison value of each test signal. It can also set the trigger comparison value according to the acquisition timing and acquisition frequency of the test signals in the host computer signal, which can flexibly modify and restore the acquisition time of each test signal, adjust the order of the test signals, and further improve the flexibility and efficiency of signal acquisition.

[0071] This invention also provides a motor acquisition device. Figure 6 This is a schematic diagram of a motor signal acquisition device provided in an embodiment of the present invention, with reference to... Figure 6The motor signal acquisition device includes: FlexPWM 201, cross-trigger module 202, and analog-to-digital converter module 203. FlexPWM 201 generates a reload signal based on the sampling start signal, wherein the period, alignment mode, and reload method of the reload signal are configured according to the sampling period of the fast signal in the test signal. Cross-trigger module 202 includes a start unit 701, a trigger unit 702, and an adjustment unit 703. The start unit 701 initiates cross-trigger judgment based on the reload signal, cross-triggering the trigger comparison value of each test signal with the value of the counting signal, wherein the value of the counting signal is reloaded based on the reload signal. The trigger unit 702 generates a test signal acquisition trigger signal when the trigger comparison value of the test signal is equal to the value of the counting signal. The adjustment unit 603 changes the trigger comparison value of the test signal according to the host computer instruction during the cross-trigger judgment process to adjust the acquisition time of the test signal. The analog-to-digital converter module 203 activates the sampling channel of the corresponding test signal based on the test signal acquisition trigger signal to acquire the corresponding test signal.

[0072] The motor signal acquisition device provided in this embodiment utilizes the judgment of the cross-trigger module triggered by the heavy-load signal of FlexPWM. The transmission of the heavy-load signal does not occupy PWM channel resources, which can save channels and facilitate the functional expansion of the motor control system. The cross-trigger module can change the trigger comparison value of the signal under test or the maximum value of the count signal according to the host computer instruction. It can either achieve unified skipping of multiple signals under test by modifying the maximum value of the count signal, or achieve separate skipping of each signal under test by modifying the trigger comparison value of each signal under test. It can flexibly modify and restore the acquisition time of each signal under test, improving the flexibility and efficiency of signal acquisition.

[0073] Optionally, based on the aforementioned embodiments, the adjustment unit includes: a slow period judgment element, a first trigger comparison value modification element, and a second trigger comparison value modification element. The slow period judgment element is used to determine whether the next sampling period is the sampling period of the signal under test according to the host computer instruction, wherein the host computer instruction includes the sampling frequency of the signal under test. The first trigger comparison value modification element is used to set the trigger comparison value of the signal under test to be less than or equal to the maximum value of the counting signal when the next sampling period is the sampling period of the signal under test, so that the trigger comparison value of the signal under test and the value of the counting signal cross-trigger in the next sampling period. The second trigger comparison value modification element is used to set the trigger comparison value of the signal under test to be greater than the maximum value of the counting signal when the next sampling period is not the sampling period of the signal under test, so that the trigger comparison value of the signal under test and the value of the counting signal do not cross-trigger in the next sampling period.

[0074] The motor signal acquisition device provided in this embodiment utilizes the judgment of the cross-trigger module triggered by the heavy-load signal of FlexPWM. The transmission of the heavy-load signal does not occupy PWM channel resources, which can save channels and facilitate the functional expansion of the motor control system. The cross-trigger module can change the trigger comparison value or the maximum value of the count signal of the test signal according to the host computer instruction. It can achieve unified skipping of multiple test signals by modifying the maximum value of the count signal, or it can achieve individual skipping of each test signal by modifying the trigger comparison value of each test signal. It can also set the trigger comparison value according to the acquisition timing and acquisition frequency of the test signals in the host computer signal, which can flexibly modify and restore the acquisition time of each test signal, adjust the order of the test signals, and further improve the flexibility and efficiency of signal acquisition.

[0075] This invention also provides a motor control system. Figure 7 This is a schematic diagram of a motor control system provided in an embodiment of the present invention, with reference to... Figure 7 The motor control system 700 includes: the aforementioned arbitrary motor signal acquisition device 200, the host computer 701, and multiple sampling devices 702; the sampling devices 702 are connected to the motor signal acquisition device 200 and are used to transmit sampling signals to the motor signal acquisition device 200; the host computer 701 is connected to the motor signal acquisition device 200 and is used to send host computer commands to the motor signal acquisition device 200.

[0076] Among them, the sampling device 702 refers to the sensing device installed on the motor and its control circuit, which can collect the current signals of each phase of the motor, the voltage of each line, the temperature signals of each position, and any sensing signals related to motor control.

[0077] Optionally, the motor signal acquisition device 200 is integrated into a microprocessor. The microprocessor can be an automotive-grade microprocessor. For example, the motor signal acquisition device can be integrated into an SPC56EL60L5 microprocessor, which can improve signal processing speed and further improve signal acquisition efficiency.

[0078] The motor signal acquisition method, device, and motor control system provided in this embodiment utilize the judgment of the cross-trigger module triggered by the heavy-load signal of FlexPWM. The transmission of the heavy-load signal does not occupy PWM channel resources, which can save channels and facilitate the functional expansion of the motor control system. The cross-trigger module can change the trigger comparison value or the maximum value of the count signal of the signal under test according to the host computer instruction. It can achieve unified skipping of multiple signals under test by modifying the maximum value of the count signal, or it can achieve individual skipping of each signal under test by modifying the trigger comparison value of each signal under test. It can also set the trigger comparison value according to the acquisition timing and acquisition frequency of the signals under test in the host computer signal, which can flexibly modify and restore the acquisition time of each signal under test, adjust the order of the signals under test, and further improve the flexibility and efficiency of signal acquisition.

[0079] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, combinations, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for acquiring motor signals, characterized in that, include: FlexPWM generates a reload signal based on the sampling start signal, wherein the period, alignment mode, and reload method of the reload signal are all configured according to the sampling period of the fast signal in the signal under test; The cross-trigger module starts cross-trigger judgment based on the reload signal, and cross-triggers judgment by comparing the trigger comparison value of each signal under test with the value of the counting signal, wherein the value of the counting signal is reloaded according to the reload signal; When the trigger comparison value of the signal under test is equal to the value of the counting signal, the cross-trigger module generates the acquisition trigger signal of the signal under test; During the cross-trigger determination process, the cross-trigger module changes the trigger comparison value of the signal under test or the maximum value of the counting signal according to the host computer instruction to adjust the acquisition time of the signal under test. Specifically, this includes: determining whether the next sampling period is the sampling period of the signal under test according to the host computer instruction, wherein the host computer instruction includes the sampling frequency of the signal under test; if so, setting the trigger comparison value of the signal under test to be less than or equal to the maximum value of the counting signal, so that the trigger comparison value of the signal under test and the value of the counting signal cross-trigger in the next sampling period; otherwise, setting the trigger comparison value of the signal under test to be greater than the maximum value of the counting signal, so that the trigger comparison value of the signal under test and the value of the counting signal do not cross-trigger in the next sampling period. The analog-to-digital conversion module activates the sampling channel corresponding to the signal under test according to the acquisition trigger signal of the signal under test, so as to acquire the corresponding signal under test.

2. The motor signal acquisition method according to claim 1, characterized in that, The number of analog-to-digital conversion modules is at least two; each trigger comparison value corresponds to at least two signals under test, and the sampling channels of different signals under test corresponding to each trigger comparison value are respectively set in different analog-to-digital conversion modules, wherein the signal types of the at least two signals under test corresponding to each trigger comparison value are the same, and the signal types include fast signals and slow signals.

3. The motor signal acquisition method according to claim 2, characterized in that, The number of analog-to-digital conversion modules is 2.

4. The motor signal acquisition method according to claim 3, characterized in that, One of the analog-to-digital conversion modules includes a sampling channel for the first phase current, a sampling channel for the second phase current, and a sampling channel for the motor temperature; the other analog-to-digital conversion module includes a sampling channel for the third phase current, a sampling channel for the bus voltage, and a sampling channel for the IGBT temperature; wherein the first phase current and the third phase current correspond to the same trigger comparison value, the second phase current and the bus voltage correspond to the same trigger comparison value, and the motor temperature and the IGBT temperature correspond to the same trigger comparison value.

5. The motor signal acquisition method according to claim 1, characterized in that, The host computer instructions also include the sampling timing of the signal to be tested; The trigger comparison value of the signal under test is also related to the sampling timing.

6. A motor signal acquisition device, characterized in that, include: FlexPWM, cross-triggered module, and analog-to-digital converter module; The FlexPWM is used to generate a reload signal based on the sampling start signal, wherein the period, alignment mode and reload method of the reload signal are configured according to the sampling period of the fast signal in the signal under test. The cross-triggering module includes a start unit, a trigger unit, and an adjustment unit. The start unit is used to initiate cross-triggering judgment based on the reload signal, thereby performing cross-triggering judgment by comparing the trigger comparison value of each signal under test with the value of the counting signal, wherein the value of the counting signal is reloaded according to the reload signal. The trigger unit is used to generate a trigger signal for acquiring the signal under test when the trigger comparison value of the signal under test is equal to the value of the counting signal. The adjustment unit is used to change the trigger comparison value of the signal under test or the maximum value of the counting signal according to the host computer instruction during the cross-triggering judgment process, thereby adjusting the acquisition time of the signal under test. The adjustment unit specifically includes a slow cycle judgment element, a first trigger comparison value modification element, and a second trigger comparison value modification element. The slow cycle judgment element is used to... The host computer determines whether the next sampling period is the sampling period of the signal under test according to the host computer instruction, wherein the host computer instruction includes the sampling frequency of the signal under test; the first trigger comparison value modification element is used to set the trigger comparison value of the signal under test to be less than or equal to the maximum value of the counting signal when the next sampling period is the sampling period of the signal under test, so that the trigger comparison value of the signal under test and the value of the counting signal cross-trigger in the next sampling period; the second trigger comparison value modification element is used to set the trigger comparison value of the signal under test to be greater than the maximum value of the counting signal when the next sampling period is not the sampling period of the signal under test, so that the trigger comparison value of the signal under test and the value of the counting signal do not cross-trigger in the next sampling period; The analog-to-digital conversion module is used to activate the sampling channel corresponding to the signal under test according to the acquisition trigger signal of the signal under test, so as to acquire the corresponding signal under test.

7. A motor control system, characterized in that, include: The motor signal acquisition device, host computer, and multiple sampling devices as described in claim 6; The sampling device is connected to the motor signal acquisition device and is used to transmit sampling signals to the motor signal acquisition device; the host computer is connected to the motor signal acquisition device and is used to send host computer commands to the motor signal acquisition device.

8. The motor control system according to claim 7, characterized in that, The motor signal acquisition device is integrated into a microprocessor.