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
November 24, 2015
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•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
Objectives
•Cogging Torque Modeled
•Current Source Developed and Modeled
•Kinematic Model Finished
•Dynamic Model Started
•Input Commands Communicated
•Disturbance Commands Communicated
•I2C Communication Established with DAC
4
Specifications Related to Current Progress
•Motor : Model to within ±20%
•Rotary Encoder: Model to within ±20%
•Pulse-width modulation: Model to within ±20%
•H-Bridge: Model to within ±20%
•Cogging Torque: Model to within ±50%
•DC Generator Loads: Model to within ±50%
5
Division of Labor
6
Task Name Team Member Name
Cogging Torque Alexander Schmidt
Motor Models Alexander Schmidt
Current Source Benjamin Roos
Generator Model Benjamin Roos
Serial Communication Kevin Block
I2C Communication Kevin Block
Kinematic and Dynamic Models Timothy De Pasion
Component Models Timothy De Pasion
TABLE I. DIVISION OF LABOR
Overview
7Fig. 1 – High Level Block Diagram
Experimental Platform
8
MCUMotor
Platform
Generator Set/Current
Source
Rotary Encoder
Power
User Input
Motor PWM
Encoder Feedback
Motor/Gen Coupling
H-Bridge Interface2 2 2
2
D/A
Rotational Motion
I2C Debug
Rotational Motion
RS-232
Motor PWM
Debug Signal
2
Generator PWM
Fig. 2 – Experimental Platform Block Diagram
Simulink System
9
Fig. 3 – Simulink System Block Diagram
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•Conclusion
10
Presentation Outline
•Background•Kevin Block•Overview•Input and Disturbance Commands•I2C Communication•Future Work
•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•Conclusion
11
Overview
12Fig. 4 – Kevin’s Gantt Chart
7 11 14 18 21 25 28 1 4 8 11 15 18
Input Command
Disturbance Command
I2C and new D/As
October NovemberTask Name
Presentation Outline
•Background•Kevin Block•Overview•Input and Disturbance Commands•I2C Communication•Future Work
•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•Conclusion
13
Input and Disturbance Commands: Limitations and Requirements
14
•Interrupt Time: 1 ms•Data: 60 bits•Baud Rate: 38.4 kbps
Controller: 800 μs 200 μs
Interrupt Period: 1 ms
Fig. 5 – Interrupt Timing Diagram
Input and Disturbance Commands: Synchronization
15
Legend:Command – CMDAcknowledge – ACK
Atmega128 MATLAB
CMD1ACK1
CMD2ACK2
CMD3ACK3
Etc…
Time
Fig. 6 – ATmega128/MATLAB Acknowledgements
Input and Disturbance Commands: Baud Rate
16
•With Acknowledgments
•# of Bits: 100
•Baud Rate: 38.4 kbps
•Transfer Time: 2.6 ms
•Max Time: 13 ms
•No Acknowledgments
•# of Bits: 60
•Baud Rate: 38.4 kbps
•Transfer Time: 1.56 ms
•Max Time: 7.8 ms
Presentation Outline
•Background•Kevin Block•Overview•Input and Disturbance Commands•I2C Communication•Future Work
•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•Conclusion
17
I2C Communication
18
Fig. 7 – New Experimental Platform Block Diagram
•Requirements Prior:•5 Timer/Counters•4 PWM Channels
• Requirements After:• 4 Timer/Counters• 2 PWM Channels
I2C Communication
19Fig. 8 – I2C Communication Output
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x 10-4
0
2
4
6
SC
L [V
]
I2C Communication
Time
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x 10-4
0
2
4
6
SD
A [V
]
Time
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x 10-4
0
2
4
6
PO
RT
B [V
]
Time
Presentation Outline
•Background•Kevin Block•Overview•Input and Disturbance Commands•I2C Communication•Future Work
•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•Conclusion
20
Future Work
21
15-25 29 2-13 16-20 23 27-30 3 6-10 13 17 20-27 31 3-14 17-28
Experimental Platform Integration
Simulink Integration
Controller Development
Controller Model
Controller Code
Simulink GUI Control
Experimental Platform Testing
Simulink System Testing
November FebruaryJanuaryDecemberTask Name
Fig. 9 – Kevin’s Future Gantt Chart
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•Conclusion
22
Presentation Outline
•Kevin Block•Timothy De Pasion•Overview•H-Bridge Model/PWM Model•Kinematic Model•Dynamic Model•Future Work
•Benjamin Roos•Alexander Schmidt•Conclusion
23
Overview
24
14 18 21 25 28 1 4 8 11 15 18 22 25
H-Bridge Model
PWM Model
PWM Frequency Optimized
Kinematic Model
Dynamic Model
October November
Task Name
Plan Actual % CompleteActual
(beyond plan)
% Complete
(beyond plan)
Fig. 10 – Tim’s Gantt Chart
Presentation Outline
•Kevin Block•Timothy De Pasion•Overview•H-Bridge Model/PWM Model•Kinematic Model•Dynamic Model•Future Work
•Benjamin Roos•Alexander Schmidt•Conclusion
25
Simulink System: H-Bridge and PWM
26Fig. 11 – Simulink System Block Diagram
Results
•H-Bridge Model•0.038% error for the duty cycle test•10.04% error for the voltage output test•Meets the ±20% Specification
•PWM Model•Average of 0.24% error •This meets the ±20% specification
27
Presentation Outline
•Kevin Block•Timothy De Pasion•Overview•H-Bridge Model/PWM Model•Kinematic Model•Dynamic Model•Future Work
•Benjamin Roos•Alexander Schmidt•Conclusion
28
Simulink System: Kinematic Model
29
Motor Coupling
Differential Motor Model
Motor Coupling
x
Vehicle Dynamic Model
Rotary Encoder Model
Vehicle Kinematic
Model
VelocityPosition XPosition Y
AccelerationOrientation
5
x
User Input
User Input
Rotational Velocity2
Pulses per Rotation
Controller
2
H-Bridge/PWM
Fig. 12 – Simulink System Block Diagram
Kinematic Model
•The motion of the theoretical vehicle model
•Modified the standard differential drive kinematic model
30Fig. 13 – Standard Differential Drive Center Point
Kinematic Model: Center of Gravity
31Fig. 14 – Theoretical Vehicle Center of Gravity
Kinematic Model: Simulink Model
32
Fig. 15 – Simulink Kinematic System
Kinematic Model: Results
33Fig. 16 – Standard Kinematic Model Versus the Modified Model
Presentation Outline
•Kevin Block•Timothy De Pasion•Overview•H-Bridge Model/PWM Model•Kinematic Model•Dynamic Model•Future Work
•Benjamin Roos•Alexander Schmidt•Conclusion
34
Simulink System: Dynamic Model
35Fig. 17 – Simulink System Block Diagram
Dynamic Model
•Torque inputs into the Simulink motor model
36
Fig. 18 – Dynamic Model Connection to Motor Model
Dynamic Model: Forces
•Aerodynamic Drag•Aerodynamic Lift•Gravitational•Rolling Resistance•Acceleration
37
Dynamic Model
38
Fig. 19 – Dynamic Vehicle Model
Dynamic Model: Results
39Fig. 20 – Torque Output of Dynamic Model
Dynamic Model: Results
40Fig. 21 – Velocity Output of Motor Model with Dynamic Model
Presentation Outline
•Kevin Block•Timothy De Pasion•Overview•H-Bridge Model/PWM Model•Kinematic Model•Dynamic Model•Future Work
•Benjamin Roos•Alexander Schmidt•Conclusion
41
Future Work
42
February
15-25 29 2-13 16-20 23 27-30 3 6-13 17 20-31 3-28
Experimental Platform Integration
Simulink Integration
Controller Development
Controller Model
Terrain Testing
Experimental Platform Testing
Simulink System Testing
November December January
Task Name
Fig. 22 Tim’s Future Gantt Chart
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•Conclusion
43
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Overview•Initial Generator Current Control Circuit Testing•Circuit Plant Model Estimation•Circuit Controller•Future Work
•Alexander Schmidt•Conclusion
44
Overview
45Fig. 23 – Ben’s Gantt Chart
4 7 11 14 18 21 25 28 1 4 8 11 15 18 22 25
Current Source Research and Experimental
Digital Filter
Dynamic Model
October NovemberTask Name
Experimental Platform: Current Source
46
Fig. 24 – Current Source Located in the Experimental Platform
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Overview•Initial Generator Current Control Circuit Testing•Circuit Plant Model Estimation•Circuit Controller•Future Work
•Alexander Schmidt•Conclusion
47
Generator Current Control Design
48
•Current through RS is delivered to the generator
•VS = supply voltage
•VG = induced voltage
•VI = current control voltage
Fig. 25 – Basic Current Source Diagram
Initial Circuit Testing: Generator Load
49
Fig. 26 – Current Source Testing Schematic
Initial Circuit Testing: Generator Load
50
Fig. 27 – Physical Circuit Step Response
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Overview•Initial Generator Current Control Circuit Testing•Circuit Plant Model Estimation•Circuit Controller•Future Work
•Alexander Schmidt•Conclusion
51
PSPICE Circuit Testing
•PSPICE generator load output matches physical observations
52Fig. 28 – PSPICE Circuit Step Response
PSPICE Plant Model Estimation•PSPICE op-amp and BJT-generator sub-circuits tested for frequency response
53Fig. 29 – Frequency Response of Open Loop Circuit System
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Overview•Initial Generator Current Control Circuit Testing•Circuit Plant Model Estimation•Circuit Controller•Future Work
•Alexander Schmidt•Conclusion
54
Current Circuit Controller
•Lead-compensator to cancel pole at crossover•Pole placed near DC to ground AC signals
55Fig. 30 – Compensated Nonlinear Frequency Response of Open Loop Circuit System
Compensated Circuit Testing
56
Fig. 31 – Compensated Physical Circuit Step Response
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Overview•Initial Generator Current Control Circuit Testing•Circuit Plant Model Estimation•Circuit Controller•Future Work
•Alexander Schmidt•Conclusion
57
Future Work
58
February
15 18-22 25-29 2-6 9-13 16-30 3 6-10 13-17 20-31 3-28
Digital Filter
Experimental Platform Integration
Efficiency Model
Controller Development
Controller Model
Experimental Platform Testing
Simulink System Testing
JanuaryDecemberNovemberTask Name
Fig. 32 – Ben’s Future Gantt Chart
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•Conclusion
59
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
•Overview
•Motor System Identification•Cogging Torque Measurement•Cogging Torque Modeling•Cogging Torque Tuning•Future Work
•Conclusion
60
Overview
61
4 7 11 14 18 21 25 28 1 4 8 11 15 18 22
Cogging Torque Experimental and Research
Cogging Torque Model
Experimental Thermal Measurements
Thermal Simulink Model
October NovemberTask Name
Fig. 33 – Alex’s Gantt Chart
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
•Overview
•Motor System Identification•Cogging Torque Measurement•Cogging Torque Modeling•Cogging Torque Tuning•Future Work
•Conclusion
62
Motor Model
63
Fig. 34 – Motor Model
Motor Model
64Fig. 35 – Advanced Motor Model
Motor Variable Identification
65Fig. 36 – Experimental Motor Response
Motor Parameter Identification
66Fig. 37 – Coulomb & Viscous Friction
Motor Parameter Identification
67
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
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
•Overview
•Motor System Identification•Cogging Torque Measurement•Cogging Torque Modeling•Cogging Torque Tuning•Future Work
•Conclusion
68
Current Probe Method
69Fig. 38 – Cogging Torque Current Scope Waveform
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
•Overview
•Motor System Identification•Cogging Torque Measurement•Cogging Torque Modeling•Cogging Torque Tuning•Future Work
•Conclusion
70
Adjusting For Current Variations
•How do we handle Cogging Torque?
•Adjusting with Nonlinear Gain
71Fig. 39 – Flowchart for Cogging Torque
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
•Overview
•Motor System Identification•Cogging Torque Measurement•Cogging Torque Modeling•Cogging Torque Tuning•Future Work
•Conclusion
72
Without Nonlinear Gain
73
Fig. 41 – Current Output without GainFig. 40 – Voltage Input
With Nonlinear Gain
74
Fig. 42 – Voltage Input Fig. 43 – Current Output with Gain
Results
75Fig. 44 – Experimental Vs Simulink Motor Response
Results
76Fig. 45 – Zoomed Experimental Vs Simulink Motor Response
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
•Overview
•Motor System Identification•Cogging Torque Measurement•Cogging Torque Modeling•Cogging Torque Tuning•Future Work
•Conclusion
77
Future Work
78
February
15-22 25 29 2-6 9-13 16-20 23 27-30 3 6-17 20-31 3-28
Experimental Platform Integration
Efficiency Model
Simulink Integration
Controller Development
Controller Model
Experimental Platform Testing
Simulink System Testing
November December JanuaryTask Name
Fig. 46 – Alex’s Future Gantt Chart
Presentation Outline
•Background•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt•Conclusion
79
Conclusion
•Kevin has completed:•Serial Communication•Input Command•Disturbance Command•I2C
80
Conclusion
•Timothy has completed:•H-Bridge Model•PWM Model•PWM Frequency Optimization•Kinematic Model•Dynamic Model
81
Conclusion
•Benjamin has completed:•Generator Torque Disturbance Control Circuitry
82
Conclusion
•Alexander has completed:•Motor Analysis•Cogging Torque Analysis•Cogging Torque Modeling•Simulink Testing
83
Objectives Completed:
•Cogging Torque Modeled ✓
•Current Source Developed and Modeled ✓
•Kinematic Model Finished ✓
•Dynamic Models Finished ✓
•Input Commands Communicated ✓
•Disturbance Commands Communicated ✓
•I2C Communication Established with DAC ✓
84
Summary
•On schedule for project completion
85
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
November 24, 2015
Appendix Slides
•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
87
Input and Disturbance Commands: Baud Rate
88
UBRR: USART Baud Rate Registers
𝐵𝐴𝑈𝐷 =𝑓𝑂𝑆𝐶
16 𝑈𝐵𝑅𝑅+1[1]
I2C Communication: Clock Speed
89
TWBR: TWI Bit Rate RegisterTWPS: TWI Bit Rate Prescalar
𝑓𝑆𝐶𝐿 =𝑓𝑂𝑆𝐶
16+2 𝑇𝑊𝐵𝑅 ∗4𝑇𝑊𝑃𝑆 [2]
I2C Communication: MCU Limitations
•2 8-bit Timers•1 PWM Channel Apiece
•2 16-bit Timers•3 PWM Channels Apiece
90
I2C Communication: Project Requirements
•2 8-bit Timers for Rotary Encoders
•2 16-bit Timers for 4 PWM Channels
•1 Timer for Interrupt Generation
91
Appendix Slides
•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
92
Theoretical Vehicle Design
•Battery Calculations•Part Choices•Force Calculations•Wheel Size Calculations
93
Battery Calculations
•Sum of the current required from each of the components•Motor Current: 2.5 A each•Other components: 1,064 mA
•Use three batteries•7.2 Volt, 2800 mAh•Two 12 Volt, 1600 mAh
•Gives a test length of 38.4 minutes
94
Part Choices
•These choices were purely theoretical•Interfacing all of the parts was not considered•Goal was to get a realistic theoretical vehicle to model
95
Parts:• 2 Motors• BeagleBone Black• Xbee• Compass• Pixy and pan/tilt
• 4 Ultrasonic Sensors• 2 12 Volt batteries• 7.2 Volt battery• ATmega128 development board
Wheel Size Calculations
•Mass of the Vehicle: 3,876 g
•Maximum incline: 15 degrees
•Maximum Velocity: 20 ft/s
•Calculated wheel radius: 24.78 mm
96
Wheel Size: Equations
𝑅𝑅 𝑙𝑏 = 𝐺𝑉𝑊 𝑙𝑏 × 𝐶𝑟𝑟 [3]
𝐺𝑅 𝑙𝑏 = 𝐺𝑉𝑊 𝑙𝑏 × sin ∝ [4]
𝐹𝐴 𝑙𝑏 = 𝐺𝑉𝑊 𝑙𝑏 ×𝑉𝑚𝑎𝑥
𝑓𝑡
𝑠
32.2𝑓𝑡
𝑠2×𝑡𝑎[𝑠]
[5]
𝑇𝑇𝐸 𝑙𝑏 = 𝑅𝑅 𝑙𝑏 + 𝐺𝑅 𝑙𝑏 + 𝐹𝐴 𝑙𝑏 [6]
𝑅𝑤 𝑖𝑛 =𝑇𝑤 𝑙𝑏−𝑖𝑛
𝑇𝑇𝐸 𝑙𝑏 ×𝑅𝑓[7]
97
Final Vehicle Design
98Fig. 47 – Theoretical Vehicle Design
Rotary Encoder Model
•Specification: Model the physical rotary encoder output to within ±20%
•Approach: Convert the internal velocity input to internal shaft position, use the internal shaft position to estimate the frequency of the rotary encoder output
99
Rotary Encoder Model
100
Fig. 48– Rotary Encoder Model
Rotary Encoder Model: Conversion
101
Fig. 49 – Conversion Subsystem
Rotary Encoder Model: Rounding
102
Fig. 50 – Rounding Subsystem
Rotary Encoder Model: Frequency Creation
103
Fig. 51 – Frequency Creation Subsystem
Rotary Encoder Model: Index Creation
104
Fig. 52 – Index Creation Subsystem
Rotary Encoder Model: Channel B
105Fig. 53 – Channel B Creation
Rotary Encoder Model: Pulse Generator
106Fig. 54 – Pulse Generator Subsystem
Rotary Encoder Model: Channel A
107
Fig. 55 –Channel A Creation Subsystem
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.84% over the whole range, maximum instantaneous error of 21.73%•Meets the specification
108
Command Conditioning Model
•Used to convert an input velocity command into something that the system will recognize
•Convert velocity in RPM into pulses
109Fig. 56 – Command Conditioning Model
PWM Frequency Optimized
•Test to find a frequency where the rotary encoder error is minimal
•Frequency swept from 8 kHz to 40 kHz at 20% and 80% duty cycles
•Found that there was little error (1.7%) due to the PWM Frequency
•Choose to stick with a 15,625 Hz frequency that the microcontroller can easily generate
110
PWM Frequency Optimized
•Linear result at 15,625 Hz
111Fig. 57 – Rotary Encoder Output Due to PWM Input
In Depth View of Kinematic Model
•2 Subsystems
•Angle Calculation Subsystem
•Position Calculation Subsystem
112
Kinematic Model
113
Fig. 58 – Internal Kinematic Model
Angle Calculation
114
Fig. 59 – Angle Calculation Subsystem
Position Calculation
115
Fig. 60 – Position Calculation Subsystem
Dynamic Model: Velocity Torques
116Fig. 61 – Torques Affect by Velocity in Dynamic Model
Dynamic Model: Angle Torques
117
Fig. 62 – Torques Affected by Angles in Dynamic Model
In Depth View of Dynamic Model
•Rolling Torque
118
Fig. 63 – Rolling Torque Subsystem
In Depth View of Dynamic Model
•Gravitational Torque
119
Fig. 64 – Gravitational Torque Subsystem
In Depth View of Dynamic Model
•Aerodynamic Lift Torque
120
Fig. 65 – Aerodynamic Lift Torque Subsystem
In Depth View of Dynamic Model
•Aerodynamic Drag Torque
121
Fig. 66 – Aerodynamic Drag Torque
In Depth View of the Dynamic Model
•Acceleration Torque
122
Fig. 67 – Acceleration Torque Subsystem
H-Bridge Model
•Modeled as a variable gain
•Test the physical H-Bridge duty cycle and voltage output versus the Simulink model duty cycle and voltage output
•Results: •0.038% error for the duty cycle test•10.04% error for the voltage output test•Meets the ±20% Specification
123
H-Bridge Model
124
Fig. 68 – H-Bridge Model in Simulink
In Depth View of H-Bridge Model
125
Fig. 69 – Supply Limiting Function in H-Bridge
Fig. 70 – Normalize PWM Input Function
PWM Model
•Use an input frequency and an input duty cycle and generate a PWM waveform based off of those inputs
•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•This meets the ±20% specification
126
PWM Model
127
Fig. 71 – PWM Model in Simulink
Appendix Slides
•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
128
Physical Current Source Testing
129
Fig. 72 – Gain Reduction Compensated Physical Current Source Circuit 1V Step Response
Compensated Circuit Schematic
130
Fig. 73 – Compensated Lead Network Current Source Circuit Schematic
Compensated Linear Frequency Response
131
Fig. 74 – Compensated Open Loop Linear Frequency Response of Current Source Circuit
Nonlinear Current Source Gain
132
Fig. 75 – Nonlinear Current Source Gain Adjustment for Better PSPICE Matching
Current Source Circuit Plant
𝐺𝑝𝑙𝑎𝑛𝑡 = 𝐺𝑜𝑝−𝑎𝑚𝑝 ∗ 𝐺𝐵𝐽𝑇−𝑔𝑒𝑛𝑠𝑒𝑡 ∗ 𝐺𝑔𝑎𝑖𝑛−𝑚𝑜𝑑 [8]
133
Current Source Circuit Plant: Op-Amp
𝐺𝑜𝑝−𝑎𝑚𝑝 𝑠 = (119 ∗ 103)1
(1
2𝜋∗10𝑠+1)(
1
2𝜋∗1.22∗106𝑠+1)
[9]
134
135
𝐺𝐵𝐽𝑇−𝑔𝑒𝑛𝑠𝑒𝑡 𝑠 =1
(1
2𝜋∗104𝑠+1)2(
1
2𝜋∗3∗105)2
[10]
Current Source Circuit Plant:Transistor and Generator
136
𝐺𝑐𝑜𝑚𝑝𝑒𝑛𝑠𝑎𝑡𝑜𝑟 𝑠 = 0.233(
1
2𝜋∗3.18∗104𝑠+1)
(1
2𝜋∗15.9𝑠+1)(
1
2𝜋∗1.38∗105𝑠+1)(
1
2𝜋∗106𝑠+1)
[11]
Current Source Compensator
PSPICE Current Source Testing
137
Fig. 76 – Compensated PSPCE Current Source Circuit 0.5V Step Response
PSPICE Current Source Testing
138
Fig. 77 – Compensated PSPCE Current Source Circuit 0.25V Step Response and DC Offset
Physical Current Source Testing
139
Fig. 78 – Compensated Physical Current Source Circuit 0.25V Step Response and DC offset
Op-Amp: LMC6482
Maximum Ratings:
Supply Voltage: 15.5 V
Sourcing Output Current: 8 mA
140
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 Current (Continuous): 5 A
Total Power Dissipation: 65 W
141
Source: Motorola, Inc., “Plastic Medium-Power Complementary Silicon Transistors,” TIP120 Datasheet, 1995.
Appendix Slides
•Kevin Block•Timothy De Pasion•Benjamin Roos•Alexander Schmidt
142
Top Level
143Fig. 79 – Full Motor Simulink Model
Motor Model
144Fig. 80 – Internal Motor Simulink Model
Coulomb Friction
145Fig. 81 – Coulomb Friction Block
Static Friction
146Fig. 82 – Static Friction Block
Static Friction Logic
147
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. 83 – Static Friction Code
Position
148Fig. 84 – Position Block
Cogging Torque
149Fig. 85 – Cogging Torque Block
Cogging Torque Logic
150Fig. 86 – Cogging Torque Internal Logic Block
Gear Reduction
151Fig. 87 – Gear Reduction Block
Power Loss Block
152Fig. 88 – Power Loss Block
Thermals
153Fig. 89 – Internal Of Power Loss Block
Electrical Power Loss
154Fig. 90 – Electrical Power Loss
12 Volt Simulink Output
155Fig. 91 – 12 V Simulink Motor Output
Frequency Method
156
Fig. 92 – Left Oscilloscope Side Fig. 93 – Right Oscilloscope Side
Scale Method
157
Fig. 94 – 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
158
TABLE III. Cogging Current Data
Average Thermal Loss
159Fig. 95 – Thermal Average Output
Top Related