Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 ×...
Transcript of Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 ×...
![Page 1: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/1.jpg)
Laser Light Show
MILESTILE IIELEC 391
TEAM B1 × CONTROLLER
Muchen He 44638154
LuFei Liu 14090154
![Page 2: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/2.jpg)
RCGs
Requirements
Usable PID Values
Obtained
Encoder Detects All
Pulses
No Breadboards
Constraints
Control Frequency of
1000 Hz
Max Motor Current ( < 2A )
Max Encoder Resolution
( 400 pulses )
Goals
Rise Time ( < 0.017 s )
Overshoot( < 10 % )
Simulink Model of Motor Within
5 % Error
Support shapes with >5 vertices
![Page 3: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/3.jpg)
PROGRESSION
INITIAL SKETCHES LEGO PROOF OF CONCEPT MILESTONE RESULT
![Page 4: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/4.jpg)
MOTOR PARAMETERS
R, L (8.4 Ω , 1.12mH)
Measured using multimeter and
oscilloscope
Kτ ( 23.54 mNm
A)
Torque determined from
conservation of power
J ( 5.93 × 10−6 kg m2 )
Calculated from mechanical
time constant (time to reach 63%
of final speed)
Kv ( 628.5 RPM
V)
Back EMF calculated using KVL
B ( 4.964 × 10−6kgm2
s)
Kinetic friction from 𝑡𝑜𝑟𝑞𝑢𝑒
𝑠𝑝𝑒𝑒𝑑at no load conditions
o Resistance and Impedance
o Torque Constant
o Rotor Inertia
o Back EMF
o Kinetic Friction
𝑉 × 𝐼 = 𝜔 × 𝐾𝜏
𝜏𝑚 =𝐽 × 𝑅
𝐾𝜏2 𝑉measured − 𝐼 × 𝑅 = 𝐾𝑣 × 𝜔
𝐵 = 𝐾𝜏 ×𝐼𝑛𝑜 𝑙𝑜𝑎𝑑𝜔𝑛𝑜 𝑙𝑜𝑎𝑑
![Page 5: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/5.jpg)
SPEED REDUCTION
1 : 3½
o 1:3½ ratio
o Encoder wheel resolution increased by 3.5
o Torque increased by 3.5
o GT2 timing belt profile
o Custom high resolution 3D printed belt
drives
![Page 6: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/6.jpg)
Simulink Model with PID Control
Maps PWM to Average Voltage
Quantizes Angle to Encoder
Resolution
PWM Value between 0 - 255
Motor Transfer Function
Static Friction and Cogging
Derivative Gain on Velocity
Input StepOutput Position
![Page 7: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/7.jpg)
OPEN LOOP
RESPONSE
-50
0
50
100
150
200
250
300
-0.01 0.19 0.39 0.59 0.79 0.99 1.19
Using Power Supply Directly
MATLAB Value Experimental Value
Open loop response
data is used to verify
adequacy of obtained
motor parameters
![Page 8: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/8.jpg)
P
CONTROLModified MATLAB Model
accounts for values of
PWM less than 30 being
too low to overcome
cogging and static
friction
![Page 9: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/9.jpg)
PD
CONTROLSimulink model
adjusted for derivative
control on current
velocity instead of rate
of error change
This results in a negative
derivative gain
![Page 10: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/10.jpg)
INITIAL
CONTROL
o Obtained in MATLAB
o Aim for fastest rise time and
small overshoot
o Ensure system is stable
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
0 0.5 1 1.5 2 2.5
Initial PID Control Simulated Response
Acquired Position Desired Position
𝑲𝑷 17.7
𝑲𝑰 0.001
𝑲𝑫 -0.4
Overshoot 14.28 %
Rise Time 0.1 s
Settle Time 2 s
![Page 11: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/11.jpg)
PERFORMANCE
0.59, 202 2.43, 200
2.58, -6 4.42, 1
4.57, 198
-100
0
100
200
300
0.0 1.0 2.0 3.0 4.0 5.0 6.0
Position Vs. Time
MATLAB Simulation Actual Position
𝑲𝑷 17.7
𝑲𝑰 0.001
𝑲𝑫 -0.4
Overshoot 2 %
Rise Time 0.15 s
Settle Time 0.12 s
o Tested on the pitch motor
o Used PID values obtained in
MATLAB
o Measured performance by
sampling position via
controller
![Page 12: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/12.jpg)
MICROCONTROLLERo Arduino Uno and Arduino Nano is chosen for
its ease of use and safety features
o Considered using FPGA for hardware
accelerated tasks but compilation is too
slow and debugging is difficult ×
o Considered using 8051 microcontroller but
setup is too cumbersome and does not
support C++ software ×
Pin Configuration
Sensor input
PWM motor
control
Motor direction
control
Homing detect
Laser control
![Page 13: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/13.jpg)
CONTROLLER LOGIC
Proportional
Error = desired position
- current position
× proportional gain
Integral
Summation of error at
control frequency
× integral gain
Derivative
Sample speed at
control frequency
× derivative gain
Timer ISR
1000 Hz
+
Sensor
Input
Output
Logic
![Page 14: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/14.jpg)
QUADRATURE DECODING
State 01
State 11
State 00
State 10
Increment
Decrement
State
{A, B}
State Machine Software Implementation
• Extremely fast ISR
• No quadrature decoder hardware needed
• Faster than using quadrature decoder
Slot Detector A
Interrupt
A XOR B == 00 ?
Read Encoder A
Position++ Position - -
End ISR
Slot Detector B
Interrupt
End ISR
Read Encoder B
A XOR B == 00 ?
Position++ Position - -
![Page 15: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/15.jpg)
POSITION HOMING
Move motor until switch is triggered
Stop and reset motor home position
Proceed to normal operation
o Installed limit switch at the end
o Trigger event is done by polling at the start
o Reliable position reset routine
![Page 16: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/16.jpg)
1. Map desired laser
path to list of
coordinates in
custom-written
software
2. Inverse kinematics
are applied to
obtain angles
3. Angles are
converted to
encoder positions
4. Time vector is
generated based
on length of each
line segment
SHAPE VERTEX MAPPING
𝛉𝟏
𝛉𝟐
2
𝛉𝟏 = 7 pulses
𝛉𝟏3
0.8, -0.2
-0.7, 0.6
1
4A B
C
95 ms
105 ms
EXPORT
o Position: x and y are
exported in two arrays
of floats
o Time Vector: relative
time between
commands are
exported in an array
of integers
o The exported data is
in a .h file compiled to
the controller
![Page 17: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/17.jpg)
SYSTEM
PCB
Pins from Encoder
Extra 5V Pins
Diode BridgeArduino Base
Current Driver
12V Input Pins
![Page 18: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/18.jpg)
Slot detector circuit mount
with slots for height
adjustment
Eccentric standoffs for easy
positioning
Fastener slots for belt tension
adjustments
Custom encoder
wheel adapter
Movement track to reduce
stress on the shaft
Interchangeable
motor adapter
MECHANICAL FEATURES
Laser mount
Timing belt with 3½:1 ratio
![Page 19: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/19.jpg)
INTEGRATION
Integrate motors manufactured by motors sub-team
Obtain new motor parameters
Update system model
Adjust mechanical design
Retune PID controller
![Page 20: Laser Light Show Demo II - Home | Muchen He · Laser Light Show MILESTILE II ELEC 391 TEAM B1 × CONTROLLER Muchen He 44638154 LuFei Liu 14090154](https://reader034.fdocuments.us/reader034/viewer/2022042505/5f66a77fa7fa7c529521ea08/html5/thumbnails/20.jpg)
ELEC 391TEAM B1 × CONTROLLERMuchen He 44638154LuFei Liu 14090154
o Capable of 2 degree-of-
freedom movements
o PID controlled yaw motor
o Fast and accurate positioning
with minimum overshoot
o Accurate system model
o Modular design