+ All Categories
Home > Documents > Design of a Simulink-Based Control Workstation for Mobile...

Design of a Simulink-Based Control Workstation for Mobile...

Date post: 10-Mar-2020
Category:
Upload: others
View: 15 times
Download: 0 times
Share this document with a friend
212
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 Schmidt Gary Dempsey Bradley University Electrical and Computer Engineering Department April 26, 2016
Transcript

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 26, 2016

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform•Control System•Graphical User Interface•Conclusion

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

Differential Drive

4Fig. 1 – Differential Drive Example

Objectives

•Model the experimental platform in Simulink

•Match the generator load to the theoretical vehicle

•Design a controller to meet specifications

•Create a GUI that interfaces with the systems

5

Constraints

•The Experimental Platform must:

•24 Volt Pittman Motor GM9236S015-R1•8-bit microcontroller•Reliable•Operate in 0° to 45° Celsius•Stable•Safe

6

Constraints

•The Simulink System must:

•Use the standard library•Controlled by a GUI

•The Control System must:

•Have limited inputs to prevent saturation

7

Division of Labor

8

TABLE I. DIVISION OF LABOR

Task Name Team Member Name

Controller Development All Team Members

Current Source Circuitry Benjamin Roos

Generator Load Matching Benjamin Roos

MATLAB GUI Alexander, Timothy

Simulink Modeing Timothy De Pasion

Platform Integration Kevin Block

Simulink Motor Modeling Alexander Schmidt

Overview

9Fig. 2 – High Level Block Diagram

Experimental Platform

10

Fig. 3 – Experimental Platform Block Diagram

Simulink System

11

Fig. 4 – Simulink System Block Diagram

Presentation Outline

•Background and Overview•Simulink System

•Motor Modeling•Simulink Modeling•Vehicle Modeling•Final Simulink Integration

•Experimental Platform•Control System•Graphical User Interface•Conclusion

12

Presentation Outline

•Background and Overview•Simulink System

•Motor Modeling•Simulink Modeling•Vehicle Modeling•Final Simulink Integration

•Experimental Platform•Control System•Graphical User Interface•Conclusion

13

Motor Model

14

Fig. 5 – Simulink System Block Diagram

Motor Function and Specification

•Function: The Simulink motor model shall accurately model the physical motors

•Specification: Model to within ±20%

15

Motor Model

16

Fig. 6 – Motor Model

Electrical Transfer Function

Mechanical Transfer Function

Input+

-

+Kt

-

Kv

Torque Load

Output

Motor Variable Identification

17Fig. 7 – Experimental Motor Data

Motor Parameter Identification

18Fig. 8 – Coulomb & Viscous Friction

Motor Parameter Identification

19

TABLE II. MOTOR PARAMETERS

Constant Experimental Data Sheet Units

Viscous Friction 4.11E-06 3.54E-06 Nm/Rad/Sec

Coulomb Friction 0.0032 0.0056 Nm

Kv 0.0431 0.0458 V/Rad/Sec

Kt 0.0431 0.0458 Nm/A

Transient Motor Testing

•Settling Time Error = 96.7%

•Overshoot Error = 228.1%

•Steady-State Error = 56.6%

•Specification has not been met

20

Simulink Vs Experimental Error

21Fig. 9 – Simulink Vs Experimental Step Waveform

RPM Motor Testing

22Fig. 10 – Simulink Vs Experimental Steady-StateValues

Results

Fig. 11 – Zoomed Experimental Vs Simulink Motor Response

Cogging Torque Function and Specification

•Function: Cogging torque shall be accurately modeled

•Specification: Model to within ±50%

24

Cogging Torque

•Interference of the permanent magnets with the rotor windings

•Primarily an issue at low velocities

25Fig. 12 – DC Motor Magnet and Windings Interactionhttp://www.microchip.com/design-centers/motor-control-and-drive/motor-types/brushed-dc

Cogging Torque Experimental Waveform

26Fig. 13 – Cogging Torque from Experimental

Adjusting For Current Variations

•How do we handle Cogging Torque?

•Adjusting with Nonlinear Gain

27Fig. 14 – Flowchart for Cogging Torque

Without Nonlinear Gain

28

Fig. 16 – Current Output without GainFig. 15 – Voltage Input

With Nonlinear Gain

29

Fig. 17 – Voltage Input Fig. 18 – Current Output with Gain

Cogging Torque Specification

•Cogging Torque Percent Error = 14.5%•Specification has been met

30Fig. 19 – Cogging Torque Span

Motor Thermals: 4 Sources of Heat

•Resistance in the brushes

•Coulomb Friction

•Viscous Friction

•Dynamic Loads

31

No Load Values

32Fig. 20 – No Load Thermal Measurement

Presentation Outline

•Background and Overview•Simulink System

•Motor Modeling•Simulink Modeling•Vehicle Modeling•Final Simulink Integration

•Experimental Platform•Control System•Graphical User Interface•Conclusion

33

High Level Block Diagram

34Fig. 21 – High Level Block Diagram

Simulink System

35

Fig. 22 – Simulink System Block Diagram

Simulink System

36

Fig. 23 – Simulink System Block Diagram

Functions and Specifications

•Function: Model Accuracy

•Specification: Within ±20% for average error

37

H-Bridge Model

38

Fig. 24 – H-Bridge Model in Simulink

H-Bridge Model

•Test the physical H-Bridge voltage output versus the Simulink model voltage output

•Results: •10.04% error for the voltage output test

•Spec has been met

39

H-Bridge: Average Error of 10.04%

40Fig. 25 – H-Bridge Average Error

Rotary Encoder Design

41

Fig. 26 – Rotary Encoder Model in Simulink

Rotary Encoder Model

•Testing Method: Compare the output of the actual and Simulink rotary encoders with voltage inputs from 0.5 to 24 volts in 0.5 volt steps

•Results: •Average error of 3.47% over the whole range

•Spec has been met

42

Rotary Encoder: Average Error of 3.47%

43Fig. 27 – Rotary Encoder Average Error

PWM Model

44

Fig. 28 – PWM Model in Simulink

PWM Model Testing

•Test the Simulink model duty cycle versus the microcontroller duty cycle

•Result: •0.24% error over the range of 4 to 100% duty cycle with 4% steps

•Spec has been met

45

PWM: Average Error of 0.24%

46Fig. 29 – PWM Average Error

Presentation Outline

•Background and Overview•Simulink System

•Motor Modeling•Simulink Modeling•Vehicle Modeling•Simulink Final Integration

•Experimental Platform•Control System•Graphical User Interface•Conclusion

47

Vehicle Modeling

Kinematic Models•Position and Orientation

48

Dynamic Models•Inertia and External Forces

https://chess.eecs.berkeley.edu/eecs149/documentation/differentialDrive.pdfhttp://www.intechopen.com/books/motion-control/a-novel-traction-control-for-electric-vehicle-without-chassis-velocity

Fig. 30 – Kinematic Model

Fig. 31 – Dynamic Model

Vehicle

49Fig. 32 – Theoretical Vehicle Design

Simulink System

50

Fig. 33 – Simulink System Block Diagram

Dynamic Model: Disturbance Torques

•Aerodynamic Drag•Aerodynamic Lift•Gravitational•Rolling Resistance•Acceleration

51

Dynamic Model

52

Fig. 34 – Dynamic Model

Vehicle Dynamic Model

•Torque inputs into the Simulink motor model

53

Fig. 35 – Dynamic Model Connection to Motor Model

Dynamic Model Torque Output

54Fig. 36 – Dynamic Model Torque Output

Dynamic Model RPM Output

55Fig. 37 – Velocity Output with and without the Dynamic Model

Vehicle Kinematic Model

56

Fig. 38 – Simulink Kinematic System

Vehicle Position Output

57Fig. 39 –Vehicle Position

Position Comparison

58

Fig. 40 – Vehicle Position Comparison

Presentation Outline

•Background and Overview•Simulink System

•Motor Modeling•Simulink Modeling•Vehicle Modeling•Simulink Final Integration

•Experimental Platform•Control System•Graphical User Interface•Conclusion

59

Simulink System

60

Fig. 41 – Simulink System Block Diagram

Simulink System

61

Fig. 42 – Simulink System

Simulink System

•Contains over 80 subsystems

•8 sublevels deep for some parts

•Average and Designed system models•Average models are simple linear gains•Designed models follow their physical counterparts

62

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform•Control System•Graphical User Interface•Conclusion

63

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform

•Microcontroller Software•Serial Communication•Current Source and Torque Matching

•Control System•Graphical User Interface•Conclusion

64

MCU Specifications and Resources

65

Fig. 43 – Experimental Platform Block Diagram

MCU Specifications and Resources

•Function: Graphical User Interface (GUI) Communication

•Specification: Successfully send and receive commands

•Spec has been met

66

MCU Specifications and Resources

• All Four Timer/Counter Units• USART Communication• Two I2C Devices• Flash: 11,166 bytes (8.5%)• SRAM: 2,032 bytes (49.6%)

67

68

MCU Software

Fig. 44 – State Flow Diagram for MCU Software

MCU Software

69

• Interrupt Duration: 600 μs to 900 μs

Controller: 800 μs Communication:200 μs

Interrupt Period: 1 ms

Fig. 45 – Interrupt Diagram

MCU Software: Interrupt Software

70Fig. 46 – Interrupt Software Flowchart

• Command Conditioning • Model Based PID Controller• Feed-Forward Controller• Anti-Windup Software• Dynamic Model

•Taylor Series

• Torque Matching Software• I2C Communication

MCU Software: Interrupt Software

71

Fig. 47 – Experimental Platform Block Diagram

MCU Software: Interrupt Software

72

I2C Hardware Execution Time: 300 μsI2C Software Execution Time: 20 μs

Fig. 48 – Oscilloscope Image Grab of I2C Clock Line

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform

•Microcontroller Software•Serial Communication•Current Source and Torque Matching

•Control System•Graphical User Interface•Conclusion

73

MCU Software: Serial Communication

74

Fig. 49 – Experimental Platform Block Diagram

MCU Software: Serial Communication

75

•MATLAB Instrument Control Toolbox•Communication Time: 45 ms to 60 ms•120 bits data•Baud Rate: 38.4 kbps

Controller: 800 μs Communication:200 μs

Interrupt Period: 1 ms

Fig. 50– Interrupt Diagram

MCU Software: Serial Communication

76

Legend:Command – CMDAcknowledge – ACK

Atmega128 MATLAB

CMD1ACK1

CMD2ACK2

CMD3ACK3

Etc…

Time

Fig. 51 – ATmega128/MATLAB Acknowledgements

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform

•Microcontroller Software•Serial Communication•Current Source and Torque Matching

•Control System•Graphical User Interface•Conclusion

77

High Level Block Diagram – Experimental Platform

78

Fig. 52 – The experimental platform should mimic the Simulink vehicle model

Current Source Torque Disturbance Matching

79

Fig. 53 – The Experimental Platform Disturbance Input should match that of the Simulink Model

Current Source Schematic

80Fig. 54 – Basic Current Source Circuit Schematic

Generator Model

Compensated Circuit Schematic

81Fig. 55 – Compensated Lead Network Current Source Circuit Schematic

Generator Model

Compensated Circuit Schematic

82Fig. 56 – Compensated Lead Network Current Source Circuit Schematic

Lead Compensator

Compensated Circuit Schematic

83Fig. 57 – Compensated Lead Network Current Source Circuit Schematic

AC Ground

Current Circuit Controller

•Lead-compensator to cancel pole at crossover•Pole placed near DC to ground AC signals

84Fig. 58 – Compensated Nonlinear Frequency Response of Open Loop Circuit System

Compensated Circuit Testing

85

Fig. 59 – Compensated Physical Circuit Step Response

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𝑇𝑆𝐼𝑀𝐽𝑆𝐼𝑀

=𝑇𝐸𝑋𝑃𝐽𝐸𝑋𝑃

= 𝑎

𝑇 = 𝑁𝑒𝑡 𝑇𝑜𝑟𝑞𝑢𝑒𝐽 = 𝑀𝑜𝑚𝑒𝑛𝑡 𝑜𝑓 𝐼𝑛𝑒𝑟𝑡𝑖𝑎

𝑎 = 𝑟𝑜𝑡𝑎𝑡𝑖𝑜𝑛𝑎𝑙 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛

86

Net Torque Reduction System

87

Derivative Lowpass FilterAveraging

FilterMotor Speed

Simulink Torque Load

Generator Friction Torque

Experimental Platform Torque Load

++

-

Fig. 60 – The Experimental Platform Torque Correction System Block Diagram

Generator Load: Open Loop Response

88Fig. 61 – Open Loop Response with Vin = 16v Step and Current Load = 0 A

Generator Load: Open Loop Response

89Fig. 62 – Open Loop Response with Vin = 16v Step and Current Load = 1.5 A

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

90

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

•Performance still sufficient for this project’s purpose

91

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform•Control System•Graphical User Interface•Conclusion

92

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform•Control System

•Development•Verification

•Graphical User Interface•Conclusion

93

Vehicle Plant Bode Diagram

94Fig. 63 – Vehicle Plant Bode Diagram, poles at -1.43, -945.2 rad/s

Controller and Plant Bode Diagram

95Fig. 64 – Continuous Vehicle and Controller Bode with added Integrator, Zero = -19.5 rad/s and Controller Gain = 500

Discrete PI Controller Step Response

96

Fig. 65 – Complete Controller Response to Worst Case Conditions,Settling Time = 1 second

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform•Control System

•Development•Verification

•Graphical User Interface•Conclusion

97

Controller Functional Requirements

98

Functional Requirement for the

Drive Control SystemSpecification Simulink

Experimental

Platform

Minimize the effect of external

torque disturbances Shaft RPM change ≤ 40%Spec has

been met

Spec has been

met

Reduce vehicle tracking errors for

step commands

Average difference between input

and output ≤ 20% over 4 seconds

Spec has

been metNot Met

Reduce vehicle tracking errors for

ramp commands

Average difference between input

and output ≤ 20% over 4 secondsNot Met

Spec has been

met

Reduce vehicle tracking errors for

parabolic commands

Average difference between input

and output ≤ 40% over 4 seconds

Spec has

been met

Spec has been

met

Reduce the effect of motor mismatch Shaft RPM change ≤ 15%Spec has

been metN/A

TABLE III. DRIVE CONTROL SYSTEM SPECIFICATIONS

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

99

Step Tracking Specification

Experimental Platform Test Measurements:•Max Error is about 22% at 20 RPM•Spec has not been met for the Experimental Platform

100

Step Tracking Specification

101Fig. 66 – 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

102

Ramp Tracking Specification

Simulink Test Measurements:•Max Error is about 35% at 400 RPM/s•Spec has not been met for Simulink

103

Ramp Tracking Specification

104Fig. 67 – Average Error for Ramp Responses in Simulink

Ramp Tracking Specification

105Fig. 68 – Simulink Ramp Response Curve with a Ramp Input = 400 RPM/s

Parabolic Tracking Specification

106Fig. 69 – Parabola Response Curve with a Parabola Input = 400 RPM/s^2

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform•Control System•Graphical User Interface•Conclusion

107

Overview

108Fig. 70 – High Level Block Diagram

GUI Demonstration

Run-through of the GUI for a Simulink Simulation:https://www.youtube.com/watch?v=vuGQLxFuk8A

109

Video of GUI Demonstration

GUI Demonstration

Run-through of the GUI for the Experimental Platform:https://www.youtube.com/watch?v=zawAYN9LUPA

Experimental Platform Demonstration:https://www.youtube.com/watch?v=ao5LDD65wgI

110

Video of GUI Demonstration

Video of Experimental Platform Demonstration

Presentation Outline

•Background and Overview•Simulink System•Experimental Platform•Control System•Graphical User Interface•Conclusion

111

Nonfunctional Requirements

• The workstation should be reliable•Met with a Metric of 4/5

• Velocity commands shall be easy to issue to both the experimental platform and the Simulink model•Met with a Metric of 5/5

• Modifying the load shall be easy on both the experimental platform and the Simulink model•Met with a Metric of 5/5

112

Constraints

•The Experimental Platform must: ✓

•24 Volt Pittman Motor GM9236S015-R1 ✓

•8-bit microcontroller ✓

•Reliable ✓

•Operate in 0° to 45° Celsius ✓

•Stable ✓

•Safe ✓

113

Constraints

•The Simulink System must: ✓

•Use the standard library ✓

•Controlled by a GUI ✓

•The Control System must: ✓

•Have limited inputs to prevent saturation ✓

114

Objectives

•Model the experimental platform in Simulink ✓

•Match the generator load to the theoretical vehicle ✓

•Design a controller to meet specifications ✓

•Create a GUI that interfaces with the systems ✓

115

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 26, 2016

Appendix Slides

•Benjamin Roos•Timothy De Pasion•Alex Schmidt•Kevin Block•Metrics

117

Op-Amp: LMC6482

Maximum Ratings:

Supply Voltage: 15.5 V

Sourcing Output Current: 8 mA

Junction Temperature: -40 – 85 C

Storage Temperature: -65 – 150 C

118

Source: National Semiconductor, “LMC6482 CMOS Dual Rail-to-Rail Input and Output Operation Amplifier,” LMC6482 Datasheet, Sept. 2003.

Transistor: TIP120

Maximum Ratings:

Collector-Emitter Voltage: 60 V

Collector-Base Voltage: 60V

Collector Current (Continuous): 5 A

Total Power Dissipation: 65 W

Junction Temperature: 150 C

Storage Temperature: -65 – 150 C

119

Source: Motorola, Inc., “Plastic Medium-Power Complementary Silicon Transistors,” TIP120 Datasheet, 1995.

Transistor Heat Sink Calculation

Max Power Dissipation = 20 W

Junction-to-case Thermal Resistance 𝑅𝐽𝐶 = 1.92℃/𝑊

𝑅𝑇𝑜𝑡𝑎𝑙 =150℃ − 45℃

20𝑊= 5.23℃/𝑊

𝑅ℎ𝑒𝑎𝑡 𝑠𝑖𝑛𝑘 = 5.23 ℃/𝑊 − 1.92 ℃/𝑊 = 3.31 ℃/𝑊

𝑅𝑐ℎ𝑜𝑠𝑒𝑛 = 2.6 ℃/𝑊

120

Source: Motorola, Inc., “Plastic Medium-Power Complementary Silicon Transistors,” TIP120 Datasheet, 1995.

Physical Current Source Testing

121

Fig. 73 – Gain Reduction Compensated Physical Current Source Circuit 1V Step Response

Compensated Linear Frequency Response

122

Fig. 74 – Compensated Open Loop Linear Frequency Response of Current Source Circuit

Nonlinear Current Source Gain

123

Fig. 75 – Nonlinear Current Source Gain Adjustment for Better PSPICE Matching

Current Source Circuit Plant

𝐺𝑝𝑙𝑎𝑛𝑡 = 𝐺𝑜𝑝−𝑎𝑚𝑝 ∗ 𝐺𝐵𝐽𝑇−𝑔𝑒𝑛𝑠𝑒𝑡 ∗ 𝐺𝑔𝑎𝑖𝑛−𝑚𝑜𝑑

124

Current Source Circuit Plant: Op-Amp

𝐺𝑜𝑝−𝑎𝑚𝑝 𝑠 = (119 ∗ 103)1

(1

2𝜋∗10𝑠+1)(

1

2𝜋∗1.22∗106𝑠+1)

125

126

𝐺𝐵𝐽𝑇−𝑔𝑒𝑛𝑠𝑒𝑡 𝑠 =1

(1

2𝜋∗104𝑠+1)2(

1

2𝜋∗3∗105)2

Current Source Circuit Plant:Transistor and Generator

127

𝐺𝑐𝑜𝑚𝑝𝑒𝑛𝑠𝑎𝑡𝑜𝑟 𝑠 = 0.233(

1

2𝜋∗3.18∗104𝑠+1)

(1

2𝜋∗15.9𝑠+1)(

1

2𝜋∗1.38∗105𝑠+1)(

1

2𝜋∗106𝑠+1)

Current Source Compensator

Vehicle Plant in Laplace Domain

128

𝐺𝑃𝐻 𝑠 =0.0001606

1.389 ∙ 10−6𝑠2 + 0.001315𝑠 + 0.001877

𝑤𝑖𝑡ℎ 𝑝𝑜𝑙𝑒𝑠 𝑎𝑡 𝑠 = −1.43, −945.4 𝑟𝑎𝑑/𝑠

Continuous Laplace Feedback Controller

𝐺𝑐 𝑠 = 19.5𝑘

𝑠19.5

+ 1

𝑠

𝑘 = 500

129

Model-based PID controller

𝐺𝑃𝐼𝐷 𝑠 =𝐾𝑃𝑠+𝐾𝐼+𝐾𝐷𝑠

2

𝑠=19.5𝑘

𝑠

19.5+1

𝑠

𝑘 = 500𝐾𝑃 = 500𝐾𝐼 = 9750𝐾𝐷 = 0

130

Eq. 130-1 – Continuous Feedback Controller with individual PID component gains

Discrete Feedback Controller

131

𝐺𝑐 𝑧 = 𝑘1.01𝑧 − 0.9902

𝑧 − 1

𝑤ℎ𝑒𝑟𝑒 𝑘 = 500

Eq. 131-1 – Discrete Feedback Controller Converted with the Tustin Method and Pre-warped at 63.8 rad/s

Vehicle Plant Root Locus

132Fig. 76 – Vehicle Plant Root Locus

Plant and Controller Root Locus

133Fig. 77 – Vehicle and Controller Root Locus with Zero at s = -19.5 rad/s

Step Tracking Specification

134Fig. 78 – Step Response Curves in Simulink

Generator Specification: Settling Time

135Fig. 79 – Experimental Platform Open Loop Settling Time Error as compared to Simulink

Generator Specification: Overshoot

136Fig. 80 – Experimental Platform Open Loop Overshoot Error as compared to Simulink

Generator Specification: Steady-State

137Fig. 81 – Experimental Platform Open Loop Steady State Error as compared to Simulink

Generator : Average Absolute Error

138Fig. 82 – Experimental Platform Absolute Error as compared to Simulink

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%

139

Disturbance Rejection Specification

•Simulink Test Measurements:•Max Instantaneous Error of 35.75% at 20 RPM•Spec has been met for the Simulink Model

140

Disturbance Rejection Specification

141Fig. 83 – Simulink Disturbance Response Curves with Disturbance Change at 2 seconds

Disturbance Rejection Specification

142Fig. 84 – Maximum Instantaneous Error of Disturbance Tests in Simulink

Disturbance Rejection Specification

143

•Experimental Platform Test Measurements:•Max Instantaneous Error of about 38% at 20 RPM•Spec has been met for the Experimental Platform

Disturbance Rejection Specification

144Fig. 85 – Simulink Disturbance Response Curves with Disturbance Change at 3 seconds

Disturbance Rejection Specification

145Fig. 86 – Maximum Instantaneous Error of Disturbance Tests in Experimental Platform

Step Tracking Specification

Simulink Test Measurements:•Max Error is about 14% at 400 RPM•Spec has been met for the Simulink Model

146

Step Tracking Specification

147Fig. 87 – Average Error of Step Responses in Simulink

Ramp Tracking Specification

Experimental Platform Test Measurements:•Max Error is about 19% at 20 RPM/s•Spec has been met for the Experimental Platform

148

Ramp Tracking Specification

149Fig. 88– Average Error for Ramp Responses in Experimental Platform

Ramp Tracking Specification

150Fig. 89– 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

151

Parabolic Tracking Specification

Simulink Test Measurements:•Max Error is about 20% at 400 RPM/s^2•Spec has been met for Simulink

152

Parabolic Tracking Specification

153Fig. 90 – 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

154

Parabolic Tracking Specification

155Fig. 91 – 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%

156

Motor Mismatch Specification

Simulink Test Measurements:•Max Error is about 4.25% at 20 RPM•Spec has been met

157

Motor Mismatch Specification

158Fig. 92 – Error for Motor Mismatch in the Simulink Model

Appendix Slides

•Benjamin Roos•Timothy De Pasion•Alex Schmidt•Kevin Block•Metrics

159

PWM Output

160Fig. 93 – PWM Model Output

Rotary Encoder Model: Conversion

161

Fig. 94 – Conversion Block for Rotary Encoder

Rotary Encoder Model: 1 ms reset

162

Fig. 95 – 1 ms reset in Rotary Encoder

Rotary Encoder Model: Counter

163

Fig. 96 – Counter in Rotary Encoder

Rotary Encoder Model: Pulse Creation

164

Fig. 97 – Pulse Creation in Rotary Encoder

Rotary Encoder Model: Rounding

165

Fig. 98 – Rounding Block in Rotary Encoder

Rotary Encoder Output

166Fig. 99 – Rotary Encoder Output

H-Bridge Limiting Function

167

Fig. 100 – H-Bridge Limiting Function

H-Bridge Output

168Fig. 101 – H-Bridge Output

Ideal Switch Function

169

Fig. 102 – H-Bridge Limiting Function

Kinematic Model

170

Fig. 103 – Kinematic Model

Kinematic Model: Position Calculation

171

Fig. 104 – Kinematic Model: Position Calculation

Kinematic Model: Angle Calculation

172

Fig. 105 – Angle Calculation

In Depth View of Dynamic Model

•Rolling Torque

173

Fig. 106 – Rolling Torque Subsystem

In Depth View of Dynamic Model

•Gravitational Torque

174

Fig. 107 – Gravitational Torque Subsystem

In Depth View of Dynamic Model

•Aerodynamic Lift Torque

175

Fig. 108 – Aerodynamic Lift Torque Subsystem

In Depth View of Dynamic Model

•Aerodynamic Drag Torque

176

Fig. 109 – Aerodynamic Drag Torque

In Depth View of the Dynamic Model

•Acceleration Torque

177

Fig. 110 – Acceleration Torque Subsystem

Simulink Controller

178Fig. 111 – Acceleration Torque Subsystem

Appendix Slides

•Benjamin Roos•Timothy De Pasion•Alex Schmidt•Kevin Block•Metrics

179

Top Level

180Fig. 112 – Full Motor Simulink Model

Motor Model

181Fig. 113 – Internal Motor Simulink Model

Coulomb Friction

182Fig. 114 – Coulomb Friction Block

Static Friction

183Fig. 115 – Static Friction Block

Static Friction Logic

184

function [y,flag_out] = fcn(u,flag_in) if u >= 0.1738 flag_out = 1; elseif u == 0 flag_out = 0; else flag_out = flag_in; end

y = u*flag_out;

Fig. 116 – Static Friction Code

Position

185Fig. 117 – Position Block

Cogging Torque

186Fig. 118 – Cogging Torque Block

Cogging Torque Logic

187Fig. 119 – Cogging Torque Internal Logic Block

Gear Reduction

188Fig. 120 – Gear Reduction Block

Power Loss Block

189Fig. 121 – Power Loss Block

12 Volt Simulink Output

190Fig. 122 – 12 V Simulink Motor Output

Frequency Method

191

Fig. 123 – Left Oscilloscope Side Fig. 124 – Right Oscilloscope Side

Scale Method

192

Fig. 125 – Scale Method Diagram

Z. Zhu, “A Simple Method for Measuring Cogging Torque in Permanent Magnet Machines”. 2009.

Cogging Current

Voltage (V) Average Current (A) Maximum Current (A) Minimum Current (A) Corrective Gain

1 0.0738 0.132 0.028 2

2 0.0784 0.118 0.046 3

3 0.0831 0.125 0.052 2.5

4 0.0856 0.133 0.048 1.7

5 0.0858 0.141 0.046 1.6

7 0.0917 0.154 0.042 1.4

10 0.0977 0.164 0.042 1.4

12 0.1017 0.17 0.04 1.4

24 0.1206 0.208 0.043 1.4

193

TABLE IV. Cogging Current Data

Average Thermal Loss

194Fig. 126 – Thermal Average Output

Resistance in the Windings

•I2*R Losses

195

Fig. 127 – Top Level Resistance Power Loss

Fig. 128 – Bottom Level Resistance Power Loss

Viscous, Coulomb, and Dynamic Loads

•V*T Losses

196

Fig. 129 – Coulomb Friction Losses

Fig. 131 – Dynamic Load Losses

Fig. 130 – Viscous Friction Losses

Total Power Loss

197

Fig. 132 – Top Level Power Loss Simulink Block

H-Bridge Build

198

Fig. 133 – H-Bridge Pinout

“LMD1820 3A, 55V H-Bridge” National Semiconductor, Dec. 1999.

H-Bridge Thermals

•Total Power of H-BridgePTotal = PQ + PCOND + PSW

PQ = Quiescent Power Dissipation

PCOND = Conductive Power Dissipation

PSW = Switching Power Dissipation

199

Quiescent Power Dissipation

PQ = IS * VCC

IS = Quiescent Current

VCC = Supply Voltage

200

Conductive Power Dissipation

PCOND = 2 * I2RMS * RDS (ON)

IRMS = RMS Current

RDS (ON) = On Resistance of the Power Switch

201

Switching Power Dissipation

PSW = (EON + EOFF) * F

EON = Turn On Energy

EOFF = Turn Off Energy

F = Switching Frequency

202

H-Bridge Total Power

PTotal = 0.6[W] + 2.7[W] + 0.3 [W]

•Maximum power dissipation of the H-Bridge without a heat sink is 3.0 Watts

•PTotal = 3.6 Watts

•Heat Sink is Required!

203

Appendix Slides

•Benjamin Roos•Timothy De Pasion•Alex Schmidt•Kevin Block•Metrics

204

Taylor Series Error

205

Order Sin Error Order Cos Error

1 -11.07207345 0 -41.42135624

3 0.34706639 2 2.19654501

5 -5.13E-03 4 -0.000455979

7 4.41E-05 6 5.04E-04

9 -2.48E-07 8 -3.46E-06

TABLE V. TAYLOR SERIES EXPANSION ERROR

Input and Disturbance Commands: Baud Rate

206

UBRR: USART Baud Rate Registers

𝐵𝐴𝑈𝐷 =𝑓𝑂𝑆𝐶

16 𝑈𝐵𝑅𝑅 + 1

I2C Communication: Clock Speed

207

TWBR: TWI Bit Rate RegisterTWPS: TWI Bit Rate Prescalar

𝑓𝑆𝐶𝐿 =𝑓𝑂𝑆𝐶

16 + 2 𝑇𝑊𝐵𝑅 ∗ 4𝑇𝑊𝑃𝑆

208

Fig. 134– Interrupt Software Flowchart

Appendix Slides

•Benjamin Roos•Timothy De Pasion•Alex Schmidt•Kevin Block•Metrics

209

Metric - Reliability

•Very reliable 5 points•Reliable 4 points•Average Reliability 3 points•Not reliable 2 points•Very unreliable 1 point

210

Metric – Issue a command

•Very easy to issue 5 points•Easy to issue 4 points•Average difficulty to issue 3 points•Difficult to issue 2 points•Very difficult to issue 1 point

211

Metric – Manipulate a load

•Very easy to manipulate 5 points•Easy to manipulate 4 points•Average difficulty to manipulate 3 points•Difficult to manipulate 2 points•Very difficult to manipulate 1 point

212


Recommended