An adaptive control method for a push-down magnetic levitation system
By combining the PD controller and fuzzy controller, combined with the adaptive adjustment of the set value integrator, the power consumption, stability and robustness problems of the push-down magnetic levitation system are solved, and more efficient levitation control and power optimization are achieved. .
Patent Information
- Application Number
- CN202211205366.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-09-30
AI Technical Summary
The existing push-down magnetic levitation system consumes power and is prone to heat after long-term use. It has poor control stability and weak robustness. It is difficult to adapt to changes in physical parameters and external interference, especially at inclination angles.
An adaptive control method is designed, which combines the traditional position PD controller, fuzzy PD controller and set value integrator to perform parameter self-tuning and set value adjustment through feedback data to achieve real-time stability and robustness of the system. Improved performance and reduced power consumption.
It effectively improves the stability and adaptability of the system, reduces power consumption, enhances the control ability of different floats and body positions, and ensures suspension stability and power consumption optimization under different conditions.
Smart Images

Figure CN115576200B
Abstract
Description
Technical Field
[0001] The invention relates to a control method for a magnetic suspension system, and more specifically, to an adaptive control method for a push-down magnetic suspension system. Background Art
[0002] Push-down magnetic levitation devices are often used as desktop ornaments or research platforms, so they need to be powered on for a long time. However, many magnetic levitation devices on the market or homemade magnetic levitation devices use ordinary PID control algorithms, which will consume more power after a long suspension, and may even cause the device to heat up, thus affecting the performance of the magnetic levitation device. Most magnetic levitation devices are installed with low-performance detection components, and are prone to stability problems in suspension control due to temperature increases. If a magnetic float with different physical parameters is replaced, control instability is likely to occur. If the physical parameters differ greatly, it will not be able to suspend at all. The adaptability range to different floats is small, and the robustness of the system is weak. When there is a large external interference, the stability of the magnetic levitation system is affected. When the position of the magnetic levitation system has a large inclination angle with the horizontal plane, the float usually cannot suspend normally, and the system has poor position adaptability. Summary of the invention
[0003] The object of the present invention is to provide an adaptive control method for a push-down magnetic levitation system with a more optimized control algorithm, a more stable system and low energy consumption in view of the above-mentioned deficiencies in the prior art.
[0004] The technical solution of the present invention is implemented as follows: an adaptive control method for a push-down magnetic suspension system comprises the following steps:
[0005] (1) Design a traditional position PD controller. The position PD control algorithm on both axes of the plane is shown in Formula 1.
[0006]
[0007] Where U(k) is the PWM output duty cycle of the corresponding axis at time k, Kp and Kd are the output proportional parameter and differential parameter of the corresponding axis respectively, err(k) is the deviation of the corresponding axis at time k, set_goal(k) is the set value of the corresponding axis at time k, and detection(k) is the actual detection value of the corresponding axis at time k;
[0008] (2) designing an adaptive control algorithm, under the premise that the system enters steady-state control, starting to adjust the set value through the set value integrator to adjust the float to within the range of the optimal suspension position;
[0009] (3) Design a fuzzy PD controller and perform parameter self-tuning.
[0010] (a) The two-axis deviation err(k) and the deviation change rate Δerr(k) are calculated through the feedback of the x-axis and y-axis position data, and the change range of the two is determined. The fuzzy subset is determined according to the range, and then the two-axis deviation err(k) and the deviation change rate Δerr(k) are fuzzified by combining the fuzzy subsets, and the corresponding membership interval and membership degree are calculated respectively;
[0011] (b) After obtaining the membership interval and membership degree of the deviation data, the incremental values ΔKp and ΔKd of the PD parameters are calculated according to the pre-set fuzzy rules of Kp and Kd parameters;
[0012] (c) Take the absolute value of the obtained parameter increment, and then use the incremental PD control algorithm to debug the maximum and minimum values of Kp and Kd parameters that can stabilize the system. The increment range is obtained by subtracting the minimum value from the maximum value. When the Kp and Kd parameter increments change quickly, reduce the quantization factors of Kp and Kd so that their change speed is not too fast and causes control oscillation. At the same time, ΔKi is not required in this magnetic suspension design. The PD parameter self-tuning value formula of the system is shown in formula (2):
[0013]
[0014] where kp 0 and kd 0 It is the initial value without parameter tuning.
[0015] In the above-mentioned adaptive control method for a push-down magnetic levitation system, in step (1), before calculating the plane deviation data, it is necessary to ensure that each function is normal, and then set the main loop to detect the magnetic field in the three axis directions, and perform average value filtering and low-pass filtering to ensure the authenticity of the data. The timer interrupt time is set to 1ms for the execution of algorithm operations and PWM output control statements for the two axes. In the timer interrupt, the value detected by the z-axis is used to determine whether a float is placed on the device, thereby deciding whether to execute the control algorithm operation and PWM output.
[0016] In the above-mentioned adaptive control method of a push-down magnetic suspension system, step (2) is specifically to integrate the deviation by the set value when the system enters a steady-state suspension, and adjust in a direction to increase the deviation err(k), as shown in formula 3;
[0017]
[0018] Where c is the set value integral parameter, a and b are both greater than 0, set_goal(0) is the set value of the initial state, and set_goal(k) is the set value at time k;
[0019] When the absolute value of the change rate Δerr(k) is less than a certain value a, it is considered that the system control has entered a steady state. At this time, it can be determined whether the absolute value of the steady-state deviation err(k) exceeds a certain value b.
[0020] If it exceeds, it is considered that the steady-state error is too large, and the set value adjustment statement is executed. The set value integrates and accumulates the deviation err(k), so that the set value changes in the direction of increasing deviation, forcing the system to increase output to forcibly adjust the position of the float. As the float position is adjusted, the absolute value of the deviation err(k) will become smaller and smaller until it is less than b, and then the dynamic adjustment of the set value will be stopped. At this time, the float is adjusted to within the range of the optimal suspension position.
[0021] In the above-mentioned adaptive control method of a push-down magnetic levitation system, step (3) (a) is specifically as follows:
[0022] The two-axis deviation err(k) and the deviation change rate Δerr(k) are calculated by the feedback of the x-axis and y-axis position data, and the change range of the two is determined. According to the range, the fuzzy subsets {NB, NM, NS, ZO, PS, PM, PB} corresponding to the seven description quantities are divided using seven languages: negative large, negative medium, negative small, zero, positive small, positive medium, and positive large.
[0023] Through the triangular membership function and fuzzy subsets, the two-axis deviation err(k) and the deviation change rate Δerr(k) are fuzzified, and the corresponding membership interval and membership degree are calculated respectively.
[0024] In the above-mentioned adaptive control method for a push-down magnetic levitation system, step (3) (b) is specifically as follows: after obtaining the membership interval and membership degree of the deviation data, the incremental values ΔKp and ΔKd of the PD parameters are obtained by using the centroid method according to the preset fuzzy rules of the Kp and Kd parameters, as shown in Formula 4:
[0025]
[0026] Where Vo is the increment, M is the value synthesized by the corresponding matrix of the membership degree of err(k) and Δerr(k) in the parameter rule table, and F is the value represented by the membership language.
[0027] In the above-mentioned adaptive control method for a push-down magnetic suspension system, step (3) also includes step (d) of adding a control increment to the PD parameter that changes linearly according to the change of the z-axis magnetic field. When the controlled force of the placed float is strong, the proportional parameter Kp and the differential parameter Kd are relatively small. When the controlled force of the placed float is weak, the proportional parameter Kp and the differential parameter Kd are relatively large, as shown in formula (5):
[0028]
[0029] Where V MAX is the maximum value of the z-axis detection range, z_detection(k) is the detection value at time k, α and β are the incremental proportional coefficients of ΔKp' and ΔKd', and both α and β are greater than 0;
[0030] Then, the initial values of the PD parameters are added with ΔKp+ΔKp' and ΔKd+ΔKd' respectively, and finally the algorithm operation and PWM limiting output are performed.
[0031] After adopting the above structure, the present invention adds a fuzzy PD control algorithm on the basis of the PD controller, so that the system has the function of real-time adjustment of PD parameters, thereby improving the stability and robustness of the system, and at the same time, the control ability of different control objects is stronger and the control compatibility is better. Further, after the fuzzy PD control is realized, the adaptive improvement algorithm of the set value integrator is introduced to enable the system to have the set value self-adjustment function, so that the adaptability and stability of the system are further enhanced, the output power of the control system is effectively reduced, and it also has a strong body position adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The present invention will be further described in detail below in conjunction with the embodiments in the accompanying drawings, but this does not constitute any limitation to the present invention.
[0033] Figure 1 It is the control flow graph of the fuzzy PD adaptive improved algorithm of the present invention;
[0034] Figure 2 It is a program flow chart of the fuzzy controller of the present invention;
[0035] Figure 3 It is a triangular membership function diagram of the present invention;
[0036] Figure 4 It is a structural schematic diagram of the magnetic suspension device of the present invention;
[0037] Figure 5 It is a waveform diagram of the control of float No. 2 by using PD controller in the experimental example of the present invention;
[0038] Figure 6 It is a waveform diagram of the control of float No. 1 by the fuzzy PD controller in the experimental example of the present invention;
[0039] Figure 7 It is a waveform diagram of the control of float No. 2 by the fuzzy PD controller in the experimental example of the present invention;
[0040] Figure 8 It is a waveform diagram of the control of float No. 3 by the fuzzy PD controller in the experimental example of the present invention;
[0041] Fig. 9It is a waveform diagram of the control of float No. 1 by using the adaptive improved control algorithm in the experimental example of the present invention;
[0042] Fig.10 It is a waveform diagram of the control of float No. 2 by using the adaptive improved control algorithm in the experimental example of the present invention;
[0043] Fig.11 It is a waveform diagram of the control of float No. 3 by using the adaptive improved control algorithm in the experimental example of the present invention;
[0044] Fig.12 This is a power diagram of the steady state control of the float by using the PD controller in the experimental example of the present invention;
[0045] Fig.13 Schematic diagram of PWM output waveform when a PD controller is used in an experimental example of the present invention;
[0046] Fig.14 This is a power diagram of the steady-state control of the float by using a fuzzy PD controller in the experimental example of the present invention;
[0047] Fig.15 Schematic diagram of PWM output waveform when a fuzzy PD controller is used in an experimental example of the present invention;
[0048] Fig.16 This is a power diagram of the float control in steady state using the adaptive improved control algorithm in the experimental example of the present invention;
[0049] Fig.17 1 is a schematic diagram of PWM output waveform when the adaptive improved control algorithm is used in the experimental example of the present invention;
[0050] Fig.18 This is a schematic diagram of a body position test when a PD controller is used in an experimental example of the present invention;
[0051] Fig.19 It is a schematic diagram of body position test when a fuzzy PD controller is used in an experimental example of the present invention;
[0052] Fig. 20 This is a schematic diagram of body position testing when the adaptive improved control algorithm is used in the experimental example of the present invention. DETAILED DESCRIPTION
[0053] See also Figure 1 As shown, an adaptive control method of a push-down magnetic suspension system of the present invention comprises the following steps:
[0054] (1) Design a traditional position-type PD controller. Under the premise of ensuring that all functions are normal, set the main loop to detect the magnetic field in the three axis directions, and perform average filtering and low-pass filtering to ensure the authenticity of the data. Set the timer interrupt time to 1ms for the execution of algorithm operations and two-axis PWM output control statements. In the timer interrupt, the value detected by the z-axis is used to determine whether a float is placed on the device, thereby deciding whether to execute the control algorithm operation and PWM output.
[0055] The position PD control algorithm on both axes of the plane is shown in Formula 1.
[0056]
[0057] Where U(k) is the PWM output duty cycle of the corresponding axis at time k, Kp and Kd are the output proportional parameter and differential parameter of the corresponding axis respectively, err(k) is the deviation of the corresponding axis at time k, set_goal(k) is the set value of the corresponding axis at time k, and detection(k) is the actual detection value of the corresponding axis at time k.
[0058] In common PD controllers, the relationship between output U(t) and deviation err(t) is shown in formula (6):
[0059]
[0060] According to the characteristics of the magnetic levitation system, in addition to controlling the position of the float, the float speed must also be suppressed. Since the initial control position when the float is placed manually is uncertain, the completion time of the placement action is also uncertain. If an integral link is added, the system control will cause integral saturation due to the action of placing the float, causing the float to oscillate in a steady state. At the same time, in order to eliminate the steady-state error, the power output of the system is generally high, so the integral link is removed and PD control is adopted. The control deviation err(k) of the float is obtained by collecting the position information of the float at a fixed period, and the formula (1) is obtained by discretizing it through the PD algorithm.
[0061] In the control process of the PD controller, the proportional parameter Kp and the differential parameter Kd play a very important role. If the parameters are not adjusted properly, the stability of the entire system will be greatly affected. If the Kp parameter is too small, the system response speed will be slow, or the output control force will be insufficient, and the control object cannot reach the target value. If the Kp parameter is too large, a large overshoot will be generated, and even the control object will have low-frequency oscillations with increasing amplitude until the control object deviates from the control range. If the Kd parameter is too small, it will be difficult to suppress the large overshoot and low-frequency large-amplitude oscillations caused by the proportional link. If the Kd parameter is too large, it is likely to cause high-frequency oscillations in the control object. In serious cases, it is easy to burn out the system drive circuit, and it will also make the system adjustment time longer and the anti-interference performance worse.
[0062] (2) When the system enters a steady-state suspension, the set value is integrated with the deviation and adjusted in a direction that increases the deviation err(k), as shown in Formula 3;
[0063]
[0064] Where c is the set value integral parameter, a and b are both greater than 0, set_goal(0) is the set value of the initial state, and set_goal(k) is the set value at time k;
[0065] When the absolute value of the change rate Δerr(k) is less than a certain value a, it is considered that the system control has entered a steady state. At this time, it can be determined whether the absolute value of the steady-state deviation err(k) exceeds a certain value b.
[0066] If it exceeds, it is considered that the steady-state error is too large, and the set value adjustment statement is executed. The set value integrates and accumulates the deviation err(k), so that the set value changes in the direction of increasing deviation, forcing the system to increase output to forcibly adjust the position of the float. As the float position is adjusted, the absolute value of the deviation err(k) will become smaller and smaller until it is less than b, and then the dynamic adjustment of the set value will be stopped. At this time, the float is adjusted to within the range of the optimal suspension position.
[0067] (3) Design a fuzzy PD controller and perform parameter self-tuning, see Figure 2 and Figure 3 As shown, specifically:
[0068] (a) The two-axis deviation err(k) and the deviation change rate Δerr(k) are calculated by the feedback of the x-axis and y-axis position data, and the change range of the two is determined. According to the range, the fuzzy subsets corresponding to the seven description quantities {NB, NM, NS, ZO, PS, PM, PB} are divided into seven languages: negative large, negative medium, negative small, zero, positive small, positive medium, and positive large;
[0069] Through the triangular membership function and fuzzy subsets, the two-axis deviation err(k) and the deviation change rate Δerr(k) are fuzzified, and the corresponding membership interval and membership degree are calculated respectively.
[0070] (b) After obtaining the membership interval and membership degree of the deviation data, according to the fuzzy rules of Kp and Kd parameters pre-set in Table 1 and Table 2,
[0071] Table 1 Fuzzy rules for Kp parameters
[0072]
[0073] Table 2 Fuzzy rules for Kd parameters
[0074]
[0075]
[0076] Figure 6
[0077] The incremental values ΔKp and ΔKd of the PD parameters are obtained using the centroid method, as shown in Formula 4.
[0078]
[0079] Where Vo is the increment, M is the value synthesized by the corresponding matrix of the membership degree of err(k) and Δerr(k) in the parameter rule table, and F is the value represented by the membership language.
[0080] (c) Take the absolute value of the obtained parameter increment, and then use the incremental PD control algorithm to debug the maximum and minimum values of Kp and Kd parameters that can stabilize the system. The increment range is obtained by subtracting the minimum value from the maximum value. When the Kp and Kd parameter increments change quickly, reduce the quantization factors of Kp and Kd so that their change speed is not too fast and causes control oscillation. At the same time, ΔKi is not required in this magnetic suspension design. The PD parameter self-tuning value formula of the system is shown in formula (2):
[0081]
[0082] where kp 0 and kd 0 It is the initial value without parameter tuning.
[0083] (d) A control increment is added to the PD parameter that changes linearly according to the change of the z-axis magnetic field. When the controlled force of the placed float is strong, the proportional parameter Kp and the differential parameter Kd are small. When the controlled force of the placed float is weak, the proportional parameter Kp and the differential parameter Kd are large, as shown in formula (5):
[0084]
[0085] Where VMAX is the maximum value of the z-axis detection range, z_detection(k) is the detection value at time k, α and β are the incremental proportional coefficients of ΔKp' and ΔKd', and α and β are both greater than 0;
[0086] Then, the initial values of the PD parameters are added with ΔKp+ΔKp' and ΔKd+ΔKd' respectively, and finally the algorithm operation and PWM limiting output are performed.
[0087] After the fuzzy PD control is realized, the PD parameters can be adjusted in real time compared to the PD controller. For some floats with similar physical parameters, they can also be controlled to a stable suspension state. If the replaced float is too small or too weak relative to the coil control force, although stable suspension is achieved, a large steady-state error will be generated. At this time, the system can only output a large power to make the float stably suspended. This not only increases the power consumption of the system, but also makes the Hall sensor with average performance susceptible to temperature drift due to the heating of the coil, causing the float position to shift until it becomes unbalanced and falls. The large steady-state output power is mainly caused by the deviation. The larger the deviation, the greater the output power, so it is necessary to find a solution to reduce the steady-state deviation.
[0088] In order to eliminate the steady-state error and minimize the output power of the system, integration can be used. However, it has been proved that it is not appropriate to introduce an integration link in the output when designing the traditional PD controller. Under the premise of not affecting the stability, an adaptive controller can be introduced. By consulting the information, it is known that the adaptive control algorithm includes self-learning control algorithm, adaptive algorithm designed based on the backstepping method, sliding film adaptive algorithm, nonlinear adaptive control method combining feedback linearization and online parameter identification, and fuzzy adaptive algorithm using Lyapunov comprehensive design method. Although the above adaptive algorithms eliminate steady-state errors as much as possible, the implementation is also difficult, and they all have one feature - they are all algorithms designed based on fixed set values. According to the characteristics of the push-down magnetic levitation system, the generation of system deviation is first analyzed.
[0089] As shown in formula (7),
[0090] err(k)=set_goal(k)-detection(k) (7)
[0091] set_goal(k) is the set value at time k, and detection(k) is the detection value at time k. The size of the deviation depends on the set value and the detection value, and the detection value is determined by the control situation. The set value has always been set manually in the previous algorithm and is considered to be a constant for the optimal balance position of the float. However, the manually set position is not necessarily the appropriate suspension position of the float, and the actual set position will change with temperature drift. If the position is not appropriate, the deviation of the float will naturally be large. Therefore, the innovative use of dynamic adjustment of the set value allows the system to adjust in real time and stabilize the float within the appropriate suspension position range of the system.
[0092] On the basis of fuzzy PD control, after adding the above algorithm for improvement, adaptive control is realized, and the deviation will become very small. In this way, the parameter setting of fuzzy PD plays a negligible role, and the system magnetic coil has different control forces on different floats. If it is necessary to control a float with a relatively small controlled force, it will be easy to lose control due to insufficient output magnetic force. To address this problem, the Hall element characteristics of detecting the z-axis magnetic field are used. For floats with strong magnetic force, it is easy to be controlled, and the magnetic field data fed back is relatively large. On the contrary, for floats with weak magnetic force, it is not easy to be controlled, and the magnetic field data fed back is naturally small. Therefore, according to this characteristic, a control increment that changes linearly according to the change of the z-axis magnetic field is added to the PD parameter.
[0093] On the basis of traditional PD control, a fuzzy controller and a proportional operator based on z-axis magnetic field detection are introduced to automatically adjust the PD parameters to improve the robustness and adaptability of the control system. A set value integrator is added to automatically adjust the set value, so that the float automatically suspends at a suitable equilibrium position, greatly reducing the system output power, and further enhancing the system's adaptability to the float and device position.
[0094] Example
[0095] Hardware circuit: The microprocessor STM32F401CCU6 is used as the main controller with a main frequency of 84MHz and a built-in FPU operation unit. Compared with the traditional Ardiuno, C51 and STM32F103C8T6, it has faster running speed and faster data processing. The TB6612FNG driver chip is used to drive the magnetic coil. Compared with the conventional H-bridge circuit built with discrete components and driver chips such as L298N, it has a high upper limit on the switching frequency and a small size, ensuring the quality of the output voltage waveform. The HX6639 Hall element is used instead of the conventional 49E or AH3503 Hall element, with higher detection sensitivity and accuracy. The amplification circuit and temperature compensation circuit are integrated internally, and no external amplifier is required to amplify the signal. It is not easily affected by temperature in the range of 0 to 85°C, which is more in line with the working requirements of the push-down magnetic levitation system and reduces the cost of hardware circuit design.
[0096] Magnetic levitation device model: Figure 4 As shown, it is mainly composed of a float, a repulsion magnet and four evenly distributed magnetic coils with iron cores located inside the repulsion magnet.
[0097] The model parameters are shown in Table 3.
[0098] Table 3 Model parameters
[0099]
[0100] The control method comprises the following steps:
[0101] (1) Design a traditional position-type PD controller. Under the premise of ensuring that all functions are normal, set the main loop to detect the magnetic field in the three axis directions, and perform average filtering and low-pass filtering to ensure the authenticity of the data. Set the timer interrupt time to 1ms for the execution of algorithm operations and two-axis PWM output control statements. In the timer interrupt, the value detected by the z-axis is used to determine whether a float is placed on the device, thereby deciding whether to execute the control algorithm operation and PWM output.
[0102] The position PD control algorithm of the position PD controller on the two axes of the plane is shown in Formula 1.
[0103]
[0104] Where U(k) is the PWM output duty cycle of the corresponding axis at time k, Kp and Kd are the output proportional parameter and differential parameter of the corresponding axis respectively, err(k) is the deviation of the corresponding axis at time k, set_goal(k) is the set value of the corresponding axis at time k, and detection(k) is the actual detection value of the corresponding axis at time k;
[0105] (2) When the system enters a steady-state suspension, the set value is integrated with the deviation and adjusted in a direction that increases the deviation err(k), as shown in Formula 3;
[0106]
[0107] Where c is the set value integral parameter, a and b are both greater than 0, set_goal(0) is the set value of the initial state, and set_goal(k) is the set value at time k;
[0108] When the absolute value of the change rate Δerr(k) is less than a certain value a, it is considered that the system control has entered a steady state. At this time, it can be determined whether the absolute value of the steady-state deviation err(k) exceeds a certain value b.
[0109] If it exceeds, it is considered that the steady-state error is too large, and the set value adjustment statement is executed. The set value integrates and accumulates the deviation err(k), so that the set value changes in the direction of increasing deviation, forcing the system to increase output to forcibly adjust the position of the float. As the float position is adjusted, the absolute value of the deviation err(k) will become smaller and smaller until it is less than b, and then the dynamic adjustment of the set value will be stopped. At this time, the float is adjusted to within the range of the optimal suspension position.
[0110] In this embodiment, if the control cycle is 1 ms, if the absolute value of the deviation between the set value of the ideal suspension position and the initial set value is goal_err, and the deviation err(k)=goal_err, if the system is to enter the adaptive steady-state control within 5 seconds, as shown in Formula 8,
[0111] goal_err=err(k)*c*5*10 3 (8)
[0112] After simplification and calculation, the integral parameter c = 0.0002 is obtained. This formula is calculated when the float is in a constant position. However, in fact, as the system operates, the set value of the float is constantly adjusted, and the float position is also constantly adjusted. In this process, the deviation err(k) is also constantly decreasing, so the integration of the set value will become slower and slower. The integral parameter c must be greater than 0.0002 to complete the adaptive adjustment within 5 seconds.
[0113] (3) Design a fuzzy PD controller and perform parameter self-tuning.
[0114] (a) The two-axis deviation err(k) and the deviation change rate Δerr(k) are calculated by the feedback of the x-axis and y-axis position data, and the change range of the two is determined. According to the range, the fuzzy subsets corresponding to the seven descriptive quantities {NB, NM, NS, ZO, PS, PM, PB} are divided using seven languages: negative large, negative medium, negative small, zero, positive small, positive medium, and positive large.
[0115] In this embodiment, the deviation err(k) ranges from [-330, 330], the deviation change rate Δerr(k) ranges from [-660, 660], and the fuzzy subset is determined as {-300, -200, -100, 0, 100, 200, 300}.
[0116] Through testing, the system fuzzy parameters shown in Table 4 are obtained.
[0117] Table 4 System fuzzy parameters
[0118]
[0119] Through Figure 4 The triangular membership function shown in FIG. 1 is combined with the fuzzy subset to fuzzify the two-axis deviation err(k) and the deviation change rate Δerr(k), and calculate the corresponding membership interval and membership degree respectively.
[0120] (b) After obtaining the membership interval and membership degree of the deviation data, the incremental values ΔKp and ΔKd of the PD parameters are obtained using the centroid method according to the preset fuzzy rules of Kp and Kd parameters, as shown in Formula 4.
[0121]
[0122] Where Vo is the increment, M is the value synthesized by the corresponding matrix of the membership degree of err(k) and Δerr(k) in the parameter rule table, and F is the value represented by the membership language.
[0123] (c) Take the absolute value of the obtained parameter increment, and then use the incremental PD control algorithm to debug the maximum and minimum values of Kp and Kd parameters that can stabilize the system. The increment range is obtained by subtracting the minimum value from the maximum value. When the Kp and Kd parameter increments change quickly, reduce the quantization factors of Kp and Kd so that their change speed is not too fast and causes control oscillation. At the same time, ΔKi is not required in this magnetic suspension design. The PD parameter self-tuning value formula of the system is shown in formula (2):
[0124]
[0125] where kp 0 and kd 0 It is the initial value without parameter tuning.
[0126] (d) A control increment is added to the PD parameter that changes linearly according to the change of the z-axis magnetic field. When the controlled force of the placed float is strong, the proportional parameter Kp and the differential parameter Kd are small. When the controlled force of the placed float is weak, the proportional parameter Kp and the differential parameter Kd are large, as shown in formula (5):
[0127]
[0128] Where VMAX is the maximum value of the z-axis detection range, z_detection(k) is the detection value at time k, α and β are the incremental proportional coefficients of ΔKp' and ΔKd', and α and β are both greater than 0;
[0129] Then, the initial values of the PD parameters are added with ΔKp+ΔKp' and ΔKd+ΔKd' respectively, and finally the algorithm operation and PWM limiting output are performed.
[0130] Experimental example
[0131] Experimental conditions: The magnetic levitation system is powered by a DC 12V adapter, and data is transmitted to the mobile phone APP debugging project through the Bluetooth serial communication module and displayed in the form of a waveform. The data transmission cycle is 100ms, the room temperature is 20℃, and there is no strong magnetism and signal interference.
[0132] 1. Float adaptability test
[0133] Three different control algorithms are used to verify the adaptability to different float controls: PD control, fuzzy PD control and adaptive improved control. Then three different floats are selected, and the parameters are shown in Table 5.
[0134] Table 5 Test float parameters
[0135] Float No. Material diameter thickness quality 1 NdFeB 3cm 1cm 48.1g 2 NdFeB 3cm 2cm 96.0g 3 NdFeB 4cm 1cm 83.1g
[0136] While keeping the initial PD parameters of the three control algorithms the same, experiments were conducted on three test floats, and the waveforms began to be displayed when the floats began to be controlled.
[0137] PD control: Under the control of the PD algorithm, only float No. 2 can be stably suspended, and the position waveform data is as follows Figure 5 As shown, it can be seen that there is a large steady-state error.
[0138] Fuzzy PD control: The three floats can be stably suspended under fuzzy PD control. The position waveform data is as follows: Figures 6 to 8 As shown, it can be seen that the steady-state error under the control of fuzzy parameter self-tuning is much smaller than that of pure PD control.
[0139] Adaptive improved controller: The three floats can be stably suspended under the control of the adaptive improved algorithm, and the floats can be re-adjusted to the appropriate suspension position. The position waveform data is as follows: Figures 9 to 11 As shown, it can be seen that under the control of the adaptive improved algorithm, the steady-state error is very small, and the steady-state error can even be eliminated as the float rotates during suspension. Moreover, the steady-state fluctuation is smaller than that of the other two control algorithms.
[0140] It can be seen from the above control waveform data that the adaptive improved control algorithm has better control effect and stronger adaptability than the other two algorithms.
[0141] 2. System power consumption test
[0142] A float with good suspension effect is selected to provide stable test conditions. On the premise of ensuring that the initial PD parameters and position parameters are the same, the PD control, fuzzy PD control and adaptive improved control algorithms are used to control until steady state. The power of the entire magnetic suspension system and the PWM data of the system output are measured by a power meter.
[0143] The float No. 2, which can be suspended under all three control algorithms, has a diameter of 3 cm and a thickness of 2 cm. The test power of the three algorithms is as follows:
[0144] PD controller:
[0145] like Fig.12 and Fig.13 As shown, the system steady-state current under PD control is 462mA, the power is 5.584W, the overall power consumption is relatively large, the x-axis PWM output is about 2300, and the y-axis is about 900. It is known that the PWM output upper limit is 4200, then the x-axis steady-state output duty cycle is (2300 / 4200)*100%=54.8%, and the y-axis steady-state output duty cycle is (900 / 4200)*100%=21.4%.
[0146] Fuzzy PD controller:
[0147] like Fig.14 and Fig.15 As shown in the figure, the system steady-state current under fuzzy PD control is 150mA, the power is 1.820W, and the overall power consumption is much smaller than that of PD control. At the same time, due to the effect of parameter self-tuning, the position of the float is closer to the set suspension position. From the PWM output waveform data, it can be seen that the x-axis steady-state output is about 1100, and the y-axis steady-state output is about 500, so the x-axis steady-state output duty cycle is (1100 / 4200)*100%=26.2%, and the y-axis steady-state output duty cycle is (500 / 4200)*100%=11.9%.
[0148] Adaptive Improvement Controller:
[0149] like Fig.16 and Fig.17 As shown, under the control of the adaptive improved algorithm, the steady-state current is only 44mA, the power is only 0.534W, the overall power consumption is smaller than that of the previous two algorithms, the PWM output data of the x-axis and y-axis are only about 200, and the steady-state output duty cycle is (200 / 4200)*100%=4.8%.
[0150] From the above data and analysis, it can be seen that the power consumption of adaptive improved control is much smaller than that of the other two algorithms.
[0151] 3. System body position adaptability test
[0152] In order to make the experimental effect more obvious, a float with a larger controlled force is selected as the control object. Under the premise of ensuring that the initial PD parameters and position parameters are the same, PD control, fuzzy PD control and adaptive improved control algorithms are used to control until steady-state suspension. Then, one side of the device is fixed and the other side is slowly lifted to increase the angle between the device and the horizontal plane until the float can no longer float. The maximum inclination angle and system power of stable suspension are recorded.
[0153] PD controller:
[0154] like Fig.18 As shown in the figure, under the control of the PD algorithm, the maximum tilt angle of the device can only reach about 10°, but the output power consumption is as high as about 14W. Obviously, the system posture adaptability under the control of this algorithm is very poor.
[0155] Fuzzy PD controller:
[0156] like Fig.19 As shown, under the control of the fuzzy PD algorithm, the maximum tilt angle of the device is about 15°, and the power consumption is still as high as about 13W. The control effect is better than that of the PD controller, but still not ideal.
[0157] Adaptive Improvement Controller:
[0158] like Fig. 20 As shown in the figure, under the control of the adaptive improved algorithm, the inclination angle of the device can reach 90°, but the system power consumption is only about 0.6W. The float has an upward movement distance relative to the center point of the device, which is the adjustment result of the set value integrator. It can be seen that the system adaptability of the adaptive improved algorithm control far exceeds that of the PD control and fuzzy PD control.
[0159] 4. Conclusion
[0160] Aiming at the adaptability and stability problems of common push-down magnetic levitation systems, a control algorithm combining fuzzy PD and adaptive improvement is proposed. The fuzzy PD control algorithm is added on the basis of the PD controller, so that the system has the function of real-time adjustment of PD parameters, thereby improving the stability and robustness of the system, and at the same time, the control ability of different control objects is stronger and the control compatibility is better. After the fuzzy PD control is realized, the set value integrator and the proportional operator based on the z-axis magnetic field detection are introduced to form an adaptive improvement algorithm, so that the system has the function of self-adjustment of the set value, which further enhances the adaptability and stability of the system, effectively reduces the output power of the control system, and also has a strong body position adaptability.
[0161] The experimental results show that compared with the ordinary PD algorithm and the fuzzy PD algorithm, the adaptive improved algorithm has obvious improvements in controlling the float suspension ability and system power consumption.
[0162] The above embodiments are preferred implementation modes of the present invention and are only used to facilitate the description of the present invention. They are not intended to limit the present invention in any form. Any person with ordinary knowledge in the relevant technical field, if they do not depart from the scope of the technical features of the present invention, can make equivalent embodiments by partial changes or modifications to the technical contents disclosed in the present invention, and they still fall within the scope of the technical features of the present invention without departing from the technical features of the present invention.
Claims
1. An adaptive control method for a push-down magnetic levitation system, characterized in that: The steps include: (1) Design a traditional position PD controller. The position PD control algorithm on both axes of the plane is shown in Formula 1. Where U(k) is the PWM output duty cycle of the corresponding axis at time k, Kp and Kd are the output proportional parameter and differential parameter of the corresponding axis respectively, err(k) is the deviation of the corresponding axis at time k, set_goal(k) is the set value of the corresponding axis at time k, and detection(k) is the actual detection value of the corresponding axis at time k; (2) designing an adaptive control algorithm, under the premise that the system enters steady-state control, starting to adjust the set value through the set value integrator to adjust the float to within the range of the optimal suspension position; (3) Design a fuzzy PD controller and perform parameter self-tuning. (a) The two-axis deviation err(k) and the deviation change rate Δerr(k) are calculated through the feedback of the x-axis and y-axis position data, and the change range of the two is determined. The fuzzy subset is determined according to the range, and then the two-axis deviation err(k) and the deviation change rate Δerr(k) are fuzzified by combining the fuzzy subsets, and the corresponding membership interval and membership degree are calculated respectively; (b) After obtaining the membership interval and membership degree of the deviation data, the incremental values ΔKp and ΔKd of the PD parameters are calculated according to the pre-set fuzzy rules of Kp and Kd parameters; (c) Take the absolute value of the obtained parameter increment, and then use the incremental PD control algorithm to debug the maximum and minimum values of Kp and Kd parameters that can stabilize the system. The increment range is obtained by subtracting the minimum value from the maximum value. When the Kp and Kd parameter increments change quickly, reduce the quantization factors of Kp and Kd so that their change speed is not too fast and causes control oscillation. At the same time, ΔKi is not required in this magnetic suspension design. The PD parameter self-tuning value formula of the system is shown in formula (2): Where kp0 and kd0 are initial values without parameter tuning.
2. The adaptive control method of a push-down magnetic levitation system according to claim 1, characterized in that: In step (1), before calculating the plane deviation data, it is necessary to ensure that all functions are normal, and then set the main loop to detect the magnetic field in the three axis directions, and perform average value filtering and low-pass filtering to ensure the authenticity of the data. Set the timer interrupt time to 1ms for the execution of algorithm operations and PWM output control statements for the two axes. In the timer interrupt, the value detected by the z-axis is used to determine whether a float is placed on the device, thereby deciding whether to execute the control algorithm operation and PWM output.
3. The adaptive control method of a push-down magnetic levitation system according to claim 1, characterized in that: Step (2) is specifically to integrate the deviation with the set value when the system enters a steady-state suspension, and adjust in a direction that increases the deviation err(k), as shown in Formula 3; Where c is the set value integral parameter, a and b are both greater than 0, set_goal(0) is the set value of the initial state, and set_goal(k) is the set value at time k; When the absolute value of the change rate Δerr(k) is less than a certain value a, it is considered that the system control has entered a steady state. At this time, it can be determined whether the absolute value of the steady-state deviation err(k) exceeds a certain value b. If it exceeds, it is considered that the steady-state error is too large, and the set value adjustment statement is executed. The set value integrates and accumulates the deviation err(k), so that the set value changes in the direction of increasing deviation, forcing the system to increase output to forcibly adjust the position of the float. As the float position is adjusted, the absolute value of the deviation err(k) will become smaller and smaller until it is less than b, and then the dynamic adjustment of the set value will be stopped. At this time, the float is adjusted to within the range of the optimal suspension position.
4. The adaptive control method of a push-down magnetic levitation system according to claim 1, characterized in that: Step (3)(a) is specifically: The two-axis deviation err(k) and the deviation change rate Δerr(k) are calculated by the feedback of the x-axis and y-axis position data, and the change range of the two is determined. According to the range, the fuzzy subsets {NB, NM, NS, ZO, PS, PM, PB} corresponding to the seven description quantities are divided using seven languages: negative large, negative medium, negative small, zero, positive small, positive medium, and positive large. Through the triangular membership function and fuzzy subsets, the two-axis deviation err(k) and the deviation change rate Δerr(k) are fuzzified, and the corresponding membership interval and membership degree are calculated respectively.
5. The adaptive control method of a push-down magnetic suspension system according to claim 1, characterized in that: Step (3) (b) is specifically as follows: after obtaining the membership interval and membership degree of the deviation data, the incremental values ΔKp and ΔKd of the PD parameters are obtained using the centroid method according to the preset fuzzy rules of Kp and Kd parameters, as shown in Formula 4: Where Vo is the increment, M is the value synthesized by the corresponding matrix of the membership degree of err(k) and Δerr(k) in the parameter rule table, and F is the value represented by the membership language.
6. The adaptive control method of a push-down magnetic levitation system according to claim 1, characterized in that: Step (3) also includes step (d) of adding a control increment to the PD parameter that changes linearly according to the change of the z-axis magnetic field. When the controlled force of the placed float is strong, the proportional parameter Kp and the differential parameter Kd are relatively small. When the controlled force of the placed float is weak, the proportional parameter Kp and the differential parameter Kd are relatively large, as shown in formula (5): Where V MAX is the maximum value of the z-axis detection range, z_detection(k) is the detection value at time k, α and β are the incremental proportional coefficients of ΔKp' and ΔKd', and both α and β are greater than 0; Then, the initial values of the PD parameters are added with ΔKp+ΔKp' and ΔKd+ΔKd' respectively, and finally the algorithm operation and PWM limiting output are performed.
