dc motor speed control

22
Design and Implementation of Real Time C Motor Speed Control using Fuzzy Logi Waleed Abd El- Megeed El- Badry Mechatronics Department Faculty of Engineering Misr University for Science & Technology [email protected] Microsoft ® C E R T I F I E D Professional Developer

Upload: waleed-el-badry

Post on 03-Jun-2015

4.576 views

Category:

Education


4 download

TRANSCRIPT

Page 1: Dc motor speed control

Design and Implementation of Real TimeDC Motor Speed Control using Fuzzy Logic

Waleed Abd El- Megeed El- BadryMechatronics Department

Faculty of EngineeringMisr University for Science & Technology

[email protected]®

C E R T I F I E DProfessional Developer

Page 2: Dc motor speed control

Agenda

Motivation

Project Outlines

Briefed Introduction

Work Carried Out

Results and Conclusion

Page 3: Dc motor speed control

Project Motivation

Page 4: Dc motor speed control

Mechatronics

Engineering

Electronics

Control

Computer Science

Mechanical

Signal Conditioning

Friction, Coupling and Torque

Fuzzy Logic Controller

InterfacingProgramming

Page 5: Dc motor speed control

Project Outlines

Page 6: Dc motor speed control

Traditional MethodBased on Linear model of DC Motor

Source: Mo-Yuen Chow, ”Fuzzy Logic Microcontroller Implementation for DC Motor Speed Control”

Page 7: Dc motor speed control

Source: http://www.Fuzzy-Logic.com

Page 8: Dc motor speed control

Conceptual

Design

Coupling

Fuzzification

Knowledge Base

DefuzzificationFuzzy Rules

D/A A/DM T

Page 9: Dc motor speed control

Closer Look….

DC Motor-Tachometer Specification:24V DC180 RPM1.5 A

NI USB 600812 Bits, 200Ks/S A/D Converter (0-10V)12 Bits, D/A Converter (0-5V)

Page 10: Dc motor speed control

Closer Look….

Page 11: Dc motor speed control

Closer Look….

BJT Amplifier• Sourcing Current Up to 10 A•Withstand Collector Voltage up to 100V

Major Drawback:Nonlinearity

Q1TIP4143%

From USB 6008

+12V

Page 12: Dc motor speed control

Closer Look….

Page 13: Dc motor speed control

Software Programming

Page 14: Dc motor speed control

Fuzzy Logic in .NET

• Designing a fuzzy logic class library was key objective• Visual Studio proved to be a better performing language for real time applications.• Object Orientation facilitates software design.•.NET framework has rich library that developers can utilize from any language in VS family (C#, VB and VC++)

Microsoft®

Visual Studio 2008

Page 15: Dc motor speed control

Library ArchitectureFuzzy System

•Mamdani•Sugeno

Fuzzy Variable•Input•Output

Fuzzy Term

TriangularTrapezoidal

Range

Name

Name

Range

Name

Range

Page 16: Dc motor speed control

Fuzzy Variables & Terms 'Declaration of Fuzzy System Dim fsSpeedControl As New MamdaniFuzzySystem Dim fvSpeed As New FuzzyVariable("Speed", 0.0, 1.0) Dim fvOutputVoltage As New FuzzyVariable("OutputVoltage", 0.0, 1.0)

'Fuzzification of Speed 'Input Speed Fuzzy Terms fvSpeed.Terms.Add(New FuzzyTerm("VerySlow", New TrapezoidMembershipFunction(0.0, 0.0, 0.3, 0.4))) fvSpeed.Terms.Add(New FuzzyTerm("Slow", New TriangularMembershipFunction(0.3, 0.4, 0.5))) fvSpeed.Terms.Add(New FuzzyTerm("AboutRight", New TriangularMembershipFunction(0.4, 0.5, 0.6))) fvSpeed.Terms.Add(New FuzzyTerm("Fast", New TriangularMembershipFunction(0.5, 0.6, 0.7))) fvSpeed.Terms.Add(New FuzzyTerm("VeryFast", New TrapezoidMembershipFunction(0.6, 0.7, 1.0, 1.0))) fsSpeedControl.Input.Add(fvSpeed)

'Fuzzification of Output Voltage 'Output Voltage Fuzzy Terms fvOutputVoltage.Terms.Add(New FuzzyTerm("SpeedUp", New TrapezoidMembershipFunction(0.6, 0.7, 1.0, 1.0))) fvOutputVoltage.Terms.Add(New FuzzyTerm("SlightlySpeedUp", New TriangularMembershipFunction(0.5, 0.6, 0.7))) fvOutputVoltage.Terms.Add(New FuzzyTerm("NoChange", New TriangularMembershipFunction(0.4, 0.5, 0.6))) fvOutputVoltage.Terms.Add(New FuzzyTerm("SlightlySlowDown", New TriangularMembershipFunction(0.3, 0.4, 0.5))) fvOutputVoltage.Terms.Add(New FuzzyTerm("SlowDown", New TrapezoidMembershipFunction(0.0, 0.0, 0.3, 0.4))) fsSpeedControl.Output.Add(fvOutputVoltage)

Page 17: Dc motor speed control

Fuzzy Variables & Terms

Page 18: Dc motor speed control

Fuzzy Rules

Dim Rule1 = fsSpeedControl.ParseRule("if (Speed is VerySlow) then (OutputVoltage is SpeedUp)")Dim Rule2 = fsSpeedControl.ParseRule("if (Speed is Slow) then (OutputVoltage is SlightlySpeedUp)")Dim Rule3 = fsSpeedControl.ParseRule("if (Speed is AboutRight) then (OutputVoltage is NoChange)")Dim Rule4 = fsSpeedControl.ParseRule("if (Speed is Fast) then (OutputVoltage is SlightlySlowDown)")Dim Rule5 = fsSpeedControl.ParseRule("if (Speed is VeryFast) then (OutputVoltage is SlowDown)")

Page 19: Dc motor speed control

DemoTerm Paper Evaluation

Page 20: Dc motor speed control

Results

Page 21: Dc motor speed control

Screenshot from project

Page 22: Dc motor speed control

QUESTIONS ?