程序代写代做代考 algorithm Robot Control

Robot Control

Robot Control

Where we are in the course
Description of rotations
Kinematics
C-Space and Collision Detection
Control
Dynamics

So far we have seen about the motion of robots.
How to characterize these motions
How to characterize the space around them (whether they have obstacles or not…)

But we haven’t seen how we can bring about this motion.
2

A block diagram to remember
3
F: Feedforward
C: Control
A: Actuator
S: Sensor
S+: Sensor post-processing
F

C
A
S
desired task
S+
desired trajectory
movement
F
motion planning and trajectory generation

Explain each block in this diagram.
3

Important concepts in control
Types of Control
Systems
What order of a system means…
Error Dynamics
First Order
Second Order
Feedback
Open-Loop
Closed-Loop

We take a look at the basic jargon that is used when discussing control theory.

This is very introductory. Which spans only 2 classes. We will try to cover all the basics.
4

But first…
Where do you apply control in real life?

Just to give you a sense of the amazing feats of control.

Balancing a pole on a flying quadrotor.

How planning, collision detection and control are tightly connected in a driverless car. Our main interest in driverless cars is because essentially it is the most complicated version of a mobile robot.
5

Types of Control
Controlling Motion
Positions
Velocities

Controlling Force
Controlling Force and Motion
Controlling Impedance

Task and the environment decide the type of control.

Examples:

Position/Velocity Control – A Line follower

Controlling Force – Industrial robots near humans

Hybrid motion and force control – both are not controlled at the same time.

Controlling impedance – how the robot feels when it interacts. Mainly for rehabilitation.

6

A note on systems

Input
Output

Some examples of systems: Electrical or mechanical

In mechanical systems we may use force as input and velocity as output.
In electrical systems current and voltage.
7

Some useful mechanical systems

Spring
Damper

Velocity which is the first derivative of x.
8

Order of a mechanical system

The order of a mechanical system is denoted by the order of the equation of motion (ODE) for that system.
Example: Mass-Spring-Damper system
Can you guess what the order of this system is?
How can we get a lower order system from the m-b-k system?

Define what equation of motion is.

Derive the equation of motion for this system in iPad.

Remove mass and then the damper.
9

A typical control system

Note that the output of the controller can also be velocity commands.
Feedback loop

There is typically a velocity or a force sensor in the feedback loop.
10

Error Dynamics
What is error?
Any deviation from the desired or prescribed behavior.
Desired “behavior” can be following a trajectory, applying certain amount of force, following to match a velocity (cruise control).
For a manipulator joint:

where θ is the joint parameter.
This can be extended to n joints.

Draw a trajectory and show the error at different instances.

Error is calculated at each instant of time.
11

Error Dynamics and response
The differential equation that represents the error θe(t) is called error dynamics.

The feedback controller must create an error dynamics such that θe(t) tends to zero or a small value as t tends to infinity.

Error response is a measure of how quickly and completely the controller reduces the initial error.

If c is zero, equation is called homogeneous.
If c is non-zero, equation is non-homogeneous.
12

Error Response
Unit error response: Response θe(t), t > 0 of the controlled system for θe(0) = 1 and its derivatives at t = 0 are zero.

Transient Response
Steady State response

For an ideal controller, error should instantaneously become zero and be zero for the remaining time.

There should be no steady state error.
13

Terminology
Transient Response is characterized by the overshoot and (2%) settling time.

where θe,min(t) is the least value of the error response
2% settling time:

Steady State error: The asymptotic error θe(t) as

These terms are also used to evaluate the effectiveness of a control algorithm.

Good error response:

Zero steady state error
Zero overshoot
Shorter 2% settling time
14

First Order Error Dynamics

The first order error dynamics

F
If F = 0, the equation becomes homogeneous

1st order systems: Force generates a velocity not an acceleration.

2nd order systems: Force generates acceleration.
15

First Order Dynamics cont’d
The t = b/k is called the time constant of the first order differential equation.
t is the time at which the error has decayed to 37% of the original error.

The solution of the differential equation is

The settling time is:

What is the steady state error?
It is zero only when F is zero (homogeneous case). For non-homogeneous cases it is not zero.

What is the overshoot?
There is NO overshoot
16

Question
How can you make the performance better?

Increase k
Decrease b

Does this make intuitive sense?

A spring “pulls or pushes” the system to zero error.
17

Second –Order Error Dynamics
The second-order error dynamics:

Where ς is called damping ratio and ωn is the natural frequency.

Second –Order Error Dynamics Cont’d
The roots of the characteristic polynomial:

ς.ωn has to be non-negative for the response to be stable. Why?

3 Cases for the roots:
ς >1 – Real and unequal roots
ς = 1 – Real and equal
ς < 1 – Complex conjugates Damping Overdamped ς > 1

Critically damped ς = 1

Underdamped ς < 1 The constants are derived by setting the initial error to 1 and derivative of error to 0. What are the time constants for these cases? Wd is the damped natural frequency. This will be used to calculate peak overshoot time. 20 Roots for the 3 cases Can you guess what is the ideal response? 21 Performance of 2nd order systems Real roots which are more negative are preferable due to shorter settling times. Roots further away from the real axis (i.e., complex roots) correspond to greater overshoot and oscillations. (Underdamped case is NOT preferable) Steady State Error (SSE) is zero for all 2nd order systems irrespective of overdamping, critical damping or underdamping. (Which is great!) The 2% settling time is approximately 4*t (the time constant). Motion Control with Velocity Inputs Velocity Position or velocity. In our examples, the system can be a joint of a manipulator, a mobile robot, UAV etc. Our objective is to provide an input velocity that will help us maintain the desired trajectory. We first deal with one dimension and the same can be extended to higher dimensions. Single “Joint” Feedforward Control Given: θd the desired joint trajectory We can make our input velocity = derivative of the desired velocity This is called feedforward or open-loop controller. No feedback or sensory data is needed. Disadvantage: Position error will accumulate over time. We need feedback control! A terrible map created due to errors in odometry. Even with feedback such errors can happen. How many of you know about Differential drive Example for position error accumulation: Making a DD robot go straight. Even 1 degree is very high error. This is caused by 24 Feedback control of 1st order error dynamics Where Kp > 0

This is called a Proportional Controller since our input is controlled proportional to the error.

The constant Kp acts as a virtual spring that pulls the current position to the desired position.

This is a linear controller.

We will consider 2 cases.

Called control law

Case 1: θd is constant
In this case derivative of θd is zero. NOTE: All derivatives are wrt time.

Time constant t is (1/ Kp). So, the greater the value of Kp the faster the error response.
Steady State error is zero, No overshoot.

This type of control is called Setpoint control.

The equation is a 1st order homogeneous equation.

Setpoint control is useful which a manipulator has to hold its position.
26

Case 2:
The error dynamics with P control will be:

This is a 1st order non-homogenous linear diff. equation. The solution for this diff. equation is,

The steady state error is non-zero. Why?

The joint position lags behind the moving reference. The manipulator can never instantaneously change its position / velocity.
27

Can we make SSE zero?
If Kp tends to infinity, the error goes to zero.

But practically, we cannot have very high Kp values. It might lead to instability.

We can have another “knob” in the controller.

P-I controller
We add another constant called the integral constant (KI ).

Substituting this in the error equation:

Differentiating wrt time, we get:

Where have we seen this last equation?
29

P-I Controller Cont’d
The equation looks exactly like:

If we substitute and
Kp plays the role of b/m and KI plays the role of k/m.

P-I controller Performance

Root Locus Plot: I Overdamped II Critically Damped III Underdamped
Kp = 20 and increasing Ki from zero.

For Kp = 20 and increasing Ki from zero
31

P-I Controller Block Diagram

Comparison between P and PI controller
For tracking constant-velocity trajectory, i.e,
is constant.

P-Controller: SSE ≠ 0 PI-Controller: SSE = 0 (Must choose Critically damped)

If is not constant, SSE for the P-I controller need not be 0.

PI-Controller has better tracking performance than P-controller

Feedforward Plus Feedback Control
In feedback control, we need the error before the joint begins to move. This is a drawback.

It is better to use the knowledge of desired trajectory to initiate the motion before any error accumulates.

Has both the advantages of the feedforward and feedback control.

This can also be extended to higher dimensions.
34

PID controller

https://en.wikipedia.org/wiki/PID_controller
35

PID Tuning

Manual Tuning
Ziegler-Nichols
Software Tools

Ku­ is called the ultimate gain
Tu­­ is the period of oscillations

Click on image to view the effect of the different PID constants.
36

Other types of Control
So far we have seen position control. The same concepts can be extended to controlling velocity as well

In position control, the unstated assumption is that the robot does not come in contact with a human. Forces exhibited by the robot may be unconstrained which is dangerous to humans.

In force control, the end effector trajectory is not controlled. What if we wish to control both force interaction and object manipulation?

Impedance control is useful when the robots interact closely with humans, especially in contact robotics. Example in rehabilitation robots.

Rehab Robot Video

Impedance Definitions
What is impedance?
Impedance is the term relating motion and force.
It is similar to resistance which relates voltage and current.

It is also a measure of how a robot “feels” when it is interacted with.

A function, possibly nonlinear, dynamic, or even discontinuous, specifying the force produced in response to a motion imposed by the environment.

Position is input and force is output

39

Example

Taking Laplace transform:

40

Impedance vs Position/Force Control

NOTE: Impedance and compliance are in relationship with an environment.
41

Biological Inspiration for Impedance Control

Back to impedance control
Invented by Neville Hogan at MIT in 1984.

Highly useful in rehabilitative robots. (ex: for stroke patients or patients with paralysis.)

Impedance control makes manipulators or end-effectors behave like passive physical systems, yet providing assistance.

Impedance control is described by simple math, but surprisingly difficult abstraction and concept.

Application of impedance control is by using slot controller.

Example
Impaired person required to perform a functional task.
Impaired humans are “non-compliant” – may not be able to exert forces to cause certain motions.
For a given amount of displacement, a rehab robot has to generate high amount of force. HIGH IMPEDANCE needed.

Healthy human (or a patient who is recovering) required to perform a task.
The rehab robot needs to generate small forces for a given displacement.

Impedance control allows a “sliding scale” for level of assist based on human capabilities.

Advantages of Impedance Control
Enables backdriveability i.e., low robot impedance so that patients do not perceive robot inertia or friction.

Back-drivability is a function of hardware (specifically, the transmission or actuators), one that provides low end-point impedance, allowing the robot to “get out of the way”.

“Getting out of the way” means the robot does not interfere or impose constraints on human movement.

Back-drivable actuators-transmission is always gearless. Gearing destroys back-drivability

The human gets “assist as needed” treatment.
45

Simple Impedance Control (SIC)
Target behavior: impedance.
Choose spring & damping behaviors with stiffness & damping matrices Kj and Bj.
Control law
Input: deviation from virtual trajectory (Δx = x0 – x).
Output: net force (ΣF = Ta + Te).

Simple Impedance Controller Cont’d
Target behavior? Impedance.

But the control law looks like we are controlling position?

We are shaping (not controlling) robot motion through a combination of virtual velocity trajectory and impedance.

Controller spring-damper “pushes” or “pulls” towards the desired trajectory but it is directly influenced by robot impedance.

Slot Controller
2 Important Aspects needed

Reference Trajectory : Where the robot should be at each instant

Box/Slot Dynamics: Renders assist-as-needed behavior
“Outside” box: Implement SIC
“Inside” box: Implement damped control (positional autonomy)

Box Geometry:
2-D = 2DOF (dynamic width, height); 1-D = 1-DOF(dynamic height)

How to implement impedance control? Moving Box Slot Controller
Moves a virtual box (a rectangle) from a start to end of a trajectory
All the corners of the box may move.
Box may move in space and it may also change size.

This creates a “collapsing slot” (e.g. in width)
Collapses w/ minimum jerk motion profile
Rectangle changing shape describes a moving force field

The force vector is commanded by controller
If robot end-effector is inside rectangle, there is no force
If robot end-effector is outside rectangle, there is force (SIC Control

Reference Trajectory Example

In this example, the ankle trajectory is taken as reference trajectory.
50

Reference Trajectory
“Normal” Ankle Trajectory

Box Dynamics
Box Dynamics: Creating the Collapsing Slot

b – refers to the bottom part of the slot
t – refers to the top part
52

A summary of the process

Control Laws

Implementation Results – trajectories

Implementation Result – The forces

452549901