Test method for simulating motor load by refrigerator controller
By simulating the motor load of a refrigerator using an overall closed-loop test system, and utilizing a microcontroller and a high-precision DAC to perform functional testing of the refrigerator controller, the problem of high testing cost and low efficiency in existing technologies is solved, achieving low-cost and high-efficiency testing results.
Patent Information
- Application Number
- CN202510863371.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-12-26
AI Technical Summary
The lack of effective methods for simulating motor load testing of refrigeration machine controllers in the existing technology leads to high testing costs, low efficiency and poor adaptability.
An integrated closed-loop test system consisting of a computer, a DC regulated power supply, a refrigerator controller, and a simulated load device is adopted. The system utilizes a microcontroller to output Hall signals, an AD channel to acquire voltage signals, and a high-precision DAC to simulate temperature-sensing diodes to form a closed-loop control, thereby simulating the load on the refrigerator motor.
It enables low-cost and efficient functional testing of refrigeration controllers, improving testing efficiency and adaptability while reducing testing costs.
Smart Images

Figure CN121209459A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor control technology, and in particular to a test method for simulating motor load in a refrigeration machine controller. Background Technology
[0002] Currently, the testing of refrigeration unit controllers mainly involves performance testing using the actual motors of refrigeration units. However, a search has not revealed any testing methods that utilize simulated loads on the motors of refrigeration units. Summary of the Invention
[0003] The purpose of this invention is to propose a test method for simulating the motor load of a refrigeration machine controller, which is used to test the function of the refrigeration machine controller and replace the motor load of the refrigeration machine. It has the characteristics of accurate testing, strong adaptability, high efficiency and low testing cost.
[0004] The technical solution adopted in this invention is as follows: A test method for simulating motor load on a refrigerator controller includes an integrated closed-loop test system consisting of a computer, a DC regulated power supply, a refrigerator controller, and a simulated load device. The simulated load device includes a three-channel ADC input signal capture circuit, a microcontroller, and a simulated temperature sensing diode (DAC). The DC regulated power supply powers the simulated load device and the refrigerator controller. The microcontroller outputs three Hall effect signals to the refrigerator controller. Upon receiving these signals, the controller generates a PWM signal and outputs a three-phase motor drive signal to the analog load. The analog load's ADC input signal capture circuit acquires the three ADC signals, the PWM duty cycle, and the frequency. The required parameters are then fed back to the controller in real-time via an analog temperature-sensing diode DAC to simulate the temperature-sensing diode voltage, forming a closed-loop control. The method for the microcontroller to output three Hall effect signals includes the following steps: S1. Timer clock starts counting, level state i=0; S2. Outputs one of the high / low levels of the three IO channels, i+1; S3. Has the timer reached 1ms? If yes, proceed to S4; otherwise, return to S2. S4. Switch the high / low level status of the three IO channels i+2; S5. Has the timer reached 1ms? If yes, proceed to S6; otherwise, return to S4. S6. Switch the high / low level status of the three IO channels output i+3; S7. Has the timer reached 1ms? If yes, proceed to S8; otherwise, return to S6. S8. Switch the high / low level status of the three IO channels output i+4; S9. Has the timer reached 1ms? If yes, proceed to S10; otherwise, return to S8. S10. Switch the high / low level status of the three IO channels output i+5; S11. Has the timer reached 1ms? If yes, proceed to S12; otherwise, return to S10. S12. Switch the high / low level status of the three IO channels output i+6; S13. Check if the timer has reached 1ms. If yes, proceed to S2; otherwise, return to S12.
[0005] Furthermore, the method for simulating the voltage of a temperature-sensing diode in real time using the analog temperature-sensing diode DAC includes the following steps: S1. Initialize the DAC, DAC0; S2. Real-time acquisition of channel duty cycle (Duty) value; S3. The real-time output change of the DAC value is calculated by the formula DACthis=DAClast+k*duty-b, where DACthis represents the current DAC value, DAClast represents the previous DAC value, duty represents the duty cycle of the three-phase motor drive PWM signal captured in real time, and k and b are parameters calculated from the actual temperature control data of the chiller motor. S4. If DAClast = DACthis, output the DAC value in real time; otherwise, return to S2.
[0006] This invention relates to a controller that performs temperature-sensing diode voltage detection and closed-loop control on the refrigeration unit's motor. It detects the temperature of the controller's single-board temperature and performs temperature compensation on the hardware system, completing the controller's temperature detection function and the system's temperature compensation function. It also calculates the collected diode voltage signals and outputs a three-phase motor drive signal. In the drive circuit unit, the motor speed is controlled by adjusting the PWM duty cycle, thereby controlling the refrigeration unit's cooling and achieving the purpose of regulating the refrigeration unit's temperature.
[0007] This invention uses a simulated load to mimic the motor performance of a refrigerator, replacing the refrigerator motor itself for closed-loop control testing of the controller's temperature control function. By simulating the Hall signal output function of the refrigerator motor, the DAC output function of the voltage across the temperature-sensing diode, the three-channel AD sampling function, and adding PWM input capture and serial communication functions, the load simulation of the refrigerator motor is achieved, enabling the refrigerator controller module to complete the testing of parameters such as temperature control function and temperature control voltage. This method uses a simulated load to replace the expensive refrigerator, resulting in low cost and significantly reducing testing costs. Furthermore, the input capture function added by the simulated load of the refrigerator motor allows for clearer recording of parameters during the control process. The output voltage of the DAC can be calculated and processed using the work parameters obtained from the input capture, and the output voltage is output in real time and fed back to the refrigerator controller to form closed-loop control. This method facilitates improved overall closed-loop control performance and subsequent optimization, thus significantly improving testing efficiency. Attached Figure Description
[0008] Figure 1 This is a general block diagram of the closed-loop testing system of the present invention; Figure 2 This is a schematic diagram of the HAL output terminal of the present invention; Figure 3 This is a flowchart of the analog digital Hall signal output of the present invention; Figure 4 This is a circuit diagram of the AD channel acquisition and input capture of the present invention. Figure 4 a is the circuit diagram for AD channel acquisition. Figure 4 b is the input capture circuit diagram; Figure 5 This is a flowchart of the AD acquisition and input capture method of the present invention; Figure 6 This is the DAC output circuit diagram of the present invention; Figure 7 This is a flowchart of the voltage across the analog output temperature sensing diode of the present invention. Detailed Implementation
[0009] The present invention provides a test method for simulating motor load for a refrigerator controller, as shown in the figure. It includes an overall closed-loop test system consisting of a computer, a DC regulated power supply, a refrigerator controller, and a simulated load device. The simulated load device includes a three-channel ADC input signal capture circuit, a microcontroller, and a simulated temperature sensing diode DAC. The DC regulated power supply powers the simulated load device and the refrigerator controller. The microcontroller outputs three Hall effect signals to the refrigerator controller. After receiving the signals, the controller generates a PWM signal and outputs a three-phase motor drive signal to the analog load. The analog load's ADC input signal capture circuit acquires the three AD signals, PWM duty cycle, and frequency. The required parameters are fed back to the controller in real time through the analog temperature sensing diode DAC to simulate the voltage of the temperature sensing diode, thus forming a closed-loop control.
[0010] The following provides a more detailed description of the closed-loop test system and its test method.
[0011] I. The closed-loop testing system described in this invention is as follows: 1. Analog / Digital Hall Signal Output Using the STM32F4 series chip (microcontroller) as the main control chip of the analog load board, such as... Figure 1 , Figure 2 As shown, three digital signals are output in real time, simulating the Hall signal output of the Hall sensor in the refrigerator motor. One of the Hall signal output circuits, HA_O, is responsible for receiving the digital signal of the analog GPIO high and low level changes of the microcontroller and outputting it to the external port through the optocoupler TLP2309.
[0012] 2. AD Acquisition and Input Capture The circuit diagram of the AD channel for the controller's three-phase motor drive signal output to the analog load board is shown below. Figure 4 As shown, phase A is used as an example here. When AC_IO_A outputs a low level, the AD processing unit starts sampling and receives the input signal V through the INPUT_B terminal. ina The voltage value is obtained after processing by a voltage divider network. A clamping circuit composed of D4 and D5 then limits the signal within a certain range to ensure it does not exceed the measurement limit. The first-stage operational amplifier in the subsequent circuit performs voltage following, while the second-stage operational amplifier and the analog switch 74HC4051D form a gain-adjustable amplifier circuit, with the amplification factor controlled by the analog switch. The amplified signal enters a differential amplifier circuit composed of a third-stage operational amplifier for bias processing, and the forward-biased voltage value is sent to the ADC_A terminal of the microcontroller. Simultaneously, a non-inverting Schmitt trigger is connected. When the input signal is higher than VT+, the trigger outputs a high level; when it is lower than VT-, it outputs a low level. Finally, the output signal of the Schmitt trigger is sent to the FRE_OUTPUT_A terminal of the microcontroller for PWM duty cycle and frequency calculation.
[0013] Figure 5The diagram shows the flowchart of the AD acquisition and input capture method. Voltage following and in-phase amplification are performed on each channel using operational amplifiers. The processed voltage signal is output to the MCU's internal AD analog input channel. Different channels are selected, and the voltage values of the three channels are stored in real time via DMA transfer. Ten sets of data are stored for each channel, and mean filtering is performed to reduce interference. Simultaneously, the input capture function calculates the PWM duty cycle and frequency, stores ten sets of data, and takes the average.
[0014] 3. Voltage across the analog output temperature sensing diode The voltage of the temperature-sensing diode on the cold head of the refrigerator (the voltage corresponds to the cold head temperature) controls the operation of the refrigerator. The refrigerator controller detects the voltage of the temperature-sensing diode on the cold head and changes the duty cycle of the PWM control signal to control the speed of the motor, thereby changing the amount of cooling output from the refrigerator and achieving closed-loop control of the temperature-sensing diode voltage on the cold head. Figure 6 This is the circuit diagram for the DAC output. The DAC chip is powered by a 5V power supply via USB. The power module unit provides a voltage reference REF+ for the DAC chip. GND_C and DAC_GND are isolated by a 0-ohm resistor, and an external crystal oscillator is used for timing. The main control chip and the DAC chip communicate via SPI through DAC_SCLK, DAC_SDIO, and DAC_CS. The required output voltage is converted and connected to an external port via DAC_OUT.
[0015] II. The test method for simulating motor load in a refrigeration unit controller according to the present invention includes: 1. The method for a microcontroller to output three Hall signals, and the analog output logic for the three Hall signals is as follows: Figure 3 As shown, the timer starts counting, changing to a different level state i every 1ms. If the timer doesn't reach 1ms, it will maintain the current state. There are six level states in total for the three output channels, ensuring that the phase difference between the three channels is 120 degrees. After reaching the "i+6" state, it returns to the "i+1" state, cyclically outputting three analog digital Hall signals HA, HB, and HC to the refrigerator controller. By recognizing the level states, the commutation logic of the motor is generated.
[0016] Specifically, the following steps are included: S1. Timer clock starts counting, level state i=0; S2. Outputs one of the high / low levels of the three IO channels, i+1; S3. Has the timer reached 1ms? If yes, proceed to S4; otherwise, return to S2. S4. Switch the high / low level status of the three IO channels i+2; S5. Has the timer reached 1ms? If yes, proceed to S6; otherwise, return to S4. S6. Switch the high / low level status of the three IO channels output i+3; S7. Has the timer reached 1ms? If yes, proceed to S8; otherwise, return to S6. S8. Switch the high / low level status of the three IO channels output i+4; S9. Has the timer reached 1ms? If yes, proceed to S10; otherwise, return to S8. S10. Switch the high / low level status of the three IO channels output i+5; S11. Has the timer reached 1ms? If yes, proceed to S12; otherwise, return to S10. S12. Switch the high / low level status of the three IO channels output i+6; S13. Check if the timer has reached 1ms. If yes, proceed to S2; otherwise, return to S12.
[0017] 2. A method for simulating the voltage of a temperature-sensing diode in real time using a DAC, such as... Figure 7 As shown in the diagram, this is the logic flowchart for simulating the voltage across the output temperature-sensing diode. A high-precision DAC can simulate the temperature control curve of the voltage across the diode. The actual temperature control curve is an incremental increase of the DAC output voltage. After PID adjustment within the controller's temperature control voltage range, the signal is fed back to the analog load board's main control chip to maintain the DAC output voltage within a certain fluctuation range, thus achieving the temperature control effect. Simulating the voltage across the temperature-sensing diode first requires initializing the DAC by assigning it an initial value. Subsequent real-time changes in the DAC value are handled by the designed formula: DACthis = DAClast + k * duty - b. Here, DACthis represents the current DAC value, DAClast represents the previous DAC value, duty represents the duty cycle of the real-time captured three-phase motor drive PWM signal, and k and b are parameters calculated from the actual temperature control data of the chiller motor. These parameters vary for different chillers, making the formula highly adaptable. The real-time simulated voltage signal is output to the chiller controller. The controller detects the voltage, changes the duty cycle of the control signal, and outputs the motor drive signal, forming a closed-loop control to achieve the temperature control effect.
[0018] Specifically, the following steps are included: S1. Initialize the DAC, DAC0; S2. Real-time acquisition of channel duty cycle (Duty) value; S3. The real-time output change of the DAC value is calculated by the formula DACthis=DAClast+k*duty-b, where DACthis represents the current DAC value, DAClast represents the previous DAC value, duty represents the duty cycle of the three-phase motor drive PWM signal captured in real time, and k and b are parameters calculated from the actual temperature control data of the chiller motor. S4. If DAClast = DACthis, output the DAC value in real time; otherwise, return to S2.
[0019] The present invention adopts the above technical solution and has the following beneficial effects: This method uses a simulated load to replace the main performance parameters of the refrigerator motor for closed-loop temperature control testing of the refrigerator controller. An STM32 microcontroller simulates the output of three digital Hall signals from a Hall sensor. The voltage values and PWM duty cycles of the three motor drive signals are acquired in real time using an AD channel voltage acquisition and input capture function. A high-precision DAC is then used to simulate the voltage across the temperature-sensing diode and send it to the refrigerator controller via a real-time output DAC formula, thus enabling testing of parameters such as the temperature control function of the refrigerator controller module. This method uses a designed simulated load board, which is inexpensive and can replace the more expensive refrigerator, significantly reducing testing costs. Furthermore, the refrigerator requires a considerable amount of time to reach temperature control after startup, thus greatly improving testing efficiency. In addition, this method can add new functions based on the simulated refrigerator motor load, continuously optimizing the testing method for the refrigerator controller, resulting in greater efficiency and adaptability.
Claims
1. A test method for simulating motor load on a refrigerator controller, comprising an integrated closed-loop test system consisting of a computer, a DC regulated power supply, a refrigerator controller, and a simulated load device, wherein the simulated load device includes a three-channel ADC input signal capture circuit, a microcontroller, and a simulated temperature sensing diode DAC, and the DC regulated power supply supplies power to the simulated load device and the refrigerator controller; The microcontroller outputs three Hall effect signals to the refrigerator controller. Upon receiving these signals, the controller generates a PWM signal and outputs a three-phase motor drive signal to the analog load. The analog load's ADC input signal capture circuit acquires the three ADC signals, the PWM duty cycle, and the frequency. The required parameters are then fed back to the controller via an analog temperature-sensing diode DAC. The DAC simulates the voltage of the temperature-sensing diode in real time and provides feedback, forming a closed-loop control. Its key feature is... The method for a microcontroller to output three Hall signals includes the following steps: S1. Timer clock starts counting, level state i=0; S2. Outputs one of the high / low levels of the three IO channels, i+1; S3. Has the timer reached 1ms? If yes, proceed to S4; otherwise, return to S2. S4. Switch the high / low level status of the three IO channels i+2; S5. Has the timer reached 1ms? If yes, proceed to S6; otherwise, return to S4. S6. Switch the high / low level status of the three IO channels output i+3; S7. Has the timer reached 1ms? If yes, proceed to S8; otherwise, return to S6. S8. Switch the high / low level status of the three IO channels output i+4; S9. Has the timer reached 1ms? If yes, proceed to S10; otherwise, return to S8. S10. Switch the high / low level status of the three IO channels output i+5; S11. Has the timer reached 1ms? If yes, proceed to S12; otherwise, return to S10. S12. Switch the high / low level status of the three IO channels output i+6; S13. Check if the timer has reached 1ms. If yes, proceed to S2; otherwise, return to S12.
2. The test method for simulating motor load in a refrigeration unit controller according to claim 1, characterized in that, The method for simulating the voltage of a temperature-sensing diode in real time using a simulated temperature-sensing diode DAC includes the following steps: S1. Initialize the DAC, DAC0; S2. Real-time acquisition of channel duty cycle (Duty) value; S3. The real-time output change of the DAC value is calculated by the formula DACthis=DAClast+k*duty-b, where DACthis represents the current DAC value, DAClast represents the previous DAC value, duty represents the duty cycle of the three-phase motor drive PWM signal captured in real time, and k and b are parameters calculated from the actual temperature control data of the chiller motor. S4. If DAClast = DACthis, output the DAC value in real time; otherwise, return to S2.
Citation Information
Patent Citations
Load simulation circuit and power level motor simulation test equipment
CN105955071A
Aging test device and method for direct-current brushless motor controller
CN110333711A
Automatic test system of automobile motor controller
CN111624987A
Propeller load characteristic simulation test device and simulation test method
CN115980572A
Automatic testing system for function parameters of refrigerator controller
CN117193246A