dc motor speed control
TRANSCRIPT
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
C E R T I F I E DProfessional Developer
Agenda
Motivation
Project Outlines
Briefed Introduction
Work Carried Out
Results and Conclusion
Project Motivation
Mechatronics
Engineering
Electronics
Control
Computer Science
Mechanical
Signal Conditioning
Friction, Coupling and Torque
Fuzzy Logic Controller
InterfacingProgramming
Project Outlines
Traditional MethodBased on Linear model of DC Motor
Source: Mo-Yuen Chow, ”Fuzzy Logic Microcontroller Implementation for DC Motor Speed Control”
Source: http://www.Fuzzy-Logic.com
Conceptual
Design
Coupling
Fuzzification
Knowledge Base
DefuzzificationFuzzy Rules
D/A A/DM T
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)
Closer Look….
Closer Look….
BJT Amplifier• Sourcing Current Up to 10 A•Withstand Collector Voltage up to 100V
Major Drawback:Nonlinearity
Q1TIP4143%
From USB 6008
+12V
Closer Look….
Software Programming
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
Library ArchitectureFuzzy System
•Mamdani•Sugeno
Fuzzy Variable•Input•Output
Fuzzy Term
TriangularTrapezoidal
Range
Name
Name
Range
Name
Range
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)
Fuzzy Variables & Terms
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)")
DemoTerm Paper Evaluation
Results
Screenshot from project
QUESTIONS ?