DEVELOPMENT OF A SPEED STABILIZER FOR RAPID SYNCHRONIZATION OF MINI-HYDRO GENERATOR A dissertation submitted to the Department of Electrical Engineering, University of Moratuwa in partial fulfillment of the requirements for the Degree of Master of Science by D.G. Subasinghe Supervised by Dr. J.P. Karunadasa i_ldHAn . ... . i or l . i j i i A > S f t l ' MORATUWA Department of Electrical Engineering University of Moratuwa, Sri Lanka January 2009 University of Moratuwa TW 92960 92960 9 2 C 6 0 DECLARATION The work submitted in this dissertation is the result of my own investigation, except where otherwise stated. It has not already been accepted for any degree, and is also not being I endorse the declaration by the candidate. Dr. J.P. Karunadasa i 1 it. • ** • • 4*J v jw. y i ABSTRACT The objective of this study is to develop a damping method to stabilize the speed of the generator rotor during synchronization so as to minimize synchronization time and also to develop a prototype circuitry for a selected Mini-Hydro plant to obtain actual results. The present system of the identified Mini-Hydro generator was modeled reasonably to identify the present response of the system for a step input. This was then simulated in Matlab and based on that a new PI controller with a power electronic switching circuit was developed to impart a resistive loading to generator in order to control the oscillation of the rotor during synchronization. Two switching strategies are discussed and they were tested at site for actual results. One of the switching strategies showed positive results where the controller's performance is mostly in line with the simulated results. ii ACKNOWLEDGEMENT First I pay my sincere gratitude to Dr. J.P. Karunadasa who encouraged and guided me to conduct this research and on perpetration of final dissertation. I make this opportunity to extend my thanks to Dr. Narenda De Silva for the valuable instructions given to me during the project. I would like to take this opportunity to extend my sincere thanks to Mr. Prabath Wickramasinghe (Head-Industrial Solutions - Hayleys Ltd), Mr. Sudharshana Gamage (Electrical Engineer - Hayleys Ltd), Mr. M.G.K. Jayathunga (Superintendent - Gomala Oya (Pvt) Ltd) and his staff, Mr. D.U. Jayasooriya (Electrical Engineer - Ceylon Electricity Board) and his staff, Mr. A. Weerarathne (Electrical Engineer - Orient Electric (Pvt) Ltd), Nalaka Samarakoon (Executive- Orient Electric (Pvt) Ltd), W.A. Wijesiri (Electrical Engineer - Colombo Dockyard Ltd), R. Ranasinghe (General Manager - Orient Mag Line (Pvt) Ltd) and his staff, P.B.S.K. Baduwasam (Electrical Engineer - Micro Cells Ltd), who gave their co-operation to conduct the research and to develop the Prototype design successfully. It is a great pleasure to remember the kind cooperation extended by the colleagues in the post graduate programme, friends, my subordinates in the office and especially my wife who helped me to continue the studies from start to end. Finally, I should also admire the patience of my beloved two kids during the project. CONTENTS Page No. Declaration i Abstract ii Acknowledgement iii Contents iv - vi List of Tables vii List of Figures vii - viii Chapter 1- Introduction 1 - 5 1.1 Background 1.2 Hydro Electric Plant Schemes 1.3 Frequency of shutdowns of a Mini-Hydro Generator 1.4 Synchronizing of a Mini-Hydro Generator with the Grid 1.4.1 Ramping Period 1.4.2 Synchronizing Period 1.4.2.1 Downtime during Synchronization Period 1.4.2.2 Loss of Energy Production during Synchronizing Period 1.4.3 Importance of Minimizing the Synchronization Period 1.4.4 Impact on the Present Design of the Plant 1.5 Motivation Chapter 2 - Problem statement 6 - 7 2.1 Identification of the Problem 2.2. Objective of the Project 2.3 Importance of the Project Chapter 3 - System Modeling 8 - 2 2 3.1 Introduction 3.1.1 Details of Identified Mini-Hydro plant 3.1.2 Initial Field Measurements 3.2. Notation 3.3. Model of the Present Mini-Hydro Generator 3.3.1 Torque Equilibrium 3.3.2 Power Equilibrium 3.3.3 Laplase Transformation of Power Equilibrium 3.3.4 Governor Model 3.3.5 Turbine Model 3.4. Model of the Present Mini-Hydro Generator during Synchronization. 3.4.1 Estimation of Model Parameters during Synchronization. iv 3.4.2 Estimation of value for C 3.4.3 Estimation of Pm 3.4.4 Matlab Program to Estimate K, a & b 3.5. Model of the Mini-Hydro Generator when 'Artificial Load' is connected during Synchronization. 3.5.1 New controller to control the switching of Artificial Load 3.5.2 Matlab Program to Estimate Kp, d Chapter 4 - Switching Circuit 2 3 - 3 3 4.1. Switching of Artificial load 4.1.1 AC Power Supply from Generator Switchgear 4.1.2 The Resistive Load Bank 4.1.3 3 Phase Full Wave Diode Rectifier 4.1.4 IGBT Gate Driver Circuit 4.1.5 Speed Sensing Circuit 4.2. Installation of Prototype Circuit Module at site 4.2.1 Termination of load Bank Power Cables Chapter 5 - Switching Strategy 3 4 - 3 8 5.1. Introduction 5.1.1 Switching Strategy 5.1.2 Strategy -{I) Synchronization begins with Artificial Load ON state 5.1.3 Strategy -(II) Synchronization begins with Artificial Load OFF state and agricultural activities 5.2 Observation of Simulation results Chapter 6 - Programming of Microprocessor 3 9 - 4 5 6.1. Continuous to Discrete conversion of PI Controller 6.2. Comparison of simulation results for Continuous PI and Discrete PI controllers. 6.3. Selection of Microcontroller unit (MCU) 6.3.1 Speed Error detection by Micro Processor 6.3.2 PI Algorithm implementation 6.3.3 Generate Duty Factor of PWM in proportional to PI control signal. 6.4. Programming of Microprocessor 6.5. Outline to preliminary Testing of Circuitry. 6.6. Installation of the sub-components of the circuit Chapter 7 - Experimental Results and Conclusion 4 6 - 4 9 7.1. Testing at Site 7.2 Experimental Results with Switching Strategy I 7.3 Experimental Results with Switching Strategy II 7.4 Conclusion References Appendix I Appendix II Appendix III Appendix IV Appendix V Appendix VI Appendix VII vi List of tables Table number Description Table 1.0 Present status of the Mini-Hydro Projects in Sri Lanka. Table 1.1 Details of number of Shutdowns of selected Mini-Hydro plant. Table 4.1 Truth Table of 4 input NAND gate with Hysteresis. Table 5.1 Simulation of switching strategy I & II. List of figures Figure number Description Figure 1.0 Graph of a typical Generator speed Vs Time during Synchronization. Figure 3.0 'Gomala Oya' Mini-Hydro Plant at Ehelliyagoda. Figure 3.1 Graph of Frequency Vs time during Synchronization. Figure 3.2 A Picture of Governor, Francis Turbine and Generator. Figure 3.3 A picture of Hydraulic Governor (shown in color Blue). Figure 3.4 A picture of Francis Turbine with 12 Wicket Gates. Figure 3.5 Model of the present Mini-Hydro Generator. Figure 3.6 Model of the present Mini-Hydro Generator during synchronization. Figure 3.7 A picture of the Automatic Synchronizer of the plant. Figure 3.8 Rotor Speed Vs Time when rotor spinning freely. Figure 3.9 Unit-Step response of present Mini-Hydro Generator. Figure 3.10 Model of Mini-Hydro Generator with 'Artificial Load' during synchronization. Figure 3.11 Unit-Step response of the Mini-Hydro Generator when Artificial load is connected. Figure 4.1 Line Diagram of the Switching Circuit. Figure 4.2 Circuit of the DC Load Bank. vii Figure 4.3 A picture of the load bank, connected through a 30A/ 4P MCB Figure 4.4 3 Phase Full Wave Diode Rectifier Circuit. Figure 4.5 DC waveform with Voltage Ripple after rectification Figure 4.6 A picture of 3 Phase Rectifier Figure 4.7 Summery of semi conductor device capabilities. Source: Ned Mohan [6]. Figure 4.8 An IGBT: (a) Symbol, (b) i-v characteristics (c) idealized characteristics. Source: Ned Mohan [6]. Figure 4.9 PWM Output and Gate Signal to IGBT. Figure 4.10 IGBT Gate Driver Circuit. Figure 4.11 A picture of the IGBT mounted on a Heat Sink. Figure 4.12 A picture of PIC 16F877A Microprocessor based driver circuit. Figure 4.13 Diagram of Speed Sensing Circuit. Figure 4.14 Pin details of SN7413 Schmitt Trigger. Figure 4.15 A picture of Speed Sensing circuit Figure 4.16 Square wave signal output from Schmitt Trigger, converted from Sinusoidal voltage sources. Figure 4.17 A picture after connecting Load Bank cables at Generator terminals Figure 5.1 Model of the system with Switching Strategy I. Figure 5.2 Results of simulation with Switching strategy I. Figure 5.3 Model of the system with Switching Strategy II. Figure 5.4 Results of simulation with Switching strategy II. Figure 6.1 Model of the. system with discrete PI controller. Figure 6.2a Results of simulation with Switching strategy I, with discrete PI controller. Figure 6.2b Results of simulation with Switching strategy II, with discrete PI controller. Figure 6.3 Pin details of PIC16F877A microprocessor used for the PI controller. Figure 6.4 A picture during testing, the complete controller circuit mounted inside an IP23 grade panel. Figure 7.1 Frequency Vs Time during synchronization under normal operation. Figure 7.2 Frequency Vs Time during synchronization with switching strategy I. Figure 7.3 Frequency Vs Time during synchronization with switching strategy II. viii Chapter 1 Introduction 1.1 Background In Sri Lanka there are about sixty five numbers of Mini-Hydro power generators running at present. The plant capacities referred to Mini-Hydro range varies from 0.5 MW to 10 MW depending on the rainfall in the catchments area and average flow in the stream. In the present context of high inflation of Thermal energy prices and with the influence of minimizing emission of green house gases, (GHGs) Mini-Hydro power generation plays a vital role as an alternative means of renewable energy. The Table 1.0 gives the details of the present and future plants expected to be connected with the grid. Table 1.0 - Present status of the Mini-Hydro Projects in Sri Lanka. Status of the Mini-Hydro Projects Mini Hydro Plants No of Projects Capacity (MW) Presently in Operation 62 124.104 SPPA Signed Projects 32 77.860 Projects, SPPA to be Signed 20 34.605 LOI issued projects 53 87.905 Total anticipated By 2011 167 324.474 1.2 Hydro Electric Plant Schemes There are three main types of hydroelectric plant arrangements, classified according to the method of controlling the hydraulic flow at the site. 1. Run-of-the-river plants, having small amounts of water storage and thus little control of the flow through the plant. Typically, most of the Mini-Hydro generator installations are of this system where they do not include a dam. 2. Storage Plants, having ability to store water and thus control the flow through the plant on a daily or seasonal basis. Larger hydro plants above 1OMW capacity range are typically of this type. 3. Pumped storage plants, in which the direction of rotation of the turbine 1 is reversed during off peak hours, pumping water from a lower reservoir to an upper reservoir, thus 'storing energy' for later production of electricity during peak hours. However, this scheme of hydro plant installations are not yet set up in Sri Lanka. 1.3 Frequency of shutdowns of a Mini-Hydro Generator The power is generated at low voltage level of 400/415 Volts and is stepped up by a step-up transformer to connect with the grid at distribution level voltage of 33 kV. The length of the electricity transmission line from the plant's transformer and all the way up to the load Bus at distribution network may be a few tens of kilometers and in most of the cases it is passing through the forest via overhead lines. There are several causes that may affect a Mini-Hydro generator to shut down whilst in operation. They can be outlined as, the earth faults in the electricity lines (mainly tree leaves touching the transmission lines), lightning, planned and unplanned interruptions in that particular area connecting to the load bus of the distribution network and for maintenance of the plant itself. The Table 1.1 provides details of number of shut downs over year 2008 of a selected plant 'Gomala Oya' at Parakaduwa, Eheliyagoda. (1 MW plant capacity) Table 1.1- Details of number of shutdowns of the selected Mini-Hydro plant. Calendar Year Number of Shutdowns 2008 (Jan to Dec) 48 1.4 Synchronizing of a Mini-Hydro Generator with the Grid To resume power export to the grid after a shutdown will require generator to synchronize with the grid supply. This can be done either by fully automatically with the use of a PLC control system or by manually. In either process, the Hydro Turbine should be ramped up to the near synchronous speed at a rate decided by the Governor, Turbine and Penstock characteristics. Then the terminal voltage and Phase angle have to be adjusted to match with those of grid parameters before closing the Generator breaker. The time taken for rotor speed ramping will typically be in the range of 3-4 minutes and then generator synchronizing would take another 2-5 minutes depending on the plant design. Figure 1.0 shows a graph of a speed Vs time during a typical synchronization process. Figure 1.0 - Graph of a typical Generator speed Vs Time during Synchronization. 1.4.1 Ramping Period During the ramping period the Inlet valve (wicket gates for Francis and Kaplan turbines, runner blades for Kaplan turbines, and Nozzle jets for Pelton Turbines) starts to open in steps so that hydro turbine starts receiving Hydro energy to gradually accelerate the speed from the stationary position. The rate of acceleration of the speed has limitations and is characterized by the Penstock characteristics. The ramping period considered here is the time taken by the generator to ramp up from stationary state up to 95% of the rated speed (or 95% of the rated frequency, which is 47.5Hz) 1.4.2 Synchronizing Period During this process, the Synchronizer takes the control of the governor and gives biasing signals to raise or lower the speed of the rotor to synchronize with the bus frequency and to match the phase angle (if it is in Auto mode). Synchronization begins just at the end of Ramping (approximately 47.5Hz) and the synchronizing time is the time between the end point of ramping and the point of closing the generator breaker after synchronization, (at 50 Hz after matching with grid frequency and phase angle). Once the breaker is closed, the synchronizer is switched off and PLC controller will take control over the speed and generator loading. The PLC controller has the function of ALC (Automatic Loading Control) which will set the load reference point depending on the water level in the fore bay tank. 3 1.4.2.1 Downtime during Synchronization Period Synchronization period of a Mini-Hydro generator is highly volatile. This time can be positively influenced by the stability of the grid Voltage and frequency at the time of attempting synchronization and by the governor and turbine characteristics. The spinning of heavily massed rotor is controlled by the governor by controlling the water flow in to the turbine under 'no load' condition. Thus, during this period even a small step increase of the inlet valve position results in a large oscillation of the rotor speed. Therefore, synchronizing of a Mini-Hydro generator in general is a time consuming exercise which is accounted as a downtime. 1.4.2.2 Loss of Energy Production during Synchronizing Period Most of the Mini-Hydro installations are run-of-the-river type (not storage type) and therefore the amount of power generated at a given time depends on flow level of the stream and availability of the water in the fore bay tank. Therefore the loss of energy production during a downtime cannot be fully recovered later by increasing the generator load factor. This is a disadvantage of run-of-the-river type plants where there is only a small amount of energy storage capability in the set up. As indicated in Table 1.1, since the number of shutdowns are substantial, the total accumulated downtime during synchronization over a year would cause a considerable production loss. 1.4.3 Importance of Minimizing the Synchronization Period Even though the Ramping Period is constrained by the design of the plant itself, minimization of synchronization Period is an alternative to minimize the total downtime. Further as per the Figure 1.0 the synchronization period is generally longer than ramping period. Therefore, there is a potential to minimize the total downtime by approximately 25-50% by optimizing the synchronization time. 1.4.4 Impact on the Present Design of the Plant In order to make the project viable and to obtain the management's approval for practical implementation, it is a requirement that the new circuit development should not have any interference on the present system. Therefore, the function of the new controller has to be totally independent while improving the performance of the 4 present system. Further, once it is disconnected (switched off) the system should turn back to its original set up. 1.5 Motivation Minimizing the synchronization time of a Mini-Hydro generator, will enhance the operating characteristics of fast response for start-up and also will produce additional units of energy due to reduced downtime. The anticipated outcome in terms of additional revenue would be considerable for a plant operator. As an Engineer with a background of installation and commissioning of standby diesel power generators, application and commissioning of generator synchronizing and load management systems in the industry, the author selected this topic to investigate the possibility to enhance the synchronization process of Mini- Hydro Generators. 5 Chapter 2 Problem statement 2.1. Identification of the Problem The expectation of this project is to reduce the down time of the synchronization process since it finally affects the total revenue that can be generated from the plant. This needs to be analyzed by exploring the possibilities for stabilizing the rotor speed during synchronization. This will require development of a new control system, which should facilitate the synchronizing function of the existing synchronizer while it is not interfering with the installed control set up. The design of the new controller involves modeling of the Mini-Hydro plant, use of Matlab and control theory for designing of LTI control systems in S plane and also Digital Control principles for practical implementation of control algorithm in a microcontroller unit (MCU). The following areas need to be focused. 1. How to model the system during Synchronization? 2. What hardware components to be sourced and what to be produced to make the prototype design? 3. Programming the microprocessor according to the control algorithms. 4. How to obtain experimental results? 2.2. Objective of the Project . The expectation of this project is to explore alternative methods that can be applied for damping the rotor so that it could stabilize at a reference input (bus frequency) and for more to develop a prototype circuitry for a selected Mini-Hydro plant for real life testing of the concept. Damping the system should be done by electrical means in a controlled manner so that the rotor speed can be stabilized within a desired time. The design of the new controller involves identifying the model of the present system and model development of the proposed new controller. The model has to be analyzed in Matlab simulation which will require transfer function of the system in S plane and also Digital Control principles for practical implementation of the control algorithm in Z plane. During the investigation more attention is paid on the 6 followings, A) Modeling of the identified Mini-Hydro plant (present system) 1. Derive differential equations for power equilibrium. Moreover, derive close loop transfer function of the present system. 2. Find out the viscous frictional damping of the generator assembly. 3. Estimation of PID values of the present synchronizer using Matlab B) Identify the viable options for applying resistive loading to the system for damping 1. Inertia calculations to identify range of power requirement for damping the system during a desired time frame. 2. Selection of Power Electronic Devices for optimum performance of the circuit. 3. Programming the Microprocessor for control algorithm. C) Identify a suitable model plant and to obtain plant owner's permission for testing the circuitry at site to get experimental results. 2.3 Importance of the Project As outlined in the previous chapter, there are several causes that may affect a Mini-Hydro generator to shut down whilst in operation. They may be due to temporary line faults and power interruptions at the receiving end as well as for planned shutdowns. The plant should be able to resume power generation within a shortest time period possible when it is required to set the unit back in operation. Therefore, development of a Speed stabilizer is important to minimize the synchronization period. This research will help to explore the feasible solutions for damping the rotor during synchronization and thereby to achieve rapid synchronization. The prototype development of the proposed controller and testing it with an identified model plant can obtain real life experimental results. The results can then be ascertained for commercial viability for the benefit of relevant industry. 7 Chapter 3 System Modeling 3.1. Introduction For the success of new circuit development, it is required to select a suitable site to obtain more information to understand the operation of the Hydro Power plant system and also to obtain experimental results from the prototype design. Hence, it was decided to locate a model site with easy access from Colombo. The Figure 3.0 shows the selected plant for the project at Ehelliyagoda. Figure 3.0 - 'Gomala Oya' Mini-Hydro Plant at Ehelliyagoda. 3.1.1 Details of Identified Mini-Hydro plant Name: Gomala Oya (Pvt) Ltd. Location: Parakaduwawa, Ehelliyagoda, 75Km from Colombo Capacity: 1MW, 415V, 50Hz, 750RPM, 8 Pole, Synchronous Generator Hydro Turbine: Francis Turbine, with 12 Numbers Wicket Gates Head: 100m Commissioned: May 2005 The information collected from the site are as given below, • Datasheet of present synchronizer • Datasheet of Governor 8 • Datasheet of Turbine • Datasheet of the Alternator • Historical records on the plant shutdowns 3.1.2 Initial Field Measurements At the beginning of the project, in order to gather sufficient information regarding the 'settling' time of the generator rotor speed variation Vs time, a Power Analyzer reading was recorded during synchronization. The Figure 3.1 shows a graph of Frequency Vs time during synchronization. 13 28 13:27 13 28 133« 13:30 13:31 13:32 13:33 13:M 1336 Figure 3.1 - Graph of Frequency Vs time during Synchronization. Notation J Moment of Inertia of the Rotor Assembly in units kgm2 C Viscous Damping Coefficient kgm2/sec CDs Grid frequency converted to speed rad/sec CO Speed of the Rotor rad/sec 0)0 Near synchronous speed at which system modeled rad/sec R Governor speed Droop % T g Governor Time Constant sec Th Hydro Turbine Time Constant sec Kg Governor Gain - 9 E l Load Error signal to Governor - Pv Change of Inlet Valve position - K t Absolute Power Gain from Turbine - P Number of Poles of the Alternator - Ns Synchronous speed of the Alternator RPM f Cycle frequency of the Alternator Hz Xs Synchronous reactance of the Alternator H R Stator winding resistance Q K,a,b PID parameters of the present synchronizer - Tm Torque excerted on Rotor by Turbine Nm T l Torque excerted on Rotor due to Load (grid) Nm Pm Mechanical Power by Turbine W Pl Power supplied to the Load (grid) W Te Torque excerted on Rotor by Artificial Load Nm 0 Measured speed of Rotor rad/sec KP,d PI parameters of the new controller - Ke Absolute Power Gain from Artificial Load - Pe Electrical Power consumed by Artificial Load W S Linear Time Invariant System in 'S' Plane - Z Discrete System in 'Z' Plane - 3.3. Model of the Present Mini:Hydro Generator In order to develop the model of the present Mini-Hydro Generator plant, sub systems were identified and transfer functions of them were derived. Then the sub sytems were interconnected to develop the whole model. The major sub components involved in the model are synchronous Generator, Turbine, Governor and synchronizer. The equation governing the rotor motion of the synchronous machine is based on the elementary principle in dynamics which states that accelerating torque is the product of the moment of inertia of the rotor times its angular acceleration. Since the viscous frictional damping is present in the rotor and turbine assembly, the torque balance of the synchronous machine can be written as depicted in 3.3.1. 10 3.3.1 Torque Equilibrium When the generator is running at steady state, the torque balance of the system is written as, JO + CO = T -T, m L 3.3.2 Power Equilibrium When the rotor is spinning at near synchronous speed of the machine a>0, the power equilibrium of the system is as follows, j(o0e+C(o0e = pm-pL 9 = 0) Ja>0a> + Ca>0a> -Pm- P, 3.3.3 Laplase Transformation of Power Equilibrium J(o0sco{s) + C(O0(D(s) = Pm (s) - PL (s) Figure 3.2 - A Picture of Governor, Francis Turbine and Generator. 3.3.4 Governor Model The Governor system is the key element of the plant that controls speed and power. It consists of control and actuating equipment to regulate the flow of water through the turbine, for starting and stopping the unit, and for regulating the speed and 0(Js + CMs) a>0 (Js + C ) 9 2 S 6 Q 19 Figure 3.10 - Model of Mini-Hydro Generator with 'Artificial Load' during synchronization. 3.5.1 New controller to control the switching of Artificial Load The function of the new controller is to switch a resistive load in proportional to actuating error e(s) (Proportional control) to incorporate damping to the system and thereby reduce the settling time. Moreover, it is required to settle the system exactly at reference input level of grid frequency, (Integrative Control) in order to support present synchronizer for rapid synchronizing. In this context, high sensitive speed error correction control action responding to rate of change of error (Derivative control) is not anticipated due to two main reasons, 1. Mini-Hydro generator synchronization is generally a slow process by the design itself because of the limitations pertaining to Prime mover system. 2. Derivative term could amplify disturbances input or noise as the PID is not well tuned. This can prompt oscillations or the system can become unstable. Further PID controller will permit fast changes of larger values of Artificial load, Pe (5) to Generator which may disturb the Voltage matching process of AVR. In the light of above considerations, a PI controller is more appropriate than a PID controller for switching the Artificial load, Pe{s) for this application. 20 3.5.2 Matlab Program to Estimate Kp, d Since a reasonable model of the present system is derived in 3.4.4, the modified system with Artificial load connected can be modeled. In order to estimate the PI values of the proposed new controller, the desired Settling time of the new system and Maximum overshoot are taken as design parameters. In order to find the PI values of the new controller a Matlab simulation techniques are more desirable over the experimental methods. The experimental results have to be taken within a minimum downtime of the plant. Therefore, for this particular project it is not practically viable to carry out fine tuning of PI parameters at site. The program used in Matlab to estimate PI parameters are detailed in Appendix 2. Results obtained from Matlab Program Rise time = 5 settlingjime = 42 max overshoot = 0.0994 Transfer function: 4860 sA4 + 1.969e004 sA3 + 6851 sA2 + 321.1 s oKs) _ 1.714e004 sA5 + 6.776e004 sA4 + 3.894e004 sA3 + 6912 sA2 + 321.1 s Kp = 0.9000, d = 0.0560, Transfer function of PI Controller: 0.9 5 + 0.0504 s 21 0) •O =5 "5. " 0 10 20 30 40 50 60 70 80 90 t Sec Figure 3.11 - Unit-Step response of the Mini-Hydro Generator when Artificial load is connected. 2 2 Unit-Step response when Pe(s) is connected 1 1 1 1 1 1 1 i i i • i i • i i i i i i i i • i i i i i 1 1 1 1 I / - / 1 • i i • i i • i i i i i r i f i / i i i / i j i j i • i i • i i K p = o . 9 : i i • i i • r i i • i • • i i i • i i d = 0.066 ! ! 1 1 1 1 1 1 1 1 1 i • i i i i • j i 1 1 1 Max ovfershoot=! 0.099444 i i i i i i • I i • i i i i i i i i Settling time= • 42 j i i i i i i • i • • i i i i i i i Rise tirpe= ; 5 ; i i i Chapter 4 Switching Circuit 4.1. Switching of Artificial load The new PI controller as shown in Figure 3.10 generates a control signal according to the error e(s) during synchronization process. The PI controller has been tuned in such a way that the system 'Settling Time' is reduced approximately to 42 seconds following a step input. The PI controller programmed in 'PIC' 16F877A Microprocessor generates a PWM signal and the Duty Factor is varied corresponding to PI Controller's output control signal. The switching frequency of the PWM signal is fixed at 5 kHz in the processor. The magnitude of PWM pulses from the processor will be at 0-4.8 Volts which will be then given to the Gate of IGBT via a 'Gate Driver' circuit. Therefore, IGBT switches the load in a controlled manner according to the duty factor. The Figure 4.1 shows the line diagram of the switching circuit. 415 V GEN BREAKER 1000 KMT 1600 A 3 Pol* 4 1 5 / 33 kV MIS P.E. DC LOAD SWITCH BANK 6 MM 500 VDC Figure 4.1 - Line Diagram of the Switching Circuit. 4.1.1 AC Power Supply from Generator Switchgear The generator circuit breaker is used to connect and disconnect to and from the power system. As shown in the Figure 4.1, a 1600A, 3 Pole ACB type generator circuit breaker is located at the low voltage side of the step-up transformer (after Generator output terminals). The circuit breaker is closed as part of the generator 23 synchronizing sequence and is opened or tripped either by operator control or by operation of any protective relay device in the event of unit fault condition. For the new switching circuit, AC power supply connection is taken from the alternator terminals before the generator breaker and is then rectified through a three phase, six pulse rectifier circuit to convert AC to DC. The 3 phase supply at the alternator terminals are at 415 Volts and after full bridge rectification the DC Bus voltage will be around 560 Volts. The DC supply is then switched through the 1GBT and power is consumed at the load bank as a resistive load. 4.1.2 The Resistive Load Bank The capacity of the load bank is 5,812W which is built to operate at 560V DC supply. This comprises of four numbers resistive heater elements with a capacity of 1.5kW and 13.5Q each. Since the heat dissipation from the elements is substantial the heater elements are cooled by a 3 phase induction motor driven blower fan of 0.37kW, 415 V. The resistor configuration of the load bank is wired in series. Figure 4.2 shows the circuit of the Load Bank. R=13.5fiX4 Figure 4.2 - Circuit of the DC Load Bank. Figure 4.3 - A picture of the load bank, connected through a 30A/ 4P MCB 24 4.1.3 3 Phase Full Wave Diode Rectifier Terminal AC Voltage to the rectifier DC Bus Voltage Maximum DC load current when the Duty Factor is 1.0 = = 415 V = 560.25 V DC 6000 560.25 10.375 A / \ y A A A ZX A A Figure 4.4 - 3 Phase Full Wave Diode Rectifier Circuit. 1 2 3 Resultant DC waveform Figure 4.5 - DC waveform with Voltage Ripple after rectification (phase waveforms 1,2 and 3 are indicated in black, red and Blue colors respectively) 25 Figure 4.6 - A picture of 3 Phase Rectifier 4.1.4 IGBT Gate Driver Circuit The maximum calculated Voltage and Current across the semi conductor switch in order to switch 6kW resistive load will be 560.25 V DC and 10.7 A respectively. The preset frequency of the switching (PWM signal) would be at 5 kHz which is within the limits of gate Driver switching transistor. Figure 4.7 shows a summery of device capabilities [6]. Frequency Figure 4.7 - Summery of semi conductor device capabilities. Source: Ned Mohan [6] Therefore, based on the power capabilities, switching speed and considering the easiness of gate triggering by means of a voltage signal, an IGBT is selected as the 26 switching device. Accordingly the selected IGBT model 'Toshiba-GT50J101' (Appendix 3) has the ratings of Collector-Emitter voltage of 600V and maximum Collector current of 50A. Go—i 6B vos (a) On ^Otf (b) 4.9V => 1 1 1 1 0 4.9V OV 0.0V=>0 1 1 1 1 4.9V OV Dual banks of the Schmitt Trigger are used to process the signals from Grid supply as well as Generator supply. The two such square wave signals derived from both sources are then connected at input pins RB6 and RB7 of Port B (pins 39 and 40) of the Microprocessor. The program in the microprocessor will check for the Phase Width of each square wave and then it is converted frequency. Then after comparing grid frequency against generator frequency, the difference will generate the error, 31 denoted as e(s) in the model. Figure 4.15 - A picture of Speed Sensing circuit T e k J i - M P q s : 0.000s Figure 4.16 - Square wave signal output from Schmitt Trigger, converted from Sinusoidal voltage sources. 4.2. Installation of Prototype Circuit Module at site At the beginning of the project, a desk survey was carried out to find out a suitable Mini-Hydro plant to experiment the prototype circuit module. Certain factors were considered during the survey such as plant capacity, easy accessibility, whether 32 the plant is under warranty period and whether the plant's synchronization delay is significant factor. Having considered the above facts it was possible to decide on a 1MW plant 'Gomala-Oya' for practical implementation of the circuit module. After finalizing the project proposal, proposed circuit and its operation was discussed with the plant developer and permission was obtained to install and experiment this circuit module. 4.2.1 Termination of load Bank Power Cables According to the site layout, the most appropriate location for tapping generator terminals for connecting power cables of Resistive Load bank is at the incoming side of the generator breaker at main Switchgear Panel. During a plant shutdown for maintenance, the termination of Load bank power cables were carried out. The end point of the power take off cable was terminated with a 30A, 3P MCB. Figure 4.17 - A picture after connecting Load Bank cables at Generator terminals 33 Chapter 5 Switching Strategy 5.1. Introduction In the present Mini-Hydro plant as the machine is started after a shutdown, the speed ramping is controlled by the PLC controller of the plant. As the speed of the rotor reaches 95% of the rated RPM, (712.5 RPM) the synchronizer takes over the synchronization process. In most of the times synchronizer can not synchronize the generator and close the breaker as the rotor speed reaches its rated speed. As depicted in Chapter 1, this synchronization process may take a few minutes depending on the plant design and control system. In order to stabilize the rotor speed, a damping effect is introduced to the generator by switching a resistive load. The amount artificial load applied to the Generator during synchronization process is controlled by the new PI controller. The artificial load can be varied by the new PI controller in the range of 0-6kW by changing the duty factor. However, in the implementation of new controller, different switching strategies can be adopted in order to introduce the damping effect to the system. 5.1.1 Switching Strategy Two alternative switching strategies can be implemented in order to achieve objective of damping the system. F6r the both alternative approaches PI controller parameters are the same and in broad terms the difference will be the initial value of the duty factor as the synchronization begins and variation of the duty factor during the synchronization period. They can be distinguished as follows, I) Synchronization begins with Artificial Load ON state (0%< duty factor <50%) II) Synchronization begins with Artificial Load OFF state (duty factor = 0%) and Load is switched (duty factor >0%) only when a>> cos 34 5.1.2 Strategy -(I) Synchronization begins with Artificial Load ON state (0% < duty factor <50%) In this approach the Artificial Load is connected just prior to synchronization begins and as the synchronization starts, the duty factor already maintains a value between 30% to 50%. Accordingly, about 30-50% of the load (<3 kW) is already connected to the generator as the synchronization process is started. The load will stay connected with the system till the synchronization is completed and generator breaker is closed. The Figure 5.1 shows the model of this switching option. Scope Figure 5.1 - Model of the system with Switching Strategy I. The Duty Factor generated by microprocessor is exactly proportional to the PI control signal out put. In the above switching option simulation the PI control output signal variation is in the scale of -1 to +1 and Artificial load Pe(s) variation is from 4000 to 0. However, the actual implementation in the circuit requires Duty Factor to be in the range of 0 to 1 and proportional Pe(s) variation should be 0-6000 Watts. Physical interpretation of minus Pe(s) refers to releasing of Artificial Load which had been loaded prior to synchronization begins. Accordingly, the program in PIC 16F877A is set such that Duty Factor is already reached to about 30-50% corresponding to 4000W (66.6% of Pe(s)) as the synchronization begins. The Figure 5.2 shows the results of the simulation. 35 > Scope V f c f X mm P&P a b b 0 Figure 5.2 - Results of simulation with Switching strategy I. 5.1.3 Strategy -(II) Synchronization begins with Artificial Load OFF state (duty factor = 0%) and Load is switched (duty factor >0%) only when CO>(Os In this approach the Artificial Load is in its OFF state as the synchronization begins and therefore Duty Factor value is zero and accordingly Pe(s) is also zero. As the rotor speed gradually increases to synchronize with the bus frequency and when it starts to go above the bus frequency, the PI controller provides the control signal output. Then corresponding Duty factor is generated by the processor and IGBT gate is switched according to the duty factor variation and finally Pe(s) will be varied. Figure 5.3 shows the model of this switching option. 36 _ _ WS(S) mHH Step w(s) 1600s 2+453-3S+1 8.66 0.9$3»3.3S2<-S TF of present synchronizer, Governors Turbine Pn Stap 1600s2+453.3s+16.66 > fc 0.9S3+3.3S 2+S Governor & Turbine Pm(s) Pe(s)' L f h f u ^ z ^ - A b s W ^ Manual 0.9z-0.898 * z-1 TF of Turbine & Rotor mass Gain2 Switch 0 , D i s " s l ® PI controller W(s) Figure 6.1 - Model of the system with discrete PI controller. Figure 6.2a - Results of simulation with Switching strategy I, with discrete PI controller. 40 W Scope B E * 1 S i A l l H 0 Figure 6.2b - Results of simulation with Switching strategy II, with discrete PI controller. 6.2. Comparison of simulation results for Continuous PI and Discrete PI controllers. The response curves of the discrete PI controller obtained in Figure 6.2a and 6.2b exhibits small stair case shape in their response curves. However when compared with those of continuous PI controller responses in Figure 5.2 and 5.4. The both set of results are identical. Therefore, in the implementation of PI control algorithms in micro controller, the system is assumed to be continuous because the synchronization is a slow control system, and the sampling time 40msec is very small compared to settling time in the range of 40-150 seconds. 6.3. Selection of Microcontroller unit (MCU) Currently, several manufacturers make 16-bit and 32-bit microcontrollers (MCUs) with features that enable easy control of almost any process of medium complexity. Eight-bit microcontrollers still dominate the market, however, because of 41 their small size, low cost, and simple programming. Because of these advantages, 8- bit MCUs are found in process control, automotive, industrial, and appliance applications, among many others. Some of the newer MCUs provide clock speeds from 4 to 40MHz and 64KB of internal flash memory and 1KB of RAM in some models on-chip analog-to-digital converters (ADCs), digital-to-analog converters (DACs), or pulse-width modulator (PWM) outputs, a watchdog timer, 16-bits timers; and serial or USB ports. In this section, the required CPU time to implement the proposed control strategies is estimated. There are mainly three parts in the time consumption for the CPU to achieve the switching strategy with PI controller, (I) Speed Error sensing, (II) PI Algorithm implementation, (III) PWM output signal with Duty Factor variation proportional to PI control signal. 40-Pin PDIP MCLR'Vpp RAQ/ANO RA1/AN1 RA2.AN2'VREF-.CVref RA3.'AN1VREF+ RA4/TOCKI/CIOUT RA&'AN4.'55.C20UT RE'VRD'ANS REI.'VvR'ANt. RE2/C&AN? Voo Vss OSCl'CLKI OSC2/CLKO RCO/TIOSO/T1CKI RC1/T10SI/CCP2 RC2/CCP1 RC3/SCK/SCL RDOfPSPO RD1/PSP1 RB7PGD RB6/PGC RB5 RB4 RB3/PGM RB2 RB1 RB'J/INT V'DD V'SS RD7.PSP7 RD6/PSP6 RD5/PSP5 RD4/PSP4 RC7/RX'DT RCb.TK'CK RC5/SDO RC4/SDI/SDA RD3/PSP3 RD2/PSP2 Fig 6.3 - Pin details of PIC16F877A microprocessor used for the PI controller. 6.3.1 Speed Error detection by Micro Processor As shown in Figure 4.16, two square wave signals from grid and generator are fed in to Microprocessor input pins at R6 and R7 of Port B respectively. Methodology used in the Microprocessor program can be out lined as below. 42 Speed of the Crystal used in the PIC16F877A = 4MHz Time Period per instruction = 1 psec As the controller is switched ON the CPU first starts checking the bit status of pin R7 of Port B (grid source) continuously in a loop. If bit status is 0 (low), which means voltage level is 0 V, process will continue till bit status 1 (high) is commenced (positive edge detection). Then CPU starts counting the number of cycles till the bit status changes from 1 to 0 and again to 1 (next positive edge). This corresponds to a half cycle of grid frequency (10ms). For counting the instruction cycles TIMER 1 peripheral is used. And it has the capability of measuring the pulse widths up to 64ms. However, for our system we are interested around 10msec. If any pulse is longer than 65msec are neglected and the default output (0% PWM) is switched. Then the process will shift to the generator source and will measure the phase width of the generator square wave. The plus or minus difference will generate the error. For the control purpose this error signal has to be converted to the frequency. In order to make the implementation less complicated a liner relationship is used and this relationship is accurate enough in the range that is interested in (50Hz to 54Hz). The error (in Hz) = error (in Sec) / 0.2, This algorithm deviates less than 4% in the range 50Hz to 54Hz. 6.3.2 PI Algorithm implementation The continuous PI algorithm implemented in the program is as follows, 0.9s+ 0.0504 This algorithm is effective only when the, GENERATOR frequency > GRID frequency. In all other instances the PWM output will be set to default value which is 0% Duty. This increases settling time as previously discussed. s Then, The Proportional error term The integral error term = Error (/Hz) * 0.9 = sum (Error (/Hz)) * 0.504 / sampling time sum (Error (/Hz)) is the cumulative error term 43 The resolution of the error frequency = 0.01 Hz To avoid steady state oscillation because of the integral term, an integral term limit function is implemented. Then the integral term will not increase after the integral error term value is reached to 10%, which will increase the steady state stability. 6.3.3 Generate Duty Factor of PWM in proportional to PI control signal. The result of the PI controller was scaled to give the maximum output which is 100% duty factor at 4Hz error. The PWM frequency is selected to be in 5 KHz which is a fixed value. To generate this PWM signal the Capture Compare (CCP) module was used and the PWM output is connected to second pin at PORT C (RC2,CCP1, Pin# 17). In order ensure the smooth operation on a real-time system, resolution of the PWM is maintained at 0.4% 6.4. Programming of Microprocessor Programming of the MCU is developed with assembly codes and key functions of the program such as generating error signal, PI algorithm, and PWM output are implemented. The compiler used for this project is Microchip MPLAB IDE V6.61. The program is listed in Appendix 7, which is for switching strategy II after debugging it in the demonstration board and testing at workshop. 6.5. Outline to preliminary Testing of Circuitry. The switching circuitry with PI controller was developed with the provision for experimenting both switching strategies as described in the previous chapters. Since, the testing of the circuitry and experimental results should be obtained within a minimum downtime of the plant at site, it was required to do a model testing of the circuitry in advance at workshop. Thus, to verify the PWM out put by PI controller according to speed error, a 24V DC motor was connected at the driver side (collector- Emitter) of IGBT. Using two signal generators, reference and feedback signals were simulated and thereby error signal was created. The resulting motor speed variation was observed and minor changes were done in the program. 44 Fig 6.4 - A picture during testing, the complete controller circuit mounted inside an IP23 grade panel. 6.6. Installation of the sub-components of the circuit The entire power and control circuitry complete with 3 phase diode bridge, Speed sensing circuit, PI controller with PWM unit and auxiliary DC power supply units (5V and 15V) were mounted in a IP23 class panel enclosure. The AC power input to the panel is connected to the 3 phase diode bridge through 30A, 3P MCB. The IGBT unit is mounted on a heat sink and it is installed near the cooling fan of the load bank to ensure proper heat dissipation from IGBT during switching. 45 Chapter 7 Experimental Results and Conclusion 7.1. Testing at Site The new controller was temporally set up at site and a power analyzer model Fluke 1735 was used to take the frequency Vs time readings during synchronization. For the speed sensing circuit, Voltage taping was taken from phase 2 of both sources (T2 terminal). The testing was done for two switching methods. After setting up the new controller and power analyzer, while the new control module was in switched off state, the generator was given the starting signal and was allowed to synchronize as of normal operation. The frequency Vs time readings were recorded. The Figure 7.1 shows the synchronization under normal condition. This is then taken as the reference to compare the differences or improvements happens when the system is subjected to artificial loading under switching strategy I & II. The synchronizing time 142 seconds indicated in Figure 7.1 is the time taken for synchronization. 7.2 Experimental Results with Switching Strategy I After recording the measurements under normal synchronization, the generator was shutdown and the plant was restarted to take the results with the new controller enabled during synchronization. As per the simulation results given in the table 5.1, the MCU was programmed for switching strategy I (Take both +/- error) for the 1st testing. In this approach the Artificial Load was connected (with initial duty factor set to 40%) just prior to synchronization begins and as the synchronization starts, PI controller controlled the loading. The Figure 7.2 shows the synchronization under the strategy I. Figure 7.2 - Frequency Vs Time during synchronization with switching strategy I. As per the resulting Frequency Vs Time curve in Figure 7.2, the frequency finally settles down at a much higher frequency (approximately 53.5 Hz equivalent to 802.5 47 RPM) where the synchronizing was not possible at that time and plant was shut down. 7.3 Experimental Results with Switching Strategy II Under this method, the PI controller will respond only when error function (in Hz) is positive and when the error =0, duty factor=0, In that case, MCU signals a PWM output to the IGBT only when Generator frequency tries to exceed grid frequency. Thus the system operates as usual till to generator frequency tries to exceed 50Hz. The Figure 7.3 shows the frequency Vs time during synchronization when switching strategy II enabled. In this testing synchronizing time was measured to be 48 seconds. 7.4 Conclusion The model of the present generator during synchronization was developed reasonably by taking known datasheet figures for generator, turbine and governor and taking estimated PID values for the synchronizer which were derived using a Matlab 48 computational method. Thereafter, the PI values of the proposed new controller were estimated based on the above model. However, the real life response to switching strategy- I (Figure 7.2) has been deviated substantially compared to that of Matlab simulated results (Figure 5.2). In this approach the new controller is fully interacting with the control loop of present synchronizer, governor, turbine and generator loop as the synchronization begins. This will lead to involve both Pm and Pe at more or less equal power levels during ramping. Therefore, if the actual value of Pm subjects to a non linear behavior, the PI values of the new controller are no longer be valid. In such scenarios, more practical methods of tuning PI controller to be deployed. However, since the down time can not be permitted for prolonged testing purposes as it affects the energy production and revenue, such experimental methods for tuning PI values at site was not pursued. In contrast, the results of the switching strategy II (Figure 7.3) are within the anticipated simulated results (Figure 5.4). In this option, the new controller starts to activate only when the generator frequency tries to exceed grid frequency. At this time the synchronizer signals negative pulses to reduce Pm and the synchronizer waits till the generator frequency slows down to reference frequency. Thus, during the positive loop of the generator frequency Vs time curve, the control loop combining PI controller-Generator dominates the speed control of the generator. Since the model maintains its linear characteristics the actual response is mostly in line with the simulated results. When compared with the synchronization time between normal process and the synchronization with switching strategy II, the objective of the project has been achieved. The PI control action can be further fine tuned using trial and error methods at site when it comes to real commissioning. The time taken for synchronization has been reduced from 142 sec (Figure 7.1) to 48 sec (Figure 7.3). The maximum overshoot also has been reduced from 3.5Hz to 0.5Hz which is as a result of damping. The time saving will save the downtime by 94 seconds and according to the Table 1.1 the plant can generate additional units of 376kWhrs per year assuming an average annual plant factor of 30%. 49 References [1] Allen J. Wood and Bruce F. Wollenberg, Power Generation Operation and Control, 2nd ed., John Wiley & Sons, Singapore, 2005, Chapter 9, pp. 328-362. [2] John J. Grainger and Willian D. Stevenson, Jr., Power System Analysis, McGraw-Hill, Inc., Singapore, 1994, Chapter 16, pp. 695-707. [3] Katsuhiko Ogata, Modern Control Engineering, 4th ed., Prentice Hall of India Pvt. Ltd, New Delhi, 2006. [4] Katsuhiko Ogata, Discrete-Time Control Systems, 2nd ed., Prentice Hall of India Pvt. Ltd, New Delhi, 2005. [5] Cyril W. Lander, Power Electronics, 3rd ed., McGraw-Hill Book Co., Singapore, 1993. [6] Ned Mohan, Tore M. Undeland and William P. Robbins, Power Electronics, 3rd ed., John Wiley & Sons Inc., Replika Press Pvt. Ltd., India, 2006 . [7] James W. Dally, William F. Riley and Kenneth G. McConnell, Instrumentation for Engineering Measurement, 2nd ed., John Wiley & Sons Inc., Replika Press Pvt. Ltd., India, 2006, Chapter 6, pp. 162-205. [8] Thomas C. Hayes and Paul Horowitz, Student manual for The Art of Electronics, Cambridge University Press, Gopsons Papers Limited, India, 2002. Chapter 2, pp. 82-140. [9] Website, http://www.allaboutcircuits.com/vol2/chpt 12/6.html. accessed on 4/06/2008. [10] Data sheet # DS39582B/or PIC16F87XA 28/40pin 8-bit CMOS flash, Microcontrollers, Microchip Technology Inc., U.S.A, 2003. [11] Data sheet # GT50J101 for 600V, 50A IGBT, Toshiba, Japan. [12] Data sheet # PC817, Photocoupler, Sharp, Japan. [13] Datasheet # UTC D313, NPN Switching Transistor, Unisonic Technologies Co., Ltd. 50 Appendix 1. The Matlab program used to find PID vales of the present synchronizer % Estimate PID values of present synchronizer, [K(s+a)*(s+b)/s] J=250; Wo=76.18; C=0.8; t=0:1:600; Tg=0.3; Th=3.0; a-0.2333; Kt=8000; for K=0.2.-0.01:0.01; %starts the inner loop to vary the a values for b=0.6:-0.001:0.001; %starts the inner loop to vary the a values numl =[K (a+bj *K a *b *KJ; denl =[0 1 OJ; tfl-tf(numl,denl); num2=[0 0 1]; den2=[0 Tg 1]; tf2=tf(num2,den2); num3-[0 01]; den3=[0 Th 1]; tf3=tf(num3,den3); num4=[0 0 1]; den4=[0 Wo*J Wo*C]; tf4-tf(num4,den4) ; tf5=tf]*tf2*tf3*tf4*Kt; sys=feedback(tf5,1); y=step(sys,t); m=max(y); n=minfy); ifm<1.35 & m>0.99; break; % breaks the inner loop end end ifm<1.35 & m>0.99; 51 break; % breaks the inner loop end end r 1=1 ;while y(rl)<0. l,rl=rl+l ;end; r2=l;while y(r2)<0.9,r2=r2+l;end; Rise Jime=(r2-rl) *1 s-601; whiley(s)>0.98 &y(s)<1.02; s=s-l;end; sett I ingjime=(s -1) *1 max overshoot=m-l plot(t,y); grid; title('Estimated Unit-Step response of present Synchronizer') xlabel('t Sec') ylabel ('Amplitude') aa=num2str(a); %string value of'a'to be printed on the plot bb~num2str(b); %string value of'b' to be printed on the plot kk-num2str(K); %string value of'K'to be printed on the plot mm-num2str(max overshoot); %string value of max ^ overshoot to be printed on the plot rr=num2str (RiseJime); Hstring value of Rise Jime to be printed on the plot ss -num2str (settlingJime); %string value of settling Jime to be printed on the plot text (110,0.7, 'a='), text(150,0.7, aa) text(110,0.5,'b='),text(150,0.5,bb) text(l 10,0.3, 'K= '),text(l 50,0.3, kk) text(l 10,0.25, 'Max overshoot='),text(250,0.25,mm) text(360,0.1, 'Rise time='),text(450,0.1,rr) text(l 10,0.1, 'Settling time='),text(250,0.1,ss) sol=[sys] sol=[K;b] TFj>fJresent=tfl *tf2*t/3*Kt Appendix 2. The program used in Matlab to estimate PI parameters % Estimate parameters for new PI controller when Pe(s) is connected, [K(s+d)/s] J=250; Wo=76.18; C-0.8; t=0:l:90; Tg=0.3; Th=3; K=0.2; a=0.2333; b=0.05; Kl-8000; Ke-6000; for Kp=0.9:-0.1:0.1; %starts the inner loop to vary the 'Kp'values for d=0.1. -0.001:0.001; %starts the outer loop to vary the'd' values numl=[K (a+b) *Ka*b*KJ; denl =[0 1 0]; tfl-tf(numl,denl); num2-[0 01J; den2-[0 Tg 1]; tf2=tf(num2,den2); num3==f0 01J; den3-[0 Th 1J; tf3=tf(num3, den3); 1f4=tfl *tf2*tf3*Kt; %tf of the new PI controller num4=[0 Kp Kp*dJ; den4-[01 0]; tf5=tf(num4,den4); tf6=tf5*Ke; Gc = parallel (tf4, tf6); num5=[0 0 I]; den5=[0 Wo*J Wo*CJ; Gp=tf(num5,den5); 53 sys=feedback(Gc*Gp,l); y=step(sys,t); m=max(y); if m< 1.1 & m>0.99; break; % breaks the inner loop end end ifm0.99; break; % breaks the inner loop end end rl =i .while y(rl)<0. l,rl =rl+l;end; r2=l; while y(r2) < 0.9, r2=r2+1 ;end; Rise_time=(r2-rl) *1 s—91; whiley(s)>0.98 &y(s)<1.02; s=s-l;end; Settlingjime=(s-l) *1 maxovershoot=m-l plot(t,y); grid; title('Unit-Step response when Pe(s) is connected') xlabelft Sec') ylabel ('Amplitude') kk=num2str(Kp); %string value of Kp to be printed on the plot dd=num2str(d); %string value of d to be printed on the plot mm=num2str (maxovershoot); %string value of max overshoot to be printed on the plot ss=num2str(SettlingJime); %string value of Settling time to be printed on the plot rr-num2str (Rise time); %string value of Rise time to be printed on the plot text(21,0.9, 'Kp='), text (26,0.9, kk) text(21,0.7, 'd ='), text(26,0.7,dd) text(21,0.5, 'Max overshoot^'),text(42,0.5,mm) text(21,0.3, 'Settling time='),text(42,0.3,ss) text(21,0.1, 'Rise time='),text(42,0.1,rr) sol=[sys] sol=[Kp;d] Kp=Kp d=d tf4 (,H° Z , >0 o WPZ^ppij (puzp 'puinu)fi=[j~/O~JJ 1 L+ Appendix 3 GT50J101 m POWER SWITCHING APPLICATIONS. U n i t i n mm liigh Input Irapedance High Speed Low S a t u r a t i o n Vol tage Enlianc emeu t -Mode t f = 0 . 3 5 u s ( M a x . ) VCE(sat)=4.0V(Max.) AXIMUM RATINGS (Ta=25°C) CHARACTERISTIC bllec t o r - E m i t t e r Vol tage late-Emitter V o l t a g e Collector Current Junction T e m p e r a t u r e DC Ins lolleccor Power D i s s i p a t i o n rc*25°C) itorage Temperature Ranp,e crew Torque SYMBOL V'CES VGES IC iCP Pc Tj [s t£_ RATING 6 D 0 ±20 5 0 100 200 1 5 0 -55-150 0 . 8 UNIT M Nm 20-5MAX XI? 2.5 3.0 + 2 . 5 1 . 0 - 0 . 2 5 , 0 3 3 ± 0 2 ! 1 I 5.4 5 ± 0 . 1 5 5.4 5 ± 0 . 1 5 I. GATE 2- COLLECTOR CHEAT S I N K ) 3. EMITTER J E D E C E I A J T O S H I B A 2 - 2 1 F J C ELECTRICAL CHARACTERISTICS (Ta«25°C) Weight : 9 .75g CHARACTERISTIC SYMBOL ' TEST CONDITION MIN. TYP. MAX. UNIT Date Leakage Cu rrent ICES v G E = ± 2 0 v , V c e - 0 - _ ±500 nA Collector C u t - o f f Current ICES VCE=600V, VHE-0 — _ 1 . 0 cA Collector-Emitter treakduon Vol tage V(BR)CES IC~2nA, VnE=0 600 - - V Sate-Er.irter Cut -o f f Vo l tage VGE(off) IC~50nA, VCE=5V 3 . 0 - 6 . 0 V Collector-Emitter Saturation Vol tage v CE(sat ) 1 C - 5 0 A , V C E = 1 5 V - 3 . 0 4 . 0 V Input Capacitance Cies V c e = 1 0 V , V c c ® 0 i f-lMHz - 3500 — PF Rise Tine t r - 0 . 3 0 . 6 Switching Tine Turn-on Tice c on T ' n •—'-15V 1 30< - 0 . 4 0 . 8 us F a i l Tine t f - 0 . 1 5 0 . 3 5 » Turn-off Tine t o f f )V - 0 . 5 0 1 . 0 0 Hiermal R e s i s t a n c e R t h ( j - c ) - - - 0 . 6 2 5 GT50J101 WITCHING TIME - IQ COLLECTOR CURRENT I C ( A ) 3 10 30 100 300 GATE R E S I S T A N C E R G ( i l ) 1000 ( V ) P U L S E W I D T H t w ( s ) 30 0.5 1 3 10 30 100 300 COLLECTOR-EMITTER VOLTAGE V C E 3r lb SWITCHING TIME - R G COMMON EMITTER V C C = 3 0 0 V V G E - ± 1 S V I r = 5 0 A 5000 fa. ft 3000 V 1000 u jr 500 300 M O £ < 100 - COMMON E M I T T E R V G E = ° f = l M H i t Tc = 251C ( V ) REVERSE BIAS SOA COLLECTOR-EMITTER VOLTAGE V C E SAFE OPERATING AREA • S I N G L E N O N R E P E T I T I V E PULSE Te = 25*C CURVES M U S T BE DERATED L1NEALY W I T H INCREASE IN TEMPERATURE. .I : :: III I I I ,i i, I ill .1 1, 1.1 I, 0.3 1 3 10 30 100 300 1000 COLLECTOR-EMITTER VOLTAGE V C E ( V ) I C M A X . ( P U L S E D ) * I C MAX. ( CONTI NOUS ) GT50J101 160 120 80 4 0 Ic - VCE COMMON EMITTER Tc — 25"C 2 0 1 5 / / i 1 2 L 10 i f / f / s V n c = 8 V . J. 1 0 2 4 6 8 10 COLLECTOR-EMITTER VOLTAGE V C E ( V ) O > 16 VCE - VGE 3 12 < t-m2 0 > g 8 p p» 2 1 « e u J u ' COMMON EMITTER • T e = - 4 0 ' C \ too V 5 0 ic = 2 0 L A 4 8 1 2 1 6 2 0 G A T E - E M I T T E R VOLTAGE V G £ ( V ) 16 1 2 VCE - VGE . COMMON EMITTER " Tc = 25"C • 1 0 0 5 0 — V h : = 2 ( A 0 4 8 1 2 1 6 2 0 G A T E - E M I T T E R VOLTAGE V G E ( V ) w u > « o < o > PS cc 3 u I a, u u o o 16 1 2 VCE - VGE COMMON EMITTER Tc = 125"C 5 0 I c = 2 0 A 100 0 4 8 1 2 1 6 2 0 G A T E - E M I T T E R VOLTAGE V G E ( V ) 160 Jr* 120 v- z u £ 8 0 40 IC ~ VGE VCE-VGE - QG COMMON EMITTER V C E = 5 V JO * »7i u > o < H 0 > a u f-H k—« 2 u: 1 cs c t u j 400 300 200 100 4 8 1 2 1 6 2 0 G A T E - E M I T T E R VOLTAGE V G E ( V ) rf 0 —' o COMMON • EMITTER . R L = 6 X 1 Tc = 25*C 1 / / i 0 0 k o 1 0 0 n / / 16 12 4 0 80 120 160 200 C H A R G E Q G ( n c ) u o > w o •< J 0 > cc M J-H »—« 2 w 1 • k H •< O Appendix 4. PC817 Series PC817 Series # Lead forming type ( I type ) and taping reel type ( P t y p e ) are # # T U V ( V D E 0 8 8 4 ) approved type is also available as an option. • Features 1. Current transfer ratio ( C T R : M I N . 5 0 % a t I F = 5 m A , V CE = 5 V ) 2. High isolation voltage between input and output (Viso: 5 000V t o ) 3. Compact dual-in-line package P C 8 1 7 : 1-channel type P C 8 2 7 : 2-channel type P C 8 3 7 : 3-channel type P C 8 4 7 : 4-channel type 4. Recognized by UL, file No. E64380 • Outl ine Dimensions High Density Mounting Type Photocoupler also available. ( P C 8 1 7 I / P C 8 1 7 P ) • Applications 1. Computer terminals 2. System appliances, measuring instruments 3. Registers, copiers, automatic vending machines 4. Electric home appliances, such as fan heaters, etc. 5. Signal transmission between circuits of different potentials and impedances ( U n i t : m m ) PC817 2 . 5 4 J " 5 ® M ® C T R i 5 ? - ^ rank mark Anode m a r k . Internal connection diagram © ® ft ® ® Mi 1.2 4 03 4 . 5 8 * 0 5 I o 0 . 5 * C D ® 7 . 6 2 1 0 3 0 26*0-1 e = o to 13 ° ® PC847 •E \ ® S i o • CL > • 0- AJ Li JJ U, JJ Li ® ® ® ® © y y y ft ft ft '-] 2*0.3 1 4 . 7 4 * 0 - 5 ® © ® ® ® © ® @ ® Anode ® ® ® Cathode ® ® © Emitter ® @ © Collector 7 . 6 2 1 0 3 2 . 5 4 * © © @© © ® Internal connection diagram © © © © © © © ® S o . N fcfc co 5 5 I u i U u i i < 0 . 1 • CLl • 0 . 1 JJ U JJ li JJ Li ij Lb ® @ © ® ® ® ® ® y y ft ft ft ft 0.9*0.2 1.2 ® ® @® ® ® ® ® 7R9 0 . 5 * , E 3 , 0.26* 0 1 , 5 r "1 •n | m o co . W o T r : 0 . 5 * ° - 1 8 = 0 to 13* ® @ ® ® Anode ® ® ® ® Cathode 0 to 13" © © © © E m i t t e r ® © @ © Collector " In tie absence of confirmation by device specification sheets, SHARP takes no responsibility for any defects that occur in equipment using any of SHARP'S devices, shown in catalogs, data boots, etc. Contact SHARP in order to obtain the latest version of the device specification sheets before using any SHARP'S device.* SHARP PC817 Series I Absolute Max imum Ratings ( T a = 25 °C) Parameter Symbol Rating Unit Forward current If 50 mA Input "'Peak forward current Ifm 1 A Reverse voltage Vr 6 V Power dissipation p 70 mW Collector-emitter voltage V CEO 35 V Output Emitter-collector voltage Veco 6 V Collector current Ic 50 mA Collector power dissipation Pc 150 mW Total power dissipation P tot 200 mW ^Isolation voltage Vi,o 5000 Vrm, Operating temperature T opr -30 to + 100 °C Storage temperature T ag -55 to+ 125 °c '3Soldering temperature T sol 260 °C •1 Pulse width <=100ns, Duty ratio : 0.001 *2 40 to 60% RH, AC for 1 minute *3 For 10 seconds • Electro-optical Characteristics (Ta= 25 °C) Parameter Symbol Conditions MIN. TYP. MAX. Unit Input Forward voltage Vf If = 20mA - 1.2 1.4 V Peak forward voltage Vfm Ifm = 0.5A - - 3.0 V Reverse current 1R VR= 4V - 10 |IA Terminal capacitance C> V= 0, f= 1kHz - 30 250 pF Output Collector dark current ICEO VCE = 20V - 10-7 A Transfer charac- teristics *4Current transfer ratio CTR If= 5mA, Vce= 5V 50 - 600 % Collector-emitter saturation voltage VcE(sB) lF = 20mA,Ic= 1mA - 0.1 0.2 V Isolation resistance Riso DC500V, 40 to 60% RH 5 x 10"> 10" - a Floating capacitance Cr V=0 , f= 1MHz - 0.6 1.0 pF Cut-off frequency fc Vce=5V, I c=2mA, Ri= 1000, - 3dB - 80 - kHz Response time Rise time tr Vce = 2V, I c= 2mA, Rl = 100U - 4 18 ( I S Fall time t f - 3 18 U s *4 Classification table of current transfer ratio is shown below. Model No. Rank mark CTR (%) PC817A A 80 to 160 PC817B B 130 to 260 PC817C C 200 to 400 PC817D D 300 to 600 PC8#7AB A o r B 80 to 260 P C 8 * 7 B C B o r C 130 to 400 P C 8 # 7 C D C o r D 200 to 600 P C 8 # 7 A C A, B or C 80 to 400 PC8#7BD B, C or D 130 to 600 P C 8 # 7 A D A, B, C or D 80 to 600 P C 8 # 7 A, B,C, Dor No mark 50 to 600 Fig. 1 Forward Current vs. Ambient Temperature 60 | 40 I 30 » : 1 or 2 or 3 or 4 -25 0 25 50 75 100 125 Ambient temperature Ta (*C) SHARP PC817 Series - 30 0 25 50 75 100 Ambient temperature T , CC) 1 2 5 10 20 50 Forward current I p (mA) 10000 5000 2 000 1 000 5 1 0 2 5 10 "2 2 5 10 -1 2 5 1 Duty ratio Fig. 5 Forward Current vs. Forward Vol tage 0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 Forwaid voltage V p (V) Fig. 7 Relative Current Transfer Ratio vs. Ambient Temperature Fig. 2 Collector Power Dissipation vs. Ambient Temperature 200 0 - 30 0 25 50 75 100 125 Ambient temperature T a CC) Fig. 4 Current Transfer Ratio vs. Forward Current Fig. 3 Peak Forward Current vs. Duty Ratio Fig. 6 Collector Current vs. Collector-emitter Vol tage 0 1 2 3 4 5 6 7 8 Collector-emitter voltage V ce ( v ) SHARP PC817 Series Fig.11 Frequency Response Ambient temperature T a ( 'C) Fig.10 Response Time vs. Load Resistance Fig. 8 Collector-emitter Saturation Voltage vs. Ambient Temperature Load resistance Ri. (k£ i ) Test Circuit for Response Time Test Circuit for Frepuency Response Frequencyf (kHz) Fig. 12 Collector-emitter Saturation Voltage vs. Forward Current 6 > Input Ro Rt Output Output 5 10 Forward current I f (mA) 10 - 2 5 0 25 50 75 100 Ambient temperature T , CC) Fig. 9 Collector Dark Current vs. Ambient Temperature 10 ' • Please refer to the chapter "Precautions for Use " Application Circuits NOTICE • T h e circuit application examples in this publication are provided to explain representative applications of SHARP devices and are not intended to guarantee any circuit design or license any intellectual property rights. SHARP takes no responsibility for any problems related to any intellectual property right of a third party resulting from the use of SHARP'S devices. •Contact SHARP in order to obtain the latest device specification sheets before using any SHARP device. SHARP reserves the right to make changes in the specifications, characteristics, data, materials, structure, and other contents described herein at any time without notice in order to improve design or reliability. Manufacturing locations are also subject to change without notice. •Observe the following points when using any devices in this publication. SHARP takes no responsibility for damage caused by improper use of the devices which does not meet the conditions and absolute maximum ratings to be used specified in the relevant specification sheet nor meet the following conditions: (i) The devices in this publication are designed for use in general electronic equipment designs such as: — Personal computers — Office automation equipment — Telecommunication equipment [terminal] — Test and measurement equipment — Industrial control — Audio visual equipment — Consumer electronics ©Measures such as fail-safe function and redundant design should be taken to ensure reliability and safety when SHARP devices are used for or in connection with equipment that requires higher reliability such as: — Transportation control and safety equipment (i.e., aircraft, trains, automobiles, etc.) —Traffic signals — Gas leakage sensor breakers — Alarm equipment — Various safety devices, etc. Qii) SHARP devices shall not be used for or in connection with equipment that requires an extremely high level of reliability and safety such as: — Space applications — Telecommunication equipment [trunk lines] — Nuclear power control equipment — Medical and other life support equipment (e.g., scuba). •Contact a SHARP representative in advance when intending to use SHARP devices for any "specific" applications other than those recommended by SHARP or when it is unclear which category mentioned above controls the intended use. • I f the SHARP devices listed in this publication fall within the scope of strategic products described in the Foreign Exchange and Foreign Trade Control Law of Japan, it is necessary to obtain approval to export such SHARP devices. •This publication is the proprietary product of SHARP and is copyrighted, with all rights reserved. Under the copyright laws, no part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, in whole or in part, without the express written permission of SHARP. Express written permission is also required before any use of this publication may be made by a third party. •Contact and consult with a SHARP representative if there are any questions about the contents of this publication. SHARP 115 Appendix 5. UTC D313 NPN EPITAXIAL PLANAR TRANSISTOR NPN EPITAXIAL PLANAR TRANSISTOR DESCRIPTION The UTC D313 is designed for use in general purpose amplifier and switching applications. 1:BASE 2:COLLECTOR 3: EMITTER ABSOLUTE MAXIMUM RATINGS PARAMETER SYMBOL VALUE UNIT Collector-Base Voltage VCBO 60 V Collector-Emitter Voltage VCEO 60 V Emitter-Base Voltage VEBO 5 V Collector Current Ic 3 A Storage Temperature Tstg -55-+150 °C Junction Temperature V 150 °C ELECTRICAL CHARACTERISTICS(Ta=25°C) PARAMETER SYMBOL TEST CONDITIONS MiN TYP MAX UNIT Collector-Base Breakdown Voltage BVCBO IC=1mA 60 V Collector-Emitter Breakdown Voltage BVCEO . IC=10mA 60 V Emitter-Base Breakdown Voltage BVEBO IE=100uA 5 V Collector Cut-Off Current ICBO VCB=20V, IE=0 0.1 mA Emitter Cut-Off Current IEBO VEB=4V, IC=0 1.0 mA Collector-Emitter Saturation Voltage VCE(SAT) IC=2A, IB=0.2A 1.0 V Base-Emitter On voltage VBE(ON) VCE=2V, IC=1A 1.5 V DC Current Gain hFE IC=1A VCE=2V IC=0.1A,VCE=2V 40 40 320 CLASSIFICATION ON hFE RANK I C D E F RANGE I 40-80 60-120 100-200 160-320 U T C UNISONIC TECHNOLOGIES CO., LTD. 1 QW-R203-001.A U T C UNISONIC TECHNOLOGIES CO., LTD. QW-R203-001.A UTC D313 NPN EPITAXIAL PLANAR TRANSISTOR 1000 DC CURRENT GAINT 10000 SATURATION VOLTAGE v.s. COLLECTOR CURRENT 5- 1000 100 1000 10000 Collector Current (MA) 1 0 100 1000 10000 Collector Current (MA) lc=1 OLS 10000 VBHSAT) V.S.IC £ 1000 10 100 1000 10000 Collector Current (mA) fc=10b 10 100 Collector to Emitter Vol tage (v) 10000 1000 VB£(ON) V.S. Ic 100 10 100 1000 10000 Collector Current (MA) VCE=2V UTC D313 NPN EPITAXIAL PLANAR TRANSISTOR UTC assumes no responsibility for equipment failures that result from using products at values that exceed, even momentarily, rated values (such as maximum ratings, operating condition ranges, or other parameters) listed in products specifications of any and all UTC products described or contained herein. UTC products are not designed for use in life support appliances, devices or systems where malfunction of these products can be reasonably expected to result in personal injury. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner. The information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed without notice. U T C UNISONJC TECHNOLOGIES CO., LTD. 3 QW-R203-001, A Appendix 6. S D L S 0 4 6 SN5413, SN54LS13, SN7413, SN74LS13 DUAL 4-INPUT POSITIVE-NAi\lD SCHMITT TRIGGERS DECEMBER 1983-REVISED MARCH 1988 • Operation f rom Very Slow Edges • Improved Line-Receiving Charac- teristics High Noise Immunity description Each circuit functions as a 4-input NAND gate, but because of the Schmitt action, it has different input threshold levels for positive ( V t + ) and for negative going ( V f - ) signals. These circuits are temperature-compensated and can be triggered from the slowest of input ramps and still give clean, jitter-free output signals. The SN5413 and SN54LS13 are characterized for oper- ation over the full military temperature range of -55°C to 125°C. The SN7413 and SN74LS13 are character- ized for operation from 0°C to 70°C. logic symbol* 1A- 1B- 1C- 1D- 2A- 2B- 2C- 2D- (11 &JJ (2) v j f i ) (41 16) <91 110) VJB) (121 (131 •TY -2Y SN5413. SN54LS13 . . . J OH W PACKAGE SN7413 . . . N PACKAGE SN74LS13 . . . D OR N PACKAGE (TOP VIEW) 1A C 1 Ul4 3 Vcc IB C 2 13 3 2D NC C 3 12 3 2C icC 4 11 2 NC 1D C 6 10 2 2B 1Y C 6 9 2 2A GND C 7 S 2 2Y SN54LS13 . . . FK PACKAGE (TOP VIEW) NC ] 4 NC ] 5 1C ] 6 NC ] 7 1D ] 8 •• i > I 11 11 11—l 3 2 1 20 19 10 [ . 9 10 111213 / X r n t - i ^ n n X >- Q O > < <3 NC—No internal connection 2C 17[ NC 16[ 15t 14 [ 2B NC NC logic diagram (positive logic) tThis symbol is in accordance with ANSI/IEEE Std 91-1984 and I EC Publication 617-13. Pin numbers shown are for 0, J, N, and W packages. ABCD FROOUCTIOK DATA decum««ti wauin )»tar«atfoa eorrnt as el puUiulkm dais. Product! t«irt«n> to ™ - m i p» the term* »l Taiaa latfrnmenti .:»«dart wirt««tY. f—.—— — nKUMrilr inclooe tejonj of all (urimrton. TEXAS ^ INSTRUMENTS POST OFFICE BOX 655012 > OAU.AS, TEXAS 75265 SN5413, SN54LS13, SN7413, SN74LS13 DUAL 4 INPUT POSITIVE NAND SCHMITT TRIGGERS schematics Supply voltage, V c c (see Note 1) 7 v Input voltage: '13 5 . 5 V ' L S I 3 7 V Operating free-air temperature: SN54' _ 5 5 ° c to 125°C SN74' 0°C to 70°C Storage temperature range - 65°C to 150° C NOTE 1: Voltage values ere with respect to network ground terminal. , TEXAS ^ INSTRUMENTS »OST OFFICE B O * 655012 • DALLAS. TEXAS 75265 SN5413, SN7413 DUAL 4-INPUT POSITIVE-NAND SCHMITT TRIGGERS recommended operating conditions SN5413 SN7413 MIN NOM MAX MIN NOM MAX V<;c Supply voltage 4.6 5 5.5 4.75 5 5.25 V 'OH High-level output current - 0 . 8 - a s mA 'OL Low-level output current 16 16 mA T ^ Operating free-air temperature - 5 5 125 0 70 °c electrical characteristics over recommended operating free-air temperature range (unless otherwise noted) PARAMETER TEST CONDITIONS* MIN TYP* MAX UNIT v T + V C C ' 5 V 1.5 1.7 2 V v - r - V C C - 5 V 0.6 0.9 1.1 V Mysieresis 1 V T 4 . - V T _ ) V C C - 6 V 0.4 0.8 V V|K V c c ' M I N . If • — 12 mA - 1.5 V V 0 H V C C - M I N . V j * 0.6 V, ' O H " - 0.8 mA 2.4 3.4 V VOL V c c = M ' N . V | - 2 V , l0 |_ = 16mA 0.2 0.4 V IT+ v C c - s V, V, - V T + - 0 . 6 5 mA CCL V c c - M A X 20 32 mA * f o r c o n d i t i o n * s h o w n a t M J N or M A X , use t h e a p p r o p r i a t e va lue spec i f i ed u n d e r r e c o m m e n d e d o p e r a t i n g c o n d i t i o n s . » A l l t y p i c a l va lues are a t V c c - 5 V , T A - 2 5 ° C. § N o t m o r e t h a n o n e o u t p u t s h o u l d be s n o r t e d a t a t i m e , switching characteristics, V c c = 5 V , T a = 2 5 ° C PARAMETEH FROM IINPUT) TO (OUTPUTI TEST CONDITIONS MIN TYP MAX UNIT «PLH Any Y R L - 4 0 0 n , C L - 1 5 p F 18 27 ns O C L - 15 pF 15 22 ru tPHL 18 27 ns , TEXAS ^ INSTRUMENTS »OST OFFICE BO* 655012 • DALLAS. TEXAS 75265 S N 5 4 1 3 , S N 5 4 L S 1 3 , S N 7 4 1 3 , S N 7 4 L S 1 3 DUAL 4-IIUPUT POSITIVE -NAND SCHMITT TRIGGERS PARAMETER MEASUREMENT INFORMATION TEST POINT VCC FROM OUTPUT UNDEH ' TEST tsse Nota A) W W W INPUT C Cl bee Nora B) LOAD C IRCUIT 1 OUTPUT ^ y p W f H I >k \ V) re<(L> K ' f l - H VQ-el 3 V 0 V Vow j ^TTv - C V O L (See Note CI VOLTAGE W A V E F O R M S NOTES: A. All diodes ere 1 N3064 or ectuivelent. 8 . Cj_ includes p robe e n d j i g capacitance. C. Generator character ist ics and reference voltages are: Generator Characteristics Reference Voltages zout ™ R tr tf v l reflHI V , ref(L) v O raf SN547SN74* SO n 1 MHz 10 ns 10 ns 1.7 V 0.9 V 1.5 V SNS4 LS7SN74LS' 50 n 1MHz 15 ns 6 ns 1.6 V 0.8 V 1.3 V POSITIVE-GOING THRESHOLD VOLTAGE vs FREE-AIR TEMPERATURE TYPICAL CHARACTERISTICS OF '13 CIRCUITS NEGATIVE-GOING THRESHOLD VOLTAGE > 1.70 J l . « | 1.68 2 '.«7 J 166 1.66 f | 164 1 163 | 1*2 I 1.61 4 r 1 so Vc< V" -6V > i X (- s' 4 vs FREE-AIR TEMPERATURE -SO 0 26 60 76 IDS 125 Ta - Free-Air Temperature - °C FIGURE 1 0.90 0.89 0.88 0.87 0.86 O.BS 084 0 83 VC c - 5 0.B1 080 I HYSTERESIS vs FREE-AIR TEMPERATURE -75 — 50 — 25 0 25 50 75 100 125 — Free-Air Temperature — °C FIGURE 2 f . I I £ i + i-> 5 V 820 810 790 780 770 760 750 -It -50 - 25 0 26 50 75 Ta — Free-Air Temperature — 100 125 'C FIGURE 3 Data f o r temperatures be low 0 °C ana 70° C end supp ly voltages be low 4.7S V and above 5 .25 V ere epp l icab le f o r S N 5 4 1 3 on l y . TEXAS INSTRUMENTS OACT / ' C t i f t ortv . AC 7C!CC SN5413, SN7413 DUAL 4 INPUT POSITIVE-NAND SCHMITT TRIGGERS TYPICAL CHARACTERISTICS OF '13 CIRCUITS DISTRIBUTION OF UNITS FOR HYSTERESIS I V c c - 6 1 V •A ( \ 1 99% ABO •735 J ARE VE J f \ / 720 740 780 780 800 820 840 860 MO VT+ - V f _ - Hysteresis - mV FIGURE 4 2.0 1.8 1.6 1.4 f »•* 0 > 1.0 U 1 0.6 > I OA 0.2 THRESHOLD VOLTAGES vs SUPPLY VOLTAGE 4.6 4.75 5 5.25 VT+ - Vr_ - Hyrterasii - oiV FIGURES TA «25°< ' ? OKtlV. •Goinj Threi hold V oltagc . VT+ Neg («>»e- joins "hreth >ld Vc Itaga, VT- 5-5 HYSTERESIS vs SUPPLY VOLTAGE 2.0 1.8 > 1 1 1-2 f , « 0.8 ' 0 6 TA > 0 . 4 0 4.5 4.76 5 6.25 5-5 Vcc - Supply Voltage ~ V FIGURE 6 OUTPUT VOLTAGE vs INPUT VOLTAGE 1 1 Vcc " S V . T A - 2 6 ' C 1 VT+" 1 0 0.4 0.8 1.2 1.6 2 Vcc - Supply Voltage - V F IGURE 7 Date f o r temperatures be low 0°C and 70°C and supp ly voltages be low 4 ,75 V and above 5.25 V ere appl icable fo r S N 5 4 1 3 on l y . TEXAS ^ INSTRUMENTS POST OFFICE SOX €55012 • DALLAS. TEXAS 7S265 SN54LS13, SN74LS13 DUAL 4-INPUT POSITIVE-HAND SCHMITT TRIGGERS TYPICAL CHARACTERISTICS OF 'LS13 CIRCUITS POSITIVE-GOING THRESHOLD VOLTAGE vs FREE-AIR TEMPERATURE vC( I" : - s \ - 7 5 - S O - 2 5 0 28 BO 75 100 125 T * — Free-Air Temperature _ °C FIGURE 8 NEGATIVE-GOING THRESHOLD VOLTAGE vs FREE-AIR TEMPERATURE 0.90 0.89 0.88 0.87 0.86 VC C - 5 r 1/ 0.85 0.84 0 82 0.81 0.80 — 75 -SO - 2 5 0 25 50 75 100 125 TA — Free-Air Temperature - °C FIGURE 9 DISTRIBUTION OF UNITS FOR HYSTERESIS VT+ - V T - - Hysteresis _ MV FIGURE 11 HYSTERESIS vs FREE AIR TEMPERATURE > E I S S £ i i > i Ta — Free-Air Temperature - °C FIGURE 10 Date f o r t e m p e r a t u r e s b e l o w 0°C and above 70° C a n d s u p p l y vo l tages Be low 4 , 7 6 V e n a above 6 . 2 5 V are aoo l ieeb le f o r S N 5 4 L S 1 3 o n l y . , TEXAS ^ INSTRUMENTS »OST OFFICE BO* 655012 • DALLAS. TEXAS 75265 SN54LS13, SN74LS13 DUAL 4-INPUT P0SIT1VE-NAND SCHMITT TRIGGERS TYPICAL CHARACTERISTICS OF XS13 CIRCUITS THRESHOLD VOLTAGES AND HYSTERESIS vs SUPPLY VOLTAGE Vcc - Supply Voltage - V FIGURE 12 OUTPUT VOLTAGE v s INPUT VOLTAGE i — r ™ Vcc " 5 V ° 0 0.4 0.8 1.2 1.6 2 V| - Input Voltage - V FIGURE 13 Data f o r t e m p e r a t u r e s b e l o w 0°C a n d above 70° C a n d s u p p l y vo l tages b e l o w 4 . 7 5 V e n d above 5 . 2 5 V are app l i cab le t o r S N S 4 L S 1 3 o n l y . , TEXAS ^ INSTRUMENTS »OST OFFICE BO* 655012 • DALLAS. TEXAS 75265 SN5413, SN54LS13, SN7413, SN74LS13 DUAL 4-INPUT POSITIVE-NAND SCHIVHTT TRIGGERS TYPICAL APPLICATION DATA CMOS n r 1 > ) I TTL SYSTEM SINE-WAVE J T OSCILLATOR TTL SYSTEM INTERFACE FOR SLOW INPUT WAVEFORMS PULSE SHAPER 0.1 H i to 10 MHz MULTIVIBRATOR THRESHOLD DETECTOR OUTPUT INPUT Open-collector outpu r I ! INPUT | ^ J V — I I - I - - I I You-OUTPUT INPU PULSE STRETCHER TEXAS INSTRUMENTS POST OFFICE SOX 655012 • DALLAS. TEXAS 752E5 Appendix 7. MICROPROCESSOR PROGRAM FOR 'PI' CONTROLLER STRATEGY II config _LVP_OFF & _XT_OSC & _WDT_OFF & _PWRTE_ON & _CP_OFF & _BODEN_OFF & _DEBUG_OFF ; for PID listp=16F877A Sinclude pl6F877a.inc cblock 0x40 CEBPulselengthH CEBPulselengthL GENPulselengthH GENPuIselengthL errorL errorH errorfrequ INT TERM_H INTTERML PROP_TERM_H PROP_TERM_L PID_RES_H PID_RES_L PWM flags ;0-low frequency 1 -error neg 2-cal over 3-start new cycle ;4-gen ok 5-ceb ok endc AARGBO equ 0x50 AARGB1 equ 0x51 AARGB5 equ 0x52 BARGB0 equ 0x53 BARGB1 equ 0x54 REMB0 equ 0x55 REMB1 equ 0x56 TEMP equ 0x57 LOOPCOUNT equ 0x58 TEMP2 equ 0x59 org 0x00 goto start org 0x04 banksel INTCON bcf INTCON,0 btfss INTCON,2 ; goto chk_Iow_fteq retfie bcf INTCON^ banksel flags btfss flags,4 ;chk gen ok goto setlowfreq btfsc flags,5 goto setoutput banksel flags bsf flags,0 bsf flags,3 goto setoutput setlowfreq banksel flags bsf flags,0 bsf flags,3 call calculate retfie setoutput call calculate banksel flags bsf flags,3 ;chk_low_freq ; banksel PIR1 ; btfss PIR1,0 ; retfie ; Banksel flags bsf retfie flags,0; low frequency or start configprocessor banksel PR2 movlw 0xC7 ;199 movwf PR2 banksel CCPR1L movlw 0x00 ;at initilize 0 movwf CCPR1L bcf CCPlCON,CCPlX bcf CCP1 CON,CCP 1Y banksel TRISC bcf TRISC.2 banksel T2CON movlw b'00000100' ; TMR2 = on, prescale =1:1 movwf T2CON banksel CCP ICON movlw b'OOOOllH' ; and enable PWM mode movwf CCP1CON banksel TRISB ; bit 5 for desable CEB reading movfw b'l 1100000' ;B,7 B,6 and B,5 are input banksel INTCON bsf INTCON,7 bsf INTCON,6 bsf INTCON,5 banksel T1CON bcf TlCON,4 bcf TICON,5 ;PS 1:1 minFz=16Hz BSF STATUS, RPO CLRF PIEl bcf PIE 1,0 ; timer 1 interupt enable desabled BCF STATUS, RPO CLRF PIRl banksel OPTION_REG bcf OPTION_REG,5 bcf OPTION REG,3 bsf OPTION~REG,0 bsf OPTION_REG,l bsf OPTIONREG^ bank3el INTCON bsf INTCON,7 bsf INTCON,6 bsf INTCON,5 bcf INTCON,2 . banksel INT_TERM_H clrf I N T T E R M H clrf INT_TERM_L clrf flags call setdefoultpwm main Banksel flags btfsc flags,4 goto gen_read_ok clrf flags; new cycle banksel TMRO clrf TMRO banksel OPTION_REG bsf OPTION_REG,0 ; bsf OPTION_REG,1 ; bsf OPTION_REG,2 ;timerO ps= 1:256 call readGEN banksel PIRl btfss PIR1,0 ;check if the timer lx>0ms goto $+6 Banksel flags bsf flags,0; low frequency flag bcf PIR1,0 goto setdefoultpwm ; goto set defoult pwm g e n r e a d o k nop nop call readCEB btfsc flags ,2 bcf flags,2 btfsc flags,3 goto main goto $-2 goto main readCEB Banksel flags bcf flags,3;: banksel PORTB btfsc PORTB,5 goto CEB freq_set banksel TMR1H CLRF ™ R I H CLRF TMR1L banksel CEBPulselengthH clrf CEBPulselengthH clrf CEBPulselengthL banksel PORTB btfsc flags,3 goto main btfsc PORTB,7 goto $-3 btfsc flags,3 goto main btfss PORTB,7 goto $-3 BSF TICON, btfsc flags,3 goto main btfsc PORTB,7 goto $-3 btfsc flags,3 goto main btfss PORTB,7 goto $-3 BcF TICON, banksel TMR1H movfw TMR1H banksel CEBPulselengthH movwf CEBPulselengthH banksel TMR1L movfw TMR1L banksel CEBPulselengthL movwf CEBPulselengthL banksel flags bsf flags,5 bcf nop return ; flag for new cycle flags,0 ;flag for low frequency CEB_freq_set movlw 0x4E banksel CEBPulselengthH movwf CEBPulselengthH movlw 0x20 banksel CEBPulselengthL movwf CEBPulselengthL banksel flags bsf flags,5 bcf nop return flags,0 ;flag for low frequency readGEN banksel TMR1H CLRF TMR1H CLRF TMR1L banksel GENPulselengthH clrf GENPulselengthH clrf GENPulselengthL banksel PORTB btfsc flags,3 goto main btfsc PORTB,6 goto $-4 btfsc flags,3 goto main btfts PORTB,6 goto $-3 BSF TICON. btfsc flags,3 goto main btfsc PORTB,6 goto $-3 btfsc flags,3 goto main btfss PORTB,6 goto $-3 BcF TICON, btfsc flags,2 return banksel TMR1H movfw TMR1H banksel GENPulselengthH movwf GENPulselengthH banksel TMR1L movfw TMR1L banksel GENPulselengthL movwf GENPulselengthL banksel flags bsf flags,4 nop return calculate TimeError ;(ceb-gen) errorfre btfsc flags,0 goto setdefoultpwm banksel GENPulselengthH movfw GENPulselengthL subwf CEBPulselengthL.w movwf errorL btfsc STATUS,0 goto $+5 comf errorL, 1 incf errorL,0 sublw Oxff movwf errorL incf GENPulselengthH,0 goto $+2 movfw GENPulselengthH subwf CEBPulselengthH.w movwf errorH btfss STATUS,0 goto setdefoultpwm nop movfw errorH movwf AARGBO movfw errorL movwf AARGB1 movlw 0x08 movwf BARGBO call UDIV1608L nop ;if error is minus ;error minus ;error ok movfw AARGBO addlw Oxff btfsc goto movfw integral STATUS,0 setdefoultpwm AARGB1 movwf errorfrequ movfw sublw btfsc goto nop movlw OxOA MOVWF BARGBO CALL UDIV1608L INT_TERM_H 0x01 STATUS, Z PLD add ;;add to previous results MOVF AARGBl.W ADDWF INT TERM L, F BTFSC STATUS, C INCF INT TERM H, F MOVF AARGBO, W ADDWF INT TERM H, F GOTO PID add SUME_NEG BTFSS GOTO MOVLW ADDWF MOVWF BTFSS GOTO GOTO CHECK_2 BIG ~ MOVLW ADDWF MOVWF BTFSC GOTO flag, 1 ADDJNT TERM B'00010100' INT_TERM_H, TEMP2 TEMP2, 7 ADDJNTTERM PIDadd B'l 1101100' INT_TERM_H, TEMP2 TEMP2, 7 ADD INT TERM W W PID_add clrf clrf ;set intigeal term movfw movwf movfw movwf movlw MOVWF call movfw addwf movfw addwf P i D R E S H PID_RES_L INT_TERM_L; AARGB1 INTTERM H AARGBO 0x05 BARGBO UDIV1608L AARGB1 PID_RES_L,1 AARGBO PID RES H,1 clrf AARGBO movfw errorfrequ movwf AARGB1 movlw 0x02 movwf BARGBO call UDIV1608L movfw AARGB1 movwf AARGBO movlw 0x05 movwf call BARGBO UMUL0808L movfw AARGBO movwf PROP_TERM_H movfw AARGB1 movwf PROP_TERM_L addwf PID_RES_L,l BTFSC STATUS, C INCF PID_RES_H, F movfw PROP_TERM_H addwf PID_RES_H,1 movfw PIDRES L banksel CCPR1L~ movwf CCPR1L banksel flags bcf flags,5 bcf flags,4 return set_defoult_para movlw 0x20 movwf PWM banksel CCPR1L movwf CCPR1L return PID btfsc flags,0 goto setdefoultpwm setdefoultpwm banksel BSF movlw movwf return T2CON T2CON,2 0x28 ; L= duty*2 CCPR1L =div UDIV1608L REMBO MOVLW MOVWF GLOBAL CLRF 8 LOOPCOUNT UD1V1608L LOOPUI6O8A RLF MOVF SUBWF RLF AARGBO,W REMBO, F BARGBO,W REMBO, F BTFSC GOTO ADDWF BCF UOK68A RLF STATUS,0 UOK68A REMBO, F STATUS,0 AARGBO, F DECFSZ GOTO LOOPCOUNT, F LOOPUI6O8A CLRF MOVLW TEMP MOVWF LOOPCOUNT LOOPUI6O8B RLF AARGB1,W RLF REMB0, F RLF TEMP, F MOVF BARGBO,W SUBWF REMB0, F CLRF AARGB5 CLRW BTFSS STATUS,0 INCFSZ AARGB5,W SUBWF TEMP, F BTFSC STATUS,0 GOTO UOK68B MOVF BARGBO,W ADDWF REMB0, F CLRF AARGB5 CLRW BTFSC STATUS,0 INCFSZ AARGB5,W ADDWF TEMP, F BCF STATUS,0 UOK68B RLF AARGB1,F DECFSZ LOOPCOUNT, F GOTO LOOPUI6O8B return UMUL0808L CLRF AARGB1 MOVLW 0x08 MOVWF LOOPCOUNT MOVF AARGBO,W LOOPUMO8O8A RRF BARGBO, F BTFSC STATUS,0 GOTO LUM0808NAP DECFSZ LOOPCOUNT, F GOTO LOOPUMO8O8A CLRF AARGBO RETLW 0x00 LUM0808NAP BCF STATUS,0 GOTO LUM0808NA LOOPUMO8O8 RRF BARGBO, F BTFSC STATUS,0 ADDWF AARGBO, F LUM0808NA RRF AARGBO, F RRF AARGB1, F DECFSZ LOOPCOUNT, F GOTO LOOPUMO8O8 return