Improving A PID Controller Using Fuzzy Logic Andrew

  • Slides: 29
Download presentation
Improving A PID Controller Using Fuzzy Logic Andrew Thompson Ni Li Ara Tchobanian Professor:

Improving A PID Controller Using Fuzzy Logic Andrew Thompson Ni Li Ara Tchobanian Professor: Riadh Habash TA: Hanliu Chen

Problem • Although PID controllers are able to provide adequate control for simple systems,

Problem • Although PID controllers are able to provide adequate control for simple systems, they are unable to compensate for disturbances. • We will use Fuzzy Logic controllers to improve the PID controllers ability to handle disturbances.

Hypothesis • We feel like all the designs for the fuzzy compensator will be

Hypothesis • We feel like all the designs for the fuzzy compensator will be an improvement upon the PID controller and will have greater ability to deal with disturbances.

IEEE Papers

IEEE Papers

Group Contribution • Andrew Thompson: – Research and development of Fuzzy precompensator design and

Group Contribution • Andrew Thompson: – Research and development of Fuzzy precompensator design and rules – Research and development of PID Controller • Ni Li: – Research and development of various Fuzzy logic compensator (PD, PI) designs and rules • Ara Tchobanian: – Research and modeling of DC motor – Research and development of PID Controller

Procedure • We first needed to decide upon a system which we could control

Procedure • We first needed to decide upon a system which we could control using a PID controller as well as be able to introduce a disturbance. • We chose to model a basic DC motor.

DC Motor We used the following values for the model of the DC Motor

DC Motor We used the following values for the model of the DC Motor • moment of inertia of the rotor J = 0. 01 kg. m 2/s 2 • damping ratio of the mechanical system b = 0. 1 Nms • electromotive force constant K = 0. 01 Nm/Amp • electric resistance R = 1 ohm • electric inductance L = 0. 5 H • input V: Source Voltage • output Θ’: Speed of motor

DC Motor Model

DC Motor Model

Step 2 • We next had to design a PID controller to control the

Step 2 • We next had to design a PID controller to control the speed of the motor.

PID Controller • We wanted the PID controller to satisfy the following criteria: –

PID Controller • We wanted the PID controller to satisfy the following criteria: – Settling time less than 2 seconds – Overshoot less than 5% – Steady-state error less than 1% • By using trial and error, and examining the step response we obtained the following gains: • Kp = 100, Ki = 200, Kd = 10

PID Model

PID Model

Step 3 • The final step in the development of our controllers was to

Step 3 • The final step in the development of our controllers was to design various forms Fuzzy logic compensators in order to improve the performance of the PID controller and to allow it to account for the disturbance. • We designed three types of Fuzzy logic Compensators – Fuzzy PI – Fuzzy PD – Fuzzy Precompensated

Fuzzy logic Introduction Fuzzy logic is a problem-solving control system methodology that lends itself

Fuzzy logic Introduction Fuzzy logic is a problem-solving control system methodology that lends itself to implementation in systems ranging from simple, small, embedded microcontrollers to large, networked, multi-channel PC or workstation-based data acquisition and control systems. It can be implemented in hardware, software, or a combination of both. Inputs Rules Output

Fuzzy Precompensated PID Membership Functions, and Fuzzy Rule Sets

Fuzzy Precompensated PID Membership Functions, and Fuzzy Rule Sets

Surface and Rule Sets

Surface and Rule Sets

Fuzzy Precompensated PID Model

Fuzzy Precompensated PID Model

Fuzzy logic Equation for the fuzzy PI Kp*X + Ki*Y = Z The output

Fuzzy logic Equation for the fuzzy PI Kp*X + Ki*Y = Z The output for the fuzzy Y example input for Ki The gain for Ki X example input for Kp The gain for Kp

Membership functions for the PI component. Optical A) Low High L B) • •

Membership functions for the PI component. Optical A) Low High L B) • • (a) Input membership functions. (b) Output membership functions.

Fuzzy Logic Rules for the PI • • • The P is Low and

Fuzzy Logic Rules for the PI • • • The P is Low and I is Low then output is –R The P is Low and I is Optimal then output is –(R+S)/2 The P is Low and I is High then output is -S The P is Optimal and I is Low then output is (–R+S)/2 The P is Optimal and I is Optimal then output is 0 The P is Optimal and I is High then output is (R-S)/2 The P is High and I is Low then output is S The P is High and I is optimal then output is (R+S)/2 The P is High and I is High then output is R Where R=L 1*Ki+L 2*Kp S=L 2*Kp+L 1*Ki

Linear Fuzzy PI Control Table Output Low ( D) Optimal ( D ) High

Linear Fuzzy PI Control Table Output Low ( D) Optimal ( D ) High ( D ) Low ( P ) -R -(R+S)/2 -S Optimal ( P ) -(R-S)/2 0 (R-S)/2 High ( P ) S (R+S)/2 R Surface Viewer

Fuzzy PI Model

Fuzzy PI Model

Fuzzy PD Membership Functions

Fuzzy PD Membership Functions

Fuzzy PD Model

Fuzzy PD Model

Simulation Results Step Response PID Fuzzy PI Fuzzy Precompensated Fuzzy PD

Simulation Results Step Response PID Fuzzy PI Fuzzy Precompensated Fuzzy PD

Simulation Results Step Response with sine disturbance PID Fuzzy PI Fuzzy Precompensated Fuzzy PD

Simulation Results Step Response with sine disturbance PID Fuzzy PI Fuzzy Precompensated Fuzzy PD

Simulation Results Step Response with Gaussian Noise disturbance PID Fuzzy PI Fuzzy Precompensated Fuzzy

Simulation Results Step Response with Gaussian Noise disturbance PID Fuzzy PI Fuzzy Precompensated Fuzzy PD

Simulation Results Sine Input PID Fuzzy PI Fuzzy Precompensated Fuzzy PD

Simulation Results Sine Input PID Fuzzy PI Fuzzy Precompensated Fuzzy PD

Simulation Results Sine Input with sine disturbance PID Fuzzy PI Fuzzy Precompensated Fuzzy PD

Simulation Results Sine Input with sine disturbance PID Fuzzy PI Fuzzy Precompensated Fuzzy PD

Simulation Results Sine Response with Gaussian Noise disturbance PID Fuzzy PI Fuzzy Precompensated Fuzzy

Simulation Results Sine Response with Gaussian Noise disturbance PID Fuzzy PI Fuzzy Precompensated Fuzzy PD