Master planar transformation mathematics through SCARA robot PCB assembly programming. Learn complex number rotations, 2D rotation matrices, forward and inverse kinematics calculations, and precision pick-and-place programming for electronics manufacturing applications.
🎯 Learning Objectives
By the end of this lesson, you will be able to:
Applycomplex number mathematics for elegant 2D rotation calculations using
Calculateforward kinematics from joint angles to end-effector position
Solveinverse kinematics with elbow-up and elbow-down configurations
Compose2D rotation matrices for orientation control
Programpick-and-place operations with sub-millimeter accuracy
🔧 Real-World Engineering Challenge: Planar Motion Control
Planar motion systems span robotics, manufacturing, and autonomous navigation. From precision assembly robots placing electronic components with micrometer accuracy, to CNC machines cutting complex curves in composite materials, to mobile robots navigating warehouses - all require precise mathematical control of 2D position and orientation.
Representative Systems
Planar Motion Applications:
Assembly Robots (SCARA, delta robots) - pick-and-place with orientation control
Engineering Question: How do we mathematically represent and program complex 2D trajectories that combine rotations, translations, and orientations in a systematic, precise manner that works across diverse applications?
Why Planar Mathematics Matters
Consequences of Poor Mathematical Foundation:
Programming errors leading to collisions, missed targets, or navigation failures
Inefficient trajectories with unnecessary motion and longer cycle times
Orientation errors causing assembly failures or incorrect tool angles
Workspace limitations from inadequate mathematical modeling
Calibration difficulties without systematic transformation framework
Benefits of Systematic Planar Analysis:
Precise motion programming using mathematical transformation tools
Optimal trajectory planning through systematic matrix composition
Consistent coordinate frame management across different work areas
Scalable programming methods applicable to complex 3D systems
Unified approach for diverse applications (robotics, CNC, navigation)
📚 Fundamental Theory: Planar Transformation Mathematics
Complex Number Representation of Planar Motion
Complex numbers provide an elegant mathematical framework for representing 2D rotations and translations. Every point in the plane can be represented as a complex number z = x + iy, and transformations become simple algebraic operations.
🔢 Complex Number Planar Point
Where:
= Complex number representing 2D point
= Cartesian coordinates (real and imaginary parts)
= Distance from origin (magnitude)
= Angle from positive real axis (phase)
Physical Meaning: Every 2D point corresponds to a unique complex number, enabling algebraic manipulation of geometric transformations.
A SCARA robot must pick an SMD (Surface Mount Device) component from a component tray and place it on a PCB with precise position and orientation control.
🔧 Equivalent System Model
Given:
Robot parameters: L₁ = 350 mm, L₂ = 250 mm
Component tray position: (450, 200) mm, orientation 30°
PCB position: (-200, 300) mm, orientation -45°
Required component rotation: 75° during transfer
Placement accuracy: ±0.05 mm position, ±0.1° orientation
Step 1: Forward Kinematics - Complex Number Approach
Click to reveal forward kinematics calculations
Complex number representation of joint positions:
Link 1 endpoint:
Link 2 endpoint (end-effector):
Total end-effector position:
Expanding to Cartesian coordinates:
Separating real and imaginary parts: ✅
✅
Example calculation - Pick position (450, 200) mm:
Assuming , (to be verified by inverse kinematics):
This doesn’t match target (450 mm), so we need inverse kinematics to find correct angles.
Tool orientation:
Total tool angle: ✅
Step 2: Inverse Kinematics - Elbow Configurations
Click to reveal inverse kinematics calculations
Geometric inverse kinematics for pick position (450, 200):
Segment 1: Straight line from start, then arc to avoid obstacle
Segment 2: Arc around obstacle (maintains constant distance)
Segment 3: Arc transitioning to final approach, then straight to goal
Key waypoints (manually chosen to avoid obstacle):
Waypoint
Description
Position (m)
Orientation
P₀
Start
(0, 0)
0°
P₁
Pre-arc
(2, 0)
0°
P₂
Arc start
(3, 1)
30°
P₃
Arc mid
(4.5, 3.5)
60°
P₄
Arc end
(6, 5)
90°
P₅
Goal
(8, 6)
45°
Arc center calculation for Segment 2 (P₂ to P₄):
Given P₂ = (3, 1) and desired radius R = 3 m:
Arc center perpendicular to left of robot at P₂ (θ = 30°):
Center offset direction (rotate 90° left from heading):
Arc center in complex form: ✅
Center position: m ✅
Verification - distance from center to P₂:
✅ (equals radius R)
Step 2: Arc Trajectory Mathematics Using Complex Numbers
Click to reveal arc trajectory calculations
Parametric arc equation (Segment 2: P₂ to P₄):
Arc center:
Starting angle (from center to P₂):
✅
Ending angle (from center to P₄):
✅
Arc sweep: ✅
Position along arc as function of angle α:
In Cartesian form: ✅
✅
Robot orientation along arc (tangent direction):
Tangent vector:
This represents a vector rotated 90° from the radius vector.
Orientation angle: ✅ (for counterclockwise arc, left turn)
Verification at α = -60° (P₂): ✅ (matches P₂ orientation)
Arc length calculation:
✅
Number of waypoints along arc (0.5 m spacing):
✅
Step 3: Collision Detection Using Complex Distance
Click to reveal collision detection calculations
Obstacle representation in complex form:
Obstacle center: (4, 2) m
Obstacle radius: m
Safety clearance: m
Total avoidance radius: m ✅
Distance from any point z to obstacle:
Collision condition:
Collision if m
Safe if m
Check all key waypoints:
Point
Position z
z - z_obs
Distance (m)
Safe?
P₀
0 + 0i
-4 - 2i
4.47
✅ Yes
P₁
2 + 0i
-2 - 2i
2.83
✅ Yes
P₂
3 + i
-1 - i
1.41
❌ No
P₃
4.5 + 3.5i
0.5 + 1.5i
1.58
❌ No
P₄
6 + 5i
2 + 3i
3.61
✅ Yes
P₅
8 + 6i
4 + 4i
5.66
✅ Yes
Analysis:
P₂ and P₃ are too close to the obstacle! We need to recalculate the arc with larger radius.
Revised arc calculation with R = 4 m:
New arc center from P₂ = (3, 1) with R = 4 m: ✅
Closest point on arc to obstacle:
The closest point is along the line from arc center to obstacle center.
Direction from arc center to obstacle:
Distance from arc center to obstacle center: ✅
Closest point on arc: ✅
Distance from closest arc point to obstacle:
❌ Still too close! (< 2.0 m required)
Revised arc with R = 5.5 m:
Following same process:
✅
Minimum clearance:
Wait, this means the arc center is inside the avoidance zone. Let me recalculate…
Actually: only if obstacle is outside the arc. Since and , the obstacle is inside the arc curve.
Correct minimum distance (from arc to obstacle):
❌ Still too close!
Final revised path - go around from the top with R = 3 m, but adjust P₂:
New P₂: with orientation 60°
Arc center: ✅
Distance from center to obstacle: ✅
Minimum clearance:
❌ Still less than 2.0 m!
Simpler approach - straight line segments avoiding obstacle:
Revised waypoints:
P₀: (0, 0), θ = 0°
P₁: (2, 0), θ = 53.13° (turn toward P₂)
P₂: (3, 4), θ = 45° (cleared obstacle)
P₃: (6, 5.5), θ = 45°
P₄: (8, 6), θ = 45° (goal)
Check P₂ clearance: ✅ (> 2.0 m required!)
Step 4: Waypoint Generation with 0.5m Spacing
Click to reveal waypoint generation
Segment P₀ to P₁ (straight, 2 m):
where
Point
s (m)
x (m)
y (m)
θ (°)
0
0.0
0.0
0.0
0
1
0.5
0.5
0.0
0
2
1.0
1.0
0.0
0
3
1.5
1.5
0.0
0
4
2.0
2.0
0.0
53.13
✅ 5 waypoints (orientation changes at P₁ for next segment)
Segment P₁ to P₂ (arc):
Vector from P₁ to P₂: ✅
For smooth arc, use radius R = 6 m:
Arc center perpendicular bisector method:
Midpoint:
Direction P₁→P₂:
Perpendicular: (for right turn)
Actually, let’s use direct complex parameterization instead:
Linear interpolation (simpler for this segment):
where ✅
Orientation along segment: ✅
Point
t
s (m)
x (m)
y (m)
θ (°)
5
0.121
0.5
2.12
0.48
76
6
0.242
1.0
2.24
0.97
76
7
0.364
1.5
2.36
1.46
76
8
0.485
2.0
2.49
1.94
76
9
0.606
2.5
2.61
2.42
76
10
0.727
3.0
2.73
2.91
76
11
0.848
3.5
2.85
3.39
76
12
0.970
4.0
2.97
3.88
76
13
1.000
4.12
3.0
4.0
45
✅ 9 waypoints (orientation changes to 45° at P₂)
Segment P₂ to P₃:
But we want constant 45° orientation, so use:
Point
t
s (m)
x (m)
y (m)
θ (°)
14
0.149
0.5
3.45
4.22
45
15
0.299
1.0
3.90
4.45
45
16
0.448
1.5
4.34
4.67
45
17
0.597
2.0
4.79
4.90
45
18
0.746
2.5
5.24
5.12
45
19
0.896
3.0
5.69
5.34
45
20
1.000
3.35
6.0
5.5
45
✅ 7 waypoints
Segment P₃ to P₄ (final to goal):
Point
t
s (m)
x (m)
y (m)
θ (°)
21
0.243
0.5
6.49
5.62
45
22
0.485
1.0
6.97
5.74
45
23
0.728
1.5
7.46
5.86
45
24
1.000
2.06
8.0
6.0
45
✅ 4 waypoints
Total waypoints: 5 + 9 + 7 + 4 = 25 waypoints ✅
📋 Summary and Next Steps
In this lesson, you mastered planar transformation mathematics through three applications: SCARA robot kinematics, CNC elliptical toolpaths, and mobile robot navigation.
Key Skills Developed:
Apply complex number mathematics: for elegant 2D transformations
Compose rotations and translations:
Calculate forward/inverse kinematics, parametric curves, and collision-free paths
Generate waypoints with tool offset compensation and orientation control
Comments