Filter, filter filtering method, and computer readable storage medium

CN122226014APending Publication Date: 2026-06-16SHENZHEN POWEROAK NEWENER CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN POWEROAK NEWENER CO LTD
Filing Date
2026-04-23
Publication Date
2026-06-16

Smart Images

  • Figure CN122226014A_ABST
    Figure CN122226014A_ABST
Patent Text Reader

Abstract

The embodiment of the application relates to the technical field of filters, in particular to a filter, a filter filtering method and a computer readable storage medium. The filter comprises a PI loop and a proportional adjustment module, a proportional gain coefficient, an integral gain coefficient and a cutoff frequency of the PI loop are determined when a coefficient proportion value is 1, the coefficient proportion value of the integral gain coefficient acting on an integral term of the PI loop is preliminarily determined based on the cutoff frequency and a target noise frequency, and the coefficient proportion value is adjusted through an output error of the filter, that is, the design of parameters of the proportional adjustment module acting on the PI loop needs the target noise frequency to be filtered to participate, that is, the parameters of the proportional adjustment module participating in filtering are adaptively adjusted based on the target noise frequency to be filtered, when the target noise frequency changes, the parameters of the proportional adjustment module acting on the PI loop are also adjusted, so that the filter can be applicable to a constant value system of different frequency noise interference, and the stability of the constant value system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of filter technology, and in particular to a filter, a filter filtering method, and a computer-readable storage medium. Background Technology

[0002] A constant-value system (also known as a constant-value control system) is the most fundamental and common type of control system in the field of automatic control. A constant-value system is a control system whose given input value remains unchanged once set, and whose output is expected to remain at a specific value. External noise interference can affect the stability of a constant-value system.

[0003] Currently, some filters can only filter noise of a single frequency, and their adaptability is poor when the frequency of external noise changes. Summary of the Invention

[0004] One objective of this application is to provide a filter, a filter filtering method, and a computer-readable storage medium, which aims to improve the poor adaptability of filters to changes in the frequency of external noise in related technologies.

[0005] In a first aspect, embodiments of this application provide a filter, including: a PI loop acting on the input and output terminals of the filter; a proportional adjustment module for outputting a proportional value of the integral gain coefficient of the integral term acting on the PI loop; the proportional gain coefficient, integral gain coefficient, and cutoff frequency of the PI loop are determined when the proportional value is 1; the proportional value of the proportional adjustment module is initially determined based on the cutoff frequency and the target noise frequency and adjusted by the output error of the filter, the output error being the difference between the target output value and the actual output value at the output terminal; the proportional term of the filter is determined based on the input error of the filter and the proportional gain coefficient of the PI loop, the integral term of the filter is determined based on the input error and the total integral gain coefficient, the input error being the difference between the actual input value and the reference input value at the input terminal, and the total integral gain coefficient being the product of the integral gain coefficient and the proportional value.

[0006] In some embodiments, the coefficient ratio value of the proportional adjustment module is initially determined based on the cutoff frequency and the target noise frequency, including: determining the minimum frequency value among all noise frequencies in the target noise frequency; and determining the frequency range value based on the minimum frequency value. ,in, The minimum frequency value is determined; any value within the frequency range is taken as the cutoff frequency; based on the cutoff frequency, the proportional gain coefficient, and the integral gain coefficient, a preliminary coefficient ratio value is obtained.

[0007] In some embodiments, obtaining a preliminarily determined coefficient ratio value based on the cutoff frequency, the proportional gain coefficient, and the integral gain coefficient includes: obtaining a minimum integral gain coefficient based on the ratio of a first product to a preset ratio value, wherein the first product is the product of the cutoff frequency and the proportional gain coefficient; obtaining a minimum coefficient ratio value based on the ratio of the minimum integral gain coefficient to the integral gain coefficient; and determining a coefficient range value based on the minimum coefficient ratio value. ,in, The minimum coefficient ratio value is used; any value within the coefficient range is taken as the initial ratio value, which is the initially determined coefficient ratio value.

[0008] In some embodiments, the actual output value of the filter at an initial proportional value is set to the initial output value. The initially determined coefficient proportional value is adjusted by the output error of the filter, including: if the initial output value is greater than or equal to a preset upper limit value, the initial proportional value is adjusted by step size, where the preset upper limit value is the target output value plus a positive first preset error; if the initial output value is greater than or equal to the target output value and less than the preset upper limit value, the initial proportional value is determined to be the adjusted coefficient proportional value; if the initial output value is less than or equal to a preset lower limit value, the initial proportional value is adjusted by step size, where the preset lower limit value is the target output value minus a positive second preset error; if the initial output value is greater than the preset lower limit value and less than the target output value, the initial proportional value is determined to be the adjusted coefficient proportional value; wherein, the step size adjustment operation of the initial proportional value is: determining the adjusted coefficient proportional value based on the initial proportional value, the initial output value, the target output value, and a reference adjustment step size.

[0009] In some embodiments, determining the adjusted coefficient ratio based on the initial ratio value, the initial output value, the target output value, and the reference adjustment step size includes: determining the adjustment difference based on the error result value and the reference adjustment step size, wherein the error result value is the initial output value minus the target output value; determining the coefficient intermediate value based on the initial ratio value and the adjustment difference; and determining the adjusted coefficient ratio based on the relationship between the coefficient intermediate value and the coefficient range value.

[0010] In some embodiments, determining the adjusted coefficient ratio based on the relationship between the intermediate value of the coefficient and the coefficient range value includes: if the intermediate value of the coefficient is less than the minimum coefficient ratio value, determining the minimum coefficient ratio value as the adjusted coefficient ratio value; if the intermediate value of the coefficient is within the coefficient range value, determining the intermediate value of the coefficient as the adjusted coefficient ratio value; if the intermediate value of the coefficient is greater than or equal to 1, determining the adjusted coefficient ratio value as 1.

[0011] In some embodiments, the reference adjustment step size is determined based on a reference frequency, the changing frequency of the controlled object, and the integral gain coefficient, including: obtaining a unit adjustment value based on the ratio of the changing frequency to the reference frequency, wherein the reference frequency is the cumulative control frequency of the PI loop on the controlled object within one control cycle; and obtaining the reference adjustment step size based on the product of the unit adjustment value and the integral gain coefficient.

[0012] Secondly, embodiments of this application provide a filter filtering method. The filter includes a PI loop and a proportional adjustment module. The proportional adjustment module is used to output the coefficient ratio value of the integral gain coefficient acting on the integral term of the PI loop. The method includes: determining the initial parameters of the PI loop: when the output coefficient ratio value is 1, determining the proportional gain coefficient, integral gain coefficient, and cutoff frequency of the PI loop; based on the cutoff frequency and the target noise frequency, initially determining the coefficient ratio value output by the proportional adjustment module, and adjusting the coefficient ratio value according to the output error of the filter, where the output error is the difference between the target output value and the actual output value at the output end of the filter; based on the input error of the filter and the proportional gain coefficient, determining the proportional term of the filter, where the input error is the difference between the actual input value and the reference input value at the input end of the filter; based on the input error and the total integral gain coefficient, determining the integral term of the filter, where the total integral gain coefficient is the product of the integral gain coefficient and the coefficient ratio value; and based on the sum of the proportional term and the integral term, determining the actual output value at the output end of the filter.

[0013] Thirdly, embodiments of this application provide a computer-readable storage medium storing processor-executable computer program instructions, which, when executed by a processor, cause the processor to perform the filter filtering method provided in the second aspect.

[0014] The embodiments of this application have the following beneficial effects: The filter provided in this application includes a PI loop and a proportional adjustment module. The proportional adjustment module is used to output the coefficient ratio of the integral gain coefficient of the integral term acting on the PI loop. The proportional gain coefficient, integral gain coefficient, and cutoff frequency of the PI loop are determined when the coefficient ratio is 1. The coefficient ratio of the integral gain coefficient of the integral term acting on the PI loop is initially determined based on the cutoff frequency and the target noise frequency. The coefficient ratio is adjusted by the output error of the filter. That is, the design of the parameters of the proportional adjustment module acting on the PI loop requires the participation of the target noise frequency to be filtered. In other words, the parameters of the proportional adjustment module participating in the filtering are adaptively adjusted based on the target noise frequency to be filtered. When the target noise frequency changes, the parameters of the proportional adjustment module acting on the PI loop will also be adaptively adjusted. Thus, the filter can be applied to constant value systems with noise interference of different frequencies, improving the stability of the constant value system. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the related technologies or embodiments will be briefly introduced below. Obviously, the drawings described below only show some embodiments of this application and should not be considered as limiting the scope of protection. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of the control loop in a filter provided in some embodiments of this application; Figure 2 These are Bode plots for different integral gain coefficients in some embodiments of this application; Figure 3A This is a Bode plot of the controlled object Gp(s)=1 / (s+5) in some embodiments of this application; Figure 3B This is a schematic diagram of the adjustment coefficient ratio values ​​in some embodiments of this application; Figure 4 This is a flowchart illustrating the filter filtering method provided in some embodiments of this application. Detailed Implementation

[0017] To make the objectives and advantages of the embodiments of this application more readily understood, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. The detailed description of the embodiments of this application in the accompanying drawings is not intended to limit the scope of protection claimed by this application, but only represents selected embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] It should be noted that, unless there is a conflict, the various technical features involved in the embodiments of this application described below can be combined with each other, and all are within the protection scope of this application. Furthermore, although functional modules are divided in the device or structural schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," "third," and other similar expressions used herein do not limit the data or execution order, but are only for illustrative purposes and to distinguish identical or similar items with substantially the same function and effect, and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features.

[0019] Unless otherwise defined, the technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. It should be understood that the term "and / or" as used in this specification includes any and all combinations of one or more of the listed items.

[0020] A constant-value system (also known as a constant-value control system) is the most fundamental and common type of control system in the field of automatic control. A constant-value system is a control system whose given input value remains unchanged once set, and whose output is expected to remain at a specific value. External noise interference can affect the stability of a constant-value system.

[0021] Currently, some filters can only filter noise of a single frequency, and their adaptability is poor when the frequency of external noise changes.

[0022] In view of this, this application provides a filter including a PI loop and a proportional adjustment module. The proportional adjustment module is used to output the proportional value of the integral gain coefficient of the integral term acting on the PI loop. The proportional gain coefficient, integral gain coefficient, and cutoff frequency of the PI loop are determined when the proportional value is 1. The proportional value of the integral gain coefficient of the integral term acting on the PI loop is initially determined based on the cutoff frequency and the target noise frequency. The proportional value is adjusted by the output error of the filter. That is, the parameter design of the proportional adjustment module acting on the PI loop requires the participation of the target noise frequency to be filtered. In other words, the parameters of the proportional adjustment module participating in the filtering are adaptively adjusted based on the target noise frequency to be filtered. When the target noise frequency changes, the parameters of the proportional adjustment module acting on the PI loop are also adaptively adjusted. Thus, this filter can be applied to constant value systems with noise interference of different frequencies, improving the stability of the constant value system.

[0023] Please see Figure 1 , Figure 1 A schematic diagram of the control loop in a filter provided in some embodiments of this application is shown.

[0024] like Figure 1 As shown, filter 100 includes a PI loop 10 and a proportional adjustment module 20. The PI loop 10 operates on the input terminal 11 and the output terminal 12 of filter 100. The proportional adjustment module 20 is used to output the integral gain coefficient of the integral term operating on the PI loop 10 (i.e., as described below). The coefficient ratio (i.e., the value in the following text) ).

[0025] In the embodiments of this application, in the complex frequency domain The following describes the inputs and outputs of each loop in filter 100. This is the actual input value at input terminal 11 of filter 100. This is the reference input value for input terminal 11. For input error (i.e. ), This represents the actual output value at output terminal 12 of filter 100. The target output value for output terminal 12.

[0026] In PI loop 10 This is the proportional gain coefficient. This is the integral gain coefficient. This refers to the integration operation, that is, the integration of input error. Integrate to obtain the input error. Integration results In the proportional adjustment module 20, This is the coefficient ratio value output by the proportional adjustment module 20.

[0027] In this embodiment of the application, the coefficient ratio is 1 (i.e. When determining the parameters of PI loop 10, that is, when the coefficient ratio is 1, the proportional gain coefficient of PI loop 10 is determined. Integral gain coefficient and cutoff frequency The parameters for PI loop 10 are determined as follows.

[0028] Based on the transfer function of the PI loop in a traditional filter: In order to analyze the frequency response, let This yields the complex number expression: In this equation, the modulus of the complex expression represents the filter gain, and it also represents the ratio of the output signal amplitude to the input error signal amplitude. The filter gain is calculated using the modulus calculation formula.

[0029] Right now: .

[0030] Please see Figure 2 , Figure 2 A1 in the figure shows different integral gain coefficients in some embodiments of this application. The amplitude Bode plot below, Figure 2 A2 in the figure shows different integral gain coefficients in some embodiments of this application. The phase Bode plot is shown below. According to the Bode plot, not only can the magnitude and phase of the system (in this embodiment, the filter) be seen at different frequencies, but also the trend of the magnitude and phase changing with frequency can be seen, and the system stability can also be judged.

[0031] according to Figure 2 In the diagram, A1 represents different integral gain coefficients for the low-frequency band (i.e., the band on the left side of the horizontal axis that is close to 0). The corresponding gains are all very high. For the high-frequency band (i.e., the frequency band on the right side of the horizontal axis), different integral gain coefficients... The corresponding gain gradually decreases until it decreases to 0. Based on the integral gain coefficient... The frequency at which the gain decreases to 0 (i.e., the crossover frequency) will also vary depending on the change in gain. The smaller the value, the lower the frequency at which the gain decreases to 0 (i.e., the crossover frequency). Embodiments of this application suppress high-frequency noise interference through this characteristic, specifically by continuously adjusting the integral gain coefficient. To limit interference from noise in different frequency bands.

[0032] In practical applications, the noise frequency range that the system needs to suppress during design is known, based on the principle that: The smaller the value, the smaller the frequency at which the gain decreases to 0 (i.e., the crossover frequency). This allows for the design of the integral gain coefficient in PI closed-loop control. This is to achieve the suppression of different high-frequency noises.

[0033] The following details the proportional gain coefficient of the PI loop 10 in the filter 100 provided in the embodiments of this application. Integral gain coefficient Cutoff frequency and crossing frequency The determination.

[0034] Among them, when the coefficient ratio is 1 (i.e. When determining the proportional gain coefficient of PI loop 10, Integral gain coefficient Cutoff frequency and crossing frequency .

[0035] Please see Figure 1 A coefficient ratio of 1 refers to the coefficient ratio value output by the proportional adjustment module 20. When the PI loop 10 is not saturated (i.e., when the integral term in the PI control process is not saturated), the coefficient proportional value... It does not affect the PI loop 10, that is, it does not affect the integral gain coefficient of the PI loop 10. After adjustment, the transfer function of filter 100 is now: .

[0036] It is understandable that when the proportional adjustment module 20 outputs the coefficient proportional value... When the PI loop 10 is saturated (i.e., the integral term in the PI control process is saturated), the coefficient proportional value... The integral gain coefficient applied to PI loop 10 is the integral gain coefficient of PI loop 10. After adjustment, the transfer function of filter 100 is now: .

[0037] The following uses the frequency domain method as an example to explain in detail how to determine the proportional gain coefficient of PI loop 10. Integral gain coefficient Cutoff frequency and crossing frequency The process.

[0038] Step 1: Draw the controlled object Bird diagram In this application embodiment, the controlled object is used. For example, 1) First, convert the transfer function into the standard form of a Bode plot: .

[0039] 2) Identify the system type and parameters. This system is a first-order system, including a gain term. First-order inertial element ,in, The time constant is 0.2 seconds. If the time required for the system to reach stability is seconds, then the corner frequency / cutoff frequency is... .

[0040] 3) Drawing the amplitude Bode plot Step 3.1: Calculate the DC gain (low-frequency asymptote), i.e.: Therefore, it can be seen that the low-frequency band is a band with an amplitude of The horizontal lines to the left and right (i.e., low-frequency asymptotes), for example, see [reference]. Figure 3A As shown in B1, the low-frequency asymptote is the line L31 with the left side close to 0 (i.e., (The lines in the frequency band)

[0041] Step 3.2: Determine the corner frequency and slope change. The corner frequency / cutoff frequency ratio is: Slope change: At the corner frequency / cutoff frequency, the slope changes from 0dB to -20dB.

[0042] Step 3.3: Draw the asymptotes, where the low-frequency asymptotes (i.e., ): Amplitude is The horizontal lines to the left and right, the high-frequency asymptotes (i.e. ):by A straight line with a decreasing slope, for example, see [reference] Figure 3A As shown in B1, the low-frequency asymptote is the left side of line L31. The lines in the frequency band, the high-frequency asymptote is the right side of line L31. The lines in the frequency band.

[0043] 4) Phase Bode plot drawing Step 4.1: Determine the phase range, where the first-order inertial element... Phase characteristics: .

[0044] Step 4.2: Calculate the following key points, where, : , : , : .

[0045] Step 4.3: Plot the phase curve, starting the phase from 0°. At phase The phase eventually gradually approaches For example, please see Figure 3A As shown in B2, the phase curve is drawn as line L32.

[0046] Step Two: Select Design Goals Corner frequency / Cutoff frequency ( ): System response speed indicator, cutoff frequency The higher the value, the faster the response speed, but the greater the susceptibility to noise interference.

[0047] Phase Margin (PM): Choose any value between 45° and 60° to ensure good stability and robustness.

[0048] Step 3: Determine the parameter relationship using the position of the zero point. According to the transfer function It can be seen that the zero point is located at Set the zero point at to In this embodiment of the application, the zero point is set to... .

[0049] Step 4: Determine the proportional gain coefficient using the amplitude condition.

[0050] According to the relation: We can obtain: Thus we can obtain .

[0051] Step 5: Calculate the integral gain coefficient

[0052] Based on the relationship in step three: We can obtain: .

[0053] Step Six: Calculate the crossing frequency

[0054] Crossover frequency is the frequency that the open-loop amplitude-frequency response curve of the amplitude Bode plot crosses. The frequency of the line (i.e., the curve and) The x-coordinate of the intersection point of the lines, which satisfies the following relationship: Solve for the corresponding crossover frequency. That's it. The calculation process is a simple equation solution, which will not be described in detail here.

[0055] In this embodiment, the coefficient ratio value of the proportional adjustment module 20 Based on cutoff frequency and target noise frequency The output error of filter 100 has been preliminarily determined and verified. Adjustments were made.

[0056] In this embodiment, the output error The target output value for output terminal 12 and actual output value The difference, that is: .

[0057] In this embodiment, the coefficient ratio value of the proportional adjustment module 20 The determination process includes steps S1 and S2.

[0058] Step S1: Based on the cutoff frequency and the target noise frequency, initially determine the coefficient ratio value.

[0059] Step S2: Adjust the coefficient ratio based on the output error of the filter.

[0060] It is worth noting that, for the loop control process of filter 100, the output process of each loop at each moment is as follows: the proportional term of the filter Input error based on filter 100 and the proportional gain coefficient of PI loop 10 Determined, that is: The integral term of filter 100 Based on input error and total integral gain coefficient Determined, that is: ,in, For input error The integral result; the total integral gain coefficient Based on integral gain coefficient And coefficient adjustment ratio value Determined, that is: So, the actual output value of output terminal 12 of filter 100 .

[0061] In some embodiments, step S1: Based on the cutoff frequency and the target noise frequency, a preliminary coefficient ratio value is determined, specifically including the following steps S11 to S14.

[0062] Step S11: Determine the minimum frequency value among all noise frequencies in the target noise frequency range.

[0063] Step S12: Based on the minimum frequency value, determine the frequency range value. ,in, This is the minimum frequency value.

[0064] Step S13: Obtain any value from the frequency range as the cutoff frequency.

[0065] Step S14: Based on the cutoff frequency, proportional gain coefficient, and integral gain coefficient, obtain the initially determined coefficient ratio values.

[0066] In step S311, the target noise frequency includes multiple noise frequencies. The minimum frequency value among the multiple noise frequencies is selected to obtain the minimum frequency value among all noise frequencies in the target noise frequency.

[0067] In step S312, since it is necessary to filter out noise with a frequency greater than or equal to the minimum frequency value, the frequency range value is determined as follows: ,in, This is the minimum frequency value.

[0068] In step S313, within the frequency range value Take any value as the cutoff frequency That is, the filtering frequency is greater than or equal to the cutoff frequency. The noise.

[0069] In step S314, based on the cutoff frequency proportional gain coefficient and integral gain coefficient To obtain the initially determined coefficient ratio values Including: based on cutoff frequency proportional gain coefficient and integral gain coefficient Determine the minimum coefficient ratio value Based on the minimum coefficient ratio value Determine the preliminary coefficient ratio values .

[0070] In some embodiments, the present application embodiments achieve, through steps S141 to S144, a preliminary determined coefficient ratio value based on the cutoff frequency, the proportional gain coefficient, and the integral gain coefficient.

[0071] Step S141: Obtain the minimum integral gain coefficient based on the ratio of the first product to the preset ratio value.

[0072] Wherein, the first product Cutoff frequency With proportional gain coefficient The product of, i.e. The preset ratio value is related to the zero point location of the transfer function; for example, the zero point is... Then 5 is the preset ratio value.

[0073] For example, embodiments of this application are based on a first product. With preset ratio value The ratio of the minimum integral gain coefficient is obtained. ,Right now: .in, ,available Therefore, it can be seen that the minimum integral gain coefficient With respect to the zero location of the transfer function and the proportional gain coefficient Related.

[0074] Step S142: Obtain the minimum coefficient ratio based on the ratio of the minimum integral gain coefficient to the integral gain coefficient.

[0075] For example, based on the minimum integral gain coefficient With integral gain coefficient The ratio of the minimum coefficient ratio is obtained. ,Right now: .

[0076] In some embodiments, engineers customize settings based on their engineering experience. For the range of empirical values Any value in the range, where, if the emphasis is on the system's transient response, the minimum coefficient proportional value can be used. The value is set to 0.3. If a stable PI loop and strong fluctuation suppression capability are desired, the minimum coefficient ratio can be set to 0.3. The value is 0.1.

[0077] Step S143: Determine the coefficient range value based on the minimum coefficient ratio value. ,in, This is the minimum coefficient ratio value.

[0078] Among them, the coefficient ratio value The range of values ​​is the range of coefficient values. ,Right now .

[0079] Step S144: Obtain any value from the coefficient range as the initial ratio value.

[0080] For example, in the embodiments of this application, the coefficient range values Choose any value from the given information as the initial ratio value. The initial ratio value is the preliminarily determined coefficient ratio value. .

[0081] In some implementations, step S2: adjusting the coefficient ratio value based on the output error of the filter, specifically includes steps S21 to S24.

[0082] Step S21: If the initial output value is greater than or equal to the preset upper limit value, adjust the step size of the initial ratio value.

[0083] Step S22: If the initial output value is greater than or equal to the target output value and less than the preset upper limit value, determine the initial ratio value as the adjusted coefficient ratio value.

[0084] Step S23: If the initial output value is less than or equal to the preset lower limit, adjust the step size of the initial ratio value.

[0085] Step S24: If the initial output value is greater than the preset lower limit and less than the target output value, determine the initial ratio value as the adjusted coefficient ratio value.

[0086] In this embodiment, the filter is set at an initial scaling factor. The actual output value below Initial output value Preset upper limit value Output value for target Add the first preset error of the positive number ,Right now: Preset lower limit value Output value for target Subtract the second preset error of the positive number ,Right now: Engineers can customize and set the first preset error based on experimental and empirical data. and the second preset error This application does not impose any specific limitations on this embodiment. The first preset error... With the second preset error Same or different.

[0087] Please see Figure 3B For example, in the embodiments of this application, the initial output value is obtained. and the initial output value Compared with the target output value respectively Preset upper limit value and preset lower limit value Compare, if the initial output value Greater than or equal to the preset upper limit value For the initial ratio value Perform step size adjustment to obtain the adjusted coefficient ratio value. .

[0088] If the initial output value Greater than or equal to the target output value And less than the preset upper limit value Determine the initial ratio value The adjusted coefficient ratio value ,Right now: .

[0089] If the initial output value Less than or equal to the preset lower limit value For the initial ratio value Perform step size adjustment to obtain the adjusted coefficient ratio value. .

[0090] If the initial output value Greater than the preset lower limit And less than the target output value Determine the initial ratio value The adjusted coefficient ratio value ,Right now: .

[0091] Among them, the initial ratio value The step size adjustment operation is performed based on the initial proportional value. Initial output value Target output value and reference adjustment step size Determine the adjusted coefficient ratio. .

[0092] In some implementations, the embodiments of this application determine the adjusted coefficient ratio value based on the initial ratio value, the initial output value, the target output value, and the reference adjustment step size through steps S211 to S213.

[0093] Step S211: Determine the adjustment difference based on the error result value and the reference adjustment step size.

[0094] Step S212: Determine the intermediate value of the coefficient based on the initial ratio value and the adjustment difference.

[0095] Step S213: Determine the adjusted coefficient ratio based on the relationship between the intermediate value and the range value of the coefficient.

[0096] In this embodiment, the error result value Initial output value Subtract the target output value ,Right now: .

[0097] For example, based on error result values and reference adjustment step size Determine the adjustment difference ,Right now: .

[0098] For example, the embodiments of this application are based on an initial ratio value. and adjustment difference Determine the intermediate value of the coefficient , that is: .

[0099] In this application, the embodiments are based on the intermediate value of the coefficients. sum of coefficient range values The relationship determines the adjusted coefficient ratio. That is, based on the median value of the coefficient Is it within the coefficient range? Within this, the adjusted coefficient ratio value is determined. .

[0100] In some embodiments, the present application implements steps S2131 to S2133 to determine the adjusted coefficient ratio based on the relationship between the intermediate value of the coefficient and the range value of the coefficient.

[0101] Step S2131: If the intermediate value of the coefficient is less than the minimum coefficient ratio value, determine the minimum coefficient ratio value as the adjusted coefficient ratio value.

[0102] Step S2132: If the intermediate value of the coefficient is within the coefficient range, determine the intermediate value of the coefficient as the adjusted coefficient ratio value.

[0103] Step S2133: If the intermediate value of the coefficient is greater than or equal to 1, then determine the adjusted coefficient ratio to be 1.

[0104] For example, if the intermediate value of the coefficient Less than the minimum coefficient ratio Determine the minimum coefficient ratio value The adjusted coefficient ratio value ,Right now: .

[0105] For example, if the intermediate value of the coefficient Within the coefficient range Within, that is: Determine the intermediate value of the coefficient The adjusted coefficient ratio value ,Right now: .

[0106] For example, if the intermediate value of the coefficient Greater than or equal to 1, that is: Then determine the adjusted coefficient ratio value. It is 1, that is: .

[0107] In this embodiment, the reference adjustment step size is used. Based on reference frequency Frequency of change of the controlled object and integral gain coefficient Confirmed. Reference frequency. The reference frequency is the cumulative control frequency of the PI loop on the controlled object within one control cycle. For example, if one control cycle is 1 second, then... This refers to the number of times the PI loop performs control operations on the controlled object within 1 second.

[0108] In some embodiments, the present application implements steps S3 to S4 to determine the reference adjustment step size based on the reference frequency, the changing frequency of the controlled object, and the integral gain coefficient.

[0109] Step S3: Obtain the unit adjustment value based on the ratio of the changing frequency to the reference frequency.

[0110] Step S4: Obtain the reference adjustment step size based on the product of the unit adjustment value and the integral gain coefficient.

[0111] In this embodiment, the frequency of change of the controlled object The frequency of change refers to the number of times the controlled object changes within a control cycle. For example, if the controlled object is alternating current (AC), and the AC changes 50 times within one second of a control cycle, then the frequency of change of the AC is... It is 50.

[0112] In step S3, the reference frequency is obtained in this embodiment of the application. Frequency of change of the controlled object And based on the frequency of change With reference frequency The ratio of the units is used to obtain the unit adjustment value. ,Right now: .

[0113] In step S4, based on the unit adjustment value With integral gain coefficient The product of these two factors yields the reference adjustment step size. ,Right now: .

[0114] Those skilled in the art will understand that the filter filtering method provided in this application embodiment can be applied to the above-mentioned filter (e.g., filter 100). Specifically, the execution subject of the filter filtering method is one or at least two processors of the filter.

[0115] Please see Figure 4 The filter filtering method provided in this application includes steps S41 to S45 to achieve filtered playback.

[0116] Step S41: Determine the initial parameters of the PI loop: When the output coefficient ratio is 1, determine the proportional gain coefficient, integral gain coefficient, and cutoff frequency of the PI loop.

[0117] Step S42: Based on the cutoff frequency and the target noise frequency, initially determine the coefficient ratio value of the proportional adjustment module output, and adjust the coefficient ratio value according to the output error of the filter. The output error is the difference between the target output value and the actual output value at the output end of the filter.

[0118] Step S43: Based on the filter's input error and proportional gain coefficient, determine the filter's proportional term. The input error is the difference between the actual input value and the reference input value at the filter's input terminal.

[0119] Step S44: Based on the input error and the total integral gain coefficient, determine the integral term of the filter. The total integral gain coefficient is the product of the integral gain coefficient and the coefficient ratio.

[0120] Step S45: Based on the summation of the proportional and integral terms, determine the actual output value at the output terminal of the filter.

[0121] Understandably, the specific execution process of steps S41 to S45 can be referred to the corresponding filtering process of the filter in the foregoing embodiments, and will not be repeated here.

[0122] In summary, the embodiments of this application determine the proportional gain coefficient, integral gain coefficient, and cutoff frequency of the PI loop when the coefficient ratio output by the proportional adjustment module is 1. Furthermore, the coefficient ratio of the integral gain coefficient acting on the integral term of the PI loop is initially determined based on the cutoff frequency and the target noise frequency, and the coefficient ratio is adjusted through the output error of the filter. In other words, the design of the parameters of the proportional adjustment module acting on the PI loop requires the participation of the target noise frequency to be filtered. The parameters of the proportional adjustment module involved in filtering are adaptively adjusted based on the target noise frequency. When the target noise frequency changes, the parameters of the proportional adjustment module acting on the PI loop are also adaptively adjusted. Thus, this filter can be applied to constant-value systems with noise interference of different frequencies, filtering out noise of different frequencies and improving the stability of the constant-value system.

[0123] This application provides a computer-readable storage medium storing processor-executable computer program instructions. When executed by a processor, the computer program instructions cause the processor to perform the filter filtering method provided in this application, or to perform the steps in any possible implementation of the filter filtering method provided in this application.

[0124] In some embodiments, the storage medium may be a flash memory, a hard disk, an optical disk, a register, a magnetic surface memory, a removable disk, a CD-ROM, a random access memory (RAM), a read-only memory (ROM), an electrically programmable ROM, and an electrically erasable programmable ROM, or any other form of storage medium known in the art, or various devices including one or any combination of the above storage media.

[0125] In some embodiments, computer program instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0126] As an example, computer program instructions may, but do not necessarily, correspond to files in a file system, and may be stored as part of a file that holds other programs or data, for example, in one or more scripts in an HTML (Hypertext Markup Language) document, or in a single file dedicated to the program in question, or in multiple collaborative files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0127] As an example, computer program instructions can be deployed to execute on a single computing device (including devices such as smart terminals and servers), or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network. It is readily understood that all or part of the steps of the methods described in the embodiments provided above can be implemented directly using electronic hardware or processor-executable computer program instructions, or a combination of both.

[0128] Those skilled in the art will understand that the embodiments provided in this application are merely illustrative. The order in which the steps in the methods of the embodiments are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The order can be adjusted, merged, and deleted according to actual needs. Modules or sub-modules, units or sub-units in the apparatus or system of the embodiments can be merged, divided, and deleted according to actual needs. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.

[0129] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, it can be implemented using hardware. Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods.

[0130] It should be noted that the above embodiments are for illustrating the technical concept and features of this application, and are intended to enable those skilled in the art to understand the content of this application and implement it accordingly. They should not be construed as limiting the scope of protection of this application. Those skilled in the art can understand that all or part of the processes of the above embodiments can be implemented, modified according to the technical solutions described in the embodiments of this application, or equivalent substitutions can be made to some of the technical features. It is understood that these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should be considered as equivalent changes and modifications made based on the embodiments of this application, all of which should fall within the scope of the claims of this application.

Claims

1. A filter, characterized in that, include: A PI loop is applied to both the input and output terminals of the filter. The proportional adjustment module is used to output the proportional value of the integral gain coefficient of the integral term acting on the PI loop; The proportional gain coefficient, integral gain coefficient, and cutoff frequency of the PI loop are determined when the coefficient ratio is 1. The coefficient ratio of the proportional adjustment module is initially determined based on the cutoff frequency and the target noise frequency and is adjusted by the output error of the filter. The output error is the difference between the target output value and the actual output value at the output terminal. The proportional term of the filter is determined based on the input error of the filter and the proportional gain coefficient of the PI loop. The integral term of the filter is determined based on the input error and the total integral gain coefficient. The input error is the difference between the actual input value and the reference input value at the input terminal. The total integral gain coefficient is the product of the integral gain coefficient and the proportional coefficient value.

2. The filter according to claim 1, characterized in that, The coefficient ratio value of the proportional adjustment module is initially determined based on the cutoff frequency and the target noise frequency, including: Determine the minimum frequency value among all noise frequencies in the target noise frequency range; Based on the minimum frequency value, the frequency range value is determined to be... ,in, The minimum frequency value; Take any value from the frequency range as the cutoff frequency; Based on the cutoff frequency, the proportional gain coefficient, and the integral gain coefficient, a preliminary coefficient ratio value is obtained.

3. The filter according to claim 2, characterized in that, The process of obtaining a preliminary coefficient ratio value based on the cutoff frequency, the proportional gain coefficient, and the integral gain coefficient includes: The minimum integral gain coefficient is obtained based on the ratio of the first product to the preset proportional value, wherein the first product is the product of the cutoff frequency and the proportional gain coefficient. The minimum coefficient ratio is obtained based on the ratio of the minimum integral gain coefficient to the integral gain coefficient. Based on the minimum coefficient ratio value, the coefficient range value is determined to be... ,in, This is the minimum coefficient ratio value; Take any value from the range of coefficients as the initial ratio value, and the initial ratio value is the initially determined coefficient ratio value.

4. The filter according to claim 3, characterized in that, The filter is set to its actual output value at the initial ratio value as the initial output value. The initially determined coefficient ratio value is adjusted by the output error of the filter, including: If the initial output value is greater than or equal to the preset upper limit value, the initial ratio value is adjusted by step size. The preset upper limit value is the target output value plus a positive first preset error. If the initial output value is greater than or equal to the target output value and less than the preset upper limit value, the initial ratio value is determined to be the adjusted coefficient ratio value; If the initial output value is less than or equal to a preset lower limit, the initial ratio value is adjusted by step size. The preset lower limit is the target output value minus a positive number for a second preset error. If the initial output value is greater than the preset lower limit value and less than the target output value, the initial ratio value is determined to be the adjusted coefficient ratio value; The step size adjustment operation for the initial ratio value is as follows: based on the initial ratio value, the initial output value, the target output value, and the reference adjustment step size, the adjusted coefficient ratio value is determined.

5. The filter according to claim 4, characterized in that, The step of determining the adjusted coefficient ratio value based on the initial ratio value, the initial output value, the target output value, and the reference adjustment step size includes: The adjustment difference is determined based on the error result value and the reference adjustment step size, wherein the error result value is the initial output value minus the target output value; Based on the initial ratio value and the adjustment difference, determine the intermediate value of the coefficient; Based on the relationship between the intermediate value of the coefficient and the range value of the coefficient, the adjusted coefficient ratio value is determined.

6. The filter according to claim 5, characterized in that, The step of determining the adjusted coefficient ratio based on the relationship between the intermediate value of the coefficient and the range value of the coefficient includes: If the median value of the coefficient is less than the minimum coefficient ratio value, the minimum coefficient ratio value is determined to be the adjusted coefficient ratio value; If the intermediate value of the coefficient is within the coefficient range, the intermediate value of the coefficient is determined to be the adjusted coefficient ratio value; If the intermediate value of the coefficient is greater than or equal to 1, then the adjusted coefficient ratio is determined to be 1.

7. The filter according to any one of claims 4-6, characterized in that, The reference adjustment step size is determined based on the reference frequency, the changing frequency of the controlled object, and the integral gain coefficient, including: Based on the ratio of the changing frequency to the reference frequency, a unit adjustment value is obtained, wherein the reference frequency is the cumulative control frequency of the PI loop on the controlled object within one control cycle; The reference adjustment step size is obtained by multiplying the unit adjustment value by the integral gain coefficient.

8. A filter filtering method, characterized in that, The filter includes a PI loop and a proportional adjustment module. The proportional adjustment module is used to output the proportional value of the integral gain coefficient acting on the integral term of the PI loop. The method includes: Determine the initial parameters of the PI loop: with the output coefficient ratio of 1, determine the proportional gain coefficient, integral gain coefficient, and cutoff frequency of the PI loop; Based on the cutoff frequency and the target noise frequency, the coefficient ratio value output by the proportional adjustment module is initially determined, and the coefficient ratio value is adjusted according to the output error of the filter. The output error is the difference between the target output value and the actual output value at the output end of the filter. Based on the input error of the filter and the proportional gain coefficient, the proportional term of the filter is determined, wherein the input error is the difference between the actual input value and the reference input value at the input terminal of the filter; Based on the input error and the total integral gain coefficient, the integral term of the filter is determined, wherein the total integral gain coefficient is the product of the integral gain coefficient and the coefficient ratio value; The actual output value of the filter is determined by summing the proportional term and the integral term.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, cause the processor to perform the filter filtering method as described in claim 8.