Sampled data processing method and device, electronic equipment, storage medium and chip

By detecting the static sampling output voltage in the sampling circuit of the air-conditioning compressor and performing compensation correction, the sampling result distortion caused by the consistency deviation of the sampling circuit components is solved, and the stability of the motor control is improved.

CN120142743APending Publication Date: 2025-06-13XIAOMI TECH (WUHAN) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311706572.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

During the phase current sampling process of air conditioning compressors, due to the deviation of consistency of components such as sampling resistance, the actual value of the DC bias voltage is deviated from the design value, resulting in distortion of the sampling results and affecting the stability of the compressor motor control.

Method used

By obtaining the static sampling output voltage when the input current of the sampling circuit is zero, it is determined whether the ratio of the difference between the static sampling output voltage and the sampling bias voltage exceeds the tolerance threshold. If it exceeds the value, it is determined that there is distortion in the sampling value, and the compensation correction of the alternating current sampling value is performed based on the relationship between the static sampling output voltage and the bias voltage.

Benefits of technology

By detecting the actual static bias voltage of the sampling circuit and compensating, the sampling current deviation distortion problem is eliminated, the accuracy of motor current sampling is improved, and the stability of motor control is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120142743A_ABST
    Figure CN120142743A_ABST
Patent Text Reader

Abstract

The invention relates to a sampling data processing method and device, electronic equipment, a storage medium and a chip. The method comprises the following steps: acquiring a static sampling output voltage output by a sampling circuit under the condition that the input current of the sampling circuit is zero; when the ratio of the absolute value of the difference value of the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is greater than a tolerance threshold and less than 1, determining that the sampling value of the alternating current of the sampling circuit is distorted; based on the relation between the static sampling output voltage and the sampling bias voltage, the sampling value of the alternating current is compensated and corrected. By detecting the actual static bias voltage of the sampling circuit and further compensating the sampling value of the compressor motor driving current according to the actual static bias voltage, the problem of sampling current deviation distortion caused by poor consistency of components of the sampling circuit is solved, the accuracy of motor current sampling is improved, and the reliability of the motor is improved. Therefore, the stability of motor control is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data processing, and particularly to a sampling data processing method, apparatus, electronic device, storage medium, and chip. Background Art

[0002] Generally, the sampling of the phase current of an air conditioner compressor converts the AC current signal into an AC voltage signal through a sampling resistor, and then sends it to a microprocessor MCU for sampling data processing. Since the microprocessor can generally only process positive voltage signals, a DC bias voltage is generally added during the conversion of the AC current signal into an AC voltage signal so that the AC voltage signal is always a positive voltage signal. When the AC current signal is zero, the value of the AC voltage signal is the value of the DC bias voltage signal.

[0003] In order to obtain the sampling value of the AC current, the current common practice is to subtract the DC bias voltage designed by the current sampling circuit from the voltage value sampled by the sampling resistor during the sampling of the compressor phase current. However, in the actual sampling circuit, due to the deviation in the consistency of components such as the sampling resistor, the actual value of the DC bias voltage on different circuit boards deviates from the theoretical value designed by the circuit. When this deviation is large enough, it will cause the sampling result of the sampling circuit to be distorted, which will affect the stability of the compressor motor control. Summary of the Invention

[0004] To overcome the problems existing in the related art, according to the first aspect of the embodiments of the present disclosure, a sampling data processing method is provided. The method includes:

[0005] Obtaining a static sampling output voltage output by the sampling circuit when the input current of the sampling circuit is zero;

[0006] When the absolute value of the difference between the static sampling output voltage and the sampling bias voltage, and the ratio of the sampling bias voltage is greater than the tolerance threshold and less than 1, it is determined that the sampling value of the alternating current of the sampling circuit is distorted;

[0007] Compensating and correcting the sampling value of the alternating current based on the relationship between the static sampling output voltage and the sampling bias voltage.

[0008] Optionally, the method further includes:

[0009] When the absolute value of the difference between the static sampling output voltage and the sampling bias voltage, and the ratio of the sampling bias voltage is less than or equal to the tolerance threshold, it is determined that the sampling value of the alternating current of the sampling circuit is valid.

[0010] Optionally, compensating and correcting the sampled value of the alternating current based on the relationship between the static sampling output voltage and the sampling bias voltage includes:

[0011] If the static sampling output voltage is greater than the sampling bias voltage, it is determined that the positive half-cycle sampling voltage of the alternating output voltage of the sampling circuit is distorted, and the positive half-cycle sampled value of the alternating current is compensated and corrected by the negative half-cycle sampled value of the alternating current;

[0012] If the static sampling output voltage is less than the sampling bias voltage, it is determined that the negative half-cycle sampling voltage of the alternating output voltage of the sampling circuit is distorted, and the negative half-cycle sampled value of the alternating current is compensated and corrected by the positive half-cycle sampled value of the alternating current;

[0013] The alternating output voltage is the output voltage of the sampling circuit.

[0014] Optionally, compensating and correcting the positive half-cycle sampled value of the alternating current by the negative half-cycle sampled value of the alternating current includes:

[0015] Replacing the positive half-cycle sampled value of the alternating current with the absolute value of the negative half-cycle sampled value of the alternating current.

[0016] Optionally, the negative half-cycle sampled value of the alternating current is the difference between the negative half-cycle sampling voltage of the alternating output voltage and the static sampling output voltage.

[0017] Optionally, compensating and correcting the negative half-cycle sampled value of the alternating current by the positive half-cycle sampled value of the alternating current includes:

[0018] Replacing the negative half-cycle sampled value of the alternating current with the opposite number of the positive half-cycle sampled value of the alternating current.

[0019] Optionally, the positive half-cycle sampled value of the alternating current is the difference between the positive half-cycle sampling voltage of the alternating output voltage and the static sampling output voltage.

[0020] Optionally, when the absolute value of the difference between the static sampling output voltage and the sampling bias voltage, and the ratio of the sampling bias voltage is less than or equal to the tolerance threshold, determining that the sampled value of the alternating current of the sampling circuit is valid includes:

[0021] When the ratio of the absolute value of the difference to the sampling bias voltage is less than or equal to the tolerance threshold, it is determined that all the sampled values of the alternating current of the sampling circuit are valid, and there is no need to compensate the sampled values of the alternating current of the sampling circuit.

[0022] Optionally, the static sampling output voltage is the mean value of the output voltages of the sampling circuit collected multiple times when the input current of the sampling circuit is zero.

[0023] According to a second aspect of the embodiments of the present disclosure, there is provided a sampling data processing device, including:

[0024] An acquisition module, configured to acquire a static sampling output voltage output by the sampling circuit when the input current of the sampling circuit is zero;

[0025] A determination module, configured to determine that the sampling value of the alternating current of the sampling circuit is distorted when the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is greater than a tolerance threshold and less than 1;

[0026] A compensation module, configured to perform compensation and correction on the sampling value of the alternating current based on the relationship between the static sampling output voltage and the sampling bias voltage.

[0027] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

[0028] A processor;

[0029] A memory for storing instructions executable by the processor;

[0030] Wherein, the processor is configured to: execute the executable instructions to implement the method according to any one of the first aspect.

[0031] According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the method according to any one of the first aspect are implemented.

[0032] According to a fifth aspect of the embodiments of the present disclosure, there is provided a chip, including a processor and an interface; the processor is used to read instructions to execute the method according to any one of the first aspect.

[0033] In summary, the embodiments of the present disclosure provide a method for processing sampled data. The method includes: when the input current of the sampling circuit is zero, obtaining the static sampled output voltage output by the sampling circuit; when the absolute value of the difference between the static sampled output voltage and the sampling bias voltage, and the ratio of the sampling bias voltage is greater than the tolerance threshold and less than 1, determining that the sampled value of the alternating current of the sampling circuit is distorted; based on the relationship between the static sampled output voltage and the sampling bias voltage, compensating and correcting the sampled value of the alternating current. The embodiments of the present disclosure can detect the actual static bias voltage of the sampling circuit, and further compensate the sampled value of the driving current of the compressor motor according to the actual static bias voltage, eliminate the sampling current deviation distortion problem caused by the poor consistency of the sampling circuit components, improve the accuracy of the motor current sampling, and thus improve the stability of the motor control.

[0034] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.

[0036] Figure 1a is a schematic diagram of a current sampling circuit shown according to an exemplary embodiment.

[0037] Figure 1b is a flowchart of a method for processing sampled data shown according to an exemplary embodiment.

[0038] Figure 2 is a flowchart of a method for processing sampled data shown according to an exemplary embodiment.

[0039] Figure 3 is a flowchart of a method for processing sampled data shown according to an exemplary embodiment.

[0040] Figure 4 is a flowchart of a method for processing sampled data shown according to an exemplary embodiment.

[0041] Figure 5 is a flowchart of a method for processing sampled data shown according to an exemplary embodiment.

[0042] Figure 6 is a flowchart of a method for processing sampled data shown according to an exemplary embodiment.

[0043] Figure 7 is a block diagram of a device for processing sampled data shown according to an exemplary embodiment.

[0044] Figure 8 is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners

[0045] Here, the exemplary embodiments will be described in detail, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0046] It should be understood that the term "including" and its variants used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0047] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships. The modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more". In the description of the present disclosure, unless otherwise specified, "multiple" means two or more than two, and other quantifiers are similar; "at least one (item)", "one (item) or more (items)" or their similar expressions refer to any combination of these items (items), including any combination of single item (item) or plural items (items).

[0048] In the embodiments of the present disclosure, although the operations or steps are described in a specific order in the drawings, it should not be understood that they are required to be performed in the specific order shown or in a serial order, or that all the operations or steps shown are required to be performed to obtain the desired result. In the embodiments of the present disclosure, these operations or steps can be performed serially; they can also be performed in parallel; or a part of these operations or steps can be performed.

[0049] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information. It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to users and the authorization of users should be obtained in an appropriate manner according to relevant laws and regulations. The present disclosure will be described below with reference to specific embodiments.

[0050] First, the application scenario of the present disclosure will be described. Figure 1a It is a schematic diagram of a current sampling circuit shown according to an exemplary embodiment. As Figure 1a shown, the non-inverting input terminal of the operational amplifier U2B is pulled up to the VCC3.3V power supply through the resistor R46, the capacitor C35 is connected in parallel with the resistor R46, the non-inverting input terminal of the operational amplifier U2B is grounded through the resistor R45, and the VCC3.3V power supply is grounded through the series connection of the resistors R46 and R47; the resistors R42, R43 and the capacitor C34 are connected in parallel between the inverting input terminal and the output terminal of the operational amplifier U2B, the inverting input terminal of the operational amplifier U2B is connected to the Vin terminal through the resistor R44, and the output terminal of the operational amplifier U2B is the Vout terminal.

[0051] The Vin terminal is the input terminal for the sampled value of the alternating current (this value has positive and negative values), and the Vout terminal is the output terminal for the sampled voltage of the alternating current (this sampled voltage value is positive). For example, when the input value of the alternating current is zero, Vin is zero at this time, and Vout is the DC bias voltage. The VCC of this circuit is 3.3V. When controlling the motor of an air conditioner compressor, generally, the sampled voltage value of the alternating current of the motor is controlled between 0 and VCC, where VCC is the power supply voltage of the MCU, usually 3.3V or 5V. The DC bias voltage is set to VCC / 2. The sampled voltage value in the range (VCC / 2, VCC) represents the sampled value of the positive half-cycle current, and the sampled voltage value in the range (0, VCC / 2) represents the sampled value of the negative half-cycle current. In order to obtain the sampled value of the alternating current of the compressor motor, the current common practice is to subtract the DC bias voltage designed for the current sampling circuit from the voltage value sampled by the sampling resistor of the sampling circuit when sampling the phase current of the compressor. However, in the actual sampling circuit, due to the deviation in the consistency of components such as the sampling resistor, the actual value of the DC bias voltage on different circuit boards may deviate from the theoretical value designed for the circuit. When this deviation is large enough, it will cause the sampling result of the sampling circuit to be distorted, which will affect the stability of the compressor motor control. In order to obtain the accurate actual current value of the compressor motor even when the DC bias voltage of the sampling circuit exceeds the tolerance threshold and the sampled current value is distorted, it is necessary to compensate and correct the distorted current sampling data to achieve stable and normal control of the compressor motor, avoid the failure of the air conditioner to work properly, and improve the user satisfaction.

[0052] Figure 1b is a flowchart of a method for processing sampled data shown according to an exemplary embodiment. As Figure 1b shown, the embodiments of the present disclosure provide a method for processing sampled data, which may include the following steps:

[0053] In step S10, when the input current of the sampling circuit is zero, obtain the static sampled output voltage output by the sampling circuit.

[0054] In this step, when the input current of the sampling circuit is zero, obtain the static sampled output voltage output by the sampling circuit. For example, when the input current of the sampling circuit is zero, the obtained static sampled output voltage output by the sampling circuit is the actual sampling bias voltage of the sampling circuit. The theoretical design value of this sampling bias voltage should be VCC / 2, but due to the consistency problem of the electrical components of the sampling circuit, the actual sampling bias voltage may deviate from the theoretical design value of VCC / 2.

[0055] In step S20, when the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is greater than the tolerance threshold and less than 1, it is determined that the sampling value of the alternating current of the sampling circuit is distorted.

[0056] In this step, when the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is greater than the tolerance threshold and less than 1, it is determined that the sampling value of the alternating current of the sampling circuit is distorted. Exemplarily, the tolerance threshold can be 25%.

[0057] In step S30, based on the relationship between the static sampling output voltage and the sampling bias voltage, the sampling value of the alternating current is compensated and corrected.

[0058] In this step, based on the relationship between the static sampling output voltage and the sampling bias voltage, the sampling value of the alternating current is compensated and corrected. Exemplarily, if the static sampling output voltage is greater than the sampling bias voltage, it is determined that the sampling voltage of the positive half cycle of the alternating output voltage of the sampling circuit is distorted (clipping occurs), and the sampling value of the positive half cycle of the alternating current is compensated and corrected by the sampling value of the negative half cycle of the alternating current. If the static sampling output voltage is less than the sampling bias voltage, it is determined that the sampling voltage of the negative half cycle of the alternating output voltage of the sampling circuit is distorted (clipping occurs), and the sampling value of the negative half cycle of the alternating current is compensated and corrected by the sampling value of the positive half cycle of the alternating current. Wherein, the alternating output voltage is the real-time output voltage of the sampling circuit. In this way, through the corresponding compensation and correction, the distorted sampling current value can be restored, so as not to affect the current sampling and control of the compressor motor, and thus the air-conditioning equipment will not malfunction and stop, improving the user satisfaction.

[0059] It can be understood that the sampling data processing method provided by the present disclosure is not limited to air-conditioning compressor equipment, and can also be used in other electronic devices that need to sample and control the motor current. The present disclosure does not limit this here.

[0060] In some embodiments, the static sampling output voltage is the average value of the output voltages of the sampling circuit collected multiple times when the input current of the sampling circuit is zero. This can increase the accuracy of the actual sampling bias voltage of the sampling circuit, thereby further improving the current sampling accuracy and control accuracy.

[0061] In summary, the embodiments of the present disclosure provide a method for processing sampled data. The method includes: when the input current of the sampling circuit is zero, obtaining the static sampled output voltage output by the sampling circuit; when the absolute value of the difference between the static sampled output voltage and the sampling bias voltage, and the ratio of the sampling bias voltage is greater than the tolerance threshold and less than 1, determining that the sampled value of the alternating current of the sampling circuit is distorted; based on the relationship between the static sampled output voltage and the sampling bias voltage, compensating and correcting the sampled value of the alternating current. The embodiments of the present disclosure can detect the actual static bias voltage of the sampling circuit, and further compensate the sampled value of the driving current of the compressor motor according to the actual static bias voltage, eliminate the sampling current deviation distortion problem caused by poor component consistency of the sampling circuit, improve the accuracy of motor current sampling, and thus improve the stability of motor control.

[0062] Figure 2 is a flowchart of a method for processing sampled data shown according to an exemplary embodiment. As Figure 2 shown, the method may further include the following steps:

[0063] In step S40, when the absolute value of the difference between the static sampled output voltage and the sampling bias voltage, and the ratio of the sampling bias voltage is less than or equal to the tolerance threshold, it is determined that the sampled value of the alternating current of the sampling circuit is valid.

[0064] In this step, when the absolute value of the difference between the static sampled output voltage and the sampling bias voltage VCC / 2, and the ratio of the sampling bias voltage VCC / 2 is less than or equal to the tolerance threshold, it is determined that the sampled value of the alternating current of the sampling circuit is valid. Exemplarily, the tolerance threshold may be 25%. When the absolute value of the difference between the static sampled output voltage and the sampling bias voltage VCC / 2, and the ratio of the sampling bias voltage VCC / 2 is less than or equal to the tolerance threshold of 25%, the alternating output voltage of the sampling circuit will not have clipping distortion. Therefore, it can be determined that the sampled value of the alternating current of the sampling circuit is valid. Specifically, the sampled value of the alternating current may be equal to the difference between the alternating output voltage and the static sampled output voltage.

[0065] Figure 3 is a flowchart of a method for processing sampled data shown according to an exemplary embodiment. As Figure 3 shown, the compensating and correcting the sampled value of the alternating current based on the relationship between the static sampled output voltage and the sampling bias voltage may include the following steps:

[0066] In step S301, if the static sampling output voltage is greater than the sampling bias voltage, it is determined that the positive half-cycle sampling voltage of the alternating output voltage of the sampling circuit is distorted, and the positive half-cycle sampling value of the alternating current is compensated and corrected by the negative half-cycle sampling value of the alternating current.

[0067] In this step, if the static sampling output voltage is greater than the sampling bias voltage VCC / 2, it is determined that the positive half-cycle sampling voltage of the alternating output voltage of the sampling circuit is distorted, and the positive half-cycle sampling value of the alternating current is compensated and corrected by the negative half-cycle sampling value of the alternating current. Exemplarily, if the static sampling output voltage is greater than the sampling bias voltage VCC / 2, at this time the actual sampling bias voltage is biased upward relative to VCC / 2, and the positive half-cycle sampling voltage of the alternating output voltage of the sampling circuit will have clipping distortion. The positive half-cycle sampling value of the alternating current can be compensated and corrected by replacing it with the absolute value of the negative half-cycle sampling value of the alternating current. Wherein, the alternating output voltage is the real-time output voltage of the sampling circuit.

[0068] In step S302, if the static sampling output voltage is less than the sampling bias voltage, it is determined that the negative half-cycle sampling voltage of the alternating output voltage of the sampling circuit is distorted, and the negative half-cycle sampling value of the alternating current is compensated and corrected by the positive half-cycle sampling value of the alternating current.

[0069] In this step, if the static sampling output voltage is less than the sampling bias voltage, it is determined that the negative half-cycle sampling voltage of the alternating output voltage of the sampling circuit is distorted, and the negative half-cycle sampling value of the alternating current is compensated and corrected by the positive half-cycle sampling value of the alternating current. Exemplarily, if the static sampling output voltage is less than the sampling bias voltage VCC / 2, at this time the actual sampling bias voltage is biased downward relative to VCC / 2, and the negative half-cycle sampling voltage of the alternating output voltage of the sampling circuit will have clipping distortion. The negative half-cycle sampling value of the alternating current can be compensated and corrected by replacing it with the opposite number of the positive half-cycle sampling value of the alternating current. Wherein, the alternating output voltage is the real-time output voltage of the sampling circuit.

[0070] Figure 4 is a flowchart of a sampling data processing method shown according to an exemplary embodiment. As Figure 4 shown, the compensating and correcting the positive half-cycle sampling value of the alternating current by the negative half-cycle sampling value of the alternating current may include the following steps:

[0071] In step S3011, the absolute value of the negative half-cycle sampling value of the alternating current is used to replace the positive half-cycle sampling value of the alternating current.

[0072] In this step, the absolute value of the sampled value of the negative half-cycle of the alternating current is used to replace the sampled value of the positive half-cycle of the alternating current. Exemplarily, if the operating electrical frequency of the compressor motor is 50 Hz and the PWM carrier frequency of the control signal is 5 kHz, and the compressor current is sampled once per PWM cycle, then the starting point of the negative half-cycle of the current is used as the starting point for recording the alternating output voltage of each cycle, denoted as a 100-dimensional array Vout1

[100] .

[0073] The sampled value of the negative half-cycle current Vcurrent1[i] = Vout1[i] - Voffset1, where 0 ≤ i < 50, Voffset1 is the static sampled output voltage, and Vout1[i] for 0 ≤ i < 50 is the real-time alternating output voltage of the negative half-cycle of the sampling circuit.

[0074] The sampled value of the positive half-cycle current (after compensation) Vcurrent1[j] = |Vcurrent1[i]|, where 0 ≤ i < 50 and 50 ≤ j < 100.

[0075] Figure 5 is a flowchart of a sampling data processing method shown according to an exemplary embodiment. As Figure 5 shown, the compensating and correcting the sampled value of the negative half-cycle of the alternating current by the sampled value of the positive half-cycle of the alternating current may include the following steps:

[0076] In step S3021, the opposite value of the sampled value of the positive half-cycle of the alternating current is used to replace the sampled value of the negative half-cycle of the alternating current.

[0077] In this step, the opposite value of the sampled value of the positive half-cycle of the alternating current is used to replace the sampled value of the negative half-cycle of the alternating current. Exemplarily, if the operating electrical frequency of the compressor motor is 50 Hz and the PWM carrier frequency of the control signal is 5 kHz, and the compressor current is sampled once per PWM cycle, then the starting point of the positive half-cycle of the current is used as the starting point for recording the alternating output voltage of each cycle, denoted as a 100-dimensional array Vout2

[100] .

[0078] The sampled value of the positive half-cycle current Vcurrent2[i] = Vout2[i] - Voffset1, where 0 ≤ i < 50, Voffset1 is the static sampled output voltage, and Vout2[i] for 0 ≤ i < 50 is the real-time alternating output voltage of the positive half-cycle of the sampling circuit.

[0079] The sampled value of the negative half-cycle current (after compensation) Vcurrent2[j] = -Vcurrent2[i], where 0 ≤ i < 50 and 50 ≤ j < 100.

[0080] Figure 6 is a flowchart of a sampling data processing method shown according to an exemplary embodiment. AsFigure 6 As shown, when the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is less than or equal to the tolerance threshold, it is determined that the sampling value of the alternating current of the sampling circuit is valid, and the following steps may be included:

[0081] In step S401, when the ratio of the absolute value of the difference to the sampling bias voltage is less than or equal to the tolerance threshold, it is determined that all the sampling values of the alternating current of the sampling circuit are valid, and there is no need to compensate the sampling values of the alternating current of the sampling circuit.

[0082] In this step, when the ratio of the absolute value of the difference to the sampling bias voltage is less than or equal to the tolerance threshold, it is determined that all the sampling values of the alternating current of the sampling circuit are valid, and there is no need to compensate the sampling values of the alternating current of the sampling circuit. Exemplarily, the tolerance threshold may be 25%. When all the sampling values of the alternating current of the sampling circuit are valid and there is no need to compensate the sampling values of the alternating current of the sampling circuit, the sampling value of the alternating current may be equal to the difference between the alternating output voltage and the static sampling output voltage.

[0083] In some embodiments, the static sampling output voltage is the average value of the output voltages of the sampling circuit collected multiple times when the input current of the sampling circuit is zero. This can increase the accuracy of the actual sampling bias voltage of the sampling circuit, and can further improve the current sampling accuracy and control accuracy.

[0084] In summary, the embodiments of the present disclosure provide a sampling data processing method, and the method includes: obtaining the static sampling output voltage output by the sampling circuit when the input current of the sampling circuit is zero; when the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is greater than the tolerance threshold and less than 1, it is determined that the sampling value of the alternating current of the sampling circuit is distorted; based on the relationship between the static sampling output voltage and the sampling bias voltage, compensating and correcting the sampling value of the alternating current. The embodiments of the present disclosure can detect the actual static bias voltage of the sampling circuit, and further compensate the sampling value of the driving current of the compressor motor according to the actual static bias voltage, eliminate the sampling current deviation and distortion problem caused by the poor consistency of the sampling circuit components, improve the accuracy of the motor current sampling, and thus improve the stability of the motor control.

[0085] Figure 7 is a block diagram of a sampling data processing device shown according to an exemplary embodiment. As Figure 7 shown, the embodiments of the present disclosure provide a sampling data processing device 700, which may include the following modules:

[0086] An acquisition module 710, configured to acquire a static sampling output voltage output by the sampling circuit when the input current of the sampling circuit is zero.

[0087] A determination module 720, configured to determine that there is distortion in the sampling value of the alternating current of the sampling circuit when the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is greater than a tolerance threshold and less than 1.

[0088] A compensation module 730, configured to perform compensation and correction on the sampling value of the alternating current based on the relationship between the static sampling output voltage and the sampling bias voltage.

[0089] Optionally, the sampling data processing device 700 further includes a validity determination module, configured to:

[0090] When the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is less than or equal to the tolerance threshold, determine that the sampling value of the alternating current of the sampling circuit is valid.

[0091] Optionally, the compensation module 730 includes a first compensation sub-module, configured to:

[0092] If the static sampling output voltage is greater than the sampling bias voltage, determine that the sampling voltage of the positive half-cycle of the alternating output voltage of the sampling circuit is distorted, and perform compensation and correction on the sampling value of the positive half-cycle of the alternating current through the sampling value of the negative half-cycle of the alternating current;

[0093] The compensation module 730 includes a second compensation sub-module, configured to: if the static sampling output voltage is less than the sampling bias voltage, determine that the sampling voltage of the negative half-cycle of the alternating output voltage of the sampling circuit is distorted, and perform compensation and correction on the sampling value of the negative half-cycle of the alternating current through the sampling value of the positive half-cycle of the alternating current;

[0094] The alternating output voltage is the output voltage of the sampling circuit.

[0095] Optionally, the first compensation sub-module includes a first replacement sub-module, configured to:

[0096] Replace the sampling value of the positive half-cycle of the alternating current with the absolute value of the sampling value of the negative half-cycle of the alternating current.

[0097] Optionally, the sampling value of the negative half-cycle of the alternating current is the difference between the sampling voltage of the negative half-cycle of the alternating output voltage and the static sampling output voltage.

[0098] Optionally, the second compensation sub-module includes a second replacement sub-module, configured to:

[0099] Replace the sampled values of the negative half - cycle of the alternating current with the opposite numbers of the sampled values of the positive half - cycle of the alternating current.

[0100] Optionally, the sampled value of the positive half - cycle of the alternating current is the difference between the sampled voltage of the positive half - cycle of the alternating output voltage and the static sampled output voltage.

[0101] Optionally, the effective determination module includes an effective determination sub - module, configured to:

[0102] When the ratio of the absolute value of the difference to the sampling bias voltage is less than or equal to the tolerance threshold, determine that all the sampled values of the alternating current of the sampling circuit are valid, and there is no need to compensate the sampled values of the alternating current of the sampling circuit.

[0103] Optionally, the static sampled output voltage is the average value of the output voltages of the sampling circuit collected multiple times when the input current of the sampling circuit is zero.

[0104] Regarding the device in the above - mentioned embodiments, the specific ways in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0105] The present disclosure also provides a computer - readable storage medium, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the sampling data processing method provided by the present disclosure are implemented.

[0106] In summary, the embodiments of the present disclosure provide a sampling data processing device, including: an acquisition module, configured to acquire the static sampled output voltage output by the sampling circuit when the input current of the sampling circuit is zero; a determination module, configured to determine that the sampled values of the alternating current of the sampling circuit are distorted when the ratio of the absolute value of the difference between the static sampled output voltage and the sampling bias voltage to the sampling bias voltage is greater than the tolerance threshold and less than 1; a compensation module, configured to compensate and correct the sampled values of the alternating current based on the relationship between the static sampled output voltage and the sampling bias voltage. The embodiments of the present disclosure can detect the actual static bias voltage of the sampling circuit, and further compensate the sampled values of the compressor motor drive current according to the actual static bias voltage, eliminate the sampling current deviation and distortion problems caused by the poor consistency of the sampling circuit components, improve the accuracy of motor current sampling, and thus improve the stability of motor control.

[0107] Figure 8It is a block diagram of an electronic device shown according to an exemplary embodiment. For example, the electronic device 800 may include a current sampling circuit and can be an air conditioner, a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0108] Referring to Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output interface 812, a sensor component 814, and a communication component 816.

[0109] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0110] The memory 804 is configured to store various types of data to support the operation of the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0111] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0112] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0113] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.

[0114] The input / output interface 812 provides an interface between the processing component 802 and a peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.

[0115] The sensor component 814 includes one or more sensors for providing status assessments of various aspects of the electronic device 800. For example, the sensor component 814 can detect the on / off state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800. The sensor component 814 can also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor component 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 814 can also include a light sensor, such as a CMOS or a CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0116] The communication component 816 is configured to facilitate communication, in a wired or wireless manner, between the electronic device 800 and other devices. The electronic device 800 may access a communication standard-based wireless network, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0117] In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.

[0118] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as a memory 804 including instructions, is also provided. The above instructions may be executed by a processor 820 of the electronic device 800 to complete the above method. For example, the non-transitory computer-readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0119] In addition to being an independent electronic device, the above-mentioned electronic device 800 can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip. The integrated circuit can be a single IC or a collection of multiple ICs. The chip can include, but is not limited to, the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or code) to implement the above-mentioned sampling data processing method. The executable instructions can be stored in the integrated circuit or chip, or obtained from other devices or equipment. For example, the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instructions can be stored in the memory, and when the executable instructions are executed by the processor, the above-mentioned sampling data processing method is implemented; or, the integrated circuit or chip can receive the executable instructions through the interface and transmit them to the processor for execution to implement the above-mentioned sampling data processing method.

[0120] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned sampling data processing method when executed by the programmable device.

[0121] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0122] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A sampling data processing method, characterized in that, the method includes: When the input current of the sampling circuit is zero, obtaining the static sampling output voltage output by the sampling circuit; When the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is greater than the tolerance threshold and less than 1, determining that the sampling value of the alternating current of the sampling circuit is distorted; Based on the relationship between the static sampling output voltage and the sampling bias voltage, compensating and correcting the sampling value of the alternating current.

2. The method according to claim 1, characterized in that, the method further includes: When the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is less than or equal to the tolerance threshold, determining that the sampling value of the alternating current of the sampling circuit is valid.

3. The sampling data processing method according to claim 1, characterized in that, the compensating and correcting the sampling value of the alternating current based on the relationship between the static sampling output voltage and the sampling bias voltage includes: If the static sampling output voltage is greater than the sampling bias voltage, determining that the sampling voltage of the positive half cycle of the alternating output voltage of the sampling circuit is distorted, and compensating and correcting the sampling value of the positive half cycle of the alternating current with the sampling value of the negative half cycle of the alternating current; If the static sampling output voltage is less than the sampling bias voltage, determining that the sampling voltage of the negative half cycle of the alternating output voltage of the sampling circuit is distorted, and compensating and correcting the sampling value of the negative half cycle of the alternating current with the sampling value of the positive half cycle of the alternating current; The alternating output voltage is the output voltage of the sampling circuit.

4. The sampling data processing method according to claim 3, characterized in that, the compensating and correcting the sampling value of the positive half cycle of the alternating current with the sampling value of the negative half cycle of the alternating current includes: Replacing the sampling value of the positive half cycle of the alternating current with the absolute value of the sampling value of the negative half cycle of the alternating current.

5. The sampling data processing method according to claim 4, characterized in that, the sampling value of the negative half cycle of the alternating current is the difference between the sampling voltage of the negative half cycle of the alternating output voltage and the static sampling output voltage.

6. The sampling data processing method according to claim 3, characterized in that, the compensating and correcting the sampling value of the negative half cycle of the alternating current with the sampling value of the positive half cycle of the alternating current includes: Replacing the sampling value of the negative half cycle of the alternating current with the opposite number of the sampling value of the positive half cycle of the alternating current.

7. The sampling data processing method according to claim 6, characterized in that, the sampling value of the positive half cycle of the alternating current is the difference between the sampling voltage of the positive half cycle of the alternating output voltage and the static sampling output voltage.

8. The sampling data processing method according to claim 2, characterized in that, when the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is less than or equal to the tolerance threshold, determining that the sampling value of the alternating current of the sampling circuit is valid, includes: When the ratio of the absolute value of the difference to the sampling bias voltage is less than or equal to the tolerance threshold, it is determined that all the sampling values of the alternating current of the sampling circuit are valid, and there is no need to compensate the sampling values of the alternating current of the sampling circuit.

9. The sampling data processing method according to any one of claims 1-8, wherein, the static sampling output voltage is the average value of the output voltages of the sampling circuit collected multiple times when the input current of the sampling circuit is zero.

10. A sampling data processing device, wherein, comprising: an acquisition module configured to acquire the static sampling output voltage output by the sampling circuit when the input current of the sampling circuit is zero; a determination module configured to determine that the sampling value of the alternating current of the sampling circuit is distorted when the ratio of the absolute value of the difference between the static sampling output voltage and the sampling bias voltage to the sampling bias voltage is greater than the tolerance threshold and less than 1; a compensation module configured to perform compensation and correction on the sampling value of the alternating current based on the relationship between the static sampling output voltage and the sampling bias voltage.

11. An electronic device, wherein, comprising: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to: execute the executable instructions to implement the method according to any one of claims 1-9.

12. A computer-readable storage medium, on which computer program instructions are stored, wherein, when the program instructions are executed by a processor, the steps of the method according to any one of claims 1-9 are implemented.

13. A chip, wherein, comprising a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1-9.