code generation at mechatronics · philips innovation services, sasg oct 2011 6 dynamics, actuators...
TRANSCRIPT
Oct, 2011
Visit us at www.innovationservices.philips.com
Code Generation at Mechatronics
Philips Innovation Services
Philips Innovation Services, SASG Oct 2011
Contents
• Introduction Mechatronics
• Mechatronic design challenge
• Control-design ‘old-style’
• Control-design with code generation
• Code details
• Questions
2
Philips Innovation Services, SASG Oct 2011
Philips Innovation Services Position in Philips
Non-Philips
Customers
Healthcare Consumer
Lifestyle
Lighting
Royal Philips Electronics
Corporate
Technologies
IP&S
Research
Incubators
Philips
Innovation
Services
3
Philips Innovation Services, SASG Oct 2011
Philips Innovation Services
6 open access labs
> 15,000 electronic instruments
> 19,000 m2 laboratories
Incl. 9,500 m2 clean rooms
High Tech Campus
Eindhoven - NL
Green house
Prototyping & manufacturing
4
Materials
Analysis
Measurement Lab
RF
Thin Film
Clean room
Reliability lab Electronic
Prototyping
Systems
Engineering
Life Science
facility
Device Processing
Facilities
Photonics
Facility
Measurement &
instrumentation
Experience
lab
E-Science
Support
Mechatronics
Competence center
EMC
Center
Consulting Competence
Center
650 technical specialists / 50 consultants
Philips Innovation Services, SASG Oct 2011 5
Mechatronics
• Provides its customers with drives,
control and mechanical construction for
smooth motion and high accuracy
positioning
• Is both active in equipment and
subsystem design, as well as in
supporting the development of consumer
and healthcare products.
• Staff: 150 Technical specialists,40 %
University degree / Ph.D.s, 50 %
Bachelors & Engineers, 10 % other
education
• Customers:
Philips Innovation Services, SASG Oct 2011 6
Dynamics, Actuators & Control
Advanced System Design
High precision motion stages
Project management & supply chain
Healthcare systems
Robotics
System architecture
Vibro-Acoustics & Low
Noise Design
Electrical
Systems Design
Metrology
TEMS
Vacuum Mechatronics
Mechanical
Design
Control
Equipment
Design
Product
Development
Tribology/Air
bearings
Electro
Mechanics
Dynamics
Production
Systems
Mechatronics Competences
Motion Control
Software
G
KFB,x
SPGx
Kfay,x
KFB,y
Kfax,x
Kfsy,x
Kfsx,x
snap
acceleration
MIMO FF
Philips Innovation Services, SASG Oct 2011
Contents
• Introduction Mechatronics
• Mechatronic design challenge
• Control-design ‘old-style’
• Control-design with code generation
• Code details
• Questions
7
Philips Innovation Services, SASG Oct 2011 8
Reflective electron beam lithography
Challenge
• Rotary stage 1.2 m diameter
• High Accuracy positioning
Results
• MagLev rotary stage
• Performance well within specification
• Prototypes installed at customer
Customer Benefits
• Competitive platform for introduction direct
write technology
• Throughput wph/footprint
• Low energy dissipation (low forces)
Philips Innovation Services, SASG Oct 2011 9
Design Challenge: measure disc position
N
E
S
X
X
Z
Y
Reference and sensors
ZW
ZN/ZS
ZN
ZS
XE XW
YN
YS
XW XE
Philips Innovation Services, SASG Oct 2011 10
Design Challenge: Sensor transformations
N
E
S
X
X
Z
Y
Reference and sensors
ZW
ZN/ZS
ZN
ZS
XE XW
YN
YS
XW XE 4 x sensor Axial
4 x sensor Radial
Transformation
5DOF 8 5
Philips Innovation Services, SASG Oct 2011 11
Design Challenge: Sensor linearization required
4 x sensor Axial
4 x sensor Radial
Transformation
5DOF 8 5
Linearize Axi
Linearize Rad
Philips Innovation Services, SASG Oct 2011 12
Design Challenge: Ref surface is not flat
4 x sensor Axial
4 x sensor Radial
Transformation
5DOF 8 5
Linearize Axi
Linearize Rad
N
E
S
X
Y
ZN
ZS
XE XW
YN
YS
1e-006
2e-006
3e-006
4e-006
30
210
60
240
90
270
120
300
150
330
180 0
Philips Innovation Services, SASG Oct 2011 13
Design Challenge: Add calibration table
4 x sensor Axial
4 x sensor Radial
5DOF
Transformation
8 5
Linearize Axi
Linearize Rad
Axi Correction Table
Rad Correction Table
Angle Sensor
Philips Innovation Services, SASG Oct 2011 14
Design Challenge: Angle linearization required
4 x sensor Axial
4 x sensor Radial
5DOF
Transformation
8 5
Linearize Axi
Linearize Rad
Axi Correction Table
Rad Correction Table
Angle Sensor Linearize Angle
Philips Innovation Services, SASG Oct 2011 15
Design Challenge: Surfaces change with speed
6 x sensor Axial
6 x sensor Radial
5DOF
Transformation
8 5
Linearize Axi
Linearize Rad
Axi Correction Table
Rad Correction Table
Angle Sensor Linearize Angle
Periodic update Calc new
Corr tables
Philips Innovation Services, SASG Oct 2011
Implementation: measurement system
16
MAC_PosSensors
2
MAC_COG
1
cos0:0
sin0:0
SurfaceCorrection
DiskAngle SurfaceCorrection
MAC_Sensors
MAC_PosSensors
MAC_RadCor_Sensors
MAC_AxiCorSensors
Gain 1
gpMAC _M_SensorsToSRF * u
Gain
gpMAC _M_SRFtoCOG * u
zeros(3,1)
0:0
gpMAC _M_RotationPointShift0:0
gpMAC _SRF_Offsets0:0
Constant
gpMAC _M_UseSurfaceCorrections0:0
CaptureCorSignals
EQCP Tracer
DiskAngle
1
gsMAC_M_RadCorSensors
gsMAC_M_AxiCorSensors
gsMAC_M_PosSensors gsMAC_M_SensorsAfterSurfCor
gsMAC_M_SurfaceCor
gsMAC_M_Position
Philips Innovation Services, SASG Oct 2011
Implementation: sensor linearization
17
MAC_AxiCorSensors
3
MAC_RadCor _Sensors
2
MAC_PosSensors
1
Terminate ZN ZE
Terminate XE XW YN
I_Rad330
AnalogIn
I_Rad020
AnalogIn
I_PosZW
AnalogIn
I_PosZS
AnalogIn
I_PosZN
AnalogIn
I_PosZE
AnalogIn
I_PosYS
AnalogIn
I_PosYN
AnalogIn
I_PosXW
AnalogIn
I_PosXE
AnalogIn
I_Axi330
AnalogIn
I_Axi020
AnalogIn
double
double
double
gpMAC _M_DiffSensorOffsets0:0
Ax9
0:0Ax8
0:0Ax7
0:0Ax6
0:0
Ax5
0:0Ax4
0:0
Ax3
0:0Ax2
0:0
Ax11
0:0Ax10
0:0
Ax1
0:0Ax
0:0
gsMAC_M_CorrectedDiff
Philips Innovation Services, SASG Oct 2011
Implementation: Ref correction
18
SurfaceCorrection
1
mod
mod
Lookup Radial
0:0
Lookup Axial
0:0
double
2*pi
0:0
gpMAC _M_RadSensorPositions0:0
gpMAC _M_AxiSensorPositions0:0
Enable
DiskAngle
1
Philips Innovation Services, SASG Oct 2011
Contents
• Introduction Mechatronics
• Mechatronic design challenge
• Control-design ‘old-style’
• Control-design with code generation
• Code details
• Questions
19
Philips Innovation Services, SASG Oct 2011 20
Motion Control Design flow ‘old-style’
Mech Designer Control Designer
User Spec
Concept design
and analysis Control design
Philips Innovation Services, SASG Oct 2011 21
Motion Control Design flow ‘old-style’
Control model
Signal ▬ PID
Sensor Xform
Plant Filter
Philips Innovation Services, SASG Oct 2011 22
Motion Control Design flow ‘old-style’
Mech Designer Control Designer
User Spec
Software Spec
Software Designer
Main()
{
doit();
}
Signal
▬
P
I
D
Sensor
Xfor
m
Plant
F
i
l
t
e
r
Philips Innovation Services, SASG Oct 2011 23
Motion Control Design flow ‘old-style’
Mech Designer Control Designer
User Spec
Software Spec
Software Designer
Main()
{
doit();
}
Language
Barrier!
Signal
▬
P
I
D
Sensor
Xfor
m
Plant
F
i
l
t
e
r
Philips Innovation Services, SASG Oct 2011
Contents
• Introduction Mechatronics
• Mechatronic design challenge
• Control-design ‘old-style’
• Control-design with code generation
• Code details
• Questions
24
Philips Innovation Services, SASG Oct 2011 25
Motion Control Design flow using code generation
Mech Designer Control Designer
User Spec
Concept design
and analysis Control design
Philips Innovation Services, SASG Oct 2011 26
Motion Control Design flow using code generation
Control model
Signal ▬ PID
Sensor Xform
Plant Filter
Philips Innovation Services, SASG Oct 2011 27
Motion Control Design flow using code generation
Mech Designer Control Designer
User Spec
Software Spec + mdl
Software Designer
Signal
▬
P
I
D
Sensor
Xfor
m
Plant
F
i
l
t
e
r
Signal ▬
PID
Sensor
Xform
Plant
Filter
Main()
{
doit();
}
Philips Innovation Services, SASG Oct 2011 28
Motion Control Design flow using code generation
Mech Designer Control Designer
User Spec
Software Spec + mdl
Software Designer
Signal ▬
PID
Sensor
Xform
Plant
Filter
Main()
{
doit();
}
Same
Language
Philips Innovation Services, SASG Oct 2011 29
Motion Control Design flow using code generation
Mech Designer Control Designer
User Spec
Software Spec + mdl
Software Designer
Main()
{
doit();
}
Same model
Allows fast
iterations Signal ▬
PID
Sensor
Xform
Plant
Filter
Philips Innovation Services, SASG Oct 2011
Contents
• Introduction Mechatronics
• Mechatronic design challenge
• Control-design ‘old-style’
• Control-design with code generation
• Code details
• Questions
30
Philips Innovation Services, SASG Oct 2011
Code details
• Used in 10+ projects, various applications (RobotArm … REBL)
– Sample rates 500Hz … 20kHz
– # controlled axes 1 – 15
– No defects found yet!
• Control models only, no state diagrams
– General Matlab/Simulink blocks from library
– Hardware inputs and output blocks are custom designed
– Some custom blocks to interface with C++ code
31
Philips Innovation Services, SASG Oct 2011
Code details
– Efficiency of the generated code:
• Double precision math by default
• Simulink blocks that are not enabled are not evaluated
• 30k lines at 4kHz on 2.8GHz P4.
– RTW-generated code is not nice to read
• Each block in the model becomes a little code-block
• The program is an ‘endless’ list of code-blocks
• A signal with a name becomes a variable with same name
32
Philips Innovation Services, SASG Oct 2011
Code details: conclusion
• Pros
– No language barrier with other mechatronic disciplines
– Fast iterations in integration phase
– No bugs
• Cons
– Toolchain licensing
– Testing
– In Simulink variable scope is flat: use naming convention
• Note
• Some effort required for creating custom IO blocks
33
Philips Innovation Services, SASG Oct 2011
Questions
?
34
Philips Innovation Services, SASG Oct 2011