Method and device for evaluating computing power of electronic oil pump controller, computer device and storage medium
Patent Information
- Application Number
- CN202611145716.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-20
AI Technical Summary
首先是成本增加的问题
[0040]上述电子油泵控制器的算力评估方法、装置、计算机设备和存储介质,从三个相互独立的技术维度出发,分别基于控制代码执行量、模数转换速率要求以及脉宽调制分辨率要求对控制器主频进行估算,最后综合三个维度的计算结果得到最终的算力需求范围。该方法避免了传统人工经验选型时的最大冗余保守策略,能够更加精准地定位控制器的实际算力需求,有效防止过度选型带来的成本浪费。此外,本申请的评估方法仅需输入若干系统参数和代码编译结果,便能够快速准确地求得电子油泵控制器的算力区间,整个计算过程逻辑清晰、公式明确,可直接通过脚本或表格工具自动化实现。这为控制器芯片的选型提供了有力的数据支持,使得研发人员在项目初期就能够选定合适规格的控制器,无需等到设计成熟后再进行降本优化,显著缩短了产品的研发周期,降低了开发成本,提高了整体的经济效益。同时,三个维度分别对应控制系统中运算、采样和输出三个核心环节的性能约束,评估结果全面可靠,能够确保选型后的控制器在各个功能模块上都满足系统要求,不会出现某一环节算力不足的瓶颈问题。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive electronics technology, and in particular to a computing power evaluation method, apparatus, computer equipment, and storage medium for an electronic oil pump controller. Background Technology
[0002] Electronic oil pumps are primarily responsible for providing stable oil pressure and lubrication to the engine and transmission components. They offer significant advantages such as energy saving, high efficiency, and low noise, making them particularly suitable for the powertrains of modern hybrid and electric vehicles. With the increasing electrification of automobiles, the application scenarios for electronic oil pumps are becoming more widespread, and the requirements for their control precision and response speed are also increasing. The controller, as the core electronic control unit of the electronic oil pump, directly affects the overall performance of the pump due to its computing power.
[0003] The common practice in the industry is that engineers tend to choose controller chips with significantly higher computing power in the initial R&D stage to ensure that the electronic oil pump's various performance indicators can be met smoothly. Once the product design is mature and all functions have been verified, the controller is then downgraded and replaced with a chip with lower computing power. This development model of selecting high-performance chips first and then downgrading them has several drawbacks. First, there's the issue of increased costs. The purchase price of high-performance controller chips is usually much higher than that of ordinary chips. Using high-specification chips throughout the R&D cycle significantly increases material costs and prototype manufacturing costs. Second, there's the issue of design complexity. Controllers with higher computing power often come with more complex peripheral interfaces and more functional pins, correspondingly increasing the complexity of hardware schematics and printed circuit board designs, increasing design workload and the probability of errors. Third, there's the issue of resource redundancy. Over-selection results in most of the controller's computing resources being idle. While this doesn't affect functionality, it wastes chip resources and is detrimental to product cost optimization. Finally, there's the issue of delay optimization. Replacing a lower-specification controller with a fully matured design requires re-porting the software and re-verifying its performance. This not only extends the product optimization cycle but may also introduce new compatibility risks, slowing down the overall R&D progress and time to market. Summary of the Invention
[0004] Therefore, it is necessary to provide a computing power evaluation method, apparatus, computer equipment, and storage medium for an electronic oil pump controller that can quickly detect abnormal usage permissions, in order to address the above-mentioned technical problems.
[0005] A method for evaluating the computing power of an electronic oil pump controller, the method comprising:
[0006] Calculate the first main frequency range based on the control code execution time requirements;
[0007] Calculate the second main frequency range based on the analog-to-digital conversion time requirements;
[0008] Calculate the third main frequency range based on the pulse width modulation resolution requirements;
[0009] For the three main frequency ranges mentioned above, the minimum value of the lower limit of each range is taken as the minimum main frequency of the controller, and the maximum value of the upper limit of each range is taken as the maximum main frequency of the controller, thus obtaining the computing power range required by the electronic oil pump controller.
[0010] Furthermore, the step of calculating the first main frequency range based on the control code execution time requirements specifically includes:
[0011] The range of pulse width modulation period is calculated based on the switching frequency range of the three-phase bridge power transistors and the number of times the control algorithm is executed within a single switching cycle.
[0012] Calculate the time range required for a single control closed-loop instruction based on the percentage of the pulse width modulation period during which the full instruction execution time of a single control closed loop is taken.
[0013] The total number of machine code lines is obtained by compiling and assembling all the code in the control closed loop. The first main frequency range is then calculated based on the instruction execution time and the total number of machine code lines.
[0014] Furthermore, the step of calculating the second main frequency range based on the analog-to-digital conversion time requirement specifically includes:
[0015] Input the required range of analog-to-digital conversion time for the electronic oil pump system, and calculate the range of sampling rate values based on the conversion time;
[0016] Input the total number of clock cycles required to complete one conversion, and calculate the required operating frequency range of the analog-to-digital converter;
[0017] The second main frequency range of the controller is obtained by converting the frequency division coefficient.
[0018] Furthermore, the controller's main frequency is equal to the analog-to-digital converter's operating frequency multiplied by the frequency division factor; the lower limit of the second main frequency range is equal to the frequency division factor multiplied by the total number of clock cycles and then divided by the longest conversion time, and the upper limit is equal to the frequency division factor multiplied by the total number of clock cycles and then divided by the shortest conversion time.
[0019] Furthermore, the step of calculating the third main frequency interval based on the pulse width modulation resolution requirement specifically includes:
[0020] The percentage requirement for input pulse width modulation resolution;
[0021] Calculate the count value of the period register based on the resolution;
[0022] Based on the switching frequency range of the power transistor and the frequency relationship of the incremental and decremental center-symmetric mode, the third main frequency range of the controller is calculated.
[0023] Furthermore, the minimum clock frequency is the minimum value among the lower limits of the first, second, and third clock frequency ranges; the maximum clock frequency is the maximum value among the upper limits of the first, second, and third clock frequency ranges.
[0024] Furthermore, the control closed-loop algorithm includes proportional-integral speed regulation, proportional-integral direct-axis current regulation, proportional-integral quadrature-axis current regulation, Parker inverse transform, space vector modulation, three-phase bridge drive, Clarke transform, Parker transform, angle and speed estimation.
[0025] On the other hand, this application also discloses a computing power evaluation device for an electronic oil pump controller, the device comprising:
[0026] The first main frequency range module is used to calculate the first main frequency range based on the execution time requirements of the control code.
[0027] The second main frequency range module is used to calculate the second main frequency range according to the analog-to-digital conversion time requirements;
[0028] The third main frequency range module is used to calculate the third main frequency range according to the pulse width modulation resolution requirements;
[0029] The computing power evaluation module is used to take the minimum value of the lower limit of each of the above three main frequency ranges as the minimum main frequency of the controller, and take the maximum value of the upper limit of each range as the maximum main frequency of the controller, so as to obtain the computing power range required by the electronic oil pump controller.
[0030] This application also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0031] Calculate the first main frequency range based on the control code execution time requirements;
[0032] Calculate the second main frequency range based on the analog-to-digital conversion time requirements;
[0033] Calculate the third main frequency range based on the pulse width modulation resolution requirements;
[0034] For the three main frequency ranges mentioned above, the minimum value of the lower limit of each range is taken as the minimum main frequency of the controller, and the maximum value of the upper limit of each range is taken as the maximum main frequency of the controller, thus obtaining the computing power range required by the electronic oil pump controller.
[0035] This application also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0036] Calculate the first main frequency range based on the control code execution time requirements;
[0037] Calculate the second main frequency range based on the analog-to-digital conversion time requirements;
[0038] Calculate the third main frequency range based on the pulse width modulation resolution requirements;
[0039] For the three main frequency ranges mentioned above, the minimum value of the lower limit of each range is taken as the minimum main frequency of the controller, and the maximum value of the upper limit of each range is taken as the maximum main frequency of the controller, thus obtaining the computing power range required by the electronic oil pump controller.
[0040] The aforementioned method, apparatus, computer equipment, and storage medium for evaluating the computing power of an electronic oil pump controller estimate the controller's main frequency from three independent technical dimensions: control code execution volume, analog-to-digital conversion rate requirements, and pulse width modulation resolution requirements. Finally, the calculation results from these three dimensions are combined to obtain the final computing power requirement range. This method avoids the maximum redundancy and conservative strategy of traditional manual selection, enabling more accurate positioning of the controller's actual computing power requirements and effectively preventing cost waste from over-selection. Furthermore, the evaluation method of this application only requires input of a few system parameters and code compilation results to quickly and accurately determine the computing power range of the electronic oil pump controller. The entire calculation process is logically clear and the formulas are explicit, allowing for automation via scripts or spreadsheet tools. This provides strong data support for controller chip selection, enabling R&D personnel to select a suitable controller specification early in the project, eliminating the need to wait until the design is mature for cost reduction and optimization. This significantly shortens the product development cycle, reduces development costs, and improves overall economic efficiency. Meanwhile, the three dimensions correspond to the performance constraints of the three core links of the control system: computation, sampling and output. The evaluation results are comprehensive and reliable, which can ensure that the selected controller meets the system requirements in each functional module and will not encounter the bottleneck problem of insufficient computing power in a certain link. Attached Figure Description
[0041] Figure 1 This is a flowchart illustrating the computing power evaluation method for an electronic oil pump controller in one embodiment;
[0042] Figure 2 This is a control block diagram of a computing power evaluation method for an electronic oil pump controller in one embodiment;
[0043] Figure 3 This is a structural block diagram of the computing power evaluation device for an electronic oil pump controller in one embodiment;
[0044] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0046] This embodiment details the specific steps and calculation process of the computing power evaluation method for the electronic oil pump controller in this embodiment. For example... Figure 1 As shown, the computing power evaluation method for the electronic oil pump controller disclosed in this embodiment includes the following steps:
[0047] S1: Calculate the first main frequency range based on the control code execution time requirements;
[0048] S2: Calculate the second main frequency range based on the analog-to-digital conversion time requirements;
[0049] S3: Calculate the third main frequency range based on the pulse width modulation resolution requirements;
[0050] S4: For the above three main frequency ranges, take the minimum value of the lower limit of each range as the minimum main frequency of the controller, and take the maximum value of the upper limit of each range as the maximum main frequency of the controller, so as to obtain the computing power range required by the electronic oil pump controller.
[0051] In this embodiment, please refer to Figure 1 and Figure 2 The entire evaluation method mainly consists of three calculation processes and one comprehensive output process. The three processes are frequency estimation based on control code execution time, frequency estimation based on analog-to-digital conversion time, and frequency estimation based on pulse width modulation resolution. Finally, the calculation results of the three processes are combined to obtain the final controller computing power requirement range. The following provides a detailed explanation of each step and clarifies the Chinese meaning of the characters involved in each formula. Part 1: Frequency Estimation Based on Control Code Execution Time
[0052] This section starts with the actual computational load of the control algorithm, and uses the power transistor switching frequency, control execution frequency, and the number of machine instructions after code compilation to deduce the required clock frequency level of the controller. The specific steps are as follows:
[0053] Step 1: Input the switching frequency range of the three-phase bridge power transistors
[0054] The permanent magnet synchronous motor of an electronic oil pump is typically driven by a three-phase bridge inverter circuit. The switching frequency of the power transistors is one of the core parameters of the system, directly determining the operating cycle of the control algorithm. A higher switching frequency results in lower current ripple and smoother motor operation, but also places higher demands on the controller's processing speed. The minimum and maximum values of the input switching frequency, fmin and fmax, are expressed in Hertz (Hz). The range of switching frequency values is determined by the motor design and system requirements; the common switching frequency range for electronic oil pumps is approximately 10 kHz to 20 kHz. In this embodiment, fmin equals 10 kHz and fmax equals 20 kHz as example parameters.
[0055] Step 2: Input the number of times the control algorithm will be executed within a single switching cycle.
[0056] In practical control systems, a complete control loop operation may be performed once or more within the switching cycle of a power transistor. The more executions, the more frequent the control updates and the better the dynamic response, but the computational load per unit time also increases. Input the number of control executions N within a single switching cycle, where N is a positive integer greater than or equal to one. For example, when N equals 1, it means that a complete control loop is executed once per switching cycle; when N equals 2, it means that a control loop is executed once every half switching cycle. In this embodiment, N equals 1 for illustration.
[0057] Step 3: Calculate the range of values for the pulse width modulation period.
[0058] The pulse width modulation period is the time interval between two executions of the control algorithm, and can also be understood as the control cycle. The range of the pulse width modulation period T can be calculated based on the switching frequency and the number of control cycles per cycle.
[0059] The calculation formula is: T = 1 / (f × N)
[0060] Where T represents the pulse width modulation period in seconds; f represents the switching frequency of the power transistor in Hertz; and N represents the number of control executions within a single switching cycle, which is dimensionless. The physical meaning of this formula is: the reciprocal of the switching frequency is the switching period, and dividing this by the number of control executions within each switching cycle yields the time period corresponding to each control loop.
[0061] Substituting fmax and fmin respectively, we can obtain the range of the pulse width modulation period:
[0062] Tmin = 1 / (fmax × N)
[0063] Tmax = 1 / (fmin × N)
[0064] That is, the range of the pulse width modulation period T is [Tmin, Tmax], which is [1 / (fmax×N), 1 / (fmin×N)], where Tmin is the minimum value of the pulse width modulation period and Tmax is the maximum value of the pulse width modulation period.
[0065] Substituting the example values from this embodiment: fmax = 20kHz, fmin = 10kHz, N = 1, we get:
[0066] Tmin = 1 / (20000 × 1) = 50 microseconds
[0067] Tmax = 1 / (10000 × 1) = 100 microseconds
[0068] That is, the pulse width modulation period ranges from 50 microseconds to 100 microseconds.
[0069] Step 4: Input the percentage of the single control closed-loop full instruction execution time to the pulse width modulation cycle.
[0070] Within a complete pulse width modulation (PWM) cycle, in addition to executing the core algorithm for motor control, the controller also needs to handle other tasks such as communication, fault diagnosis, and protection logic. Therefore, the execution time of the control closed-loop algorithm only accounts for a portion of the entire cycle. The input percentage parameter X represents the proportion of the execution time of a single control closed-loop instruction to the entire PWM cycle. The value of X typically ranges from 30% to 80%, depending on the occupancy of other tasks in the system. In this embodiment, X is taken as 50% as an example.
[0071] Step 5: Calculate the time range required for a single control closed-loop full instruction.
[0072] Based on the pulse width modulation period and percentage, the longest and shortest time allowed to execute a complete control closed-loop algorithm once can be calculated.
[0073] The calculation formula is: Y = T × X
[0074] Where Y represents the time required for a single control closed-loop full instruction, in seconds; T represents the pulse width modulation period, in seconds; and X represents the percentage of the single control instruction time to the pulse width modulation period, dimensionless.
[0075] Substituting the maximum and minimum values of T respectively, we can obtain the range of the single control closed-loop time Y:
[0076] Ymin = Tmin × X = X / (fmax × N)
[0077] Ymax = Tmax × X = X / (fmin × N)
[0078] The value range of Y is [Ymin, Ymax], which is [X / (fmax×N), X / (fmin×N)], where Ymin is the minimum time required for a single control closed loop full instruction, and Ymax is the maximum time required for a single control closed loop full instruction.
[0079] Substituting the example values from this embodiment: X = 50% = 0.5, we get:
[0080] Ymin = 0.5 / 20000 = 25 microseconds
[0081] Ymax = 0.5 / 10000 = 50 microseconds
[0082] That is, the time to execute a single control closed-loop algorithm needs to be controlled between 25 microseconds and 50 microseconds.
[0083] Step Six: Compile the control code to obtain the total number of machine code lines.
[0084] The entire high-level language code, such as C language code, for the electronic oil pump control closed loop is input into a compiler for compilation and assembly, ultimately generating executable machine code. The total number of instruction lines in the generated machine code is counted and denoted as Z. The total number of machine code lines Z reflects the number of instructions required to complete one complete control closed loop. The more instruction lines, the more complex the algorithm, and the longer the execution time required at the same clock frequency. The specific value of Z depends on the complexity of the control algorithm and the optimization level of the compiler. For a typical permanent magnet synchronous motor field-oriented control algorithm, the total number of machine code lines is approximately in the range of several hundred to several thousand. In this embodiment, Z equals 1000 lines as an example.
[0085] Step 7: Calculate the first main frequency range
[0086] Based on the time requirements of a single control loop and the total number of machine codes, the required clock frequency level of the controller can be calculated. A higher clock frequency results in a shorter execution time for each instruction and a shorter time required to complete all instructions.
[0087] The calculation formula is: fmain frequency = Y / Z
[0088] Where f_main_frequency represents the main clock frequency of the controller, in Hertz; Y represents the time required for a single control closed-loop full instruction, in seconds; and Z represents the total number of machine code instruction lines, in lines.
[0089] The formula means that if Z instructions need to be executed within a time period Y, then the average execution time per instruction is Y / Z, and its reciprocal is the required clock frequency. Here, it is assumed that each instruction occupies one clock cycle on average; however, this can be adjusted according to the controller's instruction cycle characteristics in practical applications.
[0090] Substituting the minimum and maximum values of Y respectively, we can obtain the first main frequency range:
[0091] f1_min = Ymin / Z = X / (fmax × N × Z)
[0092] f1_max = Ymax / Z = X / (fmin × N × Z)
[0093] That is, the first main frequency range is [f1_min, f1_max], which is [X / (fmax×N×Z), X / (fmin×N×Z)], where f1_min represents the minimum value of the first main frequency of the controller, and f1_max represents the maximum value of the first main frequency of the controller.
[0094] Substituting the example values from this embodiment: X=0.5, fmax=20000Hz, fmin=10000Hz, N=1, Z=1000, we get:
[0095] f1_min = 0.5 / (20000 × 1 × 1000) = 25 MHz
[0096] f1_max = 0.5 / (10000 × 1 × 1000) = 50 MHz
[0097] From the perspective of the amount of control code executed, the controller's main frequency needs to be in the range of 25 MHz to 50 MHz.
[0098] Part Two: Frequency Estimation Based on Analog-to-Digital Conversion Time
[0099] This section starts with the sampling rate requirements of analog signals, and calculates the controller's required clock frequency based on the system's requirements for analog-to-digital conversion time and the operating characteristics of the analog-to-digital converter. The specific steps are as follows:
[0100] Step 8: Input the required range for analog-to-digital conversion time.
[0101] In an electronic oil pump control system, analog signals such as motor phase current, bus voltage, and temperature need to be sampled. The sampling rate directly affects the real-time performance of the control. The system has specific requirements for the analog-to-digital conversion time, namely the maximum and minimum time allowed to complete one conversion. The minimum and maximum values of the conversion time, Tc_min and Tc_max, are input in seconds. The shorter the conversion time, the higher the sampling rate, and the higher the requirements for the converter's operating clock. In this embodiment, Tc_min is set to 1 microsecond and Tc_max to 2 microseconds as an example.
[0102] Step 9: Calculate the range of sampling rate values.
[0103] The sampling rate, also known as the number of samples per second, represents the number of analog-to-digital conversions completed per unit of time, and is equal to the reciprocal of the conversion time.
[0104] The calculation formula is: SPS = 1 / Tc
[0105] SPS represents the sampling rate, measured in times per second (MSPS); Tc represents the time for a single analog-to-digital conversion, measured in seconds.
[0106] Substituting the maximum and minimum values of Tc respectively, we can obtain the range of the sampling rate:
[0107] SPSmin=1 / Tc_max
[0108] SPSmax=1 / Tc_min
[0109] The sampling rate SPS can be set to [SPSmin, SPSmax], which is equivalent to [1 / Tc_max, 1 / Tc_min]. Here, SPSmin represents the minimum value of the sampling rate, and SPSmax represents the maximum value of the sampling rate.
[0110] Substituting the example values from this embodiment: Tc_min = 1 μs, Tc_max = 2 μs, we get:
[0111] SPSmin = 1 / 0.000002 = 500 kiloseconds per second = 0.5 MSPS
[0112] SPSmax = 1 / 0.000001 = 1000 thousand times per second = 1 MSPS
[0113] That is, the sampling rate ranges from 0.5 MSPS to 1 MSPS.
[0114] Step 10: Enter the total number of clock cycles required to complete one conversion.
[0115] An analog-to-digital converter (ADC) requires several clock cycles to complete one conversion; the total number of cycles consists of several parts. Specifically:
[0116] Ntotal = Sampling window period + ADC bit width + Fixed overhead
[0117] Where Ntotal represents the total number of analog-to-digital conversion clock cycles required to complete one conversion, in units of clock cycles; the sampling window period represents the number of clock cycles required for the sample-and-hold phase; the ADC bit depth represents the resolution bit depth of the analog-to-digital converter, for example, a 12-bit analog-to-digital converter corresponds to 12 cycles; and the fixed overhead represents the number of clock cycles required for other fixed steps in the conversion process. For a specific analog-to-digital converter architecture, Ntotal is usually a constant. Taking a common 12-bit successive approximation analog-to-digital converter as an example, Ntotal is approximately 15 to 20 clock cycles. In this embodiment, Ntotal is taken as 16 cycles as an example.
[0118] Step 11: Calculate the operating frequency range of the analog-to-digital converter.
[0119] The required operating clock frequency for the analog-to-digital converter can be calculated based on the sampling rate and the number of clock cycles per conversion.
[0120] The calculation formula is: fADC = SPS × Ntotal
[0121] Where fADC represents the operating frequency of the analog-to-digital converter, in Hertz; SPS represents the sampling rate, in times per second; and Ntotal represents the total number of clock cycles required for a single conversion, in cycles.
[0122] The meaning of this formula is: SPS conversions need to be completed per second, and each conversion requires Ntotal clock cycles. Therefore, the operating clock frequency of the analog-to-digital converter is equal to the product of the two.
[0123] Substituting the minimum and maximum values of SPS respectively, we get:
[0124] fADC_min=SPSmin×Ntotal=Ntotal / Tc_max
[0125] fADC_max=SPSmax×Ntotal=Ntotal / Tc_min
[0126] The operating frequency fADC of the analog-to-digital converter (ADC) ranges from [fADC_min, fADC_max] to [Ntotal / Tc_max, Ntotal / Tc_min]. Here, fADC_min represents the minimum operating clock frequency of the ADC, and fADC_max represents the maximum operating clock frequency of the ADC.
[0127] Substituting the example value in this embodiment: Ntotal=16, we get:
[0128] fADC_min = 16 / 0.000002 = 8 MHz
[0129] fADC_max = 16 / 0.000001 = 16 MHz
[0130] That is, the operating clock frequency of the analog-to-digital converter needs to be between 8 MHz and 16 MHz.
[0131] Step 12: Calculate the second main frequency range based on the frequency division coefficient.
[0132] In microcontrollers, the operating clock of the analog-to-digital converter is usually obtained by dividing the system master clock, and there is a fixed division ratio between the two.
[0133] The calculation formula is: fADC = f clock frequency / M
[0134] By transformation, we can obtain: fmain frequency = fADC × M
[0135] Where M represents the frequency division factor, which is the ratio of the master clock frequency to the analog-to-digital conversion clock frequency, and is dimensionless. The frequency division factor M is determined by the clock tree configuration of the controller, and is usually an optional integer ratio, such as 1, 2, 4, 8, etc. In this embodiment, M is taken as equal to 2 as an example.
[0136] Substituting the minimum and maximum values of fADC respectively, we can obtain the second main frequency range:
[0137] f2_min=fADC_min×M=M×Ntotal / Tc_max
[0138] f2_max=fADC_max×M=M×Ntotal / Tc_min
[0139] That is, the second main frequency range is [f2_min, f2_max], which is [M×Ntotal / Tc_max, M×Ntotal / Tc_min], where f2_min represents the minimum value of the controller's second main frequency and f2_max represents the maximum value of the controller's second main frequency.
[0140] Substituting the example value of M=2 in this embodiment, we get:
[0141] f2_min = 2 × 16 / 0.000002 = 16 MHz
[0142] f2_max = 2 × 16 / 0.000001 = 32 MHz
[0143] From the perspective of analog-to-digital conversion rate, the controller's main frequency needs to be in the range of 16 MHz to 32 MHz.
[0144] Part Three: Frequency Estimation Based on Pulse Width Modulation Resolution
[0145] This section starts with the accuracy requirements of pulse width modulation (PWM) output, and calculates the controller's main frequency requirement based on the system's PWM resolution requirements and the switching frequency of the power transistors. The specific steps are as follows:
[0146] Step 13: Input the percentage requirement for pulse width modulation resolution.
[0147] Pulse width modulation (PWM) resolution is an important indicator of the accuracy of PWM output, representing the proportion of the smallest adjustable pulse width step size to the entire cycle. Higher resolution allows for finer pulse width adjustment and smoother motor control, but also requires a higher clock frequency from the timer. The input PWM resolution N is expressed as a percentage. For example, a resolution of one percent means the minimum pulse width adjustment step size is one percent of the entire cycle. In this embodiment, N equals one percent as an example.
[0148] Step Fourteen: Calculate the count value of the cycle register.
[0149] In the pulse width modulation module of a digital controller, the period is determined by the value of a period register, namely TBPRD. The following relationship exists between the resolution and the period register value:
[0150] N = 1 / (TBPRD + 1)
[0151] The transformation yields: TBPRD+1=1 / N
[0152] Where N represents the pulse width modulation resolution, which is dimensionless; TBPRD represents the count value of the period register, which is also dimensionless. Incrementing by one is because the counter counts from zero to TBPRD, a total of TBPRD plus one counting step, with each step corresponding to one resolution unit.
[0153] Substituting the example values from this embodiment: N=1%=0.01, we get:
[0154] TBPRD+1=1 / 0.01=100
[0155] That is, the value of the period register is 99, corresponding to 100 counting steps.
[0156] Step 15: Calculate the third major frequency range
[0157] The operating clock of the pulse width modulation module is derived from the system master clock of the controller, and the frequency relationship between the two is related to the counting mode of the pulse width modulation. This embodiment adopts an incrementing and decrementing mode, i.e., a centrally symmetric mode. In this mode, the counter increments from 0 to TBPRD and then decrements back to 0. One complete pulse width modulation cycle corresponds to twice TBPRD plus one clock cycle.
[0158] The frequency relationship formula is: fPWM = fmain frequency / [2 × (TBPRD + 1)]
[0159] Where fPWM represents the output frequency of pulse width modulation, i.e. the switching frequency of the power transistor, in Hertz; f_main_frequency represents the system main clock frequency of the controller, in Hertz; TBPRD represents the value of the period register; and the coefficient 2 comes from the bidirectional counting mode of incrementing and decrementing.
[0160] Substituting TBPRD+1=1 / N into the above equation, we get:
[0161] fPWM = fmain frequency × N / 2
[0162] The formula for calculating the controller's main frequency is derived from the deformation:
[0163] fmain frequency = fPWM × 2 / N
[0164] Substituting the minimum and maximum values of the switching frequency, fmin and fmax, respectively, we can obtain the third dominant frequency range:
[0165] f3_min = fmin × 2 / N
[0166] f3_max = fmax × 2 / N
[0167] That is, the third main frequency range is [f3_min, f3_max], which is [fmin×2 / N, fmax×2 / N]. f3_min represents the minimum value of the third main frequency of the controller, and f3_max represents the maximum value of the third main frequency of the controller.
[0168] Substituting the example values from this embodiment: fmin = 10kHz, fmax = 20kHz, N = 0.01, we get:
[0169] f3_min = 10000 × 2 / 0.01 = 2 MHz
[0170] f3_max = 20000 × 2 / 0.01 = 4 MHz
[0171] From the perspective of pulse width modulation resolution, the controller's main frequency needs to be in the range of 2 MHz to 4 MHz.
[0172] Part Four: Comprehensive Determination of the Main Frequency Range
[0173] Step Sixteen: Determine the final core frequency range based on three dimensions.
[0174] Through calculations along these three independent dimensions, three main frequency ranges were obtained. To ensure that the controller meets system requirements in all aspects, the most stringent constraint among the three dimensions should be used as the final selection criterion. Specifically:
[0175] The minimum clock speed is the minimum value among the three lower limits:
[0176] Main frequency min=min(f1_min,f2_min,f3_min)
[0177] The maximum clock speed is the maximum value among the three upper limits:
[0178] The main frequency is set to max(f1_max,f2_max,f3_max).
[0179] The final controller computing power requirement range is [min clock speed, max clock speed].
[0180] Substitute the three sets of example values in this embodiment:
[0181] f1 range = [25MHz, 50MHz], where f1 represents the first main frequency.
[0182] f2 range = [16MHz, 32MHz], where f2 represents the second main frequency.
[0183] f3 range = [2MHz, 4MHz], where f3 represents the third main frequency.
[0184] Calculation yields:
[0185] Minimum clock frequency = min(25,16,2) = 2 MHz
[0186] Maximum clock frequency = max(50,32,4) = 50 MHz
[0187] In summary, considering these three dimensions, the controller's main frequency range is 2 MHz to 50 MHz. In practical selection, a controller chip with a main frequency of at least 50 MHz should be chosen to ensure that all functional modules can operate normally under the most demanding operating conditions—the highest switching frequency, the shortest control time, and the fastest sampling rate.
[0188] It should be noted that among the three dimensions mentioned above, the amount of code execution is usually the main constraint on clock speed requirements, while the clock speed requirements for analog-to-digital conversion and pulse width modulation are relatively low. However, in certain special application scenarios, such as ultra-high precision pulse width modulation or ultra-high speed sampling, the latter two may also become clock speed bottlenecks. Therefore, a comprehensive evaluation of the three dimensions is essential.
[0189] Control Algorithm Module Description
[0190] The electronic oil pump controller evaluated in this embodiment adopts a permanent magnet synchronous motor field-oriented control scheme. Its control closed-loop algorithm mainly includes the following modules: a speed proportional-integral (PI) adjustment module, used to adjust the output torque command according to the deviation between the target speed and the actual speed; a direct-axis current PPI adjustment module and a quadrature-axis current PPI adjustment module, used to control the following of the direct-axis and quadrature-axis currents, respectively; a Parker inverse transform module, which converts the voltage command in the rotating coordinate system into a stationary two-phase coordinate system; a space vector modulation module, which generates the three-phase bridge drive pulse according to the two-phase voltage command; a three-phase bridge power drive module, which outputs the three-phase voltage to drive the motor; a Clarke transform module, which converts the three-phase sampled current into a two-phase stationary coordinate system current; a Parker transform module, which converts the two-phase stationary current into a rotating coordinate system current; an angle and speed estimation module, used to estimate the position and speed of the motor rotor; and the permanent magnet synchronous motor body.
[0191] All the modules described above together form a complete control loop. Each execution of the loop requires running the code of all modules sequentially. In this embodiment, the total number of machine code lines Z corresponds to the total number of instructions after compiling all the modules.
[0192] In summary, the computing power evaluation method of this embodiment, through a systematic analysis of three dimensions—code execution volume, sampling rate, and modulation accuracy—can comprehensively and accurately assess the main frequency requirements of an electronic oil pump controller. The method's calculation process is clear, and the input parameters are easy to obtain. It can be directly applied to controller selection in the early stages of product development, effectively avoiding cost waste caused by over-selection and performance bottlenecks caused by under-selection. This has significant practical implications for shortening the development cycle and reducing product costs.
[0193] like Figure 3 As shown, this embodiment also discloses a computing power evaluation device for an electronic oil pump controller, the device comprising:
[0194] The first main frequency interval module 401 is used to calculate the first main frequency interval according to the control code execution time requirements;
[0195] The second main frequency range module 402 is used to calculate the second main frequency range according to the analog-to-digital conversion time requirements;
[0196] The third main frequency range module 403 is used to calculate the third main frequency range according to the pulse width modulation resolution requirements;
[0197] The computing power evaluation module 404 is used to take the minimum value of the lower limit of each of the above three main frequency ranges as the minimum main frequency of the controller, and take the maximum value of the upper limit of each range as the maximum main frequency of the controller, so as to obtain the computing power range required by the electronic oil pump controller.
[0198] Specific limitations regarding the computing power evaluation device for the electronic oil pump controller can be found in the limitations of the computing power evaluation method for the electronic oil pump controller mentioned above, and will not be repeated here. Each module in the aforementioned computing power evaluation device for the electronic oil pump controller can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0199] Figure 4 An internal structural diagram of a computer device in one embodiment is shown. Figure 4 As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a computational power evaluation method for an electronic oil pump controller. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute the computational power evaluation method for the electronic oil pump controller. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0200] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0201] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: calculating a first main frequency range based on the control code execution time requirements; calculating a second main frequency range based on the analog-to-digital conversion time requirements; calculating a third main frequency range based on the pulse width modulation resolution requirements; and for the above three main frequency ranges, taking the minimum value of the lower limit of each range as the minimum main frequency of the controller, and taking the maximum value of the upper limit of each range as the maximum main frequency of the controller, thereby obtaining the computing power range required by the electronic oil pump controller.
[0202] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods.
[0203] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0204] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for evaluating the computing power of an electronic oil pump controller, the method comprising: Calculate the first main frequency range based on the control code execution time requirements; Calculate the second main frequency range based on the analog-to-digital conversion time requirements; Calculate the third main frequency range based on the pulse width modulation resolution requirements; For the three main frequency ranges mentioned above, the minimum value of the lower limit of each range is taken as the minimum main frequency of the controller, and the maximum value of the upper limit of each range is taken as the maximum main frequency of the controller, thus obtaining the computing power range required by the electronic oil pump controller.
2. The computing power evaluation method for the electronic oil pump controller according to claim 1, characterized in that, The step of calculating the first main frequency range based on the control code execution time requirements includes: The range of pulse width modulation period is calculated based on the switching frequency range of the three-phase bridge power transistors and the number of times the control algorithm is executed within a single switching cycle. Calculate the time range required for a single control closed-loop instruction based on the percentage of the pulse width modulation period during which the full instruction execution time of a single control closed loop is taken. The total number of machine code lines is obtained by compiling and assembling all the code in the control closed loop. The first main frequency range is then calculated based on the instruction execution time and the total number of machine code lines.
3. The computing power evaluation method for the electronic oil pump controller according to claim 1, characterized in that, The step of calculating the second main frequency range based on the analog-to-digital conversion time requirement includes: Input the required range of analog-to-digital conversion time for the electronic oil pump system, and calculate the range of sampling rate values based on the conversion time; Input the total number of clock cycles required to complete one conversion, and calculate the required operating frequency range of the analog-to-digital converter; The second main frequency range of the controller is obtained by converting the frequency division coefficient.
4. The computing power evaluation method for the electronic oil pump controller according to claim 3, characterized in that, The controller's main frequency is equal to the analog-to-digital converter's operating frequency multiplied by the frequency division factor; the lower limit of the second main frequency range is equal to the frequency division factor multiplied by the total number of clock cycles and then divided by the longest conversion time, and the upper limit is equal to the frequency division factor multiplied by the total number of clock cycles and then divided by the shortest conversion time.
5. The computing power evaluation method for the electronic oil pump controller according to claim 1, characterized in that, The step of calculating the third main frequency range based on the pulse width modulation resolution requirement includes: The percentage requirement for input pulse width modulation resolution; Calculate the count value of the period register based on the resolution; Based on the switching frequency range of the power transistor and the frequency relationship of the incremental and decremental center-symmetric mode, the third main frequency range of the controller is calculated.
6. The computing power evaluation method for the electronic oil pump controller according to claim 1, characterized in that, The minimum clock frequency is the minimum value among the lower limits of the first, second, and third clock frequency ranges; the maximum clock frequency is the maximum value among the upper limits of the first, second, and third clock frequency ranges.
7. The computing power evaluation method for the electronic oil pump controller according to claim 1, characterized in that, The control closed-loop algorithm includes proportional-integral speed regulation, proportional-integral direct-axis current regulation, proportional-integral quadrature-axis current regulation, Parker inverse transform, space vector modulation, three-phase bridge drive, Clark transform, Parker transform, and angle and speed estimation.
8. A computing power evaluation device for an electronic oil pump controller, characterized in that, The device includes: The first main frequency range module is used to calculate the first main frequency range based on the execution time requirements of the control code. The second main frequency range module is used to calculate the second main frequency range according to the analog-to-digital conversion time requirements; The third main frequency range module is used to calculate the third main frequency range according to the pulse width modulation resolution requirements; The computing power evaluation module is used to take the minimum value of the lower limit of each of the above three main frequency ranges as the minimum main frequency of the controller, and take the maximum value of the upper limit of each range as the maximum main frequency of the controller, so as to obtain the computing power range required by the electronic oil pump controller.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.