Demonstrator of advanced controllers

47
Demonstrator of advanced controllers Hans Dirne Supervisors prof.dr.ir. J. van Amerongen dr.ir. J.F. Broenink dr.ir. T.J.A. de Vries ir. P.B.T. Weustink May 25 th , 2005 Master of Science assignment

description

Master of Science assignment. Demonstrator of advanced controllers. Hans Dirne. May 25 th , 2005. Supervisors prof.dr.ir. J. van Amerongen dr.ir. J.F. Broenink dr.ir. T.J.A. de Vries ir. P.B.T. Weustink. Why this assignment?. The Major ‘Mechatronics’ provides several courses - PowerPoint PPT Presentation

Transcript of Demonstrator of advanced controllers

Page 1: Demonstrator of advanced controllers

Demonstrator ofadvanced controllers

Hans Dirne

Supervisorsprof.dr.ir. J. van Amerongen

dr.ir. J.F. Broeninkdr.ir. T.J.A. de Vriesir. P.B.T. Weustink

May 25th, 2005

Master of Science assignment

Page 2: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 2

Why this assignment?

The Major ‘Mechatronics’ provides several courses in control theory, in which the theory is often supported by simulations.

A physical setup might, in addition to simulations,be an enrichment for demonstrating control theory.

Such a demonstration setup will be able to makethe theory more insightful and will show real limitations in practical setups.

Page 3: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 3

Objectives

1. To design, build and test a mechatronic demonstration setup, with which several control algorithms can be shown in practice

2. To be able to demonstrate performance differences of control algorithms in practice

Page 4: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 4

Overview

1. Demonstration setup options2. Control systems3. Design of the new demonstrator4. Experiments5. Demonstration6. Conclusions & recommendations

Page 5: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 5

Demonstration setup optionsDemonstration setup options

Page 6: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 6

1. Mechatronic system2. Portable and easy to set up3. Robust, safe and failsafe design4. High level of observability5. Representable by linear 4th order model6. Clear link with well known device

Criteria

Page 7: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 7

Three options

1. ‘Linix’ laboratory setup

2. Setup of ‘Controllab Products B.V.’

3. New build

Page 8: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 8

Option 1: ‘Linix’ Laboratory Setup

Page 9: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 9

‘Linix’ Laboratory Setup

motor

encoders

inertia 2

inertia 1transmission

Page 10: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 10

‘Linix’ Laboratory Setup

Page 11: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 11

‘Linix’ Laboratory Setup

Major disadvantage:

slip between belt and inertias

Page 12: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 12

Option 2: CLP setup

Page 13: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 13

CLP setup

Page 14: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 14

CLP setup

Page 15: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 15

Sensor positions

Page 16: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 16

Option 3: New Build

Advantage• Pure design freedom

Disadvantage• Requires very much time and

effort to design

Page 17: Demonstrator of advanced controllers

New build Linix CLP-setupMechatronic system √ √ √

Linear 4th order model √ limited linear to bedetermined

Portable, easy to set up √ √ not in currentform

Robust, safe, failsafe √ √ feasible

Observability √ yes, 2 positionSensors

yes, 4 positionsensors

Link with practical device √ transmission printer

Shows controller differences √ no, due tononlinearities

To bedetermined

Remarks Time constraint

Overview demonstrators

Page 18: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 18

Control SystemsControl Systems

Page 19: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 19

Mathematical model – 6th order

NMotorCurrent

m

Load

P

LoadSensorWorld

F

Motor

m

Frame

FrameFlex

m

MotorInertia

BeltFlex

P

MotorSensor

P

LoadSensorFrame

K

MotorGain

Damper

ViscousPLUScoulomb friction

Page 20: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 20

Focus

1. Linear Quadratic Gaussian (LQG)2. Proportional, Integral, Differential (PID)

Page 21: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 21

LQG explanation

u y

statesLQG

Reference PLANT Output

LQE

LQR

A LQG control algorithm is a combination of1. Lin. Quad. Regulator (state feedback)2. Lin. Quad. Estimator (state estimation)

4th order linear model required!

Page 22: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 22

4th order linear model

Nremoved at order downsizing

m

Load

P

LoadSensorWorld

F

Motor

m

Frame

FrameFlex

m

MotorInertia

BeltFlex

P

MotorSensor

P

LoadSensorFrame

K

MotorGain

Damper

Required steps:1. Downsize system order2. Linearize system: discard coulomb friction

Result: linear 4th order model (e.g. State Space)

Page 23: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 23

V A

Xref

LQR

PLANT

LQE

Estimated States

.

L

Cx(k|k)=x(k|k-1) +Le(k|k-1)

+_

m

Load

P

LoadSensorWorld

F

motor

m

FrameFrameFlex

P

LoadSensorFrame Damper

K

Motor

K

Amplifier

m

motortraagheid

motorflex

P

motorsensor

K counter

AD

DA1

ENC encoder

K

A2V

M

K

_

ENCencoder2

Kcounter2

Z-1

LQG controlled system

Page 24: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 24

PID

Plant

anti-windup reset

PID-controller

m

Load

P

LoadSensorWorld

F

motor

m

FrameFrameFlex

Damper

reference

K

Motor

K

Amplifier

m

motortraagheid

motorflex

K

counter

AD

DA1

ENC

encoder

K

A2V

K

Kp

-1zddt

-1z

K

Kd

K

Ki

Page 25: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 25

Tuning (1)

For proper comparison of the PID with the LQG controlled system, tuning with the same criteria is required.

1. Avoid actuator saturation2. Minimization of criterion:

dtuuJ TT RQ ee

position error controller output

Page 26: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 26

Tuning (2)

Tuning procedure:1. Set Q and R2. Minimize criterion J by optimizing

controller gains (KLQG and KP,KI,KD)

Xref

PID

ref

u

x

K

Kp

d/dt

K

Ki

K

Kd

Process

Criterion

Page 27: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 27

Tuning (3)

Xref

PID

LQR

K

Kp

-1zddt

K

Ki

-1z

K

Kd

Plant1

M

K

_ Plant2

Optimization results

KP = 15.7

KI = 42

KD = 1.6

KLQG= [3.7, 74, 8.2, 70]T

Page 28: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 28

model

0 0.5 1 1.5 2 2.5 3 3.5 4time {s}

0

0.1

0.2

0.3

0.4PowerPIDPowerLQG

model

0 0.5 1 1.5 2 2.5 3 3.5 4time {s}

-0.001

-0.0005

0

0.0005

0.001

FramePIDFrameLQG

PID vs LQG (1)

• The PID controlled system consumes twice the power of the LQG system

• The maximum frame movement in the PIDcontrolled system is twice compared to LQG

Page 29: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 29

PID vs LQG (2)

model

0 0.5 1 1.5 2 2.5 3 3.5 4time {s}

0

0.05

0.1

0.15 xPositionPID {m}PositionLQG {m}

The LQG control algorithm leads to an unacceptable position error with the nonlinear process

Page 30: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 30

LQG+

Xref

LQR

LQE

FRAMEWORLDPlant

Estimated States

.

L

Cx(k|k)=x(k|k-1) +Le(k|k-1)

+_

Z-1

AO526

analog_output

ENC526

Encoder1

KCounter1

ENC526

Encoder2

K Counter2

K

A2V

K Kcomp

-1z

M

K

_

Page 31: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 31

LQG+ vs LQG

System Results

-0.05

0

0.05

0.1Reference

-0.05

0

0.05

0.1Output {m}

0 0.5 1 1.5 2 2.5 3 3.5time {s}

-0.05

0

0.05

0.1Error

Effect of integrator:Static error is minimized!

Interesting to seethe performance ofLQG+ in practice…

Page 32: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 32

Design of the new demonstratorDesign of the new demonstrator

Page 33: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 33

Goal: to test a control algorithm on a physical setup

Procedure

How?

ModelingCode

GenerationLoad Codeat Target

Testing

PC PlantPC(realtime server)(client)

Page 34: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 34

System overview (1)

PC PlantPC(realtime server)(client)

Client:• Runs MS Windows• Generating models• Model control (start/stop/upload/delete)• Setting parameters of controlled system real-time• View parameters of controlled system real-timeServer:• Runs Linux, with real-time kernel• Runs control system• Performs I/O

Page 35: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 35

System overview (2)

CPU

I/O interface

RouterStorageDevice

Demonstrator Actuator & Sensors

MotorAmplifier

Encoders MotorCurrent

Cable to PC

Page 36: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 36

Realization

Mechatronics

Embedded PC+ I/O

Power (CPU)

Power (motor)

Motor amplifier

Page 37: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 37

ExperimentsExperiments

Page 38: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 38

Experiments

• Comparison of PID/LQG/LQG+ performanceon the new demonstration setup

• Same controller parameters used as insimulation (after tuning)

• Performance comparison on:1. Static error2. Frame vibration3. Power usage

Page 39: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 39

0 2 40

0.05

Time

Pos

. [m

]

LQG without I-term

0 2 40

0.05

Time

[m]

LQG with I-term

0 2 40

0.05

Time

[m]

PID

0 2 4-0.04

-0.02

0

0.020.04

Time

Err

. [m

]

0 2 4-0.04

-0.02

0

0.020.04

Time

[m]

0 2 4-0.04

-0.02

0

0.020.04

Time

[m]

0 2 4

-0.2

0

0.2

Time

Fra

me

[mm

]

0 2 4

-0.2

0

0.2

Time

[mm

]

0 2 4

-0.2

0

0.2

Time

[mm

]

0 2 4-1

0

1

Time

Cur

r. [

A]

0 2 4-1

0

1

Time

[A]

0 2 4-1

0

1

Time

[A]

0 2 40

500

1000

Time

Pow

er [

A2]

0 2 40

500

1000

Time

[A2]

0 2 40

500

1000

Time

[A2]

Page 40: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 40

Results

The LQG+ controlled system outperforms the PID controlled system:

• Maximum frame movement differs factor 3• Total power consumption differs a factor 2• Both control algorithms minimize the static error, but the

LQG controlled system is faster

More performance increase is expected with a better model

Differences in performance between 2nd order PID and 4th order LQG have now been

demonstrated in practice

Page 41: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 41

DemonstrationDemonstration

Page 42: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 42

Demonstration

What will be shown:1. ‘Homing’ of the demonstrator

1. Determining absolute position2. PID controller in practice with various controller gains

Furthermore:1. Online adjustment of parameters2. Real-time variable monitoring3. Real-time animation of demonstration setup

Page 43: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 43

Conclusions Conclusions &&

RecommendationsRecommendations

Page 44: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 44

Conclusions

1. The new mechatronic demonstration setup is a compact, integrated machine that forms a versatile developmentenvironment for testing various control algorithms in practice

2. The new demonstrator allows for easy comparison of differentcontrol algorithms

3. Non-linear friction elements in the process will lead to lowerperformance in position control of a 4th order LQG-controlled system compared to a 2nd order PID control algorithm

4. Addition of an integrating term leads to an ‘LQG+’ control algorithm that can compensate for differences betweenprocess and reference model.

Page 45: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 45

Recommendations

Hardware• Expand safety system• Reduce weight of the demonstrator (next version)• Add parallel processing (e.g. distributed control)

Software / control• Experiment with more control systems (MRAS, (L)FF, ILC etc)• Perform system identification

General1. Set up lab work assignments for student

Page 46: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 46

Questions…?Questions…?

Page 47: Demonstrator of advanced controllers

May 25th, 2005 Demonstrator of advanced controllers 47

THANK YOU FOR THANK YOU FOR YOUR ATTENTIONYOUR ATTENTION

you are all invited for you are all invited for DRINKSDRINKS

at ‘De Tombe’, floor 0at ‘De Tombe’, floor 0