Control signal digital quantity adjusting method of controller and controller thereof

By calculating the difference between the adjustment target value and the starting value in the controller, using the step or time adjustment mode to evenly distribute the remainder, the problem of output value jump during the adjustment process is solved, and the adjustment effect and user experience are improved.

CN119126547APending Publication Date: 2024-12-13KEBODA TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, when the controller drives the load, the difference between the adjustment target value and the adjustment starting value cannot be evenly distributed into the execution cycle, resulting in a jump in the output value and affecting the user experience.

Method used

By calculating the absolute value of the difference between the adjustment target value and the adjustment starting value, if the difference is greater than or less than the total number of execution cycles and there is a remainder, the step or duration adjustment mode is adopted to evenly distribute the remainder in multiple execution cycles to avoid jumps Phenomenon.

Benefits of technology

It effectively avoids the jump of output values, improves the adjustment effect and user experience, is suitable for various complex output adjustment needs, and is flexibly responds to switching in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119126547A_ABST
    Figure CN119126547A_ABST
Patent Text Reader

Abstract

The invention discloses a control signal digital quantity adjusting method of a controller and the controller. The method comprises the following steps: calculating an absolute value Dimdiff of a difference between an adjusting target value and an adjusting initial value; if the quotient of the Dimdiff and the Dimtim has a remainder Dimremainder1, the current output value is controlled to change Dimdelta1 + 1 every time in m execution cycles and change Dimdelta1 every time in other execution cycles according to the direction close to the adjustment target value, m is equal to the Dimremainder1, and the Dimdelta1 is an integer part of the quotient of the Dimdiff and the Dimtim. According to the invention, the output digital quantity is uniformly adjusted based on the execution period of the controller, and the jumping phenomenon is avoided. According to the method, the output data is adjusted through calculation of the system execution cycle number, the method can be applied to switching and recovery of different adjustment processes, and the switching effect of different scenes is flexibly achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a controller, and in particular to an output regulation technology of a controller. Background Art

[0002] When the controller drives a load (such as an LED or a motor), the controller will use numbers of different sizes to represent different characteristics of the controlled working parameters. For example, when the controller outputs 10000, it means that the duty cycle of the PWM signal output by the controller is 100%. When the controller outputs 7500, it means that the duty cycle of the PWM signal output by the controller is 75%. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a method for adjusting the digital quantity of the control signal of a controller, which can meet the needs of various complex output adjustments, and can also adjust the digital quantity of the output control signal more evenly based on the execution cycle of the controller, thereby avoiding the occurrence of jump phenomena, and can be applicable to a variety of embedded platforms and a variety of application scenarios.

[0004] In a first aspect, a method for adjusting a digital quantity of a control signal of a controller according to an embodiment of the present invention comprises the following steps:

[0005] Calculate the absolute value Dim_diff of the difference between the adjustment target value and the adjustment start value;

[0006] If Dim_diff is greater than the given total number of adjustment execution cycles Dim_tim and the quotient of Dim_diff and Dim_tim has a remainder Dim_remainder1, Dim_remainder1 ≥ 1, then the current output value is controlled to approach the adjustment target value in the direction of changing Dim_delta1+1 every execution cycle in m execution cycles, and changing Dim_delta1 every execution cycle in Dim_tim-m execution cycles, m is equal to Dim_remainder1, Dim_delta1 is the integer part of the quotient of Dim_diff and Dim_tim; if Dim_diff is greater than the given total number of adjustment execution cycles Dim_remainder1, Dim_delta1 is the integer part of the quotient of Dim_diff and Dim_tim; If ff is less than the given total number of adjustment execution cycles Dim_tim and the quotient of Dim_tim and Dim_diff has a remainder Dim_remainder2, and Dim_remainder2≥1, then the current output value is controlled in a direction approaching the adjustment target value, and changes by 1 every Dim_delta2+1 execution cycles in n execution cycles, and changes by 1 every Dim_delta2 execution cycles in Dim_tim-n execution cycles, where n is equal to (Dim_delta2+1)*Dim_remainder2, and Dim_delta2 is the integer part of the quotient of Dim_tim and Dim_diff.

[0007] In a second aspect, the controller of an embodiment of the present invention includes: a memory for storing a program; and a processor for loading the program to execute the aforementioned control signal digital quantity adjustment method.

[0008] The present invention has at least the following advantages:

[0009] 1. When the current output value of the controller is adjusted by the step length, the embodiment of the present invention evenly distributes the remainder of the step length among the fixed step lengths executed in multiple execution cycles; when the current output value of the controller is adjusted by the duration, the remainder of the duration is evenly distributed among the multiple durations, thereby avoiding the jump phenomenon of the output value and improving the adjustment effect and user experience;

[0010] 2. The embodiment of the present invention is applicable to the adjustment of various digital output values. The user can flexibly adjust the target value and the total number of execution cycles for adjustment to meet the needs of various complex output adjustments.

[0011] 3. The present invention calculates the adjustment output data through the system execution cycle number, which can be applied to the switching and recovery of different adjustment processes, and flexibly realizes the switching effects of different scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic flow chart of a digital quantity adjustment method of a controller according to a first embodiment of the present invention is shown.

[0013] Figures 2 to 4 A schematic flow chart of a digital quantity adjustment method of a controller according to a second embodiment of the present invention is shown. DETAILED DESCRIPTION

[0014] In the actual operation of changing the digital quantity of the control signal output by the controller (such as PWM, current, voltage or the control quantity corresponding to the above physical quantity) to adjust the load working parameters, there is often a problem that the difference between the given adjustment target value and the controller's adjustment start value cannot be divided by the given total number of adjustment execution cycles (the given total number of adjustment execution cycles is the given adjustment time). The conventional practice is to add the remainder of the quotient of the two to a fixed step size or a fixed duration at one time. This adjustment method is prone to cause jumps in the load working parameters and affects the user experience. Taking the dimming of the automotive ambient light controller as an example, assuming that the given adjustment target value is 105, the adjustment start value is 0, and the given total number of adjustment execution cycles is 20, then the remainder of the quotient of the difference between the adjustment target value and the controller's adjustment start value and the given total number of adjustment execution cycles is 5. With the existing adjustment method, in the first 19 execution cycles of the controller performing the adjustment task, the controller adjusts according to a fixed step size, that is, the controller controls the output value to increase by 5 after each execution cycle, and in the last execution cycle, the controller uses the sum of the remainder and the fixed step size as the adjustment step size, and controls the output value to increase by 10. Since the duty cycle of the dimming PWM signal output by the controller in the last cycle changes greatly, the LED atmosphere light will flicker violently, thereby affecting the user experience.

[0015] Figure 1 FIG. 1 is a flow chart showing a method for adjusting the digital quantity of a control signal of a controller according to a first embodiment of the present invention. Figure 1 As shown, a control signal digital quantity adjustment method of a controller according to a first embodiment of the present invention includes the following steps:

[0016] Calculate the absolute value Dim_diff of the difference between the adjustment target value and the adjustment start value;

[0017] If Dim_diff is greater than the given total number of adjustment execution cycles Dim_tim and the quotient of Dim_diff and Dim_tim has a remainder Dim_remainder1, Dim_remainder1 ≥ 1, then the current output value is controlled to approach the adjustment target value in the direction of changing Dim_delta1+1 every execution cycle in m execution cycles, and changing Dim_delta1 every execution cycle in Dim_tim-m execution cycles, m is equal to Dim_remainder1, Dim_delta1 is the integer part of the quotient of Dim_diff and Dim_tim; if Dim_diff is greater than the given total number of adjustment execution cycles Dim_remainder1, Dim_delta1 is the integer part of the quotient of Dim_diff and Dim_tim; If ff is less than the given total number of adjustment execution cycles Dim_tim and the quotient of Dim_tim and Dim_diff has a remainder Dim_remainder2, and Dim_remainder2≥1, then the current output value is controlled in a direction approaching the adjustment target value, and changes by 1 every Dim_delta2+1 execution cycles in n execution cycles, and changes by 1 every Dim_delta2 execution cycles in Dim_tim-n execution cycles, where n is equal to (Dim_delta2+1)*Dim_remainder2, and Dim_delta2 is the integer part of the quotient of Dim_tim and Dim_diff.

[0018] The aforementioned m execution cycles may be continuous m execution cycles or non-continuous ones, and the aforementioned n execution cycles may be continuous n execution cycles or non-continuous ones.

[0019] Furthermore, if Dim_tim is equal to 0, the adjustment start value is changed by Dim_diff in a direction approaching the adjustment target value.

[0020] The control signal digital quantity includes but is not limited to PWM, current, voltage or the corresponding control quantity.

[0021] The above adjustment method can prevent the output value from jumping when Dim_remainder1>1 and Dim_remainder2>1. When Dim_remainder1>3 and Dim_remainder2>3, the adjustment method has a more obvious effect of preventing the output value from jumping.

[0022] It should be noted that when Dim_diff=Dim_tim, the current output value is controlled to approach the adjustment target value and changes by 1 every execution cycle. When Dim_diff>Dim_tim and there is no remainder between the quotient of Dim_diff and Dim_tim, it changes by Dim_delta1 every execution cycle, and Dim_delta1 is the quotient of Dim_diff and Dim_tim. When Dim_diff<Dim_tim and there is no remainder between the quotient of Dim_tim and Dim_diff, it changes by 1 every Dim_delta2 execution cycles, and Dim_delta2 is the quotient of Dim_tim and Dim_diff.

[0023] Figures 2 to 4 FIG. 1 is a flow chart showing a method for adjusting a digital quantity of a control signal of a controller according to a second embodiment of the present invention, wherein: Figure 2 The initialization process of the adjustment is shown. Figures 2 to 4 As shown, the control signal digital quantity adjustment method of the controller according to the second embodiment of the present invention includes the following steps:

[0024] Step S1:

[0025] The controller receives the external input adjustment target value Dim_Stop_Val and the given total number of adjustment execution cycles Dim_tim (the given total number of adjustment execution cycles Dim_tim is equal to the adjustment time divided by the preset execution cycle of the controller adjustment task). If the adjustment target value Dim_Stop_Val is equal to the current output value Dim_Start_Val of the controller, no adjustment is performed. If the adjustment target value Dim_Stop_Val is not equal to the current output value Dim_Start_Val, the adjustment is initialized. Wherein, the adjustment target value Dim_Stop_Val and the adjustment start value Dim_Start_Val are both integers. For example, when the controller adjusts the load of the car, the adjustment target value Dim_Stop_Val is equal to 10000, which means that the controller outputs a PWM signal with a duty cycle of 100%.

[0026] Step S2:

[0027] If it is determined in step S1 that adjustment is required, calculate the absolute value Dim_diff of the difference between the adjustment target value and the current output value and determine the adjustment direction: If Dim_Stop_Val > Dim_Start_Val, determine that the adjustment direction is upward; if Dim_Stop_Val < Dim_Start_Val, determine that the adjustment direction is downward. Dim_diff = |Dim_Stop_Val - Dim_Start_Val|. In the figure, Dim_direction = 1 represents that the adjustment direction is upward, and Dim_direction = 0 represents that the adjustment direction is downward.

[0028] Step S3:

[0029] The controller compares Dim_diff with Dim_tim: If Dim_tim is equal to 0, the controller enters the step size adjustment mode, and the fixed step size Dim_delta1 (i.e., the adjustment value) is equal to Dim_diff.

[0030] If Dim_diff is less than Dim_tim, the controller enters the duration adjustment mode, calculates the fixed duration Dim_delta2 (adjustment for the fixed duration) and the remainder value Dim_remainder2 that cannot be divided evenly. Dim_delta2 = the integer value obtained by taking the integer part of Dim_tim / Dim_diff; Dim_remainder2 = Dim_tim - Dim_delta2 * Dim_diff.

[0031] If Dim_diff is greater than Dim_tim, the controller enters the step size adjustment mode, calculates the fixed step size Dim_delta1 (adjustment value) and the remainder value Dim_remainder1 that cannot be divided evenly. Dim_delta1 = the integer value obtained by taking the integer part of Dim_diff / Dim_tim; Dim_remainder1 = Dim_diff - Dim_delta1 * Dim_tim.

[0032] Step S4:

[0033] The controller determines whether the adjustment process is completed based on the comparison result between the execution cycle count Dim_tim_cnt consumed for adjustment and Dim_tim. If Dim_tim_cnt is greater than or equal to Dim_tim, the adjustment process ends; if Dim_tim_cnt is less than Dim_tim, the adjustment process continues.

[0034] Step S5: If the adjustment direction is downward, enter the downward adjustment process, which includes:

[0035] Step S51: The controller determines whether to enter the step length adjustment mode or the duration adjustment mode. In the figure, Dim_method=1 represents entering the duration adjustment mode, and Dim_method=0 represents entering the step length adjustment mode;

[0036] Step S52: If the duration adjustment mode is entered, the adjustment steps are as follows:

[0037] If the execution cycle count Dim_tim_cnt consumed by the adjustment is greater than (Dim_delta2+1)*Dim_remainder2, and the remainder of the quotient of (Dim_tim_cnt-Dim_remainder2) and Dim_delta2 [i.e., ((Dim_tim_cnt-Dim_remainder2)%Dim_delta2)] is equal to 0, the current output value Dim_output_val=Dim_start_val-(Dim_tim_cnt-Dim_remainder2) / Dim_delta2, that is, the controller reduces the current output value by 1 every Dim_delta2 execution cycles; among which "(Dim_delta2+1)*Dim_remainder2" is the time point allocated in front of the execution time remainder, and "((Dim_tim_cnt-Dim_remainder2)%Dim_delta2)" is the fixed time point;

[0038] If the execution cycle count Dim_tim_cnt consumed by the adjustment is less than or equal to (Dim_delta2+1)*Dim_remainder2, and the remainder of Dim_tim_cnt and (Dim_delta2+1) [i.e. Dim_tim_cnt%(Dim_delta2+1)] is equal to 0, the current output value Dim_output_val=Dim_start_val-Dim_tim_cnt / (Dim_delta2+1), that is, the controller reduces the current output value by 1 every Dim_delta2+1 execution cycle;

[0039] Step S53: If the step length adjustment mode is entered, the adjustment steps are as follows:

[0040] If the execution cycle count Dim_tim_cnt consumed by the regulation is greater than Dim_remainder1, the current output value Dim_output_val=Dim_start_val-Dim_remainder1-Dim_delta1*Dim_tim_cnt, that is, the controller reduces the current output value by Dim_delta1 every time an execution cycle passes;

[0041] If the execution cycle count Dim_tim_cnt consumed by the regulation is less than or equal to Dim_remainder1, the current output value Dim_output_val=Dim_start_val-(Dim_delta1+1)*Dim_tim_cnt, that is, the controller reduces the current output value by Dim_delta1+1 every time an execution cycle passes.

[0042] Step S6: If the adjustment direction is upward, enter the upward adjustment process, which includes:

[0043] Step S61: The controller determines whether to enter the step length adjustment mode or the duration adjustment mode. In the figure, Dim_method=1 represents entering the duration adjustment mode, and Dim_method=0 represents entering the step length adjustment mode;

[0044] Step S62: If the duration adjustment mode is entered, the adjustment steps are as follows:

[0045] If the execution cycle count Dim_tim_cnt consumed by the adjustment is greater than (Dim_delta2+1)*Dim_remainder2, and the remainder of the quotient of (Dim_tim_cnt-Dim_remainder2) and Dim_delta2 [i.e., ((Dim_tim_cnt-Dim_remainder2)%Dim_delta2)] is equal to 0, the current output value Dim_output_val=Dim_start_val+(Dim_tim_cnt-Dim_remainder2) / Dim_delta2, that is, the controller increases the current output value by 1 every Dim_delta2 execution cycles; among which "(Dim_delta2+1)*Dim_remainder2" is the time point allocated in front of the execution time remainder, and "((Dim_tim_cnt-Dim_remainder2)%Dim_delta2)" is the fixed time point;

[0046] If the execution cycle count Dim_tim_cnt consumed by the adjustment is less than or equal to (Dim_delta2+1)*Dim_remainder2, and the remainder of Dim_tim_cnt and (Dim_delta2+1) [i.e. Dim_tim_cnt%(Dim_delta2+1)] is equal to 0, the current output value Dim_output_val=Dim_start_val+Dim_tim_cnt / (Dim_delta2+1), that is, the controller increases the current output value by 1 every Dim_delta2+1 execution cycle;

[0047] Step S63: If the step length adjustment mode is entered, the adjustment steps are as follows:

[0048] If the execution cycle count Dim_tim_cnt consumed by the adjustment is greater than Dim_remainder1, the current output Dim_output_val=Dim_start_val+Dim_remainder1+Dim_delta1*Dim_tim_cnt, that is, the controller increases the current output value by Dim_delta1 every time an execution cycle passes;

[0049] If the execution cycle count Dim_tim_cnt consumed by the regulation is less than or equal to Dim_remainder1, the current output value Dim_output_val=Dim_start_val+(Dim_delta 1+1)*Dim_tim_cnt, that is, the controller increases the current output value by Dim_delta1+1 every time an execution cycle passes.

[0050] It should be noted that when Dim_diff=Dim_tim, the current output value is controlled to approach the adjustment target value and changes by 1 every execution cycle. When Dim_diff>Dim_tim and there is no remainder between the quotient of Dim_diff and Dim_tim, it changes by Dim_delta1 every execution cycle, where Dim_delta1 is the quotient of Dim_diff and Dim_tim. When Dim_diff<Dim_tim and there is no remainder between the quotient of Dim_tim and Dim_diff, it changes by 1 every Dim_delta2 execution cycles, where Dim_delta2 is the quotient of Dim_tim and Dim_diff.

[0051] The control signal digital quantity includes but is not limited to PWM, current, voltage or the corresponding control quantity.

[0052] In a specific implementation, the aforementioned controller is a headlight controller of an automobile lighting system, and the headlight controller uses a single-chip microcomputer, but is not limited thereto, and the headlight controller may also use an ECU or the like.

[0053] To make the technical solution of the above embodiment of the present invention clearer, four specific application examples are given below for illustration. In the four application examples, the controller is a headlight controller of an automobile lighting system, and the dimming task execution cycle of the headlight controller is 5ms.

[0054] Application Example 1:

[0055] The controller receives an external input adjustment target value of 10000 (representing a duty cycle of 100% for the PWM adjustment signal), and an adjustment start value of 5000, so the adjustment direction is upward. The adjustment time is 100ms, and the given total number of adjustment execution cycles Dim_tim=100ms / 5ms=20, which means that the controller is required to adjust the current output value from the adjustment start value to the adjustment target value after 20 execution cycles. The controller calculates Dim_diff=5000. Since Dim_tim>0 and Dim_diff>Dim_tim, it enters the step adjustment mode, with a fixed step size Dim_delta1=5000 / 20=250, and the current output value Dim_output_val=5000+Dim_tim_cnt(the number of execution cycles consumed by the adjustment)*Dim_delta1(fixed step size)=5000+Dim_tim_cnt*250.

[0056] Application Example 2:

[0057] The controller receives an external input adjustment target value of 105, an adjustment start value of 0, an adjustment time of 100ms, and a given total number of adjustment execution cycles Dim_tim = 100ms / 5ms = 20. The controller calculates Dim_diff = 105. Since Dim_tim>0 and Dim_diff>Dim_tim, it enters the step adjustment mode with a fixed step size of Dim_delta1 = 5 and a fixed step size remainder value of Dim_remainder1 = 105-5*20 = 5. When the execution cycle count consumed by the adjustment is less than or equal to 5 (Dim_remainder1), the current output value = Dim_start_val + (Dim_delta1 + 1) * Dim_tim_cnt = 6 * Dim_tim_cnt; when the execution cycle count consumed by the adjustment is greater than Dim_remainder1, the adjustment output value = Dim_start_val + Dim_remainder1 + Dim_delta1 * Dim_tim_cnt = 5 + 5 * Dim_tim_cnt. That is, in the first five execution cycles of the controller executing the adjustment task, the output value of the controller increases by 6 after each execution cycle, and from the sixth execution cycle onwards, the output value of the controller increases by 5 after each execution cycle, and the controller realizes the adjustment of the output value according to the running time.

[0058] Application Example 3:

[0059] The controller receives an externally input adjustment target value of 20, an adjustment starting value of 0, an adjustment time of 500 ms, and the total number of execution cycles Dim_tim given for adjustment is 500 ms / 5 ms = 100. The controller calculates Dim_diff = 20. Since Dim_tim > 0 and Dim_diff < Dim_tim, it enters the duration adjustment mode. The fixed duration Dim_delta2 is the integer value obtained by rounding Dim_tim / Dim_diff, Dim_delta2 = 5, and the remainder value of the fixed duration Dim_remainder2 = 0. The adjustment output value = Dim_Start_Val + Dim_tim_cnt / Dim_delta2 = Dim_tim_cnt / Dim_delta2, that is, when the execution cycle count Dim_tim_cnt consumed by the adjustment increases by 5 (every 5 execution cycles of the controller), the current output value Dim_output_val increases by 1.

[0060] Application Example 4:

[0061] The controller receives an externally input adjustment target value of 20, an adjustment starting value of 0, and the total number of execution cycles Dim_tim given for adjustment is 105. The controller calculates Dim_diff = 20. Since Dim_tim > 0 and Dim_diff < Dim_tim, it enters the duration adjustment mode. The fixed duration Dim_delta2 is the integer value obtained by rounding Dim_tim / Dim_diff, Dim_delta2 = 5, and the remainder value of the fixed duration Dim_remainder2 = 5. When the number of adjustments is less than or equal to Dim_remainder2, when the execution cycle count Dim_tim_cnt consumed by the adjustment increases by 6 (that is, every 6 execution cycles of the controller), the current output value Dim_output_val increases by 1, and the current output value = Dim_start_val + Dim_tim_cnt / (Dim_delta2 + 1) = Dim_tim_cnt / 6; when the number of adjustments is greater than Dim_remainder2, when the execution cycle count Dim_tim_cnt consumed by the adjustment increases by 5 (that is, every 5 execution cycles of the controller), the current output value Dim_output_val increases by 1.

[0062] In summary, the digital quantity adjustment method of the controller of the present invention can meet different dimming requirements, provide a better driving experience for the driver, and also improve the safety of vehicle driving.

[0063] The controller according to an embodiment of the present invention includes a memory and a processor. The memory is used to store a program; the processor is used to load the program to execute the foregoing digital quantity adjustment method of the control signal.

[0064] When the embodiment of the present invention adjusts the current output value of the controller by step size, the remainder of the step size is evenly distributed among the fixed step sizes executed in multiple execution cycles; when the current output value of the controller is adjusted by time length, the remainder of the time length is evenly distributed among multiple time lengths, thereby avoiding the jump phenomenon of the output value and improving the adjustment effect and user experience.

[0065] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for adjusting the digital quantity of a control signal of a controller, characterized in that: The steps include the following: Calculate the absolute value Dim_diff of the difference between the adjustment target value and the adjustment starting value; If Dim_diff is greater than the total number of execution cycles Dim_tim for adjustment given and there is a remainder Dim_remainder1 when the quotient of Dim_diff and Dim_tim is calculated, Dim_remainder1 ≥ 1, then control the current output value to change by Dim_delta1 + 1 every other execution cycle among m execution cycles in the direction approaching the adjustment target value, and change by Dim_delta1 every other execution cycle among Dim_tim - m execution cycles, where m is equal to Dim_remainder1 and Dim_delta1 is the integer part of the quotient of Dim_diff and Dim_tim; if Dim_diff is less than the total number of execution cycles Dim_tim for adjustment given and there is a remainder Dim_remainder2 when the quotient of Dim_tim and Dim_diff is calculated, Dim_remainder2 ≥ 1, then control the current output value to change by 1 every Dim_delta2 + 1 execution cycles among n execution cycles in the direction approaching the adjustment target value, and change by 1 every Dim_delta2 execution cycles among Dim_tim - n execution cycles, where n is equal to (Dim_delta2 + 1) * Dim_remainder2 and Dim_delta2 is the integer part of the quotient of Dim_tim and Dim_diff.

2. The method for adjusting the digital quantity of the control signal of the controller according to claim 1, characterized in that: If Dim_tim is equal to 0, make the adjustment starting value change by Dim_diff in the direction approaching the adjustment target value.

3. The method for adjusting the digital quantity of the control signal of the controller according to claim 1, characterized in that: If Dim_Stop_Val < Dim_Start_Val, determine that the adjustment direction is downward, where Dim_Stop_Val is the adjustment target value and Dim_Start_Val is the adjustment starting value; When the adjustment direction is downward, if Dim_diff is greater than Dim_tim and the quotient of Dim_diff and Dim_tim has a remainder Dim_remainder1, Dim_remainder1≥1, then the current output value Dim_output_val is adjusted in a step adjustment manner: when the execution cycle count Dim_tim_cnt consumed by the adjustment is less than or equal to Dim_remainder1, the current output value is reduced by Dim_delta1+1 every time an execution cycle passes, Dim_output_val=Dim_start_val–(Dim_delta1+1)*Dim_tim_cnt; when the execution cycle count Dim_tim_cnt consumed by the adjustment is greater than Dim_remainder1, the current output value is reduced by Dim_delta1 every time an execution cycle passes, Dim_output_val=Dim_start_val-Dim_remainder1-Dim_delta1*Dim_tim_cnt; When the adjustment direction is downward, if Dim_diff is less than Dim_tim and the quotient of Dim_tim and Dim_diff has a remainder Dim_remainder2, Dim_remainder2 ≥ 1, then the current output value Dim_output_val is adjusted in a time adjustment manner: when the execution cycle count Dim_tim_cnt consumed by the adjustment is less than or equal to (Dim_delta2+1)*Dim_remainder2, the current output value is reduced by 1 every Dim_delta2+1 execution cycle, and Dim_ output_val=Dim_start_val-Dim_tim_cnt / (Dim_delta2+1); when the execution cycle count Dim_tim_cnt consumed by the adjustment is greater than (Dim_delta2+1)*Dim_remainder2, the current output value is reduced by 1 every Dim_delta2 execution cycles, Dim_output_val=Dim_start_val-(Dim_tim_cnt-Dim_remainder2) / Dim_delta2.

4. The method for adjusting the digital quantity of the control signal of the controller according to claim 1, characterized in that: If Dim_Stop_Val>Dim_Start_Val, it is determined that the adjustment direction is upward, Dim_Stop_Val is the adjustment target value, and Dim_Start_Val is the adjustment start value; When the adjustment direction is upward, if Dim_diff is greater than Dim_tim and the quotient of Dim_diff and Dim_tim has a remainder Dim_remainder1, Dim_remainder1≥1, then the current output value Dim_output_val is adjusted in a step adjustment manner: when the execution cycle count Dim_tim_cnt consumed by the adjustment is less than or equal to Dim_remainder1, the current output value is increased by Dim_delta1+1 for each execution cycle, Dim_output_val=Dim_start_val+(Dim_delta1+1)*Dim_tim_cnt; when the execution cycle count Dim_tim_cnt consumed by the adjustment is greater than Dim_remainder1, the current output value is increased by Dim_delta1 for each execution cycle, Dim_output_val=Dim_start_val+Dim_remainder1+Dim_delta1*Dim_tim_cnt; When the adjustment direction is upward, if Dim_diff is less than Dim_tim and the quotient of Dim_tim and Dim_diff has a remainder Dim_remainder2, Dim_remainder2 ≥ 1, then the current output value Dim_output_val is adjusted in a time adjustment manner: when the execution cycle count Dim_tim_cnt consumed by the adjustment is less than or equal to (Dim_delta2+1)*Dim_remainder2, the current output value is increased by 1 for every Dim_delta2+1 execution cycle, and Dim_ output_val=Dim_start_val+Dim_tim_cnt / (Dim_delta2+1); when the execution cycle count Dim_tim_cnt consumed by the adjustment is greater than (Dim_delta2+1)*Dim_remainder2, the current output value is increased by 1 every Dim_delta2 execution cycles, Dim_output_val=Dim_start_val+(Dim_tim_cnt-Dim_remainder2) / Dim_delta2.

5. A controller, characterized in that: include: Memory, used to store programs; A processor, used for loading the program to execute the control signal digital quantity adjustment method according to any one of claims 1 to 4.