1. 로봇팔 제어 겉핥기
모두의 연구소
강남Dynamics 랩짱,
두산로보틱스 선임연구원
최한철
(babchol@gmail.com)
2. 강남Dynamics 랩
- Underactuated robotics 스터디 (2016.9 ~ 2017.1)
- Acrobot 프로젝트 (2017.1 ~ 2017.4)
- Monkey 프로젝트 (2017.5 ~ 2017.12)
- Gazebo 프로젝트 (2018. 2 ~ 2018.4)
- 개인 연구 (2018. 5 ~)
- ROS controller, gazebo, vrep
- Flexible joint control
- Passivity-based control
- Adaptive control
- Variable impedance control
- Non-linear h-infinity optimal control
- PX4 real-time platform
- Frequency domain control
3. • Perception
• Action
– Motion Planning: 지능을 이용한 듬성듬성한 경로 만들기
– Trajectory Generation: 촘촘하고 부드러운 경로 만들기 (보통 1ms)
– Control: 잘 움직이기 위한 actuator 입력을 만들어 내기
로봇공학에서 로봇팔 제어는?
Perception
Motion
Planning
Trajectory
Generation
Control
Action
Environment
Agent
Intelligence
4. 로봇팔 제어 분류
• Position control
– (Setpoint) Regulation
– Tracking
• Interaction control (indirect force control)
– Impedance control
– Admittance control
• Force control (direct force control)
– Hybrid force-position control
• Domain
– Time-domain
– Frequency-domain
• Advanced
– Adaptive
– Robust
– Optimal Control
5. 미리 알아둘 것: PID
• P (Proportional)
– 스프링 달기
• D (Derivative)
– 댐퍼 달기
• I (Integral)
– 누적 에러를 반영해서 모델링 에러 및 disturbance 보상한다.
P D
disturbance
6. 미리 알아둘 것: Kinematics
• Forward kinematics
• Inverse kinematics
• Differential kinematics
Joint Space Task Space
7. 미리 알아둘 것: Dynamics (Rigid-Joint)
Manipulator dynamics
제어기 디자인할 때 유용한 성질
: skew-symmetric
inertia coriolis,
centrifugal
gravity joint torque
viscous,
static
friction
8. 미리 알아둘 것: Dynamics (Flexible-Joint)
Link dynamics
Joint dynamics(reduced model)
Link-joint relationship: flexible spring
[6] Albu-Schaffer, 2007
9. 미리 알아둘 것: Passivity
Passive한 시스템은
if (Energy Inflow) ≥ (Energy Stored)
𝑢 𝑠 𝑦(𝑠)
𝑡
0
𝑑𝑠 ≥ 𝑉 𝑥 𝑡 − 𝑉(𝑥 0 )
if (Energy Inflow Rate) ≥ (Energy Stored Rate)
𝑢 𝑡 𝑦(𝑡) ≥ 𝑉(𝑥 𝑡 , 𝑢(𝑡))
에너지가 소산되는 시스템(dissipative system)
Ex 1. Electric network, one-port resistance
Ohm’s law: 𝑢 = 𝑅𝑦, 𝑦 = 𝐺𝑢
𝑢𝑦 = 𝐺𝑢2
≥ 0
Network is passive if 𝑢 𝑇
𝑦 ≥ 0 for all 𝑢
u: voltage(input),
y: current(output),
R: resistance,
G: conductance
𝑅 =
1
𝐺
+
-
u
y
10. 미리 알아둘 것: Stability
Ex) Pendulum
중력에 의해 항상 아래로 가려고 함.
평형점 ( )에 대해서 stable
11. 미리 알아둘 것: Stability
Ex) Pendulum: 제어하려고 하는 곳으로 평형점을 바꿔버리면?
12. 미리 알아둘 것: Stability
Lyapunov stability 증명
Lyapnov candidate 함수를 찾고
하지만, 어떻게 찾는지 잘 안 알려줌..
1) 찍거나..
2) passivity의 storage function을 이용
13. 1년간 스터디한 내용..
• Position control
– (Setpoint) Regulation
– Tracking
• Interaction control
– Impedance control
– Admittance control
• Force control
– Hybrid force-position control
• Domain
– Time-domain
– Frequency-domain
• Advanced
– Adaptive
– Robust
– Optimal Control
Slotine, Adaptive control
Park, Non-linear h-infinity control
Tomei, Flexible joint
Ott, Flexible joint cartesian impedance
DOB
Duan, variable impedance control
Albu, Unified flexible joint
Takegaki and Arimoto, Passivity
14. Passivity-Based Control of Rigid-Body Manipulator
IDEA
로봇 시스템의 natural energy를 control objective에 맞게 reshaping
[Takegaki and Arimoto, 1981]
Regulation control: control objective 𝑞 → 𝑞 𝑑
에너지 최소 지점을 𝒒, 𝒒 = (𝟎, 𝟎) 에서 𝒒, 𝒒 = 𝟎, 𝟎 , 𝒒 = 𝒒 − 𝒒 𝒅 로 변환
Energy storage function with coordinate (𝑞, 𝑞)
𝑉 =
1
2
𝑞 𝑇
𝑀 𝑞 𝑞 +
1
2
𝑞 𝑇
𝐾𝑝 𝑞
𝑉 = 𝑞 𝑇
𝑀 𝑞 𝑞 +
1
2
𝑞 𝑇
𝑀 𝑞 𝑞 + 𝑞 𝑇
𝐾𝑝 𝑞
= 𝑞 𝑇
𝜏 − 𝐶 𝑞, 𝑞 𝑞 − 𝑔 𝑞 +
1
2
𝑞 𝑇
𝑀 𝑞 𝑞 + 𝑞 𝑇
𝐾𝑝 𝑞
= 𝑞 𝑇
𝜏 − 𝑔 𝑞 + 𝐾𝑝 𝑞 +
1
2
𝑞 𝑇
[𝑀 𝑞 − 2𝐶 𝑞, 𝑞 ] 𝑞
= 𝑞 𝑇
𝜏 − 𝑔 𝑞 + 𝐾𝑝 𝑞
Passivity를 만족시키기 위해 𝜏를 어떻게 design해야 하는가?
= 0, (∵ 𝑀 − 2𝐶 is skew-symmetric)
15. 다음과 같이 control law를 디자인하면,
𝜏 = 𝑔 𝑞 − 𝐾𝑝 𝑞 + 𝑣
𝑉 = 𝑞 𝑇
𝑣 passive for (𝑞, 𝑣)
𝑣? Stability를 만족시키기 위해서 𝑣 = −𝐾 𝑑 𝑞. (passivity 를 만족하는 시스템은, 출력에 negative
한 입력을 주면 stability를 만족함)
𝑉 = −𝐾 𝑑 𝑞 2
≤ 0, globally stable!
최종 제어 입력은 𝝉 = 𝒈 𝒒 − 𝑲 𝒑 𝒒 − 𝑲 𝒅 𝒒
결국, 중력보상에 pd 제어기.
Passivity-Based Control of Rigid-Body Manipulator
16. [Paden and Panja, 1988]
비슷한 아이디어를 Tracking control에 적용하면
control objective는 𝑞(𝑡) → 𝑞 𝑑(𝑡) 가 되고, storage 함수는 다음과 같이 세울 수 있다.
𝑉 =
1
2
𝑞 𝑇
𝑀 𝑞 𝑞 +
1
2
𝑞 𝑇
𝐾𝑝 𝑞
Passivity, stability를 고려한
최종 제어 입력은 𝝉 = 𝑴(𝒒)𝒒 𝒅 + 𝑪(𝒒, 𝒒)𝒒 𝒅 + 𝒈 𝒒 − 𝑲 𝒑 𝒒 − 𝑲 𝒅 𝒒
Dynamics 를 고려한 pd 제어기의 형태.
하지만, 이 제어기의 최종적인 storage 함수 변화율을 보면,
𝑉 = −𝐾 𝑑 𝑞
2
≤ 0
즉, 𝑉 → 0 일 때, 𝑞 → 0을 만족하지만, 𝑞 → 0 을 보장하지 않는다.
Passivity-Based Control of Rigid-Body Manipulator
17. [Slotine and Lie, 1987]
Sliding variable, 𝒔 = 𝒒 + 𝜦𝒒 = 𝟎 의 좌표계로 변환하면 이 문제를 해결할 수 있다.
Storage 함수는 𝑽 =
𝟏
𝟐
𝒔 𝑻
𝑴𝒔 로 하여 같은 방식으로 유도하면,
최종 제어 입력을 𝝉 = 𝑴(𝒒)𝒒 𝒓 + 𝑪(𝒒, 𝒒)𝒒 𝒓 + 𝒈 𝒒 − 𝑲 𝒅 𝒔
𝒒 𝒓 = 𝒒 𝒅 − 𝜦𝒒, 𝒔 = 𝒒 + 𝜦𝒒
과 같이 디자인할 수 있고,
𝑉 = 𝑠 𝑇
𝑣
이 되어 𝑉 → 0 일 때, (𝒒, 𝒒) → (𝟎, 𝟎) 를 보장할 수 있다!
Passivity-Based Control of Rigid-Body Manipulator
18. 시뮬레이션 결과
Passivity-Based Control of Rigid-Body Manipulator
[ROS Simulation]
[Computed torque, 외란에 발산] [Passivity-Based, 외란에 Robust]
19. Adaptive Controller
로봇 제어에서 외란은 두 가지 종류가 있다.
- 외부 외란
- 모델링 에러에 따른 내부 외란
Passivity-based controller가 외부 외란에 robust 했지만,
모델 기반으로 보상해주는 부분에 오차가 있다면?
모델링 파라미터를 오차가 수렴하는 방향으로 adaptive하게 변화시켜주어
이를 상쇄시킬 수 있다. [Slotine, 1987]
20. Adaptive Controller
그렇다면, 어떻게 adaptive하게 변화시킬 것인가?
로봇 Dynamics는 dynamics parameter에 대해 linear하게 표현할 수 있다.
Lyapunov 함수에 dynamics parameter 에러에 의한 에너지를 포함시키면
Lyapunov stability를 만족시키는 제어기를 디자인할 수 있다.
Dynamics parameter
= 0 ( to make )
22. Nonlinear h-infinity control
Slotine과 같은 control objective에 대해서 내/외부 외란에 강건한 제어기를
optimal control을 이용해 디자인한 제어기.
IDEA
Cost를 상태와 입력에 대해 quadratic하게 설정하고,
Disturbance 대 Cost 의 비율이 최소화되는 입력을 찾는다.
최종 제어 입력은 비슷하지만, p,i,d gain을 의 함수로 표현할 수 있고, 이
를 줄여가면서 튜닝할 수 있다.
w : disturbance, z : cost variable
23. Flexible Joint Control
로봇 조인트는 실제로 rigid하지 않다. 주로 하모닉 드라이브의
강성 때문에. 다만, rigid하다고 가정하고 그것과 맞지 않는 부분
을 외란으로 여기고 제어했을 뿐..
로봇 조인트를 스프링이라고 모델링해서 제어기를 디자인하기
도 한다.
Link dynamics
Joint dynamics(reduced model)
Link-joint relationship: flexible spring
24. Flexible Joint Control – Position Control
IDEA 1
Parallel, feedback 관계로 이루어진 block으로 시스템을 나누고,
각 block을 passive하게 만들어서 전체가 passivity를 만족하게
한다.
25. Flexible Joint Control – Position Control
IDEA 2
Inertia shaping: two-mass 시스템에서 motor inertia를 작게.
모터 dynamics가 변화되면서 마찰효과도 줄어듬.
IDEA 3
Motor state를 이용한 pd 제어기. (제어 대상인 motor와 non-
collocated되어 있는 Link state를 이용하면 발산)
27. 시뮬레이션 결과: Task Space
Flexible Joint Control – Position Control
28. Flexible Joint Control – Impedance Control
Inertia Shaping하는 부분은 Position Control과 같지만,
Task space 제어 입력을 impedance control law를 적용시킴.
단, motor state로부터 contraction mapping을 통한 link state를 얻어서 제어
입력을 준다.
30. Variable Impedance Force Tracking
Impedance Control은 interaction control로서
환경과 interaction 하는 로봇팔 끝단의 거동을 가상의 M,B,K
(inertia, damping, spring)의 거동으로 바꿔주는 제어기법이다.
하지만, 외부 환경을 모델링할 수 없기 때문에 환경의
impedance 거동에 따라서 interaction 양상이 달라지게 된다.
31. Variable Impedance Force Tracking
IDEA
Force tracking 시에 force error로부터 impedance parameter(B)
를 adaptive하게 변화하여 force tracking 성능을 향상
시뮬레이션 결과
32. Frequency Domain
Sensitivity Function
𝑄𝐺 𝑛
−1
(𝑠)𝑄(𝑠)
+−
−
+
𝐶(𝑠)
+
−
𝑥 𝑠𝑖 𝑐
Disturbance observer(DOB)
𝑥 𝑠
∗
𝑑
𝑖 𝑐
+
+
𝐺(𝑠)
Q(s)가 1에 가까울 수록 S(s)=0으로 되어 외
란에 강인해짐
33. 1년 동안 study해보고 느낀 점..
• 어느 정도 solved된 문제: tracking, impedance, force control
• 모델링 되지 않은 외부 환경에 대해 안정한 제어기로 발전
• 그 놈이 그 놈인 느낌적인 느낌..
결국, 모델/ pid/ mbk 를 가지고 노는 작업
• 제어 논문 너무 어렵게 쓰지 맙시다..
• 마찰에 대한 고민이 많이 없다.. 소산되는 텀이라서 Stability에는 영향이
없지만, performance에는 영향이 큼!
• 아직은 제어기가 수동적임. 폼은 정해져 있다. 상황에 따라 폼까지 active
하게 변화하는 방식으로 진화할 필요가 있다.
• 학습을 적용한다면 모델(특히 환경 모델)과 게인에 대한 것, 그리고 제어
기 switching에 대한 것에 먼저 적용할 부분이 많음..
34. Reference
[1] M. Takegaki and S. Arimoto, “A new feedback method for dynamic control of
manipulators,” ASME J. Dynam. Syst., 1981.
[2] B. Paden and R. Panja, “Globally asymptotically stable ‘PD+’ controller for robot
manipulators,” Int. J. Control., 1988.
[3] Slotine and Li, “On the Adaptive Control of Robot Manipulators”, The
International Journal of Robotics Research, 1987.
[4] Park, Design of a Robust H∞ PID Control for Industrial Manipulators, 2000.
[5] Park, Analytic Nonlinear H∞ Inverse-Optimal Control for Euler-Lagrange System,
2000.
[6] Albu-Schaffer, A Unified Passivity-based Control Framework for Position, Torque
and Impedance Control of Flexible Joint Robots, 2007.
[7] Cristian Ott, On the Passivity-Based Impedance Control of Flexible Joint Robots,
2008.
[8] Duan Jinjun, Adaptive variable impedance control for dynamic contact force
tracking in uncertain environment, 2018.
35. Thanks to
1년간 논문 study와 이번 발표자료 작성을 도와준
김경민, 김정영, 박용수 님께 감사 말씀드립니다.