Imperial College of Science and Technology (University of London
Total Page:16
File Type:pdf, Size:1020Kb
Imperial College of Science and Technology (University of London) MICROCOMPUTER CONTROL SYSTEM FOR DIESEL ENGINES by S. Wijeyakumar BSc (Eng), DIC, MSc (Lond) January, 1981 This thesis forms part of the requirements for the Doctor of Philosophy degree of the University of London Mechanical Engineering Dept Exhibition Road South Kensington London SW7 2BX - i i - TO My Dad, Sister and Brothers and the memory of my Mother - i i i - ABSTRACT This thesis presents the details of a microcomputer based controller intended for diesel engine test-beds. It is based on a 16-bit TMS 9900 microprocessor and provides the necessary capability to conduct steady- state and transient test operation. In addition, a "Fail Safe" software alarm system is included to pro- tect the engine. A LSI-11 based microcomputer system, currently being developed, will provide the test-points to the above controller, control data-logging and pro- cessing and provide the user interface. Detailed hardware design analysis of the controller (i.e. selection of microprocessor, ADC, DAC etc), and software construction based on a "Modular Programming" concept are described. Mathematical modelling techniques for engine- load dynamics, using continuous control theory and sam- pled data concept are outlined. Formulation of speed and torque control algorithms are presented. For speed control, a proportional control algorithm is used and the integration is performed by the actuator, the stepping motor. This algorithm provides feedforward compensation for the anticipated load change demand. A 3-mode controller is employed for torque control, with a sampling frequency of 20 Hz. Optimization of the controller is described. - i v - To demonstrate the capability of the system, a part of the proposed 1979 US heavy duty diesel Federal Smoke and Emission Schedule, (to be implemented in 1983) was conducted. The results show high accuracy and repeatability. - v - ACKNOWLEDGEMENTS I wish to acknowledge Dr. N. WATSON for his constant encouragement and supervision of this work. My thanks are also due to MR. R.D. BLOXHAM for designing and constructing the Hardware of the Control System and MR. C. HALL for setting up the engine test-bed. I am greatly in debt to MR. K. PATHMANATHAN for his invaluable help in preparing the diagrams of this manuscript. My appreciation is also due to MRS. SAKU KARUNARATNE for her valuable contribution of a neatly typed text. Finally, I wish to express my sincere gratitude to my brother DR. S. BALACHANDRAN for giving me this oppor- tunity to complete my studies. - VI - CONTENTS Page NOTATION 1 CHAPTER 1. INTRODUCTION 1.,1 . Introduction and Background 5 1. 2. Microprocessor, Memory and Assessment 12 1.2. 1. History of Microprocessors 12 1.2. 2. Bus Architecture 14 1.2. 3. Memory 17 1.2.3. 1. Volatile Memory 18 1.2.3. 2. Non-Volatile Memory 19 1.2. 4. Assessment 20 1. 3. Microprocessor-Based Engine-Test Facility 21 1.3. 1. Control Module 22 1.3. 2. Data-Acquisition Module 24 1. 4. Objectives 27 1. 5. Outline of the Present Work 29 CHAPTER 2. SUMMARY OF PREVIOUS WORK 2. 1. Computerised Engine Test-Beds 35 2. 2. Microcomputers in Automotive Technology 37 2. 3. DDC (Direct Digital Control) System 42 2.3. 1. DDC Algorithms 43 2.3. 2. DDC System design 48 2.3. 3. Analysis of Sampling Rates 50 2.3. 4. Tuning PID Controllers 52 2. 4. Engine Modelling 53 - VII - Page CHAPTER 3. SYSTEM DESIGN ANALYSIS 3.1. Introduction 56 3.2. Microprocessor Selection 56 3.3. TMS 9900 Microprocessor 63 3.4. Microcomputer Control System at Imperial College 64 3.5. Test Bed 71 3.5.1. Engine 71 3.5.2. Eddy-Current Dynamometer 73 3.6. Description of Subsystems 7 5 3.6.1. Speed Control System 75 3.6.1.1. Speed Control Interface 76 3.6.2. Torque Control System 8 3 3.6.2.1. ADC Selection 86 3.6.2.2. Torque Control Interface 91 3.6.3. Interrupt Control System 9 4 CHAPTER 4. THEORETICAL ANALYSIS 4.1. Introduction 96 4.2. Engine Load Dynamics 99 4.3. Sampled Data Model for Compression Ignition Engines 105 4.4. Review of Engine-Test System 108 4.5. Torque Control 110 4.5.1. PID Control 115 4.5.2. Modifications to Improve PID 119 4.5.3. Improved Derivative Action 121 4.5.4. Tuning of PID Control 123 - VIII - Page 4.5.5. Effects of Sampling 126 4.6. Speed Control 130 4.7. Software Design Considerations 135 CHAPTER 5. CONTROL SOFTWARE DESIGN 5.1. Introduction 138 5.2. Modular Programming and Control Software Structure 141 5.3. Key Features Unique to Programming TMS 9900 151 5.4. Description of Control Software 154 5.4.1. Main Program 155 5.4.2. Shared Subprograms 171 5.5. Fail Safe and Alarm System 175 5.6. Program Development Tools 177 CHAPTER 6. EXPERIMENTATION AND EVALUATION 6.1. Introduction 17 9 6.2. Speed Control Implementation 181 6.3. Torque Control Implementation 187 6.3.1. Static Calibration 188 6.3.2. Dynamic Calibration 190 6.3.3. PID Control 195 6.3.3.1. Tuning of PID 195 6.3.4. Review of Torque Control System 198 6.4. Optimization of Torque Control 205 6.4.1. Basic PID 205 6.4.2. Modified PID-1 206 - IX - Page 6.4.3. Modified PID-2 207 6.5. Proposed 197 9 USA Federal Smoke and Emission Test 213 CHAPTER .7. CONCLUSION AND RECOMMENDATIONS 7.1. CONCLUSION 2 24 7.2. RECOMMENDATIONS 225 7.2.1. Speed Measurement 2 25 227 7.2.2. Speed Control 7.2.3. Torque Control 2 30 7.2.4. Digital Filtering 231 7.2.5. Software Development 2 31 REFERENCES 2 35 APPENDICES APPENDIX 1. TMS 9900 Assembly Language and Cross-Compiler 2 59 APPENDIX 2. Proposed 197 9 USA Federal Smoke and Emission Schedule 274 APPENDIX 3. Curve Fit Routine 280 APPENDIX 4. Source listing of Control Software 283 APPENDIX 5. Specification of Control and Data logging system 339 - 1 - NOTATION SYMBOL C : Coefficient of viscous damping th C' n : Controlled process output at the N sampling instant C(s) : Output signal f C(t) : Controlled process output at time 't 4- Vi e : Error at the N sampling instant N e : Steady state error u O e(t) : Error at time ' t' E : BEC unit input (mV) E(s) : Error signal G (s) : Transfer function of Controller c I : Dynamometer stator coil current J : Polar moment of inertia K : Torsional Stiffness K : Controller gain c ^ K : Speed gain/torque at constant governor lever R posn. Kgp : Speed controller gain K : Speed gain/governor lever posn. at constant t torque K^ : Derivative gain for 3-mode controller K^. : Integral gain for 3-mode controller Kp : Proportional gain for 3-mode controller K : Torque gain/torque at constant governor lever R posn. - 2 - K : Torque gain/governor lever posn at constant speed L : Dead time th : Controller output at the N sampling instant M(S) : Actuating Signal N : Number of samples R : Governor lever position or max. open-loop reaction rate for unit-step input RCs) : Reference input T : Torque (mKp) : Derivative time constant : Filter time constant T. : Integral time constant l T : Sampling period s V : Initial off-set m ft : angular speed SUFFIX e : Engine d : Dynamometer f : Final i : initial ABBREVIATION ADC : Analoque to Digital convertor ALU : Arithmetic logical Unit - 3 - BEC : Brake Excitation Control Unit CPU : Central Processing Unit CRU : Communication Register Unit CU : Control Unit CUTS : Computer User's Tape System DAC : Digital to Analoque Convertor DDC : Direct Digital Control DMAC : Direct Memory Access Controller FIFO : First-in-First-out FVC : Frequency to Voltage Convertor GSCL : Governor Speed Control Lever IAE : Integral Absolute Error I.C : Imperial College LED : Light Emitting Diode LP : Line Printer LSB : Least Significant Bit LSI : Large Scale Integration MSB : Most Significant Bit MT : Magnetic Tape Unit PC : Program Counter PID : Proportional-Integral-Derivative RAM : Random Access Memory ROM : Read Only Memory S/H : Sample-and-Hold SMS : Stepping Motor Steps ST : Status Register TDC : Top Dead Centre TTY : Teletype UART : Universal Asynchronous Receive and Transmission - 4 - VDU : Visual Display Unit WP : Workspace Pointer - 5 - CHAPTER 1 INTRODUCTION 1.1 Introduction and Background Present trends towards stricter vehicle Exhaust Emission Standards and sharply rising fuel costs have intensified research and development programmes in Automobile Manufacturing Industries. The prime task is to make vehicles with low exhaust emission and high fuel economy while maintaining acceptable drive characteristics. The long-term task will be a major redesign of present-day automobiles, with emphasis on reduced size, weight, and alternative powertrain systems (19). This has led to a major increase in the demand for diesel engines. Although diesel engines are attract- ive due to their good fuel consumption, they are not wholely without faults. In the past, diesel engines have been developed mainly by trial and error, combined with some inspired intution from a few individuals.•However, the high cost of this approach today, combined with the rapid changes in Exhaust Emission Standards, has led to renewed interest in understanding and developing of theo- retical models of the most significant processes involved in the engine system, especially under driving conditions. The complexity of some of these processes (e.g. - 6 - Combustion) means that certain simplifying assump- tions have to be made. To check the validity of these assumptions, the overall accuracy of predic- tions , and the effects of conventional trial and « error development, large amount of data must be obtained from test engines under a controlled envi- ronment (speed and load).