Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400...

60
Real-Time Optimal Control and Trajectory Planning with Applications to Industrial Robots Christof Büskens INRIA, Optimal Control: Algorithms and Applications (May/June 2007)

Transcript of Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400...

Page 1: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

Real-Time Optimal Control and Trajectory Planning with Applications to Industrial Robots

Christof Büskens

INRIA, Optimal Control: Algorithms and Applications (May/June 2007)

Page 2: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

2

C. BüskensC. Büskens

Optimal Control: Industrial Robots

Foces:

-centrifugal

-Coriolis

-gravity

-frictional (dry)

-restoring

Page 3: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

3

C. BüskensC. Büskens

Parcel Robots and minimal Robot Trajectory Planning

Unloading of ContainersParameter Identification/

Trajectory PlanningRobot Dynamics- kinematics- (minimal) dynamic- collision prevention

with: Deutsche Post, DHL Express, BIBA, EADS

with: SEF–Robotics, ADC, Lüneburg

Page 4: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

4

C. BüskensC. Büskens

Classification of Optimal Control Solutions

open-loop:

closed-loop:

Page 5: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

5

C. BüskensC. Büskens

Mixed Strategy

Page 6: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

6

C. BüskensC. Büskens

Open-Loop vs. Closed-Loop

nonlinearlinearModel

Method

open-loop

closed-loop

knowledge

Part I

Part II

Page 7: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

7

C. BüskensC. Büskens

Part I

nonlinear open-loop nonlinear closed-loop

Page 8: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

8

C. BüskensC. Büskens

• Part I: (Motivation)– Example: Industrial Robot

• Part II: (Optimal Control)- Perturbed Optimal Control Problems- Perturbed NLP Problems- Numerical Solution of NLP-Problems

• Part III: (Real-Time Optimal Control)- Parametric Sensitivity Analysis / Solution Differentiability- Real–Time Solution

• Open–Loop Strategy• Mixed Strategies (Constraints)

- Examples: - Industrial Robot ABB IRB 6400 - Emergency Landing

Overview

Page 9: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

9

C. BüskensC. Büskens

Example: ABB IRB 6400 (Optimal Control Problem)

Page 10: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

10

C. BüskensC. Büskens

Optimal Control Problems with Perturbations: ODE

Page 11: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

11

C. BüskensC. Büskens

Methods for solving Optimal Control Problems

Page 12: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

12

C. BüskensC. Büskens

• Part I: (Motivation)– Example: Industrial Robot

• Part II: (Optimal Control)- Perturbed Optimal Control Problems- Perturbed NLP Problems- Numerical Solution of NLP-Problems

• Part III: (Real-Time Optimal Control)- Parametric Sensitivity Analysis / Solution Differentiability- Real–Time Solution

• Open–Loop Strategy• Mixed Strategies (Constraints)

- Examples: - Industrial Robot ABB IRB 6400 - Emergency Landing

Overview

Page 13: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

13

C. BüskensC. Büskens

Direct approaches for OCP I: ODE

Page 14: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

14

C. BüskensC. Büskens

Direct approaches for OCP II: ODE

MACH1: [B./Gerdts]WORHP: [B./Gerdts]

NUDOCCCS: [B.]

Page 15: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

15

C. BüskensC. Büskens

Sparse NLP Solver

WORHP

We Optimize Really Huge Problems

Page 16: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

16

C. BüskensC. Büskens

WORHP Born for Space Applications

Page 17: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

17

C. BüskensC. Büskens

Principle Method

QP

SQP

Optimization Process

Objective function

Constraints

Sparsity

User

Page 18: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

18

C. BüskensC. Büskens

SQP Algorithm

Evaluation ofInitial Estimate

Main Iteration

2nd order Information(Hessian)

Compute new iteration point

Preparation of QPinput data

Check Optimality Criteria

QP Solver

Solution of QuadraticSubproblem

Provides search direction

Hessian Update

Find a suitable stepsise

Page 19: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

19

C. BüskensC. Büskens

Requirements

What is a good NLP Solver? • fast• robust• precise• large-scale• user-friendly• flexible• …

fast

robust

precise

large-scale

Page 20: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

20

C. BüskensC. Büskens

Main Features of WORHP

• Sparse Structures– efficient storage and computation

• Automatic Hessian structure– simpler usability for large-scale sparse problems

• Reverse Communication– flexible interface for demanding problem formulations

• Modularity– modules for different intentions and purposes

Page 21: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

21

C. BüskensC. Büskens

Sparse NLP Solver: Sparse Matrices

Sparse Matrix(here: )

Higher efficiency by storing only nonzero entries in column-

compressed format

Lower storage

requirement(here: -87.5%)

Reduced computational time

Page 22: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

22

C. BüskensC. Büskens

Reverse Communication

Advantages

Simple implementationNo worries after start

Caller

Evaluation

ObjectiveGradient

Evaluation

ConstraintsJacobian

Disadvantages

Inflexible user-interfaceNo influence after start

Traditional Calling Sequence:

SQP

Page 23: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

23

C. BüskensC. Büskens

Reverse Communication

Caller

New Calling Sequence:

Evaluation

ObjectiveGradient

Evaluation

ConstraintsJacobian

Advantages

Flexible problem evaluationFull control on optimization

Disadvantages

Harder to implementWORHP

Page 24: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

24

C. BüskensC. Büskens

Features of WORHP: Sentinel

User Solution WORHP

Sentinel

Page 25: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

25

C. BüskensC. Büskens

Group Strategy for Gradient Computation

Challenges of large-scale problems:– How to determine the minimum number of groups?– Efficient algorithm?– Suboptimal groups acceptable?– Extendable to Hessian computation?

Example:Gradient computation for the Rayleigh optimal control problem with

100.000 variables

Evaluations

Standard: 100.000 Groups: 7

Page 26: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

26

C. BüskensC. Büskens

Modularity

Modules to adapt to the User‘s requirements:

Speed, Precision, Robustness, Simplicity, …

GradientFixed Stepsize

GradientAdaptive Stepsize

GradientGroup Strategy

Advanced ErrorReporting

Matrix structureCreation/Analysis

Pre-Iteration-Analysis

WORHP

QPSOL

QP-Matrixdiagonal-BFGS

QP-MatrixHessian

QP-MatrixIdentity

QP-Matrixdiag.-Hessian

QP-MethodNonsmooth Newton

QP-MethodInterior Point

direct SolversMA47, SuperLU

iterative SolversCGN, CGS, BiCG

InterfaceTranscriptor

InterfaceReverse Comm.

InterfaceTraditional

InterfaceAMPL

Page 27: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

27

C. BüskensC. Büskens

Example: ABB IRB 6400 (optimal control)

Page 28: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

28

C. BüskensC. Büskens

Hierarchical and Pareto Optimization

Page 29: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

29

C. BüskensC. Büskens

Offline

Real-Time Capable?

UnperturbedProblem

Page 30: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

30

C. BüskensC. Büskens

Methods for solving Optimal Control Problems

• The result of any performance process is limited by the most scarcely available ressource: the Time. (Drucker)

• We have enough Time, if only we use it wisely. (Goethe)

Page 31: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

31

C. BüskensC. Büskens

• Part I: (Motivation)– Example: Industrial Robot

• Part II: (Optimal Control)- Perturbed Optimal Control Problems- Perturbed NLP Problems- Numerical Solution of NLP-Problems

• Part III: (Real-Time Optimal Control)- Parametric Sensitivity Analysis / Solution Differentiability- Real–Time Solution

• Open–Loop Strategy• Mixed Strategies (Constraints)

- Examples: - Industrial Robot ABB IRB 6400 - Emergency Landing

Overview

Page 32: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

32

C. BüskensC. Büskens

Perturbed NLP problems

Page 33: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

33

C. BüskensC. Büskens

Parametric Sensitivity Analysis / Solution Differentiability

Page 34: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

34

C. BüskensC. Büskens

Sensitivity Analysis of OCP

Page 35: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

35

C. BüskensC. Büskens

Example: ABB IRB 6400 (parametric sensitivity analysis)

Page 36: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

36

C. BüskensC. Büskens

• Part I: (Motivation)– Example: Industrial Robot

• Part II: (Optimal Control)- Perturbed Optimal Control Problems- Perturbed NLP Problems- Numerical Solution of NLP-Problems

• Part III: (Real-Time Optimal Control)- Parametric Sensitivity Analysis / Solution Differentiability- Real–Time Solution

• Open–Loop Strategy• Mixed Strategies (Constraints)

- Examples: - Industrial Robot ABB IRB 6400 - Emergency Landing

Overview

Page 37: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

37

C. BüskensC. Büskens

offline

Real-Time Optimization (General Idea)

UnperturbedProblem

SensitivityAnalysis

onlineReal-Time Optimization

Real-Time Optimal Control

SensitivitiesSolution

Solution

Page 38: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

38

C. BüskensC. Büskens

Real-Time Optimization

Page 39: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

39

C. BüskensC. Büskens

Small Perturbation?

Page 40: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

40

C. BüskensC. Büskens

Primary Goals of Real-Time Optimization

Hierarchical AAO-order:

• real-time ability

• admissibility (feasibility)

• optimality

Page 41: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

41

C. BüskensC. Büskens

Idea 1: Adaptive optimal closed-loop control

Adaptive optimal control (closed-loop)

Page 42: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

42

C. BüskensC. Büskens

Idea 2: Real-Time model predictive control

Trajectory error estimation:

Page 43: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

43

C. BüskensC. Büskens

Real-Time model predictive control II

• iterative process (Newton Type, no gradient calculation)• self-correcting• any-time property

Page 44: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

44

C. BüskensC. Büskens

Real-Time model predictive control III

Potential for speedup:

• dynamically moving horizon

• iterative process abortable anytime

Page 45: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

45

C. BüskensC. Büskens

offline

Idea 3: Mixed Strategy

UnperturbedProblem

SensitivityAnalysis

onlineReal-Time Optimization

Real-Time Optimal Control

SensitivitiesSolution

Solution

onlineMathematical

Model

InformationAdvanced

Page 46: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

46

C. BüskensC. Büskens

Real-Time Optimization (Mixed Strategy)

• iterative process (Newton Type, no gradient calculation)• self-correcting• any-time property

Page 47: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

47

C. BüskensC. Büskens

Iterative Process

Convergence ?

• Order of convergence ?

• Existence of a fixed point ?

• Uniqueness of a fixed point ?

• Order of optimality:

worse, unchanged, improved?

Page 48: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

48

C. BüskensC. Büskens

Convergence of the Mixed Strategy

Page 49: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

49

C. BüskensC. Büskens

Convergence of the Mixed Strategy

Page 50: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

50

C. BüskensC. Büskens

Real-Time Optimal Control: (Sensitivity Derivatives)

Indirect Approaches (Minimumprinciple of Pontryagin)• Existence of Derivatives (Still Research)

[ Malanovski, Maurer, Pesch, ...]• Linear Perturbations (in the State) (Feedback Control Laws)

[ Kelley, Breakwell, Speyer, Bryson, Ho, Pesch, Bock, Krämer–Eis, ...]• General Perturbations (Linear Approximations)

[ Maurer, Augustin, Pesch, Kugelmann, ...]

Direct Approaches (NLP Problems)• Existence of Derivatives (NLP)

[ Fiacco, Robinson, ...]• Convergence (Discretized OCP OCP)

[ Alt, B., Dontchev, Felgenhauer, Malanowski, Maurer, ...]• Real–Time Optimal Control (Linear Approximations)

[ B., Maurer, ...]• Real–Time Optimal Control (Nonlinear Feedback Approx.)

[ B. ]

Page 51: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

51

C. BüskensC. Büskens

• Part I: (Motivation)– Example: Industrial Robot

• Part II: (Optimal Control)- Perturbed Optimal Control Problems- Perturbed NLP Problems- Numerical Solution of NLP-Problems

• Part III: (Real-Time Optimal Control)- Parametric Sensitivity Analysis / Solution Differentiability- Real–Time Solution

• Open–Loop Strategy• Mixed Strategies (Constraints)

- Examples: - Industrial Robot ABB IRB 6400 - Emergency Landing

Overview

Page 52: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

52

C. BüskensC. Büskens

Example: ABB IRB 6400 (real-time optimal control)

click me

Page 53: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

53

C. BüskensC. Büskens

Example: ABB IRB 6400 (real-time optimal control)

Page 54: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

54

C. BüskensC. Büskens

Example: Emergency Landing

Page 55: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

55

C. BüskensC. Büskens

Example: Emergency Landing

Page 56: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

56

C. BüskensC. Büskens

Example: Emergency Landing

Page 57: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

57

C. BüskensC. Büskens

Example: Emergency Landing

click me

Page 58: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

58

C. BüskensC. Büskens

Thank You!

Page 59: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

59

C. BüskensC. Büskens

Real-Time Optimization (Advanced Iteration Methods)

Page 60: Suboptimal Improvement of the Classical Riccati Controllerbonnans/...- Industrial Robot ABB IRB 6400 - Emergency Landing Overview. 37 C. Büskens offline Real-Time Optimization (General

60

C. BüskensC. Büskens

Aims and Cooperations