SlideShare a Scribd company logo
Microcontroller – Based digitalMicrocontroller – Based digital
control of DC - motorcontrol of DC - motor
University of GaryounisUniversity of Garyounis
Faculty of EngineeringFaculty of Engineering
Electrical and Electronic Engineering DepartmentElectrical and Electronic Engineering Department
Project objectivesProject objectives
Modeling of separately excited DC motorModeling of separately excited DC motor
Control design and simulationControl design and simulation
Physical implementationPhysical implementation
Modeling of separately excited DC motorModeling of separately excited DC motor
Determination of electrical specificationsDetermination of electrical specifications
A
-
+
12
1 O h m
21
V 8
D C = 5 V
T o O s c i l l o s c o p e
RRaa = 3.1 ohm L= 3.1 ohm Laa = 0.822 Henry= 0.822 Henry
Determination of Mechanical specificationsDetermination of Mechanical specifications
Rotor moment of inertiaRotor moment of inertia
Viscous frictionViscous friction
Tm(S)Ia(S)
1/ (LaS + Ra) 1/ (JmS + Bm)
Kb
Kt
-TL(S)
Ω m(S)Ea(s)
-Eb(s)
++
JJmm= 0.04307 kg.m2 B= 0.04307 kg.m2 Bmm = 7.868 x 10-4 N.m/(rad/sec)= 7.868 x 10-4 N.m/(rad/sec)
KKbb= 0.46 Volt/(rad/sec)= 0.46 Volt/(rad/sec) KKtt= 0.46 N.m/A.Wb= 0.46 N.m/A.Wb
Project objectivesProject objectives
Modeling of separately excited DC motorModeling of separately excited DC motor
Control design and simulationControl design and simulation
Control design and simulationControl design and simulation
Current controller designCurrent controller design
Speed controller designSpeed controller design
Current Controller DesignCurrent Controller Design
Freq domain specificationsFreq domain specifications
Gain crossover freq = 10 rad/sec Phase margin = 60 degGain crossover freq = 10 rad/sec Phase margin = 60 deg
-40
-35
-30
-25
-20
-15
-10
-5
0
Magnitude(dB)
10
-1
10
0
10
1
10
2
-90
-45
0
Phase(deg)
Frequency (rad/sec)
UncompensatedSystemUncompensatedSystem
Corner frequency 1 Rad/SecCorner frequency 1 Rad/Sec
CompensatedSystemCompensatedSystem
Current Controller DesignCurrent Controller Design
Frequency (rad/sec)
-50
0
50
Magnitude(dB)
10
-1
10
0
10
1
10
2
10
3
-130
-120
-110
-100
-90
Phase(deg)
Corner frequency 10 Rad/SecCorner frequency 10 Rad/Sec
Phase Margin = 60 degreePhase Margin = 60 degree
Current Controller DesignCurrent Controller Design
Step response of current controllerStep response of current controller
0 0.2 0.4 0.6 0.8 1 1.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Time (sec)
Amplitude
Control design and simulationControl design and simulation
Current controller designCurrent controller design
Speed controller designSpeed controller design
-60
-40
-20
0
20
40
Magnitude(dB)
10
0
10
1
10
2
-225
-180
-135
-90
Phase(deg)
Bode Diagram
Frequency (rad/sec)
Speed Controller DesignSpeed Controller Design
Corner frequency 10 Rad/SecCorner frequency 10 Rad/Sec
UncompensatedSystemUncompensatedSystem
Gain Margin = 17.5 dBGain Margin = 17.5 dB
Phase Margin = 27.5 degreePhase Margin = 27.5 degree
Freq domain specificationsFreq domain specifications
Gain crossover freq = 4 rad/sec Phase margin = 60 degGain crossover freq = 4 rad/sec Phase margin = 60 deg
Bode Diagram
Frequency (rad/sec)10
-2
10
-1
10
0
10
1
10
2
-225
-180
-135
-90
Phase(deg)
-100
-50
0
50
100Magnitude(dB)
Speed Controller DesignSpeed Controller Design
Corner frequency 4 Rad/SecCorner frequency 4 Rad/Sec
CompensatedSystemCompensatedSystem
Phase Margin = 70 degreePhase Margin = 70 degree
Speed Controller DesignSpeed Controller Design
Project objectivesProject objectives
Modeling of separately excited DC motorModeling of separately excited DC motor
Control design and simulationControl design and simulation
Physical implementationPhysical implementation
Physical implementation: Hardware DesignPhysical implementation: Hardware Design
General Block Diagram of Hardware DesignGeneral Block Diagram of Hardware Design
DC SourceDC SourceDC SourceDC Source
InterfaceInterfaceInterfaceInterface DC ChopperDC ChopperDC ChopperDC Chopper DC MotorDC MotorDC MotorDC MotorDPWMDPWMDPWMDPWM
MeasurementsMeasurementsMeasurementsMeasurements
Firmware DesignFirmware Design
Start up & Initialize PeripheralsStart up & Initialize Peripherals
PWMPWM
Soft UARTSoft UART
A / DA / D
Start up & Initialize PeripheralsStart up & Initialize Peripherals
PWMPWM
Soft UARTSoft UART
A / DA / D
Wait the HostWait the Host
CommandCommand
Wait the HostWait the Host
CommandCommand
General block diagramGeneral block diagram
Main control programMain control program
Change Reference SpeedChange Reference Speed
Change Reference SpeedChange Reference Speed
PI-Speed ControllerPI-Speed Controller
PI-Speed ControllerPI-Speed Controller
PI-Current ControllerPI-Current Controller
PI-Current ControllerPI-Current Controller
Digital PW-ModulatorDigital PW-Modulator
Digital PW-ModulatorDigital PW-Modulator
RS-232 CommunicationRS-232 Communication
RS-232 CommunicationRS-232 Communication
Ref ChangeRef Change
Ref ChangeRef Change
NONONONO
STARTSTART
STARTSTART
YESYES
YESYES
Firmware flow chartFirmware flow chart
Software Design
Start MotorStart Motor
STARTSTART
Do EventsDo Events
Packet ReceivedPacket Received
Packet ProcessPacket Process
PacketPacket
TypeType
speedspeed
CurrentCurrent
Display currentDisplay current
signal on Excel sheetsignal on Excel sheet
Display speed signalDisplay speed signal
on Excel sheeton Excel sheet
Wait on next packetWait on next packet
Overall Design & System Operation
DC supplyDC supply
DC MotorDC Motor
Power MOSSFETPower MOSSFET
FreeFree
WheelingWheeling
DiodeDiode
Current TransducerCurrent TransducerSpeed Signal conditioningSpeed Signal conditioning
Current Signal conditioningCurrent Signal conditioning
PIC16F877APIC16F877A
RS232RS232
DutyDuty
InterfaceInterface
FloatingFloating
SupplySupply
VVgsgs
-20
0
20
40
60
80
100
0 2 4 6 8 10
Time (sec)
Speed(Rad/Sec)
Motor Speed
Set Point
Video 1Video 1
Video 2Video 2
BACKUPBACKUP

More Related Content

Similar to Presentation1

Advanced motion controls dzxcante 040l080
Advanced motion controls dzxcante 040l080Advanced motion controls dzxcante 040l080
Advanced motion controls dzxcante 040l080
Electromate
 
Advanced motion controls dzxcante 015l080
Advanced motion controls dzxcante 015l080Advanced motion controls dzxcante 015l080
Advanced motion controls dzxcante 015l080
Electromate
 
Advanced motion controls dzxcante 008l080
Advanced motion controls dzxcante 008l080Advanced motion controls dzxcante 008l080
Advanced motion controls dzxcante 008l080
Electromate
 
Challenges of Parallel Simulation of Power Systems_english
Challenges of Parallel Simulation of Power Systems_englishChallenges of Parallel Simulation of Power Systems_english
Challenges of Parallel Simulation of Power Systems_english
OPAL-RT TECHNOLOGIES
 
Electrocraft drive selection_guide_catalog
Electrocraft drive selection_guide_catalogElectrocraft drive selection_guide_catalog
Electrocraft drive selection_guide_catalog
Electromate
 
Advanced motion controls dprnlie 100a400
Advanced motion controls dprnlie 100a400Advanced motion controls dprnlie 100a400
Advanced motion controls dprnlie 100a400
Electromate
 
24 cnc machine feedback devices
24 cnc machine feedback devices24 cnc machine feedback devices
24 cnc machine feedback devices
Jupira Silva
 
Advanced motion controls dzcante 060l080
Advanced motion controls dzcante 060l080Advanced motion controls dzcante 060l080
Advanced motion controls dzcante 060l080
Electromate
 
Advanced motion controls dpcantr 025b200
Advanced motion controls dpcantr 025b200Advanced motion controls dpcantr 025b200
Advanced motion controls dpcantr 025b200
Electromate
 
Advanced motion controls dpcanie 060a800
Advanced motion controls dpcanie 060a800Advanced motion controls dpcanie 060a800
Advanced motion controls dpcanie 060a800
Electromate
 
Advanced motion controls dpcantr 015b200
Advanced motion controls dpcantr 015b200Advanced motion controls dpcantr 015b200
Advanced motion controls dpcantr 015b200
Electromate
 
Advanced motion controls dzcante 010l200
Advanced motion controls dzcante 010l200Advanced motion controls dzcante 010l200
Advanced motion controls dzcante 010l200
Electromate
 
Advanced motion controls dpcanir c060a400
Advanced motion controls dpcanir c060a400Advanced motion controls dpcanir c060a400
Advanced motion controls dpcanir c060a400
Electromate
 
Advanced motion controls dpcantr 020b080
Advanced motion controls dpcantr 020b080Advanced motion controls dpcantr 020b080
Advanced motion controls dpcantr 020b080
Electromate
 
Advanced motion controls dprnlie 030a400
Advanced motion controls dprnlie 030a400Advanced motion controls dprnlie 030a400
Advanced motion controls dprnlie 030a400
Electromate
 
Advanced motion controls dpranir 060a800
Advanced motion controls dpranir 060a800Advanced motion controls dpranir 060a800
Advanced motion controls dpranir 060a800
Electromate
 
Advanced motion controls dprahie 100a400
Advanced motion controls dprahie 100a400Advanced motion controls dprahie 100a400
Advanced motion controls dprahie 100a400
Electromate
 
Advanced motion controls dprnlie 015s400
Advanced motion controls dprnlie 015s400Advanced motion controls dprnlie 015s400
Advanced motion controls dprnlie 015s400
Electromate
 
Advanced motion controls dpcania 030a800
Advanced motion controls dpcania 030a800Advanced motion controls dpcania 030a800
Advanced motion controls dpcania 030a800
Electromate
 
Advanced motion controls dpcantr 040b080
Advanced motion controls dpcantr 040b080Advanced motion controls dpcantr 040b080
Advanced motion controls dpcantr 040b080
Electromate
 

Similar to Presentation1 (20)

Advanced motion controls dzxcante 040l080
Advanced motion controls dzxcante 040l080Advanced motion controls dzxcante 040l080
Advanced motion controls dzxcante 040l080
 
Advanced motion controls dzxcante 015l080
Advanced motion controls dzxcante 015l080Advanced motion controls dzxcante 015l080
Advanced motion controls dzxcante 015l080
 
Advanced motion controls dzxcante 008l080
Advanced motion controls dzxcante 008l080Advanced motion controls dzxcante 008l080
Advanced motion controls dzxcante 008l080
 
Challenges of Parallel Simulation of Power Systems_english
Challenges of Parallel Simulation of Power Systems_englishChallenges of Parallel Simulation of Power Systems_english
Challenges of Parallel Simulation of Power Systems_english
 
Electrocraft drive selection_guide_catalog
Electrocraft drive selection_guide_catalogElectrocraft drive selection_guide_catalog
Electrocraft drive selection_guide_catalog
 
Advanced motion controls dprnlie 100a400
Advanced motion controls dprnlie 100a400Advanced motion controls dprnlie 100a400
Advanced motion controls dprnlie 100a400
 
24 cnc machine feedback devices
24 cnc machine feedback devices24 cnc machine feedback devices
24 cnc machine feedback devices
 
Advanced motion controls dzcante 060l080
Advanced motion controls dzcante 060l080Advanced motion controls dzcante 060l080
Advanced motion controls dzcante 060l080
 
Advanced motion controls dpcantr 025b200
Advanced motion controls dpcantr 025b200Advanced motion controls dpcantr 025b200
Advanced motion controls dpcantr 025b200
 
Advanced motion controls dpcanie 060a800
Advanced motion controls dpcanie 060a800Advanced motion controls dpcanie 060a800
Advanced motion controls dpcanie 060a800
 
Advanced motion controls dpcantr 015b200
Advanced motion controls dpcantr 015b200Advanced motion controls dpcantr 015b200
Advanced motion controls dpcantr 015b200
 
Advanced motion controls dzcante 010l200
Advanced motion controls dzcante 010l200Advanced motion controls dzcante 010l200
Advanced motion controls dzcante 010l200
 
Advanced motion controls dpcanir c060a400
Advanced motion controls dpcanir c060a400Advanced motion controls dpcanir c060a400
Advanced motion controls dpcanir c060a400
 
Advanced motion controls dpcantr 020b080
Advanced motion controls dpcantr 020b080Advanced motion controls dpcantr 020b080
Advanced motion controls dpcantr 020b080
 
Advanced motion controls dprnlie 030a400
Advanced motion controls dprnlie 030a400Advanced motion controls dprnlie 030a400
Advanced motion controls dprnlie 030a400
 
Advanced motion controls dpranir 060a800
Advanced motion controls dpranir 060a800Advanced motion controls dpranir 060a800
Advanced motion controls dpranir 060a800
 
Advanced motion controls dprahie 100a400
Advanced motion controls dprahie 100a400Advanced motion controls dprahie 100a400
Advanced motion controls dprahie 100a400
 
Advanced motion controls dprnlie 015s400
Advanced motion controls dprnlie 015s400Advanced motion controls dprnlie 015s400
Advanced motion controls dprnlie 015s400
 
Advanced motion controls dpcania 030a800
Advanced motion controls dpcania 030a800Advanced motion controls dpcania 030a800
Advanced motion controls dpcania 030a800
 
Advanced motion controls dpcantr 040b080
Advanced motion controls dpcantr 040b080Advanced motion controls dpcantr 040b080
Advanced motion controls dpcantr 040b080
 

Presentation1

  • 1. Microcontroller – Based digitalMicrocontroller – Based digital control of DC - motorcontrol of DC - motor University of GaryounisUniversity of Garyounis Faculty of EngineeringFaculty of Engineering Electrical and Electronic Engineering DepartmentElectrical and Electronic Engineering Department
  • 2. Project objectivesProject objectives Modeling of separately excited DC motorModeling of separately excited DC motor Control design and simulationControl design and simulation Physical implementationPhysical implementation
  • 3. Modeling of separately excited DC motorModeling of separately excited DC motor Determination of electrical specificationsDetermination of electrical specifications A - + 12 1 O h m 21 V 8 D C = 5 V T o O s c i l l o s c o p e RRaa = 3.1 ohm L= 3.1 ohm Laa = 0.822 Henry= 0.822 Henry
  • 4. Determination of Mechanical specificationsDetermination of Mechanical specifications Rotor moment of inertiaRotor moment of inertia Viscous frictionViscous friction Tm(S)Ia(S) 1/ (LaS + Ra) 1/ (JmS + Bm) Kb Kt -TL(S) Ω m(S)Ea(s) -Eb(s) ++ JJmm= 0.04307 kg.m2 B= 0.04307 kg.m2 Bmm = 7.868 x 10-4 N.m/(rad/sec)= 7.868 x 10-4 N.m/(rad/sec) KKbb= 0.46 Volt/(rad/sec)= 0.46 Volt/(rad/sec) KKtt= 0.46 N.m/A.Wb= 0.46 N.m/A.Wb
  • 5. Project objectivesProject objectives Modeling of separately excited DC motorModeling of separately excited DC motor Control design and simulationControl design and simulation
  • 6. Control design and simulationControl design and simulation Current controller designCurrent controller design Speed controller designSpeed controller design
  • 7. Current Controller DesignCurrent Controller Design Freq domain specificationsFreq domain specifications Gain crossover freq = 10 rad/sec Phase margin = 60 degGain crossover freq = 10 rad/sec Phase margin = 60 deg -40 -35 -30 -25 -20 -15 -10 -5 0 Magnitude(dB) 10 -1 10 0 10 1 10 2 -90 -45 0 Phase(deg) Frequency (rad/sec) UncompensatedSystemUncompensatedSystem Corner frequency 1 Rad/SecCorner frequency 1 Rad/Sec
  • 8. CompensatedSystemCompensatedSystem Current Controller DesignCurrent Controller Design Frequency (rad/sec) -50 0 50 Magnitude(dB) 10 -1 10 0 10 1 10 2 10 3 -130 -120 -110 -100 -90 Phase(deg) Corner frequency 10 Rad/SecCorner frequency 10 Rad/Sec Phase Margin = 60 degreePhase Margin = 60 degree
  • 9. Current Controller DesignCurrent Controller Design Step response of current controllerStep response of current controller 0 0.2 0.4 0.6 0.8 1 1.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 Time (sec) Amplitude
  • 10. Control design and simulationControl design and simulation Current controller designCurrent controller design Speed controller designSpeed controller design
  • 11. -60 -40 -20 0 20 40 Magnitude(dB) 10 0 10 1 10 2 -225 -180 -135 -90 Phase(deg) Bode Diagram Frequency (rad/sec) Speed Controller DesignSpeed Controller Design Corner frequency 10 Rad/SecCorner frequency 10 Rad/Sec UncompensatedSystemUncompensatedSystem Gain Margin = 17.5 dBGain Margin = 17.5 dB Phase Margin = 27.5 degreePhase Margin = 27.5 degree Freq domain specificationsFreq domain specifications Gain crossover freq = 4 rad/sec Phase margin = 60 degGain crossover freq = 4 rad/sec Phase margin = 60 deg
  • 12. Bode Diagram Frequency (rad/sec)10 -2 10 -1 10 0 10 1 10 2 -225 -180 -135 -90 Phase(deg) -100 -50 0 50 100Magnitude(dB) Speed Controller DesignSpeed Controller Design Corner frequency 4 Rad/SecCorner frequency 4 Rad/Sec CompensatedSystemCompensatedSystem Phase Margin = 70 degreePhase Margin = 70 degree
  • 13. Speed Controller DesignSpeed Controller Design
  • 14. Project objectivesProject objectives Modeling of separately excited DC motorModeling of separately excited DC motor Control design and simulationControl design and simulation Physical implementationPhysical implementation
  • 15. Physical implementation: Hardware DesignPhysical implementation: Hardware Design General Block Diagram of Hardware DesignGeneral Block Diagram of Hardware Design DC SourceDC SourceDC SourceDC Source InterfaceInterfaceInterfaceInterface DC ChopperDC ChopperDC ChopperDC Chopper DC MotorDC MotorDC MotorDC MotorDPWMDPWMDPWMDPWM MeasurementsMeasurementsMeasurementsMeasurements
  • 16. Firmware DesignFirmware Design Start up & Initialize PeripheralsStart up & Initialize Peripherals PWMPWM Soft UARTSoft UART A / DA / D Start up & Initialize PeripheralsStart up & Initialize Peripherals PWMPWM Soft UARTSoft UART A / DA / D Wait the HostWait the Host CommandCommand Wait the HostWait the Host CommandCommand General block diagramGeneral block diagram
  • 17. Main control programMain control program Change Reference SpeedChange Reference Speed Change Reference SpeedChange Reference Speed PI-Speed ControllerPI-Speed Controller PI-Speed ControllerPI-Speed Controller PI-Current ControllerPI-Current Controller PI-Current ControllerPI-Current Controller Digital PW-ModulatorDigital PW-Modulator Digital PW-ModulatorDigital PW-Modulator RS-232 CommunicationRS-232 Communication RS-232 CommunicationRS-232 Communication Ref ChangeRef Change Ref ChangeRef Change NONONONO STARTSTART STARTSTART YESYES YESYES Firmware flow chartFirmware flow chart
  • 18. Software Design Start MotorStart Motor STARTSTART Do EventsDo Events Packet ReceivedPacket Received Packet ProcessPacket Process PacketPacket TypeType speedspeed CurrentCurrent Display currentDisplay current signal on Excel sheetsignal on Excel sheet Display speed signalDisplay speed signal on Excel sheeton Excel sheet Wait on next packetWait on next packet
  • 19. Overall Design & System Operation DC supplyDC supply DC MotorDC Motor Power MOSSFETPower MOSSFET FreeFree WheelingWheeling DiodeDiode Current TransducerCurrent TransducerSpeed Signal conditioningSpeed Signal conditioning Current Signal conditioningCurrent Signal conditioning PIC16F877APIC16F877A RS232RS232 DutyDuty InterfaceInterface FloatingFloating SupplySupply VVgsgs
  • 20. -20 0 20 40 60 80 100 0 2 4 6 8 10 Time (sec) Speed(Rad/Sec) Motor Speed Set Point