Data processing method, device, vehicle and computer storage medium
By moving the pulse width modulation task from the central processing unit to the general timer module and using inverse transformation and zero-sequence component injection processing to obtain the duty cycle, the problem of excessive central processing unit load is solved, the central processing unit load rate is reduced, and the motor control algorithm is executed in a timely manner.
Patent Information
- Application Number
- CN202110758106.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-05
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2041-07-05
AI Technical Summary
In the existing EPS software design, all motor control algorithms are executed in the central processing unit, resulting in excessive load on the central processing unit and failure to complete tasks in a timely manner.
The pulse width modulation task is moved from the central processing unit to the general timer module for processing, and the duty cycle is obtained through inverse transformation and zero-sequence component injection processing, thereby reducing the load rate of the central processing unit.
By moving the task to the general timer module for processing, the load rate of the central processing unit is reduced, ensuring that the motor control algorithm can be executed in a timely manner, and improving the stability and response speed of the vehicle control system.
Smart Images

Figure CN115586949B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle control technology, and in particular relates to a data processing method, device, vehicle and computer storage medium. Background Art
[0002] The automotive industry has experienced rapid growth in recent years, and with increasing market demand for vehicles, the demand for electric power steering units (EPS) in automotive steering assemblies has also grown. Consequently, customers have increasingly demanded higher levels of traction control. One of the key technical indicators determining traction control is that the motor control algorithm must execute within a fixed duty cycle.
[0003] In existing EPS (Electric Power Steering) software designs, all motor control algorithms are executed on the central processing unit (CPU). Due to the large code base of the EPS software architecture, the motor control algorithm may not be fully executed in a timely manner due to excessive CPU load. Summary of the Invention
[0004] In view of this, the present application aims to propose a data processing method, device, vehicle and computer storage medium to solve the problem in the related art that all motor control algorithms are executed in the central processing unit, resulting in a heavy load on the central processing unit in the vehicle controller.
[0005] To achieve the above objectives, the technical solution of this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a data processing method applied to a universal timer module in a vehicle controller, the method comprising:
[0007] receiving an execution instruction for a pulse width modulation task sent by a central processing unit of the vehicle controller;
[0008] In response to the execution instruction, reading two-phase voltage data of the pulse width modulation task;
[0009] Performing inverse transformation on the two-phase voltage data to obtain three-phase voltage data;
[0010] Performing zero-sequence component injection processing on the three-phase voltage data to obtain three-phase voltage data after zero-sequence component injection;
[0011] The duty cycle is obtained according to the three-phase voltage data after the zero-sequence component is injected, and the duty cycle is output.
[0012] In a second aspect, an embodiment of the present application provides a data processing device, which is applied to a universal timer module in a vehicle controller, and the device includes:
[0013] A receiving module, configured to receive an execution instruction for a pulse width modulation task sent by a central processing unit of the vehicle controller;
[0014] a processing module, configured to read two-phase voltage data of the pulse width modulation task in response to the execution instruction;
[0015] Performing inverse transformation on the two-phase voltage data to obtain three-phase voltage data;
[0016] Performing zero-sequence component injection processing on the three-phase voltage data to obtain three-phase voltage data after zero-sequence component injection;
[0017] The output module is used to obtain the duty cycle according to the three-phase voltage data after the zero-sequence component is injected, and output the duty cycle.
[0018] In a third aspect, a vehicle is provided, comprising the data processing device described in the second aspect.
[0019] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the data method described in the first aspect is implemented.
[0020] Compared with the related art, the embodiments of the present application have the following advantages:
[0021] The data processing method, device, vehicle, and computer storage medium provided in the embodiments of the present application obtain the circuit duty cycle by moving the pulse width modulation task from the original central processing unit to a general timer module for processing, thereby reducing the load rate of the central processing unit. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0023] Figure 1 A schematic diagram showing a principle of a method for processing a pulse width modulation task in the related art is shown;
[0024] Figure 2 A flowchart showing the steps of a data processing method provided in an embodiment of the present application is shown;
[0025] Figure 3 A schematic diagram showing the principle of a data processing method provided in an embodiment of the present application is shown;
[0026] Figure 4 A logical diagram of a data processing method provided by an embodiment of the present application is shown;
[0027] Figure 5 A schematic structural diagram of a vehicle control device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] It should be noted that, unless there is any conflict, the embodiments and features in the embodiments of this application can be combined with each other.
[0029] Reference Figure 1 , showing a schematic diagram of the principle of a method for processing a pulse width modulation task in the related art.
[0030] Among them, Valpha and Vbeta represent the two-phase voltage data of different windings respectively, CPU represents the central processing unit, GTM represents the general timer module, In-Clark represents the processing module for performing Park inverse operation, U, V, W represent the three-phase voltage data, Zero Consequence component represents the processing module for performing zero-sequence component injection, U zsc 、V zsc 、W zsc Represents the three-phase voltage data after zero-sequence component injection, Duty Cycle Cal represents the duty cycle calculation module, CH1, CH2, and CH3 represent three registers, SR0 and SR1 are registers contained in the registers, which are used to control the PWM signal, DTM_CH1, DTM_CH2, and DTM_CH3 are generators used to generate dead zones between the high-side PWM signals UPWMH, VPWMH, and WPWMH and the low-side PWM signals UPWML, VPWML, and WPWML, and ATOM represents the PWM signal generation module in the GTM.
[0031] It can be seen that in the related art, the pulse width modulation task is processed in the central processing unit, and only the general timer module is used to complete the signal output process for the duty cycle, which easily leads to the problem that the algorithm task cannot be completed and the system cannot work normally.
[0032] like Figure 2 FIG. 1 is a flowchart showing the steps of a vehicle control method provided by an embodiment of the present application, which is applied to a universal timer module in a vehicle controller. The method includes:
[0033] Step 101: Receive an execution instruction for a pulse width modulation task sent by a processor in the vehicle controller.
[0034] In the embodiment of the present application, the generic timer module (GTM) in the vehicle controller refers to a hardware module with functions such as data processing, data storage and data transmission. The generic timer module is provided in the vehicle controller and is independent of the processor in the vehicle controller. Therefore, when the data is processed by the generic timer module, the data resources of the processor are not occupied. The generic timer module can also be provided with a data processing hardware module (MCS) to execute the steps of the present application. The central processing unit (CPU) refers to a chip provided in the vehicle controller for managing and processing the execution tasks in the vehicle controller. The pulse width modulation (PWM) task refers to a data processing task that requires processing the voltage data through the PWM algorithm to obtain the duty cycle of the circuit.
[0035] In practical applications, the central processing unit can use instruction WURM as an execution instruction to adjust the value MSC Check CTRG in the register GTM0MCS0STRG in the general timer module, so that when the value of MSC Check CTRG is 1, the general timer module processes the pulse width modulation task, and when the value of MSC Check CTRG is 0, the general timer module continues to wait, thereby achieving control over the execution frequency of the pulse width modulation task by the general timer module.
[0036] Step 102 : Reading voltage data of the pulse width modulation task in response to the execution instruction.
[0037] In the embodiments of the application, two-phase voltage data refers to voltage data on two different windings in a circuit connected to the vehicle controller. The execution instruction may include the data address of the two-phase voltage data, or the universal timer module may pre-store the data address of the two-phase voltage data so that the two-phase voltage data can be read from the data address when the execution instruction is received.
[0038] Step 103: Perform inverse transformation on the two-phase voltage data to obtain three-phase voltage data.
[0039] In this embodiment of the present application, since the pulse width modulation algorithm requires three-phase voltage data for calculation, the two-phase voltage data read must be inversely transformed to obtain the three-phase voltage data. Specifically, the two-phase voltage data can be processed using the Park inverse transform algorithm within the pulse width modulation algorithm to obtain the third voltage data. Specifically, since the universal timer module can contain multiple data processing channels, any of these channels can be used to implement the processing steps of this application, and the reset vector address of the channel can be configured to 0x0.
[0040] Step 104 : Perform zero-sequence component injection processing on the three-phase voltage data to obtain three-phase voltage data after zero-sequence component injection.
[0041] In the embodiments of the present application, the zero-sequence component refers to a component of the three-phase voltage data having the same phase and magnitude, and can be specifically determined based on the values of the voltage data of each phase in the three-phase voltage data. After the processing unit in the universal timer module calculates the zero-sequence component from the three-phase voltage data, it combines the zero-sequence component with the three-phase voltage data to obtain the three-phase voltage data after the zero-sequence component is injected.
[0042] Step 105 : Obtain a duty cycle according to the three-phase voltage data after the zero-sequence component is injected, and output the duty cycle.
[0043] In the embodiments of the present application, the duty cycle refers to the ratio of the energized time in the circuit corresponding to the three-phase voltage data to the total energized time. Specifically, the three-phase voltage data after the zero-sequence component is input is input into a comparator in the general timer module for calculation to obtain the duty cycle. The duty cycle is then outputted by the data transmission module in the general timer module, completing the pulse width modulation task.
[0044] Reference Figure 3 , showing a logic flow chart of a data processing method provided by an embodiment of the present application, wherein the data processing unit MCS in the general timer module is started; the reset vector address is the storage address of the pulse task; at this time, the data processing unit MCS monitors whether the value of CTRG used to indicate the execution of the instruction is 1; if the value of CTRG is not 1, it continues to wait; if the value of CTRG is 1, the data processing unit MCS starts to execute the pulse broadband task; the data processing unit MCS obtains two-phase voltage data from the storage address and converts the two-phase voltage data into three-phase voltage data; obtains the three-phase voltage data after the zero-sequence component is injected; calculates the duty ratio based on the three-phase voltage data after the zero-sequence component is injected; limits the value of the duty ratio to within the range of 0 to 4000, and sets the exceeding digits to zero; sends the duty ratio to the comparator; and re-detects whether the value of CRTG is 1.
[0045] For ease of understanding, refer to Figure 4 , showing a schematic diagram of the principle of a data processing method provided by an embodiment of the present application, wherein Figure 1 The difference is that ARU represents a data transmission module, which is used to transmit the duty cycle processed in the data processing unit MCS to the comparator ATOM.
[0046] It can be seen that the embodiment of the present application obtains the duty cycle of the circuit by moving the pulse width modulation task from the original central processing unit to the general timer module for processing, thereby reducing the load rate of the central processing unit.
[0047] Optionally, the two-phase voltage data includes at least: first two-phase voltage data, second two-phase voltage data, and the three-phase voltage data includes at least: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data. Step 103 may include: using the first two-phase voltage data as the first three-phase voltage data, and performing a shift operation on the first two-phase voltage data and the second two-phase voltage data and then performing an addition and subtraction operation to obtain the second three-phase voltage data and the third three-phase voltage data.
[0048] In an embodiment of the present application, the first two-phase voltage data and the second two-phase voltage data are voltage data of two different windings in a two-phase circuit, respectively. The first three-phase voltage data, the second three-phase voltage data, and the third three-phase voltage data are voltage data of three different windings in a three-phase circuit, respectively. Since the general timer module cannot process complex operations like a central processing unit and can only process simple operations such as addition and subtraction, it is necessary to continue to use the multiplication and division methods in the traditional Park inverse transform algorithm. Therefore, it is necessary to convert the Park inverse transform algorithm into a form that only includes simple operations such as addition and subtraction to implement the process of converting two-phase voltage data into three-phase voltage data. Specifically, the voltage data after the first two-phase voltage data and the second two-phase voltage data are subjected to the shift operation can be added and subtracted to implement the calculation process of complex operations such as multiplication and division, so that Park inversion can also be processed on the general timer module.
[0049] The embodiment of the present application utilizes a data processing method that only includes shift operations and the addition and subtraction operations to perform inverse transformation processing on the two-phase voltage data to obtain three-phase voltage data, so that the inverse transformation processing of the voltage data can also be implemented in a general timer module that only supports simple operations.
[0050] Optionally, step 103 may include: inputting the first two-phase voltage data and the second two-phase voltage data into the following formula to obtain first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data:
[0051] U=U a
[0052] V=U β -U β >>3-U β >>7-U β >>10-U a >>1
[0053] W=U β >>3+U β >>7+U β >>10-U β -U a >>1
[0054] Among them, the U α is the first two-phase voltage data, the U β is the second binary voltage data, U is the first three-phase voltage data, V is the second three-phase voltage data, and W is the third three-phase voltage data.
[0055] In the embodiment of the present application, the Park inverse transform method in the related art is as follows:
[0056]
[0057] Among them U α is the first and second phase voltage data, U β is the second two-phase voltage data, U is the first three-phase voltage data, V is the second three-phase voltage data, and W is the third three-phase voltage data. It can be seen that the Park inverse transform method in the line pipe technology requires multiplication and division operations, so it cannot be processed in the general timer module that only supports simple operations such as addition and subtraction.
[0058] Since the first two-phase voltage data U α and the second two-phase voltage data U β There is a relationship of (2):
[0059]
[0060] By deducing formula (2), we can obtain the following formula (3):
[0061]
[0062] Therefore, by combining formula (3) and formula (1), we can obtain the above formula (4) which only contains shift operations and addition and subtraction operations:
[0063]
[0064] Optionally, step 104 may include: acquiring three-phase voltage data after zero-sequence component injection according to the maximum value and the minimum value in the three-phase voltage data.
[0065] In an embodiment of the present application, since the general timer module only supports simple operations such as addition and subtraction, it is only necessary to modulate the sum of the maximum and minimum values in the three-phase voltage data to obtain the zero-sequence component, and then combine the zero-sequence component with the three-line voltage data to obtain the three-phase voltage data after the zero-sequence component is injected.
[0066] Optionally, the three-phase voltage data includes at least: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data; step 104 may include: inputting the three-phase voltage data into the following formula to obtain the three-phase voltage data after zero-sequence component injection;
[0067] V min =MINS(UVW)
[0068] V max =MAXS(UUW)
[0069]
[0070]
[0071] Wherein, U is the first three-phase voltage data, V is the second three-phase voltage data, W is the third three-phase voltage data, and V min is the minimum value among the three-phase voltage data, the V max is the maximum value among the three-phase voltage data, V0 refers to the zero-sequence component, and U zsc is the first three-phase voltage data after zero-sequence component injection, the V zsc is the second three-phase voltage data after the zero sequence component is injected. zsc It is the third three-phase voltage data after the zero-sequence component is injected.
[0072] Optionally, the step 105 may include: performing a shift operation and then an addition and subtraction operation on the three-phase voltage data after the zero-sequence component is injected to obtain a duty cycle.
[0073] In the embodiment of the present application, since the universal timer module cannot process complex operations like a central processing unit and can only process simple operations such as addition and subtraction, it is necessary to continue to use the multiplication and division methods in the traditional duty cycle algorithm. Therefore, it is necessary to convert the duty cycle algorithm into a form that only includes simple operations such as addition and subtraction. Specifically, the first three-phase voltage data after the zero-sequence component is injected, the second three-phase voltage data, and the voltage data after the shift operation of the second three-phase voltage data are added and subtracted to implement the calculation process of complex operations such as multiplication and division, so that the duty cycle algorithm can also be processed on the universal timer module.
[0074] The embodiment of the present application calculates the duty cycle of the circuit by using a data processing method that only includes a shift operation and the addition and subtraction operations, so that the calculation and processing of the duty cycle can also be implemented in a general timer module that only supports simple operations.
[0075] Optionally, the three-phase voltage data includes at least: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data; the duty cycle includes at least: a first duty cycle corresponding to the first three-phase voltage data, a second duty cycle corresponding to the second three-phase voltage data, and a third duty cycle corresponding to the third three-phase voltage data; step 105 may include: inputting the three-phase voltage data after the zero-sequence component is injected into the following formula to obtain the duty cycle:
[0076]
[0077] Wherein, U is the first three-phase voltage data, V is the second three-phase voltage data, W is the third three-phase voltage data, and U comp_reg_value is the first duty cycle corresponding to the first three-phase voltage data, the V comp_reg_value is the second duty cycle corresponding to the second three-phase voltage data, the W comp_reg_value is the third duty cycle corresponding to the third three-phase voltage data.
[0078] In the embodiment of the present disclosure, the duty cycle calculation method in the related art is as follows:
[0079]
[0080] Among them, U comp_reg_value is the first duty cycle corresponding to the first three-phase voltage data, V comp_reg_value is the second duty cycle corresponding to the second three-phase voltage data, W comp_reg_value is the third duty cycle corresponding to the third three-phase voltage data, U zsc is the first three-phase voltage data after zero-sequence component injection, V zsc is the second three-phase voltage data after zero-sequence component injection, W zsc is the third three-phase voltage data after zero-sequence component injection, V dc is the DC bus voltage, the V dc Usually the fixed value is 12V, T is a constant 2000, V dc The digital per unit value is 12*256=3072.
[0081] The above V dc Substituting the fixed value of and the constant of T into formula (5) yields the following formula (6):
[0082] U comp_reg_value =0.615*Uzsc +1000 (6)
[0083] Furthermore, in order to improve the calculation accuracy, the coefficient .615 is processed to obtain the following formula (7):
[0084] U comp_reg_value =(U*667)>>10+1000
[0085] =[U*(2 9 +2 7 +2 5 -2 2 -1)]>>10+1000
[0086] =U>>1+U>>3+U>>5-U>>8-U>>10+1000 (7)
[0087] Therefore, the following formula (8) for calculating the void ratio can be derived from formula (7):
[0088]
[0089] It is worth noting that, since the duty cycle is a decimal less than 1, when the fixed-point microcontroller system participates in the calculation, the data processing unit in the universal timer module can process the decimal less than 1 as 0.
[0090] A vehicle control method provided in an embodiment of the present application constructs an algorithm model based on the acquired vehicle travel path length, speed change threshold, speed threshold, and preset function, so that the constructed algorithm model can be used to calculate the continuously changing driving speed and driving speed change value in the vehicle travel path length, so as to avoid the vehicle speed not changing smoothly during the acceleration and deceleration process when the vehicle accelerates or decelerates suddenly. This ensures that the vehicle's driving speed and driving speed change value change continuously during the entire driving process, thereby ensuring the comfort of the vehicle during driving.
[0091] See also Figure 5 As shown, the embodiment of the present application further provides a data processing device 20, which is applied to a universal timer module in a vehicle controller, and the device includes:
[0092] The receiving module 201 is configured to receive an execution instruction for a pulse width modulation task sent by a central processing unit of the vehicle controller;
[0093] The processing module 202 is configured to read the two-phase voltage data of the pulse width modulation task in response to the execution instruction;
[0094] Performing inverse transformation on the two-phase voltage data to obtain three-phase voltage data;
[0095] Performing zero-sequence component injection processing on the three-phase voltage data to obtain three-phase voltage data after zero-sequence component injection;
[0096] The output module 203 is configured to obtain a duty cycle according to the three-phase voltage data after the zero-sequence component is injected, and output the duty cycle.
[0097] Optionally, the two-phase voltage data includes at least: first two-phase voltage data, second two-phase voltage data, and the three-phase voltage data includes at least: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data;
[0098] The processing module 202 is further configured to:
[0099] The first two-phase voltage data is used as the first three-phase voltage data, and the first two-phase voltage data and the second two-phase voltage data are subjected to a shift operation and then an addition and subtraction operation to obtain second three-phase voltage data and third three-phase voltage data.
[0100] Optionally, the processing module 202 is further configured to:
[0101] The first two-phase voltage data and the second two-phase voltage data are input into the following formula to obtain the first three-phase voltage data, the second three-phase voltage data, and the third three-phase voltage data:
[0102] U=U a
[0103] V=U β -U β >>3-U β >>7-U β >>10-U a >>1
[0104] W=U β >>3+U β >>7+U β >>10-U β -U a >>1
[0105] Among them, the U α is the first two-phase voltage data, the U β is the second binary voltage data, U is the first three-phase voltage data, V is the second three-phase voltage data, and W is the third three-phase voltage data.
[0106] Optionally, the processing module 202 is further configured to:
[0107] The three-phase voltage data after the zero-sequence component is injected is obtained according to the maximum value and the minimum value in the three-phase voltage data.
[0108] Optionally, the three-phase voltage data includes at least: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data;
[0109] The processing module 202 is further configured to:
[0110] Input the three-phase voltage data into the following formula to obtain the three-phase voltage data after zero-sequence component injection;
[0111] Vmin=MINS(UVW)
[0112] V max =MAXS(UUW)
[0113]
[0114]
[0115] Wherein, U is the first three-phase voltage data, V is the second three-phase voltage data, W is the third three-phase voltage data, and V min is the minimum value among the three-phase voltage data, the V max is the maximum value among the three-phase voltage data, V0 refers to the zero-sequence component, and U zsc is the first three-phase voltage data after zero-sequence component injection, the V zsc is the second three-phase voltage data after the zero sequence component is injected. zsc It is the third three-phase voltage data after the zero-sequence component is injected.
[0116] Optionally, the output module 203 is further configured to:
[0117] The three-phase voltage data after the zero-sequence component is injected is subjected to a shift operation and then an addition and subtraction operation to obtain a duty cycle.
[0118] Optionally, the three-phase voltage data includes at least: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data; and the duty cycle includes at least: a first duty cycle corresponding to the first three-phase voltage data, a second duty cycle corresponding to the second three-phase voltage data, and a third duty cycle corresponding to the third three-phase voltage data;
[0119] The output module 203 is further configured to:
[0120] The three-phase voltage data after the zero-sequence component is injected is input into the following formula to obtain the duty cycle:
[0121]
[0122] Wherein, U is the first three-phase voltage data, V is the second three-phase voltage data, W is the third three-phase voltage data, and U comp_reg_value is the first duty cycle corresponding to the first three-phase voltage data, the V comp_reg_value is the second duty cycle corresponding to the second three-phase voltage data, the W comp_reg_value is the third duty cycle corresponding to the third three-phase voltage data.
[0123] The specific implementation of the controller in the embodiment of the present application has been introduced in detail in the vehicle control method side, so it will not be repeated here.
[0124] The embodiment of the present application obtains the duty cycle of the circuit by moving the pulse width modulation task from the original central processing unit to the general timer module for processing, thereby reducing the load rate of the central processing unit.
[0125] An embodiment of the present application also provides a vehicle, which may include the above-mentioned data processing device.
[0126] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or system comprising a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the method in the embodiment of the present application is not limited to performing the functions in the order shown or discussed, and may also include performing the functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0127] It should be noted that the above embodiments illustrate rather than limit the present application, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
[0128] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A data processing method, characterized in that: A universal timer module applied to a vehicle controller, the method comprising: receiving an execution instruction for a pulse width modulation task sent by a central processing unit of the vehicle controller; In response to the execution instruction, reading two-phase voltage data of the pulse width modulation task; Performing an inverse transformation on the two-phase voltage data to obtain three-phase voltage data; the two-phase voltage data at least includes: first two-phase voltage data and second two-phase voltage data; the three-phase voltage data at least includes: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data; The inverse transformation of the two-phase current data to obtain three-phase voltage data includes: The first two-phase voltage data is used as the first three-phase voltage data, and the first two-phase voltage data and the second two-phase voltage data are subjected to a shift operation and then an addition and subtraction operation to obtain second three-phase voltage data and third three-phase voltage data; The step of using the first two-phase voltage data as first three-phase voltage data, performing a shift operation and then an addition and subtraction operation on the first two-phase voltage data and the second two-phase voltage data to obtain second three-phase voltage data and third three-phase voltage data includes: The first two-phase voltage data and the second two-phase voltage data are input into the following formula to obtain the first three-phase voltage data, the second three-phase voltage data, and the third three-phase voltage data: U=U a V=U β -U β >>3-U β >>7-U β >>10-U a >>1 W=U β >>3+U β >>7+U β >>10-U β -U a >>1 Among them, the U α is the first two-phase voltage data, the U β is the second binary voltage data, U is the first three-phase voltage data, V is the second three-phase voltage data, and W is the third three-phase voltage data; Performing zero-sequence component injection processing on the three-phase voltage data to obtain three-phase voltage data after zero-sequence component injection; The duty cycle is obtained according to the three-phase voltage data after the zero-sequence component is injected, and the duty cycle is output.
2. The method according to claim 1, characterized in that The performing zero-sequence component injection processing on the three-phase voltage data to obtain the three-phase voltage data after the zero-sequence component injection includes: The three-phase voltage data after the zero-sequence component is injected is obtained according to the maximum value and the minimum value in the three-phase voltage data.
3. The method according to claim 2, characterized in that The three-phase voltage data at least includes: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data; The obtaining of the three-phase voltage data after the zero-sequence component is injected according to the maximum value and the minimum value in the three-phase voltage data comprises: Input the three-phase voltage data into the following formula to obtain the three-phase voltage data after zero-sequence component injection; V min =MINS(U V W) V max =MAXS(U U W) Wherein, U is the first three-phase voltage data, V is the second three-phase voltage data, W is the third three-phase voltage data, and V min is the minimum value among the three-phase voltage data, the V max is the maximum value among the three-phase voltage data, V0 refers to the zero-sequence component, and U zsc is the first three-phase voltage data after zero-sequence component injection, the V zsc is the second three-phase voltage data after the zero sequence component is injected. zsc It is the third three-phase voltage data after the zero-sequence component is injected.
4. The method according to claim 1, wherein The step of obtaining the duty cycle according to the three-phase voltage data after the zero-sequence component is injected includes: The three-phase voltage data after the zero-sequence component is injected is subjected to a shift operation and then an addition and subtraction operation to obtain a duty cycle.
5. The method according to claim 4, characterized in that The three-phase voltage data includes at least: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data; the duty cycle includes at least: a first duty cycle corresponding to the first three-phase voltage data, a second duty cycle corresponding to the second three-phase voltage data, and a third duty cycle corresponding to the third three-phase voltage data; The step of performing a shift operation and then an addition and subtraction operation on the three-phase voltage data after the zero-sequence component is injected to obtain a duty cycle includes: The three-phase voltage data after the zero-sequence component is injected is input into the following formula to obtain the duty cycle: Wherein, U is the first three-phase voltage data, V is the second three-phase voltage data, W is the third three-phase voltage data, and U comp_reg_value is the first duty cycle corresponding to the first three-phase voltage data, the V comp_reg_value is the second duty cycle corresponding to the second three-phase voltage data, the W comp_reg_value is the third duty cycle corresponding to the third three-phase voltage data.
6. A data processing device, characterized in that: A universal timer module used in a vehicle controller, the device comprising: A receiving module, configured to receive an execution instruction for a pulse width modulation task sent by a central processing unit of the vehicle controller; a processing module, configured to read two-phase voltage data of the pulse width modulation task in response to the execution instruction; Performing an inverse transformation on the two-phase voltage data to obtain three-phase voltage data; the two-phase voltage data at least includes: first two-phase voltage data and second two-phase voltage data; the three-phase voltage data at least includes: first three-phase voltage data, second three-phase voltage data, and third three-phase voltage data; The inverse transformation of the two-phase current data to obtain three-phase voltage data includes: The first two-phase voltage data is used as the first three-phase voltage data, and the first two-phase voltage data and the second two-phase voltage data are subjected to a shift operation and then an addition and subtraction operation to obtain second three-phase voltage data and third three-phase voltage data; The step of using the first two-phase voltage data as first three-phase voltage data, performing a shift operation and then an addition and subtraction operation on the first two-phase voltage data and the second two-phase voltage data to obtain second three-phase voltage data and third three-phase voltage data includes: The first two-phase voltage data and the second two-phase voltage data are input into the following formula to obtain the first three-phase voltage data, the second three-phase voltage data, and the third three-phase voltage data: U=U a V=U β -U β >>3-U β >>7-U β >>10-U a >>1 W=U β >>3+U β >>7+U β >>10-U β -U a >>1 Among them, the U α is the first two-phase voltage data, the U β is the second binary voltage data, U is the first three-phase voltage data, V is the second three-phase voltage data, and W is the third three-phase voltage data; Performing zero-sequence component injection processing on the three-phase voltage data to obtain three-phase voltage data after zero-sequence component injection; The output module is used to obtain the duty cycle according to the three-phase voltage data after the zero-sequence component is injected, and output the duty cycle.
7. A vehicle, characterized in that: Includes the data processing device according to claim 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data processing method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Ultrasonic wave sensor driving device and driving method thereof
CN108225389A
Method, device and equipment for capturing pulse width modulation signal
CN112242828A