The Implementation Of PID Controller In The Pick And Place .

2y ago
19 Views
2 Downloads
506.57 KB
7 Pages
Last View : 1m ago
Last Download : 2m ago
Upload by : Braxton Mach
Transcription

The Implementation of PID Controller in the Pick and PlaceRobotH. Ferdinando, H. Wicaksono and R. WibowoDept. of Electrical Engineering, Petra Christian University, IndonesiaAbstract – A control system for pick and place robotis implemented. The control algorithm uses the PID(Proportional-Integral-Derivative). The system 3-DOFrobot with specific task, i.e. to pick certain a letterblocks and places it to the desired location. The robotis controlled with the AT89S51 microcontroller. Thecommand for the specific letter blocks comes from acomputer. The computer and the AT89S51 areconnected via RS-232. The time sampling of the systemis 5ms. After tuning the PID’s constants, the ratio ofthe constant for P, I and D is 20:0.1:34. Theexperiments show that the rise time of the system is1.41s; the settling time is 4.03s and the maximumovershoot is 1.62%. It is recommended that theconstant for Proportional controller is between 2 and70, the greater the constant the longer the rise time.Big value of the constant also contributes to thenumber of oscillation. For the Integral controller, it is10 and 50, the greater the constant the more theoscillation occurred. This makes the motor runabruptly.Keywords – PID, pick and place robot, AT89S51I.II. INTRODUCTIONThe PID (Proportional-Integral-Derivative) controlleris the most popular control algorithm in industries. Thepower of this controller lies on the simplicity of thecontrol algorithm. Although there are many new controlalgorithms developed nowadays, this controller still exists.There are many applications of the PID controller inindustries, e.g. robotic arm, conveyor, heating process,etc. The goal is one, i.e. to reach the setting point fast withsmall overshoot.This paper discusses the role of the PID controller incontrolling pick and place robotic arm. The robot will pickcertain block of letter and then place it in the desiredplace. The control algorithm is applied to the movementof the main body. The controller is the AT89S51microcontroller. It receives command from computer viaRS-232. The final goal is to get system with fast rise time,fast settling time and minimum overshoot.This paper is organized as follow; the first sectiongives introduction to the project. The PID controller isdiscussed briefly on the next section. For those who do notfamiliar with pick and place robot can read the followingsection, then it comes the design of the system formechanics, hardware and software part. It continues withexperiment for the system and conclusion closes thispaper.III.THE PID CONTROLLER – BRIEF INTRODUCTIONThe PID controller combines three control algorithms,i.e. Proportional, Integral and Derivative controllers. Eachcontroller has its own constant to adjust the output of thecontroller based on the error signal. Each controller hasdifferent contribution to the response of the system.To get a good PID controller system, one must tunethe constants. Although it seems independent, theconstants do not. This gives complexity in tuning them.The tune process, however, can be done via severalalgorithms such as Ziegler-Nichols, Cohen-Coen, etc [1].Each algorithm has its own advantages and disadvantages.The power of the PID controller lies on its simplicity.One only set three constants in order to get good response.It is simple for the number of parameter is only three.Besides, it can be implemented without digital controller.One can make the PID controller with OperationalAmplifier and several passive components. Off course thiskind of PID controller has limited capabilities, but one canuse it to control simple system.The more complex PID controller uses digitalcontroller such as microcontroller, PC (personalcomputer) or PLC (programmable logic controller). Theseequipments give better PID controller but with highercost. The chosen controller is based on the complexity ofthe plant.IV.PICK AND PLACE ROBOTA pick and place robot is a material handling robot thatcan work 24 hours a day without worries or fatigue [2].This robot is a common robot in industries. The task is topick some object and place it in the desired place.When it is controlled, then the position control is themain issue. It must be controlled such that the robot canpick the object at certain place accurately and place it atthe desired place accurately as well. It is the role of thecontroller to achieve this goal. One can use manyalgorithms to achieve it but the goal is one, i.e. to pick andplace object accurately, fast and with small overshoot.

The application of the pick and place robot is inassembling production process, for example. Here, therobot must pick certain part and place it to the specificplace. The assembling process of the cassette uses thisrobot.Another application is insert machine for the electronicprinted circuit board (pcb). Here, the robot picks thecomponent, inserts it to the hole, cuts the lead and bendsit. The insert machine can finish the whole component in apcb fast, compare to the human.V.letterarmMECHANICS DESIGNplace/slotFig. 3. Base place (top view)The mechanic design is based on figure 1. The primaryand secondary arms can rotate 300o and the gripper canmove up and down (see figure 2).primaryarmVI.Figure 4 shows the block diagram of the system. Thesystem uses several additional circuits. They are discussedin this section.Potentiometer2motor 2gear boxsecondaryarmmotor 3HARDWARE DESIGNmotor 1main bodyPCRS-232ADC0809Potentiometer1AT89S51Limit switchesDAC0808Fig. 1. Mechanic diagram of the robotComparator2H-bridgeTriangle wavegenerator13Fig. 2. How the robot moveThe robot is supported by a main body. The main bodyhas base plate. On the base plate the letter blocks areplaced. Figure 3 shows the whole base plate from top. Theletter block is picked one by one and placed at the desiredplaceFig. 4. Block diagram of the systemThe position sensor for the system is a potentiometer.It is a linear ten turn potentiometer. The PID controller isimplemented in a microcontroller MCS-51 family, i.e.AT89S51 [3]. The number of position sensors is two, onefor the primary arm and the other for the secondary arm.The gripper uses two limit switches. Figure 1 shows theposition of the potentiometer (close to the motor 1 and 2)To read the current position, the AT89S51 needs A/Dconverter. The ADC0809 is used. The signals, however,cannot be read directly for the signal range does not matchto the range of the ADC0809 [4]. For this reason, anadditional circuit is used. It is called zero and span circuit.The arms must be able to turn CW and CCW. For thispurpose, an H-bridge is used to drive the motors. The Hbride uses LM298N [5]. This chip can provide current upto 3A.

The movement of the arms must be able to becontrolled. It means when the current position is far fromthe desired position, then the arm must move fast, andvice versa. For the motor is DC motor, it needs to controlthe voltage drop at the motor terminal. This leads to thePWM (Pulse Width Modulation) system.The PWM circuit using a simple triangle wavegenerator, an input reference signal and a comparator. Thecomparator will give output either HIGH or LOWaccording to the status of both inputs. The input referencesignal is produced by the AT89S51 via DAC0808. For theoutput of the DAC0808 is current [6], then the current tovoltage converter is used. The DAC0808 gets data fromthe AT89S51. Figure 5 shows the simplified PWM circuit.The frequency of the PWM signal is 1kHz. This frequencydepends on the frequency of the triangle wave. This valueis chosen for the motor will turn abruptly in low frequencyof PWM.the system is idle, waiting for the next interrupt timer.Figure 6 shows the part of interrupt timer routine.void InitCounter(void){Counter 0;EA 0;// disable all interruptsTH0 256-18;// TL0 238TMOD 0x22; // chose mode 2 setiap timerPT0 1;// bit prioritas timer0ET0 1;// enable interrupt of timer0TR0 1;// start timerEA 1;// enable all interrupts}void Counter Bit() interrupt 1 using 1 {Counter ;if (Counter 0){SamplingPID 1;}}Fig. 6. Part of interrupt timer routineThe flag SamplingPID guards the main program suchthat when the time is come, then the PID process will run.As soon as the process starts, then this flag will be cleared.This makes the main program waits until the next timesampling.B. PID ControllerFig. 5. Simplified PWM circuitVII.SOFTWARE DESIGNThe software in the AT89S51 is written in C [7] forthe computation uses floating point number. To useassembly language can lengthen the development time.The AT89S51 receives command from a computer. Userinputs the command using the HyperTerminal. Thecommand is simply one letter. It means the robot mustpick that letter and place it at the pre-set place.The robot moves its arm one by one instead ofsimultaneously. This makes the implementation simple.A. Time SamplingThe control algorithm uses PID. For this purpose, thereare three constants for the controller. It also needs a timesampling in the computation. The time sampling is 20ms.It is assumed that the motor has slow response for the loadis big.The AT89S51 must be set such that it will repeat abunch of task every 20ms. The interrupt timer is used forthis purpose. Those tasks are reading the current positionof the primary arm, compare it with the desired positionfrom PC (via RS-232), calculate the PID control actionand drive the robot. When there is time remaining, thenThe constants of PID parameter could have floatingpoint value. For this reason, the implementation uses Clanguage.To make the system simple and easy for modification, theconstants are floating point. Figure 7 shows the PIDcontroller implementation in the AT89S51.void CalCulatePID(void){YN1 Y;ErrN2 ErrN1;ErrN1 Err;Err SetPoint-CurPoint;T 0.005;Y YN1 KP*(Err-ErrN1) KI*Err*T ((KD/T)*(Err ErrN2-2*ErrN1));if (Y 255) Y 255;if (Y -255) Y -255;}Fig. 7. PID controller in the AT89S51VIII. EXPERIMENTSA. PWM CircuitThe frequency of the PWM signal is 921.66Hz (period 1.085ms). It depends on the triangle wave. Figure 8shows several PWM signal with various duty cycle, 25%,50%, 75% and 100%.

(a)Rise time, settling time and maximum overshoot are3.36s, 32.62s and 30% respectively. This result is notgood. The rise time must be small and so must the settlingtime. The maximum overshoot is too big for controlposition.To change the constant to 2.3, 70 and 0.001 for P, Iand D respectively does not give better results. Thiscombination makes the oscillation continue forever.Figure 10 shows it.(b)ADC(c)valueTime (s)(d)Fig. 10. Bad combination of PID parametersFig. 8. PWM signal for duty cycle (a) 25% (b) 50% (c) 75% (d) 100%This combination should not be used for the settlingtime is at infinity, although the rise time is good. Thesystem becomes unstable for the Derivative constant is toosmall.The experiments show that the duty cycles do not fit tothe design. For 25%, 50%, 75% and 100%, theimplementation results 25.34%, 50.23%, 75.57% and99.53% respectively.The problem of those deviations is that there is smallerror in the frequency of the triangle wave. If the trianglewave is 1 kHz exactly then the duty cycle of both designand implementation will be the same. This deviation is notmajor problem since the controller will compensate it. Theproblem is how to find good combination of PID’sconstants which can compensate that deviation. Goodcompensation is shown when the system can reach thegoal of the design related to rise time, settling time andmaximum overshoot.B. PID ControllerC. Sampling TimeThese results indicate that the PID constants must betuned in order to get good performance. It is alsointeresting to see how the sampling time influences thesystem. It uses the best combination of the PID controller.Time Sampling 20ms: The PID constants are 9, 8.5 and0.026 for P, I and D respectively. Figure 11 shows theresult. The orise time is 2.98s with settling time andmaximum overshoot are 6.28s and 0.9%. The result isbetter than that of figure 9. But the rise time, however, isstill not satisfying. Also the settling time is consideredslow.The initial constant for PID controller in 20ms timesampling is 2.3, 3.5 and 0.026 for P, I and D respectively.Figure 9 shows the result.Kp 9 Ki 8.5 Kd 0.026120A100DC 80ADCvaluevalue60402000246810121416Time (s)Fig. 11. One of response system with sampling time 20msTime (s)Fig. 9. Response of the systemFrom many experiments later, it is difficult to findgood combination of PID’s parameter in order to have

good performance. The hypothesis is that the samplingtime is too slow. With sampling time 20ms, the systemgets control action every 20ms. This makes the systemcannot response as fast as possible. Therefore, to choose20ms as sampling time is not good. It is necessary to usesmaller sampling time.Time Sampling 5ms: from the previous sub-section, thenew sampling time is 5ms. 5ms is chosen for the motor isloaded with its arm. The arm is little bit heavy. So 5ms isenough to get better performance.The PID constants are 15, 10 and 0.1. Figure 12 showsthe result.Kp 15 Ki 10 Kd 0.1A140D120Cvalue100806040200012345678Time (s)Fig. 12. Response of the system with sampling time 5ms; Kp 15, Ki 10and Kd 0.1The rise time is 2.43s, the settling time is 5.82s and themaximum overshoot is 2.43%. The result is bettercompare to the previous sub-section. But it is stillimportant to improve its performance.Figure 13 shows another experiment with differentcombination of the PID’s parameter. The chosenparameters are 20, 34, 0.1. The rise time of the system is1.41s with settling time 4.03s and maximum overshoot1.62%. The performance of the system is improved again.Although the PID’s parameters seem independent,they do not. This makes the tuning process more difficult.Kp 20 Ki 34 Kd 0.1insight about the PID’s parameters in the pick and placerobot.One parameter will be varied while the other twoparameters are constant. The sampling time is 2ms.Proportional Parameter: the starting point of thisexperiment is the result from figure 13. The I and Dparameters are 34 and 0.1 respectively with variation in Pparameter.Figure 14 shows the result of this variation. Theexperiment shows that the smaller the value of Pparameter, the better the rise time. It is shown that the risetime is better than Kp 20 with sampling time 5ms, it isaround 0.4s. The settling time is also improved, i.e.around 0.5s.A 140D 120C 10080v60al 40u 20e 0050010001500200025003000Time (ms)Fig. 14. Result of the P parameter variation (black: Kp 2, white: Kp 35,grey: Kp 70)Integral Parameter: the starting point of this experimentis the result from figure 13. The P and D parameters are20 and 0.1 respectively with variation in I parameter.Figure 15 shows the result of this variation. From risetime point of view, the system with big I parameter hasfast response. Small value needs longer time to reach thesetting point.140AD 120C 10080v 60al 40u 20e 0140AD 120C 100value80050010001500200025003000Time (ms)6040Fig. 15. Result of the I parameter variation (dark grey: Ki 10, white:Ki 20, light grey: Ki 50)2000123456Time (s)Fig. 13. Response of the system with sampling time 5ms; Kp 20, Ki 34and Kd 0.1D. PID’s Parameters ExplorationIt is necessary to explore the PID’s parameters on thisrobot. The purpose of this experiment is to get someDerivative Parameter: the starting point of thisexperiment is the result from figure 13. The P and Iparameters are 20 and 34 respectively with variation in Dparameter.Figure 16 shows the result of this variation. The plot ofthe response for several experiments is difficult to see.The responses are almost the same, except that the Dparameter cannot be greater than 1. With D parameter isequal to 1; the response has large steady-state error.

TABLE 1PERFORMANCE OF THE SYSTEM FOR EACH LETTER WITH TIMESAMPLING 002500Time (ms)Fig. 16. Result of the D parameter variationE. Overall ResponseAfter all explorations of the PID parameter, it isnecessary to see the overall response of the system. Forthe robot is positioned to pick and place a letter block, theexperiments is about the performance of the robot to pickthe letter block for each letter only.The initial position is between 5th and 6th slots in thebase plate (see figure 3). The slot is a place where theletter block is placed. The primary arm will move to thetarget letter and the performance is measured. Theperformance of the system is represented by rise time (090%), settling time (5%) and maximum overshoot.Time Sampling 20ms: Table 1 shows the summary ofthis experiment with time sampling 20ms. The PIDparameters are from sub-section 7.3.1, i.e. Kp 9, Ki 8.5and Kd 0.024.From table 1, it shown that the further the letter, thelonger the rise time. But this is not always the case. A andZ as the furthest letter do not have the largest rise time.The largest rise time for the left hand side is for letter‘B’. If letter ‘B’ is omitted, then the rise time is increasingfrom letter ‘M’ to ‘A’. This is the desired situation. Theanomaly of rise time for letter ‘B’ could be due to themechanic, since the mechanic is not balance.The maximum overshoot of the system for the lefthand side is also varied. Letter ‘M’ has the largest value.This is due to its position. To set the P parameter smallerwill solve this problem but the rest of the letter will havebad performance.For the settling time, there is no specific information,except that the settling time for letters between ‘J’ and ‘D’has small value.The rise time for the right hand side letters is worethan the left hand side is. Here, the rise time changesabruptly from letter to letter. The stability of the mechanicgives its contribution for this problem.The maximum overshoot is interesting. The value islarge for the letter close to the initial point. To reduce theP parameter value will solve this problem but the overallperformance will be bad.The settling time for the right hand side seems random.There is no specific se 223.243.56Max. Over .2514.004.677.014.13Settling 0.3427.426.8015.2226.86Time Sampling 5ms: Table 2 shows the summary of thisexperiment with time sampling 5ms. The PID parametersare from sub-section 7.3.2, figure 13, i.e. Kp 20, Ki 34and Kd 0.1The overall performance is better than the previousexperiment. From the experiments, it was known thatsampling time 5ms has better performance than that ofwith sampling time 20ms.Here the rise time for both sides seems random, i.e.there is no specific pattern. But the largest rise time for theleft hand side is still letter ’M’. The rise time for the righthand side has almost the same pattern as in the sub-section7.5.1.That phenomenon is also happened for the maximumovershoot and the settling time. This makes the analysisabout mechanic instability must be considered.IX. CONCLUSIONS The time sampling of the system determines theperformance of the system. Choosing suitabletime sampling makes the tuning process easier.The comparison between 20ms and 5ms showsthat time sampling 5ms is better than the other.

REFERENCESTABLE 2PERFORMANCE OF THE SYSTEM FOR EACH LETTER WITH TIMESAMPLING 5ms[1][2]LetterpositionABCDEFGHIJKLMNOPQRSTUVWXYZ .581.421.331.41Max. 30.06.488.775.78Settling 4.5111.0510.6916.16Different time sampling has different PIDparameter combination. So, to change the timesampling means to tune the combinatio

kind of PID controller has limited capabilities, but one can use it to control simple system. The more complex PID controller uses digital controller such as microcontroller, PC (personal computer) or PLC (programmable logic controller). These equipments give bet

Related Documents:

PID-controller Today most of the PID controllers are microprocessor based DAMATROL MC100: digital single-loop unit controller which is used, for example, as PID controller, ratio controller or manual control station. Often PID controllers are integrated directly into actuators (e.g valves, servos)File Size: 1MBPage Count: 79Explore furtherWhen not to use PID-controllers - Control Systems .www.eng-tips.comPID Controller-Working and Tuning Methodswww.electronicshub.org(PDF) DC MOTOR SPEED CONTROL USING PID CONTROLLERwww.researchgate.netTuning for PID Controllers - Mercer Universityfaculty.mercer.eduLecture 9 – Implementing PID Controllerscourses.cs.washington.eduRecommended to you b

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have

4.1 Simulink Block of PID Controller 58 4.2 Detailed Simulink Block of the System 60 4.3 Output of DC Motor without PID Controller 60 4.4 Detail Simulink Block of the System with PID Controller 61 4.5 Output of DC Motor without PID Controller 62 4.6 Sim

fuzzy controller are 69.9 % and 67.9 % less than PID controller. 6. CONCLUSION Theses. Paper This paper presents the control of the level in a single tank using different two type controllers PID and fuzzy. From program simulation that built it was indicates that the fuzzy controller has more Advantages to the system than the PID controller.