You are on page 1of 20

PID

(Proportional Integral Derivative)


Proportional Action (P):
Makes the system more reactive (piu pronto)
1
Reduces disturbances on G: 1 GGH goes toward: H for high G values
Can lead to overshoot
Integral Action (I):
Reduces error at regime
Can lead to oscillations
Can move poles to the right (i.e. instability)
Derivative Action (D):
It acts as a damper
It works against high slopes in the controller action
Can move poles to the right (i.e. instability)

Mechatronics
PID
Note: with only the proportional gain the control would oscillate
around the set point

G
kp
t
e
Set point +
0
kI + Plant
-
d
dt
kD
feedback
H

The transfer function is: G


1 GH

Mechatronics
Kp low narrow bandwidth
f limited poor performances

Kp*Lag error low current peak bw


Lag error
Low steepness f low narrow bw

Set point
+ PID M
-
Real
profile
E

Mechatronics
Kp high wide band width
high f good performances

Kp*Lag error high current peak

bw
Lag error
High steepness high f wide bw

Set point
+ PID M
-
Real
Profile

Mechatronics
PID (closed loop)
and FeedForward (open loop)

Mechatronics
PID time response to a step:

Time continuous version:

Proportional Integral Derivative Action (it does derivate


Action Action only the feedback to avoid Dirac impulse)

Mechatronics
Motion Profiles

Mechatronics
Socapel Parallel Regulator
(position lag proportional to torque)
Position Velocity PID Torque
Command Command Command

Mechatronics
Rockwell Serial Regulator
(position lag proportional to velocity)
Position Velocity Torque
Lag PI PI
Command Command

Mechatronics
Regulator Structure
Components
Digital Current (Torque) Regulator
Safety Value limiting
Digital PID Position Regulator
Feed-Forward System

Position Power
Feed- Controller Stage
Forward

Current
Set- Signals to
Points + the Motor
+ PID Torque PI Current
Regulator Limitation Regulator
+
-
Feedback
Signals

Mechatronics
Parallel PID Regulator
Description
The Input Value for the PID
Regulator is the Position Lag
(difference between the requested
position and the real position) PID Regulator
The Torque Set-Point is the
Output Value of the PID Regulator Position
P
Lag
The PID Regulator has three
Paths (parts) Position Torque
Proportional Part Set-Point + Set-Point
Integral Part S I S
Derivative Part + + +
For the Proportional Part the -
Position Lag Value is multiplied D
with the P-Gain Parameter
For the Integral Part the Position
Lag Value is integrated and then
multiplied with the I-Gain Parameter Position Feedback
For the Derivative Part the Speed
(velocity) Lag Value (same as the first
derivative of the Position Lag) is
multiplied with the D-Gain Parameter

Mechatronics
Feed-Forward System
Description
Four different Feed-Forward Components are available for the SAM Regulator
External Force
Static / Dry Friction
Viscous Friction
Inertia
The External Force Component is independent on the Motion and creates a
constant Torque value (e.g. Gravity Compensation of a vertical axis)
The Static or Dry Friction Component uses only the sign of the Speed Set-
Point to create a constant Torque value, whenever the speed is not zero
The Viscous Friction Component is always proportional to the Speed Set-Point

The Inertia Component is always proportional to the Acceleration Set-Point


and compensates the mechanics Inertia during acceleration and deceleration
(M = J * a)
External force Static/Dry friction Viscous friction Inertia

speed speed speed speed


torque torque torque torque

S
+ + + = Torque
Feed-
Forward

time time time time

Mechatronics
Measuring the External Force and Friction Values
Run the motor in positive direction with a low speed (S1 = 10%) and measure the mean
value of the needed Torque (Tp1) for several samples
Then run the axis with the machines nominal speed (S10 = 100%) and measure the
Torque as before (Tp10)
Do the same in negative rotating direction (Tn1 and Tn10)

torque
|Tp1| -|Tn1|
Tp10 Ext.force =
2

viscous
dry friction Tp1 friction
|Tp10|+|Tn10| - |Tp1|+|Tn1|
external
force 2 2
+ visc =
-
S1

S10
Tn1 speed S10 - S1

|Tp1| + |Tn1|
dry = - visc * S1
Tn10
2

Mechatronics
Regulator Tuning
Deactivate the PosLag Error
Clear the Regulators Gain and Feed-Forward
Parameters
Start with small but positive P, D-Gains
Enable the Drive (power_on) and run the axis at constant
speed
Increase D-Gain step by step, until vibration starts or the
audible noise is too high
Reduce D-Gain to 50% of the found value
Stop the axis, reset the PosLag (power_off and then
power_on)
Go through the last four steps for P-Gain (instead of
R_DGain) trying to improve step response performances
Set the I-Gain so to reduce the Error At Regime (ear)
Set Feed Forward Gains

TuneLearn link Note: Here we refer to a parallel control; the same rule are
Anyhow valid for a serial control substituting the word
velocity-P-Gain to D-Gain Mechatronics
Optimise the PD Regulator Step Response
Observe (trace) the Systems Step Response
(PosLag) while performing a Torque Step
Disturbance (with nominal motor torque)
Modify the D-Gain and P-Gain Parameters until a
critically damped system is reached

500 200

0 100
-0.05 -500 0 0.05 0.1 0.15 0.2 0.25 0.3
0
-1000
-0.05 0 0.05 0.1 0.15 0.2 0.25 0.3
-1500 -100
-2000
-2500
Step Response -200
Step Response
-3000 (PosLag) for an over -300 (PosLag) for an
-3500 damped system -400 under damped system
-4000
500 -500
-4500

0
-0.05 0 0.05 0.1 0.15 0.2 0.25 0.3
Increase P-Gain -500 Decrease P-Gain
-1000
Step Response
(PosLag) for a
-1500 critically damped
system
-2000

Mechatronics
Adjust the Feed-Forward Parameters
Perform positioning movements (relative_move), using the machines
nominal values for acceleration, deceleration and speed and observe
(trace) the resulting PosLag
Adjust the Inertia, ViscFricTorq, StatFricTorq and ExtTorq parameters
until a minimum Range (depending on the application) for PosLag is
reached

4000 500
Speed
3000
Speed proportional PosLag
400
Adjust Inertia
2000 300

1000 200

0 100
-0.1 0 0.1 0.2 0.3 0.4 0.5
-1000 0
-0.1 0 0.1 0.2 0.3 0.4 0.5
-2000 -100
Acceleration proportional
PosLag
500 500 Adjust ViscFricTorq
Properly adjusted
400
Feed-Forward Adjust StatFricTorq 400 Sign of Speed
300 Parameters 300
proportional PosLag
200 200

100 100

0 0
-0.1 0 0.1 0.2 0.3 0.4 0.5 -0.1 0 0.1 0.2 0.3 0.4 0.5
-100 -100

Mechatronics
I-Gain
Observe (trace) the Systems Step Response (PosLag) while
performing a Torque Step Disturbance (with nominal motor torque)
Modify the I-Gain Parameter until a critically damped system is
reached

2000 1500

1500
1000
1000
500
500

0 0
-0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3
-500
-500
-1000
Step Response Step Response
-1000
-1500 (PosLag) for an over (PosLag) for an
-2000 damped system -1500 under damped system

Increase I-Gain 1500


Decrease I-Gain
1000

500

0
-0.05 0 0.05 0.1 0.15 0.2 0.25 0.3
-500

Step Response
-1000
(PosLag) for a
-1500 critically damped
system

Mechatronics
PD, no FF

Mechatronics
PID, no FF

Mechatronics
PD, with FF

Mechatronics

You might also like