Bus voltage sampling method and device for motor controller
By acquiring and verifying the sampled voltage in the bus voltage sampling circuit, and using the bus voltage sampling model to improve the accuracy of the bus voltage, the problem of inaccurate bus voltage sampling is solved, thereby improving the overall performance of the motor controller.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, the bus voltage sampling is not accurate enough, which leads to a decline in the performance and failure of the motor controller. This is greatly affected by the differences in electronic components.
By obtaining the sampled voltage based on the bus voltage sampling circuit under a given preset bus voltage, and inputting it into the bus voltage sampling model for comparison, the actual bus voltage is checked using the preset bus voltage, and the voltage with deviation within the preset value is determined as the bus voltage of the motor controller. The bus voltage sampling model is used to represent the linear relationship, and preset parameters are determined to improve accuracy.
High-precision sampling of bus voltage was achieved, avoiding the influence of differences in electronic components and improving the overall performance of the motor controller.
Smart Images

Figure CN114928302B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of voltage sampling technology, specifically to a method and apparatus for sampling the bus voltage of a motor controller. Background Technology
[0002] When controlling a motor, the motor controller needs to sample the bus voltage using a bus voltage sampling circuit to obtain the bus voltage. Based on this bus voltage, the controller executes the motor control algorithm to achieve motor control. Therefore, the accuracy of the bus voltage directly affects the overall performance and reliability of the controller.
[0003] In related technologies, theoretical formulas or multiple-unit, multiple-acquisition correction methods are commonly used to sample the bus voltage in bus voltage sampling circuits. However, due to the differences in electronic components within the bus voltage sampling circuit, the bus voltage obtained using theoretical formulas or multiple-unit, multiple-acquisition correction methods may not be accurate enough. This can lead to errors in the motor control algorithm, resulting in performance degradation and functional failure of the motor controller. Summary of the Invention
[0004] This application aims to at least solve one of the technical problems existing in the related art. To this end, this application proposes a bus voltage sampling method for a motor controller, which enables the acquired bus voltage to meet accuracy requirements and improves the overall performance of the motor controller.
[0005] This application also proposes a bus voltage sampling device for a motor controller.
[0006] This application also proposes an electronic device.
[0007] This application also proposes a computer-readable storage medium.
[0008] The bus voltage sampling method for a motor controller according to the first aspect of this application includes:
[0009] Based on each preset bus voltage, obtain each sampled voltage corresponding to each preset bus voltage from the bus voltage sampling circuit of the motor controller;
[0010] The actual bus voltage obtained by inputting any target voltage from each of the sampled voltages into the bus voltage sampling model is compared with the preset bus voltage corresponding to the target voltage. If the deviation between any actual bus voltage and the corresponding preset bus voltage is less than or equal to a preset value, each actual bus voltage is marked as the bus voltage of the motor controller.
[0011] The bus voltage sampling model is used to represent the linear relationship between the actual bus voltage and the sampled voltage.
[0012] The actual bus voltage is determined based on the sampled voltage corresponding to the actual bus voltage and the preset parameters in the bus voltage sampling model.
[0013] By acquiring a sampled voltage corresponding to a preset bus voltage using a bus voltage sampling circuit, and inputting this sampled voltage into a bus voltage sampling model to obtain the actual bus voltage, a comparison is made between this actual bus voltage and the preset bus voltage. This verification and validation of the actual bus voltage obtained from the bus voltage sampling circuit at a given sampling voltage is achieved using the preset bus voltage. The actual bus voltage whose deviation from the preset bus voltage is within a preset value is used as the bus voltage of the motor controller. This ensures that the acquired bus voltage is close to the preset bus voltage, avoiding the influence of differences in electronic components on the acquired motor controller bus voltage, meeting high precision requirements, and ultimately improving the overall performance of the motor controller.
[0014] According to one embodiment of this application, it also includes:
[0015] A set of voltage datasets is formed based on any target bus voltage from the preset bus voltages and the sampled voltage corresponding to the target bus voltage;
[0016] Based on the magnitude of each preset bus voltage, the voltage datasets are sorted, and any two adjacent sets of voltage datasets are input into the bus voltage sampling model to determine the initial parameters.
[0017] The preset parameters are determined based on the average value of each of the initial parameters.
[0018] According to one embodiment of this application, the voltage difference between any two adjacent preset bus voltages is the same.
[0019] According to one embodiment of this application, the preset parameter is determined based on the average value of each of the initial parameters, including:
[0020] Obtain the average value of each of the initial parameters;
[0021] If the deviation between the average value and the theoretical value meets a preset condition, the average value is determined as the preset parameter.
[0022] According to one embodiment of this application, it also includes:
[0023] If the deviation between any actual bus voltage and the corresponding preset bus voltage is greater than the preset value, the bus voltage sampling circuit is investigated.
[0024] According to one embodiment of this application, the bus voltage sampling circuit includes a voltage divider circuit, an isolation circuit, and a subtractor circuit.
[0025] According to one embodiment of this application, the preset parameters include at least one of circuit gain parameters and circuit bias parameters.
[0026] The bus voltage sampling device for a motor controller according to a second aspect embodiment of this application includes:
[0027] The voltage acquisition module is used to acquire the sampled voltage corresponding to any voltage test point and the preset bus voltage from the bus voltage sampling circuit of the motor controller, based on the preset bus voltage.
[0028] The voltage sampling module is used to input any target voltage from each of the sampled voltages into the bus voltage sampling model to obtain the actual bus voltage, compare it with the preset bus voltage corresponding to the target voltage, determine that the deviation between any actual bus voltage and the corresponding preset bus voltage is less than or equal to a preset value, and mark each actual bus voltage as the bus voltage of the motor controller.
[0029] The bus voltage sampling model is used to represent the linear relationship between the actual bus voltage and the sampled voltage.
[0030] The actual bus voltage is determined based on the sampled voltage corresponding to the actual bus voltage and the preset parameters in the bus voltage sampling model.
[0031] An electronic device according to a third aspect of this application includes a processor and a memory storing a computer program, wherein the processor executes the computer program to implement the bus voltage sampling method of the motor controller described in any of the above embodiments.
[0032] A computer-readable storage medium according to a fourth aspect of this application stores a computer program thereon, which, when executed by a processor, implements the bus voltage sampling method of the motor controller described in any of the above embodiments.
[0033] A computer program product according to a fifth aspect of this application includes: when the computer program is executed by a processor, it implements a bus voltage sampling method for a motor controller as described in any of the above embodiments.
[0034] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects:
[0035] By acquiring a sampled voltage corresponding to a preset bus voltage using a bus voltage sampling circuit, and inputting this sampled voltage into a bus voltage sampling model to obtain the actual bus voltage, a comparison is made between this actual bus voltage and the preset bus voltage. This verification and validation of the actual bus voltage obtained from the bus voltage sampling circuit at a given sampling voltage is achieved using the preset bus voltage. The actual bus voltage whose deviation from the preset bus voltage is within a preset value is used as the bus voltage of the motor controller. This ensures that the acquired bus voltage is close to the preset bus voltage, avoiding the influence of differences in electronic components on the acquired motor controller bus voltage, meeting high precision requirements, and ultimately improving the overall performance of the motor controller.
[0036] Furthermore, by inputting each sampled voltage and its corresponding preset bus voltage into the bus voltage sampling model, multiple initial parameters are obtained. The average of these initial parameters is then used to obtain the preset parameters of the bus voltage sampling model. This allows the obtained preset parameters to represent the overall sampling situation of the sampling circuit, thereby making the actual bus voltage obtained later more consistent with the actual situation. This, in turn, enables a more accurate determination of whether the actual bus voltage is affected by the differences in electronic components.
[0037] Furthermore, after obtaining the average value of each initial parameter, the average value of each initial parameter is compared with the theoretical value. When the comparison result between the average value and the theoretical value meets the preset conditions, the average value is used as the preset parameter. This ensures that the obtained preset parameter is not affected by some abnormal parameters with large differences, and thus the obtained preset parameter can more accurately represent the overall sampling situation. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a schematic flowchart of the bus voltage sampling method for a motor controller provided in an embodiment of this application;
[0040] Figure 2 This is a schematic diagram of the bus voltage sampling circuit provided in the embodiments of this application;
[0041] Figure 3 This is a schematic diagram of the structure of the bus voltage sampling device for the motor controller provided in this application embodiment;
[0042] Figure 4This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0044] The following will provide a detailed description and explanation of the bus voltage sampling method and apparatus for the motor controller provided in this application through several specific embodiments.
[0045] In one embodiment, a method for sampling the bus voltage of a motor controller is provided. This method is applied to a server to obtain the sampled voltage of the bus of the motor controller, such as the sampled voltage of the bus of a motor controller in a new energy vehicle. The server can be a standalone server or a server cluster composed of multiple servers. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence sampling point devices.
[0046] like Figure 1 As shown, the bus voltage sampling method for a motor controller provided in this embodiment includes:
[0047] Step 101: Based on each preset bus voltage, obtain each sampled voltage corresponding to each preset bus voltage from the bus voltage sampling circuit of the motor controller;
[0048] Step 102: Input any target voltage from each of the sampled voltages into the bus voltage sampling model to obtain the actual bus voltage, compare it with the preset bus voltage corresponding to the target voltage, determine that the deviation between any actual bus voltage and the corresponding preset bus voltage is less than or equal to a preset value, and mark each actual bus voltage as the bus voltage of the motor controller.
[0049] The bus voltage sampling model is used to represent the linear relationship between the actual bus voltage and the sampled voltage.
[0050] The actual bus voltage is determined based on the sampled voltage corresponding to the actual bus voltage and the preset parameters in the bus voltage sampling model.
[0051] By acquiring a sampled voltage corresponding to a preset bus voltage using a bus voltage sampling circuit, and inputting this sampled voltage into a bus voltage sampling model to obtain the actual bus voltage, a comparison is made between this actual bus voltage and the preset bus voltage. This verification and validation of the actual bus voltage obtained from the bus voltage sampling circuit at a given sampling voltage is achieved using the preset bus voltage. The actual bus voltage whose deviation from the preset bus voltage is within a preset value is used as the bus voltage of the motor controller. This ensures that the acquired bus voltage is close to the preset bus voltage, avoiding the influence of differences in electronic components on the acquired motor controller bus voltage, meeting high precision requirements, and ultimately improving the overall performance of the motor controller.
[0052] like Figure 2 As shown, in one embodiment, the bus sampling circuit includes a battery for providing a preset bus voltage, a voltage divider circuit, an isolation circuit, and a subtractor circuit. When sampling the bus voltage, multiple preset bus voltages are provided to the battery. These preset bus voltages can form an arithmetic sequence, meaning the bus voltage can be provided from 0V to Vmax, with intervals of 100V. For example, 0V, 100V, 200V, 300V, ..., Vmax. Here, Vmax represents the highest operating voltage the battery can withstand, and each preset bus voltage can be set according to actual conditions. After providing the preset bus voltages, for any given preset bus voltage, the corresponding sampling voltage is collected from the bus voltage sampling circuit. For example, after providing a 100V bus voltage to the battery, voltage sampling is performed through the bus voltage sampling circuit to collect the sampling voltage corresponding to the 100V bus voltage.
[0053] After acquiring the sampling voltages corresponding to each preset bus voltage, any target voltage from these sampling voltages is input into the bus voltage sampling model to obtain the actual bus voltage corresponding to the target voltage. This actual bus voltage is then compared with the preset bus voltage corresponding to the target voltage. The preset bus voltage is 100V, and the sampling voltage obtained after inputting it into the bus voltage sampling circuit is A. After obtaining sampling voltage A, it is input into the bus voltage sampling model, and the actual bus voltage B is obtained through the model. After obtaining the actual bus voltage B, it can be compared with the 100V preset bus voltage, thereby determining whether the actual bus voltage B is affected by electronic components based on the comparison result.
[0054] Specifically, the bus voltage sampling circuit includes a voltage divider circuit, an isolation circuit, and a subtractor circuit. After passing through these circuits, the bus voltage sampling model can be simplified to a linear equation: y = kx + b, where y represents the actual bus voltage; x represents the sampled voltage; and k and b represent preset parameters, where k is the circuit gain and b is the circuit bias. By inputting any sampled voltage into the bus voltage sampling model and substituting it into the linear equation y = kx + b, the actual bus voltage corresponding to that sampled voltage can be obtained. The preset parameters can be theoretical values set according to actual conditions.
[0055] To ensure that the preset parameters better reflect the overall voltage sampling situation of the bus voltage sampling circuit, in one embodiment, the preset parameters can also be determined by each preset bus voltage and its corresponding sampling voltage. Specifically, the determination of the preset parameters includes:
[0056] A set of voltage datasets is formed based on any target bus voltage from the preset bus voltages and the sampled voltage corresponding to the target bus voltage;
[0057] Based on the magnitude of each preset bus voltage, sort each voltage dataset, obtain at least two adjacent sets of voltage datasets, input them into the bus voltage sampling model, and determine the preset parameters.
[0058] In one embodiment, before comparing the sampled voltage with the ideal voltage, any preset bus voltage and its corresponding sampled voltage are recorded to form a voltage dataset. For example, if the preset bus voltage is 100V and its corresponding sampled voltage is A, then a voltage dataset {100V, A} can be formed. In each preset bus voltage, the voltage difference between any two adjacent preset bus voltages is the same. Then, the voltage datasets are sorted in ascending or descending order according to the magnitude of the preset bus voltage. Any two adjacent voltage datasets are then input into the bus voltage sampling model, and substituted into the bus voltage sampling model y = kx + b. That is, the preset bus voltages in the voltage datasets are substituted into y in the bus voltage sampling model, and the sampled voltages are substituted into x in the bus voltage sampling model, forming multiple sets of formulas for solving the circuit gain k and circuit bias b, thereby solving for the circuit gain k and circuit bias b corresponding to each voltage dataset. For example, the voltage datasets are sorted according to the magnitude of the preset bus voltage as voltage dataset 1, voltage dataset 2, ..., voltage dataset N. Then, multiple sets of voltage datasets are input into the bus voltage sampling model, resulting in multiple equations for solving k and b. The two equations from two adjacent sets of voltage datasets are then combined into a single system of equations, yielding a circuit gain k and a circuit bias b. Thus, multiple circuit gains k and circuit biases b can be obtained from multiple sets of voltage datasets. Finally, the average of these multiple circuit gains k and multiple circuit biases b is calculated, and the resulting average circuit gain and average circuit bias are the preset parameters.
[0059] For example, multiple circuit gains can be obtained through calculation: k1, k2, k3...kn; and multiple circuit biases b: b1, b2, b3...bn. Thus, the average circuit gain can be obtained as:
[0060] k0 = (k1 + k2 + ... + kn) / n;
[0061] The average circuit bias is:
[0062] b0 = (b1 + b2 + ... + bn) / n.
[0063] By inputting each sampled voltage and its corresponding preset bus voltage into the bus voltage sampling model, multiple initial parameters are obtained. The preset parameters of the bus voltage sampling model are obtained by averaging the multiple initial parameters. The obtained preset parameters can represent the overall sampling situation of the sampling circuit, so that the actual bus voltage obtained later can better match the actual situation. This allows for a more accurate determination of whether the actual bus voltage is affected by the differences in electronic components.
[0064] Considering that some initial parameters may contain significant outliers, affecting the average value and preventing the obtained preset parameters from accurately representing the overall sampling situation, in one embodiment, after obtaining the average value of each initial parameter, the average value is compared with the theoretical value. If the deviation between the average value and the set theoretical value meets the preset condition, such as the deviation being within ±1%, then the average value is determined to represent the overall sampling situation, and is thus identified as the preset parameter. If the deviation between the average value and the set theoretical value does not meet the preset condition, such as the deviation being beyond ±1%, then extreme data exists in each initial parameter. In this case, the largest and / or smallest initial parameters in the initial parameter set can be removed, and the remaining initial parameters can be iterated into an initial parameter set. The average value is recalculated and compared with the theoretical value to determine whether the preset condition is met. If it is met, the average value is identified as the preset parameter; otherwise, the deletion step is repeated, and the initial parameter set is iterated until the comparison result between the average value and the theoretical value meets the preset condition. The average value that meets the preset condition is then used as the preset parameter. If the deviations of all average values from the theoretical values do not meet the preset conditions, new preset bus voltages are input to the bus voltage sampling circuit. Based on the new preset bus voltages and the new sampling voltages, the average values of the initial parameters are re-determined until the comparison results between the average values and the theoretical values meet the preset conditions. The obtained average values are then used as the preset parameters. Alternatively, the theoretical values can be directly used as the preset parameters.
[0065] After obtaining the average value of each initial parameter, the average value of each initial parameter is compared with the theoretical value. When the comparison result of the average value and the theoretical value meets the preset conditions, the average value is used as the preset parameter. This ensures that the obtained preset parameter is not affected by some abnormal parameters with large differences, and thus the obtained preset parameter can more accurately represent the overall sampling situation.
[0066] After determining the preset parameters, the circuit gain and circuit bias of the bus voltage can be verified and assigned, forming an ideal bus voltage sampling model. At this point, the actual bus voltage corresponding to any input sampling voltage can be determined, and the actual bus voltage can be verified using the preset bus voltage corresponding to the sampling voltage to determine whether the deviation between the actual bus voltage and the preset bus voltage is greater than the preset value, thereby determining whether the actual bus voltage is affected by electronic components.
[0067] Specifically, after obtaining the actual bus voltage corresponding to each sampled voltage, the preset bus voltage corresponding to any actual bus voltage can be obtained according to the correspondence between each preset bus voltage and each sampled voltage. For example, if sampled voltage A is obtained by inputting a preset bus voltage of 100V into the bus voltage sampling circuit, and the actual bus voltage B obtained through the bus voltage sampling model is B, then the preset bus voltage of 100V corresponds to the actual bus voltage of B. After determining the preset bus voltages that correspond one-to-one with each actual bus voltage, each actual bus voltage is compared with its corresponding preset bus voltage. If the deviation values of each actual bus voltage and its corresponding preset bus voltage are all less than or equal to the preset values, it indicates that the acquisition of the bus voltage is not affected by the differences in the electronic components of the bus voltage sampling circuit, and meets the requirements of high precision. The preset values can be set according to the actual situation, such as ±3%. That is, if the deviation values of each actual bus voltage and its corresponding preset bus voltage are all within ±3%, it indicates that the acquired actual bus voltage is not affected by the differences in the electronic components, and meets the requirements of high precision. When it is determined that each actual bus voltage meets the high-precision requirements, each actual bus voltage can be used as the bus voltage of the motor controller to ensure accurate sampling of the motor controller's bus voltage.
[0068] In one embodiment, if any actual bus voltage deviates from the corresponding preset bus voltage by a value greater than the preset value, it indicates that the bus voltage sampling circuit is affected by the differences in the electronic components. In this case, the bus voltage sampling circuit is investigated.
[0069] The bus voltage sampling device for the motor controller provided in this application is described below. The bus voltage sampling device for the motor controller described below can be referred to in correspondence with the bus voltage sampling method for the motor controller described above.
[0070] In one embodiment, such as Figure 3 As shown, a bus voltage sampling device for a motor controller is provided, comprising:
[0071] The voltage acquisition module 210 is used to acquire the sampling voltage corresponding to any voltage test point and the preset bus voltage from the bus voltage sampling circuit of the motor controller according to the preset bus voltage.
[0072] The voltage sampling module 220 is used to input any target voltage from each of the sampled voltages into the bus voltage sampling model to obtain the actual bus voltage, compare it with the preset bus voltage corresponding to the target voltage, determine that the deviation between any actual bus voltage and the corresponding preset bus voltage is less than or equal to a preset value, and mark each actual bus voltage as the bus voltage of the motor controller.
[0073] The bus voltage sampling model is used to represent the linear relationship between the actual bus voltage and the sampled voltage.
[0074] The actual bus voltage is determined based on the sampled voltage corresponding to the actual bus voltage and the preset parameters in the bus voltage sampling model.
[0075] By acquiring a sampled voltage corresponding to a preset bus voltage using a bus voltage sampling circuit, and inputting this sampled voltage into a bus voltage sampling model to obtain the actual bus voltage, a comparison is made between this actual bus voltage and the preset bus voltage. This verification and validation of the actual bus voltage obtained from the bus voltage sampling circuit at a given sampling voltage is achieved using the preset bus voltage. The actual bus voltage whose deviation from the preset bus voltage is within a preset value is used as the bus voltage of the motor controller. This ensures that the acquired bus voltage is close to the preset bus voltage, avoiding the influence of differences in electronic components on the acquired motor controller bus voltage, meeting high precision requirements, and ultimately improving the overall performance of the motor controller.
[0076] In one embodiment, the voltage sampling module 220 is further configured to:
[0077] A set of voltage datasets is formed based on any target bus voltage from the preset bus voltages and the sampled voltage corresponding to the target bus voltage;
[0078] Based on the magnitude of each preset bus voltage, the voltage datasets are sorted, and any two adjacent sets of voltage datasets are input into the bus voltage sampling model to determine the initial parameters.
[0079] The preset parameters are determined based on the average value of each of the initial parameters.
[0080] In one embodiment, the voltage difference between any two adjacent preset bus voltages is the same.
[0081] In one embodiment, the voltage sampling module 220 is specifically used for:
[0082] Obtain the average value of each of the initial parameters;
[0083] If the deviation between the average value and the theoretical value meets a preset condition, the average value is determined as the preset parameter.
[0084] In one embodiment, the voltage sampling module 220 is further configured to:
[0085] If the deviation between any actual bus voltage and the corresponding preset bus voltage is greater than the preset value, the bus voltage sampling circuit should be investigated.
[0086] In one embodiment, the bus voltage sampling circuit includes a voltage divider circuit, an isolation circuit, and a subtractor circuit.
[0087] In one embodiment, the preset parameters include at least one of circuit gain parameters and circuit bias parameters.
[0088] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call a computer program in the memory 830 to execute a bus voltage sampling method for the motor controller, such as including:
[0089] Based on each preset bus voltage, obtain each sampled voltage corresponding to each preset bus voltage from the bus voltage sampling circuit of the motor controller;
[0090] The actual bus voltage obtained by inputting any target voltage from each of the sampled voltages into the bus voltage sampling model is compared with the preset bus voltage corresponding to the target voltage. If the deviation between any actual bus voltage and the corresponding preset bus voltage is less than or equal to a preset value, each actual bus voltage is marked as the bus voltage of the motor controller.
[0091] The bus voltage sampling model is used to represent the linear relationship between the actual bus voltage and the sampled voltage.
[0092] The actual bus voltage is determined based on the sampled voltage corresponding to the actual bus voltage and the preset parameters in the bus voltage sampling model.
[0093] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0094] On the other hand, embodiments of this application also provide a storage medium, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the bus voltage sampling method of the motor controller provided in the above embodiments, for example including:
[0095] Based on each preset bus voltage, obtain each sampled voltage corresponding to each preset bus voltage from the bus voltage sampling circuit of the motor controller;
[0096] The actual bus voltage obtained by inputting any target voltage from each of the sampled voltages into the bus voltage sampling model is compared with the preset bus voltage corresponding to the target voltage. If the deviation between any actual bus voltage and the corresponding preset bus voltage is less than or equal to a preset value, each actual bus voltage is marked as the bus voltage of the motor controller.
[0097] The bus voltage sampling model is used to represent the linear relationship between the actual bus voltage and the sampled voltage.
[0098] The actual bus voltage is determined based on the sampled voltage corresponding to the actual bus voltage and the preset parameters in the bus voltage sampling model.
[0099] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A bus voltage sampling method of a motor controller, characterized by, The method comprises the following steps: According to each preset bus voltage, a sampling voltage corresponding to each preset bus voltage is obtained from a bus voltage sampling circuit of a motor controller; After a target voltage in each sampling voltage is input into a bus voltage sampling model, an actual bus voltage obtained by the bus voltage sampling model is compared with a preset bus voltage corresponding to the target voltage, and it is determined that a deviation between any actual bus voltage and the corresponding preset bus voltage is less than or equal to a preset value, and each actual bus voltage is marked as a bus voltage of the motor controller; The bus voltage sampling model is used to represent a linear relationship between the actual bus voltage and the sampling voltage; The actual bus voltage is determined according to the sampling voltage corresponding to the actual bus voltage and preset parameters in the bus voltage sampling model; The bus voltage sampling model comprises y=kx+b, y represents an actual bus voltage, x represents a sampling voltage, k and b represent preset parameters, k is a circuit gain, and b is a circuit offset; The method further comprises the following steps: According to any target bus voltage in the preset bus voltage and a sampling voltage corresponding to the target bus voltage, a set of voltage data sets is formed; After each voltage data set is sorted according to the size of each preset bus voltage, any two adjacent voltage data sets are input into the bus voltage sampling model to determine each initial parameter; The preset parameters are determined according to the average value of each initial parameter. The preset parameters comprise the average value of each initial parameter representing a circuit gain and the average value of each initial parameter representing a circuit offset.
2. The bus voltage sampling method of a motor controller according to claim 1, wherein, The voltage difference between any two adjacent preset bus voltages is the same.
3. The bus voltage sampling method of a motor controller according to claim 1, wherein, The preset parameters are determined according to the average value of each initial parameter, which comprises the following steps: The average value of each initial parameter is obtained; The average value is determined as the preset parameter when the deviation between the average value and a theoretical value meets a preset condition.
4. The bus voltage sampling method of a motor controller according to claim 1, wherein, Further comprising: When the deviation between any actual bus voltage and the corresponding preset bus voltage is greater than the preset value, the bus voltage sampling circuit is checked.
5. The method of bus voltage sampling of a motor controller according to any one of claims 1-4, wherein, The bus voltage sampling circuit comprises a voltage dividing circuit, an isolation circuit and a subtractor circuit.
6. The method of bus voltage sampling of a motor controller according to any one of claims 1-4, wherein, The preset parameters comprise at least one of a circuit gain parameter and a circuit offset parameter.
7. A bus voltage sampling device of a motor controller, characterized by comprising: The voltage acquisition module is configured to obtain a sampling voltage corresponding to any voltage test point and a preset bus voltage from a bus voltage sampling circuit of a motor controller according to the preset bus voltage; The voltage sampling module is configured to compare an actual bus voltage obtained by inputting any target voltage in each sampling voltage into a bus voltage sampling model with a preset bus voltage corresponding to the target voltage, determine that the deviation between any actual bus voltage and the corresponding preset bus voltage is less than or equal to a preset value, and mark each actual bus voltage as a bus voltage of the motor controller; The bus voltage sampling model is used to represent a linear relationship between the actual bus voltage and the sampling voltage; The bus voltage sampling model comprises y=kx+b, y represents an actual bus voltage, x represents a sampling voltage, k and b represent preset parameters, k is a circuit gain, and b is a circuit offset; The actual bus voltage is determined according to the sampling voltage corresponding to the actual bus voltage and preset parameters in the bus voltage sampling model; The bus voltage sampling model includes y=kx+b, y represents the actual bus voltage; x represents the sampling voltage; k and b represent preset parameters, k is a circuit gain, and b is a circuit bias; The voltage sampling module is further configured to: form a set of voltage data sets according to any target bus voltage in the preset bus voltage and a sampling voltage corresponding to the target bus voltage; sort each voltage data set according to the size of each preset bus voltage, input any two adjacent voltage data sets into the bus voltage sampling model, and determine each initial parameter; determine the preset parameters according to the average values of each initial parameter; The preset parameters include the average values of each initial parameter representing the circuit gain and the average values of each initial parameter representing the circuit bias.
8. An electronic device comprising a processor and a memory having a computer program stored therein, characterized in that, The processor executes the computer program to implement the bus voltage sampling method of the motor controller in any one of claims 1 to 6.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the bus voltage sampling method of the motor controller in any one of claims 1 to 6.
Citation Information
Patent Citations
Voltage detection method and voltage detection system of motor controller for electric vehicle
CN103675411A
Motor control method and system
CN106655908A