// DOC 05 / 07
MECHANICAL
ENGINEERING
Panduan mekanikal robotika: DH parameters, FK/IK analytical & numerical, gear train, bearing, poros, statics & dynamics, CAD workflow, 3D printing, FEA, material selection, Python Robotics Toolbox.
01
Kinematika
DENAVIT-HARTENBERG PARAMETERS
Konvensi DH adalah metode standar untuk mendeskripsikan kinematika robot lengan menggunakan 4 parameter per joint. Setiap link i memiliki frame koordinat yang didefinisikan relatif terhadap frame sebelumnya.
4 Parameter DH per joint:
a_i = panjang link (jarak antar sumbu z, sepanjang sumbu x)
α_i = twist link (sudut antara sumbu z_i-1 dan z_i, sekitar sumbu x_i)
d_i = offset joint (jarak sepanjang sumbu z_i)
θ_i = sudut joint (rotasi sekitar sumbu z_i) ← variabel untuk revolute
Matriks transformasi homogen T_i-1_i:
| cθ -sθ·cα sθ·sα a·cθ |
| sθ cθ·cα -cθ·sα a·sθ |
| 0 sα cα d |
| 0 0 0 1 |
Contoh: Robot 3-DOF Planar
| Joint i | a_i (mm) | α_i (deg) | d_i (mm) | θ_i (var) |
|---|---|---|---|---|
| 1 | 150 | 0 | 0 | θ₁ |
| 2 | 120 | 0 | 0 | θ₂ |
| 3 | 80 | 0 | 0 | θ₃ |
Tips DH
Untuk robot planar: semua α=0, semua d=0. Untuk robot 6-DOF seperti UR5: gunakan modified DH (Craig convention) — beda urutan parameter tapi hasil sama jika konsisten.02
Kinematika
FORWARD KINEMATICS
Forward Kinematics: joint angles → end-effector pose
T_0_n = T_0_1 · T_1_2 · T_2_3 · ... · T_(n-1)_n
Hasil T_0_n adalah 4×4 homogeneous transform:
[ R_3x3 | p_3x1 ]
[ 0 0 0 | 1 ]
R = rotation matrix end-effector relative to base
p = position (x,y,z) end-effector in base frame
import numpy as np def dh_matrix(a, alpha, d, theta): """Matriks transformasi DH standar 4x4""" ct, st = np.cos(theta), np.sin(theta) ca, sa = np.cos(alpha), np.sin(alpha) return np.array([ [ct, -st*ca, st*sa, a*ct], [st, ct*ca, -ct*sa, a*st], [ 0, sa, ca, d], [ 0, 0, 0, 1] ]) def forward_kinematics_3dof(theta1, theta2, theta3, L1=0.15, L2=0.12, L3=0.08): """Robot 3-DOF planar, panjang link dalam meter""" T1 = dh_matrix(L1, 0, 0, theta1) T2 = dh_matrix(L2, 0, 0, theta2) T3 = dh_matrix(L3, 0, 0, theta3) T = T1 @ T2 @ T3 x, y = T[0,3], T[1,3] psi = theta1 + theta2 + theta3 # total orientation return x, y, psi, T # Test: x,y,psi,T = forward_kinematics_3dof(np.radians(30), np.radians(45), np.radians(-15)) print(f"EE pos: ({x*1000:.1f}, {y*1000:.1f}) mm, orientasi: {np.degrees(psi):.1f}°")
03
Kinematika
INVERSE KINEMATICS
Inverse Kinematics: end-effector pose → joint angles
Analytical IK (3-DOF planar):
r = sqrt(x² + y²) -- jarak target dari base
c2 = (r² - L1² - L2²) / (2·L1·L2) -- cosine rule
θ2 = ±atan2(sqrt(1-c2²), c2) -- elbow up/down
θ1 = atan2(y,x) - atan2(L2·sin(θ2), L1+L2·cos(θ2))
θ3 = ψ_desired - θ1 - θ2
Numerical IK (Jacobian pseudo-inverse, works for any DOF):
Δq = J⁺ · Δx (J⁺ = Moore-Penrose pseudoinverse)
q_(k+1) = q_k + α·Δq
import numpy as np def ik_analytical_3dof(xd, yd, psi_d, L1=0.15, L2=0.12, L3=0.08, elbow_up=True): """Analytical IK 3-DOF planar. Returns (theta1,theta2,theta3) in rad.""" # Wrist center (kurangi kontribusi L3) xw = xd - L3*np.cos(psi_d) yw = yd - L3*np.sin(psi_d) c2 = (xw**2 + yw**2 - L1**2 - L2**2) / (2*L1*L2) if abs(c2) > 1: raise ValueError("Target di luar jangkauan!") s2 = np.sqrt(1 - c2**2) * (1 if elbow_up else -1) theta2 = np.arctan2(s2, c2) theta1 = np.arctan2(yw, xw) - np.arctan2(L2*s2, L1+L2*c2) theta3 = psi_d - theta1 - theta2 return theta1, theta2, theta3 def ik_numerical(target_pos, fk_fn, q0, alpha=0.5, iters=200, tol=1e-4): """Numerical IK dengan Jacobian finite difference""" q = np.array(q0, dtype=float) for _ in range(iters): x_cur = np.array(fk_fn(*q)[:2]) err = np.array(target_pos) - x_cur if np.linalg.norm(err) < tol: break # Jacobian finite difference J = np.zeros((2, len(q))); eps=1e-5 for i in range(len(q)): qp=q.copy(); qp[i]+=eps J[:,i] = (np.array(fk_fn(*qp)[:2]) - x_cur) / eps Jp = np.linalg.pinv(J) q += alpha * Jp @ err return q
04
Desain
GEAR TRAIN & AKTUATOR
Gear Ratio & Torsi
Gear ratio N = N_output / N_input = ω_input / ω_output
Torsi output: τ_out = τ_in × N × η (η = efisiensi, 0.7-0.95)
Kecepatan out: ω_out = ω_in / N
Reflected inertia ke motor: J_ref = J_load / N²
Total inertia motor: J_total = J_motor + J_ref
Pemilihan gear ratio optimal:
N_opt = sqrt(J_load / J_motor) → minimasi acceleration time
Perbandingan Aktuator
| Aktuator | Torsi | Kecepatan | Backdriv. | Berat | Harga | Use Case |
|---|---|---|---|---|---|---|
| DC Gearmotor | Med | Med | Mudah | Sedang | Murah | Wheeled robot, belt |
| BLDC + FOC | Tinggi | Tinggi | Mudah | Ringan | Sedang | Drone, manipulator |
| Servo Hobby | Low-Med | Med | Mudah | Ringan | Murah | Small arm, gripper |
| Dynamixel | Med-High | Med | Sulit | Sedang | Mahal | Research arm, bipedal |
| Harmonic Drive | Sangat Tinggi | Rendah | Tidak | Sedang | Sangat Mahal | Industrial 6-DOF |
| Linear Actuator | Tinggi | Rendah | Tidak | Berat | Sedang | Lift, heavy push |
Perhitungan Motor Drive
def motor_sizing(J_load_kgm2, omega_max_rpm, accel_time_s, gear_ratio, eta=0.85): omega_max = omega_max_rpm * 2 * np.pi / 60 # rpm → rad/s omega_motor = omega_max * gear_ratio J_ref = J_load_kgm2 / gear_ratio**2 alpha_motor = (omega_motor / accel_time_s) # max angular accel tau_accel = J_ref * alpha_motor tau_motor_min = tau_accel / eta power_min = tau_motor_min * omega_motor return { "omega_motor_rpm": omega_motor * 60 / (2*np.pi), "tau_min_Nm": tau_motor_min, "power_min_W": power_min }
05
Desain
BEARING & POROS
Pemilihan Bearing
| Tipe Bearing | Beban Radial | Beban Aksial | Kecepatan | Kebisingan | Aplikasi Robot |
|---|---|---|---|---|---|
| Deep groove ball | Tinggi | Sedang | Tinggi | Rendah | Motor shaft, wheel |
| Angular contact | Tinggi | Tinggi | Tinggi | Rendah | Spindle, aktuator |
| Tapered roller | Sangat Tinggi | Tinggi | Sedang | Sedang | Heavy wheel hub |
| Thrust ball | Rendah | Tinggi | Sedang | Rendah | Vertical screw |
| Slewing ring | Tinggi | Tinggi | Rendah | Sedang | Turntable, base joint |
Umur Bearing (L10)
L10 = (C/P)^p × 10^6 revolutions
C = dynamic load rating (dari katalog, N)
P = equivalent dynamic load (N)
p = 3 untuk ball bearing, 10/3 untuk roller bearing
P = X·Fr + Y·Fa
X, Y = load factors (dari tabel katalog)
Fr = radial force, Fa = axial force
L10h (jam) = L10 / (60 × n) n = rpm
Diameter Poros Minimum
Poros solid, pure torsi:
d_min = (16·T / (π·τ_allow))^(1/3)
Poros dengan bending + torsi (von Mises):
d_min = (16/(π·τ_allow) × sqrt(M² + T²))^(1/3)
τ_allow = S_y / (2 × SF) safety factor SF = 1.5–3
Baja ST37: S_y = 235 MPa, Baja ST60: S_y = 490 MPa
import numpy as np def shaft_diameter(T_Nm, M_Nm=0, Sy_MPa=235, SF=2.0): tau_allow = (Sy_MPa * 1e6) / (2 * SF) d = (16/(np.pi*tau_allow) * np.sqrt(M_Nm**2 + T_Nm**2))**(1/3) return d * 1000 # mm print(f"Diameter min: {shaft_diameter(T_Nm=5, M_Nm=3):.1f} mm")
06
Dinamika
STATICS & DYNAMICS
Static Equilibrium — Robot Link
Untuk robot statis:
ΣF = 0, ΣM = 0
Torsi joint untuk menahan beban gravitasi:
τ_i = Σ(m_j × g × d_j_projected) j = semua link di depan joint i
d_j_projected = jarak proyeksi CoM link j ke axis joint i
Jacobian gravity torque:
τ_gravity = J^T × F_gravity
Persamaan Gerak Robot (Newton-Euler)
M(q)·q̈ + C(q,q̇)·q̇ + G(q) = τ
M(q) = inertia matrix (n×n, positive definite)
C(q,q̇) = Coriolis + centripetal matrix
G(q) = gravity vector
τ = joint torques
Inverse dynamics: τ = M·q̈_desired + C·q̇ + G
→ digunakan untuk feed-forward control
import numpy as np def gravity_torques_2dof(theta1, theta2, L1=0.15, L2=0.12, m1=0.3, m2=0.2, g=9.81): """Gravity torques untuk 2-DOF planar robot vertical plane""" lc1 = L1/2; lc2 = L2/2 # CoM tiap link t1 = theta1; t12 = theta1 + theta2 # Torsi joint 2: hanya support link 2 tau2 = m2 * g * lc2 * np.cos(t12) # Torsi joint 1: support link 1 + link 2 tau1 = (m1*lc1 + m2*L1) * g * np.cos(t1) + m2*g*lc2*np.cos(t12) return tau1, tau2 t1, t2 = gravity_torques_2dof(np.radians(30), np.radians(45)) print(f"τ1={t1:.3f} Nm, τ2={t2:.3f} Nm")
07
CAD
CAD WORKFLOW ROBOTIKA
Workflow desain mekanik robot yang efisien menggunakan CAD parametrik.
Conceptual Design
Sketch tangan, identifikasi DOF, range of motion, payload, envelope. Tentukan jenis aktuator dan transmission.
Part Design
Model 3D tiap komponen. Gunakan parameter/variable untuk dimensi kritis. Feature: extrude, revolve, sweep, fillet.
Assembly
Rakit komponen dengan mate/constraint. Cek interference. Simulasikan range of motion. Hitung CoM tiap link.
Analysis
FEA untuk komponen kritis (bracket, poros). Kinematic simulation. Bill of Materials (BOM).
Manufacturing Drawing
2D drawing dengan toleransi (ISO 2768). GD&T untuk fitur kritis. Export STEP untuk vendor.
Software CAD untuk Robotika
| Software | Platform | Harga | Kelebihan | Robot Feature |
|---|---|---|---|---|
| Fusion 360 | Cloud/Win/Mac | Free(edu) | Integrated CAM+FEA | Joint simulation, STEP export |
| FreeCAD | Cross-platform | Free | Open source, Python API | Robotics workbench, URDF export |
| SolidWorks | Windows | Mahal | Industry standard | RobotStudio integration |
| Onshape | Browser | Free(edu) | Kolaboratif | Direct API, parametric |
| OpenSCAD | Cross-platform | Free | Code-based, parametric | Printable robot parts |
Export ke URDF
Gunakan FreeCAD RoboticsWorkbench atau sw_urdf_exporter (SolidWorks) untuk mengekspor model CAD langsung ke format URDF yang bisa digunakan di ROS2 dan Gazebo.08
Manufaktur
3D PRINTING DESIGN RULES
Aturan Desain FDM
| Parameter | Nilai Umum | Catatan |
|---|---|---|
| Min wall thickness | 1.2–2mm (PLA), 2mm (PETG) | Min 2–3 perimeter passes |
| Min hole diameter | 2mm (drill required <3mm) | Tambah 0.2mm tolerance untuk shaft fit |
| Overhang angle | ≤45° tanpa support | Support perlu jika >45° |
| Bridge length | Max 50mm tanpa support | Cooling fan penting |
| Infill untuk struktur | 30–60% gyroid/honeycomb | Gyroid terkuat isotropic |
| Layer height | 0.15–0.3mm standard | 0.1mm untuk detail tinggi |
| Fit clearance (shaft) | 0.2–0.4mm per sisi | Tergantung printer & material |
Material Robotika
| Material | Kekuatan | Suhu | Fleksibel | Berat | Aplikasi Robot |
|---|---|---|---|---|---|
| PLA | Sedang | ≤60°C | Tidak | 1.24g/cc | Prototype, non-load |
| PETG | Baik | ≤80°C | Sedikit | 1.27g/cc | Enclosure, light structure |
| ABS | Baik | ≤100°C | Tidak | 1.05g/cc | Functional parts (aseton finish) |
| ASA | Baik | ≤100°C | Tidak | 1.07g/cc | Outdoor UV-resistant |
| TPU 95A | Rendah | ≤100°C | Sangat | 1.21g/cc | Gripper, wheel, bumper |
| Carbon CF-PLA | Sangat Baik | ≤60°C | Tidak | 1.3g/cc | Light structural arms |
// OpenSCAD: Parametric robot wheel module wheel(r=30, w=20, hub_r=8, shaft_d=5, spokes=6) { difference() { union() { cylinder(r=r, h=w, center=true, $fn=64); cylinder(r=hub_r+3, h=w+4, center=true, $fn=32); } cylinder(r=shaft_d/2+0.3, h=w+10, center=true, $fn=32); for(i=[0:spokes-1]) rotate([0,0,i*360/spokes]) translate([r/2,0,0]) cylinder(r=(r-hub_r)/3, h=w-2, center=true, $fn=16); } }
09
FEA
FINITE ELEMENT ANALYSIS DASAR
FEA Process:
1. Geometry: import STEP/model CAD
2. Material: definisi E (modulus), ν (Poisson), ρ (densitas)
3. Mesh: diskretisasi ke elemen (tetrahedral, hexahedral)
4. BC: boundary conditions (fixed support, forces, pressures)
5. Solve: [K]{u} = {F}
K = global stiffness matrix
u = nodal displacement vector
F = force vector
6. Post: von Mises stress, displacement, factor of safety
Von Mises Stress Criterion
σ_vm = sqrt(σ₁² + σ₂² - σ₁σ₂) (2D plane stress)
σ_vm = sqrt(0.5[(σx-σy)² + (σy-σz)² + (σz-σx)² + 6(τxy²+τyz²+τzx²)])
Yield criterion: σ_vm < S_y / SF
SF (safety factor) = 1.5 (static, ductile) — 3.0 (dynamic/impact)
FOS = S_y / σ_vm_max → harus ≥ 1.5 untuk robot structural parts
FEA Tools
| Software | Tipe | Harga | Kelebihan |
|---|---|---|---|
| Fusion 360 Simulation | Cloud FEA | Free(edu) | Terintegrasi CAD, mudah |
| FreeCAD FEM | Open FEA | Free | Python scriptable, CalculiX |
| SimScale | Cloud FEA | Free tier | Browser-based, CFD juga |
| Ansys Student | Full FEA | Free(edu) | Industri standard, powerful |
| OpenFOAM | CFD+FEA | Free | Open source, Linux based |
010
Material
MATERIAL SELECTION
Material Struktur Robot
| Material | E (GPa) | ρ (g/cc) | Sy (MPa) | Machinability | Cost |
|---|---|---|---|---|---|
| Aluminium 6061-T6 | 68.9 | 2.70 | 276 | Sangat mudah | Murah |
| Aluminium 7075-T6 | 71.7 | 2.81 | 503 | Mudah | Sedang |
| Baja ST37 | 200 | 7.85 | 235 | Mudah | Sangat Murah |
| Baja SS304 | 193 | 7.99 | 215 | Sedang | Sedang |
| Titanium Ti6Al4V | 113.8 | 4.43 | 880 | Sulit | Sangat Mahal |
| Carbon Fiber UD | 135 | 1.55 | 600+ | Sulit (cetak) | Mahal |
| Delrin (POM) | 3.1 | 1.42 | 68 | Sangat Mudah | Murah |
Specific Stiffness & Strength
Specific Stiffness = E / ρ (kN·m/kg)
Specific Strength = Sy / ρ (kN·m/kg)
Untuk robot: pilih material dengan specific stiffness tinggi
Al6061: E/ρ = 25.5 MN·m/kg → sangat baik untuk robot lengan
Carbon fiber: E/ρ = 87 MN·m/kg → terbaik, mahal
Steel ST37: E/ρ = 25.5 MN·m/kg → sama dengan Al, tapi 3x lebih berat
011
Python
PYTHON KINEMATIKA TOOLS
import roboticstoolbox as rtb import numpy as np # Robotics Toolbox Python — Peter Corke # pip install roboticstoolbox-python # Load model robot standar panda = rtb.models.Panda() ur5 = rtb.models.UR5() # Forward kinematics q = np.array([0, -np.pi/4, 0, -np.pi/2, 0, np.pi/3, 0]) T = panda.fkine(q) print("EE Pose:\n", T) # Inverse kinematics (numerical) target_T = rtb.SE3(0.4, 0.2, 0.5) sol = panda.ik_LM(target_T) # Levenberg-Marquardt print("IK solution:", np.degrees(sol.q)) # Jacobian J = panda.jacob0(q) # 6×7 Jacobian di base frame print("Jacobian shape:", J.shape) # Manipulability measure (Yoshikawa) w = np.sqrt(np.linalg.det(J @ J.T)) print(f"Manipulability: {w:.4f}") # Trajectory generation q_start = np.zeros(7) q_end = np.array([0.5, -0.5, 0.2, -1.0, 0.1, 0.8, -0.3]) traj = rtb.jtraj(q_start, q_end, 50) # 50 waypoints, quintic panda.plot(traj.q, movie='robot_motion.gif')
Singularity Detection
def check_singularity(J, threshold=0.01): """Cek singularity via condition number""" _, sv, _ = np.linalg.svd(J[:3,:]) cond = sv[0] / (sv[-1] + 1e-10) near_singular = sv[-1] < threshold return near_singular, cond, sv # Manip. ellipsoid: eigenvalues of J·J^T # Principal axes = sqrt(eigenvalues) JJt = J[:3,:] @ J[:3,:].T eigvals, eigvecs = np.linalg.eig(JJt) axes = np.sqrt(abs(eigvals))
MECHANICAL ENGINEERING ROBOT — DOC 05 / 07
Antonius - bluedragonsec.com
Antonius - bluedragonsec.com