Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lect 6 Fuzzy PID Controller Basil Hamed Islamic University of Gaza

Similar presentations


Presentation on theme: "Lect 6 Fuzzy PID Controller Basil Hamed Islamic University of Gaza"— Presentation transcript:

1 Lect 6 Fuzzy PID Controller Basil Hamed Islamic University of Gaza
Fuzzy Logic Control Lect 6 Fuzzy PID Controller Basil Hamed Islamic University of Gaza

2 Contents PID PID Fuzzy Example Supervisory PID Fuzzy Control
Basil Hamed

3 PID PID: Proportional Integral Derivative
More than 90% of controllers used in industries are PID or PID type controllers (the rest are PLC) PID controllers are simple, reliable, effective For lower order linear system PID controllers have remarkable set-point tracking performance and guaranteed stability. Basil Hamed

4 Convectional PID Controller
Basil Hamed

5 Convectional PID Controller
Time Domain Frequency Domain Basil Hamed

6 PID Controller Basil Hamed

7 PID Controller Time Domain Frequency Domain Basil Hamed

8 A comparison of different controller types
Basil Hamed

9 General tips for designing a PID controller
Obtain an open-loop response and determine what needs to be improved Add a proportional control to improve the rise time Add a derivative control to improve the overshoot Add an integral control to eliminate the steady-state error Adjust each of Kp, Ki, and Kd until you obtain a desired overall response. You can always refer to the table shown to find out which controller controls what characteristics you do not need to implement all three controllers (proportional, derivative, and integral) into a single system, if not necessary. Keep the controller as simple as possible. Basil Hamed

10 General tips for designing a PID controller
Basil Hamed

11 Tuning of PID Controller
There are methods for tuning PID controllers, for example: Hand-Tuning, Ziegler–Nichols Tuning, Optimal Design, Pole Placement Design, and Auto-Tuning (A° stro¨m and H¨agglund 1995). There is much to gain, if these methods are carried forward to fuzzy controllers. Basil Hamed

12 A simple example for PID control
We plot y(t) for step reference r(t ) with P controller PI controller PID controller Basil Hamed

13 Basil Hamed

14 Basil Hamed

15 Basil Hamed

16 Types of Fuzzy Controllers: - Direct Controller -
The Outputs of the Fuzzy Logic System Are the Command Variables of the Plant: Fuzzy Rules Output Absolute Values ! Slide 16 Basil Hamed

17 Types of Fuzzy Controllers: - PID Adaptation -
Fuzzy Logic Controller Adapts the P, I, and D Parameter of a Conventional PID Controller: The Fuzzy Logic System Analyzes the Performance of the PID Controller and Optimizes It ! Slide 17 Basil Hamed

18 Types of Fuzzy Controllers: - Fuzzy Intervention -
Fuzzy Logic Controller and PID Controller in Parallel: Intervention of the Fuzzy Logic Controller into Large Disturbances ! Slide 18 Basil Hamed

19 Supervisory Control Systems
Most controllers in operation today have been developed using conventional control methods. There are, however, many situations where these controllers are not properly tuned and there is heuristic knowledge available on how to tune them while they are in operation. There is then the opportunity to utilize fuzzy control methods as the supervisor that tunes or coordinates the application of conventional controllers. Basil Hamed

20 Fuzzy PID Control Because PID controllers are often not properly tuned (e.g., due to plant parameter variations or operating condition changes), there is a significant need to develop methods for the automatic tuning of PID controllers. While there exist many conventional methods for PID auto-tuning, here we will strictly focus on providing the basic ideas on how you would construct a fuzzy PID auto-tuner. Basil Hamed

21 Fuzzy PID Control A fuzzy PID controller is a fuzzified proportional-integral-derivative (PID) controller. It acts on the same input signals, but the control strategy is formulated as fuzzy rules. If a control engineer changes the rules, or the tuning gains, it is difficult to predict the effect on rise time, overshoot, and settling time of a closed-loop step response, because the controller is generally nonlinear and its structure is complex. In contrast, a PID controller is a simple, linear combination of three signals: the P action proportional to the error e, the I-action proportional to the integral of the error 𝑒𝑑𝑡 , and the D-action proportional to the time derivative of the error de/dt, or ˙e for short. Basil Hamed

22 Fuzzy PID Control Fuzzy PID controllers are similar to PID controllers under certain assumptions about the shape of the membership functions and the inference method (Siler and Ying 1989, Mizumoto 1992, Qiao and Mizumoto 1996, Tso and Fung 1997). A design procedure for fuzzy controllers of the PID type, based on PID tuning, is the following: Procedure Design fuzzy PID 1. Build and tune a conventional PID controller first. 2. Replace it with an equivalent fuzzy controller. 3. Fine-tune it. Basil Hamed

23 Fuzzy PID Control The procedure is relevant whenever PID control is possible, or already implemented. Our starting point is the ideal continuous PID controller The control signal u is a linear combination of the error e, its integral and its derivative. The parameter Kp is the proportional gain, Ti is the integral time, and Td the derivative time. Basil Hamed

24 Fuzzy PID Control To implement fuzzy PID control on the computer, one first needs a digital version of analog one. Discretization of PID controller: To digitize the analog controller, the following can be used: Basil Hamed

25 Fuzzy PID Control In digital controllers, the equation must be approximated. Replacing the derivative term by a backward difference and the integral by a sum using rectangular integration, and given a constant – preferably small – sampling time Ts , the simplest approximation is, Index n refers to the time instant. By tuning we shall mean the activity of adjusting the parameters Kp, Ti , and Td in order to achieve a good closed-loop performance. Basil Hamed

26 Example Basil Hamed

27 Example Basil Hamed

28 Example Basil Hamed

29 Example Basil Hamed

30 Example Simulation result are shown , where red is system output, and green is error signal Basil Hamed

31 Supervisory Control Systems
Human operators in the process industry are faced with nonlinear and time-varying behaviour, many inner loops, and much interaction between the control loops. Owing to sheer complexity it is impossible, or at least very expensive, to build a mathematical model of the plant, and furthermore the control is normally a combination of sequential, parallel, and feedback control actions. Operators, however, are able to control complicated plants using their experience and training, and thus fuzzy control is a relevant method within supervisory control. Basil Hamed

32 Supervisory Control Systems
Supervisory control is a multilayer (hierarchical) controller with the supervisor at the highest level, as shown in Figure Basil Hamed

33 Supervisory Control Systems
The supervisor can use any available data from the control system to characterize the system’s current behavior so that it knows how to change the controller and ultimately achieve the desired specifications. In addition, the supervisor can be used to integrate other information into the control decision-making process. It can incorporate certain user inputs, or inputs from other subsystems. Supervisory control is a type of adaptive control since it seeks to observe the current behavior of the control system and modify the controller to improve the performance Basil Hamed

34 Supervisory Control Systems
For example, in an automotive cruise control problem, inputs from the driver (user) may indicate that she or he wants the cruise controller to operate either like a sports car or more like a sluggish family car. The other subsystem information that a supervisor could incorporate for supervisory control for an automotive cruise control application could include data from the engine that would help integrate the controls on the vehicle (i.e., engine and cruise control integration). Given information of this type, the supervisor can seek to tune the controller to achieve higher performance operation or a performance that is more to the liking of the driver. Basil Hamed

35 Supervisory Control Systems
Conceptually, the design of the supervisory controller can then proceed in the same manner as it did for direct fuzzy controllers: either via the gathering of heuristic control knowledge or via training data that we gather from an experiment. The form of the knowledge or data is, however, somewhat different than in the simple fuzzy control problem. Basil Hamed

36 Supervisory Control Systems
the type of heuristic knowledge that is used in a supervisor may take one of the following two forms: 1. Information from a human control system operator who observes the behavior of an existing control system (often a conventional control system) and knows how this controller should be tuned under various operating conditions. 2. Information gathered by a control engineer who knows that under different operating conditions controller parameters should be tuned according to certain rules. Basil Hamed

37 High-level control configurations
Fuzzy controllers are combined with other controllers in various configurations. The PID block consists of independent or coupled PID loops, and the fuzzy block employs a high-level control strategy. Normally, both the PID and the fuzzy blocks have more than one input and one output. Basil Hamed

38 Supervisory Fuzzy Control
There are four types of Fuzzy supervisory control: Fuzzy replaces PID Fuzzy replaces operator Fuzzy adjusts PID parameters Fuzzy adds to PID control Basil Hamed

39 Fuzzy replaces PID In this configuration, the operator may select between a high-level control strategy and conventional control loops. The operator has to decide which of the two most likely produces the best control performance. Basil Hamed

40 Fuzzy replaces operator
This configuration represents the original high level control idea, where manual control carried out by a human operator is replaced by automatic control. Normally, the existing control loops are still active, and the high-level control strategy makes adjustments of the controller set points in the same way as the operator does. Again it is up to the operator to decide whether manual or automatic control will result in the best possible operation of the process, which, of course, may create conflicts. Basil Hamed

41 Fuzzy replaces operator
Basil Hamed

42 Fuzzy adjusts PID parameters
In this configuration, the high-level strategy adjusts the parameters of the conventional control loops. A common problem with linear PID control of highly nonlinear processes is that the set of controller parameters are satisfactory only when the process is within a narrow operational window. Outside this, it is necessary to use other parameters or set points, and these adjustments may be done automatically by a high-level strategy. Basil Hamed

43 Fuzzy adjusts PID parameters
Basil Hamed

44 Fuzzy adds to PID control
Normally, control systems based on PID controllers are capable of controlling the process when the operation is steady and close to normal conditions. However, if sudden changes occur, or if the process enters abnormal states, then the configuration may be applied to bring the process back to normal operation as fast as possible. For normal operation, the fuzzy contribution is zero, whereas the PID outputs are compensated in abnormal situations, often referred to as abnormal situation management (ASM). Basil Hamed

45 Fuzzy adds to PID control
Basil Hamed

46 Example Design of Self Tuning PID Controller Using Fuzzy Logic for DC Motor Speed International Journal of Social Science and Technology Vol. 2 No. 4; August 2017 DC Motor Mathematical Model Basil Hamed

47 Example The overall transfer function Basil Hamed

48 Example PID Controller (Ziegler-Nichols)
PID controllers are tuned in terms of Kp, KI and KD. Ziegler-Nichols is a type of controller tuning. Basil Hamed

49 Example kp is then increased (from zero) until it reaches the ultimate gain ku, at which the output of the control loop has stable and consistent oscillations. ku and the oscillation period Tu are used to set the P, I, and D gains depending on the type of controller used Basil Hamed

50 Example Fuzzy Logic Controller Basil Hamed

51 Example Basil Hamed

52 Example Fuzzy-PID Controller Basil Hamed

53 Example Basil Hamed

54 Example Basil Hamed

55 Example Title PID Fuzzy Fuzzy PID Peak Time (s) .0742 .25 .29
% overshoot 48.3 4.5 Settling time .571 .36 .2 Rise time .03 .15 .11 Basil Hamed

56 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Intelligent Control and Automation, 2011 Basil Hamed, Moayed Almobaied DC Motor Basil Hamed

57 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Basil Hamed

58 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Controllers Design: PID Controller It’s required to build a digital PID controller in the FPGA card. There are many approaches are available to convert from analogue to digital. In this proper we used the Tus- tin approach. The equation which represents the PID controller is: Basil Hamed

59 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Field Programmable Gate Arrays (FPGAs) FPGAs shown in Figure 5, stands for Field Programma- ble Gate Arrays are one type of programmable logic de- vices (PLDs). It is based on an integrated circuit that can be configured by the user in order to implement digital logic functions of varying complexities. FPGAs can be very effectively used for control purposes in processes demanding very high loop cycle time. One of the funda- mental advantage of FPGA over DSP or other micro- processors is the freedom of programming parallelism Basil Hamed

60 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Basil Hamed

61 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Fuzzy Logic Controller “FLC” FLC has been constructed Using VHDL and embedded PicoBalze processor in FPGA. The block diagram for the FLC for the DC motor is shown in Figure 11. FLC has two inputs, which are: Error (E) and the Error change (CE), and one output feeding to the plant speed register of the PWM. Basil Hamed

62 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Figure 12 illustrates the method used in reaching the desired speed value. For example, at stage A the Error is positive (desired speed –actual speed) and the Change Error (Error - last Error) is negative, which mean that the response is heading in the right di- rection; hence, the FLC will go forward in this direction. Using the same criteria at stage B, the Error is negative and CE is big negative; hence, the response is heading in wrong direction so FLC will change its direction to enter Stage C, until reaching the desired speed. Basil Hamed

63 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Basil Hamed

64 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Fuzzy Logic Controller “FLC” Basil Hamed

65 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
A complete de- sign of the system is shown in Figure 19. The Fuzzy sets for the output: Kp, Ki, and Kd is shown in Figure 20, practically there are three different Fuzzy sets for these parameters. The inputs of the controller used are the error and change of error as presented in the previous section. Basil Hamed

66 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Table 3 presents the base rules of Fuzzy-PID control- ler (Kp). Practically there are three base rules tables for Kp, Ki, and Kd Basil Hamed

67 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Simulink block diagram for the Fuzzy-PID speed con- troller for DC motor is shown in Figure 21. Basil Hamed

68 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Results Comparison Basil Hamed

69 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
All three controllers presented in this paper are implemented in hardware using the FPGA card; then these controllers have been tested with real time experiments. An auxiliary program in the FPGA is implemented to test the step response of these controllers. Then our program displays the results on the LCD using the PicoBlaze processor technique as a real time tester the desired speed, the overshoot, the settling time, and the PID parameters for each controller as shown in Figures 23 and 24. Basil Hamed

70 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
Modelsim Results Basil Hamed

71 Fuzzy PID Controllers Using FPGA Technique for Real Time DC Motor Speed Control
The control scheme was modeled and designed in VHDL. It was simulated and synthesized using the Xilinx Foundation package and implemented into a Xilinx Spartan 3-A FPGA (Figure 27). Basil Hamed


Download ppt "Lect 6 Fuzzy PID Controller Basil Hamed Islamic University of Gaza"

Similar presentations


Ads by Google