Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Design of a Simulink-Based Control
Workstation for Mobile Wheeled Vehicles with
Variable-Velocity Differential Motor Drives
Kevin Block, Timothy De Pasion, Benjamin Roos, Alexander SchmidtGary Dempsey
Bradley University Electrical and Computer Engineering Department
April 5, 2016
Demonstration Outline
•Background and Overview•Motor Modeling and Cogging Torque•Simulink Modeling•Experimental Platform•Controller Development and Specifications•Graphical User Interface Design•Graphical User Interface Communication•Nonfunctional Requirements
2
Overview
What: Design and Implement Control Workstation with a Model-Based PID Controller that has Feed-Forward Compensation
How: Combination Simulink and Experimental Platform
Why: Future Control Algorithm Research, Development, and Testing at Bradley University
3
Overview
4Fig. 1 – High Level Block Diagram
Vehicle
5Fig. 2 – Theoretical Vehicle Design
Demonstration Outline
•Background and Overview•Motor Modeling and Cogging Torque•Simulink Modeling•Experimental Platform•Controller Development and Specifications•Graphical User Interface Design•Graphical User Interface Communication•Nonfunctional Requirements
6
Transient Motor Testing
•Settling Time Error = 96.7%
•Overshoot Error = 228.1%
•Steady-State Error = 56.6%
7
Simulink Vs Experimental Error
8Fig. 3 – Simulink Vs Experimental Step Waveform
RPM Motor Testing
9Fig. 4 – Simulink Vs Experimental Final Values
Cogging Torque Experimental Waveform
10Fig. 5 – Cogging Torque from Experimental
Cogging Torque Specification
•Cogging Torque Percent Error = 14.5%
11Fig. 6– Cogging Torque Span
Demonstration Outline
•Background and Overview•Motor Modeling and Cogging Torque•Simulink Modeling•Experimental Platform•Controller Development and Specifications•Graphical User Interface Design•Graphical User Interface Communication•Nonfunctional Requirements
12
High Level Block Diagram
13Fig. 7– High Level Block Diagram
Simulink System
14
Fig. 8– Simulink System Block Diagram
Simulink System
15
Fig. 9– Simulink System Block Diagram
Functions and Specifications
•Function: Model Accuracy
•Specification: Within ±20% for average error
16
H-Bridge: Average Error of 10.046%
17
Fig. 10– H-Bridge Average Error
Rotary Encoder: Average Error of 3.47%
18
Fig. 11– Rotary Encoder Average Error
PWM: Average Error of 0.24%
19
Fig. 12– PWM Average Error
Demonstration Outline
•Background and Overview•Motor Modeling and Cogging Torque•Simulink Modeling•Experimental Platform•Controller Development and Specifications•Graphical User Interface Design•Graphical User Interface Communication•Nonfunctional Requirements
20
Experimental Platform
21Fig. 13– High Level Block Diagram
Experimental Platform
22
Fig. 14– Experimental Platform Block Diagram
Generator Load Specification
•The DC generator loads shall be designed to mimic the prototype vehicle.
•Performance Specification:•Model within ±50% of the Simulink Model
•Settling Time Error•Overshoot Error•Steady-State Error•Average Absolute Error
23
Current Source Torque Disturbance Matching
24
Fig. 15– The Experimental Platform Disturbance Input should match that of the Simulink Model
Plant Inertia Differences Between Systems
•Simulink Vehicle and Motor Inertia:𝐽 = 5.28 ∙ 10−3 𝑘𝑔 𝑚2
•Experimental Platform Motor and Generator Inertia:𝐽 = 6.12 ∙ 10−6 𝑘𝑔 𝑚2
•Goal: Match Acceleration Based on𝑇𝑆𝐼𝑀𝐽𝑆𝐼𝑀
=𝑇𝐸𝑋𝑃𝐽𝐸𝑋𝑃
= 𝑎
𝑇 = 𝑁𝑒𝑡 𝑇𝑜𝑟𝑞𝑢𝑒𝐽 = 𝑀𝑜𝑚𝑒𝑛𝑡 𝑜𝑓 𝐼𝑛𝑒𝑟𝑡𝑖𝑎
𝑎 = 𝑟𝑜𝑡𝑎𝑡𝑖𝑜𝑛𝑎𝑙 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛
25
Generator Specification: Settling Time
26Fig. 16– Experimental Platform Open Loop Settling Time Error as compared to Simulink
Generator Specification: Overshoot
27Fig. 17– Experimental Platform Open Loop Overshoot Error as compared to Simulink
Generator Specification: Steady-State
28Fig. 18– Experimental Platform Open Loop Steady State Error as compared to Simulink
Generator : Average Absolute Error
29Fig. 19– Experimental Platform Absolute Error as compared to Simulink
Generator Load: Open Loop Response
30Fig. 21–Open Loop Response with Vin = 16v and Current Load = 0 A
Generator Load: Open Loop Response
31Fig. 22–Open Loop Response with Vin = 16v and Current Load = 1.5 A
Generator Load Specification
Experimental Platform Test Measurements:•Average Settling Time Error = 70.4%•Average Overshoot Error = Undefined•Average Steady-State Error = 24.6%•Average Absolute Error = 34.3%
•Spec has not been met for the Experimental Platform
32
Velocity Comparison
33
Fig. 23– Velocity Output Comparison
Position Comparison
34
Fig. 24– Vehicle Position Comparison
Zoomed Position Comparison
35
Fig. 25– Vehicle Position Comparison
Demonstration Outline
•Background and Overview•Motor Modeling and Cogging Torque•Simulink Modeling•Experimental Platform•Controller Development and Specifications•Graphical User Interface Design•Graphical User Interface Communication•Nonfunctional Requirements
36
Vehicle Plant Bode Diagram
37Fig. 26– Vehicle Plant Bode Diagram
Controller and Plant Bode Diagram
38Fig. 27– Continuous Vehicle and Controller Bode with Controller Gain = 500
Discrete PI Controller Step Response
39Fig. 28– Simulink Controller Response to Worst Case Conditions,
Settling Time = 1 second
Disturbance Rejection Specification
•The drive control system shall minimize the effect of external torque disturbances.
•Performance Specification:•Shaft RPM change of less than or equal to 40%
40
Disturbance Rejection Specification
•Simulink Test Measurements:•Max Instantaneous Error of 35.75% at 20 RPM•Spec has been met for the Simulink Model
41
Disturbance Rejection Specification
42Fig. 29– Simulink Disturbance Response Curves with Disturbance Change at 2 seconds
Disturbance Rejection Specification
43
•Experimental Platform Test Measurements:•Max Instantaneous Error of about 38% at 20 RPM•Spec has been met for the Experimental Platform
Disturbance Rejection Specification
44Fig. 30– Simulink Disturbance Response Curves with Disturbance Change at 3 seconds
Disturbance Rejection Specification
45Fig. 31– Average Instantaneous Error of Disturbance Tests in Experimental Platform
Step Tracking Specification
•The drive control system shall reduce vehicle tracking errors for step commands.
•Performance Specification: •Average difference between input and output of less than or equal to 20% over 4 seconds
46
Step Tracking Specification
Simulink Test Measurements:•Max Error is about 14% at 400 RPM•Spec has been met for the Simulink Model
47
Step Tracking Specification
48Fig. 32– Average Error of Step Responses in Simulink
Step Tracking Specification
Experimental Platform Test Measurements:•Max Error is about 22% at 40 RPM•Spec has not been met for the Experimental Platform
49
Step Tracking Specification
50Fig. 33– Average Error of Step Responses in Experimental Platform
Ramp Tracking Specification
•The drive control system shall reduce vehicle tracking errors for ramp commands.
•Performance Specification: Average difference between input and output of less than or equal to 20% over 4 seconds
51
Ramp Tracking Specification
Simulink Test Measurements:•Max Error is about 35% at 400 RPM/s•Spec has not been met for Simulink
52
Ramp Tracking Specification
53Fig. 34– Average Error for Ramp Responses in Simulink
Ramp Tracking Specification
54Fig. 35– Simulink Ramp Response Curve with a Ramp Input = 400 RPM/s
Ramp Tracking Specification
Experimental Platform Test Measurements:•Max Error is about 19% at 20 RPM/s•Spec has been met for the Experimental Platform
55
Ramp Tracking Specification
56Fig. 36– Average Error for Ramp Responses in Experimental Platform
Ramp Tracking Specification
57Fig. 37– Experimental Platform Ramp Response Curve with a Ramp Input = 400 RPM/s
Parabolic Tracking Specification
•The drive control system shall reduce vehicle tracking errors for parabolic commands.
•Performance Specification: Average difference between input and output of less than or equal to 40% over 4 seconds
58
Parabolic Tracking Specification
Simulink Test Measurements:•Max Error is about 20% at 400 RPM/s^2•Spec has been met for Simulink
59
Parabolic Tracking Specification
60Fig. 38– Average Error for Parabolic Responses in Simulink
Parabolic Tracking Specification
Experimental Platform Test Measurements:•Max Error is about 23% at 80 RPM/s^2•Spec has been met for Experimental Platform
61
Parabolic Tracking Specification
62Fig. 39– Average Error for Parabolic Responses in Experimental Platform
Motor Mismatch Specification
•The drive control system shall reduce the effect of motor mismatch
•Performance Specification: Shaft RPM change less than or equal to 15%
63
Motor Mismatch Specification
•The drive control system shall reduce the effect of motor mismatch
•Performance Specification: Shaft RPM change less than or equal to 15%
64
Motor Mismatch Specification
Simulink Test Measurements:•Max Error is about 4.25% at 20 RPM•Spec has been met
65
Motor Mismatch Specification
66Fig. 40–Error for Motor Mismatch in the Simulink Model
Demonstration Outline
•Background and Overview•Motor Modeling and Cogging Torque•Simulink Modeling•Experimental Platform•Controller Development and Specifications•Graphical User Interface Design•Graphical User Interface Communication•Nonfunctional Requirements
67
Overview
68Fig. 40– High Level Block Diagram
Demonstration Outline
•Background and Overview•Motor Modeling and Cogging Torque•Simulink Modeling•Experimental Platform•Controller Development and Specifications•Graphical User Interface Design•Graphical User Interface Communication•Nonfunctional Requirements
69
Function and Specification
•Function: Graphical User Interface (GUI) Communication
•Specification: Successfully send and receive commands
70
Experimental Platform Software
•Design and MCU Resources•Interrupt Software•Communication Software
71
Experimental Platform Software: Design
72
• Interrupt Time: 600 μs to 900 μs•Communication Time: 45 ms to 60 ms•70 bits data•Baud Rate: 38.4 kbps
Controller: 800 μs Communication:200 μs
Interrupt Period: 1 ms
Fig. 42– Interrupt Diagram
Graphical User Interface Communication: Serial Communication
73
Legend:Command – CMDAcknowledge – ACK
Atmega128 MATLAB
CMD1ACK1
CMD2ACK2
CMD3ACK3
Etc…
Time
Fig. 43– Communication Protocol Diagram
Experimental Platform Software: MCU Resources
• All Four Timer/Counter Units• USART Communication• Two I2C Devices• Flash: 11,166 bytes (8.5%)• SRAM: 2,032 bytes (49.6%)
74
Graphical User Interface Communication: Interrupt Contents
75
•Rate Limiting•Command Conditioning•Anti-Windup Software•Model Based PID Controller•Feed-Forward Controller•Dynamic Model •Taylor Series Expansion
•Torque Matching Software•I2C Communication
Graphical User Interface Communication: I2C Communication
76
I2C Hardware Execution Time: 300 μsI2C Software Execution Time: 20 μs
Fig. 44– I2C Communication Plot
Demonstration Outline
•Background and Overview•Motor Modeling and Cogging Torque•Simulink Modeling•Experimental Platform•Controller Development and Specifications•Graphical User Interface Design•Graphical User Interface Communication•Nonfunctional Requirements
77
Nonfunctional Requirements
• The workstation should be reliable.
• Velocity commands shall be easy to issue to both the experimental platform and the Simulink model
• Modifying the load shall be easy on both the experimental platform and the Simulink model
78
Design of a Simulink-Based Control
Workstation for Mobile Wheeled Vehicles with
Variable-Velocity Differential Motor Drives
Kevin Block, Timothy De Pasion, Benjamin Roos, Alexander SchmidtGary Dempsey
Bradley University Electrical and Computer Engineering Department
April 5, 2016
Appendix Slides
•Benjamin Roos
80
Vehicle Plant Root Locus
81Fig. 7 – Vehicle Plant Root Locus
Plant and Controller Root Locus
82Fig.8– Vehicle and Controller Root Locus with Zero at s = -19.5 rad/s
Vehicle Plant
83
𝐺𝑃𝐻 𝑠 =0.0001606
1.389 ∙ 10−6𝑠2 + 0.001315𝑠 + 0.001877
𝑤𝑖𝑡ℎ 𝑝𝑜𝑙𝑒𝑠 𝑎𝑡 𝑠 = −1.43, −945.4 𝑟𝑎𝑑/𝑠
Eq. 101-1 – Vehicle Plant and Encoder Gain Model in the Laplace Domain
Continuous Feedback Controller
𝐺𝑐 𝑠 = 19.5𝑘
𝑠19.5
+ 1
𝑠
𝑤ℎ𝑒𝑟𝑒 𝑘 = 500
84
Eq. 102-1 – Continuous Feedback Controller in the Laplace Domain
Discrete Feedback Controller
85
𝐺𝑐 𝑧 = 𝑘1.01𝑧 − 0.9902
𝑧 − 1
𝑤ℎ𝑒𝑟𝑒 𝑘 = 500
Eq. 103-1 – Discrete Feedback Controller Converted with the Tustin Method and Pre-warped at 63.8 rad/s
Step Tracking Specification
86Fig. 54 – Step Response Curves in Simulink
Step Tracking Specification
87Fig. 54 – Step Response Curves in Experimental Platform
Parabolic Tracking Specification
88Fig. 55 – Simulink Parabola Response Curve with a Parabola Input = 400 RPM/s^2
Parabolic Tracking Specification
89Fig. 55 – Exp. Platform Parabola Response Curve with a Parabola Input = 400 RPM/s^2
Disturbance Rejection Specification
90Fig. 11 –Open Loop Response with Vin = 16v and Current Load = 0 A and no filtering