Presentation on theme: "PID (Proportional Integral Derivative)"— Presentation transcript:
1 PID (Proportional Integral Derivative) Proportional Action (P):Makes the system more reactive (piu’ pronto)Reduces disturbances on G: goes toward: for high G valuesCan lead to overshootIntegral Action (I):Reduces error at regimeCan lead to oscillationsCan move poles to the right (i.e. instability)Derivative Action (D):It acts as a damperIt works against high slopes in the controller action
3 Nyquist Criterion I theorem: II theorem: Hp) The GH open loop transfer function has every pole with negative real part (I.e. stable) with the exception of one or two poles in the origin (O).Th) For asynthotic stability of G/(1+GH) is necessary and sufficient that the polar diagram of GH(jω) does not go around or touch the point (-1,j0) leaving it to the left (increasing the frequencies).II theorem:Hp) The GH open loop transfer function does not have pure imaginary poles with the exception of one or two in the origin (O).Th) For asynthotic stability of G/(1+GH) is necessary and sufficient that the polar diagram of GH(jω) does go around counter-clockwise the point (-1,j0) as many times as the number of poles with positive real part.
4 Polar Diagram: representation of GH with respect to ω. Root Locus (Luogo delle radici): path of the roots (solutions) of 1+GH with varying k (i.e. the PID) of GH.
5 PIDNote: with only the proportional gain the control would oscillate around the set pointThe transfer function is:kpkDkI+PlantH-Set pointefeedbackG
6 The PID gain is:H(s) introduces poles and, sometimes, zeroes.Representing the root locusFor the characteristic equation (1+GH), for different PIDs we can observe the different gains effect.
12 Kp low narrow bandwidth f limited poor performances PIDMESet point+-Lag errorKp*Lag error low current peakRealprofilebwLow steepness f low narrow bw
13 Kp high wide band width high f good performances PIDMESet point+-Lag errorKp*Lag error high current peakReal ProfileHigh steepness high f wide bwbw
14 Notch Filter x y Characteristics: 2nd order recursive digital filter it does remove a pair of poles not well dampened and it does substitute them with a pair adequately dampenedThese high (with respect to the denominator) make the system more reactive but oscillating with high kb0a2a1b1b2Z-1+-xyThese high (with respect to the numerator) make the system more oscillating (and high k it dampen it) but more reactive (high k slows it)
15 Basic Filtering Equation: z-2b2z-1b1b0z-2a2z-1a1xy+-+With these blocks it’s a IIR (Infinite Impulse Response)Without it’s a FIR(Finite Impulse Response, doen’t use its past outputs to determine actual output)Basic Filtering Equation:
32 Current Signals to the Motor Regulator StructurePositionControllerPowerStageComponentsPI CurrentRegulatorCurrent Signals to the MotorDigital Current (Torque) RegulatorSafety Value limitingTorqueLimitationDigital PID Position Regulator+PIDRegulator-FeedbackSignals+Set-PointsFeed-Forward SystemFeed-Forward
33 Parallel PID Regulator DescriptionThe Input Value for the PID Regulator is the Position Lag (difference between the requested position and the real position)The Torque Set-Point is the Output Value of the PID RegulatorP+PID RegulatorS-Position FeedbackTorqueSet-PointPositionLagIDThe PID Regulator has three Paths (parts)Proportional PartIntegral PartDerivative PartFor the Proportional Part the Position Lag Value is multiplied with the P-Gain ParameterFor the Integral Part the Position Lag Value is integrated and then multiplied with the I-Gain ParameterFor the Derivative Part the Speed (velocity) Lag Value (same as the first derivative of the Position Lag) is multiplied with the D-Gain Parameter
34 S Feed-Forward System Description External Force Static / Dry Friction Four different Feed-Forward Components are available for the SAM RegulatorExternal ForceStatic / Dry FrictionViscous FrictionInertiaThe 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 zeroThe Viscous Friction Component is always proportional to the Speed Set-PointThe Inertia Component is always proportional to the Acceleration Set-Point and compensates the mechanics Inertia during acceleration and deceleration (M = J * a)External forcetimespeedtorque+Static/Dry frictionViscous frictionSInertiaTorqueFeed-Forward=
35 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 samplesS1Tp1Then run the axis with the machine’s nominal speed (S10 = 100%) and measure the Torque as before (Tp10)Do the same in negative rotating direction (Tn1 and Tn10)viscous frictiontorque+-dry frictionexternal forceS10Tp10Tn10Tn1Ext.force =|Tp1| -|Tn1|2visc =|Tp10|+|Tn10| - |Tp1|+|Tn1|S10 - S1dry =|Tp1| + |Tn1|- visc * S1speed
37 Regulator Tuning Deactivate the PosLag Error Clear the Regulator’s Gain and Feed-Forward ParametersStart with small but positive P, D-GainsEnable the Drive (power_on) and run the axis at constant speedIncrease D-Gain step by step, until vibration starts or the audible noise is too highReduce D-Gain to 50% of the found valueStop 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 performancesSet the I-Gain so to reduce the Error At Regime (ear)Set Feed Forward GainsTuneLearn linkNote: Here we refer to a parallel control; the same rule areAnyhow valid for a serial control substituting the word“velocity-P-Gain” to “D-Gain”
38 Optimise the PD Regulator Step Response Observe (trace) the System’s 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 reachedStep Response (PosLag) for a critically damped systemStep Response (PosLag) for an over damped systemStep Response (PosLag) for an under damped systemIncrease P-GainDecrease P-Gain
39 Adjust the Feed-Forward Parameters Perform positioning movements (relative_move), using the machine’s nominal values for acceleration, deceleration and speed and observe (trace) the resulting PosLagAdjust the Inertia, ViscFricTorq, StatFricTorq and ExtTorq parameters until a minimum Range (depending on the application) for PosLag is reachedSpeedSpeed proportional PosLagAdjust InertiaAcceleration proportional PosLagAdjust ViscFricTorqProperly adjusted Feed-Forward ParametersAdjust StatFricTorqSign of Speed proportional PosLag
40 I-GainObserve (trace) the System’s Step Response (PosLag) while performing a Torque Step Disturbance (with nominal motor torque)Modify the I-Gain Parameter until a critically damped system is reachedStep Response (PosLag) for an over damped systemStep Response (PosLag) for an under damped systemIncrease I-GainDecrease I-GainStep Response (PosLag) for a critically damped system
44 Notes on D-GainIn practice, Kd is limited by several factors including theDrive current loop bandwidth which is directly related to thePWM frequency selected for the drive (standard: 8 kHz; optional: 4 kHz)resonance frequency of the axis mechanics,signal-to-noise-ratio of the speed measurement (to avoid to derivate white noise)In practice Kd is increased to the point wherethe axis goes into sustained oscillation,then reduced by a factor of 2 to obtaingood speed loop stability.Kp is then determined with thestep response performance.