Observer-Based Robot Arm Control System Nick Vogel, Ron Gayles, Alex Certa Advised by: Dr. Gary...

Preview:

Citation preview

Observer-Based Robot Arm Control System

Nick Vogel, Ron Gayles, Alex CertaAdvised by: Dr. Gary Dempsey

OutlineOutline

Project OverviewProject Overview Project GoalsProject Goals Functional DescriptionFunctional Description Technical Background InformationTechnical Background Information Functional RequirementsFunctional Requirements Work CompletedWork Completed ConclusionsConclusions

2

3

Project OverviewProject Overview Control of robot armsControl of robot arms Pendulum & 2 DOF armsPendulum & 2 DOF arms Load ChangesLoad Changes Observer-based Observer-based Ellis's methodEllis's method

4

Pendulum Arm Pendulum Arm ConfigurationConfiguration

5

2-DOF Arm Configuration2-DOF Arm Configuration

6

Project GoalsProject Goals

Learn the Quanser software package Learn the Quanser software package Model the pendulum and horizontal Model the pendulum and horizontal

armarm Design controllers using classical Design controllers using classical

control control Design controllers using observer-Design controllers using observer-

based control based control Evaluate the relative performance of Evaluate the relative performance of

observers to classical controllersobservers to classical controllers

7

Equipment UsedEquipment Used

PC with Matlab, Simulink, and PC with Matlab, Simulink, and Real Time WorkshopReal Time Workshop

Motor with Quanser Control Motor with Quanser Control SystemSystem

Linear Power AmplifierLinear Power Amplifier Robot arm with GripperRobot arm with Gripper SRV-02 Rotary Servo PlantSRV-02 Rotary Servo Plant

8

Robot Arm Controller

Robot ArmCommand

Signal

Sensors

PositionPosition

Command

Motor Command

Overall Block Diagram

9

GC(s) GPC(s) GP(s) GS(s)

GCO(s)

GPEst(s) GSEst(s)

+

+

+

+

-

-

R(s) PR(s)E(s) PC(s) C(s) Y(s)

EO(s)

CO(s)

YO(s)

Ellis's Observer-Based Controller

10

Situational DescriptionSituational Description Command of +-90 degreesCommand of +-90 degrees

Meet specifications for a load of up to 75 Meet specifications for a load of up to 75 gramsgrams

Be able to pass a load back and forth Be able to pass a load back and forth between two systemsbetween two systems

Work with existing arm, sensor, and Work with existing arm, sensor, and convertersconverters

Technical Background Technical Background InformationInformation

% Overshoot – Amount the system % Overshoot – Amount the system advances past the target positionadvances past the target position

Settling Time – Time it takes for the Settling Time – Time it takes for the system to complete its responsesystem to complete its response

Steady-State Error – Error of system Steady-State Error – Error of system after completely settlingafter completely settling

11

Technical Background Technical Background InformationInformation

Gain Margin – How much gain can Gain Margin – How much gain can be added without instabilitybe added without instability

Phase Margin – how much phase lag Phase Margin – how much phase lag can be added to the system without can be added to the system without instabilityinstability

PM=180-|system phase lag|PM=180-|system phase lag|

12

13

Product Specifications for Product Specifications for 2-DOF Arm2-DOF Arm

The overshoot of the arm shall be less The overshoot of the arm shall be less than or equal to than or equal to 15%15%

The settling time of the arm shall be less The settling time of the arm shall be less than or equal to than or equal to 2s2s

The phase margin shall be at least The phase margin shall be at least 50 50 degdeg

The gain margin shall be at least The gain margin shall be at least 3.5 dB3.5 dB The steady state error of the system The steady state error of the system

shall be at most shall be at most 5 degrees5 degrees

14

Product Specifications Product Specifications For Pendulum ArmFor Pendulum Arm

The overshoot of the arm shall be less The overshoot of the arm shall be less than or equal to than or equal to 15%15%

The settling time of the arm shall be The settling time of the arm shall be less than or equal to less than or equal to 2s2s

The phase margin shall be at least The phase margin shall be at least 50 50 degdeg

The gain margin shall be at least The gain margin shall be at least 3.5 3.5 dBdB

The steady state error of the system The steady state error of the system shall be at most shall be at most 1 degree1 degree

15

Work Completed: Work Completed: Pendulum Arm Pendulum Arm

Arm ModelingArm Modeling

Traditional Arm ControlTraditional Arm Control

Non-Linear Arm ModelingNon-Linear Arm Modeling

Load TestingLoad Testing

Observer DesignObserver Design

16

Modified Estimated DC Modified Estimated DC gain vs Voltagegain vs Voltage

Modified Estimated DC gain vs Voltage

0

10

20

30

40

50

60

70

0 0.5 1 1.5 2Voltage in(V)

Esti

mate

d D

C g

ain

(d

eg

rees/v

olt

)

17

22ndnd Order Pole Locations Order Pole Locations and Modeland Model

System assumed to System assumed to

be as shown to rightbe as shown to right Poles at -11, -2.6Poles at -11, -2.6 Model resultsModel results System System

resultsresults

k/[(s/(p1+1)* (s/(p2+1)]

KP+-

18

Frequency ResponseFrequency Response

0.01

0.1

1

10

0.01 0.10 1.00 10.00SystemResponse

CorrectedmodelresponseModelresponse

19

Proportional ControlProportional Control Used control toolbox to find initial Used control toolbox to find initial

gain valuegain value Tuned gain: 0.14Tuned gain: 0.14 For 20 degree inputFor 20 degree input % O.S.=15% % O.S.=15% ess= 2.5 degrees ess= 2.5 degrees tr=0.12 s tr=0.12 s ts= 0.41 sts= 0.41 s

20

PID controllerPID controller Form: Form:

kp(0.09s+1)(0.4s+1)/[s(s/p1+1)]kp(0.09s+1)(0.4s+1)/[s(s/p1+1)] Exact 2Exact 2ndnd order order Higher pole is fasterHigher pole is faster D/A Converter saturatesD/A Converter saturates Rate limitation neededRate limitation needed

21

PID Controller ContinuedPID Controller ContinuedPole Pole LocatioLocationn

Gain Gain ValuValuee

OvershoOvershoot %ot %

SettliSettling ng TimeTime

Rate Rate LimitatiLimitationon

Rate Rate Limited Limited Settling Settling TimeTime

-40-40 0.750.75 14.914.9 0.200.20 155155 1.161.16

-80-80 1.51.5 1515 0.100.10 148148 1.201.20

-60-60 1.11.1 14.914.9 0.140.14 151151 1.181.18

Rad/sRad/s ss deg/sdeg/s

1 deg 1 deg inputinput

180 deg input180 deg input

22

PID ResultsPID Results 45 deg input45 deg input

% OS=3.3%% OS=3.3%

Ts=0.4 sTs=0.4 s

23

Non-Linear ModelingNon-Linear Modeling

24

Loaded TestingLoaded Testing Tested Loaded DC gain: Tested Loaded DC gain:

approximately 27 degrees/volt approximately 27 degrees/volt (compared to 50 for unloaded model)(compared to 50 for unloaded model)

Performed Frequency Response and Performed Frequency Response and compared to original model with compared to original model with adjusted DC gainadjusted DC gain

0.001

0.01

0.1

1

10

0.01 0.10 1.00 10.00

Freqency(Hz)

Att

enu

atio

n

SystemResponse

Modelresponse

25

Observer Controller Observer Controller DesignDesign

26

ObserverObserver

Feedback Controller used: Parallel PI Feedback Controller used: Parallel PI controllercontroller

Linear System Model UsedLinear System Model Used

Controller

Used PID Controller with disturbance rejection

Unloaded Results

Loaded Results

Disturbance Rejection Observer Specifications

Phase Margin = 50 degrees Gain Margin = 3.5 Steady state error < 1 degree Rise Time = 1.17 s % Overshoot = 3%

How the Others Fail

All: good rise time and overshoot

Proportional controller: bad steady state error

Observer and PID: insufficient phase margin

32

Work Completed: 2-DOF Work Completed: 2-DOF ArmArm

•Base Modeling

•Spring Modeling

•Sample Rate

•Controller Design

33

Base ModelingBase Modeling

• Model of arm without effect of springsModel of arm without effect of springs

• TTss=4/(=4/(ζζωωnn))

• ζζωωn n is the real part of polesis the real part of poles

• Gp=1500/(sGp=1500/(s22+10s)+10s)

34

Spring ModelingSpring Modeling

• Reran test and plotted arm displacementReran test and plotted arm displacement

• Frequency of oscillation is imaginary Frequency of oscillation is imaginary partpart

• Settling time is real partSettling time is real part

• GGDD=G=GDdcDdcs/(ss/(s22+8s+289)+8s+289)

35

Spring ModelingSpring Modeling

• Spring effect is instantaneousSpring effect is instantaneous

• Springs have no steady state effectSprings have no steady state effect

• Behaves like differentiatorBehaves like differentiator

• GGDD=0.42s/(s=0.42s/(s22+8s+289)+8s+289)

36

Spring and Arm Spring and Arm TogetherTogether

• Modeled as a minor loop disturbanceModeled as a minor loop disturbance• Positive feedback because of Positive feedback because of

increasing overshoot and settling increasing overshoot and settling timetime

Actual Arm Position

Base transfer function remains unchanged

Spring Displacement depends on base movement

37

Model and Plant Model and Plant ComparisonComparison

Arm Model

38

Model and Plant Model and Plant ComparisonComparison

PlantPlant ModelModel %os=41.7%%os=41.7% %os=37.4%%os=37.4% TTss=1.12s=1.12s TTss=1.21s=1.21s

39

System Root LocusSystem Root Locus

40

New Sample RateNew Sample Rate

• For smooth operation of motor, For smooth operation of motor, ωωs s ≥≥ 6 6ωωcc

• ωωc c =10.7rad/s : =10.7rad/s : TTcc= 0.587s= 0.587s

• TTsam maxsam max≈0.0978s≈0.0978s

• TTsamsam chosen to be 0.1s chosen to be 0.1s• Largest sample time spreads out root Largest sample time spreads out root

locuslocus• Complex poles and zeros don’t affect Complex poles and zeros don’t affect

responseresponse

41

New Plant Root LocusNew Plant Root Locus

42

Proportional ControlProportional Control

43

PID ControlPID Control

44

PID ControlPID Control

45

Lead NetworkLead Network

Pole-zero cancellationPole-zero cancellation Lead pole chosen to be at zero for Lead pole chosen to be at zero for

fastest settling timefastest settling time

46

Lead NetworkLead Network

Gain of 0.06 Gain of 0.06 should give should give TTss of 0.72s of 0.72s with 15%OSwith 15%OS

47

Lead NetworkLead Network

48

Minor Loop With PI Minor Loop With PI Control DiagramControl Diagram

PositionVelocity

PI Control

49

Minor Loop With PI Minor Loop With PI ControlControl

Classical Control Classical Control ConclusionsConclusions

Proportional and PID control did not Proportional and PID control did not handle loads very wellhandle loads very well

Minor Loop Performed well but is Minor Loop Performed well but is close to instabilityclose to instability

Lead Network was the best choice by Lead Network was the best choice by farfar

50

51

Observer ControllerObserver ControllerGC(s) GPC(s) GP(s) GS(s)

GCO(s)

GPEst(s) GSEst(s)

+

+

+

+

-

-

R(s) PR(s)E(s) PC(s) C(s) Y(s)

EO(s)

CO(s)

YO(s)

• GC(s) = Our Lead Network = (0.2)(z - 0.458)/z

•GPEst(s) = Plant Estimator = (3.127z + 2.246)/(z2 - 1.368z + 0.3679)

•GCO(s) = Observer Compensator (Lead-Network Controller) = (0.06)(z – 0.4)/z

52

Estimator OutputEstimator Output

53

The Observer gave us no The Observer gave us no overshoot and a settling overshoot and a settling time of 0.9 seconds.time of 0.9 seconds.

Observer Controller With Observer Controller With Disturbance RejectionDisturbance Rejection

54

Observer With Observer With Disturbance RejectionDisturbance Rejection

55

Comparison Of No Load Comparison Of No Load ResultsResults

56

Comparison Of Loaded Comparison Of Loaded ResultsResults

57

Spring InaccuracySpring Inaccuracy

58

ResultsController Ts (unloaded) Ts (loaded) % Overshoot (unloaded) % Overshoot (loaded)

Lead-Network 0.9 1.1 0.0 0.0Minor-Loop 1.0 1.0 7.0 10.0Observer 1.2 1.4 9.0 12.0PID Controller 1.1 1.8 0.0 3.3Proportional 1.1 1.9 0.3 3.9

2-DOF Arm Conclusions2-DOF Arm Conclusions

Observer works best if there is no Observer works best if there is no need for disturbance rejectionneed for disturbance rejection

With disturbance rejection, observer With disturbance rejection, observer was not better than classical was not better than classical controller methodscontroller methods

Lead Network Controller proved to Lead Network Controller proved to be the most effective overall for both be the most effective overall for both loaded and unloaded conditionsloaded and unloaded conditions

60

Inverted Arm Conclusions

Encoder used was very accurate

Results mildly are improved

Useful if computational complexity is cheap

62

QuestionsQuestions

63

Root Locus with Graphical Root Locus with Graphical KK

Proportional controlProportional control

64

Lead Network Root Lead Network Root LocusLocus

65

Minor Loop Graphical Minor Loop Graphical GainGain

66

Minor Loop Bode PlotMinor Loop Bode Plot

67

2-DOF Arm Configuration

68

Inverted Arm Inverted Arm ConfigurationConfiguration

69

22ndnd Order Step Response Order Step Response

Proportional gain Proportional gain of 0.45of 0.45

%O.S.=46%%O.S.=46% Ts=0.58 sTs=0.58 s Tr=0.06 sTr=0.06 s Tp=0.14 sTp=0.14 s

70

Q8 Acquisition Board Q8 Acquisition Board SpecsSpecs

14 bit A/D converter +-10V14 bit A/D converter +-10V

- 1.22 mV resolution- 1.22 mV resolution

- Maximum conversion time = - Maximum conversion time = 5.25.2μμss

- Maximum Sample Frequency = - Maximum Sample Frequency = 192kHz192kHz

71

Q8 Acquisition Board Q8 Acquisition Board SpecsSpecs

12 bit D/A converter +- 5V12 bit D/A converter +- 5V- 2.44 mV resolution- 2.44 mV resolution

- Slew rate = 2.5V/- Slew rate = 2.5V/μμss

- Max voltage change is from -5 to - Max voltage change is from -5 to 5, or 10V5, or 10V

- Max conversion time = 4- Max conversion time = 4μμss

- Max sample frequency = 250kHz- Max sample frequency = 250kHz