A method of constructing a lead-lag compensator and a lead-lag compensator
Patent Information
- Application Number
- CN202311655303.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2043-12-05
AI Technical Summary
但是一般的超前滞后补偿器的离散传递函数为可调参数仅有a与b两个,能设计的参数数量非常有限,从而限制了其设计的自由度,不能满足一些极端条件下的系统改善要求,因此,需要设计一种参数灵活多变、可调整的超前滞后补偿器结构,以满足各种工况下的需求
[0033]本申请的技术优点:1、本申请提出的超前滞后器结构的可调参数为7,在实际工况中可提供更高设计自由度,满足各种工况下不同的使用需求;2、本申请方案直接提供离散形式传递函数,方便应用;3、本申请通过使用PID控制器,与第二低通滤波单元构成的回路来近似第二低通滤波单元的逆,相比直接用第二低通滤波单元的逆,本申请不会因第二低通滤波单元的相对阶数大于因第一低通滤波单元的相对阶数而违反因果,从而造成系统无法物理实现。
Smart Images

Figure CN117666328B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of control technology, specifically relating to a method for constructing a lead-lag compensator and the lead-lag compensator itself. Background Technology
[0002] Lead-lag compensators are commonly used in control systems to improve the system's phase angle and gain margin, thereby improving system stability and control accuracy. However, the discrete transfer function of a typical lead-lag compensator is... The adjustable parameters are only two, a and b, which limits the number of parameters that can be designed, thus restricting the degree of freedom in its design and failing to meet the system improvement requirements under some extreme conditions. Therefore, it is necessary to design a flexible and adjustable lead-lag compensator structure to meet the needs of various working conditions. Summary of the Invention
[0003] Based on the problems existing in the prior art, this invention proposes a method for constructing a lead-lag compensator and a lead-lag compensator. The lead-lag compensator consists of a module that can realize a second-order low-pass filter and a module that can realize the function of a PID controller. It has multiple adjustable parameters, flexible adjustment methods, higher degree of freedom, and can adapt to various working conditions.
[0004] To achieve the above-mentioned technical effects, the technical solution adopted by the present invention is as follows:
[0005] A method for constructing a lead-lag compensator includes:
[0006] Obtain the total transfer function of the lead-lag compensator to be constructed;
[0007] The numerator and denominator of the total transfer function are split into a first transfer function, a second transfer function, and a third transfer function;
[0008] The first branch is constructed based on the first transfer function and the third transfer function; the second loop is constructed based on the second transfer function and the third transfer function. The first branch and the second loop constitute a lead-lag compensator.
[0009] The lead-lag compensator includes at least a PID controller, a first low-pass filter unit, and a second low-pass filter unit. The first branch is a feedback branch from the output of the PID controller to the input of the first low-pass filter unit; the second branch is a feedback loop composed of the PID controller and the second low-pass filter unit.
[0010] As a preferred embodiment, the method of splitting the corresponding non-integer polynomials in the numerator and denominator polynomials of the total transfer function into a first transfer function, a second transfer function, and a third transfer function includes:
[0011] The numerator polynomial is split into the product of the third transfer function and the second transfer function;
[0012] The denominator polynomial is split into the product of the third transfer function and the first transfer function plus a specified constant.
[0013] Preferably, the specified constant is 1.
[0014] As a preferred embodiment, the overall transfer function expression is as follows:
[0015]
[0016] Where G is the overall transfer function of the lead-lag compensator, L1 is the first transfer function, L2 is the second transfer function, and C is the third transfer function.
[0017] As a preferred embodiment, the expression for the third transfer function is as follows:
[0018]
[0019] Where C is the third transfer function, P, I, D are the proportional gain, integral gain, and derivative gain of the PID controller, T is the sampling period in seconds, and z is the z-transform.
[0020] As a preferred embodiment, the expression for the first transfer function is as follows:
[0021]
[0022] Where L1 is the first transfer function, f1 is the cutoff frequency of the first filter unit in Hz, b1 is the damping ratio of the first filter unit, and T is the sampling period in seconds.
[0023] As a preferred embodiment, the expression for the second transfer function is as follows:
[0024]
[0025] Where L2 is the first transfer function, f2 is the cutoff frequency of the first filter unit in Hz, b2 is the damping ratio of the first filter unit, and T is the sampling period in seconds.
[0026] A lead-lag compensator constructed according to the above method includes at least the following:
[0027] PID controller, first low-pass filter, second low-pass filter.
[0028] The first branch is a feedback branch where the output of the PID controller is fed back to the input of the first low-pass filter.
[0029] The second branch is a feedback loop consisting of a PID controller and a second low-pass filter. The output of the PID controller is fed back to the input of the second low-pass filter, and the output of the second low-pass filter is fed back to the input of the PID controller.
[0030] Preferably, the first low-pass filter and the second low-pass filter are second-order low-pass filters.
[0031] A computing device includes at least one processor and a storage device communicatively connected to the at least one processor, the storage device storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above for constructing a lead-lag compensator.
[0032] A computer-readable storage medium storing a computer program, which, when executed by a computer, enables the above-described method for constructing a lead-lag compensator.
[0033] The technical advantages of this application are as follows: 1. The adjustable parameter of the lead-lag structure proposed in this application is 7, which can provide a higher degree of design freedom in actual working conditions and meet different usage requirements under various working conditions; 2. The solution of this application directly provides a discrete form transfer function, which is convenient for application; 3. This application uses a PID controller and a loop formed by the second low-pass filter unit to approximate the inverse of the second low-pass filter unit. Compared with directly using the inverse of the second low-pass filter unit, this application will not violate causality due to the relative order of the second low-pass filter unit being greater than that of the first low-pass filter unit, thus preventing the system from being physically implemented. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings required in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This invention provides a method for constructing a lead-lag compensator in one embodiment.
[0036] Figure 2 This is a schematic diagram of the lead-lag compensator constructed in one embodiment of the present invention;
[0037] Figure 3 A frequency response diagram is provided in one embodiment of the present invention;
[0038] Figure 4A frequency response diagram is provided in one embodiment of the present invention;
[0039] Figure 5 A frequency response diagram is provided in one embodiment of the present invention;
[0040] Figure 6 This is a frequency response diagram provided in one embodiment of the present invention.
[0041] In the diagram: 1-First low-pass filter; 2-Second low-pass filter; 3-PID controller. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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 some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0043] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0044] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0045] In the description of this application, it should be noted that the terms "upper," "lower," etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product is in use. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this application. In addition, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0046] Furthermore, terms such as "horizontal," "vertical," and "sag" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal relative to "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0047] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0048] It should be noted that, where there is no conflict, different features in the embodiments of this application can be combined with each other.
[0049] The lead-lag compensator proposed in this application is a component in a control system that can improve the undesirable frequency response in feedback or control systems. It is a fundamental component in classical control theory. The lead-lag compensator is obtained by connecting a lead compensator and a lag compensator in series. The transfer function of a typical lead-lag compensator is:
[0050]
[0051] Where X is the input of the compensator, Y is the output, s is the complex Laplace transform variable, z is the zero frequency, and p is the pole frequency. It can be seen that only two parameters, z and p, can be adjusted, which greatly limits the adjustable range of the lead-lag compensator. Therefore, this application intends to provide a lead-lag compensator that can be adjusted by multiple parameters, which can be flexibly adjusted according to different working conditions.
[0052] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0053] Please refer to Figure 1 , Figure 1 A method for constructing a lead-lag compensator is provided, comprising:
[0054] Obtain the total transfer function of the lead-lag compensator to be constructed;
[0055] The transfer function of a linear time-invariant system is defined as the ratio of the Laplace transform of the system's output to the Laplace transform of its input under zero initial conditions. The transfer function is obtained by linearly transforming the system's differential equations; its essence is equivalent to the differential equations, and it can characterize the system's inherent properties just like the differential equations. Therefore, it is also called the complex frequency domain model of the system or device. By obtaining the overall transfer function, the relationship between a single input and a single output can be qualitatively represented. If the overall transfer function of the system is unknown, a known input can be added to the system, and its output can be studied to derive the transfer function. Once the overall transfer function is established, a complete description of the system's dynamic characteristics can be given.
[0056] The numerator and denominator of the total transfer function are split into a first transfer function, a second transfer function, and a third transfer function;
[0057] By transforming the numerator and denominator polynomials of the transfer function into unique polynomials and then factoring them in the complex number range, the transfer function can be decomposed into different forms of expression. In this way, the system can be decomposed into some typical components to express the characteristics of the system. Here, the overall lead-lag compensator system is decomposed into the first transfer function, the second transfer function, and the third transfer function to represent the overall characteristics of the system.
[0058] The first branch is constructed based on the first transfer function and the third transfer function; the second loop is constructed based on the second transfer function and the third transfer function. The first branch and the second loop constitute a lead-lag compensator.
[0059] The lead-lag compensator includes at least a PID controller, a first low-pass filter unit, and a second low-pass filter unit. The first branch is a feedback branch from the output of the PID controller to the input of the first low-pass filter unit; the second branch is a feedback loop composed of the PID controller and the second low-pass filter unit.
[0060] The technical principle of this application is as follows: A loop constructed by a PID controller and a second low-pass filter unit is used to track the reference signal r. If the tracking error is small, the output of the PID controller can be approximated as the inverse of the second low-pass filter unit 2. The output of the PID controller is input to another first low-pass filter unit, thus achieving a series connection of approximately the inverse of the first and second low-pass filter units. By designing parameters such as the cutoff frequency of the first and second low-pass filter units, different lead-lag compensation effects can be achieved.
[0061] This leads to another advantage of this application: by using a PID controller or other type of controller to form a loop with the second low-pass filter unit to approximate the inverse of the second low-pass filter unit, compared to directly using the inverse of the second low-pass filter unit, this solution will not violate causality due to the relative order of the second low-pass filter unit being greater than that of the first low-pass filter unit, thus preventing the system from being physically implemented.
[0062] In one possible implementation, splitting the corresponding non-integer polynomials in the numerator and denominator polynomials of the total transfer function into a first transfer function, a second transfer function, and a third transfer function respectively includes:
[0063] The numerator polynomial is split into the product of the third transfer function and the second transfer function;
[0064] The denominator polynomial is split into the product of the third transfer function and the first transfer function plus a specified constant.
[0065] In one possible implementation, the specified constant is 1.
[0066] In one possible implementation, the total transfer function expression is as follows:
[0067]
[0068] Where G is the overall transfer function of the lead-lag compensator, C is the third transfer function, L1 is the first transfer function, and L2 is the second transfer function.
[0069] In one possible implementation, the third transfer function expression is as follows:
[0070]
[0071] Where C is the third transfer function, P, I, D are the proportional gain, integral gain, and derivative gain of the PID controller, T is the sampling period in seconds, and z is the z-transform.
[0072] In one possible implementation, the first transfer function expression is as follows:
[0073]
[0074] Where L1 is the first transfer function, f1 is the cutoff frequency of the first filter unit in Hz, b1 is the damping ratio of the first filter unit, and T is the sampling period in seconds.
[0075] In one possible implementation, the expression for the second transfer function is as follows:
[0076]
[0077] Where L2 is the first transfer function, f2 is the cutoff frequency of the first filter unit in Hz, b2 is the damping ratio of the first filter unit, and T is the sampling period in seconds.
[0078] In one possible implementation, please refer to Figure 2 A lead-lag compensator constructed according to the above construction method includes at least the following:
[0079] PID controller, first low-pass filter, second low-pass filter.
[0080] The first branch is a feedback branch where the output of the PID controller is fed back to the input of the first low-pass filter.
[0081] The second branch is a feedback loop consisting of a PID controller and a second low-pass filter. The output of the PID controller is fed back to the input of the second low-pass filter, and the output of the second low-pass filter is fed back to the input of the PID controller. The second branch is a loop.
[0082] In one possible implementation, the first low-pass filter and the second low-pass filter are second-order low-pass filters.
[0083] Here, the first and second low-pass filters can also be replaced by any low-pass filter that achieves the desired technical effect, instead of a second-order low-pass filter. Similarly, the PID controller can be replaced by other types of controllers. The advantage of choosing a second-order low-pass filter and a PID controller is that these two types of devices are currently the most widely used in the industry. Of course, if the actual operating conditions require it, other components can be used instead, such as using a first-order low-pass filter instead of a second-order low-pass filter. However, if a first-order low-pass filter is used, the number of adjustable parameters will also change, no longer being seven. This is also a technical advantage of this application.
[0084] In one possible implementation, a computing device is also provided, including at least one processor and a storage device communicatively connected to the at least one processor, the storage device storing instructions executable by the at least one processor to enable the at least one processor to perform the method described above for constructing a lead-lag compensator.
[0085] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0086] In one possible implementation, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a computer, can implement the above-described method for constructing a lead-lag compensator.
[0087] A computer-readable storage medium may be a tangible device capable of retaining and storing instructions for use by an instruction execution device. The computer-readable storage medium may, for example, be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through a wire.
[0088] In a possible implementation, for the lead-lag compensator constructed by adopting the technical solution of the present application, there are 7 adjustable system parameters, which are f1, f2, b1, b2, P, I, D respectively. When the cut-off frequency f1>f2, the system is a lag compensation. When the cut-off frequency f1<f2, the system is a lead compensation.
[0089] In a specific embodiment, please refer to Figure 2 , where r is the overall system input of the lead-lag compensator, and the system input is related to actual working conditions, for example, it may be a voltage input or a current input;
[0090] The input signal r respectively enters a first branch and a second branch, wherein e is the controller error, which is the difference between the input r and the output of the second low-pass filter L2, and the unit is determined according to actual working conditions, which may be voltage, current, etc.;
[0091] u is the output of the PID controller and also the input of the first low-pass filter L1, and y is the output of the low-pass filter L1 and also the output of the whole system.
[0092] The magnitudes and positions of f1 and f2 affect the range of system compensation; b1 and b2 affect the frequency response curves at the phase lead and lag points; the PID parameters affect the error of the system's internal tracking of the second low-pass filter unit. Generally, a high-gain PID controller can be designed to allow the subsystem containing the second low-pass filter unit to quickly track the input r. When adjusting various parameters, optimization-based parameter tuning methods can be used to better adapt to various requirements. For example, non-gradient-based tuning methods such as genetic algorithms, ant colony algorithms, simulated annealing algorithms, and particle swarm optimization algorithms can be used, as well as gradient-based tuning methods such as gradient descent algorithms, conjugate gradient algorithms, and interior-point algorithms.
[0093] The following examples illustrate the effects of parameter adjustments.
[0094] Figure 3 An example is shown in the frequency response diagram when f1, f2, b1, b2, P, I, D are 70, 40, 1, 1, 4, 0, 2 respectively.
[0095] Figure 4 An example is shown in the frequency response diagram when f1, f2, b1, b2, P, I, D are 40, 70, 1, 1, 4, 0, 2 respectively.
[0096] Figure 5 An example is shown in the frequency response diagram when f1, f2, b1, b2, P, I, D are 70, 40, 0.707, 0.707, 4, 0, 2 respectively.
[0097] Figure 6 An example is shown in the frequency response diagram when f1, f2, b1, b2, P, I, D are 300, 270, 1, 1, 16, 0, 4 respectively.
[0098] from Figures 3-6 The results show that the lead-lag device designed in this application has a variety of adjustable parameters, which can be adjusted according to actual working conditions. Please refer to... Figure 3 The mid-phase has a lead of about 30° and a gain of 2x at 70Hz; Figure 4 At 70Hz, the phase lag is 30°. Figure 5 Compared to Figure 3 By changing the damping of the second-order low-pass filter, it is evident that the shape of the frequency response curve can be altered, thus reducing the impact on the low-frequency band. Figure 6 contrast Figure 3 The peak value of the phase lead changed to around 270Hz.
[0099] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0100] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for constructing a lead-lag compensator, characterized in that, include: Obtain the total transfer function of the lead-lag compensator to be constructed. The expression of the total transfer function is as follows: ; in, Let be the overall transfer function of the lead-lag compensator. For the first transfer function, This is the second transfer function. This is the third transfer function; The numerator and denominator of the total transfer function are split into a first transfer function, a second transfer function, and a third transfer function, including the following steps: The numerator polynomial is split into the product of the third transfer function and the second transfer function; The denominator polynomial is split into the product of the third transfer function and the first transfer function plus a specified constant; The first branch is constructed based on the first transfer function and the third transfer function; the second loop is constructed based on the second transfer function and the third transfer function. The first branch and the second loop constitute a lead-lag compensator. The lead-lag compensator includes at least a PID controller, a first low-pass filter unit, and a second low-pass filter unit. The first branch is a feedback branch from the output of the PID controller to the input of the first low-pass filter unit. The second loop is a feedback loop composed of the PID controller and the second low-pass filter unit.
2. The method for constructing a lead-lag compensator according to claim 1, characterized in that: The specified constant is 1.
3. The method for constructing a lead-lag compensator according to claim 1, characterized in that: The expression for the third transfer function is as follows: ; in, The third transfer function, For the proportional gain, integral gain, and derivative gain of a PID controller, The sampling period is in seconds. In order to conduct Transformation.
4. The method for constructing a lead-lag compensator according to claim 1, characterized in that: The expression for the first transfer function is as follows: ; in, For the first transfer function, This is the cutoff frequency of the first filter unit, in Hz. The damping ratio of the first filter unit. The sampling period is expressed in seconds.
5. The method for constructing a lead-lag compensator according to claim 1, characterized in that: The expression for the second transfer function is as follows: ; in, For the first transfer function, This is the cutoff frequency of the first filter unit, in Hz. The damping ratio of the first filter unit. The sampling period is expressed in seconds.
6. A lead-lag compensator constructed according to any one of claims 1 to 5, characterized in that: The lead-lag compensator includes at least the following: Controller, first low-pass filter, second low-pass filter The first branch is a feedback branch from the output of the controller to the input of the first low-pass filter; The second loop is a feedback loop consisting of a controller and a second low-pass filter. The output of the controller is fed back to the input of the second low-pass filter, and the output of the second low-pass filter is fed back to the input of the controller.
7. The lead-lag compensator according to claim 6, characterized in that: The first low-pass filter and the second low-pass filter are second-order low-pass filters.
8. A computing device comprising: at least one processor; and a storage device communicatively connected to the at least one processor, the storage device storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of constructing a lead-lag compensator according to any one of claims 1 to 5.
9. A computer-readable storage medium storing a computer program, wherein when executed by a computer, the computer program can implement the method for constructing a lead-lag compensator as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Dual-input dual-output damping controller construction method, damping controller and device
CN116191533A
Filter device and feedback controller using the same
JP2007134823A