A low-frequency acquisition method and system for a 10khz high-frequency signal and a medium
By reducing the signal frequency through a caching module and storing high-frequency signals in an array, the problem of signal loss in the FOC control of the motor system is solved, enabling low-frequency reading of high-frequency signals and improving the accuracy and stability of data acquisition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 柳州赛克科技发展有限公司
- Filing Date
- 2023-05-24
- Publication Date
- 2026-07-24
Smart Images

Figure CN116737071B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle controller technology, and in particular to a low-frequency acquisition method, system and medium for 10kHz high-frequency signals. Background Technology
[0002] In the field-oriented control (FOC) of a motor system, the acquisition of the three-phase current output to the motor and the accurate acquisition of the bus voltage are crucial. To ensure the accuracy of the data acquired in the calibration environment, the acquisition frequency must be consistent with the FOC process signal acquisition frequency. Currently, in related technologies, the motor controller's underlying layer acquires FOC process signals such as three-phase current and bus voltage at a high frequency of 10kHz. In the calibration environment, however, the signals can only be read at a 10ms period, and high-frequency signals are easily lost during the reading process. Summary of the Invention
[0003] The main objective of this invention is to provide a low-frequency acquisition method, system, and medium for 10kHz high-frequency signals. The aim is to reduce the frequency by using a buffer, enabling low-frequency signal reading in a calibration environment, and preventing the loss of high-frequency signals during the reading process.
[0004] To achieve the above objectives, this invention proposes a low-frequency acquisition method for 10kHz high-frequency signals, the method comprising the following steps:
[0005] Step S10: Use the output signals of each FOC process as the input signals of this data buffer module;
[0006] Step S20: Reallocate the application layer program memory space to increase the number of arrays that can be placed to ten, and connect the input end of the array to an intermediate variable;
[0007] Step S30: Set ten calibrators to correspond one-to-one with ten arrays. By configuring the ten calibrators, specific high-frequency input signals are assigned to intermediate variables to avoid the invalid occupation of resource space caused by continuous cached data.
[0008] Step S40: Set the array length to 1000, and store the input signal into the array once every 0.1ms at a frequency of 10kHz.
[0009] A further technical solution of the present invention is that, before step S40, the following is also included:
[0010] S1: Establish an application layer software model based on ASCET, and set the task scheduling of the application layer software model as a FOC process:
[0011] S2: Integrate the data caching module into the entire controller software project to generate A2L and S19 files;
[0012] S3: Burn the S19 file to the motor controller using the simulator;
[0013] S5: Connect the calibration CAN channel of the motor controller to the host computer using the calibration tool ES582.1;
[0014] S6: Retrieve all input signals, ten buffer arrays, and ten control calibrators of the FOC process in the INCA environment;
[0015] S7: Quantitatively observe whether the selected FOC input signal is stored in a specific array by configuring ten control calibrators.
[0016] A further technical solution of the present invention is that the method further includes:
[0017] Step S01: Set a data cache switch and an array full judgment value. The data cache switch is used to enable and disable the high-frequency data cache module function, and the array full judgment value is used to determine whether the array of length 1000 is full.
[0018] When the data cache switch is set, the cache function is enabled, and step S05 is executed; when the data cache switch is reset, the cache function is disabled, and step S03 is executed.
[0019] Step S02: When the array is full and the judgment value is less than 1000, that is, when there are still empty addresses in the array available for data to be stored, the array is full and the judgment value is incremented by 1, and the sampling signal continues to be stored in the next empty address of the array.
[0020] Step S03: Disable caching;
[0021] Step S04: When the array is full, the check value is incremented to 1000, the array is cleared to zero, and data caching begins for the next cycle.
[0022] Step S05: Sample the input signal every 0.1ms;
[0023] Step S06: Select configuration, configure specific high-frequency signals to store data according to user needs, and realize the data caching module function.
[0024] To achieve the above objectives, the present invention also proposes a low-frequency acquisition system for a 10kHz high-frequency signal. The system includes a memory, a processor, and a low-frequency acquisition program for the 10kHz high-frequency signal stored on the processor. When the processor runs the low-frequency acquisition program for the 10kHz high-frequency signal, it executes the steps of the method described in any one of claims 1 to 3.
[0025] To achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a low-frequency acquisition program for a 10kHz high-frequency signal, wherein the low-frequency acquisition program for the 10kHz high-frequency signal is executed by a processor to perform the steps of the method described above.
[0026] The beneficial effects of the low-frequency acquisition method, system, and medium for 10kHz high-frequency signals of this invention are:
[0027] This invention, through the aforementioned technical solution, caches high-frequency data in an array, reducing the frequency by utilizing the cache. This allows for low-frequency signal reading in a calibration environment. Each time the cached data is retrieved in the calibration environment, multiple sets of high-frequency signal changes can be collected, preventing the loss of high-frequency signals during the reading process. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating a preferred embodiment of the low-frequency acquisition method for 10kHz high-frequency signals of the present invention.
[0029] Figure 2 This is a schematic diagram of the overall process of the low-frequency acquisition method for 10kHz high-frequency signals of the present invention;
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. Detailed Implementation
[0031] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0032] This invention proposes a low-frequency acquisition method for 10kHz high-frequency signals. This invention utilizes buffering to reduce the frequency, enabling low-frequency signal reading in a calibration environment and preventing the loss of high-frequency signals during the reading process.
[0033] Specifically, such as Figure 1 As shown, a preferred embodiment of the low-frequency acquisition method for a 10kHz high-frequency signal of the present invention includes the following steps:
[0034] Step S10: Use the output signals of each FOC process as the input signals of this data cache module.
[0035] Step S20: Reallocate the application layer program memory space to increase the number of arrays that can be placed to ten, and connect the input of the array to an intermediate variable.
[0036] Step S30: Set ten calibrators to correspond one-to-one with ten arrays. By configuring the ten calibrators, specific high-frequency input signals are assigned to intermediate variables to avoid the invalid occupation of resource space caused by continuous cached data.
[0037] Step S40: Set the array length to 1000, and store the input signal into the array once every 0.1ms at a frequency of 10kHz.
[0038] In the calibration environment, the data cached in the array is retrieved once every 10ms. That is, each time the data cached in the array is retrieved, 100 sets of high-frequency signal change values can be collected, thus realizing the high-frequency buffering function.
[0039] This embodiment caches high-frequency data in an array, reducing the frequency and enabling low-frequency signal reading in the calibration environment. Each time the cached data is retrieved in the calibration environment, multiple sets of high-frequency signal changes can be collected, preventing the loss of high-frequency signals during the reading process.
[0040] This embodiment uses data cached in an array to analyze and resolve the current fluctuation problem in vehicle calibration, providing support for software calibration, improving the work efficiency of calibration engineers and test engineers, and reducing labor costs.
[0041] The low-frequency acquisition method for the 10kHz high-frequency signal in this embodiment is easy to implement. Only ten calibration parameters need to be configured in the calibration software experimental environment to select ten signals for buffering and retrieval, reducing operational complexity. This embodiment maintains the strong timeliness of data in the buffer space, thereby avoiding the invalid occupation of resource space caused by continuous buffering data, and ensuring the continuous and stable operation of the entire motor control system.
[0042] In this embodiment, the specific tools involved in the low-frequency acquisition method of the 10kHz high-frequency signal include: ASCET, INCA, motor controller, simulator, calibration tool ES582.1, and host computer (Windows 7 or later). In this embodiment, the following steps are included before step S40:
[0043] S1: Establish an application layer software model based on ASCET, and set the task scheduling of the application layer software model as a FOC process;
[0044] S2: Integrate the data caching module into the entire controller software project to generate A2L and S19 files:
[0045] S3: Burn the S19 file to the motor controller using the simulator;
[0046] S5: Connect the calibration CAN channel of the motor controller to the host computer using the calibration tool ES582.1;
[0047] S6: Retrieve all input signals, ten buffer arrays, and ten control calibrators of the FOC process in the INCA environment;
[0048] S7: Quantitatively observe whether the selected FOC input signal is stored in a specific array by configuring ten control calibrators.
[0049] It should be noted that in this embodiment, the allocation of task scheduling during the model building stage determines the frequency of data acquisition and storage; the data cache configuration section can select and store all input signals as needed, making full use of the application layer software memory allocation space and reducing chip costs.
[0050] Furthermore, in this embodiment, as Figure 2 As shown, the low-frequency acquisition method for this 10kHz high-frequency signal also includes the following steps:
[0051] Step S01: Set a data cache switch [flagCurr] (calibration value) and an array full judgment value [Count]. The data cache switch [flagCurr] (calibration value) is used to enable and disable the high-frequency data cache module function, and the array full judgment value [Count] is used to determine whether an array of length 1000 is full.
[0052] When the data cache switch [flagCurr] is set, the cache function is enabled, and step S05 is executed; when the data cache switch [flagCurr] is reset, the cache function is disabled, and step S03 is executed.
[0053] Step S02: When the array is full and the count is less than 1000, meaning there are still empty addresses in the array available for data storage, the count is incremented by 1, and the sampled signal continues to be stored in the next empty address of the array.
[0054] Step S03: Disable caching.
[0055] Step S04: When the array is full and the count is incremented to 1000, the count is cleared to zero and data caching begins for the next cycle.
[0056] Step S05: Sample the input signal every 0.1ms.
[0057] The sampled input signals include:
[0058] PhaseCurr_uUsig, PhaseCurr_uVsig, PhaseCurr_uWsig: U / V / W three-phase voltage values:
[0059] PhaseCurr_iU, PhaseCurr_iV, PhaseCurr_iW: U / V / W three-phase current values;
[0060] MotRDC_agRIc: Sampled value of motor electrical angle;
[0061] MotRDC_wELCAngSpdRaw: Raw value of electric angular velocity;
[0062] FOCCtl_iDAxisCurAct, FOCCtl_iQAxisCurAct: Actual values of D-axis current;
[0063] FOCCtl_iDAxisCurAct, FOCCtl_iQAxisCurAct: D-axis current filter values;
[0064] FOCCtl_ratPWMU, FOCCtl_ratPWMV, FOCCtl_ratPWMW: U / V / W three-phase PWM duty cycle;
[0065] FOCCtl_UaSP, FOCCtl_UbSP, FOCCtl_UdSP: Target voltages for the a / b / d axes.
[0066] All the above sampled input signals are 10kHz signals, meaning they are sampled once every 0.1ms.
[0067] Step S06: Select configuration, configure specific high-frequency signals to store data according to user needs, and realize the data caching module function.
[0068] The beneficial effects of the low-frequency acquisition method for 10kHz high-frequency signals of this invention are:
[0069] This invention, through the aforementioned technical solution, caches high-frequency data in an array, reducing the frequency by utilizing the cache. This allows for low-frequency signal reading in a calibration environment. Each time the cached data is retrieved in the calibration environment, multiple sets of high-frequency signal changes can be collected, preventing the loss of high-frequency signals during the reading process.
[0070] To achieve the above objectives, the present invention also proposes a low-frequency acquisition system for 10kHz high-frequency signals. The system includes a memory, a processor, and a low-frequency acquisition program for 10kHz high-frequency signals stored on the processor. When the processor runs the low-frequency acquisition program for 10kHz high-frequency signals, it executes the steps described in the above embodiments, which will not be repeated here.
[0071] To achieve the above objectives, the present invention also proposes a computer-readable storage medium, characterized in that the computer-readable storage medium stores a low-frequency acquisition program for a 10kHz high-frequency signal, and the low-frequency acquisition program for the 10kHz high-frequency signal is executed by a processor to perform the steps described in the above embodiments, which will not be repeated here.
[0072] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural changes made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A low-frequency acquisition method for a 10kHz high-frequency signal, characterized in that, The method includes the following steps: Step S10: Use the output signals of each FOC process as the input signals of this data buffer module; Step S20: Reallocate the application layer program memory space to increase the number of arrays that can be placed to ten, and connect the input end of the array to an intermediate variable; Step S30: Set ten calibrators to correspond one-to-one with ten arrays. By configuring the ten calibrators, specific high-frequency input signals are assigned to intermediate variables to avoid the invalid occupation of resource space caused by continuous cached data. Step S40: Set the array length to 1000, and store the input signal into the array once every 0.1ms at a frequency of 10kHz. The procedure preceding step S40 also includes: S1: Establish an application layer software model based on ASCET, and set the task scheduling of the application layer software model as a FOC process; S2: Integrate the data caching module into the entire controller software project to generate A2L and S19 files; S3: Burn the S19 file to the motor controller using the simulator; S5: Connect the calibration CAN channel of the motor controller to the host computer using the calibration tool ES582.1; S6: Retrieve all input signals, ten buffer arrays, and ten control calibrators of the FOC process in the INCA environment; S7: Quantitatively observe whether the selected FOC input signal is stored in a specific array by configuring ten control calibrators.
2. The low-frequency acquisition method for a 10kHz high-frequency signal according to claim 1, characterized in that, The method further includes: Step S01: Set a data cache switch and an array full check value. The data cache switch is used to enable and disable the high-frequency data cache module function, and the array full check value is used to determine whether the array of length 1000 is full.
3. A low-frequency acquisition system for a 10kHz high-frequency signal, characterized in that, The system includes a memory, a processor, and a low-frequency acquisition program for a 10kHz high-frequency signal stored on the processor. The low-frequency acquisition program for the 10kHz high-frequency signal is executed by the processor to perform the steps of the method as described in any one of claims 1 to 2.
4. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a low-frequency acquisition program for a 10kHz high-frequency signal, which, when run by a processor, executes the steps of the method as described in any one of claims 1 to 2.