PID (Presenting a Fundamental Understanding of Sophisticated Technology)

February 18, 2012 [RIGHT]Marty Kanner[/RIGHT]

                            THE PID REVISITED

Chapter 1

Dedication: I dedicate this review of closed loop theory to all the team members of POB-353, past and present, who let me hang around while they tenaciously dedicated themselves to designing and building robots for the FIRST competitions. It may seem strange, but I truly thank them all because I found that the time I spent with them let me age without growing old.

         (IF YOU DON’T STUDY HISTORY YOU’LL HAVE TO REPEAT IT)

Introduction: The development of the theory and analysis of closed loops was largely pushed in the 1940’s to the 1950’s as a result of our fight for survival during WW II. The time was critical and not a time for guessing or for error. Trial and error would cause loss of life. Anything built had to be engineered based on fundamental understanding and analysis. It had to be right the first time. It was a period before the digital computer came of age. Both analog control and analog computation were used for ship and aircraft navigation, missile firing and navigation in inertial space. The theory, the analysis and pragmatic knowledge was largely documented during this period. With the advent of the digital age and high speed search engines, this information can be readily researched. The following is an attempt to present the information in a useable manner to interested high school students. The language of the ‘game’-The thinking here is that you can’t play a game (closed loop design) if you don’t start out by learning its language. The following is a tabulation of words without explanation but should be read through to see which of them does have meaning to you. As these terms are used later on, they will be defined when required.

OPEN LOOP, CLOSED LOOP, OPEN LOOP RESPONSE, CLOSED LOOP RESPONSE, LOG TRANSFORM, LAPLACE TRANSFORM, TYPE ZERO LOOP, TYPE ONE LOOP, TYPE TWO LOOP, STATIC SENSITIVITY, STATIC ERROR, VELOCITY COEFFICIENT, VELOCITY ERROR, POSITIONAL ERROR, DAMPING, OVER DAMPED, CRITICAL DAMPED, UNDERDAMPED, STABILITY, INSTABILITY, BODE RESPONSE, BODE STABILITY CRITERIA, SUMMING JUNCTION, TRANSFER FUNCTION, OUTER LOOP, INNER LOOP, GAIN , GAIN-BANDWIDTH, ELECTRICAL FEEDBACK SYSTEMS, ELECTRO-MECHANICAL FEEDBACK SYSTEMS, ETC.

This is the language of the game that comes to mind at this point of the writing. There may be other specialized terminology appearing later in this writing. That too will also be clarified as required. The understanding and application of PID should wait until we get at least some of the language of the ‘game’ under our belts. OK let’s get started. But where should we start? That is the first question and the answer is, by considering open loop vs. closed loop control.

To get started, I’ll give examples of closed and open loop control. Consider that you want to control the speed of a motor used in the FIRST competition. The motors used in FIRST competitions have the following characteristics: there unloaded speed is directly proportional to the DC voltage applied and the current they draw is directly proportional to the torque load applied. Note that I said that the speed function assumed an unloaded motor. In actuality the speed is reduced from the linear function when a load is applied. Generally motors that are continuously delivering rated load will have their speed reduced by 5 to 15% from their no load speed. (Check these statements against the FIRST motor performance curves provided on the internet)

An example of an open loop control would be a configuration where one takes an adjustable DC voltage source, and controls the speed by changing the voltage, figure 1. As you can see, setting the voltage and operating under conditions where the load varies from no load to rated load, we would see speed changes by as much as 15%. If the application doesn’t specify a speed control to tighter tolerance, this open loop control would be entirely satisfactory. It is also worthy to note that if the power supply is not regulated, the changes in the supply voltage would also cause speed changes. Now consider that I take a tachometer and couple it to one side of the motor shaft, figure 2. A tachometer is a device that produces a precise DC voltage that is directly proportional to the speed at which it is driven. A typical accuracy for a tachometer is 1%. What we do now is compare the tachometer feedback voltage to a desired speed command voltage. We then amplify the error between the command and feedback and drive the motor with the amplified error voltage. The motor is then caused to speed up or slow down based on the voltage difference and polarity of the error voltage. The higher we make the gain of the amplifier, the smaller will be the error voltage. Within limits, the motor speed will now track the accurate performance of the tachometer, regardless of load changes or supply voltage changes. We can expect that the performance of the closed loop speed control could approach the accuracy of the tachometer, namely 1%. One precaution though; although it seems that the higher we make the gain, the better will be the performance. The problem is that if we go too high in gain, the closed loop will become unstable. Stability, gain and gain-bandwidth will be discussed later on.

In summary, what we did here was to use an accurate sensor that accurately represents what we are trying to accomplish. We then compare, (take the difference) of the sensor output with a desired command. The difference is now an error which is amplified. The amplified error is then coupled to a device which will drive the error towards zero. In FIRST, the driving mechanisms are generally electromechanical. However, closed loops are also widely used in systems that are entirely electrical in nature. We’ll save the discussion of electrical feedback systems for a later presentation. What has been discussed so far is an open loop and closed loop velocity control system. Note that the velocity loop is type zero control loop. This will be discussed in more detail later on.

Please Reply with any Questions.

February 18, 2012 [RIGHT]Marty Kanner[/RIGHT]

			 THE PID REVISITED

Chapter 2

ELECTRO-MECHANICAL POSITIONAL CLOSED LOOPS
A velocity closed loop was described to introduce the concept of closed loops and a comparison was made to an open loop velocity control configuration. We saw that the closed loop would be used whenever accuracy and overall performance is required. Although a comparison was made between open loop and closed loop in the previous chapter, it will not be done here. The improved performance possibilities of the closed loop over the open are essentially the same. Note that the positional closed loop is a type 1 control loop.

The purpose of a positional closed loop is just that; to command a desired position and have a desired load move to the commanded position. The problems of design are generally in the details but I don’t think it worthwhile at this point to completely specify a positional loop. This introductory discussion just describes the typical functional elements you would find in a positional loop, figure 1. In this case we take a command voltage that represents the position of a large block that we want to precisely position over a one foot range. In this case our feedback transducer could be a precision potentiometer instead of the tachometer used in chapter 1. The precision potentiometer is coupled to the block such that when the block is moved through the desired one foot range, the arm of the potentiometer moves through its complete range. By providing a regulated voltage across the ends of the potentiometer, the voltage at the output of the potentiometer arm will linearly represent the position of the block.

As in chapter 1, the command voltage is compared to the voltage feedback. This time the feedback is from the potentiometer. The voltage comparison is made in what is called a summing junction. This function can be implemented in many ways but in the end, the difference between the voltages is the error voltage that would then be amplified. The amplified voltage then powers a motor that is selected to be large enough to move the load at a desired speed. Motors are generally designed to run at high speed. They are then matched to the load using some form of speed reduction (i.e. gear train speed reducers). The motor automatically moves in the direction to drive the error voltage toward zero within the limits of the design. Here again, the higher the gain, the smaller the error. The limit in gain is again the concern for loop stability. For reference purposes only, note that the electro-mechanical positional loop described is a type 1 control loop. These loops can be designed to position to 0.10% accuracy. We could position a load to within .001 feet over the one foot throw.

When the design requirement dictates small error voltages under dynamic conditions, another element is added to the design. This device is called an integrator which literally integrates the error voltage. This minimizes static and dynamic errors and is described in chapter 4.

Please reply with any questions